/* ══════════════════════════════════════════════
   Assistant Panel — Dark Theme v2
   ══════════════════════════════════════════════ */

:root {
  --bg:           #07070d;
  --surface:      #0e0e18;
  --card:         #13131e;
  --card-hover:   #1a1a28;
  --border:       #252538;
  --border-light: #333350;
  --accent:       #7c3aed;
  --accent-dim:   #5b21b6;
  --accent-glow:  rgba(124, 58, 237, 0.3);
  --accent-text:  #a78bfa;
  --accent-soft:  rgba(124,58,237,0.08);
  --green:        #22c55e;
  --green-dim:    rgba(34,197,94,0.12);
  --red:          #ef4444;
  --red-dim:      rgba(239,68,68,0.12);
  --yellow:       #f59e0b;
  --yellow-dim:   rgba(245,158,11,0.12);
  --blue:         #3b82f6;
  --blue-dim:     rgba(59,130,246,0.12);
  --cyan:         #06b6d4;
  --cyan-dim:     rgba(6,182,212,0.12);
  --text:         #e2e8f0;
  --text-muted:   #7c8a9e;
  --text-dim:     #3d4a5c;
  --sidebar-w:    224px;
  --topbar-h:     56px;
  --radius:       8px;
  --radius-lg:    12px;
  --radius-xl:    16px;
  --shadow:       0 8px 32px rgba(0,0,0,0.5);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.3);
}

/* ── Darker theme ─────────────────────────────────── */
[data-theme="darker"] {
  --bg:           #020208;
  --surface:      #07070d;
  --card:         #0a0a14;
  --card-hover:   #0e0e1a;
  --border:       #1a1a2e;
  --border-light: #252538;
  --text-dim:     #2a3344;
  --shadow:       0 8px 32px rgba(0,0,0,0.75);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.5);
}

/* ── Midnight (deep indigo/space) ────────────────── */
[data-theme="midnight"] {
  --bg:           #050510;
  --surface:      #0c0c20;
  --card:         #10102a;
  --card-hover:   #16163a;
  --border:       #1e1e40;
  --border-light: #2a2a58;
  --text-dim:     #1a1a38;
  --accent:       #818cf8;
  --accent-dim:   #6366f1;
  --accent-glow:  rgba(129,140,248,0.3);
  --accent-text:  #a5b4fc;
  --accent-soft:  rgba(129,140,248,0.08);
  --shadow:       0 8px 32px rgba(0,0,0,0.8);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.5);
}

/* ── Ocean (dark teal) ────────────────────────────── */
[data-theme="ocean"] {
  --bg:           #030d12;
  --surface:      #071820;
  --card:         #0b2030;
  --card-hover:   #0f2a3e;
  --border:       #163448;
  --border-light: #1f4060;
  --text:         #e0f2fe;
  --text-muted:   #6ba3be;
  --text-dim:     #1a3a50;
  --accent:       #06b6d4;
  --accent-dim:   #0891b2;
  --accent-glow:  rgba(6,182,212,0.3);
  --accent-text:  #67e8f9;
  --accent-soft:  rgba(6,182,212,0.08);
  --shadow:       0 8px 32px rgba(0,0,0,0.7);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.4);
}

/* ── Forest (dark green) ──────────────────────────── */
[data-theme="forest"] {
  --bg:           #030d06;
  --surface:      #07180b;
  --card:         #0b2210;
  --card-hover:   #0f2e16;
  --border:       #163c1e;
  --border-light: #1f5028;
  --text:         #dcfce7;
  --text-muted:   #6aab7e;
  --text-dim:     #1a3a22;
  --accent:       #22c55e;
  --accent-dim:   #16a34a;
  --accent-glow:  rgba(34,197,94,0.3);
  --accent-text:  #86efac;
  --accent-soft:  rgba(34,197,94,0.08);
  --shadow:       0 8px 32px rgba(0,0,0,0.7);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.4);
}

/* ── Rose (dark crimson) ──────────────────────────── */
[data-theme="rose"] {
  --bg:           #0f0408;
  --surface:      #1c0811;
  --card:         #240c16;
  --card-hover:   #2e1020;
  --border:       #3d1528;
  --border-light: #521b36;
  --text:         #ffe4e6;
  --text-muted:   #a8607a;
  --text-dim:     #3a0f1e;
  --accent:       #f43f5e;
  --accent-dim:   #e11d48;
  --accent-glow:  rgba(244,63,94,0.3);
  --accent-text:  #fb7185;
  --accent-soft:  rgba(244,63,94,0.08);
  --shadow:       0 8px 32px rgba(0,0,0,0.7);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.4);
}

/* ── Slate (clean neutral grey) ──────────────────── */
[data-theme="slate"] {
  --bg:           #0a0a0f;
  --surface:      #111118;
  --card:         #18181f;
  --card-hover:   #1e1e28;
  --border:       #2a2a38;
  --border-light: #38384a;
  --text:         #e8eaf0;
  --text-muted:   #7a8398;
  --text-dim:     #282838;
  --accent:       #64748b;
  --accent-dim:   #475569;
  --accent-glow:  rgba(100,116,139,0.3);
  --accent-text:  #94a3b8;
  --accent-soft:  rgba(100,116,139,0.08);
  --shadow:       0 8px 32px rgba(0,0,0,0.6);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.35);
}

/* ── Light theme ──────────────────────────────────── */
[data-theme="light"] {
  --bg:           #f0f2f5;
  --surface:      #ffffff;
  --card:         #ffffff;
  --card-hover:   #f8f9fa;
  --border:       #e2e8f0;
  --border-light: #cbd5e1;
  --text:         #1e293b;
  --text-muted:   #64748b;
  --text-dim:     #94a3b8;
  --green-dim:    rgba(34,197,94,0.15);
  --red-dim:      rgba(239,68,68,0.12);
  --yellow-dim:   rgba(245,158,11,0.12);
  --blue-dim:     rgba(59,130,246,0.1);
  --cyan-dim:     rgba(6,182,212,0.1);
  --shadow:       0 8px 32px rgba(0,0,0,0.12);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.06);
}

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

html, body {
  height: 100%;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }

