/* ── Reset & Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand */
  --blue:         #4F6EF7;
  --blue-dark:    #3B5BDB;
  --blue-light:   #EEF2FF;
  --indigo:       #6366F1;
  --red:          #EF4444;
  --red-light:    #FEF2F2;
  --green:        #10B981;
  --green-light:  #ECFDF5;
  --yellow:       #F59E0B;
  --yellow-light: #FFFBEB;

  /* Layout */
  --sidebar-w:    260px;
  --topbar-h:     60px;

  /* Surface (light mode) */
  --bg:           #F0F4F8;
  --surface:      #FFFFFF;
  --surface-2:    #F8FAFC;
  --border:       #E2E8F0;
  --border-light: #F1F5F9;

  /* Text (light mode) */
  --text:         #0F172A;
  --text-2:       #334155;
  --muted:        #64748B;

  /* Sidebar (light mode) */
  --sidebar-bg:   #0C1220;
  --sidebar-text: rgba(255,255,255,0.65);
  --sidebar-text-active: #FFFFFF;
  --sidebar-hover: rgba(255,255,255,0.08);
  --sidebar-active-bg: rgba(79,110,247,0.18);
  --sidebar-active-border: #4F6EF7;

  /* Shadows */
  --shadow-sm:    0 1px 2px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  --shadow:       0 2px 8px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.05);
  --shadow-md:    0 4px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);

  /* Misc */
  --radius:       10px;
  --radius-lg:    14px;
  --radius-xl:    18px;
  --transition:   all .18s cubic-bezier(.4,0,.2,1);
}

/* ── Dark Theme ─────────────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:           #0A0F1E;
  --surface:      #111827;
  --surface-2:    #1A2235;
  --border:       #1E2D45;
  --border-light: #162033;

  --text:         #F1F5F9;
  --text-2:       #CBD5E1;
  --muted:        #64748B;

  --blue-light:   rgba(79,110,247,0.15);
  --red-light:    rgba(239,68,68,0.12);
  --green-light:  rgba(16,185,129,0.12);
  --yellow-light: rgba(245,158,11,0.12);

  --shadow-sm:    0 1px 2px rgba(0,0,0,.4);
  --shadow:       0 2px 8px rgba(0,0,0,.4), 0 1px 3px rgba(0,0,0,.3);
  --shadow-md:    0 4px 16px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.6), 0 4px 12px rgba(0,0,0,.3);
}

/* ── Global ─────────────────────────────────────────────────────────────────── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

/* ── Sidebar ────────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.sidebar-logo .logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px;
  box-shadow: 0 4px 12px rgba(79,110,247,0.45);
}

.sidebar-nav { flex: 1; padding: 14px 0; overflow-y: auto; }

.nav-section-title {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  padding: 10px 20px 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px 9px 16px;
  color: var(--sidebar-text);
  font-weight: 500;
  font-size: 13.5px;
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
  position: relative;
  margin: 1px 8px;
  border-radius: 8px;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  border-left-color: transparent;
}

.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-text-active);
  border-left-color: var(--sidebar-active-border);
  font-weight: 600;
}

.nav-item .nav-icon { width: 18px; text-align: center; flex-shrink: 0; font-size: 15px; }

.nav-badge {
  margin-left: auto;
  background: rgba(79,110,247,0.3);
  color: #A5B4FC;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 22px;
  text-align: center;
}

.nav-item.active .nav-badge {
  background: rgba(79,110,247,0.5);
  color: #fff;
}

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

/* ── Topbar ─────────────────────────────────────────────────────────────────── */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 var(--border), var(--shadow-sm);
}

.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.user-btn:hover {
  background: var(--surface-2);
  border-color: #C7D2FE;
  box-shadow: var(--shadow-sm);
}

.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

/* ── Page Body ──────────────────────────────────────────────────────────────── */
.page-body { padding: 26px 28px; flex: 1; }

.breadcrumb { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue); text-decoration: none; }
.breadcrumb span { margin: 0 6px; opacity: .5; }

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}

/* ── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

/* ── Stat Cards ─────────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

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

.stat-icon {
  width: 50px; height: 50px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon.blue   { background: var(--blue-light);   color: var(--blue);   }
.stat-icon.green  { background: var(--green-light);  color: var(--green);  }
.stat-icon.red    { background: var(--red-light);    color: var(--red);    }
.stat-icon.yellow { background: var(--yellow-light); color: var(--yellow); }

.stat-label { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--text); letter-spacing: -0.04em; line-height: 1; }

/* ── Table ──────────────────────────────────────────────────────────────────── */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 14px;
  width: 260px;
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(79,110,247,.12);
}

.search-box input {
  border: none; outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  width: 100%;
  font-family: inherit;
}

table { width: 100%; border-collapse: collapse; }

thead tr { border-bottom: 2px solid var(--border); }
tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background .12s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }

