/* =====================================================
   KIKISKOTRADING PANEL — DARK GOLD UI
   FULL REWRITE A → Z
   ===================================================== */

/* =====================
   VARIABLES
===================== */
:root {
  --bg-body: #050509;
  --bg-gradient: radial-gradient(circle at top, #1c1220 0%, #06040a 40%, #020106 100%);
  --bg-card: rgba(10, 8, 16, 0.95);
  --bg-card-2: rgba(18, 14, 30, 0.98);
  --bg-input: rgba(8, 6, 14, 0.95);

  --gold: #f5c542;
  --accent: #4da3ff;
  --profit: #2ecc71;
  --loss: #e74c3c;

  --text-main: #f8f8ff;
  --text-muted: #a29ab8;
  --text-soft: #77708f;

  --border: rgba(255,255,255,0.08);
  --border-soft: rgba(255,255,255,0.05);

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;

  --shadow-soft: 0 16px 40px rgba(0,0,0,0.6);

  --transition-fast: 0.18s ease;
}

/* =====================
   RESET GLOBAL
===================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-gradient);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Variables complémentaires v5 ── */
:root {
  --gold-dim:    rgba(245, 197, 66, 0.15);
  --gold-border: rgba(245, 197, 66, 0.35);
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --radius-pill: 999px;
  --shadow-card: 0 8px 24px rgba(0,0,0,0.4);
  --transition-fast: 0.18s ease;
  --transition-med: 0.3s ease;
  --danger:   #ff1744;
  --online:   #00ff9c;
  --warn:     #f5a623;
  --text-soft: #77708f;
}

/* =====================
   RESET GLOBAL
===================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-gradient);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* =====================
   PAGE LOGIN
===================== */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-container {
  max-width: 420px;
  width: 100%;
}

.auth-card {
  background: radial-gradient(circle at top left, #261825 0%, #0a0710 40%, #040309 100%);
  border-radius: 26px;
  padding: 28px 26px 26px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(245, 197, 66, 0.35);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0% 0%, rgba(245, 197, 66, 0.18), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(255, 123, 84, 0.18), transparent 55%);
  opacity: 0.9;
  mix-blend-mode: screen;
  pointer-events: none;
}

.auth-card > * { position: relative; z-index: 1; }

.logo-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 4px;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 18px;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-form label {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-bottom: 2px;
}

.auth-form input {
  background: rgba(4, 3, 10, 0.9);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
  color: var(--text-main);
  outline: none;
  font-size: 0.95rem;
  width: 100%;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.auth-form input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(245, 197, 66, 0.4);
}

.auth-form button {
  background: linear-gradient(135deg, var(--gold), #ff8c5a);
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px;
  color: #050308;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.auth-form button:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.alert-warning {
  background: rgba(220,53,69,0.12);
  border: 1px solid rgba(220,53,69,0.45);
  color: #e05a68;
  padding: 12px 16px;
  border-radius: 14px;
  margin-bottom: 14px;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =====================
   DASHBOARD LAYOUT
   sidebar fixe gauche + main scrollable droite
===================== */
body:not(.auth-body) {
  flex-direction: row;
  overflow: hidden;
}

/* ── SIDEBAR ── */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  height: 100vh;
  background: rgba(255,255,255,0.025);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.sidebar-logo svg {
  flex-shrink: 0;
}

.version-badge {
  margin-left: auto;
  font-size: .62rem;
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  font-weight: 700;
}

/* ── NAV ── */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 99px; }

.nav-section {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 10px 6px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: .82rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  user-select: none;
  position: relative;
}

.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
}

.nav-item.active {
  background: rgba(245,197,66,0.13);
  color: var(--gold);
}

.nav-item svg {
  flex-shrink: 0;
  opacity: .7;
}

.nav-item.active svg { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--loss);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  min-width: 18px;
  text-align: center;
}

.nav-badge-gold {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid var(--gold-border);
}

.nav-badge-red {
  background: var(--danger);
  color: #fff;
}

/* ── SIDEBAR FOOTER ── */
.sidebar-footer {
  flex-shrink: 0;
  padding: 10px 12px 14px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.current-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: .75rem;
  color: var(--text-soft);
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
}

.current-user svg { flex-shrink: 0; }

.current-user span:nth-child(2) {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}

