/* ============================================================
   NACOS PCU — Dashboard CSS
   Shared by Student & Admin dashboards
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── RESET & ROOT ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; height: 100%; }
body {
  font-family: 'DM Sans', sans-serif;
  background: #0A0F1E;
  color: #E8EDF5;
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ── CSS VARIABLES ── */
:root {
  --navy:       #0A0F1E;
  --navy-mid:   #111827;
  --navy-card:  #141C2E;
  --navy-lt:    #1A2236;
  --green:      #00E87A;
  --green-dim:  #00C464;
  --green-glow: rgba(0,232,122,0.15);
  --text:       #E8EDF5;
  --text-dim:   #8A95AA;
  --border:     rgba(255,255,255,0.07);
  --red:        #ff6b6b;
  --yellow:     #FFD166;
  --blue:       #4DABF7;
  --sidebar-w:  260px;
  --topbar-h:   64px;
  --radius:     10px;
  --radius-lg:  16px;
  --trans:      0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ── LAYOUT ── */
.dash-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  grid-row: 1 / -1;
  background: var(--navy-mid);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--navy-lt) transparent;
  z-index: 100;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.brand-icon {
  width: 36px; height: 36px;
  background: var(--green);
  color: var(--navy);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  flex-shrink: 0;
}
.brand-text { line-height: 1.2; }
.brand-text strong {
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  display: block;
  color: #fff;
}
.brand-text span {
  font-size: 0.68rem;
  color: var(--text-dim);
}

.sidebar-section {
  padding: 16px 12px 8px;
}
.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  padding: 0 8px;
  margin-bottom: 6px;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text-dim);
  font-family: 'Syne', sans-serif;
  font-size: 0.855rem;
  font-weight: 600;
  transition: var(--trans);
  cursor: pointer;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.nav-item.active {
  background: var(--green-glow);
  color: var(--green);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--green);
  border-radius: 0 3px 3px 0;
}
.nav-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--green);
  color: var(--navy);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
}
.nav-badge.red { background: var(--red); color: #fff; }

.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
}
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--navy-lt);
  border: 1px solid var(--border);
}
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--green);
  color: var(--navy);
  font-family: 'Syne', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  object-fit: cover;
}
.user-info { flex: 1; min-width: 0; }
.user-info strong {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-info span { font-size: 0.7rem; color: var(--text-dim); }
.sign-out-btn {
  color: var(--text-dim);
  font-size: 1rem;
  padding: 4px;
  border-radius: 6px;
  transition: var(--trans);
}
.sign-out-btn:hover { color: var(--red); background: rgba(255,107,107,0.1); }

/* ── TOPBAR ── */
.topbar {
  grid-column: 2;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: var(--navy-mid);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-left h1 {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}
.topbar-left p { font-size: 0.78rem; color: var(--text-dim); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  background: var(--navy-lt);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  font-size: 1rem;
  transition: var(--trans);
  position: relative;
}
.topbar-btn:hover { color: var(--green); border-color: rgba(0,232,122,0.3); }
.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  border: 2px solid var(--navy-mid);
}
.hamburger-btn {
  display: none;
  width: 38px; height: 38px;
  border-radius: var(--radius);
  background: var(--navy-lt);
  border: 1px solid var(--border);
  align-items: center; justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 9px;
  cursor: pointer;
}
.hamburger-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-dim);
  border-radius: 2px;
}

/* ── MAIN CONTENT ── */
.dash-main {
  grid-column: 2;
  padding: 28px;
  overflow-y: auto;
  min-height: calc(100vh - var(--topbar-h));
}

/* ── STAT CARDS ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  transition: var(--trans);
}
.stat-card:hover { border-color: rgba(0,232,122,0.2); transform: translateY(-2px); }
.stat-body { flex: 1; }
.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.stat-value {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.stat-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 4px;
}
.stat-sub.up { color: var(--green); }
.stat-sub.down { color: var(--red); }
.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.stat-icon.green { background: var(--green-glow); }
.stat-icon.blue  { background: rgba(77,171,247,0.12); }
.stat-icon.yellow{ background: rgba(255,209,102,0.12); }
.stat-icon.red   { background: rgba(255,107,107,0.12); }

/* ── SECTION / CARD ── */
.dash-section {
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.dash-section-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}
.dash-section-sub { font-size: 0.78rem; color: var(--text-dim); margin-top: 2px; }

