/* ── Matiku Advocates — Premium Admin UI ──────────────────────────────────── */
/* v3.0 — Dark sidebar, refined cards, split login */

/* ── Custom Properties ── */
:root {
  /* Sidebar — dark forest authority */
  --sidebar-bg:          #0d2419;
  --sidebar-bg-hover:    rgba(255, 255, 255, 0.06);
  --sidebar-bg-active:   rgba(197, 162, 71, 0.10);
  --sidebar-border:      rgba(255, 255, 255, 0.08);
  --sidebar-text:        rgba(255, 255, 255, 0.60);
  --sidebar-text-hover:  rgba(255, 255, 255, 0.88);
  --sidebar-text-active: #ffffff;
  --sidebar-gold:        #C5A247;
  --sidebar-width:       260px;

  /* Content surfaces */
  --admin-bg:            #f2f5f8;
  --admin-surface:       #ffffff;
  --admin-border:        #e4e9f0;
  --admin-border-subtle: #f0f4f8;

  /* Brand */
  --admin-emerald:       #17624A;
  --admin-emerald-dark:  #0f4a37;
  --admin-emerald-light: rgba(23, 98, 74, 0.08);
  --admin-gold:          #C5A247;

  /* Text */
  --admin-text:          #4a5568;
  --admin-text-light:    #718096;
  --admin-heading:       #0f172a;

  /* Geometry */
  --admin-radius:        0.875rem;
  --admin-radius-lg:     1.25rem;

  /* Elevation */
  --shadow-xs:    0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm:    0 2px 6px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:    0 6px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }


/* ════════════════════════════════════════════════════════
   BODY
════════════════════════════════════════════════════════ */
body.admin-body {
  margin: 0;
  padding: 0;
  display: flex;
  min-height: 100vh;
  background: var(--admin-bg);
  font-family: Manrope, system-ui, -apple-system, sans-serif;
  color: var(--admin-text);
  line-height: 1.6;
  font-size: 0.9375rem;
}


/* ════════════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════════════ */
.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 50;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Subtle inner-right edge highlight for depth */
.admin-sidebar::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 1px; height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.12) 0%,
    rgba(255,255,255,0.04) 30%,
    transparent 100%
  );
  pointer-events: none;
}

/* Brand */
.admin-sidebar__brand {
  padding: 1.75rem 1.5rem 1.375rem;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.admin-sidebar__brand img {
  border-radius: 0.5rem;
  filter: brightness(1.05) saturate(0.95);
}

.admin-sidebar__label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--sidebar-gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.85;
}

/* Nav list */
.admin-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  scrollbar-width: none;
}
.admin-nav::-webkit-scrollbar { display: none; }

.admin-nav__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6875rem 0.875rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: 0.625rem;
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  position: relative;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.admin-nav__link:hover {
  background: var(--sidebar-bg-hover);
  color: var(--sidebar-text-hover);
}

.admin-nav__link.is-active {
  background: var(--sidebar-bg-active);
  color: var(--sidebar-text-active);
  border-color: rgba(197, 162, 71, 0.18);
  font-weight: 600;
}

/* Gold left indicator on active */
.admin-nav__link.is-active::before {
  content: '';
  position: absolute;
  left: -0.75rem;   /* flush with nav padding */
  top: 22%;
  bottom: 22%;
  width: 3px;
  background: var(--sidebar-gold);
  border-radius: 0 2px 2px 0;
}

.admin-nav__icon {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.80;
  transition: opacity 0.18s;
}
.admin-nav__link:hover .admin-nav__icon,
.admin-nav__link.is-active .admin-nav__icon { opacity: 1; }
.admin-nav__icon svg { width: 100%; height: 100%; }