.hidden { display: none !important; }

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ── Global animations ─────────────────────────────────── */
@keyframes spin       { to { transform: rotate(360deg); } }
@keyframes fadeIn     { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse      { 0%,100% { opacity:1; } 50% { opacity:0.4; } }
@keyframes shimmer    { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes slideIn    { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
@keyframes popIn      { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes toast-in   { from { opacity: 0; transform: translateX(20px) scale(0.95); } }
@keyframes orb-float  { 0%,100%{transform:translate(0,0)scale(1);}33%{transform:translate(40px,-30px)scale(1.08);}66%{transform:translate(-25px,40px)scale(0.94);} }
@keyframes orb-float2 { 0%,100%{transform:translate(0,0)scale(1);}33%{transform:translate(-30px,20px)scale(0.92);}66%{transform:translate(35px,-40px)scale(1.06);} }
@keyframes orb-float3 { 0%,100%{transform:translate(0,0);}50%{transform:translate(20px,20px);} }
@keyframes rotate-slow{ from{transform:rotate(0deg);}to{transform:rotate(360deg);} }
@keyframes glow-pulse { 0%,100%{box-shadow:0 0 30px rgba(124,58,237,0.35),0 0 60px rgba(124,58,237,0.15);}50%{box-shadow:0 0 50px rgba(124,58,237,0.6),0 0 100px rgba(124,58,237,0.25);} }
@keyframes hex-spin   { from{transform:rotate(0deg);}to{transform:rotate(360deg);} }
@keyframes scan-line  { from{transform:translateY(-100%);}to{transform:translateY(100vh);} }

/* Page content fade */
.content > * { animation: fadeIn 0.2s ease both; }

/* ══════════════════════════════════════════════
   SKELETON LOADER
   ══════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--card) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius);
}
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 65%; }
.skeleton-line.full   { width: 100%; }
.skeleton-avatar { width: 64px; height: 64px; border-radius: 50%; }

/* ══════════════════════════════════════════════
   LOGIN SCREEN
   ══════════════════════════════════════════════ */
.login-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #050508;
  overflow: hidden; z-index: 1000;
}

/* Animated floating orbs */
.login-orb {
  position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(60px);
}
.login-orb-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(124,58,237,0.2) 0%, transparent 65%);
  top: -200px; left: -150px;
  animation: orb-float 12s ease-in-out infinite;
}
.login-orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 65%);
  bottom: -100px; right: -100px;
  animation: orb-float2 15s ease-in-out infinite;
}
.login-orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(6,182,212,0.1) 0%, transparent 65%);
  top: 50%; left: 60%;
  animation: orb-float3 9s ease-in-out infinite;
}

/* Subtle grid overlay */
.login-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.04;
  background-image:
    linear-gradient(rgba(124,58,237,1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,1) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Scan line effect */
.login-screen::after {
  content: '';
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,0.4), transparent);
  animation: scan-line 6s linear infinite;
  pointer-events: none;
}

.login-card {
  width: 420px; position: relative; z-index: 1;
  background: rgba(19,19,30,0.9);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 20px;
  padding: 44px 42px 36px;
  box-shadow: 0 0 0 1px rgba(124,58,237,0.1), 0 32px 80px rgba(0,0,0,0.7), 0 0 80px rgba(124,58,237,0.12);
  backdrop-filter: blur(20px);
  animation: popIn 0.35s cubic-bezier(0.16,1,0.3,1);
}

.login-logo {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 28px;
}
.login-logo-ring {
  width: 60px; height: 60px; border-radius: 14px; flex-shrink: 0;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.4);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 30px rgba(124,58,237,0.35);
  animation: glow-pulse 3s ease infinite;
}
.login-logo-icon {
  font-size: 28px; color: var(--accent);
  filter: drop-shadow(0 0 10px rgba(124,58,237,0.8));
}
.login-logo-titles { display: flex; flex-direction: column; gap: 3px; }
.login-logo-text {
  font-size: 22px; font-weight: 800; letter-spacing: 0.16em; color: var(--text);
  line-height: 1;
}
.login-logo-sub {
  font-size: 11px; color: var(--text-muted); letter-spacing: 0.04em;
}

.login-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,0.4), transparent);
  margin-bottom: 28px;
}

.login-input {
  background: rgba(7,7,13,0.8) !important;
  border-color: rgba(124,58,237,0.25) !important;
  padding: 11px 14px !important; font-size: 14px !important;
}
.login-input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.2) !important;
}

.login-submit-btn {
  margin-top: 6px; padding: 12px 20px !important;
  font-size: 14px !important; letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--accent), #6d28d9) !important;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4) !important;
  transition: all 0.2s !important;
}
.login-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 30px rgba(124,58,237,0.5) !important;
}

.login-footer-note {
  text-align: center; font-size: 11px; color: var(--text-dim);
  margin-top: 18px; letter-spacing: 0.04em;
}
.auth-tabs {
  display: flex; gap: 0; margin-bottom: 18px; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border); background: var(--surface);
}
.auth-tab {
  flex: 1; padding: 8px 0; border: none; background: none;
  color: var(--text-muted); font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all 0.15s;
}
.auth-tab.active {
  background: var(--accent); color: #fff; font-weight: 600;
}
.auth-tab:hover:not(.active) { background: var(--surface2); color: var(--text); }
.data-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.data-table th {
  text-align: left; padding: 8px 12px; font-size: 11px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border-dim, var(--border));
  color: var(--text); vertical-align: middle;
}
.data-table tr:hover td { background: var(--surface2); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

.login-error {
  color: var(--red); font-size: 13px; text-align: center;
  background: var(--red-dim); border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px;
  animation: fadeIn 0.2s ease;
}

/* ══════════════════════════════════════════════
   APP LAYOUT
   ══════════════════════════════════════════════ */
.app {
  display: flex; height: 100vh; overflow: hidden;
  background-image: radial-gradient(ellipse 60% 40% at 10% 0%, rgba(124,58,237,0.04) 0%, transparent 60%);
}

/* ── Sidebar ───────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  background: linear-gradient(180deg, rgba(14,14,24,1) 0%, rgba(10,10,18,1) 100%);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: width 0.2s ease, min-width 0.2s ease;
  position: relative; z-index: 10;
}

.sidebar.collapsed { width: 56px; min-width: 56px; }

.sidebar-header {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 14px;
  border-bottom: 1px solid var(--border);
  overflow: hidden; white-space: nowrap;
}
.sidebar-logo-icon {
  font-size: 22px; color: var(--accent); flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(124,58,237,0.5));
}
.sidebar-logo-text { overflow: hidden; }
.sidebar-title {
  display: block; font-size: 13px; font-weight: 800;
  letter-spacing: 0.14em; color: var(--text);
}
.sidebar-subtitle {
  display: block; font-size: 10px; color: var(--text-muted);
  letter-spacing: 0.05em; margin-top: 2px;
}

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

.nav-section-label {
  font-size: 9px; font-weight: 800; letter-spacing: 0.18em;
  color: var(--accent-text); text-transform: uppercase;
  padding: 16px 16px 5px; opacity: 0.55;
  white-space: nowrap; overflow: hidden;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; margin: 1px 8px;
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s, transform 0.1s;
  white-space: nowrap; position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text); transform: translateX(2px); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(124,58,237,0.35) 0%, rgba(124,58,237,0.15) 100%);
  box-shadow: inset 0 1px rgba(255,255,255,0.06), 0 2px 8px rgba(124,58,237,0.2);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 60%; background: var(--accent);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 10px var(--accent), 0 0 20px rgba(124,58,237,0.4);
}
.nav-icon {
  font-size: 15px; flex-shrink: 0; width: 22px; text-align: center;
  transition: transform 0.15s;
}
.nav-item:hover .nav-icon { transform: scale(1.15); }
.nav-item.active .nav-icon { filter: drop-shadow(0 0 4px rgba(124,58,237,0.6)); }
.nav-label { font-size: 13px; font-weight: 500; }

.sidebar-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  overflow: hidden; white-space: nowrap;
  flex-direction: column; gap: 8px;
}
.sidebar-user {
  display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0;
}
.sidebar-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--surface2);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
}
.sidebar-user-info {
  display: flex; flex-direction: column; min-width: 0; flex: 1;
}
.sidebar-username {
  font-size: 12px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sidebar-user-role {
  font-size: 10px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sidebar-footer-row {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
}
.sidebar-status { display: flex; align-items: center; gap: 8px; overflow: hidden; flex: 1; min-width: 0; }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--text-dim); transition: all 0.3s;
}
.status-dot.online { background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 2s ease infinite; }
.status-dot.offline { background: var(--red); }
#status-tag { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.btn-icon {
  background: none; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-muted); font-size: 14px;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; flex-shrink: 0;
}
.btn-icon:hover { background: var(--red-dim); border-color: var(--red); color: var(--red); }

/* ── Main wrap ─────────────────────────────────────────── */
.main-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  height: var(--topbar-h); min-height: var(--topbar-h);
  background: rgba(14,14,24,0.9);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; gap: 16px;
  backdrop-filter: blur(10px);
}
.topbar-left  { display: flex; align-items: center; gap: 12px; }
.page-title   { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: 0.01em; }

