/* ═══════════════════════════════════════════════════════════════
   TOWI SUPERVISOR — Tema Hacker Green
   ═══════════════════════════════════════════════════════════════ */

:root {
  --c-bg:              #000000;
  --c-bg-gradient-1:   rgba(0,255,65,0.04);
  --c-bg-gradient-2:   rgba(0,200,50,0.02);
  --c-surface:         #0a0f0a;
  --c-surface-2:       #0d140d;
  --c-surface-3:       #111a11;
  --c-surface-hover:   rgba(0,255,65,0.05);
  --c-border:          rgba(0,255,65,0.14);
  --c-border-hover:    rgba(0,255,65,0.35);
  --c-border-subtle:   rgba(0,255,65,0.06);
  --c-border-strong:   rgba(0,255,65,0.28);
  --c-accent:          #00ff41;
  --c-accent-light:    #39ff14;
  --c-accent-dark:     #00cc33;
  --c-accent-dim:      rgba(0,255,65,0.12);
  --c-accent-dim-2:    rgba(0,255,65,0.06);
  --c-text:            #b8ffc8;
  --c-text-secondary:  #5aff7a;
  --c-text-muted:      #2d8a4e;
  --c-text-faint:      #1a4a2a;
  --c-text-accent:     #39ff14;
  --c-success:         #00ff41;
  --c-success-light:   #39ff14;
  --c-success-dim:     rgba(0,255,65,0.12);
  --c-danger:          #f43f5e;
  --c-danger-light:    #fb7185;
  --c-danger-dim:      rgba(244,63,94,0.12);
  --c-warning:         #f59e0b;
  --c-warning-light:   #fbbf24;
  --c-warning-dim:     rgba(245,158,11,0.12);
  --c-info:            #06b6d4;
  --c-info-light:      #22d3ee;
  --c-info-dim:        rgba(6,182,212,0.12);
  --c-sidebar-bg:      #000500;
  --c-sidebar-border:  rgba(0,255,65,0.08);
  --c-sidebar-active-bg:    rgba(0,255,65,0.10);
  --c-sidebar-active-border: #00ff41;
  --c-sidebar-active-text:   #39ff14;
  --c-header-bg:       rgba(0,0,0,0.88);
  --c-footer-bg:       rgba(0,5,0,0.80);
  --c-scrollbar-track: #0d140d;
  --c-scrollbar-thumb: #1a4a2a;
  --c-scrollbar-hover: #2d8a4e;
  --font-display: "JetBrains Mono", monospace;
  --font-body:    "JetBrains Mono", monospace;
  --font-mono:    "JetBrains Mono", monospace;
  --radius-sm:  2px;
  --radius-md:  3px;
  --radius-lg:  6px;
  --radius-xl:  8px;
  --radius-full: 9999px;
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; overflow: hidden; }
.flex-1 { min-height: 0; min-width: 0; }
body {
  font-family: var(--font-body);
  background-color: var(--c-bg);
  background-image:
    radial-gradient(ellipse at 15% 50%, var(--c-bg-gradient-1) 0%, transparent 60%),
    radial-gradient(ellipse at 85% 15%, var(--c-bg-gradient-2) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 90%, var(--c-bg-gradient-1) 0%, transparent 40%);
  color: var(--c-text);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}
a { color: var(--c-accent-light); text-decoration: none; }
a:hover { color: var(--c-accent); }

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar          { width: 5px; height: 5px; }
::-webkit-scrollbar-track    { background: var(--c-scrollbar-track); }
::-webkit-scrollbar-thumb    { background: var(--c-scrollbar-thumb); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-scrollbar-hover); }

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════ */
#sidebar {
  width: 260px; flex-shrink: 0; display: flex; flex-direction: column;
  overflow: hidden; background: var(--c-sidebar-bg);
  border-right: 1px solid var(--c-sidebar-border);
}
#sidebar-logo { padding: 20px; border-bottom: 1px solid var(--c-border-subtle); flex-shrink: 0; }
#sidebar-logo-inner { display: flex; align-items: center; gap: 10px; }
#sidebar-logo-icon {
  width: 34px; height: 34px; border-radius: 6px;
  background: var(--c-accent-dim); border: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
#sidebar-logo-icon svg { width: 16px; height: 16px; color: var(--c-accent-light); }
.sidebar-logo-name { font-family: var(--font-display); color: var(--c-accent-light); font-size: 0.9rem; line-height: 1; margin: 0; }
.sidebar-logo-sub { color: var(--c-text-muted); font-size: 0.7rem; margin: 3px 0 0; }