/* ── TABLES ── */
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.dash-table td {
  padding: 13px 14px;
  font-size: 0.875rem;
  color: var(--text);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: rgba(255,255,255,0.02); }
.dash-table .name-cell { display: flex; align-items: center; gap: 10px; }
.table-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--green);
  color: var(--navy);
  font-family: 'Syne', sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cell-main { font-weight: 500; color: #fff; }
.cell-sub  { font-size: 0.75rem; color: var(--text-dim); }

/* ── BADGES / PILLS ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.green  { background: rgba(0,232,122,0.12);  color: var(--green); }
.pill.red    { background: rgba(255,107,107,0.12); color: var(--red); }
.pill.yellow { background: rgba(255,209,102,0.12); color: var(--yellow); }
.pill.blue   { background: rgba(77,171,247,0.12);  color: var(--blue); }
.pill.grey   { background: rgba(255,255,255,0.06); color: var(--text-dim); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 9px 18px;
  border-radius: var(--radius);
  transition: var(--trans);
  cursor: pointer;
  white-space: nowrap;
  border: none;
}
.btn-primary { background: var(--green); color: var(--navy); }
.btn-primary:hover { background: #fff; box-shadow: 0 0 20px rgba(0,232,122,0.3); }
.btn-outline {
  background: transparent;
  color: var(--green);
  border: 1px solid rgba(0,232,122,0.35);
}
.btn-outline:hover { background: var(--green-glow); border-color: var(--green); }
.btn-ghost {
  background: var(--navy-lt);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.15); }
.btn-danger { background: rgba(255,107,107,0.12); color: var(--red); border: 1px solid rgba(255,107,107,0.3); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-lg { padding: 12px 28px; font-size: 0.95rem; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: 6px; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ── FORMS ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group label {
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--navy-lt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  width: 100%;
  transition: border-color var(--trans);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,232,122,0.08);
}
.form-group select option { background: var(--navy-mid); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.75rem; color: var(--text-dim); margin-top: 3px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 8px; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,15,30,0.85);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--trans);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--navy-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.98);
  transition: var(--trans);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}
.modal-close {
  width: 30px; height: 30px;
  border-radius: 6px;
  background: var(--navy-lt);
  color: var(--text-dim);
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--trans);
}
.modal-close:hover { color: var(--red); background: rgba(255,107,107,0.1); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* ── EMPTY STATE ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  gap: 12px;
}
.empty-icon { font-size: 3rem; opacity: 0.4; }
.empty-state h4 {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.empty-state p { font-size: 0.85rem; color: var(--text-dim); max-width: 280px; }

/* ── PROFILE CARD ── */
.profile-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: linear-gradient(135deg, var(--navy-lt) 0%, rgba(0,232,122,0.05) 100%);
  border: 1px solid rgba(0,232,122,0.15);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.profile-avatar-lg {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--green);
  color: var(--navy);
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid rgba(0,232,122,0.3);
  flex-shrink: 0;
  object-fit: cover;
}
.profile-info h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}
.profile-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.profile-meta span { font-size: 0.8rem; color: var(--text-dim); display: flex; align-items: center; gap: 5px; }
.profile-actions { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }

/* ── RESOURCE CARD ── */
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.resource-card {
  background: var(--navy-lt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--trans);
  cursor: pointer;
}
.resource-card:hover { border-color: rgba(0,232,122,0.25); transform: translateY(-2px); }
.resource-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  background: var(--navy-card);
  border: 1px solid var(--border);
}
.resource-name {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.resource-meta { font-size: 0.75rem; color: var(--text-dim); }
.resource-download {
  margin-top: auto;
  font-size: 0.78rem;
  color: var(--green);
  font-weight: 600;
  display: flex; align-items: center; gap: 5px;
}

/* ── NOTIFICATION ITEM ── */
.notif-list { display: flex; flex-direction: column; }
.notif-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: rgba(0,232,122,0.03); border-radius: var(--radius); padding: 14px; margin: -4px; }
.notif-dot-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.notif-body { flex: 1; }
.notif-body h5 {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
}
.notif-body p { font-size: 0.8rem; color: var(--text-dim); line-height: 1.5; }
.notif-time { font-size: 0.72rem; color: var(--text-dim); margin-top: 4px; }
.notif-unread-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