/* Sidebar footer */
.admin-sidebar__footer {
  padding: 0.875rem 0.75rem;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-sidebar__user {
  padding: 0.625rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.625rem;
  margin-bottom: 0.375rem;
}

.admin-sidebar__user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sidebar-gold) 0%, #9a7820 100%);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.admin-sidebar__user-info { line-height: 1.25; }
.admin-sidebar__user strong {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}
.admin-sidebar__user small {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.40);
  text-transform: capitalize;
}

.admin-nav__link--logout { color: rgba(239, 68, 68, 0.70); }
.admin-nav__link--logout:hover {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.08);
  border-color: transparent;
}


/* ════════════════════════════════════════════════════════
   MAIN CONTENT SHELL
════════════════════════════════════════════════════════ */
.admin-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}


/* ════════════════════════════════════════════════════════
   TOPBAR
════════════════════════════════════════════════════════ */
.admin-topbar {
  background: var(--admin-surface);
  height: 4rem;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 40;
  gap: 1rem;
}

.admin-topbar__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: var(--admin-heading);
  flex-direction: column;
  gap: 0;
  transition: background 0.15s;
}
.admin-topbar__toggle:hover { background: var(--admin-bg); }
.admin-topbar__toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: currentColor;
  margin: 4.5px 0;
  border-radius: 1px;
}

.admin-topbar__title {
  font-family: "Source Serif 4", serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--admin-heading);
  flex: 1;
}

.admin-topbar__right {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-left: auto;
}

.admin-topbar__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}
.admin-topbar__meta strong {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--admin-heading);
}
.admin-topbar__meta small {
  font-size: 0.6875rem;
  color: var(--admin-text-light);
  text-transform: capitalize;
}

.admin-topbar__avatar {
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--admin-emerald) 0%, var(--admin-emerald-dark) 100%);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  border: 2px solid rgba(23, 98, 74, 0.18);
}


/* ════════════════════════════════════════════════════════
   FLASH / ALERTS
════════════════════════════════════════════════════════ */
.alert {
  padding: 0.875rem 1.25rem;
  border-radius: 0.625rem;
  margin: 1rem 2rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  border: 1px solid;
}
.alert--success {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}
.alert--danger {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}


/* ════════════════════════════════════════════════════════
   CONTENT AREA
════════════════════════════════════════════════════════ */
.admin-content {
  padding: 2rem;
  flex: 1;
  max-width: 1280px;
  width: 100%;
}


/* ════════════════════════════════════════════════════════
   DASHBOARD STAT CARDS
════════════════════════════════════════════════════════ */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.dash-card {
  background: var(--admin-surface);
  border-radius: var(--admin-radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--admin-border);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

/* Gradient top accent bar — replaces dated left border */
.dash-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--admin-radius) var(--admin-radius) 0 0;
}

.dash-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: #ccd5e0;
}
.dash-card:hover .dash-card__link { color: var(--admin-emerald); }