#sidebar-nav { flex: 1; padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.sidebar-section-title {
  color: var(--c-text-muted); font-size: 0.65rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 8px 12px 4px; margin: 0;
}
.sidebar-section-title + .sidebar-section-title,
.sidebar-link ~ .sidebar-section-title { padding-top: 16px; }

.sidebar-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: var(--radius-md); border: 1px solid transparent;
  font-size: 0.82rem; color: var(--c-text-secondary); text-decoration: none;
  transition: all 0.18s ease;
}
.sidebar-link:hover:not(.active) { background: var(--c-surface-hover); color: var(--c-text); }
.sidebar-link.active {
  background: var(--c-sidebar-active-bg); border-color: var(--c-sidebar-active-border);
  color: var(--c-sidebar-active-text);
}
.sidebar-link svg { color: inherit; opacity: 0.7; flex-shrink: 0; }
.sidebar-link.active svg, .sidebar-link:hover svg { opacity: 1; }

.sidebar-badge {
  margin-left: auto; font-size: 0.62rem; padding: 2px 6px; border-radius: 4px;
  background: var(--c-accent-dim); color: var(--c-accent-light); font-family: var(--font-mono);
}

#sidebar-user { padding: 12px; border-top: 1px solid var(--c-border-subtle); flex-shrink: 0; position: relative; }
#sidebar-user-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  border-radius: 8px; padding: 8px; background: transparent;
  border: 1px solid transparent; cursor: pointer; transition: background 0.15s, border-color 0.15s;
  color: var(--c-text-secondary); font-family: var(--font-body); font-size: 0.82rem;
}
#sidebar-user-btn:hover { background: var(--c-surface-2); border-color: var(--c-border-subtle); }
.sidebar-user-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--c-accent-dim);
  border: 1px solid var(--c-border); display: flex; align-items: center;
  justify-content: center; color: var(--c-accent-light);
  font-family: var(--font-display); font-size: 0.8rem; flex-shrink: 0;
}
.sidebar-user-name { color: var(--c-text); font-size: 0.82rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-email { color: var(--c-text-muted); font-size: 0.68rem; margin: 2px 0 0; }
.sidebar-user-chevron { width: 14px; height: 14px; color: var(--c-text-muted); flex-shrink: 0; margin-left: auto; }

#userMenuDropdown {
  position: absolute; bottom: calc(100% + 6px); left: 0; width: 100%;
  border-radius: 6px; overflow: hidden; background: var(--c-surface-3);
  border: 1px solid var(--c-border-subtle); box-shadow: 0 -4px 24px rgba(0,0,0,0.6); z-index: 100;
}
.sidebar-menu-link {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  font-size: 0.8rem; color: var(--c-text-secondary); text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.sidebar-menu-link:hover { background: var(--c-surface-hover); color: var(--c-text); }
.sidebar-menu-link svg { width: 14px; height: 14px; flex-shrink: 0; }
.sidebar-menu-link--danger { color: var(--c-danger-light); }
.sidebar-menu-link--danger:hover { background: var(--c-danger-dim); color: var(--c-danger-light); }
.sidebar-menu-divider { height: 1px; background: var(--c-border-subtle); margin: 2px 0; }

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */
#main-header {
  background: var(--c-header-bg); border-bottom: 1px solid var(--c-border-subtle);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.notif-dot { position: absolute; top: 2px; right: 2px; width: 7px; height: 7px; background: var(--c-danger); border-radius: 50%; border: 1px solid var(--c-bg); }

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
#main-footer {
  background: linear-gradient(180deg, rgba(0,255,65,0.01), transparent), var(--c-footer-bg);
  border-top: 1px solid var(--c-border-subtle); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ═══════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════ */
.card {
  background: var(--c-surface-2); border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { border-color: var(--c-border-hover); transform: translateY(-1px); box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.card-flat { background: var(--c-surface-2); border: 1px solid var(--c-border-subtle); border-radius: var(--radius-lg); }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.1rem; margin-bottom: 2rem; }
.kpi-card {
  background: linear-gradient(135deg, var(--c-surface-2) 0%, var(--c-surface) 100%);
  border: 1px solid var(--c-border-subtle); border-radius: 10px; padding: 1.05rem 1.1rem;
  position: relative; overflow: hidden; transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.kpi-card::before {
  content: ''; position: absolute; inset: -2px;
  background: radial-gradient(circle at 20% 20%, var(--c-accent-dim) 0%, transparent 55%);
  opacity: 0.35; pointer-events: none;
}
.kpi-card:hover { transform: translateY(-1px); border-color: var(--c-border-hover); box-shadow: 0 10px 30px rgba(0,0,0,0.28); }
.kpi-label { position: relative; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.10em; color: var(--c-text-muted); font-weight: 700; margin-bottom: 0.55rem; }
.kpi-value { position: relative; margin-top: 0.15rem; font-size: 2rem; line-height: 1.05; font-family: var(--font-mono); font-weight: 800; color: var(--c-text); }
.kpi-icon { position: absolute; right: 1rem; bottom: 0.8rem; width: 42px; height: 42px; opacity: 0.15; color: var(--c-accent-light); }

/* ═══════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════ */
.universal-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; min-width: 600px; }
.universal-table thead { background: var(--c-surface-3); border-bottom: 1px solid var(--c-border-subtle); }
.universal-table thead th {
  padding: 0.75rem 1rem; text-align: left; font-weight: 600; color: var(--c-text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.7rem; white-space: nowrap;
}
.universal-table tbody td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--c-border-subtle); color: var(--c-text-secondary); vertical-align: middle; font-size: 0.8rem; }
.universal-table tbody tr { transition: background 0.15s; }
.universal-table tbody tr:hover { background: var(--c-surface-hover); }
.universal-table tbody tr:last-child td { border-bottom: none; }
.universal-table tbody td.text-right { text-align: right; }
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-responsive::-webkit-scrollbar { height: 6px; }
.table-responsive::-webkit-scrollbar-thumb { background: var(--c-scrollbar-thumb); border-radius: 99px; }
.table-responsive::-webkit-scrollbar-track { background: transparent; }
.max-td { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }

/* ═══════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.18rem 0.55rem; border-radius: var(--radius-full);
  font-size: 0.68rem; font-weight: 500; font-family: var(--font-mono);
  white-space: nowrap;
}
.badge-success { background: var(--c-success-dim); color: var(--c-success-light); border: 1px solid var(--c-success-dim); }
.badge-danger { background: var(--c-danger-dim); color: var(--c-danger-light); border: 1px solid var(--c-danger-dim); }
.badge-warning { background: var(--c-warning-dim); color: var(--c-warning-light); border: 1px solid var(--c-warning-dim); }
.badge-info { background: var(--c-info-dim); color: var(--c-info-light); border: 1px solid var(--c-info-dim); }
.badge-accent { background: var(--c-accent-dim); color: var(--c-accent-light); border: 1px solid var(--c-border); }
.badge-muted { background: var(--c-surface-3); color: var(--c-text-muted); border: 1px solid var(--c-border-subtle); }
.badge-light { background: var(--c-surface-3); color: var(--c-text-secondary); border: 1px solid var(--c-border-subtle); }

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 1rem; border-radius: var(--radius-md);
  font-size: 0.8rem; font-weight: 500; cursor: pointer;
  transition: all 0.18s ease; border: 1px solid transparent;
  text-decoration: none; font-family: var(--font-body);
}
.btn-accent { background: var(--c-accent); color: #000; border-color: var(--c-accent); }
.btn-accent:hover { background: var(--c-accent-light); border-color: var(--c-accent-light); }
.btn-ghost { background: transparent; color: var(--c-text-secondary); border-color: var(--c-border-subtle); }
.btn-ghost:hover { background: var(--c-surface-hover); color: var(--c-text); border-color: var(--c-border); }
.btn-danger { background: var(--c-danger-dim); color: var(--c-danger-light); border-color: var(--c-danger-dim); }
.btn-danger:hover { background: var(--c-danger); color: #fff; }
.btn-primary { background: var(--c-accent); color: #000; border-color: var(--c-accent); }
.btn-primary:hover { background: var(--c-accent-light); border-color: var(--c-accent-light); }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.72rem; }
.btn-lg { padding: 0.6rem 1.4rem; font-size: 0.9rem; }
.btn-icon { width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* ═══════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════ */
.input {
  background: var(--c-surface-3); border: 1px solid var(--c-border-subtle);
  color: var(--c-text); border-radius: var(--radius-md); padding: 0.45rem 0.75rem;
  font-size: 0.82rem; font-family: var(--font-body); transition: border-color 0.18s ease, box-shadow 0.18s ease;
  outline: none; width: 100%;
}
.input:focus { border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-accent-dim-2); }
.input::placeholder { color: var(--c-text-faint); }
.select {
  background: var(--c-surface-3); border: 1px solid var(--c-border-subtle);
  color: var(--c-text); border-radius: var(--radius-md); padding: 0.45rem 0.75rem;
  font-size: 0.82rem; font-family: var(--font-body); transition: border-color 0.18s;
  outline: none; cursor: pointer; width: 100%;
}
.select:focus { border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-accent-dim-2); }
.select option { background: var(--c-surface-2); color: var(--c-text); }
textarea.input { min-height: 80px; resize: vertical; }
label.form-label, .form-label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--c-text-secondary); margin-bottom: 0.35rem; letter-spacing: 0.03em; }
.form-check { display: flex; align-items: center; gap: 0.5rem; }
.form-check-input { accent-color: var(--c-accent); width: 1rem; height: 1rem; cursor: pointer; }
.form-check-label { font-size: 0.82rem; color: var(--c-text-secondary); cursor: pointer; }

