/* =====================================================================
   Smart Home Tutoring Service - Stylesheet
   Colors:
     Navy:        #0a192f  (main — deep dark navy)
     Lemon Green: #B6F500  (accent)
     White / light gray for text areas and cards
   ===================================================================== */

:root {
  --navy:        #0a192f;   /* deep dark navy */
  --navy-light:  #112240;
  --navy-dark:   #060f1e;
  --lemon:       #B6F500;
  --lemon-dark:  #a4dc00;
  --white:       #ffffff;
  --bg:          #f4f6fb;
  --card:        #ffffff;
  --text:        #1f2a44;
  --muted:       #6b7280;
  --border:      #e3e8f0;
  --danger:      #dc2626;
  --success:     #16a34a;
  --shadow:      0 4px 14px rgba(10, 25, 47, 0.10);
  --shadow-lg:   0 10px 30px rgba(10, 25, 47, 0.18);
  --radius:      14px;
  --radius-sm:   8px;
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}
.site-main { min-height: 60vh; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--lemon);
  color: var(--navy);
}
.btn-primary:hover { background: var(--lemon-dark); }
.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--lemon);
}
.btn-secondary:hover { background: var(--lemon); color: var(--navy); }
.btn-ghost {
  background: var(--navy);
  color: var(--white);
}
.btn-ghost:hover { background: var(--navy-light); }
.btn-sm { padding: 8px 16px; font-size: .9rem; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-block { width: 100%; }

/* ---------- Header / Navigation ---------- */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
}
.logo-mark {
  background: var(--lemon);
  color: var(--navy);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.main-nav ul { display: flex; gap: 6px; align-items: center; }
.main-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: background .15s, color .15s;
}
.main-nav a:hover { background: rgba(182, 245, 0, .15); color: var(--lemon); }
.main-nav a.active { color: var(--lemon); }
.main-nav .nav-login {
  background: var(--lemon);
  color: var(--navy) !important;
  font-weight: 600;
}
.main-nav .nav-login:hover { background: var(--lemon-dark); color: var(--navy) !important; }

/* "Login as Tutor" button in nav — outlined lemon style */
.main-nav .nav-tutor-login {
  border: 2px solid var(--lemon);
  color: var(--lemon) !important;
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.main-nav .nav-tutor-login:hover {
  background: var(--lemon);
  color: var(--navy) !important;
}
.badge-soon {
  background: var(--lemon);
  color: var(--navy);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: .65rem;
  font-weight: 700;
  margin-left: 4px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 26px;
  height: 3px;
  background: #fff;
  border-radius: 3px;
  transition: .3s;
}

/* ---------- Hero (full-bleed image) ---------- */
.hero {
  position: relative;
  min-height: 92vh;           /* nearly full viewport height */
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}

/* The actual hero image fills 100% of the section */
.hero-bg {
  position: absolute;
  inset: 0;                   /* top:0 right:0 bottom:0 left:0 */
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
}

/* Dark overlay so text stays readable over the image */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(8, 15, 30, 0.82) 0%,
    rgba(8, 15, 30, 0.55) 60%,
    rgba(8, 15, 30, 0.20) 100%
  );
  z-index: 1;
}

/* Content sits above the overlay */
.hero .container {
  position: relative;
  z-index: 2;
  padding-top: 60px;
  padding-bottom: 60px;
}

.hero-text {
  max-width: 600px;
}
.hero-text h1 {
  font-size: 3rem;
  line-height: 1.15;
  margin-bottom: 20px;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.hero-text h1 .hl { color: var(--lemon); }
.hero-text p {
  font-size: 1.15rem;
  color: rgba(255,255,255,.88);
  margin-bottom: 32px;
  max-width: 520px;
  text-shadow: 0 1px 6px rgba(0,0,0,.3);
}
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }

/* Remove old grid — hero is single-column text over image */
.hero-grid { display: block; }

/* ---------- KPI cards ---------- */
.section { padding: 60px 0; }
.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--navy);
}
.section-subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.kpi-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--lemon);
}
.kpi-card .num {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--navy);
}
.kpi-card .label { color: var(--muted); font-weight: 500; }

/* ---------- Steps / How it works ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px 24px;
  box-shadow: var(--shadow);
  text-align: center;
}
.step-card .step-num {
  background: var(--lemon);
  color: var(--navy);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.3rem;
  margin-bottom: 16px;
}
.step-card h3 { color: var(--navy); margin-bottom: 8px; }
.step-card p { color: var(--muted); }

/* ---------- Cards grid (tutors) ---------- */
.toolbar {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
  background: var(--card);
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}
.toolbar .field { flex: 1 1 200px; }
.toolbar label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--navy); font-size: .9rem; }
.toolbar select, .toolbar input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: #fff;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.tutor-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.tutor-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tutor-card .photo {
  height: 220px;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 3rem;
  font-weight: 700;
  overflow: hidden;
  position: relative;
}

