
/* ═══════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════ */
:root {
  --bg:       #070a10;
  --bg2:      #0b0f18;
  --bg3:      #0f1420;
  --surface:  #141929;
  --surface2: #1a2035;
  --surface3: #202640;
  --border:   rgba(255,255,255,0.06);
  --border2:  rgba(255,255,255,0.12);
  --border3:  rgba(255,255,255,0.20);

  --blue:     #2979ff;
  --blue2:    #5c9eff;
  --blue3:    #82b8ff;
  --gold:     #f5c842;
  --gold2:    #e8a000;
  --red:      #ff4444;
  --red2:     #ff6b6b;
  --green:    #00e676;
  --green2:   #69f0ae;
  --cyan:     #00e5ff;
  --purple:   #aa00ff;
  --orange:   #ff9100;

  --text:     #e8edf8;
  --text2:    #8b95b0;
  --text3:    #4a5268;
  --discord:  #5865F2;

  --sidebar-w: 240px;
  --topbar-h:  60px;
  --radius:    10px;
  --radius-lg: 16px;

  --glow-blue: 0 0 30px rgba(41,121,255,0.15);
  --glow-gold: 0 0 30px rgba(245,200,66,0.15);
}

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

body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.6;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

/* ═══ ANIMATIONS ═══ */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100%{ opacity:1; } 50%{ opacity:0.5; } }
@keyframes slideIn { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes shimmer { 0%{background-position:-200% center} 100%{background-position:200% center} }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }
@keyframes glowPulse { 0%,100%{box-shadow:0 0 10px rgba(41,121,255,0.2)} 50%{box-shadow:0 0 25px rgba(41,121,255,0.5)} }

/* ═══════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════ */
#login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 20% 60%, rgba(41,121,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 30%, rgba(245,200,66,0.04) 0%, transparent 50%),
    var(--bg);
}

#login-page::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(41,121,255,0.02) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(41,121,255,0.02) 60px);
  pointer-events: none;
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  pointer-events: none;
}
.login-orb-1 { width: 500px; height: 500px; background: var(--blue); top: -200px; right: -150px; }
.login-orb-2 { width: 400px; height: 400px; background: var(--gold); bottom: -150px; left: -100px; }

.login-card {
  background: linear-gradient(145deg, rgba(20,25,41,0.98) 0%, rgba(11,15,24,0.99) 100%);
  border: 1px solid var(--border2);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  width: 440px;
  max-width: 95vw;
  text-align: center;
  position: relative;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03);
  animation: slideIn 0.6s ease;
}

.login-top-accent {
  position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.login-badge-wrap {
  position: relative;
  width: 100px; height: 100px;
  margin: 0 auto 1.8rem;
}
.login-badge {
  width: 100px; height: 100px;
  background: radial-gradient(circle at 40% 35%, #2a4a8a 0%, #0a1530 100%);
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
  position: relative;
  box-shadow: 0 0 0 6px rgba(245,200,66,0.08), 0 0 40px rgba(245,200,66,0.15);
}
.login-badge-ring {
  position: absolute; inset: -8px;
  border: 1px solid rgba(245,200,66,0.25);
  border-radius: 50%;
  animation: spin 12s linear infinite;
  border-top-color: var(--gold);
}

.login-title {
  font-family: 'Orbitron', monospace;
  font-size: 28px; font-weight: 900;
  background: linear-gradient(135deg, var(--gold), #fff5c2, var(--gold2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: 6px;
  margin-bottom: 4px;
}
.login-sub {
  font-size: 12px; color: var(--text3);
  letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 2rem;
}
.login-divider {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}
.login-info {
  font-size: 13.5px; color: var(--text2); line-height: 2;
  background: rgba(41,121,255,0.05);
  border: 1px solid rgba(41,121,255,0.12);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}
.login-info strong { color: var(--blue3); }

.btn-discord {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #5865F2, #4752c4);
  color: white;
  border: none; border-radius: var(--radius);
  font-family: 'Cairo', sans-serif;
  font-size: 16px; font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: all 0.25s;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(88,101,242,0.3);
}
.btn-discord:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(88,101,242,0.5); }
.btn-discord svg { width: 22px; height: 22px; }

.login-alert {
  margin-top: 1rem; padding: 10px 14px;
  border-radius: 8px; font-size: 13px;
  display: none; align-items: center; gap: 8px;
}
.login-alert.show { display: flex; }
.login-alert-error { background: rgba(255,68,68,0.1); border: 1px solid rgba(255,68,68,0.3); color: var(--red2); }
.login-alert-info  { background: rgba(41,121,255,0.1); border: 1px solid rgba(41,121,255,0.3); color: var(--blue3); }

.btn-demo {
  width: 100%; margin-top: 10px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text3);
  font-family: 'Cairo', sans-serif;
  font-size: 13px; cursor: pointer;
  transition: all 0.2s;
}
.btn-demo:hover { border-color: var(--border3); color: var(--text2); }

/* ═══════════════════════════════════════════════
   APP LAYOUT
═══════════════════════════════════════════════ */
#app { display: none; }
#app.visible {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  animation: fadeIn 0.4s ease;
}

