/* BTA device panel — design system (RTL, light/dark). */

@font-face { font-family: "Vazirmatn"; font-weight: 400; font-display: swap;
  src: url("../fonts/Vazirmatn-Regular.ttf") format("truetype"); }
@font-face { font-family: "Vazirmatn"; font-weight: 500; font-display: swap;
  src: url("../fonts/Vazirmatn-Medium.ttf") format("truetype"); }
@font-face { font-family: "Vazirmatn"; font-weight: 700; font-display: swap;
  src: url("../fonts/Vazirmatn-Bold.ttf") format("truetype"); }

:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8f9fd;
  --surface-3: #eef1f8;
  --border: #e3e7f0;
  --text: #172033;
  --text-2: #56607a;
  --text-3: #8a93a8;
  --primary: #4f46e5;
  --primary-2: #6366f1;
  --primary-soft: #eef0ff;
  --success: #12a150;
  --success-soft: #e7f8ee;
  --warning: #d97706;
  --warning-soft: #fdf3e2;
  --danger: #dc2f45;
  --danger-soft: #fdecee;
  --info: #0b84c6;
  --info-soft: #e6f4fb;
  --sidebar: #111733;
  --sidebar-2: #1a2147;
  --sidebar-text: #c3c9e6;
  --shadow: 0 1px 2px rgba(20, 27, 52, .05), 0 4px 16px rgba(20, 27, 52, .05);
  --shadow-lg: 0 12px 40px rgba(20, 27, 52, .18);
  --radius: 14px;
  --radius-sm: 10px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b1020;
  --surface: #131a2e;
  --surface-2: #171f37;
  --surface-3: #1e2742;
  --border: #263152;
  --text: #e7eaf5;
  --text-2: #a9b1cc;
  --text-3: #7680a0;
  --primary: #7c78ff;
  --primary-2: #8f8bff;
  --primary-soft: #23264d;
  --success: #34c27a;
  --success-soft: #133326;
  --warning: #f0a33a;
  --warning-soft: #3a2a12;
  --danger: #ff5b6e;
  --danger-soft: #3d1820;
  --info: #3db2ee;
  --info-soft: #11304a;
  --sidebar: #0a0f22;
  --sidebar-2: #151c3a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 14px; line-height: 1.7;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.4; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
code, .mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas,
  monospace; font-size: 12.5px; direction: ltr; unicode-bidi: embed; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); }
.small { font-size: 12.5px; } .nowrap { white-space: nowrap; }
.hidden { display: none !important; }
svg.icon { width: 18px; height: 18px; flex: none; fill: none;
  stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
  stroke-linejoin: round; vertical-align: middle; }
