/* ============================================================
   النقابة العامة للسيارات — منصة الخدمات التقنية الداخلية
   Government-grade enterprise IT platform — static demo
   ============================================================ */

:root {
  --navy:        #0d3b66;
  --navy-700:    #0a3157;
  --navy-900:    #072540;
  --teal:        #1b7f8c;
  --teal-600:    #17707c;
  --slate:       #324155;
  --slate-500:   #5b6b82;
  --slate-300:   #94a3b8;
  --gold:        #c9a227;
  --green:       #1f9d55;
  --red:         #d64545;
  --amber:       #d9930a;
  --bg:          #eef2f6;
  --bg-soft:     #f6f8fb;
  --card:        #ffffff;
  --line:        #dce3ec;
  --line-soft:   #e8edf3;
  --text:        #1d2838;
  --text-soft:   #5b6b82;
  --text-faint:  #8a98ab;
  --radius:      14px;
  --radius-sm:   9px;
  --shadow:      0 1px 2px rgba(13,59,102,.06), 0 8px 24px rgba(13,59,102,.07);
  --shadow-sm:   0 1px 3px rgba(13,59,102,.08);
  --shadow-lg:   0 16px 48px rgba(7,37,64,.18);
  --sidebar-w:   264px;
  --topbar-h:    64px;
  --font:        'IBM Plex Sans Arabic','Tajawal',system-ui,'Segoe UI',sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--teal); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
:focus-visible { outline: 3px solid rgba(27,127,140,.45); outline-offset: 2px; border-radius: 6px; }
.hidden { display: none !important; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c3cedb; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #a9b7c8; }

/* ============================================================
   LOGIN
   ============================================================ */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: var(--bg);
}
.auth-hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(27,127,140,.55), transparent 60%),
    linear-gradient(150deg, var(--navy-900), var(--navy) 55%, var(--teal-600));
  color: #fff;
  padding: 56px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.auth-hero::after {
  content: "";
  position: absolute;
  inset: auto -120px -160px auto;
  width: 520px; height: 520px;
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,.14);
  box-shadow: 0 0 0 40px rgba(255,255,255,.03);
}
.hero-brand { display: flex; align-items: center; gap: 14px; position: relative; z-index: 2; }
.hero-brand img { width: 52px; height: 52px; }
.hero-brand .b-name { font-weight: 700; font-size: 18px; line-height: 1.3; }
.hero-brand .b-sub { font-size: 12.5px; color: rgba(255,255,255,.72); }
.hero-mid { position: relative; z-index: 2; max-width: 460px; }
.hero-mid .eyebrow {
  display: inline-block; font-size: 12px; letter-spacing: .5px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 22px;
}
.hero-mid h1 { font-size: 30px; line-height: 1.35; font-weight: 700; margin-bottom: 14px; }
.hero-mid p { color: rgba(255,255,255,.78); font-size: 15px; }
.hero-feats { display: grid; gap: 12px; margin-top: 26px; }
.hero-feat { display: flex; align-items: flex-start; gap: 11px; font-size: 14px; color: rgba(255,255,255,.9); }
.hero-feat .ic {
  flex: 0 0 34px; height: 34px; border-radius: 9px;
  background: rgba(255,255,255,.12); display: grid; place-items: center; color: #fff;
}
.hero-foot { position: relative; z-index: 2; font-size: 12.5px; color: rgba(255,255,255,.6); }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 32px; }
.auth-card { width: 100%; max-width: 410px; }
.auth-card h2 { font-size: 23px; margin-bottom: 6px; }
.auth-card .lead { color: var(--text-soft); margin-bottom: 26px; font-size: 14px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; color: var(--slate); }
.field .inp-wrap { position: relative; }
.field input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; color: var(--text); transition: .15s;
}
.field input:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 4px rgba(27,127,140,.12); }
.btn-primary {
  width: 100%; padding: 13px; border: none; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--navy), var(--teal)); color: #fff;
  font-weight: 700; font-size: 15px; transition: .18s; box-shadow: 0 6px 16px rgba(13,59,102,.22);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(13,59,102,.28); }
