/* ============================================================
   IDEA Nepal Member — Admin Design System
   Designer: Hermes (solo designer) · 2026-09-16
   Stack: CSS custom properties + modern layout (grid/flex)
   ============================================================ */

:root {
  /* ---- Typography ---- */
  --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Plus Jakarta Sans', system-ui, sans-serif;

  /* ---- Brand palette (IDEA Nepal: navy · teal · gold) ---- */
  --navy-950: #071324;
  --navy-900: #0b1f38;
  --navy-850: #0d2440;
  --navy-800: #0f2a4a;
  --navy-700: #143a63;
  --navy-600: #1b4e82;
  --navy-500: #2563a8;

  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --teal-400: #2dd4bf;
  --teal-300: #5eead4;

  --gold-500: #d9a441;
  --gold-400: #e8b54d;
  --gold-300: #f3c96b;

  /* ---- Light surfaces ---- */
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --ink: #0f2436;
  --ink-muted: #5c6f84;
  --ink-faint: #8ca0b5;

  /* ---- Feedback ---- */
  --danger: #e5484d;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --success: #16a34a;

  /* ---- Elevation (real depth system for glass + cards) ---- */
  --shadow-xs: 0 1px 2px rgba(11, 31, 56, 0.05);
  --shadow-sm: 0 1px 3px rgba(11, 31, 56, 0.07), 0 1px 2px rgba(11, 31, 56, 0.05);
  --shadow-md: 0 4px 12px rgba(11, 31, 56, 0.08), 0 2px 4px rgba(11, 31, 56, 0.05);
  --shadow-lg: 0 16px 40px rgba(7, 19, 36, 0.16), 0 4px 14px rgba(7, 19, 36, 0.08);
  --shadow-glow: 0 0 0 1px rgba(45, 212, 191, 0.25), 0 8px 32px rgba(20, 184, 166, 0.18);

  /* ---- Radii ---- */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-full: 999px;

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.22s;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

a {
  color: var(--teal-600);
  text-decoration: none;
}

a:hover {
  color: var(--teal-500);
}

::selection {
  background: rgba(20, 184, 166, 0.22);
}

/* Focus visibility — real, accessible focus states */
:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================================
   LOGIN — split-panel brand immersion
   ============================================================ */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr);
}

/* ---- Left brand panel ---- */
.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 56px 44px;
  color: #fff;
  background:
    radial-gradient(1100px 600px at -10% -10%, rgba(43, 118, 189, 0.55), transparent 60%),
    radial-gradient(900px 700px at 110% 115%, rgba(20, 184, 166, 0.38), transparent 55%),
    linear-gradient(155deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-950) 100%);
}

/* Ambient orbs — glassmorphism with purpose (layered depth, not decoration-only) */
.auth-brand::before,
.auth-brand::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  pointer-events: none;
}

.auth-brand::before {
  width: 380px;
  height: 380px;
  top: -90px;
  right: -60px;
  background: radial-gradient(circle, var(--teal-400) 0%, transparent 70%);
}

.auth-brand::after {
  width: 320px;
  height: 320px;
  bottom: -100px;
  left: 12%;
  background: radial-gradient(circle, var(--gold-400) 0%, transparent 70%);
  opacity: 0.35;
}

/* Fine grid texture for depth */
.auth-brand .grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 30% 20%, rgba(0, 0, 0, 0.9), transparent 70%);
  pointer-events: none;
}

.auth-brand-content {
  position: relative;
  z-index: 2;
  max-width: 460px;
}

.brand-logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 64px;
}

.brand-logo-badge {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--teal-400), var(--teal-600));
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  flex: 0 0 auto;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #fff;
  line-height: 1.1;
}

.brand-name small {
  display: block;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: var(--teal-300);
  margin-top: 3px;
}

.auth-hero h1 {
  color: #fff;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -0.4px;
  margin-bottom: 16px;
}

.auth-hero h1 .grad-text {
  background: linear-gradient(92deg, var(--teal-300), var(--gold-300));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.auth-hero p {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(226, 240, 255, 0.78);
  margin: 0 0 36px;
}

.auth-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.auth-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  color: rgba(226, 240, 255, 0.88);
}

.auth-points .pt-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--teal-300);
  flex: 0 0 auto;
}

