:root {
  --navy: #0a2740;
  --navy-2: #123852;
  --ink: #102a43;
  --muted: #6b7f92;
  --line: #dbe4ec;
  --canvas: #f5f8fa;
  --white: #fff;
  --teal: #079889;
  --teal-soft: #e3f7f3;
  --green: #19a974;
  --blue: #1382a4;
  --blue-bright: #3c94f8;
  --red: #dc3943;
  --red-soft: #fff0f1;
  --orange: #d88116;
  --orange-soft: #fff5e5;
  --shadow: 0 8px 26px rgba(28, 52, 74, .07);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; color: var(--ink); font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif; background: var(--canvas); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.eyebrow { color: #087ba0; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.toast { position: fixed; z-index: 100; top: 22px; left: 50%; transform: translate(-50%, -16px); padding: 11px 18px; border-radius: 9px; background: var(--navy); color: #fff; opacity: 0; pointer-events: none; transition: .2s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #bd2833; }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: radial-gradient(circle at 80% 10%, #dff4f1, transparent 35%), linear-gradient(145deg, #eef4f7, #fff); }
.login-card { width: min(980px, 100%); min-height: 560px; display: grid; grid-template-columns: 1.15fr .85fr; grid-template-rows: auto 1fr; gap: 42px; padding: 42px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 28px 70px rgba(21, 57, 80, .14); }
.login-brand { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
.login-brand div, .brand div { display: flex; flex-direction: column; }
.login-brand strong { font-size: 20px; }
.login-brand span, .brand span { color: var(--muted); font-size: 12px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #fff !important; background: linear-gradient(145deg, #0aa094, #087783); font-size: 21px !important; box-shadow: 0 8px 18px rgba(7, 141, 132, .24); }
.login-copy { align-self: center; }
.login-copy h1 { margin: 12px 0 18px; font-size: clamp(30px, 4vw, 46px); line-height: 1.18; letter-spacing: -.04em; }
.login-copy p { max-width: 540px; color: var(--muted); line-height: 1.8; }
.login-form { align-self: center; display: grid; gap: 18px; padding: 32px; border-radius: 18px; background: #f7fafb; border: 1px solid var(--line); }
.login-form label, .toolbar label, .global-filters label { display: grid; gap: 7px; font-size: 12px; font-weight: 700; color: #40586e; }
.input-shell { display: flex; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid #cfdbe4; border-radius: 9px; background: #fff; }
.input-shell input { width: 100%; border: 0; outline: 0; padding: 12px 0; background: transparent; }
.error-text, .warning-text { margin: 0; min-height: 20px; color: var(--red); font-size: 12px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 204px 1fr; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: 204px; display: flex; flex-direction: column; padding: 20px 11px; color: #fff; background: linear-gradient(180deg, #0b2a44, #08233a); box-shadow: 7px 0 24px rgba(8, 35, 58, .08); }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 12px 24px; }
.brand strong { font-size: 15px; white-space: nowrap; }
.brand span { color: #aac0d0; font-size: 10px; margin-top: 4px; }
#nav { display: grid; gap: 4px; overflow-y: auto; padding-right: 2px; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 15px; border: 0; border-radius: 8px; background: transparent; color: #d7e4ed; font-weight: 650; text-align: left; transition: .15s; }
.nav-item i { width: 20px; font-size: 18px; color: #c7dce9; }
.nav-item:hover { background: rgba(255,255,255,.07); }
.nav-item.active { background: #1d4862; color: #fff; box-shadow: inset 3px 0 0 #19c4b1; }
.nav-item.active i { color: #22c9b8; }
.sidebar-user { margin-top: auto; min-height: 58px; display: grid; grid-template-columns: 36px 1fr 30px; align-items: center; gap: 9px; padding: 10px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); border-radius: 9px; }
.sidebar-user div { display: flex; min-width: 0; flex-direction: column; }
.sidebar-user strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user span { color: #b9ccda; font-size: 10px; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #6989ae; color: #fff !important; font-size: 14px !important; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: inherit; }
.icon-button:hover { background: rgba(255,255,255,.1); }

.workspace { min-width: 0; grid-column: 2; }
.topbar { position: sticky; z-index: 20; top: 0; min-height: 80px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px; padding: 12px 22px 12px 28px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar-title { display: flex; align-items: center; gap: 8px; }
.topbar h1 { margin: 0; font-size: 24px; white-space: nowrap; }
.mobile-menu { display: none; }
.global-filters { display: flex; align-items: center; gap: 10px; min-width: 0; }
.filter-label { font-size: 12px; font-weight: 700; color: #40586e; }
.platform-tabs { display: flex; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.platform-tabs button { min-width: 104px; padding: 9px 14px; border: 0; border-radius: 6px; background: transparent; color: #304a60; font-weight: 700; }
.platform-tabs button.active { color: #fff; background: linear-gradient(135deg, #0b978a, #087c83); box-shadow: 0 4px 10px rgba(7, 137, 130, .2); }
.divider { width: 1px; height: 28px; background: var(--line); }
.global-filters label { grid-template-columns: auto auto; align-items: center; white-space: nowrap; }
select, input { min-height: 38px; padding: 0 11px; border: 1px solid #cfdbe4; border-radius: 8px; background: #fff; color: var(--ink); outline: none; }
select:focus, input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(7, 152, 137, .1); }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.refresh-button { border: 0; padding: 10px 8px; background: transparent; color: #344b5e; font-weight: 650; white-space: nowrap; }
.sync-status { min-width: 110px; display: grid; grid-template-columns: 1fr auto; gap: 1px 7px; padding: 8px 11px; border-radius: 8px; background: #f4f7f9; }
.sync-status span { font-size: 10px; font-weight: 700; }
.sync-status strong { color: var(--green); font-size: 11px; }
.sync-status small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; text-align: right; }

.content { padding: 16px 26px 28px; }
.page { display: none; }
.page.active { display: block; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi-card { min-height: 126px; display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 14px; padding: 20px 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 3px 12px rgba(22, 50, 72, .04); }
.kpi-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; font-size: 25px; color: #fff; background: var(--teal); box-shadow: 0 7px 14px rgba(7, 152, 137, .22); }
.kpi-card.risk .kpi-icon { background: var(--red); box-shadow: 0 7px 14px rgba(220,57,67,.2); }
.kpi-card.stock .kpi-icon { background: var(--green); }
.kpi-card.supply .kpi-icon { background: var(--orange); }
.kpi-card span { display: block; color: #455c70; font-size: 12px; font-weight: 700; }
.kpi-card .kpi-icon { display: grid; color: #fff; }
.kpi-card strong { display: block; margin: 7px 0 5px; color: #0b2943; font-size: clamp(21px, 1.8vw, 32px); letter-spacing: -.03em; white-space: nowrap; }
.kpi-card strong small { font-size: 12px; color: inherit; }
.kpi-card.risk strong { color: #cc2733; }
.kpi-card.stock strong { color: #0f9769; }
.kpi-card.supply strong { color: #c56e00; }
.kpi-card p { margin: 0; color: var(--muted); font-size: 11px; }

.dashboard-grid { display: grid; grid-template-columns: 1.22fr .88fr; gap: 16px; }
.panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 3px 12px rgba(22, 50, 72, .035); }
.panel-head { min-height: 58px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 15px 16px 10px; }
.panel-head h2 { margin: 0; font-size: 16px; }
.panel-head h2 small { color: var(--muted); font-size: 11px; font-weight: 500; }
.panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.chart-panel { min-height: 373px; }
.chart-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px; color: #50677a; font-size: 9px; }
.chart-legend span::before { content: ""; display: inline-block; width: 13px; height: 2px; margin-right: 5px; vertical-align: middle; background: currentColor; }
.sales-dot { color: var(--blue) !important; }
.stock-dot { color: var(--green) !important; }
.value-dot { color: var(--blue-bright) !important; }
.value-dot::before { border-top: 1px dashed currentColor; background: transparent !important; }
.chart-wrap { position: relative; height: 235px; padding: 0 11px; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; cursor: crosshair; outline: 0; }
.chart-wrap canvas:focus { box-shadow: inset 0 0 0 2px rgba(7, 152, 137, .25); }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; background: #fff; }
.chart-tooltip { position: absolute; z-index: 3; top: 8px; transform: translateX(-50%); display: grid; gap: 3px; min-width: 130px; padding: 8px 10px; border-radius: 7px; color: #fff; background: rgba(9, 39, 63, .92); box-shadow: 0 8px 20px rgba(9, 39, 63, .2); font-size: 9px; pointer-events: none; }
.chart-tooltip strong { font-size: 10px; }
.chart-point-detail { display: grid; grid-template-columns: 1.1fr repeat(3, 1fr); gap: 8px; margin: 0 16px 8px; padding: 9px 12px; border-radius: 7px; color: #486176; background: #f5f8fa; font-size: 10px; }
.chart-point-detail strong { color: #0a2d47; }
.chart-summary { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 16px; border-top: 1px solid #edf1f4; }
.chart-summary div { padding: 12px 8px; text-align: center; border-right: 1px solid #edf1f4; }
.chart-summary div:last-child { border-right: 0; }
.chart-summary span { display: block; color: var(--muted); font-size: 10px; }
.chart-summary strong { display: block; margin-top: 4px; font-size: 17px; }
.chart-summary em { color: var(--green); font-size: 10px; font-style: normal; }
.action-panel, .ranking-panel, .risk-panel { min-height: 330px; }
.ranking-panel, .risk-panel { min-height: 292px; }
.ranking-panel td, .risk-panel td { padding-top: 7px; padding-bottom: 7px; }
.risk-panel table { table-layout: fixed; min-width: 0; }
.risk-panel th, .risk-panel td { padding-left: 6px; padding-right: 6px; font-size: 9px; overflow: hidden; }
.risk-panel th:nth-child(1) { width: 32%; }
.risk-panel th:nth-child(2) { width: 12%; }
.risk-panel th:nth-child(3) { width: 13%; }
.risk-panel th:nth-child(4) { width: 18%; }
.risk-panel th:nth-child(5) { width: 12%; }
.risk-panel th:nth-child(6) { width: 13%; }
.risk-panel .row-action { padding: 5px 6px; }
.ranking-panel .sku-cell strong, .risk-panel .sku-cell strong {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.action-panel td { padding: 6px 9px; line-height: 1.18; }
.action-panel th { padding: 7px 9px; }
.action-panel .product-cell strong {
  max-width: 210px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.action-panel .row-action { padding: 5px 8px; }
.table-wrap { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { padding: 9px 12px; color: #607487; background: #f5f7f9; font-size: 10px; font-weight: 700; text-align: left; white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid #e5ebf0; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f9fbfc; }
.wide-table { min-width: 1120px; }
.sku-cell strong, .product-cell strong { display: block; font-size: 11px; }
.sku-cell span, .product-cell span { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; padding: 4px 7px; border: 1px solid transparent; border-radius: 5px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.badge.high, .badge.断货风险, .badge.库存不足风险, .badge.高风险 { color: #d52734; border-color: #f19096; background: #fff2f3; }
.badge.medium, .badge.超标 { color: #d56a04; border-color: #ffab60; background: #fff5e9; }
.badge.关注 { color: #9e7300; border-color: #ebc34d; background: #fff9df; }
.badge.健康 { color: #14835c; border-color: #71d2ae; background: #effbf6; }
.badge.neutral, .badge.数据不足 { color: #607487; background: #eef3f6; }
.badge.待处理, .badge.待申请, .badge.待审核, .badge.待确认 { color: #9b6900; border-color: #e5bc54; background: #fff8df; }
.badge.通过, .badge.调整后通过, .badge.已通过, .badge.已执行 { color: #14835c; border-color: #71d2ae; background: #effbf6; }
.badge.驳回, .badge.已驳回 { color: #d52734; border-color: #f19096; background: #fff2f3; }
.badge.warning { color: #b56b00; background: var(--orange-soft); }
.trend-up { color: #0d9b68; font-weight: 800; }
.trend-down { color: var(--red); font-weight: 800; }
.trend-flat { color: var(--muted); font-weight: 700; }
.row-action { padding: 6px 11px; border: 1px solid #26aeb0; border-radius: 5px; color: #0b7381; background: #fff; font-size: 10px; font-weight: 750; white-space: nowrap; }
.row-action.danger { color: #fff; border-color: var(--red); background: var(--red); }
.inline-detail { margin-left: 8px; padding: 2px 0; border: 0; color: #087c83; background: transparent; font-size: 10px; font-weight: 750; }
.sku-link { display: block; width: 100%; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; }
.sku-link:hover strong, .inline-detail:hover { color: #0a9b91; }
.focus-row { background: #e9fbf8 !important; box-shadow: inset 4px 0 0 var(--teal); }
.panel-link { width: 100%; padding: 10px; border: 0; border-top: 1px solid var(--line); color: #07938c; background: #fff; font-size: 10px; font-weight: 700; }
.panel-link:hover { background: #f3fbfa; }
.segmented { display: flex; padding: 2px; border: 1px solid var(--line); border-radius: 6px; }
.segmented button { padding: 5px 10px; border: 0; border-radius: 4px; color: #617587; background: #fff; font-size: 9px; font-weight: 700; }
.segmented button.active { color: #fff; background: var(--teal); }
.dashboard-note { margin: 18px 6px 0; color: #74889a; font-size: 10px; }

.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.page-intro.compact { margin-bottom: 12px; }
.page-intro h2 { margin: 5px 0 3px; font-size: 24px; }
.page-intro p { margin: 0; color: var(--muted); font-size: 12px; }
.page-actions { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.tall-chart { margin-bottom: 16px; }
.tall-chart .chart-wrap { height: 360px; }
.toolbar { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.toolbar .grow { flex: 1; }
.toolbar label { min-width: 180px; }
.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border: 1px solid transparent; border-radius: 8px; font-weight: 750; text-decoration: none; }
.button.primary { color: #fff; background: linear-gradient(135deg, #099789, #087783); }
.button.secondary { color: #16435f; border-color: #c9d7e1; background: #fff; }
.button.wide { width: 100%; }
.health-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.health-card { padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.health-card span { color: var(--muted); font-size: 11px; }
.health-card strong { display: block; margin-top: 7px; font-size: 24px; }
.health-card small { color: var(--muted); }
.page-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.page-tabs button { padding: 9px 18px; border: 1px solid var(--line); border-radius: 8px; color: #4c6477; background: #fff; font-weight: 700; }
.page-tabs button.active { color: #fff; border-color: var(--teal); background: var(--teal); }
.review-input { width: 88px; min-height: 32px; }
.review-select { min-height: 32px; min-width: 105px; }
.report-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.report-card { padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.report-card i { color: var(--teal); font-size: 23px; }
.report-card strong { display: block; margin: 11px 0 4px; font-size: 22px; }
.report-card span { color: var(--muted); font-size: 11px; }
.import-panel { padding: 16px; margin-bottom: 16px; }
.drop-zone { position: relative; min-height: 175px; display: grid; place-items: center; align-content: center; gap: 7px; margin-bottom: 14px; border: 1.5px dashed #99b2c3; border-radius: 10px; color: var(--muted); background: #f8fbfc; }
.drop-zone.dragover { border-color: var(--teal); background: var(--teal-soft); }
.drop-zone i { color: var(--teal); font-size: 38px; }
.drop-zone strong { color: var(--ink); }
.drop-zone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.mapping-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 16px 16px; }
.mapping-item { display: grid; gap: 5px; }
.mapping-item label { color: #4f6577; font-size: 10px; font-weight: 750; }
#mappingPanel .warning-text, #mappingPanel > .button { margin: 12px 16px 16px; }
#importResult { padding: 18px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-group { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.settings-group h3 { margin: 0; padding: 15px 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
.setting-row { display: grid; grid-template-columns: 1fr 110px 60px; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #edf1f4; }
.setting-row:last-child { border-bottom: 0; }
.setting-row strong { display: block; font-size: 11px; }
.setting-row span { color: var(--muted); font-size: 9px; }
.empty-state { min-height: 470px; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; }
.empty-state i { color: #84a2b5; font-size: 42px; }
.empty-state h2, .empty-state p { margin: 0; }
.empty-state p { color: var(--muted); }

.drawer-backdrop { position: fixed; z-index: 80; inset: 0; background: rgba(7, 28, 45, .36); }
.sku-drawer { position: fixed; z-index: 90; top: 0; right: 0; width: min(520px, 100vw); height: 100vh; display: grid; grid-template-rows: auto 1fr; transform: translateX(104%); color: var(--ink); background: #f5f8fa; box-shadow: -18px 0 45px rgba(7, 28, 45, .18); transition: transform .22s ease; }
.sku-drawer.open { transform: translateX(0); }
.drawer-open { overflow: hidden; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--line); background: #fff; }
.drawer-head span { color: var(--muted); font-size: 11px; }
.drawer-head h2 { margin: 4px 0 0; font-size: 21px; }
.drawer-close { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; color: #39546a; background: #fff; }
.drawer-body { overflow-y: auto; padding: 18px; }
.drawer-loading, .drawer-error { min-height: 220px; display: grid; place-items: center; color: var(--muted); }
.drawer-error { color: var(--red); }
.drawer-status { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; color: var(--muted); font-size: 11px; }
.drawer-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.drawer-metrics div { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.drawer-metrics span { display: block; color: var(--muted); font-size: 9px; }
.drawer-metrics strong { display: block; margin-top: 5px; font-size: 15px; }
.drawer-section { margin-bottom: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.drawer-section h3 { margin: 0 0 10px; font-size: 14px; }
.drawer-section p { margin: 5px 0; color: #4b6274; font-size: 11px; line-height: 1.55; }
.drawer-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.drawer-action-card { padding: 11px; border-radius: 8px; background: #f3f8f9; }
.drawer-action-card span, .drawer-action-card small { display: block; color: var(--muted); font-size: 9px; }
.drawer-action-card strong { display: block; margin: 5px 0; font-size: 19px; }
.drawer-primary { width: 100%; }

@media (max-width: 1350px) {
  .topbar { grid-template-columns: auto 1fr; }
  .topbar-actions { grid-column: 2; grid-row: 2; justify-content: flex-end; }
}

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .chart-panel, .action-panel, .ranking-panel, .risk-panel { min-height: auto; }
}

@media (max-width: 860px) {
  .app-shell { display: block; }
  .sidebar { transform: translateX(-100%); transition: .2s; }
  .app-shell.menu-open .sidebar { transform: translateX(0); }
  .workspace { grid-column: 1; }
  .mobile-menu { display: grid; color: var(--ink); }
  .topbar { grid-template-columns: 1fr auto; padding: 10px 14px; }
  .global-filters { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; padding-bottom: 2px; }
  .topbar-actions { grid-column: 2; grid-row: 1; }
  .refresh-button { font-size: 0; }
  .refresh-button i { font-size: 17px; }
  .sync-status { display: none; }
  .content { padding: 12px; }
  .login-card { grid-template-columns: 1fr; }
  .login-copy { display: none; }
  .settings-grid, .health-grid, .report-cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .topbar h1 { font-size: 20px; }
  .global-filters .divider, .filter-label { display: none; }
  .global-filters { width: 100%; align-items: flex-end; flex-wrap: wrap; overflow: visible; }
  .global-filters label { min-width: 0; flex: 1; grid-template-columns: 1fr; }
  .global-filters label select { width: 100%; }
  .platform-tabs { width: 100%; }
  .platform-tabs button { min-width: 0; flex: 1; padding: 8px; }
  .kpi-grid, .settings-grid, .health-grid, .report-cards { grid-template-columns: 1fr; }
  .kpi-card { min-height: 105px; }
  .chart-legend { display: none; }
  .chart-summary { grid-template-columns: repeat(2, 1fr); }
  .chart-summary div:nth-child(2) { border-right: 0; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar label { width: 100%; min-width: 0; }
  .mapping-grid { grid-template-columns: 1fr; }
  .page-intro { align-items: flex-start; flex-direction: column; }
  .chart-point-detail { grid-template-columns: 1fr 1fr; }
  .drawer-metrics, .drawer-actions { grid-template-columns: 1fr 1fr; }
}