.btn-primary:active { transform: translateY(0); }
.auth-err {
  background: #fdecec; border: 1px solid #f5c6c6; color: #b02a2a;
  padding: 10px 13px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 9px;
}
.demo-box {
  margin-top: 26px; border: 1px dashed var(--line); border-radius: var(--radius-sm);
  background: var(--bg-soft); padding: 14px 16px;
}
.demo-box .dh { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; color: var(--navy); margin-bottom: 4px; }
.demo-box .dnote { font-size: 12px; color: var(--text-faint); margin-bottom: 10px; }
.demo-list { display: grid; gap: 7px; }
.demo-acct {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #fff; border: 1px solid var(--line-soft); border-radius: 8px; padding: 7px 10px;
  font-size: 12.5px; cursor: pointer; transition: .14s; text-align: start;
}
.demo-acct:hover { border-color: var(--teal); background: #f2fbfc; }
.demo-acct .da-mail { font-family: ui-monospace,monospace; color: var(--slate); direction: ltr; }
.demo-acct .da-role { font-size: 11.5px; color: #fff; background: var(--teal); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.lang-switch { background:none; border:1px solid rgba(255,255,255,.3); color:#fff; padding:6px 13px; border-radius:999px; font-size:12.5px; }
.auth-panel .lang-switch { border-color: var(--line); color: var(--slate); }

/* ============================================================
   APP SHELL
   ============================================================ */
.app { display: none; min-height: 100vh; }
.app.show { display: block; }

.topbar {
  position: fixed; top: 0; inset-inline: 0; height: var(--topbar-h); z-index: 50;
  background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 0 20px;
}
.topbar .brand { display: flex; align-items: center; gap: 11px; width: var(--sidebar-w); }
.topbar .brand img { width: 36px; height: 36px; }
.topbar .brand .t { line-height: 1.2; }
.topbar .brand .t b { font-size: 14.5px; color: var(--navy); display: block; }
.topbar .brand .t span { font-size: 11px; color: var(--text-faint); }
.topbar .spacer { flex: 1; }
.menu-toggle { display: none; background: var(--bg); border: 1px solid var(--line); width: 40px; height: 40px; border-radius: 10px; color: var(--slate); }
.top-search {
  display: flex; align-items: center; gap: 8px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 15px; width: 300px; max-width: 34vw; color: var(--text-faint);
}
.top-search input { border: none; background: none; outline: none; width: 100%; color: var(--text); }
.top-ic {
  position: relative; width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--line);
  background: #fff; display: grid; place-items: center; color: var(--slate);
}
.top-ic:hover { background: var(--bg-soft); }
.top-ic .dot { position: absolute; top: 7px; inset-inline-end: 8px; width: 9px; height: 9px; background: var(--red); border-radius: 50%; border: 2px solid #fff; }
.top-user { display: flex; align-items: center; gap: 10px; padding-inline-start: 6px; }
.top-user .avatar {
  width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg,var(--navy),var(--teal));
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.top-user .tu-t { line-height: 1.25; }
.top-user .tu-t b { font-size: 13.5px; }
.top-user .tu-t span { font-size: 11.5px; color: var(--text-faint); display: block; }

/* notifications dropdown */
.notif-pop {
  position: fixed; top: calc(var(--topbar-h) + 6px); inset-inline-end: 16px; z-index: 60;
  width: 340px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}
.notif-pop .nh { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); font-weight: 700; display:flex; justify-content:space-between; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); display: flex; gap: 11px; }
.notif-item:last-child { border-bottom: none; }
.notif-item .ni-ic { flex: 0 0 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.notif-item .ni-t { font-size: 13.5px; font-weight: 600; }
.notif-item .ni-d { font-size: 12px; color: var(--text-faint); }

/* sidebar */
.sidebar {
  position: fixed; top: var(--topbar-h); inset-inline-start: 0; bottom: 0; width: var(--sidebar-w);
  background: #fff; border-inline-end: 1px solid var(--line); overflow-y: auto; z-index: 40; padding: 14px 12px;
}
.nav-group { margin-bottom: 8px; }
.nav-group .ng-label { font-size: 11px; font-weight: 700; color: var(--text-faint); letter-spacing: .4px; padding: 10px 12px 6px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
  color: var(--slate); font-size: 14px; font-weight: 500; margin-bottom: 2px; transition: .13s; cursor: pointer; position: relative;
}
.nav-item .ni-ic { width: 20px; height: 20px; flex: 0 0 20px; display:grid; place-items:center; }
.nav-item:hover { background: var(--bg-soft); color: var(--navy); }
.nav-item.active { background: linear-gradient(90deg, rgba(27,127,140,.12), rgba(13,59,102,.05)); color: var(--navy); font-weight: 700; }
.nav-item.active::after { content: ""; position: absolute; inset-inline-start: 0; top: 8px; bottom: 8px; width: 3.5px; border-radius: 4px; background: var(--teal); }
.nav-item .badge-num { margin-inline-start: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.sidebar-foot { margin-top: 10px; padding: 14px 12px; border-top: 1px solid var(--line-soft); font-size: 11.5px; color: var(--text-faint); }

.main {
  margin-inline-start: var(--sidebar-w); margin-top: var(--topbar-h);
  padding: 26px 28px 60px; min-height: calc(100vh - var(--topbar-h));
}
.scrim { display: none; position: fixed; inset: var(--topbar-h) 0 0; background: rgba(7,37,64,.4); z-index: 39; }

/* ============================================================
   PAGE PRIMITIVES
   ============================================================ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 23px; color: var(--navy); }
.page-head .sub { color: var(--text-soft); font-size: 14px; margin-top: 3px; }
.breadcrumbs { font-size: 12.5px; color: var(--text-faint); margin-bottom: 7px; }
.breadcrumbs b { color: var(--teal); font-weight: 600; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line-soft); }
.card-head h3 { font-size: 16px; color: var(--navy); }
.card-head .ch-sub { font-size: 12.5px; color: var(--text-faint); }

.grid { display: grid; gap: 18px; }
.g-4 { grid-template-columns: repeat(4,1fr); }
.g-3 { grid-template-columns: repeat(3,1fr); }
.g-2 { grid-template-columns: repeat(2,1fr); }
.col-2 { grid-template-columns: 2fr 1fr; }
@media (max-width: 1100px){ .g-4{grid-template-columns:repeat(2,1fr);} .col-2{grid-template-columns:1fr;} .g-3{grid-template-columns:repeat(2,1fr);} }
@media (max-width: 640px){ .g-4,.g-3,.g-2{grid-template-columns:1fr;} }

/* KPI tile */
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.kpi .k-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kpi .k-ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; }
.kpi .k-label { font-size: 13px; color: var(--text-soft); font-weight: 600; }
.kpi .k-val { font-size: 29px; font-weight: 700; color: var(--navy); line-height: 1.1; letter-spacing: -.5px; }
.kpi .k-val small { font-size: 16px; color: var(--text-faint); font-weight: 600; }
.kpi .k-trend { font-size: 12.5px; margin-top: 7px; display: flex; align-items: center; gap: 5px; }
.trend-up { color: var(--green); } .trend-down { color: var(--red); } .trend-flat { color: var(--text-faint); }

/* chips / badges */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 11px; border-radius: 999px; white-space: nowrap; }
.b-green { background: #e6f6ed; color: #178049; }
.b-amber { background: #fdf2dc; color: #a66c04; }
.b-red   { background: #fdecec; color: #c0392b; }
.b-blue  { background: #e7f0fb; color: #1b5faa; }
.b-teal  { background: #e2f5f7; color: #137482; }
.b-gray  { background: #eef1f5; color: #5b6b82; }
.b-gold  { background: #f8f1d9; color: #97741a; }
.dot-ind { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th { text-align: start; font-size: 12px; color: var(--text-faint); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-soft); white-space: nowrap; }
table.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.tbl tbody tr { transition: .12s; }
table.tbl tbody tr:hover { background: #f8fafd; }
table.tbl tbody tr.clickable { cursor: pointer; }
table.tbl .mono { font-family: ui-monospace,monospace; direction: ltr; color: var(--slate); font-size: 12.5px; }

/* toolbar / filters */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inp, .sel {
  padding: 9px 13px; border: 1.5px solid var(--line); border-radius: 9px; background: #fff; color: var(--text);
}
.inp:focus, .sel:focus { border-color: var(--teal); outline: none; }
.search-inp { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 9px; padding: 0 12px; background: #fff; }
.search-inp input { border: none; outline: none; padding: 9px 0; width: 210px; max-width: 46vw; }
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 9px;
  border: 1.5px solid var(--line); background: #fff; color: var(--slate); font-weight: 600; font-size: 13.5px; transition: .14s;
}
.btn:hover { border-color: var(--teal); color: var(--teal); }
.btn.primary { background: linear-gradient(135deg,var(--navy),var(--teal)); color: #fff; border: none; box-shadow: 0 4px 12px rgba(13,59,102,.2); }
.btn.primary:hover { color: #fff; transform: translateY(-1px); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--red); border-color: #f0c9c9; }
.btn.danger:hover { background: #fdecec; border-color: var(--red); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }

/* profile card */
.profile-card { display: flex; gap: 20px; align-items: center; }
.profile-card .big-av { width: 76px; height: 76px; border-radius: 18px; background: linear-gradient(135deg,var(--navy),var(--teal)); color: #fff; display: grid; place-items: center; font-size: 28px; font-weight: 700; flex: 0 0 76px; }
.info-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px 24px; }
.info-grid .ig .lbl { font-size: 12px; color: var(--text-faint); margin-bottom: 2px; }
.info-grid .ig .val { font-weight: 600; font-size: 14px; }
@media (max-width:640px){ .info-grid{grid-template-columns:1fr 1fr;} }

/* timeline */
.timeline { position: relative; padding-inline-start: 26px; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item .tl-dot { position: absolute; inset-inline-start: -26px; top: 2px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line); }
.tl-item .tl-t { font-weight: 600; font-size: 14px; }
.tl-item .tl-m { font-size: 13px; color: var(--text-soft); }
.tl-item .tl-time { font-size: 11.5px; color: var(--text-faint); margin-top: 1px; }

/* list rows (directory, announcements) */
.list-row { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.list-row:last-child { border-bottom: none; }
.list-row .lr-av { width: 42px; height: 42px; border-radius: 11px; background: var(--bg); color: var(--navy); display: grid; place-items: center; font-weight: 700; flex: 0 0 42px; }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-main b { font-size: 14px; }
.list-row .lr-main span { font-size: 12.5px; color: var(--text-faint); display: block; }

/* announcement */
.ann { padding: 15px 0; border-bottom: 1px solid var(--line-soft); }
.ann:last-child { border-bottom: none; }
.ann .ann-top { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.ann .ann-top b { font-size: 14.5px; }
.ann p { font-size: 13.5px; color: var(--text-soft); }
.ann .ann-date { font-size: 11.5px; color: var(--text-faint); }

/* progress bar */
.pbar { height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.pbar > i { display: block; height: 100%; border-radius: 999px; }

/* modal */
.modal-scrim { position: fixed; inset: 0; background: rgba(7,37,64,.5); z-index: 100; display: grid; place-items: center; padding: 20px; backdrop-filter: blur(2px); }
.modal { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; max-width: 540px; max-height: 90vh; overflow: auto; }
.modal.wide { max-width: 720px; }
.modal .m-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; background: #fff; }
.modal .m-head h3 { font-size: 17px; color: var(--navy); }
.modal .m-body { padding: 20px 22px; }
.modal .m-foot { display: flex; justify-content: flex-start; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line-soft); position: sticky; bottom: 0; background: #fff; }
.x-btn { background: var(--bg); border: none; width: 34px; height: 34px; border-radius: 9px; color: var(--slate); display: grid; place-items: center; }
.x-btn:hover { background: #e7ecf2; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
@media (max-width:560px){ .form-grid.two{grid-template-columns:1fr;} }
.fg label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--slate); }
.fg input, .fg select, .fg textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 9px; background: #fff; color: var(--text); }
.fg input:focus, .fg select:focus, .fg textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(27,127,140,.1); }
.fg textarea { resize: vertical; min-height: 84px; }

/* toast */
.toast-wrap { position: fixed; bottom: 22px; inset-inline-start: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--navy-900); color: #fff; padding: 13px 18px; border-radius: 11px; box-shadow: var(--shadow-lg); font-size: 13.5px; display: flex; align-items: center; gap: 10px; animation: tin .25s ease; max-width: 360px; }
.toast.ok { background: #14603a; } .toast.err { background: #8e2b2b; }
@keyframes tin { from { opacity: 0; transform: translateY(12px); } }

/* empty */
.empty { text-align: center; padding: 42px 20px; color: var(--text-faint); }
.empty .ei { width: 54px; height: 54px; border-radius: 14px; background: var(--bg-soft); display: grid; place-items: center; margin: 0 auto 12px; color: var(--slate-300); }

/* section title inline */
.sect-title { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 14px; }

/* two-col detail */
.detail-wrap { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
@media (max-width: 960px){ .detail-wrap{grid-template-columns:1fr;} }

/* meta rows */
.meta-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.meta-row:last-child { border: none; }
.meta-row .mk { color: var(--text-faint); }
.meta-row .mv { font-weight: 600; }

/* system registry card */
.sys-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: #fff; }
.sys-card .sc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.sys-card .sc-name { font-weight: 700; font-size: 14.5px; color: var(--navy); }
.sys-card .sc-meta { font-size: 12px; color: var(--text-faint); }
.sys-card .sc-bars { display: flex; gap: 3px; margin-top: 12px; }
.sys-card .sc-bars i { flex: 1; height: 22px; border-radius: 3px; background: var(--line-soft); }

/* chart box */
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 220px; }

/* responsive */
@media (max-width: 980px){
  :root { --sidebar-w: 0px; }
  .topbar .brand { width: auto; }
  .menu-toggle { display: grid; place-items: center; }
  .sidebar { width: 280px; left: auto; right: 0; inset-inline-start: auto; transform: translateX(100%); visibility: hidden; transition: transform .25s, visibility .25s; box-shadow: var(--shadow-lg); border-inline-end: none; border-inline-start: 1px solid var(--line); }
  .sidebar.open { transform: translateX(0); visibility: visible; }
  .main { margin-inline-start: 0; }
  .scrim.show { display: block; }
  .top-search { display: none; }
}
@media (max-width: 560px){
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .main { padding: 18px 14px 50px; }
  .top-user .tu-t { display: none; }
  .page-head h1 { font-size: 20px; }
}
@media (max-width: 900px) and (min-width: 561px){
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { padding: 36px 40px; }
}

/* API docs (hand-styled fallback link page) */
.api-note { background: #eef6ff; border: 1px solid #cfe2fb; color: #1b5faa; padding: 12px 16px; border-radius: 10px; font-size: 13.5px; margin-bottom: 18px; }