.auth-brand-foot {
  position: relative;
  z-index: 2;
  font-size: 12.5px;
  color: rgba(226, 240, 255, 0.5);
  letter-spacing: 0.3px;
}

/* ---- Right form panel ---- */
.auth-form {
  display: grid;
  place-items: center;
  padding: 40px 32px;
  background:
    radial-gradient(700px 500px at 100% 0%, rgba(20, 184, 166, 0.06), transparent 55%),
    var(--bg);
  position: relative;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px 32px;
  /* earned glass: transparent panels sit above a layered bg, not blur-for-blur's-sake */
  animation: card-in 0.5s var(--ease) both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card-head .eyebrow {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--teal-600);
  margin-bottom: 10px;
}

.auth-card-head h2 {
  font-size: 24px;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.auth-card-head .sub {
  color: var(--ink-muted);
  font-size: 14px;
  margin: 0 0 28px;
}

/* ---- Form controls ---- */
.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
  letter-spacing: 0.1px;
}

.input-wrap {
  position: relative;
}

.input-wrap svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-faint);
  pointer-events: none;
  transition: color var(--dur) var(--ease);
}

.input-wrap:focus-within svg {
  color: var(--teal-600);
}

.input-wrap input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 41px;
  font-family: var(--font-ui);
  font-size: 14.5px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}

.input-wrap input::placeholder {
  color: var(--ink-faint);
}

.input-wrap input:hover {
  border-color: var(--border-strong);
}

.input-wrap input:focus {
  outline: none;
  border-color: var(--teal-500);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.field.has-error .input-wrap input {
  border-color: var(--danger);
}

.field.has-error .input-wrap input:focus {
  box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.12);
}

.field-error {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--danger);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 22px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-muted);
  cursor: pointer;
  user-select: none;
}

.checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal-600);
  cursor: pointer;
}

.link-subtle {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--teal-600);
}

.link-subtle:hover {
  color: var(--teal-500);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  padding: 0 20px;
  height: 46px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
  color: #fff;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-block {
  width: 100%;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  border-color: var(--border);
  height: 40px;
  padding: 0 16px;
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--border-strong);
}

/* ---- Alerts ---- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.alert svg {
  flex: 0 0 auto;
  margin-top: 1px;
}

.alert-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: #b91c1c;
}

.auth-foot {
  margin-top: 24px;
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-muted);
}

.auth-foot a {
  font-weight: 600;
}

/* ============================================================
   ADMIN SHELL — sidebar + topbar + content
   ============================================================ */

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

/* The backdrop must never become a third grid item on desktop. */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

/* ---- Sidebar (dark navy, glass accents) ---- */
.sidebar {
  background:
    radial-gradient(400px 300px at 20% -10%, rgba(43, 118, 189, 0.28), transparent 60%),
    radial-gradient(320px 260px at 110% 110%, rgba(20, 184, 166, 0.16), transparent 60%),
    linear-gradient(180deg, var(--navy-900), var(--navy-950));
  color: rgba(226, 240, 255, 0.72);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px 16px;
}

.sidebar .brand-logo-row {
  margin-bottom: 30px;
  padding: 0 8px;
}

.sidebar .brand-name {
  font-size: 16px;
}

.sidebar .brand-name small {
  font-size: 10px;
  letter-spacing: 2.2px;
}

.sidebar .brand-logo-badge {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.nav-section {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(226, 240, 255, 0.35);
  padding: 18px 10px 8px;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(226, 240, 255, 0.78);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.nav-item a svg {
  color: rgba(226, 240, 255, 0.45);
  transition: color var(--dur) var(--ease);
}

.nav-item a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nav-item a:hover svg {
  color: var(--teal-300);
}

.nav-item.active a {
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.16), rgba(20, 184, 166, 0.04));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.22);
}

.nav-item.active a svg {
  color: var(--teal-400);
}

.nav-item.disabled {
  opacity: 0.55;
  cursor: default;
}

.nav-item.disabled a {
  pointer-events: none;
  color: rgba(226, 240, 255, 0.6);
}

.soon-tag {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(232, 181, 77, 0.14);
  color: var(--gold-300);
  border: 1px solid rgba(232, 181, 77, 0.25);
}

.sidebar-foot {
  margin-top: auto;
  padding: 16px 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-foot .sys-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: rgba(226, 240, 255, 0.55);
}