.sidebar-toggle {
  background: none; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-muted); font-size: 16px;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.sidebar-toggle:hover { background: var(--card); color: var(--text); border-color: var(--border-light); }

.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-pill {
  padding: 4px 10px; border-radius: 99px;
  background: var(--card); border: 1px solid var(--border);
  font-size: 11px; color: var(--text-muted); font-family: monospace;
}
.topbar-pill.online { color: var(--green); }

.content {
  flex: 1; overflow-y: auto; padding: 24px;
  overflow-x: hidden;
}

/* ══════════════════════════════════════════════
   COMPONENTS
   ══════════════════════════════════════════════ */

/* ── Spinner ────────────────────────────────── */
.spinner-center { display: flex; align-items: center; justify-content: center; height: 200px; }
.spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

/* ── Cards ──────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-light); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.card-title .icon { color: var(--accent-text); }

/* ── Grid ───────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-4,.grid-3,.grid-2 { grid-template-columns: 1fr; } }

/* ── Stat Cards ─────────────────────────────── */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 6px;
  transition: all 0.2s;
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at top left, rgba(255,255,255,0.02), transparent 70%);
  pointer-events: none;
}
.stat-card:hover { border-color: var(--border-light); transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card.green:hover  { box-shadow: 0 8px 24px rgba(34,197,94,0.15); border-color: rgba(34,197,94,0.4); }
.stat-card.purple:hover { box-shadow: 0 8px 24px rgba(124,58,237,0.2); border-color: rgba(124,58,237,0.4); }
.stat-card.yellow:hover { box-shadow: 0 8px 24px rgba(245,158,11,0.15); border-color: rgba(245,158,11,0.4); }
.stat-card.blue:hover   { box-shadow: 0 8px 24px rgba(59,130,246,0.15); border-color: rgba(59,130,246,0.4); }
.stat-label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--text-dim); text-transform: uppercase; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--text); font-family: monospace; line-height: 1; }
.stat-sub   { font-size: 11px; color: var(--text-muted); }

.stat-card.green  { border-left: 3px solid var(--green);  background: linear-gradient(135deg, rgba(34,197,94,0.05) 0%, var(--card) 60%); }
.stat-card.purple { border-left: 3px solid var(--accent); background: linear-gradient(135deg, rgba(124,58,237,0.05) 0%, var(--card) 60%); }
.stat-card.yellow { border-left: 3px solid var(--yellow); background: linear-gradient(135deg, rgba(245,158,11,0.05) 0%, var(--card) 60%); }
.stat-card.blue   { border-left: 3px solid var(--blue);   background: linear-gradient(135deg, rgba(59,130,246,0.05) 0%, var(--card) 60%); }
.stat-card.red    { border-left: 3px solid var(--red);    background: linear-gradient(135deg, rgba(239,68,68,0.05) 0%, var(--card) 60%); }
.stat-card.cyan   { border-left: 3px solid var(--cyan);   background: linear-gradient(135deg, rgba(6,182,212,0.05) 0%, var(--card) 60%); }

/* ── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius); font-size: 13px; font-weight: 600;
  transition: all 0.15s; border: 1px solid transparent; white-space: nowrap;
  letter-spacing: 0.01em;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(0.97); }

.btn-primary {
  background: var(--accent); color: #fff; border-color: var(--accent-dim);
  box-shadow: 0 2px 8px rgba(124,58,237,0.25);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-dim);
  box-shadow: 0 4px 16px rgba(124,58,237,0.4);
  transform: translateY(-1px);
}
.btn-ghost {
  background: rgba(255,255,255,0.04); color: var(--text-muted); border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,0.08); color: var(--text); border-color: var(--border-light); }
.btn-danger {
  background: var(--red-dim); color: var(--red); border-color: rgba(239,68,68,0.25);
}
.btn-danger:hover:not(:disabled) { background: var(--red); color: #fff; box-shadow: 0 4px 12px rgba(239,68,68,0.3); }
.btn-success {
  background: var(--green-dim); color: var(--green); border-color: rgba(34,197,94,0.25);
}
.btn-success:hover:not(:disabled) { background: var(--green); color: #fff; }
.btn-sm  { padding: 5px 12px; font-size: 12px; }
.btn-full { width: 100%; }

/* ── Forms ──────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
.form-label { font-size: 11px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; }

.form-input, .form-select, .form-textarea {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  padding: 9px 12px; font-size: 13px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  outline: none; width: 100%;
}
.form-input:hover, .form-select:hover { border-color: var(--border-light); background: var(--card); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--card);
}
.form-input::placeholder { color: var(--text-dim); }
.form-select option { background: var(--surface); }
.form-textarea { resize: vertical; min-height: 80px; }

.form-row { display: flex; gap: 10px; align-items: flex-end; }
.form-row .form-group { flex: 1; margin-bottom: 0; }

/* ── Tables ─────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead { background: var(--surface); }
th {
  text-align: left; padding: 10px 14px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.1s; }
tbody tr:hover { background: rgba(255,255,255,0.03); }

/* ── Badges / Tags ──────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; white-space: nowrap;
}
.badge-owner  { background: rgba(245,158,11,0.15);  color: var(--yellow);       border: 1px solid rgba(245,158,11,0.3);  }
.badge-mod    { background: rgba(239,68,68,0.12);   color: var(--red);          border: 1px solid rgba(239,68,68,0.25);  }
.badge-wlp    { background: rgba(124,58,237,0.15);  color: var(--accent-text);  border: 1px solid rgba(124,58,237,0.3);  }
.badge-wl     { background: rgba(59,130,246,0.12);  color: var(--blue);         border: 1px solid rgba(59,130,246,0.25); }
.badge-green  { background: var(--green-dim);        color: var(--green);        border: 1px solid rgba(34,197,94,0.25);  }
.badge-red    { background: var(--red-dim);          color: var(--red);          border: 1px solid rgba(239,68,68,0.25);  }
.badge-yellow { background: var(--yellow-dim);       color: var(--yellow);       border: 1px solid rgba(245,158,11,0.25); }
.badge-cyan   { background: var(--cyan-dim);         color: var(--cyan);         border: 1px solid rgba(6,182,212,0.25);  }
.badge-gray   { background: rgba(124,138,158,0.1);  color: var(--text-muted);   border: 1px solid var(--border); }

/* ── Toasts ─────────────────────────────────── */
.toasts {
  position: fixed; bottom: 20px; right: 20px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 9999; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--border);
  box-shadow: var(--shadow); pointer-events: all;
  animation: toast-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 13px; min-width: 240px; max-width: 360px;
  transition: opacity 0.3s;
}
.toast-success { border-left: 3px solid var(--green);  }
.toast-error   { border-left: 3px solid var(--red);    }
.toast-info    { border-left: 3px solid var(--accent);  }
.toast-icon { font-size: 15px; }
.toast-success .toast-icon { color: var(--green);       }
.toast-error   .toast-icon { color: var(--red);         }
.toast-info    .toast-icon { color: var(--accent-text); }

