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

/* ══ RESET & VARS ══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #0b0e1a;
  --bg2:     #111527;
  --bg3:     #181d32;
  --bg4:     #1e2540;
  --border:  rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.14);
  --text:    #e8ecf8;
  --muted:   #6b7494;
  --muted2:  #8890b0;
  --accent:  #f5a623;
  --green:   #2ecc7a;
  --blue:    #4e8eff;
  --red:     #ff4d6a;
  --purple:  #a78bfa;
  --orange:  #ff8c42;
  --font:    'Inter', sans-serif;
  --mono:    'JetBrains Mono', monospace;
  --sidebar-w:   214px;
  --topbar-h:    52px;
  --mobile-nav-h:58px;
  --radius:  10px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  overflow: hidden;
}

/* ══ LOGIN ══ */
.login-screen {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 600; padding: 16px;
}
.login-box {
  width: 100%; max-width: 400px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 18px;
  padding: 30px 26px;
}
.login-logo {
  font-family: var(--mono); font-size: 14px; font-weight: 600;
  color: var(--accent); letter-spacing: 1px; margin-bottom: 4px;
}
.login-sub { font-size: 12px; color: var(--muted); margin-bottom: 22px; }
.f-label { font-size: 11px; color: var(--muted); font-weight: 500; display: block; margin-bottom: 4px; }
.f-input {
  width: 100%; background: var(--bg3); border: 1px solid var(--border2);
  color: var(--text); padding: 10px 12px; border-radius: 8px;
  font-family: var(--font); font-size: 13px; margin-bottom: 12px;
  transition: border-color .2s;
}
.f-input:focus { outline: none; border-color: var(--accent); }
.login-err { color: var(--red); font-size: 11px; margin-top: -6px; margin-bottom: 10px; display: none; }
.login-btn {
  width: 100%; padding: 11px; background: var(--accent); color: #0b0e1a;
  border: none; border-radius: 9px; font-family: var(--font); font-size: 13px;
  font-weight: 700; cursor: pointer; transition: background .15s; margin-top: 4px;
}
.login-btn:hover { background: #e8961a; }
.hint-box { margin-top: 16px; background: var(--bg3); border-radius: 10px; padding: 12px; }
.hint-ttl { font-size: 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.hint-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 11px; color: var(--muted2); border-bottom: 1px solid var(--border); }
.hint-row:last-child { border-bottom: none; }

/* ══ APP LAYOUT ══ */
.app { display: none; height: 100vh; overflow: hidden; position: relative; }

/* ── SIDEBAR ── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w); background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 100;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.6); z-index: 99;
}
.sidebar-overlay.open { display: block; }

.sidebar-logo { padding: 14px 14px 12px; border-bottom: 1px solid var(--border); }
.logo-name { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: 1px; }
.logo-sub { font-size: 10px; color: var(--muted); margin-top: 2px; }

.user-bar {
  padding: 9px 12px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.u-av {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.u-info { flex: 1; min-width: 0; }
.u-name { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-chip { font-size: 9px; font-family: var(--mono); padding: 1px 5px; border-radius: 10px; display: inline-block; margin-top: 2px; }
.logout-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 15px; padding: 2px; flex-shrink: 0; transition: color .15s; }
.logout-btn:hover { color: var(--red); }

.nav { padding: 6px 0; flex: 1; overflow-y: auto; }
.nav::-webkit-scrollbar { width: 3px; }
.nav::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }
.nav-group {
  padding: 9px 14px 3px; font-size: 9px; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: 1px;
}
.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; cursor: pointer; color: var(--muted2);
  font-size: 12px; font-weight: 500; border-left: 2px solid transparent;
  transition: all .15s; user-select: none;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.03); }
.nav-item.active { color: var(--text); border-left-color: var(--accent); background: rgba(245,166,35,.07); }
.nav-item.locked { color: var(--muted); opacity: .4; cursor: not-allowed; }
.nav-item.locked:hover { background: none; }
.ndot { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); flex-shrink: 0; transition: background .15s; }
.nav-item.active .ndot { background: var(--accent); }
.nav-badge { margin-left: auto; background: var(--red); color: #fff; font-size: 9px; padding: 1px 5px; border-radius: 8px; font-family: var(--mono); }
.nav-lock { margin-left: auto; font-size: 10px; opacity: .5; }

.sidebar-foot { padding: 10px 14px; border-top: 1px solid var(--border); }
.foot-label { font-size: 10px; color: var(--muted); }
.sb-bar { height: 3px; background: var(--bg4); border-radius: 3px; overflow: hidden; margin: 4px 0 3px; }
.sb-fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--accent)); width: 72%; }
.foot-val { font-size: 10px; color: var(--muted2); }

/* ── MAIN ── */
.main { margin-left: var(--sidebar-w); display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

.topbar {
  height: var(--topbar-h); padding: 0 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg); flex-shrink: 0; gap: 8px;
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 20px; cursor: pointer; padding: 4px; line-height: 1; }
.pg-title { font-size: 14px; font-weight: 600; }
.pg-sub { font-size: 10px; color: var(--muted); margin-top: 1px; }
.topbar-right { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

.content { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.content::-webkit-scrollbar { width: 4px; }
.content::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 4px; }

/* ══ MOBILE NAV ══ */
.mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--mobile-nav-h); background: var(--bg2);
  border-top: 1px solid var(--border); z-index: 200;
  display: none; grid-template-columns: repeat(5, 1fr);
}
.mn-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; cursor: pointer; color: var(--muted); transition: color .15s; padding: 6px 0;
  position: relative;
}
.mn-item.active { color: var(--accent); }
.mn-icon { font-size: 18px; line-height: 1; }
.mn-label { font-size: 9px; font-weight: 500; }
.mn-badge {
  position: absolute; top: 6px; right: calc(50% - 16px);
  background: var(--red); color: #fff; font-size: 8px;
  padding: 1px 4px; border-radius: 8px; font-family: var(--mono);
}