.logout-link {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .78rem;
  color: var(--text-soft);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 400;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.logout-link:hover {
  color: var(--loss);
  background: rgba(231,76,60,0.08);
}

.logout-link svg { flex-shrink: 0; }

/* ── MAIN ZONE ── */
.main {
  flex: 1;
  min-width: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── TOPBAR ── */
.topbar {
  height: 54px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: linear-gradient(90deg, rgba(6,5,12,0.97), rgba(16,12,28,0.97));
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(16px);
}

.topbar h1 {
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--text-main);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .8rem;
  color: var(--text-soft);
}

/* ── CONTENT AREA ── */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px 60px;
  position: relative;
}

.content::-webkit-scrollbar { width: 4px; }
.content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 99px; }

/* ── PAGES ── */
.page { display: none; }
.page.active { display: block; }

/* =====================
   INPUTS / FORMS globals
===================== */
input, select, textarea {
  background: rgba(8, 6, 14, 0.95);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 9px 12px;
  border-radius: var(--radius-md);
  outline: none;
  font-size: .85rem;
  font-family: inherit;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(245,197,66,0.5);
  box-shadow: 0 0 0 2px rgba(245,197,66,0.12);
}

/* =====================
   BUTTONS
===================== */
button {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 9px 16px;
  background: linear-gradient(135deg, var(--gold), #ff8c5a);
  color: #050308;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

button:hover { opacity: .9; }

a {
  text-decoration: none;
  color: inherit;
}

/* Button variants */
.btn { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-family: inherit; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #ff8c5a);
  color: #050308;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: none;
}

.btn-ghost {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-weight: 500;
}

.btn-ghost:hover {
  border-color: rgba(245,197,66,0.4);
  color: var(--gold);
  background: var(--gold-dim);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #ff5252);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
}

.btn-success {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
}

.btn-sm  { padding: 6px 12px; font-size: .78rem; }
.btn-xs  { padding: 4px 9px;  font-size: .72rem; border-radius: var(--radius-sm); }

/* =====================
   CARDS / PANELS
===================== */
.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-title-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .03em;
  display: flex;
  align-items: center;
  gap: 7px;
  text-transform: uppercase;
}

/* =====================
   KPI GRID
===================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
}

.kpi-label {
  font-size: .72rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.kpi-sub {
  font-size: .7rem;
  color: var(--text-soft);
}

.kv-red    { color: var(--loss); }
.kv-green  { color: var(--profit); }
.kv-gold   { color: var(--gold); }
.kv-blue   { color: var(--accent); }
.kv-warn   { color: var(--warn); }

/* =====================
   TABLES
===================== */
.table-wrap {
  overflow-x: auto;
}

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

th {
  background: rgba(18, 14, 30, 0.98);
  color: var(--text-soft);
  font-size: .68rem;
  font-weight: 700;
  padding: 10px 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  text-align: left;
}

td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-soft);
  font-size: .8rem;
  color: var(--text-muted);
}

tr:hover td {
  background: rgba(255,255,255,0.025);
}

/* =====================
   BADGES
===================== */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .03em;
  border: 1px solid transparent;
}

.badge-red    { color: var(--loss);   background: rgba(231,76,60,.14);   border-color: rgba(231,76,60,.25); }
.badge-green  { color: var(--profit); background: rgba(46,204,113,.14);  border-color: rgba(46,204,113,.25); }
.badge-gold   { color: var(--gold);   background: var(--gold-dim);       border-color: var(--gold-border); }
.badge-blue   { color: var(--accent); background: rgba(77,163,255,.12);  border-color: rgba(77,163,255,.25); }
.badge-warn   { color: var(--warn);   background: rgba(245,166,35,.12);  border-color: rgba(245,166,35,.25); }
.badge-muted  { color: var(--text-soft); background: rgba(255,255,255,.05); border-color: var(--border); }
.badge-purple { color: #b87de8;       background: rgba(184,125,232,.12); border-color: rgba(184,125,232,.25); }

/* =====================
   TOGGLE SWITCH
===================== */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--text-soft);
  border-radius: 50%;
  left: 2px;
  top: 2px;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
  background: rgba(245,197,66,0.2);
  border-color: var(--gold-border);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: var(--gold);
}

/* =====================
   SECTION HEADER
===================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* =====================
   FILTER PILLS
===================== */
.filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.filter-pill {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-soft);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-pill:hover {
  border-color: rgba(245,197,66,0.4);
  color: var(--gold);
}

.filter-pill.active {
  background: var(--gold-dim);
  border-color: var(--gold-border);
  color: var(--gold);
}

/* =====================
   FORM ROWS / GROUPS
===================== */
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 140px;
}

