/* ============================================
   SAVLINE UCP - Main Stylesheet
   Inspired by forum.savlinerp.com
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Source+Sans+3:wght@300;400;500;600&display=swap');

/* ── Variables ──────────────────────────────── */
:root {
  --bg-void:      #0d1117;
  --bg-deep:      #0e1219;
  --bg-surface:   #141c26;
  --bg-card:      #1a2232;
  --bg-hover:     #1e2a3d;
  --bg-input:     #111827;

  --header-bg:    #0d1520;
  --nav-bg:       #152035;
  --section-hdr:  #1e3a5f;
  --section-hdr2: #1a3356;
  --border:       #1e3050;
  --border-light: #253d60;

  --savline-blue:   #1a7bbf;
  --savline-blue2:  #2196d3;
  --savline-cyan:   #29b6e8;
  --savline-red:    #cc3333;
  --savline-gold:   #e8b84b;
  --savline-green:  #3aaa5c;
  --savline-orange: #e07b30;

  --text-primary:   #d8e0ec;
  --text-secondary: #8da0bb;
  --text-muted:     #4a6080;
  --text-link:      #29b6e8;
  --text-red:       #e05555;

  --sidebar-w: 220px;
  --header-h:  56px;
  --radius:    4px;
  --radius-sm: 2px;
  --radius-lg: 6px;

  --font-display: 'Oswald', sans-serif;
  --font-body:    'Source Sans 3', sans-serif;

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

/* ── Reset ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.5;
}
a { text-decoration: none; color: var(--text-link); transition: color .2s; }
a:hover { color: var(--savline-cyan); }
img { max-width: 100%; }
ul { list-style: none; }
input, textarea, select, button { font-family: inherit; }

/* ── Scrollbar ──────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--section-hdr); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--savline-blue); }

/* ============================================
   LOGIN PAGE
   ============================================ */

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

.login-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 50%, rgba(26,123,191,.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 30%, rgba(41,182,232,.05) 0%, transparent 55%);
}

.login-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,58,95,.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,58,95,.3) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

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

.savline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--section-hdr);
  border: 2px solid var(--savline-blue);
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 32px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--savline-cyan);
  text-shadow: 0 0 20px rgba(41,182,232,.4);
}

.login-logo h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--text-primary);
  text-transform: uppercase;
}
.login-logo h1 span { color: var(--savline-cyan); }
.login-logo p {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--savline-blue);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.login-card h2 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.text-gold { color: var(--savline-cyan); }

/* ── Form ────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.input-wrap { position: relative; }
.input-wrap i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
}
.input-wrap input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.input-wrap input:focus {
  border-color: var(--savline-blue);
  box-shadow: 0 0 0 2px rgba(26,123,191,.15);
}
.input-wrap input::placeholder { color: var(--text-muted); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Buttons ─────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s;
  text-decoration: none;
}
.btn-primary {
  width: 100%;
  background: var(--section-hdr);
  color: var(--text-primary);
  border-color: var(--savline-blue);
  margin-top: 8px;
}
.btn-primary:hover {
  background: var(--savline-blue);
  color: #fff;
  box-shadow: 0 0 12px rgba(26,123,191,.3);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-light); }
.btn-danger { background: rgba(204,51,51,.15); color: var(--text-red); border-color: rgba(204,51,51,.3); }
.btn-danger:hover { background: rgba(204,51,51,.25); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 10px; font-size: 11px; }

/* ── Alert ───────────────────────────────────── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 14px;
}
.alert-error { background: rgba(204,51,51,.12); border: 1px solid rgba(204,51,51,.3); color: #e07070; }
.alert-success { background: rgba(58,170,92,.12); border: 1px solid rgba(58,170,92,.3); color: #5ecf7e; }

/* ── Spinner ─────────────────────────────────── */
.spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.login-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.login-footer a { color: var(--savline-cyan); }
.login-footer a:hover { text-decoration: underline; }

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */

.layout {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  align-items: stretch;
}

/* ── Top Header ─────────────────────────────── */
.topbar {
  height: var(--header-h);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

.sidebar-toggle {
  background: none; border: none; color: var(--text-secondary);
  font-size: 18px; cursor: pointer; padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
}
.sidebar-toggle:hover { color: var(--text-primary); background: var(--bg-hover); }

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-s {
  width: 34px; height: 34px;
  background: var(--section-hdr);
  border: 1px solid var(--savline-blue);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
  color: var(--savline-cyan);
}
.logo-text {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-primary);
}
.logo-text span { color: var(--savline-cyan); }