/* ── Modal ───────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center; z-index: 500;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.15s ease;
}
.modal {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); width: 420px; max-width: 95vw;
  box-shadow: var(--shadow);
  animation: popIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 15px;
}
.modal-close { color: var(--text-muted); font-size: 16px; padding: 4px; border-radius: 4px; }
.modal-close:hover { color: var(--text); background: var(--card-hover); }
.modal-body   { padding: 22px; color: var(--text-muted); line-height: 1.7; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--border); }

/* ══════════════════════════════════════════════
   PAGE — DASHBOARD
   ══════════════════════════════════════════════ */
.page-header { margin-bottom: 22px; }
.page-header h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.page-header p  { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

.bot-status-card {
  background: linear-gradient(135deg, rgba(124,58,237,0.1) 0%, var(--card) 50%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 22px;
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 20px;
  box-shadow: 0 4px 24px rgba(124,58,237,0.08);
}
.bot-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  border: 2px solid var(--accent); flex-shrink: 0;
  object-fit: cover; box-shadow: 0 0 16px rgba(124,58,237,0.3);
}
.bot-avatar-placeholder {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--accent-soft); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
}
.bot-info { flex: 1; }
.bot-name { font-size: 17px; font-weight: 800; }
.bot-id   { font-size: 11px; color: var(--text-muted); font-family: monospace; margin-top: 2px; }
.bot-badges { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

/* ══════════════════════════════════════════════
   PAGE — ACCESS CONTROL
   ══════════════════════════════════════════════ */
.user-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  transition: all 0.12s;
}
.user-row:last-child { border-bottom: none; }
.user-row:hover { background: rgba(255,255,255,0.025); margin: 0 -20px; padding: 10px 20px; border-radius: var(--radius); }

.tier-section { margin-bottom: 24px; }
.tier-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.tier-header h3 { font-size: 13px; font-weight: 700; color: var(--text); }
.tier-count {
  font-size: 11px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 99px;
  padding: 1px 8px; color: var(--text-muted);
}

/* ══════════════════════════════════════════════
   PAGE — LOGS
   ══════════════════════════════════════════════ */
.log-terminal {
  background: #050508; border: 1px solid var(--border);
  border-radius: var(--radius-lg); height: 520px;
  overflow-y: auto; padding: 14px;
  font-family: 'Consolas', 'Courier New', monospace; font-size: 12px;
  line-height: 1.55; box-shadow: inset 0 2px 12px rgba(0,0,0,0.4);
}
.log-line { white-space: pre-wrap; word-break: break-all; margin-bottom: 1px; color: #6b7a8d; }
.log-line.log-error { color: #f87171; }
.log-line.log-warn  { color: #fbbf24; }
.log-line.log-panel { color: #c084fc; }
.log-line.log-new   { color: #e2e8f0; }

.log-toolbar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap;
}
.log-live-indicator {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--green); font-weight: 600;
}
.log-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); animation: pulse 1.2s ease infinite;
}

/* ══════════════════════════════════════════════
   PAGE — SAVED CHECKS
   ══════════════════════════════════════════════ */
.checks-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px;
}
.check-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  cursor: pointer; transition: all 0.15s;
}
.check-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(124,58,237,0.2), 0 4px 16px rgba(124,58,237,0.1);
  transform: translateY(-2px);
}
.check-card-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.check-card-date { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.check-card-tags { display: flex; gap: 4px; flex-wrap: wrap; }

.check-tabs { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.tab-btn {
  padding: 6px 12px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 12px; font-weight: 600;
  transition: all 0.12s;
}
.tab-btn.active { background: rgba(124,58,237,0.15); border-color: var(--accent); color: var(--accent-text); }
.tab-btn:hover:not(.active) { background: var(--card-hover); color: var(--text); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.15s ease; }
.check-text {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  font-family: monospace; font-size: 12px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-all;
  max-height: 500px; overflow-y: auto; color: var(--text);
}

/* ══════════════════════════════════════════════
   PAGE — BLACKLIST / LAWS
   ══════════════════════════════════════════════ */
.search-bar { display: flex; gap: 10px; margin-bottom: 20px; }
.search-bar .form-input { flex: 1; }

.result-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px; margin-bottom: 12px;
  animation: slideIn 0.2s ease;
}
.result-card-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; color: var(--text); }
.result-card-field { display: flex; gap: 8px; margin-bottom: 5px; font-size: 13px; align-items: flex-start; }
.result-card-field .field-label { color: var(--text-muted); min-width: 90px; font-size: 11px; font-weight: 700; text-transform: uppercase; padding-top: 1px; }
.result-card-field .field-value { color: var(--text); }

/* ══════════════════════════════════════════════
   PAGE — LOOKUP (profile card)
   ══════════════════════════════════════════════ */
.profile-hero {
  background: linear-gradient(135deg, rgba(124,58,237,0.12) 0%, rgba(59,130,246,0.05) 50%, var(--card) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px; margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 20px;
  animation: fadeIn 0.25s ease;
}
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar {
  width: 96px; height: 96px; border-radius: var(--radius-lg);
  border: 2px solid var(--accent); object-fit: cover;
  box-shadow: 0 0 24px rgba(124,58,237,0.35);
}
.profile-avatar-placeholder {
  width: 96px; height: 96px; border-radius: var(--radius-lg);
  background: var(--accent-soft); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 36px;
}
.profile-presence {
  position: absolute; bottom: -4px; right: -4px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--card); font-size: 10px;
  display: flex; align-items: center; justify-content: center;
}
.profile-presence.online  { background: var(--green); }
.profile-presence.ingame  { background: var(--blue); }
.profile-presence.offline { background: var(--text-dim); }