.sidebar-foot .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-400);
  box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.6);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(45, 212, 191, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0); }
}

/* ---- Main column ---- */
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px;
  height: 68px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-title .crumb-sep {
  color: var(--ink-faint);
  font-weight: 400;
}

.topbar-title .crumb-current {
  color: var(--ink-muted);
  font-weight: 500;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--navy-700), var(--teal-600));
  box-shadow: var(--shadow-sm);
}

.user-meta {
  line-height: 1.25;
}

.user-meta .u-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.user-meta .u-role {
  font-size: 12px;
  color: var(--ink-muted);
}

.content {
  padding: 28px 32px 48px;
  max-width: 1280px;
  width: 100%;
}

/* ============================================================
   DASHBOARD components (Monitor surface — glanceable, dense)
   ============================================================ */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.page-head h1 {
  font-size: 24px;
  letter-spacing: -0.4px;
  margin: 0 0 4px;
}

.page-head .page-desc {
  color: var(--ink-muted);
  font-size: 14px;
  margin: 0;
}

/* ---- Stat cards ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.stat-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal-400), var(--teal-600));
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.stat-card:hover::after {
  opacity: 1;
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.stat-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(20, 184, 166, 0.1);
  color: var(--teal-600);
}

.stat-icon.gold {
  background: rgba(232, 181, 77, 0.12);
  color: var(--gold-500);
}

.stat-icon.navy {
  background: rgba(20, 66, 130, 0.1);
  color: var(--navy-600);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-note {
  font-size: 12.5px;
  color: var(--ink-faint);
}

/* ---- Two-column lower grid ---- */
.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px 0;
}

.card-head h3 {
  font-size: 15.5px;
  letter-spacing: -0.2px;
  margin: 0;
}

.card-body {
  padding: 16px 22px 22px;
}