svg.icon.lg { width: 22px; height: 22px; }
svg.icon.xl { width: 30px; height: 30px; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px; flex: none; background: var(--sidebar); color: var(--sidebar-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 22px 18px; }
.brand-logo { width: 38px; height: 38px; border-radius: 11px; display: grid;
  place-items: center; color: #fff; font-weight: 700; letter-spacing: .5px;
  background: linear-gradient(135deg, #6366f1, #22d3ee); box-shadow: 0 6px 18px rgba(99,102,241,.45); }
.brand-name { color: #fff; font-weight: 700; font-size: 15px; line-height: 1.3; }
.brand-sub { font-size: 11.5px; color: var(--sidebar-text); opacity: .7; }
.nav { padding: 8px 12px; flex: 1; overflow-y: auto; }
.nav-label { font-size: 11px; color: #7d86b0; padding: 14px 12px 6px; letter-spacing: .3px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 10px; color: var(--sidebar-text); font-weight: 500; margin-bottom: 2px;
  transition: background .15s, color .15s; }
.nav a:hover { background: var(--sidebar-2); color: #fff; text-decoration: none; }
.nav a.active { background: linear-gradient(90deg, rgba(99,102,241,.25), rgba(99,102,241,.12));
  color: #fff; box-shadow: inset -3px 0 0 #818cf8; }
.nav .count { margin-inline-start: auto; background: var(--danger); color: #fff;
  border-radius: 999px; font-size: 11px; padding: 0 7px; line-height: 19px; }
.sidebar-foot { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.06);
  font-size: 12px; display: flex; align-items: center; gap: 8px; color: #7d86b0; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 28px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--border); }
.topbar .title { flex: 1; min-width: 0; }
.topbar .title h1 { font-size: 18px; }
.topbar .title .crumb { font-size: 12px; color: var(--text-3); }
.content { padding: 24px 28px 48px; max-width: 1480px; width: 100%; }
.menu-toggle { display: none; }

.org-switch select { min-width: 170px; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
  color: var(--text-3); }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.live-dot.on i { background: var(--success); box-shadow: 0 0 0 0 rgba(18,161,80,.5);
  animation: pulse 2s infinite; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 12px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-weight: 700; flex: none;
  overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 76px; height: 76px; font-size: 26px; border-radius: 20px; }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px;
  border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { flex: 1; }
.card-body { padding: 18px 20px; }
.card-body.tight { padding: 0; }
.section-gap { margin-top: 20px; }

.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.spacer { flex: 1; }

/* Stat tiles */
.stat { padding: 18px 20px; display: flex; gap: 16px; align-items: center; }
.stat-icon { width: 48px; height: 48px; border-radius: 14px; display: grid;
  place-items: center; flex: none; }
.stat-value { font-size: 26px; font-weight: 700; line-height: 1.2; }
.stat-label { color: var(--text-2); font-size: 13px; }
.stat-sub { font-size: 12px; color: var(--text-3); }
.tone-primary { background: var(--primary-soft); color: var(--primary); }
.tone-success { background: var(--success-soft); color: var(--success); }
.tone-warning { background: var(--warning-soft); color: var(--warning); }
.tone-danger { background: var(--danger-soft); color: var(--danger); }
.tone-info { background: var(--info-soft); color: var(--info); }

/* ---------- Badges & status ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2); }
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.primary { background: var(--primary-soft); color: var(--primary); }
.badge svg.icon { width: 14px; height: 14px; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px;
  font-weight: 500; white-space: nowrap; }
.status i { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); }
.status.online i { background: var(--success); animation: pulse 2s infinite; }
.status.warning i { background: var(--warning); }
.status.offline i { background: var(--danger); }
.status.disabled i { background: var(--text-3); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 55%, transparent); }
  70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; }
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px;
  border-radius: 8px; font-size: 12px; border: 1px solid var(--border);
  color: var(--text-3); background: var(--surface-2); }
.chip.on { color: var(--success); border-color: color-mix(in srgb, var(--success) 35%, transparent);
  background: var(--success-soft); }
.chip svg.icon { width: 14px; height: 14px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
  background: var(--surface); color: var(--text); border-color: var(--border); }
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.loading { opacity: .6; cursor: not-allowed; }
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 35%, transparent); }
.btn.primary:hover { background: var(--primary-2); }
.btn.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn.danger:hover { background: var(--danger); color: #fff; }
.btn.success { background: var(--success); color: #fff; border-color: var(--success); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.icon-only { width: 38px; padding: 0; }
.btn.sm.icon-only { width: 32px; }
.btn.loading::after { content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); width: 100%;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 12px; min-height: 38px; outline: none;
  transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--primary); }
input.ltr, textarea.ltr { direction: ltr; text-align: left; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input, .toolbar select { width: auto; }
.toolbar .search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.toolbar .search input { padding-inline-start: 36px; }
.toolbar .search svg { position: absolute; inset-inline-start: 11px; top: 10px; color: var(--text-3); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: start; font-weight: 500; font-size: 12.5px; color: var(--text-3);
  padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border);
  white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr.flash-new { animation: rowflash 2.5s ease-out; }
@keyframes rowflash { from { background: var(--primary-soft); } to { background: transparent; } }
.person { display: flex; align-items: center; gap: 10px; }
.person .name { font-weight: 500; }

/* ---------- Device cards ---------- */
.device-card { padding: 18px; display: flex; flex-direction: column; gap: 14px;
  transition: transform .15s, box-shadow .15s; color: inherit; }
.device-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }
.device-card .top { display: flex; gap: 12px; align-items: flex-start; }
.device-card .icon-box { width: 44px; height: 44px; border-radius: 12px; display: grid;
  place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.device-card .name { font-weight: 700; font-size: 15px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metric { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 10px; }
.metric .v { font-weight: 700; font-size: 15px; }
.metric .l { font-size: 11.5px; color: var(--text-3); }
.metric.hot .v { color: var(--danger); }
.warnings { display: flex; flex-direction: column; gap: 4px; }
.warn-line { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--warning); }

/* Live view */
.live-frame { position: relative; background: #05070f; border-radius: 12px; overflow: hidden;
  aspect-ratio: 4 / 3; display: grid; place-items: center; color: #8790b5; }
.live-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.live-frame .overlay-badge { position: absolute; top: 10px; inset-inline-end: 10px;
  background: rgba(220,47,69,.9); color: #fff; font-size: 11px; padding: 2px 8px;
  border-radius: 6px; font-weight: 700; letter-spacing: .5px; }

/* Sparkline */
.spark { width: 100%; height: 70px; display: block; }
.spark path.line { fill: none; stroke: var(--primary); stroke-width: 2; }
.spark path.area { fill: color-mix(in srgb, var(--primary) 14%, transparent); stroke: none; }
.spark.temp path.line { stroke: var(--danger); }
.spark.temp path.area { fill: color-mix(in srgb, var(--danger) 12%, transparent); }

/* Feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; align-items: center; padding: 11px 20px;
  border-bottom: 1px solid var(--border); }
.feed li:last-child { border-bottom: 0; }
.feed .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.feed .meta { font-size: 12px; color: var(--text-3); }
.feed li.new { animation: rowflash 2.5s ease-out; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px;
  overflow-x: auto; }
.tabs button { background: none; border: 0; font: inherit; padding: 10px 14px; cursor: pointer;
  color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }
.tab-panel { display: none; } .tab-panel.active { display: block; }

/* Enrollment */
.enroll-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.enroll-card .head { display: flex; align-items: center; gap: 12px; }
.enroll-card .head .stat-icon { width: 42px; height: 42px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.steps li { display: flex; gap: 10px; align-items: center; color: var(--text-3); font-size: 13px; }
.steps li .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--border); font-size: 12px; flex: none; }
.steps li.active { color: var(--text); font-weight: 500; }
.steps li.active .n { border-color: var(--primary); color: var(--primary); animation: pulse-p 1.6s infinite; }
.steps li.done { color: var(--success); }
.steps li.done .n { background: var(--success); border-color: var(--success); color: #fff; }
@keyframes pulse-p { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 18%, transparent); } }
.progress { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.progress > div { height: 100%; background: var(--primary); width: 0; transition: width 1s linear; }
.dropzone { border: 2px dashed var(--border); border-radius: 12px; padding: 22px; text-align: center;
  color: var(--text-3); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs .t { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; position: relative;
  border: 1px solid var(--border); }
.thumbs .t img { width: 100%; height: 100%; object-fit: cover; }
.result-list { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.result-list li { display: flex; gap: 6px; align-items: center; padding: 3px 0; }
.result-list li.ok { color: var(--success); } .result-list li.err { color: var(--danger); }

/* Profile header */
.profile { display: flex; gap: 20px; align-items: center; padding: 22px; }
.profile .info { flex: 1; min-width: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 13.5px; }
.kv dt { color: var(--text-3); } .kv dd { margin: 0; }

/* Alerts / flash */
.flash { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 12px;
  margin-bottom: 14px; font-weight: 500; }
.flash.success { background: var(--success-soft); color: var(--success); }
.flash.danger { background: var(--danger-soft); color: var(--danger); }
.flash.warning { background: var(--warning-soft); color: var(--warning); }
.flash.info { background: var(--info-soft); color: var(--info); }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border); }
.notice.warning { background: var(--warning-soft); border-color: transparent; color: var(--warning); }
.notice.danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }

/* Code blocks */
pre.code { margin: 0; padding: 14px 16px; border-radius: 12px; background: #0b1020; color: #d7defa;
  overflow-x: auto; direction: ltr; text-align: left; font-size: 12.5px; line-height: 1.6; }
.code-box { position: relative; }
.code-box .btn { position: absolute; top: 8px; right: 8px; }

/* Empty state */
.empty { text-align: center; padding: 48px 20px; color: var(--text-3); }
.empty svg.icon { width: 46px; height: 46px; stroke-width: 1.3; margin-bottom: 10px; opacity: .7; }
.empty h3 { color: var(--text-2); margin-bottom: 4px; }

/* Pagination */
.pagination { display: flex; gap: 4px; justify-content: center; padding: 14px; }
.pagination a, .pagination span { min-width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 9px; padding: 0 8px; color: var(--text-2); border: 1px solid var(--border);
  background: var(--surface); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Dialog */
dialog { border: 0; padding: 0; border-radius: 18px; background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 32px)); }
dialog.wide { width: min(820px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(8, 12, 28, .55); backdrop-filter: blur(3px); }
dialog .card-head { border-bottom: 1px solid var(--border); }
dialog .dialog-foot { padding: 14px 20px; border-top: 1px solid var(--border);
  display: flex; gap: 8px; justify-content: flex-end; }

/* Toasts */
.toasts { position: fixed; bottom: 20px; left: 20px; z-index: 100; display: flex;
  flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  animation: toast-in .25s ease-out; border-inline-start: 4px solid var(--primary); }
.toast.success { border-inline-start-color: var(--success); }
.toast.danger { border-inline-start-color: var(--danger); }
.toast.warning { border-inline-start-color: var(--warning); }
.toast .t-title { font-weight: 700; font-size: 13px; }
.toast .t-body { font-size: 12.5px; color: var(--text-2); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* Login */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { background: radial-gradient(circle at 30% 20%, #3730a3, #111733 60%);
  color: #dfe3ff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-hero h1 { font-size: 30px; color: #fff; margin-top: 40px; }
.auth-hero p { color: #b7bde6; max-width: 420px; }
.auth-hero .features { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.auth-hero .features div { display: flex; gap: 10px; align-items: center; }
.auth-form { display: grid; place-items: center; padding: 32px; }
.auth-form .box { width: min(380px, 100%); }
.auth-form h2 { font-size: 22px; margin-bottom: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-main { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; inset-inline-start: 0; z-index: 50; transform: translateX(100%);
    transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .menu-toggle { display: inline-flex; }
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .content { padding: 16px; } .topbar { padding: 12px 16px; }
  .auth-page { grid-template-columns: 1fr; } .auth-hero { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .user-chip .who { display: none; }
}
@media (max-width: 560px) {
  .cols-4 { grid-template-columns: 1fr; }
  .org-switch { display: none; }
}