/* ── SEARCH / FILTER BAR ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.search-box input {
  background: var(--navy-lt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 14px 9px 38px;
  color: var(--text);
  font-size: 0.875rem;
  width: 100%;
  outline: none;
  transition: border-color var(--trans);
}
.search-box input:focus { border-color: var(--green); }
.search-box::before {
  content: '🔍';
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  pointer-events: none;
}
.filter-select {
  background: var(--navy-lt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 14px;
  color: var(--text);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--trans);
  min-width: 140px;
}
.filter-select:focus { border-color: var(--green); }

/* ── CHART PLACEHOLDER ── */
.chart-placeholder {
  height: 200px;
  border-radius: var(--radius);
  background: var(--navy-lt);
  border: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ── TABS ── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-btn {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
  padding: 10px 16px;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: var(--trans);
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--green);
}
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: var(--green);
  border-radius: 2px 2px 0 0;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── DUES PAYMENT CARD ── */
.dues-card {
  background: linear-gradient(135deg, #0D1F12 0%, #0A1A0D 100%);
  border: 1px solid rgba(0,232,122,0.2);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.dues-status-icon { font-size: 2.5rem; }
.dues-info { flex: 1; }
.dues-info h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}
.dues-info p { font-size: 0.85rem; color: var(--text-dim); }
.dues-amount {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--green);
  margin-top: 4px;
}

/* ── ANALYTICS GRID ── */
.analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.analytics-grid .wide { grid-column: 1 / -1; }
.mini-bar-chart { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-label { font-size: 0.78rem; color: var(--text-dim); width: 80px; flex-shrink: 0; text-align: right; }
.bar-track { flex: 1; height: 8px; background: var(--navy-lt); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--green); transition: width 1s ease; }
.bar-val { font-size: 0.78rem; font-weight: 700; color: var(--text); width: 36px; flex-shrink: 0; }

/* ── PAGINATION ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  flex-wrap: wrap;
  gap: 12px;
}
.pagination-info { font-size: 0.8rem; color: var(--text-dim); }
.pagination-btns { display: flex; gap: 4px; }
.page-btn {
  width: 32px; height: 32px;
  border-radius: 6px;
  background: var(--navy-lt);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--trans);
}
.page-btn:hover, .page-btn.active {
  background: var(--green-glow);
  border-color: var(--green);
  color: var(--green);
}

/* ── SPINNER ── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--navy-lt);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

/* ── LOGIN PAGE ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.auth-page::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,232,122,0.07) 0%, transparent 65%);
  pointer-events: none;
}
.auth-card {
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}
.auth-logo strong {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}
.auth-logo span { font-size: 0.72rem; color: var(--text-dim); display: block; }
.auth-card h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}
.auth-card > p { font-size: 0.875rem; color: var(--text-dim); margin-bottom: 28px; }
.auth-divider {
  text-align: center;
  position: relative;
  margin: 20px 0;
  color: var(--text-dim);
  font-size: 0.78rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }
.auth-switch { text-align: center; font-size: 0.85rem; color: var(--text-dim); margin-top: 20px; }
.auth-switch a { color: var(--green); font-weight: 600; }
.auth-error {
  background: rgba(255,107,107,0.1);
  border: 1px solid rgba(255,107,107,0.3);
  color: var(--red);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}
.auth-error.show { display: block; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .analytics-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .dash-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: -280px;
    width: 280px;
    transition: left var(--trans);
    z-index: 200;
  }
  .sidebar.open { left: 0; box-shadow: 8px 0 40px rgba(0,0,0,0.5); }
  .dash-main { grid-column: 1; padding: 16px; }
  .topbar { grid-column: 1; padding: 0 16px; }
  .hamburger-btn { display: flex; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .profile-card { flex-direction: column; align-items: flex-start; }
  .profile-actions { margin-left: 0; }
}
@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .auth-card { padding: 24px; }
}