[data-theme="dark"] tbody tr:hover { background: rgba(255,255,255,0.03); }

th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  white-space: nowrap;
}

td { padding: 13px 16px; font-size: 13px; vertical-align: middle; color: var(--text-2); }
td strong { color: var(--text); font-weight: 600; }

.col-check { width: 40px; }
.col-actions { width: 150px; text-align: right; white-space: nowrap; }

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

/* ── Action Buttons (inline table) ─────────────────────────────────────────── */
.btn-icon {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 11px; border-radius: 7px; font-size: 12px;
  font-weight: 500; cursor: pointer; border: none;
  transition: var(--transition); text-decoration: none;
  font-family: inherit;
}

.btn-icon.view   { color: var(--muted);  background: var(--surface-2); border: 1px solid var(--border); }
.btn-icon.edit   { color: var(--blue);   background: var(--blue-light); }
.btn-icon.delete { color: var(--red);    background: var(--red-light); }

.btn-icon.view:hover   { background: var(--border); color: var(--text); }
.btn-icon.edit:hover   { background: #DBEAFE; color: var(--blue-dark); transform: translateY(-1px); }
.btn-icon.delete:hover { background: #FEE2E2; color: #B91C1C; transform: translateY(-1px); }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  border: none; transition: var(--transition);
  font-family: inherit; letter-spacing: -0.01em;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, var(--indigo) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79,110,247,0.35), 0 1px 2px rgba(0,0,0,.1);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79,110,247,0.45), 0 2px 6px rgba(0,0,0,.12);
}

.btn-primary:active { transform: translateY(0); }

.btn-danger {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: #fff;
  box-shadow: 0 2px 8px rgba(239,68,68,0.3);
}

.btn-danger:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(239,68,68,0.4);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--surface-2);
  border-color: #C7D2FE;
  color: var(--text);
}

