/*
   ARL Admin Panel — Custom Styles
  */

/*  Variables */
:root {
  --sidebar-width: 250px;
  --sidebar-bg: #1a2236;
  --sidebar-text: #c8d3e6;
  --sidebar-hover: #2a3a5c;
  --sidebar-active: #3b5bdb;
  --topbar-height: 58px;
  --topbar-bg: #ffffff;
  --body-bg: #f0f2f7;
  --card-radius: 10px;
  --transition: all 0.22s ease;
}

/*  Reset / Base  */
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
}

/*  Admin layout  */
.admin-body {
  background: var(--body-bg);
  min-height: 100vh;
  display: flex;
}

/*  Sidebar */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: var(--transition);
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-brand .brand-icon {
  font-size: 1.4rem;
  color: #7c9ef5;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.nav-section-label {
  list-style: none;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #5c7099;
  padding: 14px 20px 4px;
  text-transform: uppercase;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sidebar-text);
  padding: 9px 20px;
  border-radius: 0 6px 6px 0;
  margin-right: 12px;
  transition: var(--transition);
  font-size: 0.9rem;
}
.sidebar-nav .nav-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
.sidebar-nav .nav-link.active {
  background: var(--sidebar-active);
  color: #fff;
  font-weight: 600;
}
.sidebar-nav .nav-link i {
  font-size: 1.05rem;
  width: 20px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/*  Main content  */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: var(--transition);
}

/*  Top bar */
.topbar {
  height: var(--topbar-height);
  background: var(--topbar-bg);
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.topbar-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #2d3748;
}

.sidebar-toggle {
  color: #64748b;
  padding: 4px 8px;
  display: none; /* shown on mobile */
}

.admin-user-btn {
  color: #2d3748;
  font-size: 0.88rem;
  text-decoration: none;
}

/*  Content area  */
.content-area {
  padding: 24px;
  flex: 1;
}

/*  Cards */
.card {
  border-radius: var(--card-radius);
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.card-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 18px;
  border-radius: var(--card-radius) var(--card-radius) 0 0 !important;
}

/*  Stat Cards  */
.stat-card {
  border-radius: var(--card-radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.stat-card__icon {
  font-size: 2rem;
  opacity: 0.85;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-card__value {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}
.stat-card__label {
  font-size: 0.8rem;
  opacity: 0.85;
  margin-top: 2px;
}

.stat-card--blue {
  background: linear-gradient(135deg, #3b5bdb, #4c6ef5);
}
.stat-card--green {
  background: linear-gradient(135deg, #2f9e44, #40c057);
}
.stat-card--purple {
  background: linear-gradient(135deg, #7048e8, #9775fa);
}
.stat-card--gray {
  background: linear-gradient(135deg, #495057, #868e96);
}
.stat-card--teal {
  background: linear-gradient(135deg, #0c8599, #15aabf);
}
.stat-card--orange {
  background: linear-gradient(135deg, #e67700, #f76707);
}
.stat-card--red {
  background: linear-gradient(135deg, #c92a2a, #e03131);
}

/*  Filter tabs  */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/*  Small action buttons*/
.btn-xs {
  padding: 2px 7px;
  font-size: 0.75rem;
  line-height: 1.4;
  border-radius: 4px;
}

/*  Alert stack  */
.alert-stack {
  margin-bottom: 1rem;
}

/*  Error pages  */
.error-code {
  font-size: 6rem;
  font-weight: 700;
  color: #e2e8f0;
  line-height: 1;
}

/*  Login page  */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a2236 0%, #2a3a5c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-brand {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo {
  font-size: 2.8rem;
  color: #3b5bdb;
  margin-bottom: 8px;
}

.login-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a2236;
  margin: 0;
}

.login-subtitle {
  color: #64748b;
  font-size: 0.85rem;
  margin: 4px 0 0;
}

.login-btn {
  height: 44px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.login-footer-note {
  text-align: center;
  font-size: 0.78rem;
  color: #94a3b8;
}

/*  Responsive  */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .sidebar-toggle {
    display: block;
  }
  .content-area {
    padding: 16px;
  }
}