/* ═══ TOPBAR ═══ */
.topbar {
  height: var(--topbar-h);
  background: rgba(11,15,24,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 200;
}

.topbar-logo { display: flex; align-items: center; gap: 12px; }
.topbar-badge {
  width: 38px; height: 38px;
  background: radial-gradient(circle, #1a3060 0%, #0a1530 100%);
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 15px rgba(245,200,66,0.15);
  flex-shrink: 0;
}
.topbar-title {
  font-family: 'Orbitron', monospace;
  font-size: 13px; font-weight: 700;
  color: var(--gold);
  letter-spacing: 2px;
}
.topbar-sub { font-size: 10px; color: var(--text3); letter-spacing: 1px; margin-top: 1px; }

.topbar-center {
  display: flex; align-items: center; gap: 6px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px; color: var(--text3);
}
.topbar-clock { color: var(--cyan); letter-spacing: 1px; }

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

.notif-btn {
  position: relative;
  width: 34px; height: 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text2);
  transition: all 0.2s; font-size: 17px;
}
.notif-btn:hover { border-color: var(--border2); color: var(--text); }
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  width: 16px; height: 16px;
  background: var(--red);
  border: 2px solid var(--bg2);
  border-radius: 50%;
  font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  color: #fff; line-height: 1;
}

.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 30px;
  cursor: pointer; transition: all 0.2s;
}
.user-chip:hover { border-color: var(--border2); }
.user-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--discord);
  object-fit: cover;
}
.user-avatar-placeholder {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  border: 1.5px solid var(--discord);
}
.user-name-chip { font-size: 13px; font-weight: 600; color: var(--text); }
.user-role-chip { font-size: 10px; color: var(--text3); }

.role-pill {
  padding: 3px 8px; border-radius: 20px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
}
.role-pill-admin { background: rgba(245,200,66,0.15); color: var(--gold); border: 1px solid rgba(245,200,66,0.3); }
.role-pill-officer { background: rgba(41,121,255,0.15); color: var(--blue2); border: 1px solid rgba(41,121,255,0.3); }

.btn-logout {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text3); font-size: 12px; font-family: 'Cairo', sans-serif;
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 5px;
}
.btn-logout:hover { border-color: var(--red); color: var(--red); }

/* ═══ MAIN LAYOUT ═══ */
.main { display: flex; flex: 1; min-height: calc(100vh - var(--topbar-h)); }