/* Circle profile photo — centred, full face visible */
.tutor-card .photo img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 5px solid var(--lemon);
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
  display: block;
  position: relative;
  inset: unset;
}

/* Initials circle (no photo) */
.tutor-card .photo .initials-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 5px solid var(--lemon);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
}

.tutor-card .body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.tutor-card h3 { color: var(--navy); margin-bottom: 6px; }
.tutor-card .meta { color: var(--muted); font-size: .92rem; margin-bottom: 10px; }
.tutor-card .meta .row { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
.tutor-card .price {
  font-weight: 700;
  color: var(--navy);
  background: #eef4ff;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 14px;
}
.tutor-card .actions { margin-top: auto; }
.tag {
  display: inline-block;
  background: #eafbcd;
  color: #4d6a00;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
  margin-right: 6px;
}

/* ---------- Forms ---------- */
.form-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  max-width: 640px;
  margin: 0 auto;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--navy); font-size: .92rem; }
.field label .req { color: var(--danger); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--lemon-dark);
  box-shadow: 0 0 0 3px rgba(182,245,0,.25);
}
.field textarea { resize: vertical; min-height: 110px; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.field-error { color: var(--danger); font-size: .85rem; margin-top: 4px; }

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-weight: 500;
}
.alert-success { background: #e7f7ec; color: #126e36; border: 1px solid #b8e6c8; }
.alert-error   { background: #fdeaea; color: #b91c1c; border: 1px solid #f5c6c6; }
.alert-info    { background: #eef4ff; color: var(--navy); border: 1px solid #cdd9f5; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}
.info-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--lemon);
}
.info-card h3 { color: var(--navy); margin-bottom: 10px; }
.info-card p, .info-card li { color: var(--text); }
.info-card ul { margin-top: 10px; }
.info-card ul li { padding: 6px 0; padding-left: 24px; position: relative; }
.info-card ul li::before {
  content: "✓";
  color: var(--lemon-dark);
  position: absolute;
  left: 0;
  font-weight: 700;
}

/* ---------- Coming soon (Exam) ---------- */
.coming-soon {
  text-align: center;
  padding: 80px 20px;
  max-width: 720px;
  margin: 0 auto;
}
.coming-soon .icon {
  font-size: 4rem;
  margin-bottom: 20px;
}
.coming-soon h1 { color: var(--navy); font-size: 2.4rem; margin-bottom: 16px; }
.coming-soon p { color: var(--muted); font-size: 1.1rem; margin-bottom: 30px; }
.notify-form {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto;
}
.notify-form input { flex: 1; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 1rem; }
.badge-soon-large {
  display: inline-block;
  background: var(--lemon);
  color: var(--navy);
  padding: 6px 16px;
  border-radius: 30px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* ---------- Tutor details ---------- */
.tutor-detail-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 30px;
  align-items: start;
}
.tutor-detail-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 100%);
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 4rem;
}
/* Circle image on detail page */
.tutor-detail-photo img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 6px solid var(--lemon);
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
  background: var(--navy-light);
}
.detail-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.detail-card h2 { color: var(--navy); margin-bottom: 6px; }
.detail-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.detail-row .lbl { font-weight: 600; color: var(--navy); min-width: 130px; }
.detail-row .val { color: var(--text); }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}
.pagination a, .pagination span {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  font-weight: 600;
}
.pagination a:hover { background: var(--lemon); border-color: var(--lemon); }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #cdd7ea;
  margin-top: 60px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 30px;
  padding: 50px 20px 30px;
}
.footer-col h4 { color: #fff; margin-bottom: 14px; font-size: 1.05rem; }
.footer-col ul li { padding: 5px 0; }
.footer-col a:hover { color: var(--lemon); }
.footer-col .logo-mark { margin-bottom: 12px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
  padding: 18px 20px;
  font-size: .9rem;
  color: #9fb0cf;
}

/* =====================================================================
   ADMIN DASHBOARD STYLES
   ===================================================================== */
.admin-body { background: #eef2f8; }
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.admin-sidebar {
  background: var(--navy);
  color: #fff;
  padding: 24px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px 22px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-weight: 700;
}
.admin-sidebar .brand .logo-mark { width: 34px; height: 34px; }
.admin-nav { padding: 18px 0; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  color: #cdd7ea;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.admin-nav a:hover { background: rgba(182,245,0,.12); color: var(--lemon); }
.admin-nav a.active {
  background: var(--lemon);
  color: var(--navy);
  font-weight: 600;
  border-left: 4px solid var(--lemon);
  padding-left: 18px;
}
.admin-nav .icon { font-size: 1.2rem; width: 22px; text-align: center; }
.admin-nav .sep { padding: 12px 22px 4px; color: #6b7da0; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }

.admin-main { padding: 30px; }
.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}
.admin-topbar h1 { color: var(--navy); font-size: 1.6rem; }
.admin-topbar .user { color: var(--muted); font-size: .92rem; }

/* Stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--lemon);
}
.stat-card .num { font-size: 2rem; font-weight: 800; color: var(--navy); }
.stat-card .label { color: var(--muted); font-weight: 500; }
.stat-card .ic { font-size: 1.6rem; margin-bottom: 8px; }

/* Admin tables */
.admin-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 24px;
}
.admin-card h2 { color: var(--navy); margin-bottom: 16px; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
}
table.data-table th, table.data-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
}
table.data-table th { color: var(--navy); font-weight: 700; background: #f7f9fc; }
table.data-table tr:hover td { background: #fafcfe; }
.status-pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
}
.status-pending   { background: #fff3d6; color: #92600a; }
.status-approved  { background: #e7f7ec; color: #126e36; }
.status-rejected  { background: #fdeaea; color: #b91c1c; }
.status-completed { background: #eef4ff; color: var(--navy); }
.status-unread    { background: #fdeaea; color: #b91c1c; }
.status-read      { background: #eef2f8; color: var(--muted); }

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions form { display: inline; }

/* Admin login */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}
.login-card .logo-mark { margin: 0 auto 16px; width: 56px; height: 56px; font-size: 1.4rem; }
.login-card h1 { text-align: center; color: var(--navy); margin-bottom: 6px; font-size: 1.4rem; }
.login-card p.sub { text-align: center; color: var(--muted); margin-bottom: 26px; font-size: .92rem; }
.login-card .field { margin-bottom: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { min-height: 70vh; }
  .hero-text h1 { font-size: 2.2rem; }
  .about-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
  .tutor-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: 70px;
    right: 0;
    width: 240px;
    background: var(--navy);
    height: calc(100vh - 70px);
    transform: translateX(100%);
    transition: transform .3s ease;
    padding: 20px 0;
    box-shadow: var(--shadow-lg);
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a { display: block; padding: 12px 22px; }

  .hero-text h1 { font-size: 1.8rem; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: relative;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    overflow-x: auto;
  }
  .admin-nav { display: flex; }
  .admin-nav a { white-space: nowrap; }
  .admin-nav .sep { display: none; }
  .card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .kpi-grid, .stats-grid { grid-template-columns: 1fr; }
  .notify-form { flex-direction: column; }
  .toolbar { flex-direction: column; }
  .toolbar .field { width: 100%; }
}

/* ── Phone input with +251 prefix ─────────────────────────────────── */
.phone-wrap {
  display: flex;
  align-items: stretch;
  width: 100%;
}
.phone-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  background: var(--navy);
  color: var(--lemon);
  font-weight: 700;
  font-size: .95rem;
  border: 2px solid var(--navy);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
  height: auto;
}
.phone-wrap input.eth-phone {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
  flex: 1 1 0% !important;
  min-width: 0 !important;
  width: 0 !important;        /* flex will grow it to fill remaining space */
  padding: 11px 14px !important;
  border: 2px solid var(--border) !important;
  border-left: none !important;
  font-size: 1rem;
}

/* ── PIN boxes — always horizontal row ─────────────────────────────── */
.pin-row {
  display: flex !important;
  flex-direction: row !important;
  gap: 8px;
  margin-top: 6px;
}
.pin-row input {
  width: 46px !important;
  height: 54px !important;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  padding: 0;
  flex-shrink: 0;
  transition: border-color .15s, box-shadow .15s;
}
.pin-row input:focus {
  border-color: var(--lemon-dark);
  box-shadow: 0 0 0 3px rgba(182,245,0,.25);
}


/* =====================================================================
   ADMIN PORTAL — COLLAPSIBLE SIDEBAR
   ===================================================================== */
.admin-body { background: #eef2f8; }

.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  transition: grid-template-columns 0.3s ease;
}
.admin-layout.sidebar-collapsed {
  grid-template-columns: 70px 1fr;
}

.admin-sidebar {
  background: var(--navy);
  color: #fff;
  padding: 24px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  width: 240px;
  transition: width 0.3s ease;
  overflow-x: hidden;
}
.admin-sidebar.collapsed { width: 70px; }

/* Brand row */
.admin-sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 22px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-weight: 700;
  position: relative;
  white-space: nowrap;
}
.admin-sidebar .brand .logo-mark { width:34px; height:34px; flex-shrink:0; }
.admin-sidebar.collapsed .brand { justify-content: center; padding: 0 8px 22px; }
.admin-sidebar.collapsed .brand .brand-text { display: none; }

/* Toggle button */
.sidebar-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(182,245,0,.2);
  border: none;
  color: var(--lemon);
  width: 26px; height: 26px;
  border-radius: 4px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  transition: background 0.2s;
  flex-shrink: 0;
}
.sidebar-toggle:hover { background: rgba(182,245,0,.4); }
.admin-sidebar.collapsed .sidebar-toggle i { transform: rotate(180deg); transition: transform 0.3s; }

/* Nav links */
.admin-nav { padding: 14px 0; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: #cdd7ea;
  font-weight: 500;
  font-size: .92rem;
  transition: background .15s, color .15s;
  white-space: nowrap;
  overflow: hidden;
}
.admin-nav a:hover { background: rgba(182,245,0,.12); color: var(--lemon); }
.admin-nav a.active {
  background: var(--lemon);
  color: var(--navy);
  font-weight: 700;
  border-left: 4px solid var(--lemon);
  padding-left: 16px;
}
.admin-sidebar.collapsed .admin-nav a {
  padding: 11px 0;
  justify-content: center;
  gap: 0;
}
.admin-sidebar.collapsed .admin-nav a.active {
  border-left: none;
  border-top: 3px solid var(--lemon);
}
.admin-nav .icon { font-size: 1.1rem; width: 20px; text-align: center; flex-shrink: 0; }
.admin-nav .label { }
.admin-sidebar.collapsed .admin-nav .label { display: none; }
.admin-nav .sep {
  padding: 12px 20px 4px;
  color: #6b7da0;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.admin-sidebar.collapsed .admin-nav .sep { display: none; }
.admin-nav .badge {
  background: var(--danger);
  color: #fff;
  border-radius: 12px;
  padding: 1px 7px;
  font-size: .72rem;
  margin-left: auto;
  font-weight: 700;
}
.admin-sidebar.collapsed .admin-nav .badge { display: none; }

.admin-main { padding: 28px; }
.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
  flex-wrap: wrap;
  gap: 10px;
}
.admin-topbar h1 { color: var(--navy); font-size: 1.5rem; }
.admin-topbar .user { color: var(--muted); font-size: .88rem; }

/* Stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--lemon);
}
.stat-card .num   { font-size: 1.8rem; font-weight: 800; color: var(--navy); }
.stat-card .label { color: var(--muted); font-weight: 500; font-size: .85rem; }
.stat-card .ic    { font-size: 1.4rem; margin-bottom: 8px; color: var(--navy); }

/* Admin tables */
.admin-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 24px;
}
.admin-card h2 { color: var(--navy); margin-bottom: 16px; font-size: 1.1rem; }
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th, table.data-table td {
  text-align: left;
  padding: 11px 13px;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
table.data-table th { color: var(--navy); font-weight: 700; background: #f7f9fc; }
table.data-table tr:hover td { background: #fafcfe; }

.status-pill { display:inline-block; padding:3px 11px; border-radius:20px; font-size:.76rem; font-weight:700; }
.status-pending   { background:#fff3d6; color:#92600a; }
.status-approved  { background:#e7f7ec; color:#126e36; }
.status-rejected  { background:#fdeaea; color:#b91c1c; }
.status-completed { background:#eef4ff; color:var(--navy); }
.status-active    { background:#e7f7ec; color:#126e36; }
.status-paid      { background:#e7f7ec; color:#126e36; }
.status-draft     { background:#fff3d6; color:#92600a; }
.status-sent      { background:#eef4ff; color:var(--navy); }
.status-unread    { background:#fdeaea; color:#b91c1c; }
.status-read      { background:#eef2f8; color:var(--muted); }

.row-actions { display:flex; gap:6px; flex-wrap:wrap; }
.row-actions form { display:inline; }

/* Admin login */
.login-wrap {
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,var(--navy) 0%,var(--navy-light) 100%); padding:20px;
}
.login-card {
  background:#fff; border-radius:var(--radius); box-shadow:var(--shadow-lg);
  padding:40px; width:100%; max-width:400px;
}
.login-card .logo-mark { margin:0 auto 16px; width:56px; height:56px; font-size:1.4rem; }
.login-card h1 { text-align:center; color:var(--navy); margin-bottom:6px; font-size:1.4rem; }
.login-card p.sub { text-align:center; color:var(--muted); margin-bottom:26px; font-size:.9rem; }
.login-card .field { margin-bottom:18px; }

/* Responsive */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position:relative; height:auto; width:100% !important; }
  .admin-nav { display:flex; overflow-x:auto; }
  .admin-nav a { white-space:nowrap; }
  .admin-nav .sep { display:none; }
  .sidebar-toggle { display:none; }
}