/* ═══════════════════════════════════════════════════════════════
   TOGGLE SWITCH
   ═══════════════════════════════════════════════════════════════ */
.av-toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; display: inline-block; }
.av-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.av-toggle__slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--c-surface-hover); border: 1px solid var(--c-border-subtle);
  border-radius: 99px; transition: background 0.2s, border-color 0.2s;
}
.av-toggle__slider::before {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: var(--c-text-muted); left: 2px; top: 2px; transition: transform 0.2s, background 0.2s;
}
.av-toggle input:checked + .av-toggle__slider { background: var(--c-success-dim); border-color: var(--c-success); }
.av-toggle input:checked + .av-toggle__slider::before { transform: translateX(20px); background: var(--c-success-light); }

/* ═══════════════════════════════════════════════════════════════
   TIMELINE
   ═══════════════════════════════════════════════════════════════ */
.timeline { display: grid; gap: 0.9rem; }
.timeline-item { padding-left: 1rem; border-left: 2px solid var(--c-border-subtle); }
.timeline-item.danger { border-left-color: var(--c-danger); }
.timeline-item.success { border-left-color: var(--c-success); }
.timeline-item.warning { border-left-color: var(--c-warning); }
.timeline-item strong { display: block; font-size: 0.85rem; }
.timeline-item span { color: var(--c-text-muted); font-size: 0.72rem; font-family: var(--font-mono); }
.timeline-item p { margin: 0.25rem 0 0; color: var(--c-text-muted); font-size: 0.78rem; }