/* ═══ SIDEBAR ═══ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-left: 1px solid var(--border);
  flex-shrink: 0;
  overflow-y: auto;
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  padding: 1rem 0 2rem;
}

.sidebar-section {
  padding: 12px 18px 4px;
  font-size: 10px; letter-spacing: 2px;
  color: var(--text3); text-transform: uppercase;
  font-weight: 700; margin-top: 6px;
}

.sidebar-item {
  padding: 10px 18px;
  font-size: 13.5px; font-weight: 500;
  color: var(--text2); cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: all 0.15s;
  border-right: 3px solid transparent;
  position: relative;
}
.sidebar-item i { font-size: 17px; flex-shrink: 0; }
.sidebar-item:hover { background: rgba(255,255,255,0.04); color: var(--text); border-right-color: var(--border2); }
.sidebar-item.active {
  background: linear-gradient(270deg, rgba(41,121,255,0.12), transparent);
  color: var(--blue2); border-right-color: var(--blue);
}
.sidebar-item.active i { color: var(--blue2); }
.sidebar-item .sidebar-badge {
  margin-right: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 10px;
  min-width: 18px; text-align: center;
}
.sidebar-item.admin-only { display: none; }
.is-admin .sidebar-item.admin-only { display: flex; }

/* ═══ CONTENT AREA ═══ */
.content {
  flex: 1;
  padding: 1.5rem 2rem;
  overflow-y: auto;
  background: var(--bg);
  min-width: 0;
}

.page { display: none; }
.page.active { display: block; animation: slideIn 0.3s ease; }

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

/* Page Header */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 1.5rem; gap: 1rem;
  flex-wrap: wrap;
}
.page-header-left {}
.page-title {
  font-family: 'Orbitron', monospace;
  font-size: 18px; font-weight: 700;
  color: var(--text); letter-spacing: 1px;
}
.page-subtitle { font-size: 13px; color: var(--text3); margin-top: 3px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Breadcrumb */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text3);
  margin-bottom: 1rem;
}
.breadcrumb-sep { font-size: 10px; }
.breadcrumb-active { color: var(--text2); }

/* Stat Grid */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 12px; margin-bottom: 1.5rem; }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.3rem;
  position: relative; overflow: hidden;
  transition: all 0.2s;
}
.stat-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.stat-card::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--blue);
}
.stat-card.gold::after  { background: var(--gold); }
.stat-card.green::after { background: var(--green); }
.stat-card.red::after   { background: var(--red); }
.stat-card.cyan::after  { background: var(--cyan); }
.stat-card.purple::after { background: var(--purple); }

