/* Omusubi Console — standalone B2B SaaS console styles */
:root {
  --c-bg: #f6f7f9;
  --c-surface: #ffffff;
  --c-sidebar: #0f172a;
  --c-sidebar-2: #1e293b;
  --c-sidebar-text: #cbd5e1;
  --c-sidebar-muted: #64748b;
  --c-border: #e4e7ec;
  --c-border-strong: #d0d5dd;
  --c-text: #101828;
  --c-text-2: #475467;
  --c-text-3: #667085;
  --c-primary: #e11d48;
  --c-primary-hover: #be123c;
  --c-primary-soft: #fff1f2;
  --c-ok: #067647;
  --c-ok-soft: #ecfdf3;
  --c-bad: #b42318;
  --c-bad-soft: #fef3f2;
  --c-warn: #b54708;
  --c-warn-soft: #fffaeb;
  --c-code-bg: #0b1220;
  --c-code-text: #e2e8f0;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.18);
  --sb-w: 248px;
  --font: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.console {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-bg);
  overflow-x: clip;
}
[hidden] { display: none !important; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--mono); }
h1, h2 { margin: 0; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

.app { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sb-w);
  background: var(--c-sidebar);
  color: var(--c-sidebar-text);
  display: flex; flex-direction: column;
  padding: 16px 12px;
  z-index: 40;
  overflow-y: auto;
}
.sb-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 16px; }
.sb-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.sb-brand:hover { text-decoration: none; }
.sb-logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #fb7185, #e11d48);
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px; color: #fff;
}
.sb-brand-text { white-space: nowrap; font-size: 14px; font-weight: 600; letter-spacing: 0.01em; display: inline-flex; align-items: center; gap: 5px; }
.sb-brand-text b { font-weight: 700; color: #cbd5e1; }
.brand-suffix { font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: rgba(251, 113, 133, 0.16); color: #fda4af; border: 1px solid rgba(251, 113, 133, 0.35); line-height: 1.3; }
.icon-btn.sb-close { display: none; color: var(--c-sidebar-text); }

.ws { position: relative; margin: 0 4px 16px; }
.ws-pill {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: var(--c-sidebar-2); border: 1px solid #334155; border-radius: var(--radius);
  color: #fff; text-align: left;
}
.ws-pill:hover { border-color: #475569; }
.ws-text { flex: 1; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ws-label { font-size: 11px; line-height: 1.4; color: var(--c-sidebar-muted); }
.ws-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex: none; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); }
.ws-dot.off { background: #64748b; box-shadow: none; }
.ws-menu {
  list-style: none; margin: 6px 0 0; padding: 4px;
  position: absolute; left: 0; right: 0; z-index: 5;
  background: var(--c-sidebar-2); border: 1px solid #334155; border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.ws-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: #fff; font-size: 13px; cursor: pointer; }
.ws-opt:hover { background: #334155; }
.ws-opt.active { background: rgba(225, 29, 72, 0.25); }
.ws-opt.disabled { color: #94a3b8; cursor: not-allowed; }
.ws-opt.disabled:hover { background: transparent; }
.ws-opt .tag { margin-left: auto; }

.sb-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sb-group { font-size: 11px; color: var(--c-sidebar-muted); padding: 14px 12px 6px; letter-spacing: 0.04em; }
.sb-group:first-child { padding-top: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--c-sidebar-text); font-size: 14px; text-decoration: none;
}
.nav-item:hover { background: var(--c-sidebar-2); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--c-sidebar-2); color: #fff; box-shadow: inset 2px 0 0 #fb7185; }
.nav-item svg { flex: none; opacity: 0.85; }
.nav-item.active svg { opacity: 1; color: #fb7185; }

.sb-bottom { border-top: 1px solid #1e293b; padding-top: 12px; margin-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.sb-link { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--c-sidebar-text); font-size: 13px; text-decoration: none; }
.sb-link:hover { background: var(--c-sidebar-2); color: #fff; text-decoration: none; }
.sb-link.back { color: #fff; font-weight: 700; }

.scrim { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); z-index: 35; }

/* ---------- Main ---------- */
.main { margin-left: var(--sb-w); flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  height: 64px; padding: 0 32px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--c-border);
}
.tb-title { flex: 1; min-width: 0; line-height: 1.2; }
.crumb { font-size: 12px; color: var(--c-text-3); }
.tb-title h1 { font-size: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn { background: transparent; border: 0; padding: 6px; border-radius: var(--radius-sm); color: var(--c-text-2); display: inline-grid; place-items: center; }
.icon-btn:hover { background: rgba(100, 116, 139, 0.15); }
.icon-btn.menu-btn { display: none; }

.lang { display: inline-flex; padding: 2px; background: var(--c-bg); border: 1px solid var(--c-border); border-radius: 8px; }
.lang-btn { border: 0; background: transparent; padding: 5px 10px; border-radius: 6px; font-size: 12px; color: var(--c-text-2); }
.lang-btn.active { background: #fff; color: var(--c-text); font-weight: 700; box-shadow: var(--shadow-sm); }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--c-border-strong); background: #fff;
  font-size: 12px; color: var(--c-text-2); white-space: nowrap;
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #98a2b3; }
.status-pill[data-state="demo"] { background: var(--c-warn-soft); border-color: #fedf89; color: var(--c-warn); }
.status-pill[data-state="demo"] .dot { background: #f79009; }
.status-pill[data-state="in"] { background: var(--c-ok-soft); border-color: #abefc6; color: var(--c-ok); }
.status-pill[data-state="in"] .dot { background: #17b26a; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 14px; border-radius: 8px; border: 1px solid transparent;
  font-size: 13px; font-weight: 700; line-height: 1.2; white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--c-primary-hover); }
.btn-secondary { background: #fff; color: var(--c-text); border-color: var(--c-border-strong); }
.btn-secondary:hover:not(:disabled) { background: #f9fafb; }
.btn-ghost { background: transparent; color: var(--c-text-2); border-color: transparent; }
.btn-ghost:hover { background: rgba(100, 116, 139, 0.12); }
.btn-google { background: #fff; color: var(--c-text); border-color: var(--c-border-strong); }
.btn-google:hover { background: #f9fafb; }
.link-btn { background: none; border: 0; color: var(--c-primary); font-size: 12px; font-weight: 700; padding: 2px 4px; }
.link-btn:hover { text-decoration: underline; }

/* Banners */
.banner { display: flex; align-items: center; gap: 12px; padding: 10px 32px; font-size: 13px; border-bottom: 1px solid transparent; }
.banner.demo { background: var(--c-primary-soft); border-color: #fecdd3; color: #881337; }
.banner.err { background: var(--c-bad-soft); border-color: #fecdca; color: var(--c-bad); }
.banner-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-primary); flex: none; animation: pulse 2s infinite; }
.banner-text { flex: 1; min-width: 0; }
.banner-text b { margin-right: 8px; }
.banner-link { font-weight: 700; white-space: nowrap; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.45); } 50% { box-shadow: 0 0 0 6px rgba(225, 29, 72, 0); } }

/* Content & views */
.content { padding: 24px 32px 64px; width: 100%; max-width: none; }
.view { display: none; }
.view.active { display: block; animation: fade 0.18s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.view-desc { margin: 0; color: var(--c-text-2); max-width: 70ch; }
.view-tools { display: flex; align-items: center; gap: 12px; }
.updated { font-size: 12px; color: var(--c-text-3); }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-sm); }
.kpi-label { font-size: 12px; color: var(--c-text-3); }
.kpi-value { font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--c-text-3); }
.kpi-value .unit { font-size: 14px; font-weight: 400; color: var(--c-text-3); margin-left: 2px; }
.meter { height: 6px; border-radius: 999px; background: var(--c-bg); overflow: hidden; margin: 6px 0 2px; }
.meter span { display: block; height: 100%; width: 0; background: var(--c-primary); border-radius: 999px; transition: width 0.5s ease; }
.meter span.hot { background: #f79009; }
.meter span.full { background: #f04438; }

/* Panels */
.panel { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 16px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--c-border); }
.panel-head h2 { font-size: 14px; font-weight: 700; }
.panel-note { font-size: 12px; color: var(--c-text-3); }
.panel-link { font-size: 12px; font-weight: 700; }
.panel-body { padding: 20px; }
.panel-head.filters { gap: 12px; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }

/* Chart */
.chart { padding: 12px 12px 8px; }
.chart svg { display: block; width: 100%; height: 220px; overflow: visible; }
.chart.tall svg { height: 320px; }
.chart .grid line { stroke: var(--c-border); stroke-width: 1; }
.chart .ytick { fill: var(--c-text-3); font-size: 11px; font-family: var(--font); }
.chart .xtick { fill: var(--c-text-3); font-size: 10px; font-family: var(--font); }
.chart .bar { fill: #fb7185; transition: fill 0.12s; }
.chart .bar.ok { fill: #fb7185; }
.chart .bar.bad { fill: #f97066; }
.chart .bar:hover { fill: var(--c-primary); }
.chart .bar.bad:hover { fill: #d92d20; }
.chart .area { fill: url(#areaGrad); }
.chart .line { fill: none; stroke: var(--c-primary); stroke-width: 2; stroke-linejoin: round; }
.chart .avg { stroke: #f79009; stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart .avg-label { fill: var(--c-warn); font-size: 11px; font-family: var(--font); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--c-text-2); }
.legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg.ok { background: #fb7185; }
.lg.bad { background: #f97066; }

/* Horizontal bars */
.bars { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.bar-row .bar-top { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; margin-bottom: 5px; }
.bar-row .bar-name { font-family: var(--mono); color: var(--c-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bar-row .bar-val { color: var(--c-text-2); font-variant-numeric: tabular-nums; flex: none; }
.bar-track { height: 8px; background: var(--c-bg); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #fb7185, #e11d48); width: 0; transition: width 0.5s ease; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 700; color: var(--c-text-3); padding: 10px 20px; background: #fafbfc; border-bottom: 1px solid var(--c-border); white-space: nowrap; }
.tbl td { padding: 11px 20px; border-bottom: 1px solid var(--c-border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #fafbfc; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .mono, .tbl code { font-family: var(--mono); font-size: 12px; }
.tbl .empty, .empty { color: var(--c-text-3); text-align: center; padding: 28px 20px; }
.tbl .time { color: var(--c-text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.share-col { width: 22%; min-width: 120px; }
.mini-track { height: 6px; background: var(--c-bg); border-radius: 999px; overflow: hidden; }
.mini-track span { display: block; height: 100%; background: var(--c-primary); border-radius: 999px; }

/* Tags / badges */
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--c-bg); color: var(--c-text-2); border: 1px solid var(--c-border); white-space: nowrap; }
.ws-opt .tag { background: transparent; color: #94a3b8; border-color: #475569; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--c-ok-soft); color: var(--c-ok); }
.badge.bad { background: var(--c-bad-soft); color: var(--c-bad); }
.badge.warn { background: var(--c-warn-soft); color: var(--c-warn); }
.badge.muted { background: var(--c-bg); color: var(--c-text-2); }

/* Inputs */
.input { width: 100%; max-width: 100%; padding: 8px 12px; border: 1px solid var(--c-border-strong); border-radius: 8px; font: inherit; font-size: 13px; background: #fff; color: var(--c-text); }
.input.mono, textarea.input { font-family: var(--mono); font-size: 12px; }
.input:focus { outline: 2px solid var(--c-primary); outline-offset: -1px; border-color: transparent; }
.filters .input { flex: 1; min-width: 180px; max-width: 320px; }
.field-label { display: block; font-size: 12px; font-weight: 700; color: var(--c-text-2); margin: 0 0 6px; }
.seg { display: inline-flex; padding: 2px; background: var(--c-bg); border: 1px solid var(--c-border); border-radius: 8px; gap: 2px; }
.seg.wrap { flex-wrap: wrap; }
.seg-btn { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; font-size: 12px; color: var(--c-text-2); white-space: nowrap; }
.seg-btn:hover { color: var(--c-text); }
.seg-btn.active { background: #fff; color: var(--c-text); font-weight: 700; box-shadow: var(--shadow-sm); }

/* Keys / SSO */
.acct { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--c-border); border-radius: var(--radius); background: #fafbfc; margin-bottom: 16px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--c-primary-soft); color: var(--c-primary); display: grid; place-items: center; font-weight: 700; font-size: 16px; flex: none; }
.acct strong { display: block; font-size: 14px; }
.muted { color: var(--c-text-3); font-size: 12px; word-break: break-all; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack .btn { width: 100%; }
.google-slot:empty { display: none; }
.hint { font-size: 12px; color: var(--c-text-3); margin: 14px 0 0; }
.hint.tight { margin: 0 0 12px; }
.keybox { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.keybox .input { flex: 1; min-width: 160px; }
.meta { margin: 0 0 16px; display: grid; gap: 8px; }
.meta > div { display: flex; gap: 12px; font-size: 13px; }
.meta dt { color: var(--c-text-3); width: 96px; flex: none; }
.meta dd { margin: 0; min-width: 0; }
.meta code, .endpoint-row code { background: var(--c-bg); padding: 1px 6px; border-radius: 4px; font-size: 12px; }

/* Code blocks */
.code-block { background: var(--c-code-bg); border-radius: var(--radius); overflow: hidden; }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid #1e293b; font-size: 12px; color: #94a3b8; font-family: var(--mono); }
.code-bar .link-btn { color: #fda4af; }
.code-block pre { margin: 0; padding: 14px 16px; overflow-x: auto; color: var(--c-code-text); font-size: 12px; line-height: 1.7; }
.endpoint-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.endpoint-row .field-label { margin: 0; }
.endpoint-row code { word-break: break-all; }

/* BYOK Provider Key Vault */
.vault-lead { margin: 0 0 14px; color: var(--c-text-2); font-size: 13px; }
.vault-note { margin: 0 0 14px; padding: 10px 14px; border-radius: 8px; background: var(--c-warn-soft); border: 1px solid #fedf89; color: var(--c-warn); font-size: 12px; }
.vault-prov { display: flex; flex-direction: column; gap: 2px; min-width: 170px; }
.vault-prov strong { font-size: 13px; }
.vault-prov-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--c-text-3); }
.vault-prov-meta code { background: var(--c-bg); padding: 1px 5px; border-radius: 4px; font-size: 11px; }
.vault-form { display: flex; align-items: center; gap: 8px; min-width: 240px; }
.vault-form .input { flex: 1; min-width: 140px; }
.vault-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }

/* Tool list */
.tools { list-style: none; margin: 0; padding: 4px 0; max-height: 460px; overflow-y: auto; }
.tools li { padding: 10px 20px; border-bottom: 1px solid var(--c-border); }
.tools li:last-child { border-bottom: 0; }
.tools .t-name { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--c-text); }
.tools .t-desc { font-size: 12px; color: var(--c-text-3); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Drawer */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: #fff; border-left: 1px solid var(--c-border); box-shadow: var(--shadow-lg); z-index: 60; display: flex; flex-direction: column; animation: slide 0.18s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--c-border); }
.drawer-head h2 { font-size: 16px; }
.drawer-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.drawer-body .btn { align-self: flex-start; margin: 8px 0 12px; }
.resp-head { display: flex; justify-content: space-between; align-items: center; }
.resp-meta { font-size: 12px; color: var(--c-text-3); }
.resp { margin: 0; background: var(--c-code-bg); color: var(--c-code-text); border-radius: var(--radius); padding: 12px 14px; font-size: 12px; line-height: 1.6; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; }

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #101828; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13px; z-index: 80; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); }

/* Skeleton */
.skeleton { color: transparent !important; background: linear-gradient(90deg, #eef0f3 25%, #f6f7f9 50%, #eef0f3 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2-1, .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .icon-btn.sb-close { display: inline-grid; }
  .main { margin-left: 0; }
  .icon-btn.menu-btn { display: inline-grid; }
  .topbar { padding: 0 16px; gap: 8px; }
  .banner { padding: 10px 16px; }
  .content { padding: 20px 16px 56px; }
  .tb-actions .status-pill { display: none; }
}
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 16px; }
  .tb-title { flex: 1 1 calc(100% - 52px); order: 1; }
  .menu-btn { order: 0; }
  .tb-actions { order: 2; width: 100%; justify-content: space-between; }
  .tb-actions .btn { padding: 8px 12px; }
  .tb-actions .btn span { white-space: nowrap; }
  .kpis { gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 24px; }
  .banner { flex-wrap: wrap; }
  .tbl th, .tbl td { padding: 10px 12px; }
  .panel-head { padding: 12px 14px; }
  .panel-body { padding: 14px; }
  .bars { padding: 14px; }
  .filters .input { max-width: none; flex-basis: 100%; }
  .meta > div { flex-direction: column; gap: 2px; }
  .tools li { padding: 10px 14px; }
}
@media (max-width: 360px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .lang-btn { padding: 5px 7px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