.profile-info { flex: 1; min-width: 0; }
.profile-display-name { font-size: 22px; font-weight: 800; line-height: 1.1; margin-bottom: 2px; }
.profile-username { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.profile-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.profile-desc {
  font-size: 12px; color: var(--text-muted); line-height: 1.6;
  max-height: 48px; overflow: hidden;
  background: rgba(255,255,255,0.03); border-radius: var(--radius);
  padding: 8px 10px; border: 1px solid var(--border);
}
.profile-stats {
  display: flex; gap: 20px; margin-top: 12px; flex-wrap: wrap;
}
.profile-stat { text-align: center; }
.profile-stat-val  { font-size: 16px; font-weight: 800; font-family: monospace; }
.profile-stat-lbl  { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

.info-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.info-row:last-child { border-bottom: none; }
.info-row .lbl { color: var(--text-muted); min-width: 110px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.info-row .val { color: var(--text); }

.gar-rank-hero {
  background: linear-gradient(135deg, rgba(245,158,11,0.1) 0%, var(--card) 60%);
  border: 1px solid rgba(245,158,11,0.25); border-radius: var(--radius-xl);
  padding: 20px; text-align: center;
}
.gar-rank-value { font-size: 26px; font-weight: 800; color: var(--yellow); margin: 8px 0 4px; }
.gar-rank-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }

.xtracker-safe {
  background: linear-gradient(135deg, rgba(34,197,94,0.1) 0%, var(--card) 60%);
  border: 1px solid rgba(34,197,94,0.25); border-radius: var(--radius-lg);
  padding: 16px; display: flex; align-items: center; gap: 12px;
}
.xtracker-flagged {
  background: linear-gradient(135deg, rgba(239,68,68,0.1) 0%, var(--card) 60%);
  border: 1px solid rgba(239,68,68,0.3); border-radius: var(--radius-lg);
  padding: 16px;
}

/* ══════════════════════════════════════════════
   PAGE — GROUPS
   ══════════════════════════════════════════════ */
.division-selector { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.div-btn {
  padding: 6px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 12px; font-weight: 600;
  transition: all 0.15s;
}
.div-btn.active { background: rgba(124,58,237,0.15); border-color: var(--accent); color: var(--accent-text); }
.div-btn:hover:not(.active) { background: var(--card-hover); color: var(--text); border-color: var(--border-light); }

/* ══════════════════════════════════════════════
   PAGE — BOT CONTROL
   ══════════════════════════════════════════════ */
.control-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.control-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 22px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color 0.2s;
}
.control-card:hover { border-color: var(--border-light); }
.control-card-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.control-card-desc  { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

.toggle-switch { position: relative; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: 99px;
  cursor: pointer; transition: all 0.2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--text-muted); top: 2px; left: 2px;
  transition: transform 0.2s, background 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: rgba(124,58,237,0.25); border-color: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* ══════════════════════════════════════════════
   PAGE — TODO
   ══════════════════════════════════════════════ */
.todo-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.todo-item:last-child { border-bottom: none; }
.todo-item:hover { background: rgba(255,255,255,0.025); }
.todo-checkbox { width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.todo-text { flex: 1; font-size: 13px; }
.todo-text.done { text-decoration: line-through; color: var(--text-muted); }
.todo-date { font-size: 11px; color: var(--text-dim); white-space: nowrap; }

/* ══════════════════════════════════════════════
   PAGE — CACHE
   ══════════════════════════════════════════════ */
.cache-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 22px;
  transition: border-color 0.2s;
}
.cache-card:hover { border-color: var(--border-light); }
.cache-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cache-name   { font-size: 14px; font-weight: 700; }
.cache-meta   { display: flex; flex-direction: column; gap: 5px; }
.cache-meta-row { display: flex; gap: 8px; font-size: 12px; color: var(--text-muted); }
.cache-meta-row span { color: var(--text); }

/* ══════════════════════════════════════════════
   PAGE — CT SESSIONS
   ══════════════════════════════════════════════ */
.session-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; margin-bottom: 10px;
  animation: slideIn 0.15s ease;
}
.session-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.session-channel { font-weight: 700; font-size: 13px; }

/* ══════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════ */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 52px 20px; gap: 12px;
  color: var(--text-muted); text-align: center;
}
.empty-state .empty-icon { font-size: 40px; opacity: 0.35; margin-bottom: 4px; }
.empty-state p { font-size: 13px; max-width: 300px; line-height: 1.7; }

/* ══════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════ */
.section-gap   { margin-bottom: 20px; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.flex-gap      { display: flex; gap: 8px; align-items: center; }
.mono          { font-family: monospace; }
.text-muted    { color: var(--text-muted); }
.text-dim      { color: var(--text-dim); }
.text-green    { color: var(--green); }
.text-red      { color: var(--red); }
.text-yellow   { color: var(--yellow); }
.text-accent   { color: var(--accent-text); }
.text-sm       { font-size: 12px; }
.text-xs       { font-size: 11px; }
.fw-bold       { font-weight: 700; }
.mt-4          { margin-top: 16px; }
.mb-4          { margin-bottom: 16px; }
.mb-2          { margin-bottom: 8px; }

/* ── Collapsed sidebar ──────────────────────── */
.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed #status-tag,
.sidebar.collapsed .sidebar-subtitle { display: none; }
.sidebar.collapsed .nav-item  { justify-content: center; padding: 10px; margin: 1px 4px; }
.sidebar.collapsed .nav-item.active::before { display: none; }
.sidebar.collapsed .nav-item:hover { transform: none; }
.sidebar.collapsed .sidebar-footer { justify-content: center; }
.sidebar.collapsed .btn-icon  { display: none; }

/* ══════════════════════════════════════════════
   BATCH — DRAG-DROP ZONE
   ══════════════════════════════════════════════ */
.drop-zone {
  min-height: 160px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; padding: 24px;
  transition: all 0.2s;
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.drop-zone:hover  { background: rgba(124,58,237,0.05); }
.drop-zone.drag-over {
  background: rgba(124,58,237,0.1);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.drop-icon { font-size: 32px; margin-bottom: 10px; opacity: 0.5; transition: all 0.2s; }
.drop-zone:hover .drop-icon { opacity: 0.9; transform: translateY(-3px); }
.drop-text { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.drop-sub  { font-size: 11px; color: var(--text-dim); }
.batch-preview {
  max-width: 100%; max-height: 260px;
  border-radius: var(--radius); object-fit: contain;
}

/* ══════════════════════════════════════════════
   SESSION CARD
   ══════════════════════════════════════════════ */
.text-right { text-align: right; }

/* ══════════════════════════════════════════════
   BGCHECK — LOOKUP RESULT UI
   ══════════════════════════════════════════════ */

/* Progress bar */
.bc-progress-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
}
.bc-progress-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  min-height: 18px;
}
.bc-progress-bar-bg {
  background: var(--surface);
  border-radius: 99px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}
.bc-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #a855f7);
  border-radius: 99px;
  transition: width 0.3s ease;
  width: 0%;
}
.bc-progress-pct {
  font-size: 12px;
  color: var(--text-dim);
}

/* Launch card */
.bc-launch-card {
  background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(168,85,247,0.05));
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.bc-launch-card p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}
.bc-launch-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-text);
}

/* Cache notice */
.bc-cache-notice {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--yellow);
}
.bc-cache-notice .bc-cache-actions {
  display: flex;
  gap: 8px;
}

/* Tabs */
.bc-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.bc-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: all 0.15s;
  margin-bottom: -1px;
}
.bc-tab-btn:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.bc-tab-btn.active {
  color: var(--accent-text);
  border-bottom-color: var(--accent);
  background: rgba(124,58,237,0.06);
}

.bc-tab-content { display: none; }
.bc-tab-content.active { display: block; }