.stat-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 12px;
}
.stat-icon.blue   { background: rgba(41,121,255,0.15); color: var(--blue2); }
.stat-icon.gold   { background: rgba(245,200,66,0.15); color: var(--gold); }
.stat-icon.green  { background: rgba(0,230,118,0.15); color: var(--green); }
.stat-icon.red    { background: rgba(255,68,68,0.15); color: var(--red2); }
.stat-icon.cyan   { background: rgba(0,229,255,0.12); color: var(--cyan); }
.stat-icon.purple { background: rgba(170,0,255,0.12); color: #cc66ff; }

.stat-label { font-size: 11px; letter-spacing: 1.5px; color: var(--text3); text-transform: uppercase; margin-bottom: 4px; }
.stat-value { font-family: 'Orbitron', monospace; font-size: 28px; font-weight: 700; color: var(--text); line-height: 1.1; }
.stat-change { font-size: 12px; color: var(--text3); margin-top: 4px; }
.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--red2); }

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.card-title {
  font-family: 'Orbitron', monospace;
  font-size: 12px; font-weight: 700;
  color: var(--blue2); letter-spacing: 2px; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.card-title i { font-size: 16px; }
.card-body { padding: 1.25rem; }

/* Grid Layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }

/* Section Header */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.section-title {
  font-family: 'Orbitron', monospace;
  font-size: 12px; font-weight: 700;
  color: var(--blue2); letter-spacing: 2px; text-transform: uppercase;
}

/* ═══ BUTTONS ═══ */
.btn {
  padding: 8px 16px; border-radius: 8px;
  font-family: 'Cairo', sans-serif; font-size: 13px; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn-primary   { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1a66f5; box-shadow: 0 4px 20px rgba(41,121,255,0.4); }
.btn-gold      { background: rgba(245,200,66,0.15); color: var(--gold); border: 1px solid rgba(245,200,66,0.3); }
.btn-gold:hover { background: rgba(245,200,66,0.25); }
.btn-danger    { background: rgba(255,68,68,0.15); color: var(--red2); border: 1px solid rgba(255,68,68,0.3); }
.btn-danger:hover { background: rgba(255,68,68,0.25); }
.btn-success   { background: rgba(0,230,118,0.15); color: var(--green); border: 1px solid rgba(0,230,118,0.3); }
.btn-success:hover { background: rgba(0,230,118,0.25); }
.btn-ghost     { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface2); border-color: var(--border2); color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; }

/* ═══ FORM ELEMENTS ═══ */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 6px; letter-spacing: 0.5px; }
.form-control {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 14px;
  font-family: 'Cairo', sans-serif;
  font-size: 13.5px;
  transition: all 0.2s;
  outline: none;
}
.form-control:focus { border-color: var(--blue); background: rgba(41,121,255,0.05); }
.form-control::placeholder { color: var(--text3); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ═══ FILTER BAR ═══ */
.filter-bar {
  display: flex; gap: 10px; margin-bottom: 1.2rem; flex-wrap: wrap; align-items: center;
}
.filter-search {
  flex: 1; min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text); padding: 9px 14px 9px 38px;
  font-family: 'Cairo', sans-serif; font-size: 13px;
  outline: none; transition: all 0.2s;
  position: relative;
}
.filter-search-wrap { position: relative; flex: 1; min-width: 220px; }
.filter-search-wrap .search-icon {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text3); font-size: 16px; pointer-events: none;
}
.filter-search-wrap input {
  width: 100%; padding: 9px 14px 9px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px; color: var(--text);
  font-family: 'Cairo', sans-serif; font-size: 13px;
  outline: none; transition: all 0.2s;
}
.filter-search-wrap input:focus { border-color: var(--blue); }
.filter-select {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); padding: 9px 14px;
  font-family: 'Cairo', sans-serif; font-size: 13px; outline: none;
  cursor: pointer;
}
.filter-select:focus { border-color: var(--blue); }

/* ═══ TABLE ═══ */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: var(--surface2);
  padding: 10px 16px; text-align: right;
  font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text3); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.02); }
tbody td { padding: 10px 16px; color: var(--text); vertical-align: middle; }

/* ═══ RANK BADGES ═══ */
.rank-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 5px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.5px;
  white-space: nowrap;
}
.rank-command  { background: rgba(245,200,66,0.15); color: var(--gold); border: 1px solid rgba(245,200,66,0.3); }
.rank-highcmd  { background: rgba(41,121,255,0.15); color: var(--blue3); border: 1px solid rgba(41,121,255,0.3); }
.rank-supervisor { background: rgba(0,229,255,0.12); color: var(--cyan); border: 1px solid rgba(0,229,255,0.25); }
.rank-officer  { background: rgba(139,149,176,0.15); color: var(--text2); border: 1px solid var(--border2); }
.rank-cadet    { background: rgba(74,82,104,0.25); color: var(--text3); border: 1px solid var(--border); }
.rank-special  { background: rgba(0,230,118,0.12); color: var(--green); border: 1px solid rgba(0,230,118,0.3); }