.topbar-title { flex: 1; margin-left: 8px; }
.topbar-title h2 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-primary);
  line-height: 1;
}
.topbar-title p { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* Notif bell */
.notif-btn {
  position: relative; background: none; border: none;
  color: var(--text-secondary); font-size: 16px; cursor: pointer;
  padding: 7px 9px; border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
}
.notif-btn:hover { color: var(--text-primary); background: var(--bg-hover); }
.notif-badge {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--savline-red); border-radius: 50%;
  border: 1.5px solid var(--header-bg);
}

.topbar-user {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background .2s;
}
.topbar-user:hover { background: var(--bg-hover); }
.user-avatar-sm {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--section-hdr);
  border: 1px solid var(--savline-blue);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 600;
  color: var(--savline-cyan);
}
.topbar-username { font-size: 13px; color: var(--text-primary); font-weight: 500; }

/* ── Body wrapper ───────────────────────────── */
.body-wrap { display: flex; flex: 1; min-height: 0; }

/* ── Sidebar ────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--header-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width .25s ease, opacity .25s;
  overflow: hidden;
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
}
.sidebar.collapsed { width: 0; opacity: 0; pointer-events: none; }

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  width: 30px; height: 30px;
  background: var(--section-hdr);
  border: 1px solid var(--savline-blue);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700;
  color: var(--savline-cyan);
}
.logo-text { font-family: var(--font-display); font-size: 14px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-primary); }
.logo-text span { color: var(--savline-cyan); }

.sidebar-section { padding: 8px 0; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.sidebar-section:last-child { border-bottom: none; }
.sidebar-section-label {
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-muted); padding: 6px 16px 4px;
}

.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; cursor: pointer;
  color: var(--text-secondary); font-size: 13px;
  transition: all .15s; border: none; background: none;
  width: 100%; text-align: left; text-decoration: none;
  white-space: nowrap;
}
.sidebar-item i { width: 16px; text-align: center; font-size: 13px; flex-shrink: 0; }
.sidebar-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.sidebar-item.active {
  background: var(--section-hdr);
  color: var(--savline-cyan);
  border-left: 2px solid var(--savline-blue);
}

/* ── Main content ───────────────────────────── */
.main-content { flex: 1; overflow-y: auto; padding: 20px; min-width: 0; }

/* ── Section panels ─────────────────────────── */
.section-panel { display: none; }
.section-panel.active { display: block; }

/* ── Section header ─────────────────────────── */
.section-header {
  background: var(--section-hdr);
  border: 1px solid var(--border);
  border-left: 3px solid var(--savline-blue);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-primary);
}
.section-header p { font-size: 12px; color: var(--text-muted); margin-left: auto; }

/* ── Cards ───────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  background: var(--section-hdr);
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.card-header h3 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-primary);
}
.card-body { padding: 14px; }

/* ── Stat cards ──────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--savline-blue);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--savline-cyan);
  line-height: 1;
}
.stat-card .stat-label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-top: 5px; }

/* ── Server status card ──────────────────────── */
.server-status-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--savline-blue);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 16px;
}
.server-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.server-stats { display: flex; gap: 20px; flex-wrap: wrap; }
.server-stat { font-size: 12px; color: var(--text-muted); }
.server-stat span { color: var(--savline-cyan); font-weight: 600; }
.status-dot {
  display: inline-block; width: 7px; height: 7px;
  background: var(--savline-green); border-radius: 50%;
  margin-right: 5px; animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* ── Dashboard grid ──────────────────────────── */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 768px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* ── Profile card ────────────────────────────── */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.profile-card-header {
  background: var(--section-hdr);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: flex; align-items: center; gap: 8px;
}
.profile-card-body { padding: 16px; }
.profile-avatar-lg {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--section-hdr);
  border: 2px solid var(--savline-blue);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 24px; font-weight: 700;
  color: var(--savline-cyan);
  margin: 0 auto 12px;
}
.profile-username {
  text-align: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-primary);
}
.profile-role {
  text-align: center;
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  margin-top: 4px; margin-bottom: 14px;
}
.role-player  { color: var(--savline-cyan); }
.role-staff   { color: var(--savline-gold); }
.role-admin   { color: var(--savline-orange); }
.role-founder { color: var(--savline-red); }