/* Stat grid */
.bc-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.bc-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: center;
  transition: border-color 0.2s;
}
.bc-stat:hover { border-color: var(--border-light); }
.bc-stat.green { border-color: rgba(34,197,94,0.25); }
.bc-stat.green:hover { border-color: rgba(34,197,94,0.5); }
.bc-stat.blue  { border-color: rgba(59,130,246,0.25); }
.bc-stat.blue:hover  { border-color: rgba(59,130,246,0.5); }
.bc-stat.yellow { border-color: rgba(245,158,11,0.25); }
.bc-stat.yellow:hover { border-color: rgba(245,158,11,0.5); }
.bc-stat.purple { border-color: rgba(124,58,237,0.3); }
.bc-stat.purple:hover { border-color: rgba(124,58,237,0.55); }
.bc-stat.red  { border-color: rgba(239,68,68,0.25); }
.bc-stat.red:hover  { border-color: rgba(239,68,68,0.5); }
.bc-stat-val {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 4px;
}
.bc-stat.green .bc-stat-val { color: var(--green); }
.bc-stat.blue  .bc-stat-val { color: var(--blue); }
.bc-stat.yellow .bc-stat-val { color: var(--yellow); }
.bc-stat.purple .bc-stat-val { color: var(--accent-text); }
.bc-stat.red  .bc-stat-val { color: var(--red); }
.bc-stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Overview section */
.bc-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 640px) { .bc-overview-grid { grid-template-columns: 1fr; } }
.bc-overview-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.bc-overview-block h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.bc-kv { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.bc-kv:last-child { border-bottom: none; }
.bc-kv-label { color: var(--text-muted); }
.bc-kv-val   { font-weight: 500; }

/* Paginated table */
.bc-table-wrap { overflow-x: auto; }
.bc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.bc-table th {
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
}
.bc-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.bc-table tr:last-child td { border-bottom: none; }
.bc-table tr:hover td { background: rgba(255,255,255,0.02); }
.bc-table .gar-badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(124,58,237,0.15);
  color: var(--accent-text);
  border: 1px solid rgba(124,58,237,0.3);
  font-weight: 600;
}

/* Pagination row */
.bc-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.bc-page-btns { display: flex; gap: 6px; }

/* Blueprint section */
.bc-blueprint-intro {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding: 12px 16px;
  background: rgba(6,182,212,0.06);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: var(--radius);
}

/* Worn item thumbnails */
.bc-worn-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.bc-worn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  max-width: 72px;
  text-align: center;
  word-break: break-word;
}
.bc-worn-item img {
  width: 56px; height: 56px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  object-fit: cover;
  background: var(--surface);
}

/* ══════════════════════════════════════════════
   NOTES PAGE
   ══════════════════════════════════════════════ */
.notes-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  height: calc(100vh - var(--topbar-h) - 48px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
}
.notes-sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--surface);
}
.notes-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--border);
}
.notes-sidebar-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.notes-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 6px;
}
.notes-list-item {
  padding: 10px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 2px;
}
.notes-list-item:hover { background: rgba(255,255,255,0.04); }
.notes-list-item.active { background: rgba(124,58,237,0.12); border: 1px solid rgba(124,58,237,0.25); }
.notes-list-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notes-list-date {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}
.notes-sidebar-footer {
  padding: 10px;
  border-top: 1px solid var(--border);
}
.notes-empty {
  padding: 24px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}
.notes-editor-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.notes-empty-editor {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  color: var(--text-dim);
}
.notes-empty-icon { font-size: 40px; opacity: 0.4; }
.notes-editor {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.notes-editor-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.notes-editor-actions { display: flex; gap: 8px; flex-shrink: 0; }
.notes-title-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  padding: 4px 0;
}
.notes-title-input::placeholder { color: var(--text-dim); }
.notes-textarea {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 18px 20px;
  font-size: 14px;
  color: var(--text);
  resize: none;
  line-height: 1.7;
  font-family: inherit;
}
.notes-textarea::placeholder { color: var(--text-dim); }
.notes-meta {
  padding: 8px 20px;
  font-size: 11px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════════════
   SETTINGS PAGE
   ══════════════════════════════════════════════ */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 760px;
}
.settings-section { }
.settings-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }
.settings-row-title { font-size: 14px; font-weight: 500; }
.settings-row-sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-knob {
  position: absolute; inset: 0;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 99px;
  transition: background 0.2s;
}
.toggle-knob::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 2px; top: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.toggle-switch input:checked + .toggle-knob { background: var(--accent-dim); border-color: var(--accent); }
.toggle-switch input:checked + .toggle-knob::before { transform: translateX(18px); background: var(--accent-text); }

/* Music search */
.music-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.music-search-bar .form-input { flex: 1; }
.music-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 340px;
  overflow-y: auto;
}
.music-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid transparent;
}
.music-result-item:hover { background: rgba(255,255,255,0.03); border-color: var(--border); }
.music-result-thumb {
  width: 60px;
  height: 45px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--surface);
}
.music-result-info { flex: 1; min-width: 0; }
.music-result-title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-result-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Queue */
.music-queue-section { margin-top: 20px; }
.music-queue-header {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.music-queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 13px;
}
.music-queue-item.active { background: rgba(124,58,237,0.1); border-color: rgba(124,58,237,0.25); }
.mq-thumb  { width: 48px; height: 36px; object-fit: cover; border-radius: 4px; }
.mq-info   { flex: 1; min-width: 0; }
.mq-title  { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.mq-author { font-size: 11px; color: var(--text-muted); }
.mq-dur    { font-size: 11px; color: var(--text-dim); flex-shrink: 0; }

/* ══════════════════════════════════════════════
   MUSIC PLAYER BAR (fixed bottom)
   ══════════════════════════════════════════════ */
.music-player {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 500;
  height: 68px;
  background: rgba(13,13,22,0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  transition: transform 0.3s ease;
}
.music-player.hidden { transform: translateY(100%); pointer-events: none; }
.mp-thumbnail-wrap {
  position: relative;
  width: 48px; height: 48px;
  flex-shrink: 0;
}
.mp-thumb {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 6px;
  background: var(--surface);
}
.mp-thumb-overlay {
  position: absolute; inset: 0;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(124,58,237,0.2), transparent);
}
.mp-info { flex: 1; min-width: 0; }
.mp-title  { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-author { font-size: 11px; color: var(--text-muted); }
.mp-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mp-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  line-height: 1;
}
.mp-btn:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.mp-btn-play {
  font-size: 18px;
  color: var(--accent-text);
  background: rgba(124,58,237,0.12);
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.mp-btn-play:hover { background: rgba(124,58,237,0.25); color: #fff; }
.mp-close { font-size: 14px; color: var(--text-dim); margin-left: 4px; }
.mp-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 320px;
  flex-shrink: 0;
}
.mp-time { font-size: 11px; color: var(--text-dim); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.mp-bar-bg {
  flex: 1;
  height: 4px;
  background: var(--surface);
  border-radius: 99px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.mp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #a855f7);
  border-radius: 99px;
  width: 0%;
  transition: width 0.5s linear;
  pointer-events: none;
}
.mp-vol-wrap { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mp-vol-icon { font-size: 14px; }
.mp-vol-slider {
  -webkit-appearance: none;
  width: 80px; height: 4px;
  border-radius: 99px;
  background: var(--border-light);
  outline: none;
  cursor: pointer;
}
.mp-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent-text);
  cursor: pointer;
}

/* Push main content up when player is visible */
body:has(.music-player:not(.hidden)) .main-wrap {
  padding-bottom: 68px;
}

/* ── Lookup Page ────────────────────────────── */
.lookup-search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.lookup-search-bar .form-input { flex: 1; }

.lk-hero {
  display: flex;
  gap: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 14px;
  align-items: flex-start;
}
.lk-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.lk-avatar {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  border: 2px solid var(--border-light);
  object-fit: cover;
}
.lk-avatar-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  font-size: 32px;
}
.lk-presence {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.lk-presence-offline { background: var(--border); color: var(--text-muted); }
.lk-presence-online  { background: var(--green-dim); color: var(--green); }
.lk-presence-ingame  { background: var(--blue-dim); color: var(--blue); }

.lk-info { flex: 1; min-width: 0; }
.lk-display {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lk-username {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.lk-id {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-dim);
  margin-left: 6px;
}
.lk-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.lk-stats-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.lk-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 52px;
}
.lk-stat b {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}
.lk-stat span {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.lk-desc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.lk-desc-more {
  background: none;
  border: none;
  color: var(--accent-text);
  font-size: 12px;
  cursor: pointer;
  padding: 0 4px;
  font-weight: 600;
}
.lk-desc-more:hover { text-decoration: underline; }

.lk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.lk-grid .card { margin-top: 0; }

.lk-gar-rank {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
  color: var(--yellow);
  margin-bottom: 8px;
}
.lk-rank-num {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--border);
  border-radius: 99px;
  padding: 2px 8px;
}

.lk-bgcheck-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(124,58,237,0.1), var(--card));
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-top: 4px;
}