/* ── Modals ─────────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  width: 500px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: springIn .32s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes springIn {
  from { opacity: 0; transform: scale(0.88) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}

.modal-title { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }

.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: var(--muted); line-height: 1;
  padding: 4px 8px; border-radius: 6px;
  transition: var(--transition);
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }

.modal-body { padding: 22px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
  background: var(--surface-2);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ── Forms ──────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.form-control {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}

.form-control::placeholder { color: var(--muted); opacity: .7; }

.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(79,110,247,.14);
}

select.form-control { background: var(--surface); cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 88px; }

/* ── Generate password button ───────────────────────────────────────────────── */
.pw-label-row {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px;
}
.pw-label-row .form-label { margin-bottom: 0; }
.btn-gen-pw {
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 6px;
  background: var(--blue-light); color: var(--blue); border: 1px solid #C7D2FE;
  cursor: pointer; transition: var(--transition); font-family: inherit;
  white-space: nowrap;
}
.btn-gen-pw:hover { background: #DBEAFE; color: var(--blue-dark); }

.password-wrap { position: relative; }
.password-wrap .form-control { padding-right: 40px; }

.password-toggle {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 15px;
  transition: color .15s;
}
.password-toggle:hover { color: var(--text); }

/* ── Alerts ─────────────────────────────────────────────────────────────────── */
.alert {
  padding: 11px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  transition: opacity .4s ease;
}

.alert-success { background: var(--green-light);  color: #065F46; border: 1px solid #A7F3D0; }
.alert-danger  { background: var(--red-light);    color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: var(--yellow-light); color: #92400E; border: 1px solid #FDE68A; }
.alert-info    { background: var(--blue-light);   color: #1E40AF; border: 1px solid #C7D2FE; }

.alert-close {
  margin-left: auto; background: none; border: none;
  cursor: pointer; font-size: 18px; opacity: .5; line-height: 1;
}
.alert-close:hover { opacity: 1; }

/* ── Badges ─────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-blue   { background: var(--blue-light);   color: var(--blue);   }
.badge-green  { background: var(--green-light);  color: #059669;       }
.badge-red    { background: var(--red-light);    color: #DC2626;       }
.badge-gray   { background: var(--surface-2);    color: var(--muted);  border: 1px solid var(--border); }
.badge-yellow { background: var(--yellow-light); color: #D97706;       }

/* ── Login Page ─────────────────────────────────────────────────────────────── */
/* ── Login split layout ─────────────────────────────────────────────────────── */
.login-split {
  min-height: 100vh;
  display: flex;
}

.login-left {
  flex: 1;
  background: linear-gradient(135deg, #1565C0 0%, #1976D2 40%, #42A5F5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 52px;
  position: relative;
  overflow: hidden;
}
.login-left::before {
  content: '';
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  top: -100px; right: -100px;
}
.login-left::after {
  content: '';
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  bottom: -60px; left: -60px;
}

.login-left-inner { position: relative; z-index: 1; max-width: 420px; }

.login-brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 40px;
}
.login-brand-icon {
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.login-brand span {
  font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -0.03em;
}

.login-headline {
  font-size: 26px; font-weight: 700; color: #fff;
  line-height: 1.4; margin-bottom: 32px; letter-spacing: -0.02em;
}

.login-features {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.login-features li {
  display: flex; align-items: flex-start; gap: 10px;
  color: rgba(255,255,255,0.88); font-size: 14px; line-height: 1.5;
}
.lf-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.7);
  flex-shrink: 0; margin-top: 5px;
}

.login-right {
  width: 480px;
  min-width: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #EEF2FF 0%, #F5F8FF 50%, #EDE9FE 100%);
  padding: 48px 40px;
}
.login-right .form-label { color: #374151; }
.login-right .login-logo h1 { color: #111827; }
.login-right .login-logo p { color: #6B7280; }
.login-form-box .form-control {
  background: #ffffff;
  border-color: #C7D2FE;
  color: #111827;
}
.login-form-box .form-control:focus {
  background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(79,110,247,0.12);
}
.login-form-box .btn-primary {
  background: linear-gradient(135deg, #4F6EF7, #7C3AED);
  box-shadow: 0 4px 18px rgba(99,102,241,0.4);
}

.login-form-box {
  width: 100%;
  max-width: 360px;
  animation: springIn .35s cubic-bezier(.34,1.56,.64,1) both;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  width: 420px;
  max-width: 95vw;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: springIn .35s cubic-bezier(.34,1.56,.64,1) both;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo .logo-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff;
  margin: 0 auto 14px;
  box-shadow: 0 8px 24px rgba(79,110,247,0.35);
}

.login-logo h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.04em; }
.login-logo p  { font-size: 13px; color: var(--muted); margin-top: 5px; }

/* ── Dropdown ───────────────────────────────────────────────────────────────── */
.dropdown { position: relative; }

.dropdown-menu {
  display: none;
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: 300;
  animation: springIn .22s cubic-bezier(.34,1.56,.64,1) both;
  overflow: hidden;
}

.dropdown.open .dropdown-menu { display: block; }

.dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: background .12s;
}

.dropdown-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.dropdown-item.danger { color: var(--red); }
.dropdown-item.danger:hover { background: var(--red-light); color: var(--red); }

.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ── Theme Switcher ─────────────────────────────────────────────────────────── */
.theme-switcher {
  display: flex; gap: 3px;
  padding: 8px 12px;
  align-items: center;
}

.theme-btn {
  background: none; border: none; cursor: pointer;
  padding: 6px 9px; border-radius: 7px;
  font-size: 15px; color: var(--muted);
  transition: var(--transition);
  line-height: 1;
}

.theme-btn:hover { background: var(--surface-2); color: var(--text); }

.theme-btn.active {
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  color: #fff;
  box-shadow: 0 2px 8px rgba(79,110,247,0.3);
}

/* ── Pagination ─────────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: 4px; align-items: center; margin-top: 18px; }

.page-btn {
  padding: 6px 12px; border-radius: 7px; font-size: 13px;
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; color: var(--text-2);
  transition: var(--transition); text-decoration: none;
  font-family: inherit; font-weight: 500;
}

.page-btn:hover { background: var(--surface-2); color: var(--text); border-color: #C7D2FE; text-decoration: none; }
.page-btn.active {
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(79,110,247,0.35);
}
.page-btn.disabled { opacity: .35; pointer-events: none; }

/* ── Copy button ────────────────────────────────────────────────────────────── */
[data-copy] {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 5px; font-size: 11px;
  font-weight: 600; background: var(--surface-2);
  border: 1px solid var(--border); cursor: pointer;
  color: var(--muted); transition: var(--transition);
  font-family: inherit;
}

[data-copy]:hover {
  background: var(--blue-light);
  color: var(--blue);
  border-color: #C7D2FE;
}

/* ── Misc ───────────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 56px 20px; color: var(--muted);
}
.empty-state .empty-icon { font-size: 44px; margin-bottom: 14px; opacity: .7; }
.empty-state p { font-size: 14px; }

.text-muted   { color: var(--muted); }
.text-small   { font-size: 12px; }
.fw-600       { font-weight: 600; }
.fw-700       { font-weight: 700; }
.mt-4         { margin-top: 4px; }
.mt-8         { margin-top: 8px; }
.mt-16        { margin-top: 16px; }
.flex-center  { display: flex; align-items: center; gap: 8px; }
.mono         { font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace; font-size: 12px; }

/* ── Divider ────────────────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ── Form row ───────────────────────────────────────────────────────────────── */
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .col-actions { width: auto; }
  .page-body { padding: 18px 16px; }
  .topbar { padding: 0 16px; }
  .login-card { padding: 32px 24px; }
  .form-row { flex-direction: column; }
  .login-split { flex-direction: column; }
  .login-left { display: none; }
  .login-right { width: 100%; min-width: unset; padding: 40px 24px; }
}

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