.profile-info { display: grid; gap: 6px; }
.profile-info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.profile-info-row .pir-label { color: var(--text-muted); letter-spacing: .5px; text-transform: uppercase; font-size: 11px; }
.profile-info-row .pir-val { color: var(--text-primary); font-weight: 500; }

/* ── Tables ──────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  background: var(--section-hdr);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 500;
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); }

/* ── Badges ──────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 500;
}
.badge-blue   { background: rgba(26,123,191,.2);  color: var(--savline-cyan); border: 1px solid rgba(26,123,191,.3); }
.badge-red    { background: rgba(204,51,51,.2);   color: var(--text-red);     border: 1px solid rgba(204,51,51,.3); }
.badge-green  { background: rgba(58,170,92,.2);   color: var(--savline-green);border: 1px solid rgba(58,170,92,.3); }
.badge-gold   { background: rgba(232,184,75,.15); color: var(--savline-gold); border: 1px solid rgba(232,184,75,.25); }
.badge-gray   { background: rgba(74,96,128,.2);   color: var(--text-secondary);border: 1px solid rgba(74,96,128,.3); }
.badge-orange { background: rgba(224,123,48,.2);  color: var(--savline-orange);border: 1px solid rgba(224,123,48,.3); }

/* ── Character card ──────────────────────────── */
.char-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--savline-blue);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  transition: border-color .2s, background .2s;
}
.char-card:hover { background: var(--bg-hover); border-left-color: var(--savline-cyan); }
.char-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.char-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.char-meta-item { font-size: 12px; color: var(--text-muted); }
.char-meta-item span { color: var(--text-secondary); }

/* ── Vehicle card ────────────────────────────── */
.veh-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--savline-blue);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  transition: border-color .2s, background .2s;
}
.veh-card:hover { background: var(--bg-hover); border-left-color: var(--savline-cyan); }
.veh-plate {
  display: inline-block;
  background: var(--section-hdr);
  border: 1px solid var(--savline-blue);
  color: var(--savline-cyan);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.veh-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-muted); }
.veh-meta span { color: var(--text-secondary); }

/* ── Notification item ───────────────────────── */
.notif-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; gap: 10px; align-items: flex-start;
}
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: rgba(26,123,191,.06); }
.notif-dot { width: 7px; height: 7px; background: var(--savline-blue); border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.notif-text { font-size: 13px; color: var(--text-primary); }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Admin history ───────────────────────────── */
.history-item {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  display: flex; gap: 10px; align-items: center;
}
.history-item:last-child { border-bottom: none; }
.history-item:hover { background: var(--bg-hover); }

/* ── Loading / empty ─────────────────────────── */
.loading-msg { text-align: center; padding: 28px; color: var(--text-muted); font-size: 13px; }
.loading-msg .spinner { width: 20px; height: 20px; margin: 0 auto 10px; display: block; }
.empty-msg { text-align: center; padding: 28px; color: var(--text-muted); font-size: 13px; }
.empty-msg i { font-size: 24px; display: block; margin-bottom: 8px; opacity: .4; }

/* ── Notif dropdown ──────────────────────────── */
.notif-dropdown {
  position: absolute; top: calc(var(--header-h) + 4px); right: 12px;
  width: 300px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: none;
  max-height: 380px;
  overflow-y: auto;
}
.notif-dropdown.open { display: block; }
.notif-dropdown-hdr {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--section-hdr);
}
.notif-dropdown-hdr span {
  font-family: var(--font-display);
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-secondary);
}

/* ── Utility ─────────────────────────────────── */
.text-red    { color: var(--text-red) !important; }
.text-green  { color: var(--savline-green) !important; }
.text-gold   { color: var(--savline-gold) !important; }
.text-blue   { color: var(--savline-cyan) !important; }
.text-muted  { color: var(--text-muted) !important; }
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8 { gap: 8px; }

/* ── Warn dots ───────────────────────────────── */
.warn-dots { display: flex; gap: 4px; }
.warn-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border);
  border: 1px solid var(--border-light);
}
.warn-dot.active { background: var(--savline-red); border-color: var(--savline-red); }

/* ── Adminjail banner ────────────────────────── */
.jail-banner {
  background: rgba(204,51,51,.12);
  border: 1px solid rgba(204,51,51,.3);
  border-left: 3px solid var(--savline-red);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #e07070;
}