/* ═══════════════════════════════════════════════════════════════
   INFO LIST (dl)
   ═══════════════════════════════════════════════════════════════ */
.info-list { display: grid; grid-template-columns: 110px 1fr; gap: 0.6rem 1rem; margin: 0; }
.info-list dt { color: var(--c-text-muted); font-size: 0.75rem; }
.info-list dd { margin: 0; font-size: 0.85rem; word-break: break-all; }

/* ═══════════════════════════════════════════════════════════════
   AUTH LAYOUT
   ═══════════════════════════════════════════════════════════════ */
.auth-body {
  font-family: var(--font-body); background-color: var(--c-bg); color: var(--c-text);
  min-height: 100vh; margin: 0; overflow: auto;
}
.auth-wrapper {
  display: flex; min-height: 100vh; width: 100%; position: relative; overflow: hidden;
}
.auth-wrapper::before {
  content: ''; position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at 15% 50%, var(--c-bg-gradient-1) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 15%, var(--c-bg-gradient-2) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 95%, var(--c-bg-gradient-1) 0%, transparent 40%);
  pointer-events: none; z-index: 0;
}
.auth-brand-panel {
  position: relative; width: 40%; flex-shrink: 0; display: flex;
  flex-direction: column; justify-content: center; align-items: flex-start;
  padding: 3.5rem 3rem 3.5rem 3.5rem; overflow: hidden; z-index: 1;
}
.auth-brand-divider {
  position: absolute; top: 0; right: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, transparent 0%, var(--c-border) 25%, var(--c-border-hover) 50%, var(--c-border) 75%, transparent 100%);
}
.auth-brand-inner { position: relative; z-index: 2; }
.auth-logo-mark {
  width: 52px; height: 52px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--c-accent-dim) 0%, var(--c-accent-dim-2) 100%);
  border: 1px solid var(--c-border-strong); display: flex; align-items: center;
  justify-content: center; margin-bottom: 1.5rem; box-shadow: 0 0 32px var(--c-accent-dim);
  color: var(--c-accent-light);
}
.auth-logo-mark svg { width: 22px; height: 22px; }
.auth-app-name { font-family: var(--font-display); font-size: 1.8rem; color: var(--c-text); margin: 0 0 0.5rem 0; line-height: 1.15; }
.auth-tagline { font-size: 0.85rem; color: var(--c-text-secondary); margin: 0 0 2rem 0; line-height: 1.6; max-width: 22rem; }
.auth-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.auth-feature-item { display: flex; align-items: flex-start; gap: 0.75rem; }
.auth-feature-icon {
  width: 30px; height: 30px; border-radius: var(--radius-md);
  background: var(--c-accent-dim); border: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--c-accent-light);
}
.auth-feature-icon svg { width: 14px; height: 14px; }
.auth-feature-text strong { display: block; font-size: 0.8rem; font-weight: 600; color: var(--c-text); margin-bottom: 0.1rem; }
.auth-feature-text span { font-size: 0.72rem; color: var(--c-text-muted); line-height: 1.45; }