/* ═══ STATUS PILLS ═══ */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.pill-blue    { background: rgba(41,121,255,0.15); color: var(--blue2); border: 1px solid rgba(41,121,255,0.3); }
.pill-gold    { background: rgba(245,200,66,0.12); color: var(--gold); border: 1px solid rgba(245,200,66,0.25); }
.pill-green   { background: rgba(0,230,118,0.12); color: var(--green); border: 1px solid rgba(0,230,118,0.25); }
.pill-red     { background: rgba(255,68,68,0.12); color: var(--red2); border: 1px solid rgba(255,68,68,0.25); }
.pill-gray    { background: rgba(255,255,255,0.06); color: var(--text3); border: 1px solid var(--border); }
.pill-cyan    { background: rgba(0,229,255,0.1); color: var(--cyan); border: 1px solid rgba(0,229,255,0.25); }
.pill-purple  { background: rgba(170,0,255,0.1); color: #cc66ff; border: 1px solid rgba(170,0,255,0.25); }

/* Status dots */
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-active   { background: var(--green); box-shadow: 0 0 6px rgba(0,230,118,0.5); animation: glowPulse 2s infinite; }
.dot-vacation { background: var(--cyan); }
.dot-suspended { background: var(--red); }
.dot-warning  { background: var(--gold2); }
.dot-offline  { background: var(--text3); }

/* ═══ PROGRESS BAR ═══ */
.progress-wrap { background: var(--bg3); border-radius: 20px; height: 6px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 20px; transition: width 0.6s ease; }
.progress-blue   { background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.progress-gold   { background: linear-gradient(90deg, var(--gold2), var(--gold)); }
.progress-green  { background: linear-gradient(90deg, var(--green), #00c853); }
.progress-red    { background: linear-gradient(90deg, var(--red), var(--orange)); }

/* ═══ MODAL ═══ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6);
  animation: slideIn 0.3s ease;
}
.modal-lg { max-width: 720px; }
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-weight: 700; font-size: 16px; color: var(--text); }
.modal-close {
  width: 32px; height: 32px; border: none;
  background: var(--surface2); border-radius: 8px;
  color: var(--text2); cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover { background: rgba(255,68,68,0.2); color: var(--red2); }
.modal-body { padding: 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
}

/* ═══ TOAST NOTIFICATION ═══ */
.toast-container {
  position: fixed; top: 80px; left: 24px; z-index: 600;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 12px 16px;
  min-width: 280px; max-width: 360px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  animation: slideIn 0.3s ease;
  transition: all 0.3s;
}
.toast i { font-size: 20px; flex-shrink: 0; }
.toast-success { border-color: rgba(0,230,118,0.4); }
.toast-success i { color: var(--green); }
.toast-error   { border-color: rgba(255,68,68,0.4); }
.toast-error i { color: var(--red2); }
.toast-info    { border-color: rgba(41,121,255,0.4); }
.toast-info i  { color: var(--blue2); }
.toast-gold    { border-color: rgba(245,200,66,0.4); }
.toast-gold i  { color: var(--gold); }

/* ═══ DROPDOWN ═══ */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: 100%; left: 0; margin-top: 6px; z-index: 300;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  min-width: 200px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  padding: 6px;
  display: none;
}
.dropdown-menu.open { display: block; animation: slideIn 0.2s ease; }
.dropdown-item {
  padding: 8px 12px; border-radius: 8px;
  font-size: 13px; color: var(--text2);
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  transition: all 0.15s;
}
.dropdown-item:hover { background: var(--surface3); color: var(--text); }
.dropdown-item.danger:hover { background: rgba(255,68,68,0.1); color: var(--red2); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ═══ TABS ═══ */
.tabs { display: flex; gap: 4px; margin-bottom: 1.2rem; flex-wrap: wrap; }
.tab-btn {
  padding: 7px 16px; border-radius: 8px;
  font-family: 'Cairo', sans-serif; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); background: transparent;
  color: var(--text3); cursor: pointer; transition: all 0.2s;
}
.tab-btn:hover { border-color: var(--border2); color: var(--text2); }
.tab-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ═══ ACTIVITY FEED ═══ */
.activity-item {
  display: flex; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot-wrap {
  display: flex; flex-direction: column; align-items: center;
  padding-top: 4px;
}
.activity-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue); flex-shrink: 0;
}
.activity-line { flex: 1; width: 1px; background: var(--border); margin-top: 4px; }
.activity-content { flex: 1; min-width: 0; }
.activity-msg { font-size: 13px; color: var(--text); line-height: 1.5; }
.activity-time { font-size: 11px; color: var(--text3); margin-top: 2px; }

/* ═══ EMPTY STATE ═══ */
.empty-state {
  text-align: center; padding: 3rem 1rem;
  color: var(--text3);
}
.empty-state i { font-size: 48px; display: block; margin-bottom: 12px; opacity: 0.4; }
.empty-state p { font-size: 14px; }

/* ═══ CONFIRM DIALOG ═══ */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,0.8);
  display: none; align-items: center; justify-content: center;
}
.confirm-overlay.open { display: flex; }
.confirm-box {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 16px; padding: 2rem;
  max-width: 380px; width: 95%;
  text-align: center;
  animation: slideIn 0.2s ease;
}
.confirm-icon { font-size: 40px; margin-bottom: 1rem; color: var(--red2); }
.confirm-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.confirm-msg { font-size: 13.5px; color: var(--text2); margin-bottom: 1.5rem; line-height: 1.6; }
.confirm-actions { display: flex; gap: 8px; justify-content: center; }