/* ── HP / Fuel bars ──────────────────────────── */
.progress-bar-wrap { background: var(--bg-surface); border-radius: 2px; height: 5px; overflow: hidden; width: 80px; }
.progress-bar-fill { height: 100%; border-radius: 2px; background: var(--savline-blue); transition: width .3s; }
.progress-bar-fill.hp   { background: var(--savline-green); }
.progress-bar-fill.fuel { background: var(--savline-gold); }
.progress-bar-fill.low  { background: var(--savline-red); }

/* ── Topbar extras (dashboard specific) ─────── */
.flex-center { display: flex; align-items: center; }
.gap-2 { gap: 8px; }

.hamburger {
  display: flex; flex-direction: column; gap: 4px;
  cursor: pointer; padding: 4px 6px; border: none; background: none;
}
.hamburger span {
  display: block; width: 18px; height: 2px;
  background: var(--text-secondary); border-radius: 1px;
  transition: background .2s;
}
.hamburger:hover span { background: var(--text-primary); }

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

.server-status-dot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.status-dot.online  { background: var(--savline-green); animation: pulse 2s infinite; }
.status-dot.offline { background: var(--text-muted); }

.topbar-notif {
  position: relative; cursor: pointer;
  color: var(--text-secondary); font-size: 16px;
  padding: 6px 8px; border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
}
.topbar-notif:hover { color: var(--text-primary); background: var(--bg-hover); }
.notif-count {
  position: absolute; top: 2px; right: 2px;
  background: var(--savline-red);
  color: #fff; font-size: 9px; font-weight: 700;
  width: 14px; height: 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--header-bg);
}

/* ── Sidebar profile ─────────────────────────── */
.sidebar-profile {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.profile-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--section-hdr);
  border: 1px solid var(--savline-blue);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700;
  color: var(--savline-cyan);
  flex-shrink: 0;
}
.sidebar-profile .profile-info { min-width: 0; }
.sidebar-profile .profile-name {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-profile .profile-role-text {
  font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-muted); margin-top: 1px;
}

/* ── Page title (dynamic via JS) ─────────────── */
#page-title { font-family: var(--font-display); font-size: 14px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; }
#page-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* ============================================
   MISSING CLASSES PATCH — dashboard.php sync
   ============================================ */

/* ── Layout: main wrapper (patch - overrides above) ── */
/* layout is already fixed as flex-row in main section */

/* ── Sidebar nav ────────────────────────────── */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.sidebar-coins {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-coins i { color: var(--savline-gold); }

.nav-section {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 16px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
  transition: all .15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}
.nav-item i { width: 16px; text-align: center; font-size: 13px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active {
  background: var(--section-hdr);
  color: var(--savline-cyan);
  border-left: 2px solid var(--savline-blue);
}

.nav-badge {
  margin-left: auto;
  background: var(--savline-blue);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}
.nav-badge.red { background: var(--savline-red); }

/* ── Profile badge ──────────────────────────── */
.profile-badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: var(--section-hdr);
  color: var(--text-secondary);
}
.badge-admin   { background: rgba(204,51,51,.25);  color: var(--savline-red); }
.badge-staff   { background: rgba(26,123,191,.25); color: var(--savline-cyan); }
.badge-player  { background: var(--section-hdr);  color: var(--text-muted); }

/* ── Main area ──────────────────────────────── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  background: var(--bg-void);
}

/* ── Topbar extras ──────────────────────────── */
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.server-status-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.server-status-text { font-size: 12px; }

.topbar-notif {
  position: relative;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 16px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
}
.topbar-notif:hover { color: var(--text-primary); background: var(--bg-hover); }

.notif-count {
  position: absolute;
  top: 2px; right: 2px;
  background: var(--savline-red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  width: 14px; height: 14px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--header-bg);
}

/* ── Hamburger ──────────────────────────────── */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: background .2s;
}
.hamburger:hover { background: var(--bg-hover); }
.hamburger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: background .2s;
}
.hamburger:hover span { background: var(--text-primary); }

/* ── Notification panel ─────────────────────── */
.notif-panel {
  position: fixed;
  top: var(--header-h);
  right: 0;
  width: 340px;
  max-height: calc(100vh - var(--header-h));
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  z-index: 200;
  overflow-y: auto;
  display: none;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.notif-panel.open { display: flex; }

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.notif-header h4 { font-size: 13px; font-weight: 600; color: var(--text-primary); }

/* ── Page content ───────────────────────────── */
.page-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.page-section { display: none; }
.page-section.active { display: block; }

/* ── Stats grid ─────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  text-align: center;
}

.stat-label {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.stat-value.gold   { color: var(--savline-gold); }
.stat-value.orange { color: var(--savline-orange); }
.stat-value.red    { color: var(--savline-red); }
.stat-value.green  { color: var(--savline-green); }

/* ── Server info card ───────────────────────── */
.server-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.server-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-primary);
}