.dash-card--emerald::before { background: linear-gradient(90deg, #17624A 0%, #2aab7f 100%); }
.dash-card--gold::before    { background: linear-gradient(90deg, #C5A247 0%, #e0c97a 100%); }
.dash-card--amber::before   { background: linear-gradient(90deg, #d97706 0%, #fbbf24 100%); }
.dash-card--blue::before    { background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%); }

/* Card header: icon (left) + number (right) */
.dash-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.dash-card__icon {
  width: 2.625rem;
  height: 2.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.625rem;
  flex-shrink: 0;
}
.dash-card__icon svg { width: 1.25rem; height: 1.25rem; }

.dash-card--emerald .dash-card__icon { background: rgba(23, 98, 74, 0.10);  color: var(--admin-emerald); }
.dash-card--gold    .dash-card__icon { background: rgba(197, 162, 71, 0.12); color: #9a7820; }
.dash-card--amber   .dash-card__icon { background: rgba(217, 119, 6, 0.10);  color: #b45309; }
.dash-card--blue    .dash-card__icon { background: rgba(37, 99, 235, 0.08);  color: #2563eb; }

.dash-card__number {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--admin-heading);
  font-family: "Source Serif 4", serif;
  letter-spacing: -0.02em;
}

/* Card body: label + sub */
.dash-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.dash-card__label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--admin-heading);
}
.dash-card__sub {
  font-size: 0.8125rem;
  color: var(--admin-text-light);
}

/* Card footer: action link */
.dash-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--admin-text-light);
  text-decoration: none;
  transition: color 0.18s, gap 0.18s;
  margin-top: 0.25rem;
}
.dash-card__link::after { content: "→"; }


/* ════════════════════════════════════════════════════════
   DASHBOARD GRID  (recent activity panels)
════════════════════════════════════════════════════════ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
}

.dash-section {
  background: var(--admin-surface);
  border-radius: var(--admin-radius);
  border: 1px solid var(--admin-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.dash-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--admin-border-subtle);
}

.dash-section__title {
  font-size: 0.9375rem;
  font-family: "Source Serif 4", serif;
  font-weight: 600;
  margin: 0;
  color: var(--admin-heading);
}


/* ════════════════════════════════════════════════════════
   TABLES
════════════════════════════════════════════════════════ */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.admin-table thead { background: #f8fafb; }

.admin-table th {
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--admin-text-light);
  border-bottom: 1px solid var(--admin-border);
  white-space: nowrap;
}

.admin-table td {
  padding: 0.9375rem 1rem;
  border-bottom: 1px solid var(--admin-border-subtle);
  color: var(--admin-text);
  vertical-align: middle;
}

.admin-table tbody tr { transition: background 0.14s ease; }
.admin-table tbody tr:hover { background: #f4f8ff; }
.admin-table tbody tr:nth-child(even) { background: #fafbfc; }
.admin-table tbody tr:nth-child(even):hover { background: #f0f5ff; }
.admin-table tr:last-child td { border-bottom: none; }

.admin-table a {
  color: var(--admin-emerald);
  text-decoration: none;
  font-weight: 500;
}
.admin-table a:hover { text-decoration: underline; }

/* Unread row — messages page */
.admin-table__row--unread { background: #fffbeb !important; }
.admin-table__row--unread:hover { background: #fef3c7 !important; }


/* ════════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5625rem 1.125rem;
  border-radius: 0.5rem;
  font-family: Manrope, sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  border: 1px solid transparent;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.btn--primary {
  background: var(--admin-emerald);
  color: #fff;
  border-color: var(--admin-emerald);
}
.btn--primary:hover {
  background: var(--admin-emerald-dark);
  border-color: var(--admin-emerald-dark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(23, 98, 74, 0.28);
}

.btn--outline {
  background: transparent;
  border-color: var(--admin-border);
  color: var(--admin-text);
}
.btn--outline:hover { background: var(--admin-bg); border-color: #b8c5d4; }

.btn--ghost {
  background: transparent;
  color: var(--admin-emerald);
  border-color: transparent;
}
.btn--ghost:hover { background: var(--admin-emerald-light); }
.btn--ghost.is-active {
  background: var(--admin-emerald-light);
  color: var(--admin-emerald);
  font-weight: 700;
}

.btn--sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: 0.4375rem;
}

.btn--danger-ghost {
  background: transparent;
  color: #dc2626;
  border-color: transparent;
}
.btn--danger-ghost:hover { background: #fef2f2; }


/* ════════════════════════════════════════════════════════
   BADGES
════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
}

/* Status dot */
.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
  flex-shrink: 0;
}

.badge--success { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.badge--warning { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.badge--danger  { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.badge--default { background: #f8fafc; color: #475569; border-color: var(--admin-border); }

/* PHP status_badge() output — uses .status_badge class */
.status_badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.04em;
}


/* ════════════════════════════════════════════════════════
   FORMS
════════════════════════════════════════════════════════ */
.admin-form {
  background: var(--admin-surface);
  border-radius: var(--admin-radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--admin-border);
  max-width: 800px;
}

.form__row { margin-bottom: 1.5rem; }

.form__row--inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.form__row--meta {
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--admin-border);
}

.form__fields-group { margin-bottom: 0; }
.form__fields-group .form__row:last-child { margin-bottom: 0; }

.form__label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.4375rem;
  color: var(--admin-heading);
}

.form__input {
  width: 100%;
  padding: 0.6875rem 0.875rem;
  border: 1px solid var(--admin-border);
  border-radius: 0.5rem;
  font-family: Manrope, sans-serif;
  font-size: 0.9375rem;
  color: var(--admin-heading);
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.form__input:focus {
  outline: none;
  border-color: var(--admin-emerald);
  box-shadow: 0 0 0 3px rgba(23, 98, 74, 0.10);
}
.form__input::placeholder { color: #a0aec0; }
textarea.form__input { resize: vertical; min-height: 100px; }

.form__hint {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: var(--admin-text-light);
}

.form__actions {
  margin-top: 2rem;
  display: flex;
  gap: 0.875rem;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--admin-border-subtle);
}


/* ════════════════════════════════════════════════════════
   TOOLBAR  (page-level action bar)
════════════════════════════════════════════════════════ */
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-toolbar__filters {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  background: var(--admin-surface);
  padding: 0.25rem;
  border-radius: 0.625rem;
  border: 1px solid var(--admin-border);
}


/* ════════════════════════════════════════════════════════
   TESTIMONIAL CARDS
════════════════════════════════════════════════════════ */
.testimonial-admin-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.2s ease;
}
.testimonial-admin-card:hover { box-shadow: var(--shadow-md); }

.quote {
  font-style: italic;
  color: var(--admin-heading);
  font-size: 1.0625rem;
  line-height: 1.65;
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  border-left: 3px solid var(--admin-gold);
  font-family: "Source Serif 4", serif;
}

.testimonial-admin-card__meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  flex-wrap: wrap;
}
.testimonial-admin-card__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }


/* ════════════════════════════════════════════════════════
   MESSAGE DIALOGS
════════════════════════════════════════════════════════ */
.message-dialog {
  border: none;
  border-radius: var(--admin-radius-lg);
  padding: 0;
  box-shadow: 0 24px 48px rgba(0,0,0,0.16), 0 4px 12px rgba(0,0,0,0.08);
  max-width: 520px;
  width: 90%;
}
.message-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
}
.message-dialog__content { padding: 2rem; }
.message-dialog__content h3 {
  margin: 0 0 0.375rem;
  font-family: "Source Serif 4", serif;
  color: var(--admin-heading);
  font-size: 1.1875rem;
  font-weight: 600;
}
.message-dialog__body {
  margin: 1.25rem 0;
  color: var(--admin-text);
  line-height: 1.65;
  font-size: 0.9375rem;
  background: var(--admin-bg);
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--admin-border-subtle);
}


/* ════════════════════════════════════════════════════════
   GALLERY UTILS
════════════════════════════════════════════════════════ */
.gallery-admin-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }


/* ════════════════════════════════════════════════════════
   PAGINATION
════════════════════════════════════════════════════════ */
.pagination-wrap {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}


/* ════════════════════════════════════════════════════════
   UTILITIES
════════════════════════════════════════════════════════ */
.text-muted   { color: var(--admin-text-light); }
.form-inline  { display: inline-block; margin: 0; }


/* ════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .admin-content { max-width: 100%; }
}

@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .admin-sidebar.is-open {
    transform: translateX(0);
    box-shadow: 8px 0 40px rgba(0,0,0,0.25);
  }
  .admin-main   { margin-left: 0; }
  .admin-topbar { padding: 0 1rem; }
  .admin-topbar__toggle { display: flex; }
  .admin-topbar__meta   { display: none; }
  .admin-content { padding: 1rem; }
  .dash-card__number { font-size: 1.75rem; }
}

@media (max-width: 480px) {
  .dashboard-cards { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .dash-card { padding: 1rem; gap: 0.625rem; }
  .dash-card__number { font-size: 1.5rem; }
  .admin-table th,
  .admin-table td { padding: 0.625rem 0.75rem; }
}


/* ════════════════════════════════════════════════════════
   REDUCED MOTION
════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* ════════════════════════════════════════════════════════
   LOGIN PAGE  — split-screen layout
════════════════════════════════════════════════════════ */
body.login-page {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  font-family: Manrope, system-ui, sans-serif;
  background: #0d2419;
}

.login-split {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ── Brand panel (left) ── */
.login-brand {
  flex: 1;
  background: #0d2419;
  background-image:
    radial-gradient(ellipse at 25% 25%, rgba(197,162,71,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 75%, rgba(23,98,74,0.25) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* Subtle dot texture */
.login-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.login-brand__logo {
  width: 150px;
  border-radius: 0.625rem;
  margin-bottom: 2.25rem;
  position: relative;
  filter: brightness(1.05) saturate(0.9);
}

.login-brand__tagline {
  font-family: "Source Serif 4", serif;
  font-size: 1.625rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.45;
  position: relative;
  max-width: 320px;
  margin: 0 auto 1rem;
  letter-spacing: -0.01em;
}

.login-brand__divider {
  width: 40px;
  height: 2px;
  background: var(--sidebar-gold, #C5A247);
  border-radius: 1px;
  margin: 1.25rem auto;
  position: relative;
  opacity: 0.65;
}

.login-brand__sub {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.42);
  position: relative;
  max-width: 270px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ── Form panel (right) ── */
.login-panel {
  width: 440px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 3rem 3rem;
  position: relative;
}

/* Top-edge gold accent on the form panel */
.login-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #17624A 0%, #C5A247 100%);
}

.login-panel__header {
  text-align: center;
  margin-bottom: 2.25rem;
}

.login-panel__title {
  font-family: "Source Serif 4", serif;
  font-size: 1.625rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.375rem;
}

.login-panel__sub {
  font-size: 0.875rem;
  color: #718096;
  margin: 0;
}

/* Alert inside login panel */
.login-panel .alert {
  margin: 0 0 1.25rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.login-form__group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.login-form__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: 0.01em;
}

.login-form__input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #dde3ec;
  border-radius: 0.5625rem;
  font-family: Manrope, sans-serif;
  font-size: 0.9375rem;
  color: #0f172a;
  background: #f8fafc;
  box-sizing: border-box;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.login-form__input:focus {
  outline: none;
  border-color: #17624A;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(23, 98, 74, 0.10);
}
.login-form__input::placeholder { color: #a0aec0; }

.login-form__submit {
  margin-top: 0.25rem;
  width: 100%;
  padding: 0.8125rem;
  background: #17624A;
  color: #fff;
  border: none;
  border-radius: 0.5625rem;
  font-family: Manrope, sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.18s, box-shadow 0.18s;
}
.login-form__submit:hover {
  background: #0f4a37;
  box-shadow: 0 6px 20px rgba(23, 98, 74, 0.30);
}
.login-form__submit:active { background: #0a3328; }

.login-back {
  display: block;
  margin-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
  color: #718096;
}
.login-back a {
  color: #17624A;
  text-decoration: none;
  font-weight: 500;
}
.login-back a:hover { text-decoration: underline; }

/* Responsive login */
@media (max-width: 768px) {
  .login-split    { flex-direction: column; }
  .login-brand    { flex: none; min-height: 220px; padding: 2rem 1.5rem; }
  .login-brand__tagline { font-size: 1.25rem; }
  .login-brand__logo  { width: 120px; margin-bottom: 1.5rem; }
  .login-panel    { width: 100%; padding: 2rem 1.5rem 2.5rem; }
  .login-panel::before { display: none; }
}