/* Read-only member listing: no Bootstrap dependency. */
.members-page .card-head { padding-bottom: 18px; }
.members-page .card-head > div { width: 100%; }
.members-page .d-flex { display: flex; flex-wrap: wrap; align-items: center; }
.members-page .gap-2 { gap: 10px; }
.members-page .justify-content-between { justify-content: space-between; }
.members-page .form-control, .members-page .form-select {
  min-height: 42px; max-width: 100%; padding: 9px 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font: inherit; color: var(--ink); background: var(--surface);
}
.members-page .btn { height: 42px; padding: 0 12px; font-size: 13px; }
.members-page .btn-outline-secondary, .members-page .btn-outline-primary {
  border-color: var(--border-strong); color: var(--navy-700); background: var(--surface);
}
.members-page .btn:hover { border-color: var(--teal-600); }
.members-page .table-responsive { overflow-x: auto; max-width: 100%; }
.members-page .table { width: 100%; border-collapse: collapse; font-size: 13px; }
.members-page th, .members-page td { text-align: left; padding: 13px 12px; border-bottom: 1px solid var(--border); }
.members-page th { background: var(--surface-2); white-space: nowrap; color: var(--ink-muted); }
.members-page td { vertical-align: middle; overflow-wrap: anywhere; min-width: 90px; }
.members-page tr:hover td { background: var(--surface-2); }
.members-page .text-center { text-align: center; }
.members-page .text-end { text-align: right; }
.members-page .py-4 { padding: 32px 12px; color: var(--ink-muted); }
.members-page .badge { display: inline-block; padding: 4px 9px; border-radius: var(--radius-full); white-space: nowrap; font-size: 12px; font-weight: 600; }
.members-page .bg-info { background: #e0f2fe; color: #075985; }
.members-page .bg-success { background: #dcfce7; color: #166534; }
.members-page .bg-warning { background: #fef3c7; color: #92400e; }
.members-page .bg-danger { background: #fee2e2; color: #991b1b; }
.members-pagination .pagination { display: flex; gap: 12px; padding: 0; list-style: none; }
.members-pagination li { padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.members-pagination .disabled { color: var(--ink-muted); }
@media (max-width: 600px) {
  .topbar { padding: 0 16px; gap: 8px; }
  .topbar .user-meta { display: none; }
  .topbar .user-chip { gap: 8px; }
  .members-page .card-head, .members-page .card-body { padding: 14px; }
  .members-page form { width: 100%; }
  .members-page input[name="search"] { min-width: 0 !important; width: 100%; }
}

/* ---- Getting-started checklist ---- */
.todo-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.todo-item:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}

.todo-check {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.5px solid var(--border-strong);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: transparent;
}

.todo-check.done {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
  border-color: transparent;
  color: #fff;
}

.todo-check.done svg {
  width: 12px;
  height: 12px;
}

.todo-body {
  flex: 1;
  min-width: 0;
}

.todo-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.todo-desc {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-top: 1px;
}

.road-tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  flex: 0 0 auto;
}

.road-tag.done {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
}

.road-tag.next {
  background: rgba(20, 184, 166, 0.12);
  color: var(--teal-600);
}

.road-tag.planned {
  background: rgba(232, 181, 77, 0.14);
  color: #b07e12;
}

/* ---- System status rows ---- */
.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}

.status-row:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.status-k {
  color: var(--ink-muted);
}

.status-v {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.ok { background: var(--success); }
.status-dot.warn { background: var(--gold-500); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    display: none;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.28s var(--ease);
    z-index: 60;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(7, 19, 36, 0.5);
    backdrop-filter: blur(2px);
    z-index: 55;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur) var(--ease);
  }

  .sidebar-backdrop.show {
    opacity: 1;
    pointer-events: auto;
  }

  .menu-toggle {
    display: inline-flex !important;
  }
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

/* ============================================================
   MOTION — respect reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   MEMBER DETAIL SHOW PAGE — Executive Admin Design
   ============================================================ */

.detail-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.detail-page-title-group h1 {
  font-size: 24px;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: capitalize;
  border: 1px solid transparent;
}

.status-pill.pending {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.status-pill.pending_payment {
  background: #ecfeff;
  color: #0e7490;
  border-color: #a5f3fc;
}

.status-pill.payment_submitted {
  background: #f3e8ff;
  color: #6b21a8;
  border-color: #e9d5ff;
}

.status-pill.confirmed,
.status-pill.approved,
.status-pill.active {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

.status-pill.denied,
.status-pill.rejected {
  background: #ffe4e6;
  color: #be123c;
  border-color: #fecdd3;
}

/* Detail Layout Grid */
.detail-layout-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 992px) {
  .detail-layout-grid {
    grid-template-columns: 1fr;
  }
}

/* Profile Sidebar Card */
.profile-sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-avatar-wrap {
  width: 110px;
  height: 110px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface-2);
  border: 3px solid var(--surface);
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
  display: grid;
  place-items: center;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-fallback {
  color: var(--teal-600);
}

.profile-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.profile-sub {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin-bottom: 12px;
  word-break: break-all;
}

.profile-meta-list {
  width: 100%;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 12px;
  text-align: left;
}

.profile-meta-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.profile-meta-label {
  color: var(--ink-muted);
  font-weight: 500;
}

.profile-meta-value {
  color: var(--ink);
  font-weight: 600;
}

.profile-action-box {
  width: 100%;
  margin-top: 20px;
  padding: 16px;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: grid;
  gap: 10px;
  text-align: left;
}

/* Detail Section Cards */
.detail-sections {
  display: grid;
  gap: 24px;
}

.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.detail-card-header {
  padding: 18px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-card-title svg {
  color: var(--teal-600);
}

.detail-card-body {
  padding: 24px;
}

/* Key-Value Grid */
.kv-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}

.kv-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 24px;
}

@media (max-width: 640px) {
  .kv-grid-2, .kv-grid-3 {
    grid-template-columns: 1fr;
  }
}

.kv-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kv-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.kv-value {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

.kv-value.highlight {
  font-weight: 700;
  color: var(--navy-700);
}

/* Tables */
.detail-table-wrap {
  overflow-x: auto;
  margin: -4px -24px -24px;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.detail-table th {
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.detail-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  vertical-align: middle;
}

.detail-table tr:last-child td {
  border-bottom: none;
}

.detail-table tr:hover td {
  background: rgba(247, 249, 252, 0.8);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  color: var(--ink-muted);
  text-align: center;
}

.empty-state svg {
  margin-bottom: 8px;
  color: var(--ink-faint);
}

.btn-success {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.28);
}

.btn-success:hover {
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.38);
  transform: translateY(-1px);
}

.btn-danger-outline {
  background: transparent;
  color: #be123c;
  border: 1.5px solid #fecdd3;
}

.btn-danger-outline:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #9f1239;
}