/* Players bar */
.players-bar {
  height: 4px;
  background: var(--bg-hover);
  border-radius: 2px;
  overflow: hidden;
}
.players-bar-fill {
  height: 100%;
  background: var(--savline-blue);
  border-radius: 2px;
  transition: width .4s ease;
}

/* ── Dashboard grid ─────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ── Card ───────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--section-hdr);
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.card-header h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-display);
  letter-spacing: .5px;
}

.card-body { padding: 14px 16px; }

/* ── Alert ──────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
}
.alert-error {
  background: rgba(204,51,51,.12);
  border-color: rgba(204,51,51,.4);
  color: var(--text-red);
}

/* ── Tabs ───────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  padding: 8px 14px;
  margin-bottom: -1px;
  transition: color .2s, border-color .2s;
  font-family: inherit;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active {
  color: var(--savline-cyan);
  border-bottom-color: var(--savline-cyan);
}

/* ── Data table ─────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  background: var(--section-hdr);
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); color: var(--text-primary); }

/* ── Record header ──────────────────────────── */
.record-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.record-header-left h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}
.record-header-left p { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.record-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.record-stat { text-align: center; }
.record-stat-label {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.record-stat-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}
.record-stat-value.gold   { color: var(--savline-gold); }
.record-stat-value.red    { color: var(--savline-red); }
.record-stat-value.orange { color: var(--savline-orange); }

/* ── Loading / empty states ─────────────────── */
.loading-state, .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 13px;
  gap: 10px;
}

.spinner {
  width: 22px; height: 22px;
  border: 2px solid var(--border);
  border-top-color: var(--savline-cyan);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utility classes ────────────────────────── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mb-4 { margin-bottom: 16px; }

/* ── Text color helpers ─────────────────────── */
.text-green  { color: var(--savline-green) !important; }
.text-red    { color: var(--savline-red) !important; }
.text-gold   { color: var(--savline-gold) !important; }
.text-muted  { color: var(--text-muted) !important; }
.text-orange { color: var(--savline-orange) !important; }

/* ── Status dot ─────────────────────────────── */
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.online  { background: var(--savline-green); animation: pulse 2s infinite; }
.status-dot.offline { background: var(--text-muted); }
@keyframes pulse {
  0%,100% { opacity: 1; }
  50% { opacity: .4; }
}

/* ── Toast container ────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Btn helpers ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
  text-decoration: none;
  font-family: inherit;
  line-height: 1;
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}
.btn-ghost:hover { border-color: var(--savline-blue); color: var(--text-primary); background: var(--bg-hover); }
.btn-sm  { padding: 5px 10px; font-size: 12px; }
.btn-xs  { padding: 3px 8px;  font-size: 11px; }


.forgot {
  color: var(--text-primary);
}
.forgot:hover {
  color: var(--text-link);
}

/* ============================================
   CHARACTER & VEHICLE CARDS — Grid version
   ============================================ */

.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.character-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--savline-blue);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s, transform .15s, box-shadow .2s;
  position: relative;
}
.character-card:hover {
  border-top-color: var(--savline-cyan);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.character-card.online { border-top-color: var(--savline-green); }

.char-card-header {
  background: var(--section-hdr);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.char-avatar-circle {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--savline-blue), var(--savline-cyan));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  border: 2px solid rgba(41,182,232,.3);
}
.char-card-header .char-name {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  letter-spacing: .5px;
  color: var(--text-primary);
  line-height: 1.2;
}
.char-card-header .char-faction {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}
.char-online-badge {
  position: absolute; top: 10px; right: 12px;
  background: var(--savline-green);
  color: #fff;
  font-size: 9px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
}

.char-card-stats {
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.char-stat-item {
  display: flex; flex-direction: column; gap: 2px;
}
.char-stat-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: .8px; color: var(--text-muted);
}
.char-stat-value {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  color: var(--text-primary);
}
.char-stat-value.gold { color: var(--savline-gold); }
.char-stat-value.green { color: var(--savline-green); }