.auth-content-panel {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 2.5rem 2rem; position: relative; z-index: 1; overflow-y: auto;
}
.auth-card {
  background: var(--c-surface); border: 1px solid var(--c-border-subtle);
  border-radius: var(--radius-xl); width: 100%; max-width: 420px;
  padding: 2.2rem 2rem;
  box-shadow: 0 0 0 1px var(--c-border-subtle), 0 20px 60px rgba(0,0,0,0.45), 0 4px 16px rgba(0,0,0,0.25);
}
.auth-card h2 { font-family: var(--font-display); font-size: 1.2rem; color: var(--c-text); margin: 0 0 1.5rem 0; }
.auth-field { margin-bottom: 1rem; }
.auth-label { display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.03em; color: var(--c-text-secondary); margin-bottom: 0.35rem; }
.auth-input {
  width: 100%; background: var(--c-surface-2); border: 1px solid var(--c-border);
  color: var(--c-text); border-radius: var(--radius-md); padding: 0.6rem 0.8rem;
  font-size: 0.85rem; font-family: var(--font-body); transition: border-color 0.18s ease, box-shadow 0.18s ease;
  outline: none; box-sizing: border-box;
}
.auth-input:focus { border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-accent-dim-2); }
.auth-input::placeholder { color: var(--c-text-faint); }
.auth-btn-primary {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.68rem 1.25rem; background: var(--c-accent); color: #000;
  border: none; border-radius: var(--radius-md); font-size: 0.88rem; font-weight: 600;
  font-family: var(--font-body); cursor: pointer; transition: background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
  letter-spacing: 0.01em;
}
.auth-btn-primary:hover { background: var(--c-accent-light); box-shadow: 0 4px 20px var(--c-accent-dim); transform: translateY(-1px); }
.auth-footer-text { text-align: center; font-size: 0.78rem; color: var(--c-text-muted); margin-top: 1.25rem; margin-bottom: 0; }
.auth-link { color: var(--c-accent-light); text-decoration: none; font-weight: 500; transition: color 0.15s; }
.auth-link:hover { color: var(--c-accent); text-decoration: underline; }

.auth-mobile-logo { display: none; align-items: center; gap: 0.6rem; margin-bottom: 1.5rem; }
.auth-mobile-logo-mark {
  width: 32px; height: 32px; border-radius: var(--radius-md);
  background: var(--c-accent-dim); border: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: center; color: var(--c-accent-light);
}
.auth-mobile-logo-mark svg { width: 16px; height: 16px; }
.auth-mobile-logo-name { font-family: var(--font-display); font-size: 1.1rem; color: var(--c-text); }

/* ═══════════════════════════════════════════════════════════════
   DRAWER OVERLAY (mobile)
   ═══════════════════════════════════════════════════════════════ */
.drawer-overlay { display: none; }
.drawer-overlay.open { display: block; }

/* ═══════════════════════════════════════════════════════════════
   PROGRESS
   ═══════════════════════════════════════════════════════════════ */