.form-group label {
  font-size: .72rem;
  color: var(--text-soft);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--text-muted);
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: auto;
  accent-color: var(--gold);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* =====================
   SETTINGS PAGE
===================== */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
  gap: 12px;
}

.setting-row:last-child { border-bottom: none; }

.setting-label {
  font-size: .8rem;
  color: var(--text-muted);
  flex: 1;
}

.setting-value {
  width: 100px !important;
  min-width: 0;
  text-align: right;
  flex-shrink: 0;
  padding: 5px 8px;
  font-size: .82rem;
}

/* =====================
   MINI CHART
===================== */
.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 68px;
  padding: 4px 0 0;
}

.bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
  min-width: 4px;
}

.bar {
  width: 100%;
  border-radius: 2px 2px 0 0;
  min-height: 2px;
}

.bar.clean  { background: var(--accent); opacity: .7; }
.bar.threat { background: var(--loss); }

/* =====================
   BREAKDOWN BARS
===================== */
.breakdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.breakdown-label {
  font-size: .72rem;
  color: var(--text-soft);
  width: 80px;
  flex-shrink: 0;
  font-family: monospace;
}

.breakdown-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}

.breakdown-bar {
  height: 100%;
  border-radius: 99px;
  transition: width .4s ease;
}

.breakdown-count {
  font-size: .72rem;
  color: var(--text-muted);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}

/* =====================
   STATS GRIDS
===================== */
.stats-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

/* =====================
   MAINTENANCE BANNER
===================== */
.maintenance-banner {
  background: rgba(245,166,35,0.1);
  border: 1px solid rgba(245,166,35,0.35);
  color: var(--warn);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: .82rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

/* =====================
   TOAST NOTIFICATIONS
===================== */
#alert-box {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 10000;
}

.toast {
  display: none;
  background: rgba(10,8,20,0.97);
  border: 1px solid rgba(46,204,113,0.5);
  color: var(--profit);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: .82rem;
  font-weight: 600;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
  animation: slideIn .2s ease;
}

.toast.error {
  border-color: rgba(231,76,60,0.5);
  color: var(--loss);
}

@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* =====================
   MODALS
===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 99999;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: linear-gradient(145deg, rgba(20,14,30,0.98), rgba(8,6,15,0.98));
  border: 1px solid rgba(245,197,66,0.4);
  border-radius: 22px;
  padding: 26px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.8);
  transform: scale(0.93);
  transition: transform .25s ease;
}

.modal-overlay.open .modal-card {
  transform: scale(1);
}

.modal-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.modal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* =====================
   ROLE BADGES
===================== */
.role-badge {
  font-size: .6rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: .06em;
  border: 1px solid;
  flex-shrink: 0;
}

.role-superadmin, .role-badge-inline.role-superadmin {
  color: var(--gold);
  background: var(--gold-dim);
  border-color: var(--gold-border);
}

.role-admin, .role-badge-inline.role-admin {
  color: var(--accent);
  background: rgba(77,163,255,.12);
  border-color: rgba(77,163,255,.3);
}

.role-viewer, .role-badge-inline.role-viewer {
  color: var(--text-muted);
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.1);
}

.role-badge-inline {
  font-size: .66rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid;
}

/* =====================
   ICON HELPERS
===================== */
.nav-item svg,
.btn svg,
.card-title-label svg,
.section-title svg,
.modal-title svg,
.logout-link svg,
.current-user svg,
.maintenance-banner svg {
  flex-shrink: 0;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.btn svg { margin-right: 1px; }

/* =====================
   USER MODAL SITES LIST
===================== */
#modal-user-sites {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#modal-user-sites .form-check {
  padding: 6px 10px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: background var(--transition-fast);
  min-width: 160px;
}

#modal-user-sites .form-check:hover {
  background: var(--gold-dim);
  border-color: var(--gold-border);
}

#modal-user-sites .form-check input {
  width: auto;
  accent-color: var(--gold);
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 900px) {
  .sidebar { width: 56px; }
  .sidebar-logo span:not(.version-badge) { display: none; }
  .nav-item { justify-content: center; padding: 10px; }
  .nav-item span { display: none; }
  .nav-section { display: none; }
  .sidebar-footer .current-user span { display: none; }
  .logout-link span { display: none; }
  .version-badge { display: none; }
}

@media (max-width: 600px) {
  .sidebar { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid-2 { grid-template-columns: 1fr; }
}