.char-card-licenses {
  padding: 8px 16px 12px;
  display: flex; flex-wrap: wrap; gap: 5px;
  border-top: 1px solid var(--border);
}
.license-badge {
  background: rgba(26,123,191,.15);
  border: 1px solid rgba(26,123,191,.3);
  color: var(--savline-cyan);
  font-size: 10px; font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.license-badge.red {
  background: rgba(204,51,51,.15);
  border-color: rgba(204,51,51,.3);
  color: var(--savline-red);
}

/* ── Vehicle cards ───────────────────────────── */

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.vehicle-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--savline-blue);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s, transform .15s, box-shadow .2s;
}
.vehicle-card:hover {
  border-left-color: var(--savline-cyan);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.vehicle-card.stolen { border-left-color: var(--savline-red); }

.veh-card-inner { padding: 14px 16px; }

.veh-card-top {
  display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: 10px;
}
.veh-card-name {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}
.veh-card-year {
  font-size: 11px; color: var(--text-muted);
  margin-top: 2px;
}
.veh-plate-badge {
  background: var(--bg-deep);
  border: 1px solid var(--savline-blue);
  color: var(--savline-cyan);
  font-family: var(--font-display);
  font-size: 12px; font-weight: 700;
  letter-spacing: 2px;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.veh-fuel-bar {
  height: 3px;
  background: var(--bg-hover);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
}
.veh-fuel-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .4s;
}

.veh-card-meta {
  display: flex; flex-wrap: wrap;
  gap: 10px; font-size: 11px;
  color: var(--text-muted);
}
.veh-card-meta span { color: var(--text-secondary); }

.veh-status-badge {
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .5px;
}
.veh-status-badge.stolen {
  background: rgba(204,51,51,.2);
  color: var(--savline-red);
  border: 1px solid rgba(204,51,51,.3);
}
.veh-status-badge.locked {
  background: rgba(26,123,191,.15);
  color: var(--savline-cyan);
  border: 1px solid rgba(26,123,191,.3);
}
.veh-status-badge.unlocked {
  background: rgba(58,170,92,.15);
  color: var(--savline-green);
  border: 1px solid rgba(58,170,92,.3);
}

/* ============================================
   MODAL
   ============================================ */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
  z-index: 800;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal-backdrop.open {
  opacity: 1; pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(.97);
  transition: transform .2s;
}
.modal-backdrop.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--section-hdr);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 2;
}
.modal-header h3 {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 600;
  letter-spacing: .5px;
  color: var(--text-primary);
}
.modal-close {
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer; font-size: 16px;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  transition: color .15s, background .15s;
}
.modal-close:hover { color: var(--text-primary); background: var(--bg-hover); }

.modal-body { padding: 18px; }

.modal-section {
  margin-bottom: 18px;
}
.modal-section:last-child { margin-bottom: 0; }
.modal-section-title {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--savline-blue);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px; margin-bottom: 10px;
}

.modal-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.modal-info-item { display: flex; flex-direction: column; gap: 2px; }
.modal-info-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: .8px; color: var(--text-muted);
}
.modal-info-value {
  font-size: 13px; color: var(--text-primary);
  font-weight: 500;
}
.modal-info-value.gold { color: var(--savline-gold); }
.modal-info-value.green { color: var(--savline-green); }
.modal-info-value.red { color: var(--savline-red); }
.modal-info-value.cyan { color: var(--savline-cyan); }

.modal-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--savline-blue), var(--savline-cyan));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700; color: #fff;
  border: 3px solid rgba(41,182,232,.25);
  margin: 0 auto 14px;
}

.modal-char-name {
  text-align: center;
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.modal-char-sub {
  text-align: center;
  font-size: 12px; color: var(--text-muted);
  margin-bottom: 16px;
}

/* Dashboard quick-cards row */
.dash-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 600px) {
  .dash-cards-row { grid-template-columns: 1fr; }
  .modal-info-grid { grid-template-columns: 1fr; }
}

.dash-quick-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  display: flex; align-items: center; gap: 10px;
}
.dash-quick-card:hover {
  border-color: var(--savline-blue);
  background: var(--bg-hover);
}
.dash-quick-card .dqc-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  background: var(--section-hdr);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--savline-cyan);
  flex-shrink: 0;
}
.dash-quick-card .dqc-text { flex: 1; min-width: 0; }
.dash-quick-card .dqc-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: .8px; color: var(--text-muted);
}
.dash-quick-card .dqc-value {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}
.dash-quick-card .dqc-arrow {
  color: var(--text-muted);
  font-size: 11px;
  flex-shrink: 0;
}

/* online-dot for active char */
.online-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--savline-green);
  border-radius: 50%;
  margin-right: 5px;
  animation: pulse 2s infinite;
}