/* ── Laws Page ──────────────────────────────── */
.law-list { }
.law-item { border-bottom: 1px solid var(--border); }
.law-item:last-child { border-bottom: none; }
.law-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  gap: 12px;
  transition: background 0.15s;
}
.law-item-header:hover { background: var(--card-hover); }
.law-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.law-item-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}
.law-item-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}
.law-chevron {
  color: var(--text-dim);
  font-size: 11px;
  transition: transform 0.18s;
  flex-shrink: 0;
}
.law-chevron.open { transform: rotate(90deg); }
.law-item-body {
  padding: 0 16px 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.law-detail-fields {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 0 6px;
}
.law-field {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 13px;
}
.law-field-key {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  min-width: 100px;
  flex-shrink: 0;
}
.law-field-val { color: var(--text); }
.law-field.punishment .law-field-key { color: var(--red); }
.law-field.punishment .law-field-val { font-weight: 700; }
.law-body-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-top: 8px;
}

/* ── CT Session Upload ───────────────────────── */
.session-upload {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.session-upload-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { position: fixed; top:0; left:0; bottom:0; z-index:200; transform: translateX(-100%); transition: transform 0.25s ease; }
  .sidebar.mobile-open { transform: translateX(0); box-shadow: 8px 0 32px rgba(0,0,0,0.5); }
  .main-wrap { width: 100%; }
  .content { padding: 16px; }
  .profile-hero { flex-direction: column; }
}