/* ══ BUTTONS ══ */
.btn {
  padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border2);
  background: var(--bg3); color: var(--text); font-family: var(--font);
  font-size: 11px; font-weight: 500; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.btn:hover { background: var(--bg4); }
.btn-accent { background: var(--accent); color: #0b0e1a; border-color: var(--accent); font-weight: 600; }
.btn-accent:hover { background: #e8961a; }
.btn-green  { background: var(--green);  color: #0b0e1a; border-color: var(--green);  font-weight: 600; }
.btn-red    { background: var(--red);    color: #fff;    border-color: var(--red);    font-weight: 600; }
.btn-purple { background: var(--purple); color: #0b0e1a; border-color: var(--purple); font-weight: 600; }
.btn-blue   { background: var(--blue);   color: #fff;    border-color: var(--blue);   font-weight: 600; }
.btn-orange { background: var(--orange,#f5a623); color: #0b0e1a; border-color: var(--orange,#f5a623); font-weight: 600; }
.b-orange   { background: #f5a62322; color: #f5a623; border-color: #f5a62344; }
.b-gray     { background: #88888822; color: #888;    border-color: #88888844; }
.b-purple   { background: var(--purple,#a78bfa)22; color: var(--purple,#a78bfa); border-color: var(--purple,#a78bfa)44; }
.btn-orange { background: var(--orange); color: #0b0e1a; border-color: var(--orange); font-weight: 600; }
.btn-sm { padding: 4px 9px; font-size: 10px; border-radius: 5px; }

/* ══ KPIs ══ */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kpi {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
  position: relative; overflow: hidden; cursor: default;
}
.kpi-accent  { border-top: 2px solid var(--accent); }
.kpi-green   { border-top: 2px solid var(--green);  }
.kpi-blue    { border-top: 2px solid var(--blue);   }
.kpi-red     { border-top: 2px solid var(--red);    }
.kpi-purple  { border-top: 2px solid var(--purple); }
.kpi-orange  { border-top: 2px solid var(--orange); }
.kpi-label   { font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.kpi-val     { font-family: var(--mono); font-size: 22px; font-weight: 600; margin: 5px 0 3px; line-height: 1.1; }
.kpi-delta   { font-size: 10px; color: var(--muted); }
.up   { color: var(--green);  }
.dn   { color: var(--red);    }
.warn { color: var(--accent); }

/* ══ CARDS ══ */
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; gap: 8px; }
.card-title  { font-size: 12px; font-weight: 600; }
.card-sub    { font-size: 10px; color: var(--muted); margin-top: 1px; }

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

/* ══ TABLES ══ */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 460px; }
th {
  padding: 7px 10px; text-align: left; font-size: 10px; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: .4px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
td { padding: 8px 10px; font-size: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.015); }

/* ══ BADGES ══ */
.badge { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 10px; font-weight: 600; font-family: var(--mono); }
.b-ok     { background: rgba(46,204,122,.12);  color: var(--green);  }
.b-warn   { background: rgba(245,166,35,.12);  color: var(--accent); }
.b-red    { background: rgba(255,77,106,.12);  color: var(--red);    }
.b-blue   { background: rgba(78,142,255,.12);  color: var(--blue);   }
.b-purple { background: rgba(167,139,250,.12); color: var(--purple); }
.b-orange { background: rgba(255,140,66,.15);  color: var(--orange); }
.b-gray   { background: rgba(255,255,255,.06); color: var(--muted2); }

/* ══ PERM BADGES ══ */
.pb { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 4px; font-size: 10px; font-weight: 600; font-family: var(--mono); white-space: nowrap; }
.pb-0 { background: rgba(255,255,255,.05); color: var(--muted);  }
.pb-1 { background: rgba(78,142,255,.12);  color: var(--blue);   }
.pb-2 { background: rgba(245,166,35,.12);  color: var(--accent); }
.pb-3 { background: rgba(255,140,66,.15);  color: var(--orange); }
.pb-4 { background: rgba(255,77,106,.12);  color: var(--red);    }
.pb-5 { background: rgba(46,204,122,.12);  color: var(--green);  }

/* ══ CHARTS ══ */
.bar-wrap    { margin-bottom: 8px; }
.bar-lbl-row { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 3px; }
.bar-bg  { height: 8px; background: var(--bg4); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #ffcc70); transition: width .4s; }
.bar-fill-blue   { background: linear-gradient(90deg, var(--blue), #88bbff); }
.bar-fill-green  { background: linear-gradient(90deg, var(--green), #6dffa0); }
.bar-fill-red    { background: linear-gradient(90deg, var(--red), #ff9999); }
.bar-fill-purple { background: linear-gradient(90deg, var(--purple), #d0b8ff); }

.consumo-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.consumo-row:last-child { border-bottom: none; }
.c-code { font-family: var(--mono); font-size: 10px; color: var(--muted2); width: 56px; flex-shrink: 0; }
.c-bar  { flex: 1; height: 6px; background: var(--bg4); border-radius: 3px; overflow: hidden; }
.c-fill { height: 100%; border-radius: 3px; transition: width .4s; }
.c-val  { font-family: var(--mono); font-size: 11px; width: 64px; text-align: right; flex-shrink: 0; }

/* ══ ALERTS ══ */
.alert-item { display: flex; align-items: flex-start; gap: 9px; padding: 8px 10px; background: var(--bg3); border-radius: 7px; border-left: 3px solid var(--accent); margin-bottom: 6px; font-size: 11px; color: var(--muted2); }
.alert-item.crit { border-left-color: var(--red); }
.alert-item.info { border-left-color: var(--blue); }
.alert-item.ok   { border-left-color: var(--green); }
.alert-item strong { color: var(--text); }

/* ══ USER CARDS ══ */
.user-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; align-items: center; gap: 12px; margin-bottom: 8px; transition: border-color .15s; flex-wrap: wrap; }
.user-card:hover { border-color: var(--border2); }
.uc-av { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.uc-info { flex: 1; min-width: 140px; }
.uc-name { font-size: 13px; font-weight: 600; }
.uc-email { font-size: 11px; color: var(--muted); margin-top: 1px; }
.uc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; align-items: center; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* ══ PERM MATRIX ══ */
.pm-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); }
.pm-table { width: 100%; border-collapse: collapse; min-width: 580px; }
.pm-th { padding: 8px 10px; font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid var(--border); background: var(--bg3); text-align: center; white-space: nowrap; }
.pm-th:first-child { text-align: left; }
.pm-td { padding: 7px 10px; font-size: 11px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); text-align: center; vertical-align: middle; }
.pm-td:first-child { text-align: left; font-weight: 500; white-space: nowrap; }
.pm-td:last-child { border-right: none; }
.pm-tr:last-child .pm-td { border-bottom: none; }
.pm-tr:hover .pm-td { background: rgba(255,255,255,.015); }
.perm-sel { background: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: 3px 5px; border-radius: 5px; font-family: var(--mono); font-size: 10px; cursor: pointer; width: 100%; }
.perm-sel:focus { outline: none; border-color: var(--accent); }

/* ══ LEGEND ══ */
.leg-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.leg-item:last-child { border-bottom: none; }
.leg-desc { font-size: 11px; color: var(--muted2); margin-top: 2px; line-height: 1.5; }

/* ══ APPROVAL CARDS ══ */
.aprov-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 9px; padding: 13px; margin-bottom: 8px; transition: border-color .15s; }
.aprov-card:hover { border-color: var(--border2); }
.aprov-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.aprov-title { font-size: 12px; font-weight: 600; flex: 1; }
.aprov-desc  { font-size: 11px; color: var(--muted2); margin-bottom: 10px; }
.aprov-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.aprov-meta { font-size: 10px; color: var(--muted); margin-top: 7px; }

/* ══ FORM ══ */
.f-group { margin-bottom: 10px; }
.f-lbl   { font-size: 11px; color: var(--muted); margin-bottom: 4px; display: block; font-weight: 500; }
.f-inp   { width: 100%; background: var(--bg3); border: 1px solid var(--border2); color: var(--text); padding: 8px 10px; border-radius: 7px; font-family: var(--font); font-size: 12px; transition: border-color .2s; }
.f-inp:focus { outline: none; border-color: var(--accent); }
.f-sel   { width: 100%; background: var(--bg3); border: 1px solid var(--border2); color: var(--text); padding: 8px 10px; border-radius: 7px; font-family: var(--font); font-size: 12px; }
.f-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ══ MODAL ══ */
.modal-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.78); z-index: 400; align-items: center; justify-content: center; padding: 14px; }
.modal-bg.open { display: flex; }
.modal { background: var(--bg2); border: 1px solid var(--border2); border-radius: 14px; padding: 22px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; }
.modal::-webkit-scrollbar { width: 4px; }
.modal::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 4px; }
.modal-title { font-size: 14px; font-weight: 600; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--red); }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); flex-wrap: wrap; }

/* ══ TABS ══ */
.tabs { display: flex; gap: 2px; background: var(--bg3); padding: 3px; border-radius: 7px; margin-bottom: 12px; }
.tab { flex: 1; padding: 5px; text-align: center; font-size: 11px; font-weight: 500; color: var(--muted); cursor: pointer; border-radius: 5px; transition: all .15s; }
.tab.active { background: var(--bg2); color: var(--text); }

/* ══ DROP ZONE ══ */
.drop-zone { border: 1.5px dashed var(--border2); border-radius: 10px; padding: 22px; text-align: center; cursor: pointer; background: var(--bg3); transition: border-color .2s; }
.drop-zone:hover { border-color: var(--accent); background: rgba(245,166,35,.03); }
.drop-zone-icon { font-size: 30px; margin-bottom: 8px; opacity: .5; }
.drop-zone-text { font-size: 12px; color: var(--muted2); }
.drop-zone-sub  { font-size: 10px; color: var(--muted); margin-top: 3px; }
.nf-preview { background: var(--bg3); border: 1px solid var(--border2); border-radius: 8px; padding: 12px; margin-top: 10px; display: none; }
.nf-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 11px; }

/* ══ TOGGLE SWITCH ══ */
.toggle-wrap { position: relative; display: inline-block; width: 32px; height: 18px; cursor: pointer; }
.toggle-wrap input { opacity: 0; width: 0; height: 0; }
.toggle-track { position: absolute; inset: 0; background: var(--bg4); border-radius: 10px; transition: background .2s; }
.toggle-thumb { position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; background: #fff; border-radius: 50%; transition: left .2s; }
.toggle-wrap input:checked ~ .toggle-track { background: var(--green); }
.toggle-wrap input:checked ~ .toggle-thumb { left: 17px; }

/* ══ TOAST ══ */
.toast {
  position: fixed; bottom: 70px; right: 16px; z-index: 999;
  padding: 10px 18px; border-radius: 8px; font-size: 12px; font-weight: 600;
  transition: opacity .3s, transform .3s; opacity: 0; pointer-events: none;
  transform: translateY(10px);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: var(--green); color: #0b0e1a; }
.toast-error   { background: var(--red);   color: #fff; }
.toast-info    { background: var(--blue);  color: #fff; }

/* ══ LOCKED PAGE ══ */
.locked-pg { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 60vh; gap: 10px; opacity: .4; }
.locked-icon { font-size: 50px; }
.locked-txt  { font-size: 15px; font-weight: 600; color: var(--muted); }
.locked-sub  { font-size: 12px; color: var(--muted); }

/* ══ EMAIL CHIP ══ */
.email-chip { display: inline-flex; align-items: center; gap: 5px; background: rgba(78,142,255,.12); color: var(--blue); padding: 3px 9px; border-radius: 14px; font-size: 11px; margin: 3px; }
.email-x { cursor: pointer; opacity: .6; font-size: 12px; }
.email-x:hover { opacity: 1; }

/* ══ NOTIF ROW ══ */
.notif-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.notif-row:last-child { border-bottom: none; }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.notif-name { flex: 1; font-size: 11px; font-weight: 500; }
.notif-desc { font-size: 10px; color: var(--muted); }

/* ══ RESPONSIVE ══ */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.5); }
  .main { margin-left: 0; padding-bottom: var(--mobile-nav-h); }
  .hamburger { display: flex; }
  .mobile-nav { display: grid; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpi-val  { font-size: 18px; }
  .row2, .row3, .row32 { grid-template-columns: 1fr; }
  .topbar { padding: 0 12px; }
  .content { padding: 10px 12px; }
  .pg-sub { display: none; }
  .f-row  { grid-template-columns: 1fr; }
  .modal  { padding: 16px; }
}
@media (max-width: 420px) {
  .kpi-val { font-size: 16px; }
  .card { padding: 11px 10px; }
  .topbar-right .btn-label { display: none; }
}