/* ═══ NOTIFICATION PANEL ═══ */
.notif-panel {
  position: absolute; top: 50px; left: 0; z-index: 300;
  width: 360px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  overflow: hidden;
  display: none;
}
.notif-panel.open { display: block; animation: slideIn 0.2s ease; }
.notif-panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700;
}
.notif-list { max-height: 400px; overflow-y: auto; }
.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.15s;
  display: flex; gap: 10px; align-items: flex-start;
}
.notif-item:hover { background: rgba(255,255,255,0.03); }
.notif-item.unread { background: rgba(41,121,255,0.05); }
.notif-item-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.notif-item-body-text { font-size: 12px; color: var(--text2); line-height: 1.4; }
.notif-item-time { font-size: 11px; color: var(--text3); margin-top: 3px; }

/* ═══ LOADING ═══ */
.loading-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem;
}
.loading-spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ═══ MISC ═══ */
.mono { font-family: 'Share Tech Mono', monospace; }
.code { background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; font-family: 'Share Tech Mono', monospace; font-size: 12px; color: var(--cyan); }
.text-gold { color: var(--gold); }
.text-blue { color: var(--blue2); }
.text-green { color: var(--green); }
.text-red { color: var(--red2); }
.text-cyan { color: var(--cyan); }
.text-muted { color: var(--text2); }
.text-faint { color: var(--text3); }

hr.divider { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }

/* Officer profile inline */
.officer-mini {
  display: flex; align-items: center; gap: 10px;
}
.officer-avatar-circle {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.officer-mini-name { font-size: 13.5px; font-weight: 600; }
.officer-mini-badge { font-size: 11.5px; color: var(--text3); }

/* Webhook log */
.webhook-log-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 12px; background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px; margin-bottom: 6px; font-size: 12px;
}
.wh-ok { color: var(--green); }
.wh-fail { color: var(--red2); }

/* Rank details accordion */
.rank-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px; overflow: hidden;
}
.rank-row-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; cursor: pointer; transition: background 0.15s;
}
.rank-row-header:hover { background: rgba(255,255,255,0.02); }
.rank-details { display: none; padding: 0 16px 14px; border-top: 1px solid var(--border); }
.rank-details.open { display: block; }

/* Outfit / Equipment cards */
.outfit-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
}
.outfit-card-title {
  font-size: 13px; font-weight: 700; color: var(--cyan);
  margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.outfit-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.outfit-row:last-child { border-bottom: none; }
.outfit-label { color: var(--text3); }
.outfit-val { font-family: 'Share Tech Mono', monospace; color: var(--cyan); font-size: 11px; cursor: pointer; }
.outfit-val:hover { text-decoration: underline; }

.equip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); gap: 10px; }
.equip-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  text-align: center; transition: all 0.2s;
}
.equip-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.equip-icon { font-size: 30px; margin-bottom: 8px; }
.equip-name { font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.equip-qty { font-family: 'Orbitron', monospace; font-size: 18px; color: var(--cyan); }

/* Radio */
.radio-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px;
  display: flex; align-items: flex-start; gap: 14px; transition: all 0.2s;
}
.radio-card:hover { border-color: var(--border2); }
.radio-code {
  font-family: 'Orbitron', monospace; font-size: 13px;
  color: var(--gold); letter-spacing: 1px; min-width: 52px; flex-shrink: 0;
}
.radio-desc { font-size: 13px; color: var(--text); flex: 1; }
.radio-example { font-size: 11.5px; color: var(--text3); margin-top: 4px; font-style: italic; }