/* ── Animations & Transitions ──────────────────────────────── */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInFast {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* Page content fade-in */
#content > * { animation: fadeIn 0.22s ease both; }
#content .card { animation: fadeIn 0.2s ease both; }

/* Card hover lift */
.card {
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.card:hover {
  border-color: rgba(124,58,237,0.25);
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

/* Buttons smooth */
.btn {
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 0 14px rgba(124,58,237,0.35); }

/* Nav links */
.nav-link {
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

/* Sidebar smooth */
.sidebar { transition: width 0.22s ease; }

/* Tab buttons */
.bc-tab-btn {
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.bc-tab-btn:hover:not(.active) { color: var(--text); background: rgba(255,255,255,0.04); }

/* Tab content fade */
.bc-tab-content {
  display: none;
  animation: fadeInFast 0.18s ease both;
}
.bc-tab-content.active { display: block; }

/* Info rows slide in */
.info-row { transition: background 0.12s; }
.info-row:hover { background: rgba(255,255,255,0.03); border-radius: 4px; }

/* Table rows */
tbody tr { transition: background 0.12s; }
tbody tr:hover { background: rgba(255,255,255,0.04) !important; }

/* Badge hover */
.badge { transition: filter 0.12s, transform 0.1s; }
.badge:hover { filter: brightness(1.15); }

/* Check cards */
.check-card { transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s; }
.check-card:hover {
  border-color: var(--accent) !important;
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Law items */
.law-item-header { transition: background 0.15s; }
.law-item-body { animation: fadeInFast 0.15s ease both; }

/* Spinner pulse */
.spinner { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Stat boxes hover */
.bc-stat {
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.bc-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

/* Input focus glow */
.form-input:focus, .form-select:focus {
  box-shadow: 0 0 0 2px rgba(124,58,237,0.25);
  transition: box-shadow 0.15s, border-color 0.15s;
}

/* Overlay animation */
#txt-overlay { animation: fadeInFast 0.15s ease both; }

/* GAR rank hero glow */
.gar-rank-hero { transition: box-shadow 0.2s; }
.gar-rank-hero:hover { box-shadow: 0 0 20px rgba(124,58,237,0.25); }

/* Empty state */
.empty-state { animation: fadeIn 0.25s ease both; }

/* Page header */
.page-header { animation: slideInLeft 0.2s ease both; }

/* Settings items */
.settings-item { transition: background 0.12s; }
.settings-item:hover { background: var(--card-hover); }

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* Focus ring for accessibility */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* bc-tab-btn active indicator animation */
.bc-tab-btn.active::after {
  animation: fadeInFast 0.15s ease both;
}

/* Tooltip-like title attributes */
[title] { cursor: default; }

/* ── BLACKLIST CARDS ──────────────────────────────────────────────────────── */
.bl-summary-banner {
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.97em;
  margin-bottom: 14px;
  border: 1px solid transparent;
  animation: fadeIn 0.2s ease both;
}
.bl-summary-danger {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.3);
  color: #fca5a5;
}
.bl-summary-safe {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.25);
  color: #86efac;
}

.bl-past-names {
  font-size: 0.84em;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.bl-past-name {
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.25);
  color: var(--accent-text);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.9em;
}

.bl-cards { display: flex; flex-direction: column; gap: 14px; }

.bl-card {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  overflow: hidden;
  animation: fadeIn 0.2s ease both;
  transition: box-shadow 0.18s, border-color 0.18s;
}
.bl-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.25); }

.bl-card-active  { border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.04); }
.bl-card-active:hover  { border-color: rgba(239,68,68,0.55); }
.bl-card-expired { border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.03); }
.bl-card-expired:hover { border-color: rgba(245,158,11,0.5); }
.bl-card-appealed{ border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.04); }
.bl-card-appealed:hover{ border-color: rgba(34,197,94,0.5); }

.bl-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  gap: 10px;
  flex-wrap: wrap;
}
.bl-card-title {
  font-size: 1.05em;
  font-weight: 700;
  color: var(--text);
}
.bl-card-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.bl-badge {
  font-size: 0.78em;
  font-weight: 600;
  border-radius: 5px;
  padding: 2px 9px;
  letter-spacing: 0.01em;
}
.bl-badge-active  { background: rgba(239,68,68,0.18); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.bl-badge-expired { background: rgba(245,158,11,0.15); color: #fcd34d; border: 1px solid rgba(245,158,11,0.3); }
.bl-badge-appealed{ background: rgba(34,197,94,0.12); color: #86efac; border: 1px solid rgba(34,197,94,0.3); }
.bl-badge-warn    { background: rgba(245,158,11,0.12); color: #fcd34d; border: 1px solid rgba(245,158,11,0.25); }

.bl-category {
  font-size: 0.76em;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 8px;
}

.bl-alias-note {
  margin: 0 18px 8px;
  font-size: 0.83em;
  color: #fcd34d;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 6px;
  padding: 6px 10px;
}

.bl-fields {
  padding: 2px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.bl-field-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88em;
}
.bl-field-label {
  min-width: 100px;
  color: var(--text-muted);
  font-size: 0.92em;
  padding-top: 1px;
  flex-shrink: 0;
}
.bl-field-value {
  color: var(--text);
  word-break: break-word;
  line-height: 1.45;
}
.bl-expiry { font-weight: 600; }

.bl-link {
  color: var(--accent-text);
  text-decoration: none;
  word-break: break-all;
}
.bl-link:hover { text-decoration: underline; color: #c4b5fd; }

.bl-card-footer {
  padding: 8px 18px 12px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.bl-trello-link {
  font-size: 0.82em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.bl-trello-link:hover { color: var(--accent-text); }

/* ── BP TAB ───────────────────────────────────────────────────────────────── */
.bp-layout { display: flex; flex-direction: column; gap: 16px; }

.bp-top-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .bp-top-row { grid-template-columns: 1fr; } }

/* Section card */
.bp-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.bp-section:hover { border-color: var(--border-light); }

.bp-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}
.bp-section-icon  { font-size: 14px; }
.bp-section-title { font-weight: 700; font-size: 13px; color: var(--text); flex: 1; }
.bp-section-badge {
  font-size: 11px;
  background: rgba(124,58,237,0.12);
  color: var(--accent-text);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 20px;
  padding: 1px 9px;
  font-weight: 600;
}
.bp-section-body { padding: 14px 16px; }

/* GAR Rank Hero */
.bp-rank-hero {
  position: relative;
  background: linear-gradient(135deg, rgba(124,58,237,0.12) 0%, rgba(124,58,237,0.04) 100%);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.bp-rank-hero:hover { border-color: rgba(124,58,237,0.5); box-shadow: 0 0 18px rgba(124,58,237,0.15); }
.bp-rank-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 10% 50%, rgba(124,58,237,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.bp-rank-inner  { position: relative; }
.bp-rank-label  { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-text); margin-bottom: 3px; font-weight: 600; }
.bp-rank-name   { font-size: 16px; font-weight: 800; color: var(--text); line-height: 1.2; margin-bottom: 3px; }
.bp-rank-num    { font-size: 11px; color: var(--text-muted); font-family: monospace; }

.bp-not-in-gar  { color: var(--text-muted); font-size: 13px; padding: 4px 0; }

/* Division / group rows */
.bp-div-list    { display: flex; flex-direction: column; gap: 5px; }
.bp-div-row     {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 8px; border-radius: 5px; background: rgba(255,255,255,0.025);
  border: 1px solid transparent; transition: background 0.12s, border-color 0.12s;
}
.bp-div-row:hover { background: rgba(255,255,255,0.04); border-color: var(--border); }
.bp-div-name    { font-size: 12px; color: var(--text); font-weight: 500; }
.bp-div-role    { font-size: 11px; color: var(--accent-text); font-weight: 600; }

/* Spotlight card (first badge / first gamepass) */
.bp-spotlight {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-left: 3px solid var(--sp-color, var(--accent));
  border-radius: 8px;
  padding: 11px 14px;
  margin-bottom: 10px;
  transition: background 0.13s, box-shadow 0.13s;
}
.bp-spotlight:hover { background: rgba(255,255,255,0.04); box-shadow: 0 3px 12px rgba(0,0,0,0.2); }
.bp-spotlight-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-muted); margin-bottom: 4px; font-weight: 600;
}
.bp-spotlight-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.bp-spotlight-line  { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-bottom: 4px; font-size: 12px; color: var(--text); }

/* Pills */
.bp-pill {
  display: inline-block; border-radius: 4px; padding: 1px 7px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .01em;
}
.bp-pill-purple { background: rgba(124,58,237,0.15); color: var(--accent-text); border: 1px solid rgba(124,58,237,0.3); }
.bp-pill-green  { background: rgba(34,197,94,0.12);  color: #86efac;             border: 1px solid rgba(34,197,94,0.3); }
.bp-pill-gray   { background: rgba(255,255,255,0.06); color: var(--text-muted);  border: 1px solid var(--border); }
.bp-pill-red    { background: rgba(239,68,68,0.12);   color: #fca5a5;             border: 1px solid rgba(239,68,68,0.3); }

/* Badge cloud */
.bp-badge-cloud { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }

/* Blacklist */
.bp-bl-clean {
  display: flex; align-items: center; gap: 12px;
  background: rgba(34,197,94,0.07); border: 1px solid rgba(34,197,94,0.25);
  border-radius: 8px; padding: 12px 16px;
}
.bp-bl-clean-icon  { font-size: 24px; }
.bp-bl-clean-title { font-weight: 700; color: var(--green); font-size: 14px; }
.bp-bl-clean-sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.bp-bl-header {
  font-weight: 700; font-size: 13px; padding: 8px 12px;
  border-left: 3px solid; border-radius: 6px;
  background: rgba(255,255,255,0.03); margin-bottom: 10px;
}
.bp-bl-record {
  border-left: 3px solid; padding: 8px 12px; border-radius: 0 6px 6px 0;
  background: rgba(255,255,255,0.02); margin-bottom: 7px;
  transition: background 0.12s;
}
.bp-bl-record:hover { background: rgba(255,255,255,0.04); }
.bp-bl-record-top {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.bp-bl-record-reason { font-size: 12px; color: var(--text-muted); }

/* ── BP: GAR stat row ───────────────────────────────────────────────────── */
.bp-gar-stats {
  display: flex; gap: 8px; margin: 10px 0 4px;
}
.bp-gar-stat {
  flex: 1; background: rgba(124,58,237,0.08); border: 1px solid rgba(124,58,237,0.2);
  border-radius: 7px; padding: 8px 10px; text-align: center;
}
.bp-gar-stat-val { font-size: 18px; font-weight: 800; color: var(--accent-text); line-height: 1.1; }
.bp-gar-stat-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-top: 2px; }

.bp-section-sub-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-muted); font-weight: 600; margin-bottom: 5px;
}

/* ── BP: Friends on BL list ─────────────────────────────────────────────── */
.bp-fbl-list { display: flex; flex-direction: column; gap: 8px; }
.bp-fbl-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 10px; border-radius: 7px;
  background: rgba(239,68,68,0.05); border: 1px solid rgba(239,68,68,0.15);
  transition: background 0.12s;
}
.bp-fbl-row:hover { background: rgba(239,68,68,0.09); }
.bp-fbl-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(239,68,68,0.2); border: 1px solid rgba(239,68,68,0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fca5a5; flex-shrink: 0;
}
.bp-fbl-info { flex: 1; min-width: 0; }
.bp-fbl-name { font-size: 13px; font-weight: 700; color: #fca5a5; margin-bottom: 2px; }
.bp-fbl-reason { font-size: 11px; color: var(--text-muted); word-break: break-word; }

/* ── Blacklist card: reason block & subtitle ──────────────────────────── */
.bl-reason-block {
  margin: 0 18px 10px;
  font-size: 0.87em;
  color: var(--text);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  line-height: 1.55;
  word-break: break-word;
}
.bl-card-subtitle {
  font-size: 0.78em;
  color: var(--text-muted);
  margin-top: 2px;
  font-family: monospace;
}
.bl-past-name-pill {
  display: inline-block;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.85em;
  margin-right: 4px;
  margin-bottom: 2px;
}