.progress { width: 100%; height: 4px; background: var(--c-surface-3); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar { height: 100%; background: var(--c-accent); border-radius: var(--radius-full); transition: width 0.3s ease; }
.progress-bar.success { background: var(--c-success); }
.progress-bar.warning { background: var(--c-warning); }
.progress-bar.danger  { background: var(--c-danger); }

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.animate-pulse-dot { animation: pulse-dot 2s ease-in-out infinite; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.animate-fadein { animation: fadeInUp 0.35s ease both; }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.animate-blink { animation: blink 1.1s step-end infinite; }

/* ═══════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════ */
.hidden { display: none !important; }
.text-success { color: var(--c-success-light); }
.text-danger { color: var(--c-danger-light); }
.text-warning { color: var(--c-warning-light); }
.text-muted { color: var(--c-text-muted); }
.text-monospace { font-family: var(--font-mono); }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-break { word-break: break-all; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
  #sidebar {
    transform: translateX(-100%); transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    position: fixed; z-index: 50; height: 100vh; top: 0; left: 0;
    background: var(--c-sidebar-bg); opacity: 1; box-shadow: 4px 0 32px rgba(0,0,0,0.6);
  }
  #sidebar.drawer-open { transform: translateX(0); }
}
@media (max-width: 767px) {
  .auth-brand-panel { display: none; }
  .auth-content-panel { padding: 1.5rem 1rem; align-items: flex-start; padding-top: 2rem; }
  .auth-card { max-width: 100%; padding: 1.5rem 1.25rem; border-radius: var(--radius-lg); }
  .auth-mobile-logo { display: flex; }
}
@media (max-width: 640px) {
  .kpi-row { grid-template-columns: 1fr; gap: 0.75rem; }
  .universal-table { min-width: 100%; font-size: 0.75rem; }
  .universal-table thead th, .universal-table tbody td { padding: 0.6rem 0.5rem; }
}

/* ═══════════════════════════════════════════════════════════════
   SWEETALERT2 DARK THEME
   ═══════════════════════════════════════════════════════════════ */
.swal2-popup { background: var(--c-surface-2) !important; color: var(--c-text) !important; border: 1px solid var(--c-border) !important; border-radius: var(--radius-lg) !important; }
.swal2-title { color: var(--c-text) !important; font-family: var(--font-display) !important; }
.swal2-html-container { color: var(--c-text-secondary) !important; }
.swal2-confirm { background: var(--c-accent) !important; color: #000 !important; border-radius: var(--radius-md) !important; font-family: var(--font-body) !important; }
.swal2-cancel { background: var(--c-surface-3) !important; color: var(--c-text-secondary) !important; border-radius: var(--radius-md) !important; border: 1px solid var(--c-border-subtle) !important; font-family: var(--font-body) !important; }

/* ═══════════════════════════════════════════════════════════════
   MAP PINS
   ═══════════════════════════════════════════════════════════════ */
.pin-wrap { position:relative; width:20px; height:20px; }
.pin-dot { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:12px; height:12px; border-radius:50%; border:2px solid rgba(0,0,0,0.55); }
.pin-ring { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:20px; height:20px; border-radius:50%; animation:pinPulse 1.8s ease-out infinite; opacity:0; }
@keyframes pinPulse { 0% { transform:translate(-50%,-50%) scale(.5); opacity:.9; } 100% { transform:translate(-50%,-50%) scale(2.2); opacity:0; } }
.pin--up .pin-dot { background:var(--c-success); }
.pin--up .pin-ring { border:2px solid var(--c-success); }
.pin--down .pin-dot { background:var(--c-danger); }
.pin--down .pin-ring { border:2px solid var(--c-danger); }
.pin--warning .pin-dot { background:var(--c-warning); }
.pin--warning .pin-ring { border:2px solid var(--c-warning); }
.pin--unknown .pin-dot { background:var(--c-text-muted); }
.pin--unknown .pin-ring { border:2px solid var(--c-text-muted); }

/* Leaflet dark overrides */
.leaflet-popup-content-wrapper { background:var(--c-surface-2)!important; border:1px solid var(--c-border)!important; border-radius:var(--radius-lg)!important; color:var(--c-text)!important; box-shadow:0 8px 32px rgba(0,0,0,.5)!important; }
.leaflet-popup-tip { background:var(--c-surface-2)!important; }
.leaflet-popup-content { margin:10px 14px!important; font-size:.8rem!important; font-family:var(--font-body)!important; }
.leaflet-bar a { background:var(--c-surface-3)!important; border-color:var(--c-border-subtle)!important; color:var(--c-text-secondary)!important; }
.leaflet-bar a:hover { background:var(--c-surface-hover)!important; color:var(--c-text)!important; }
.leaflet-control-attribution { background:rgba(0,0,0,0.7)!important; color:var(--c-text-faint)!important; font-size:.55rem!important; }