/* Laws */
.law-tier {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 12px; overflow: hidden;
}
.law-tier-header {
  padding: 12px 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.15s;
}
.law-tier-header:hover { background: rgba(255,255,255,0.02); }
.law-tier-body { display: none; border-top: 1px solid var(--border); }
.law-tier-body.open { display: block; }
.law-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.law-item:last-child { border-bottom: none; }
.law-id { font-family: 'Share Tech Mono', monospace; font-size: 11px; color: var(--text3); min-width: 36px; }
.law-text { flex: 1; color: var(--text); }
.penalty-warn      { background: rgba(245,200,66,0.15); color: var(--gold); border: 1px solid rgba(245,200,66,0.3); padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 700; }
.penalty-strike    { background: rgba(255,145,0,0.15); color: var(--orange); border: 1px solid rgba(255,145,0,0.3); padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 700; }
.penalty-suspend   { background: rgba(41,121,255,0.15); color: var(--blue2); border: 1px solid rgba(41,121,255,0.3); padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 700; }
.penalty-demotion  { background: rgba(170,0,255,0.15); color: #cc66ff; border: 1px solid rgba(170,0,255,0.3); padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 700; }
.penalty-fire      { background: rgba(255,68,68,0.15); color: var(--red2); border: 1px solid rgba(255,68,68,0.3); padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 700; }

/* Points progress */
.pts-bar-wrap { background: var(--bg3); border-radius: 20px; height: 8px; overflow: hidden; flex: 1; }
.pts-bar { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width 0.8s ease; }

/* Dashboard chart */
.rank-dist-bar {
  display: flex; align-items: center; gap: 10px; padding: 6px 0;
}
.rank-dist-label { font-size: 12px; color: var(--text2); min-width: 130px; }
.rank-dist-track { flex: 1; background: var(--bg3); border-radius: 20px; height: 6px; overflow: hidden; }
.rank-dist-fill { height: 100%; border-radius: 20px; background: var(--blue); }
.rank-dist-count { font-family: 'Share Tech Mono', monospace; font-size: 12px; color: var(--text3); min-width: 24px; text-align: right; }

/* Wanted system */
.wanted-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
  display: flex; align-items: flex-start; gap: 12px;
}
.wanted-severity-high { border-right-color: var(--red); border-right-width: 3px; }
.wanted-severity-med  { border-right-color: var(--orange); border-right-width: 3px; }
.wanted-severity-low  { border-right-color: var(--gold); border-right-width: 3px; }
.wanted-icon { font-size: 28px; flex-shrink: 0; }
.wanted-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }

/* Quick actions */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 10px; margin-bottom: 1.5rem; }
.quick-action-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  text-align: center; cursor: pointer; transition: all 0.2s;
}
.quick-action-card:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
.qa-icon { font-size: 26px; margin-bottom: 8px; }
.qa-label { font-size: 12px; font-weight: 600; color: var(--text2); }

/* Online list */
.online-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.online-item:last-child { border-bottom: none; }

/* Discipline / Points points-bar */
.dp-bar-wrap { display: flex; align-items: center; gap: 8px; }
.dp-remaining { font-family: 'Orbitron', monospace; font-size: 13px; font-weight: 700; min-width: 26px; }
.dp-remaining.danger { color: var(--red); }
.dp-remaining.warn   { color: var(--gold2); }
.dp-remaining.ok     { color: var(--green); }

/* Responsive */
@media (max-width: 900px) {
  :root { --sidebar-w: 200px; }
  .content { padding: 1rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .topbar-center { display: none; }
}
@media (max-width: 700px) {
  .sidebar { display: none; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
}
