:root {
  --mg-red: #017BFF;
  --mg-red-700: #016AFA;
  --mg-burgundy: #014DA3;
  --mg-burgundy-900: #002F70;
  --ink: #16191f;
  --ink-2: #282d36;
  --muted: #6f7785;
  --muted-2: #9ca3af;
  --line: #e5e7eb;
  --line-strong: #d3d7de;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --surface-3: #eef0f3;
  --success: #12805c;
  --warning: #a86206;
  --danger: #bb2533;
  --info: #2765b7;
  --sidebar: 272px;
  --sidebar-collapsed: 82px;
  --topbar: 72px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(18, 24, 40, .05), 0 1px 4px rgba(18, 24, 40, .03);
  --shadow: 0 12px 35px rgba(23, 28, 38, .09);
  --shadow-lg: 0 30px 70px rgba(17, 20, 28, .22);
  --ease: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #f2f3f5; scrollbar-gutter: stable; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 0%, rgba(1,77,163,.055), transparent 30rem),
    #f2f3f5;
  font-family: "Century Gothic", Manrope, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.drawer-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.icon { display: inline-grid; place-items: center; flex: 0 0 auto; }
.icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
img { max-width: 100%; }
[hidden], .hidden { display: none !important; }
.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important;
}

/* Shell */
.portal-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0,1fr); transition:grid-template-columns .22s var(--ease); }
.sidebar {
  position: sticky; top: 0; z-index: 40; height: 100vh; height: 100dvh; overflow: auto; align-self: start; overflow-anchor: none; scrollbar-gutter: stable;
  display: flex; flex-direction: column; gap: 0;
  padding: 25px 18px 18px;
  color: #f8f8fa;
  background:
    linear-gradient(145deg, rgba(1,123,255,.15), transparent 35%),
    linear-gradient(180deg, #003C7F 0%, #002F70 55%, #00224F 100%);
  border-right: 1px solid rgba(255,255,255,.08);
}
.sidebar-collapse-button {
  position:absolute; top:14px; right:12px; z-index:2; width:31px; height:31px;
  display:grid; place-items:center; padding:0; border:1px solid rgba(255,255,255,.13); border-radius:9px;
  color:rgba(255,255,255,.76); background:rgba(0,34,79,.44); cursor:pointer;
  transition:background .18s var(--ease),color .18s var(--ease),transform .18s var(--ease);
}
.sidebar-collapse-button:hover { color:#fff; background:rgba(255,255,255,.12); }
.sidebar-collapse-button:focus-visible { outline:3px solid rgba(115,199,255,.32); outline-offset:2px; }
.sidebar-collapse-button .icon { width:15px; height:15px; transform:rotate(180deg); transition:transform .22s var(--ease); }
.sidebar-brand-compact { display:none; width:44px; height:44px; place-items:center; border:1px solid rgba(255,255,255,.16); border-radius:13px; background:rgba(255,255,255,.08); font-size:12px; font-weight:900; letter-spacing:.08em; }
.brand { min-height: 80px; display: grid; justify-items: start; align-content: center; gap: 2px; padding: 0 10px; border-radius: 10px; }
.brand:hover { background: rgba(255,255,255,.045); }
.sidebar-brand-logo { display: block; width: 148px; height: auto; aspect-ratio: 706 / 393; flex-shrink: 0; }
.sidebar>.brand,.sidebar>.sidebar-rule,.sidebar>.nav-label,.sidebar>.sidebar-nav,.sidebar>.sidebar-user{flex-shrink:0}
.sidebar .nav-link>span:not(.icon){white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.brand-network-label { margin-left: 18px; color: rgba(255,255,255,.52); font-size: 8px; font-weight: 750; letter-spacing: .14em; }
.sidebar-rule { margin: 22px 0 19px; height: 1px; background: rgba(255,255,255,.09); }
.nav-label { display: block; margin: 0 10px 9px; color: rgba(255,255,255,.4); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 43px; padding: 10px 12px; border-radius: 10px;
  color: rgba(255,255,255,.68); font-weight: 600; font-size: 12.5px;
  transition: background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.065); transform: translateX(2px); }
.nav-link.is-active { color: #fff; background: linear-gradient(90deg, rgba(1,123,255,.9), rgba(1,77,163,.75)); box-shadow: 0 9px 24px rgba(1,77,163,.26); }
.nav-link .icon { width: 18px; height: 18px; opacity: .84; }
.nav-link.is-active .icon { opacity: 1; }
.nav-dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: #73C7FF; box-shadow: 0 0 0 4px rgba(255,112,119,.1); }
.nav-divider { height: 1px; margin: 10px 5px; background: rgba(255,255,255,.08); }
.admin-sidebar { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.admin-sidebar::-webkit-scrollbar { width: 5px; }
.admin-sidebar::-webkit-scrollbar-thumb { border-radius: 5px; background: rgba(255,255,255,.18); }
.admin-back-link {
  display:flex; align-items:center; gap:9px; min-height:38px; margin-top:17px; padding:8px 10px;
  border:1px solid rgba(255,255,255,.1); border-radius:9px; color:rgba(255,255,255,.72);
  background:rgba(255,255,255,.035); font-size:10.5px; font-weight:700; transition:background .18s,color .18s;
}
.admin-back-link:hover { color:#fff; background:rgba(255,255,255,.08); }
.admin-back-link .icon { width:14px; height:14px; transform:rotate(180deg); }
.admin-sidebar-rule { margin:13px 0 12px; }
.admin-sidebar-nav { display:flex; flex-direction:column; gap:13px; }
.admin-nav-group { display:grid; gap:2px; }
.admin-nav-group-label {
  display:block; margin:0 9px 4px; color:rgba(255,255,255,.34);
  font-size:7.5px; font-weight:850; letter-spacing:.095em; text-transform:uppercase;
}
.admin-subnav-link {
  position:relative; display:flex; align-items:center; gap:9px; min-height:32px; padding:6px 9px;
  border-radius:8px; color:rgba(255,255,255,.66); font-size:10.5px; font-weight:650;
  transition:background .16s var(--ease),color .16s var(--ease),transform .16s var(--ease);
}
.admin-subnav-link:hover { color:#fff; background:rgba(255,255,255,.065); transform:translateX(2px); }
.admin-subnav-link.is-active {
  color:#fff; background:linear-gradient(90deg,rgba(1,123,255,.94),rgba(1,77,163,.7));
  box-shadow:0 7px 18px rgba(0,36,83,.24),inset 0 1px rgba(255,255,255,.08);
}
.admin-subnav-link .icon { width:14px; height:14px; opacity:.72; }
.admin-subnav-link.is-active .icon { opacity:1; }
.admin-subnav-link.is-active::after {
  content:""; width:5px; height:5px; margin-left:auto; border-radius:50%; background:#8fd8ff;
  box-shadow:0 0 0 3px rgba(143,216,255,.12);
}
.admin-sidebar .sidebar-spacer { min-height:14px; }
.sidebar-spacer { flex: 1 1 auto; min-height: 20px; }
.system-card {
  padding: 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 11px;
  background: rgba(255,255,255,.04); box-shadow: inset 0 1px rgba(255,255,255,.04);
}
.system-card > div { display: flex; align-items: center; gap: 7px; }
.system-card strong { font-size: 9.5px; letter-spacing: .09em; }
.system-card > span { display: block; margin-top: 5px; color: rgba(255,255,255,.42); font-size: 9.5px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #4bd39c; box-shadow: 0 0 0 4px rgba(75,211,156,.12); }
.sidebar-user {
  display: grid; grid-template-columns: 36px 1fr 16px; align-items: center; gap: 10px;
  margin-top: 12px; padding: 10px; border-radius: 11px;
  color: rgba(255,255,255,.84); transition: background .18s;
}
.sidebar-user:hover { background: rgba(255,255,255,.06); }
.sidebar-user.is-active { background:rgba(255,255,255,.09); box-shadow:inset 3px 0 #45b9ff; }
.avatar {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: #E7F3FF; color: var(--mg-burgundy); font-weight: 850; font-size: 11px;
}
.sidebar-user strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.sidebar-user small { display: block; margin-top: 2px; color: rgba(255,255,255,.42); font-size: 9px; }
.sidebar-user .icon { width: 14px; opacity: .35; }

.workspace { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar);
  display: flex; align-items: center; gap: 18px; padding: 0 28px;
  background: rgba(255,255,255,.91); backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(211,215,222,.82);
}
.topbar-title { min-width: 0; }
.topbar-title strong { display: block; font-size: 15px; letter-spacing: -.015em; }
.topbar-title span { display: block; margin-top: 3px; color: var(--muted); font-size: 9.5px; font-weight: 700; letter-spacing: .085em; }
.topbar-controls { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-select { position: relative; }
.top-select select {
  min-height: 36px; max-width: 190px; padding: 0 30px 0 11px;
  border: 1px solid var(--line); border-radius: 9px;
  background: #f8f9fa; color: var(--ink-2); outline: 0;
  font-size: 11px; font-weight: 650; cursor: pointer;
}
.dealer-select select { width:220px; max-width:220px; }
.top-select select:focus { border-color: rgba(1,123,255,.45); box-shadow: 0 0 0 3px rgba(1,123,255,.08); }
.locale-select select { width: 76px; }

/* Design system · accessible custom select */
.ds-select { position:relative; min-width:0; width:100%; }
.ds-native-select {
  position:absolute !important; inset:0 !important; z-index:-1 !important;
  width:100% !important; height:100% !important; min-height:0 !important;
  margin:0 !important; padding:0 !important; opacity:0 !important; pointer-events:none !important;
}
.ds-select-trigger {
  width:100%; min-width:0; min-height:38px; display:flex; align-items:center; gap:8px;
  padding:7px 11px; border:1px solid var(--line-strong); border-radius:9px;
  color:var(--ink-2); background:#fff; outline:0; cursor:pointer;
  font:inherit; font-size:11px; font-weight:700; text-align:left;
  transition:border-color .16s,box-shadow .16s,background .16s,transform .16s;
}
.ds-select-trigger:hover { border-color:#aeb8c5; background:#fbfdff; }
.ds-select-trigger:focus-visible,.ds-select.is-open .ds-select-trigger {
  border-color:#278df7; box-shadow:0 0 0 3px rgba(1,123,255,.11); background:#fff;
}
.ds-select.is-open .ds-select-trigger { transform:translateY(-1px); }
.ds-select.is-disabled .ds-select-trigger { color:#9aa2ac; background:#f4f5f7; cursor:not-allowed; }
.ds-select.is-invalid .ds-select-trigger { border-color:#d63b50; box-shadow:0 0 0 3px rgba(214,59,80,.1); }
.ds-select-value { min-width:0; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ds-select.is-empty .ds-select-value { color:#737d89; font-weight:600; }
.ds-select-chevron {
  width:8px; height:8px; flex:0 0 auto; margin:0 2px 3px 5px;
  border-right:1.8px solid #66717e; border-bottom:1.8px solid #66717e;
  transform:rotate(45deg); transition:transform .17s ease,margin .17s ease;
}
.ds-select.is-open .ds-select-chevron { margin-top:5px; margin-bottom:0; transform:rotate(225deg); }
.ds-select-trigger-tone,.ds-select-tone { display:none; width:7px; height:7px; flex:0 0 auto; border-radius:999px; }
.ds-select-trigger.has-tone .ds-select-trigger-tone,.ds-select-option.has-tone .ds-select-tone { display:block; }
.tone-success .ds-select-trigger-tone,.ds-select-option.tone-success .ds-select-tone { background:#20a977; box-shadow:0 0 0 3px rgba(32,169,119,.1); }
.tone-danger .ds-select-trigger-tone,.ds-select-option.tone-danger .ds-select-tone { background:#d84b5d; box-shadow:0 0 0 3px rgba(216,75,93,.1); }
.tone-warning .ds-select-trigger-tone,.ds-select-option.tone-warning .ds-select-tone { background:#dc921e; box-shadow:0 0 0 3px rgba(220,146,30,.1); }
.tone-info .ds-select-trigger-tone,.ds-select-option.tone-info .ds-select-tone { background:#398ada; box-shadow:0 0 0 3px rgba(57,138,218,.1); }
.tone-neutral .ds-select-trigger-tone,.ds-select-option.tone-neutral .ds-select-tone { background:#8d98a6; box-shadow:0 0 0 3px rgba(111,124,140,.1); }
.ds-select-popover {
  position:fixed; z-index:350; overflow:hidden; padding:5px;
  border:1px solid rgba(173,184,198,.8); border-radius:13px;
  background:rgba(255,255,255,.985); box-shadow:0 18px 55px rgba(31,49,72,.19),0 3px 12px rgba(31,49,72,.09);
  backdrop-filter:blur(18px); animation:ds-select-in .14s var(--ease) both;
}
.ds-select-popover[hidden] { display:none; }
.ds-select-popover[data-placement="top"] { transform-origin:bottom center; }
.ds-select-popover[data-placement="bottom"] { transform-origin:top center; }
@keyframes ds-select-in { from { opacity:0; transform:translateY(-4px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }
.ds-select-search { position:relative; padding:5px 5px 7px; border-bottom:1px solid var(--line); }
.ds-select-search[hidden] { display:none; }
.ds-select-search .icon { position:absolute; left:16px; top:50%; width:14px; height:14px; color:#718092; transform:translateY(-58%); pointer-events:none; }
.ds-select-search input {
  width:100%; min-height:38px; padding:7px 10px 7px 33px; border:1px solid #d5dce5; border-radius:8px;
  color:var(--ink-2); background:#f8fafc; outline:0; font:inherit; font-size:11px;
}
.ds-select-search input:focus { border-color:#278df7; box-shadow:0 0 0 3px rgba(1,123,255,.09); background:#fff; }
.ds-select-list { max-height:min(310px,calc(100dvh - 150px)); overflow:auto; padding:3px 0; scrollbar-width:thin; scrollbar-color:#c4cfdb transparent; }
.ds-select-option {
  width:100%; min-height:40px; display:flex; align-items:center; gap:9px; padding:7px 9px;
  border:0; border-radius:8px; color:#303946; background:transparent; cursor:pointer;
  font:inherit; font-size:11px; font-weight:660; line-height:1.25; text-align:left;
}
.ds-select-option:hover,.ds-select-option.is-active { color:#0c5dab; background:#edf6ff; }
.ds-select-option.is-selected { color:#075fae; background:#e6f3ff; font-weight:790; }
.ds-select-option:disabled { color:#a2a9b2; cursor:not-allowed; }
.ds-select-option[hidden] { display:none; }
.ds-select-option-label { min-width:0; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ds-select-context-badge {
  flex:0 0 auto; padding:3px 7px; border:1px solid #b9ddff; border-radius:999px;
  color:#075fae; background:#edf7ff; font-size:8px; font-weight:820; line-height:1;
  letter-spacing:.035em; text-transform:uppercase;
}
.ds-select-check { width:17px; height:17px; flex:0 0 auto; display:grid; place-items:center; color:#0878e8; opacity:0; }
.ds-select-check .icon { width:14px; height:14px; }
.ds-select-option.is-selected .ds-select-check { opacity:1; }
.ds-select-empty { padding:22px 12px; color:var(--muted); text-align:center; font-size:10.5px; }
.ds-select-empty[hidden] { display:none; }
.ds-select-footer { min-height:27px; display:flex; align-items:center; padding:4px 9px 1px; border-top:1px solid var(--line); color:#7e8894; font-size:9px; }
.ds-select-popover:not(.is-searchable) .ds-select-footer { display:none; }
.top-select .ds-select-trigger { min-height:36px; padding:6px 10px; border-color:var(--line); background:#f8f9fa; font-size:11px; }
.dealer-select .ds-select { width:255px; }
.period-select .ds-select { width:235px; }
.locale-select .ds-select { width:76px; }
.locale-select .ds-select-trigger { justify-content:center; padding-left:12px; }
.table-toolbar > .ds-select { width:auto; min-width:142px; }
.filter-control .ds-select,.control-field .ds-select,.form-field .ds-select { width:100%; }
.chart-toolbar .ds-select { min-width:180px; }
.sheet-actionbar > .ds-select { flex:0 1 auto; width:auto; min-width:170px; }
.icon-button {
  position: relative; width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
}
.icon-button:hover { background: #f6f7f9; border-color: var(--line-strong); transform: translateY(-1px); }
.icon-button .icon { width: 17px; height: 17px; }
.notification-button i { position: absolute; right: -2px; top: -3px; min-width: 15px; height: 15px; padding:0 3px; display: grid; place-items: center; border: 2px solid white; border-radius: 999px; background: var(--mg-red); color: white; font-size: 8px; font-style: normal; font-weight: 800; }
.notification-button i[hidden] { display:none; }
.mobile-menu-button { display: none; }
.page { position: relative; min-height: calc(100vh - var(--topbar)); padding: 28px; overflow-anchor:none; }

/* Typography / page headers */
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 22px; margin-bottom: 22px; }
.page-header h1 { margin: 4px 0 5px; font-size: clamp(23px,2vw,31px); line-height: 1.1; letter-spacing: -.04em; }
.page-header p { max-width: 760px; margin: 0; color: var(--muted); font-size: 12.5px; }
.page-header-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.eyebrow { color: var(--mg-red-700); font-size: 9.5px; font-weight: 850; letter-spacing: .14em; }
.section-title { margin: 0; font-size: 15px; line-height: 1.2; letter-spacing: -.02em; }
.section-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 11.5px; }
.muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* Buttons */
.btn {
  min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 14px; border: 1px solid transparent; border-radius: 9px; cursor: pointer;
  font-size: 11.5px; font-weight: 750; line-height: 1;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), background .16s, border-color .16s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.btn .icon { width: 15px; height: 15px; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--mg-red), var(--mg-burgundy)); box-shadow: 0 7px 18px rgba(1,106,250,.2); }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(1,106,250,.27); }
.btn-secondary { color: var(--ink-2); background: #fff; border-color: var(--line-strong); }
.btn-secondary:hover { background: #f8f9fa; }
.btn-dark { color: #fff; background: var(--ink-2); }
.btn-danger { color: #fff; background: var(--danger); }
.btn-ghost { color: var(--ink-2); background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { min-height: 31px; padding: 0 10px; border-radius: 8px; font-size: 10.5px; }
.btn-icon { width: 34px; padding: 0; }
.action-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

/* Cards / grids */
.card {
  min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 19px; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 17px 19px 14px; border-bottom: 1px solid var(--line); }
.card-header > div:first-child { min-width:0; }
.card-header .action-row { min-width:0; flex:1 1 auto; justify-content:flex-end; }
.card-body { padding: 18px 19px; }
.card-footer { padding: 13px 19px; border-top: 1px solid var(--line); background: #fafbfc; border-radius: 0 0 var(--radius) var(--radius); }
.grid-2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.dashboard-chart-grid { align-items: start; }
.dashboard-chart-grid > .chart-card { min-height: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 10px; }
.kpi-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.kpi-grid.sales-kpi-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
.kpi-grid.margin-summary-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
.kpi-card { position: relative; min-height: 128px; overflow: hidden; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
.kpi-card::after { content: ""; position: absolute; width: 75px; height: 75px; right: -35px; top: -35px; border-radius: 50%; background: rgba(1,123,255,.045); }
.kpi-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.kpi-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; background: #f6e8ea; color: var(--mg-red-700); }
.kpi-icon .icon { width: 14px; height: 14px; }
.metric { margin-top: 16px; font-size: 25px; font-weight: 880; letter-spacing: -.045em; line-height: 1; }
.metric.compact { font-size: 20px; }
.metric-note { margin-top: 7px; color: var(--muted); font-size: 10px; }
.trend { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; font-size: 10px; font-weight: 800; }
.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }
.progress { height: 6px; overflow: hidden; margin-top: 10px; border-radius: 999px; background: var(--surface-3); }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--mg-red),var(--mg-burgundy)); }
.snapshot-strip { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 11px 14px; border: 1px solid var(--line); border-left: 3px solid var(--mg-red); border-radius: 9px; background: #fff; color: var(--muted); font-size: 10.5px; }
.snapshot-strip strong { color: var(--ink-2); }
.snapshot-strip .spacer { flex: 1; }

/* Charts */
.chart-card { min-height: 350px; }
.chart-card .card-header:has(.series-toggle) { position:relative; align-items:flex-start; flex-direction:column; gap:12px; }
.chart-card .card-header:has(.series-toggle) > div:first-child { padding-right:150px; }
.chart-card .card-header:has(.series-toggle) .action-row { width: 100%; justify-content: flex-start; }
.chart-card .card-header:has(.series-toggle) .series-toggle { justify-content: flex-start; }
.chart-card .card-header:has(.series-toggle) .data-label-toggle { position:absolute; top:17px; right:19px; }
.chart-wrap { position: relative; min-height: 280px; padding: 8px 2px 0; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.chart-tooltip { position: fixed; z-index: 1000; max-width: min(260px,calc(100vw - 16px)); pointer-events: none; padding: 7px 9px; border: 1px solid rgba(255,255,255,.12); border-radius: 7px; color: #fff; background: rgba(24,27,34,.96); box-shadow: var(--shadow); font-size: 10px; line-height: 1.35; opacity: 0; visibility: hidden; transform: none; transition: opacity .08s; }
.legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; }
.legend .line-mark { width: 14px; height: 2px; border-radius: 2px; }
.donut-layout { display: grid; grid-template-columns: 190px 1fr; align-items: center; gap: 18px; min-height: 280px; }
.donut-chart { position: relative; width: 178px; height: 178px; margin: auto; }
.donut-chart svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-segment { cursor: pointer; transition: opacity .12s ease; }
.donut-segment:hover,.donut-segment:focus { opacity: .78; outline: none; }
.donut-center { position: absolute; inset: 22px; display: grid; place-content: center; min-width: 0; pointer-events: none; text-align: center; }
.donut-center strong { display: block; max-width: 132px; overflow-wrap: anywhere; font-size: 25px; line-height: 1.02; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.donut-center.is-compact strong { font-size: 20px; }
.donut-center.is-tight strong { font-size: 16px; line-height: 1.08; }
.donut-center small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.2; }
.donut-legend { display: grid; gap: 9px; }
.donut-legend article { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 9px; font-size: 11px; }
.donut-legend i { width: 8px; height: 8px; border-radius: 50%; }
.donut-legend strong { font-size: 11px; }
.donut-legend span { color: var(--muted); }
.donut-legend b { min-width: 0; overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; font-variant-numeric: tabular-nums; }
#model-donut .donut-layout {
  grid-template-columns: 190px minmax(260px,360px);
  justify-content: center;
  width: min(100%,680px);
  min-height: 260px;
  margin: 0 auto;
}
#model-donut .donut-legend article { grid-template-columns: 8px minmax(70px,1fr) minmax(116px,auto); }
.margin-reconciliation { display:grid; gap:18px; min-height:280px; align-content:center; padding:18px 8px 8px; }
.margin-reconciliation-row { display:grid; gap:8px; }
.margin-reconciliation-label { display:grid; grid-template-columns:10px minmax(0,1fr) auto; align-items:center; gap:10px; }
.margin-reconciliation-label > i { width:9px; height:9px; border-radius:50%; }
.margin-reconciliation-label > span { min-width:0; color:var(--muted); font-size:11px; font-weight:760; }
.margin-reconciliation-label > b { color:var(--ink-2); font-size:11px; font-variant-numeric:tabular-nums; }
.margin-reconciliation-row.is-deduction .margin-reconciliation-label > b { color:#a76313; }
.margin-reconciliation-row.is-zero { opacity:.62; }
.margin-reconciliation-track { height:10px; overflow:hidden; border-radius:999px; background:#eef1f5; }
.margin-reconciliation-track > i { display:block; height:100%; min-width:0; border-radius:inherit; }
.margin-reconciliation footer { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:4px; padding-top:16px; border-top:1px solid var(--line); }
.margin-reconciliation footer span { color:var(--muted); font-size:11px; font-weight:760; }
.margin-reconciliation footer strong { color:var(--ink); font-size:18px; font-variant-numeric:tabular-nums; }
.margin-chart-grid { align-items:start; }
.technical-details { margin-top:16px; padding:11px 13px; border:1px dashed var(--line-strong); border-radius:9px; color:var(--muted); font-size:10.5px; }
.technical-details summary { cursor:pointer; color:var(--ink-2); font-weight:700; }
.technical-details code { display:block; margin-top:9px; overflow-wrap:anywhere; }
.telegram-link-state { display:grid; gap:9px; }
.telegram-link-state .alert-card { margin:0; }
.telegram-reset { margin-top:2px; }
.bar-list { display: grid; gap: 13px; }
.bar-row { display: grid; grid-template-columns: minmax(100px,180px) minmax(100px,1fr) 80px; align-items: center; gap: 12px; font-size: 10.5px; }
.bar-track { height: 9px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-fill { height: 100%; min-width: 2px; border-radius: inherit; background: linear-gradient(90deg,var(--mg-red),var(--mg-burgundy)); }
.bar-value { text-align: right; font-weight: 800; }
.categorical-chart-card { min-height:0; }
.categorical-chart-card .card-body { padding-block:22px 24px; }
.categorical-chart-wrap,.horizontal-bar-chart { min-height:0; height:auto; padding:0; overflow:visible; }
.categorical-chart-wrap .bar-list { gap:16px; }
.categorical-chart-wrap .bar-row { grid-template-columns:minmax(170px,250px) minmax(180px,1fr) minmax(90px,110px); min-height:29px; gap:18px; font-size:12px; }
.categorical-chart-wrap .bar-track { height:11px; }
.categorical-chart-wrap .bar-value { font-size:11.5px; }
.network-overview-grid { align-items:start; }
.network-trend-card { min-height:0; }
.network-trend-controls { display:grid; grid-template-columns:100px minmax(150px,1fr) minmax(150px,1fr) minmax(150px,1fr) minmax(190px,1.25fr) auto; align-items:end; gap:11px; padding:15px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); background:#fafbfc; }
.network-trend-controls .control-field { min-width:0; }
.network-trend-controls .select { width:100%; min-width:0; }
.network-trend-controls .btn { min-height:38px; }
.network-main-trend { min-height:315px; }
.network-trend-card .chart-legend { padding:0 8px 4px; }
.network-trend-card .chart-note { min-height:18px; margin:8px 8px 0; }
.portfolio-plan-card { min-height:0; }
.sparkline { width: 90px; height: 28px; }

/* Tables */
.table-wrap { overflow: auto; width: 100%; }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 11px; }
.data-table th { height: 40px; padding: 0 12px; border-bottom: 1px solid var(--line-strong); color: var(--muted); background: #fafbfc; text-align: left; font-size: 8.5px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.data-table td { height: 48px; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: #fafafb; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .align-right { text-align: right; }
.data-table .align-center { text-align: center; }
.table-primary { font-weight: 760; color: var(--ink-2); }
.table-secondary { display: block; margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.rank-cell { display: flex; align-items: center; gap: 8px; }
.rank-number { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-3); font-weight: 850; }
.rank-number.top { color: #82530a; background: #faedc9; }
.rank-change { min-width: 25px; font-size: 9.5px; font-weight: 800; }
.table-empty { padding: 40px 18px !important; text-align: center; color: var(--muted); }
.table-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.table-toolbar .search-field { min-width: 220px; flex: 1; }
.filter-toolbar { align-items: flex-end; background: #fcfdff; }
.filter-toolbar .filter-control { min-width: 142px; display: grid; gap: 5px; }
.filter-toolbar .filter-control > span { color: var(--muted); font-size: 8.5px; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.filter-toolbar .filter-control .select { min-width: 142px; }
.filter-context { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 15px; border-bottom: 1px solid var(--line); color: var(--muted); background: #f8fbff; }
.result-status { flex: 0 0 auto; font-size: 9.5px; }
.result-status strong { color: var(--ink-2); font-size: 11px; }
.active-filter-list { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.filter-chip { min-height: 27px; max-width: 250px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid #bad7f3; border-radius: 999px; color: #155f9f; background: #edf7ff; cursor: pointer; font-size: 8.5px; font-weight: 700; }
.filter-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-chip .icon { width: 11px; height: 11px; flex: 0 0 auto; }
.filter-chip:hover { border-color: #78b6ec; background: #e2f2ff; }
.filter-clear { min-height: 27px; padding: 2px 5px; border: 0; color: #596675; background: transparent; cursor: pointer; font-size: 8.5px; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.filter-chip:focus-visible,.filter-clear:focus-visible { outline: 2px solid #017BFF; outline-offset: 2px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10.5px; }
.pagination-summary { white-space: nowrap; }
.pagination-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pagination .btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.pagination-controls { display: flex; align-items: center; gap: 5px; }
.pagination-controls button { min-width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 7px; background: #fff; cursor: pointer; }
.pagination-controls button.is-active { color: #fff; border-color: var(--mg-red); background: var(--mg-red); }

@media (max-width: 640px) {
  .pagination { align-items: stretch; flex-direction: column; }
  .pagination-actions { justify-content: space-between; }
}

/* Badges */
.badge { display: inline-flex; align-items: center; justify-content: center; min-height: 21px; padding: 2px 7px; border-radius: 999px; border: 1px solid transparent; font-size: 8.5px; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
.badge-success { color: #0a6e4e; background: #e7f6f0; border-color: #c8ebdd; }
.badge-warning { color: #8d5508; background: #fff3d8; border-color: #f6deb0; }
.badge-danger { color: #a92131; background: #EAF4FF; border-color: #f1ccd1; }
.badge-info { color: #245d9d; background: #eaf2fc; border-color: #cddff5; }
.badge-muted { color: #69717d; background: #f0f1f3; border-color: #e0e2e6; }
.badge-dark { color: #fff; background: #2a2d34; }
.badge-red { color: #016AFA; background: #EAF4FF; border-color: #B9DCFF; }

/* Forms */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-spacer { flex: 1; }
.input, .select, .textarea {
  width: 100%; min-height: 38px; padding: 8px 11px;
  color: var(--ink-2); background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; outline: none;
  font-size: 11px; transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(1,123,255,.55); box-shadow: 0 0 0 3px rgba(1,123,255,.075); }
.input::placeholder, .textarea::placeholder { color: #a2a8b0; }
.search-field { position: relative; }
.search-field .icon { position: absolute; left: 11px; top: 50%; width: 14px; height: 14px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.search-field .input { padding-left: 34px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.form-grid.cols-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.form-field { display: grid; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field > label { color: #505763; font-size: 9.5px; font-weight: 800; letter-spacing: .035em; }
.form-field > small { color: var(--muted); font-size: 9px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; min-height: 38px; }
.checkbox-row input { accent-color: var(--mg-red); }
.checkbox-row label { font-size: 11px; }
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #f5f6f8; }
.segmented button { min-height: 29px; padding: 0 10px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; cursor: pointer; font-size: 10px; font-weight: 750; }
.segmented button.is-active { color: var(--ink); background: #fff; box-shadow: var(--shadow-sm); }
.file-drop {
  min-height: 150px; display: grid; place-content: center; gap: 7px; text-align: center;
  padding: 20px; border: 1px dashed #bcc1c9; border-radius: 11px; background: #fafbfc;
}
.file-drop .icon { width: 28px; height: 28px; margin: auto; color: var(--mg-red); }
.file-drop strong { font-size: 12px; }
.file-drop span { color: var(--muted); font-size: 10px; }

/* Alerts, lists, models */
.alert-list { display: grid; gap: 9px; }
.alert-card { display: grid; grid-template-columns: 31px 1fr; gap: 11px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.alert-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; }
.alert-icon .icon { width: 15px; height: 15px; }
.alert-card strong { display: block; font-size: 11.5px; }
.alert-card p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.alert-card.danger .alert-icon { color: var(--danger); background: #EAF4FF; }
.alert-card.warning .alert-icon { color: var(--warning); background: #fff3d8; }
.alert-card.success .alert-icon { color: var(--success); background: #e7f6f0; }
.model-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; padding:2px; }
.model-card { min-width:0; min-height:224px; display:flex; flex-direction:column; padding:16px; border:1px solid var(--line); border-radius:12px; text-align:left; background:#fff; cursor:pointer; transition:border-color .18s var(--ease),box-shadow .18s var(--ease),transform .18s var(--ease); }
.model-card:hover { border-color:#a9cff9; box-shadow:0 10px 24px rgba(1,77,163,.11); transform:translateY(-2px); }
.model-card:focus-visible { outline:3px solid rgba(1,123,255,.2); outline-offset:2px; }
.model-card-header { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.model-code { min-width:42px; height:42px; padding:0 8px; display:grid; place-items:center; border-radius:10px; color:#fff; background:linear-gradient(145deg,var(--mg-red),var(--mg-burgundy)); font-size:11px; font-weight:900; white-space:nowrap; }
.model-card h4 { min-height:38px; margin:14px 0 3px; font-size:14px; line-height:1.35; overflow-wrap:anywhere; }
.model-card .model-metric { margin-top: 9px; font-size: 21px; font-weight: 870; letter-spacing: -.04em; }
.model-card footer { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; margin-top:auto; padding-top:12px; border-top:1px solid var(--line); color:var(--muted); font-size:10px; }
.model-card footer strong { display:inline-flex; align-items:center; gap:3px; color:#075fac; white-space:nowrap; }
.model-card footer .icon { width:11px; height:11px; }

@media (min-width:1181px) {
  .portal-shell.is-sidebar-collapsed { grid-template-columns:var(--sidebar-collapsed) minmax(0,1fr); }
  .portal-shell.is-sidebar-collapsed .sidebar { padding:68px 12px 14px; overflow-x:hidden; }
  .portal-shell.is-sidebar-collapsed .sidebar-collapse-button { top:17px; right:23px; width:36px; height:36px; border-radius:12px; }
  .portal-shell.is-sidebar-collapsed .sidebar-collapse-button .icon { transform:none; }
  .portal-shell.is-sidebar-collapsed .brand { min-height:54px; justify-items:center; padding:0; }
  .portal-shell.is-sidebar-collapsed .sidebar-brand-logo,
  .portal-shell.is-sidebar-collapsed .brand-network-label,
  .portal-shell.is-sidebar-collapsed .nav-label,
  .portal-shell.is-sidebar-collapsed .nav-link > span:not(.icon),
  .portal-shell.is-sidebar-collapsed .admin-back-link > span:not(.icon),
  .portal-shell.is-sidebar-collapsed .admin-nav-group-label,
  .portal-shell.is-sidebar-collapsed .admin-subnav-link > span:not(.icon),
  .portal-shell.is-sidebar-collapsed .system-card,
  .portal-shell.is-sidebar-collapsed .sidebar-user > span:not(.avatar),
  .portal-shell.is-sidebar-collapsed .sidebar-user > .icon { display:none; }
  .portal-shell.is-sidebar-collapsed .sidebar-brand-compact {
    display:grid; box-shadow:inset 0 1px rgba(255,255,255,.08),0 8px 20px rgba(0,22,56,.18);
  }
  .portal-shell.is-sidebar-collapsed .sidebar-rule { margin:14px 0; }
  .portal-shell.is-sidebar-collapsed .sidebar-nav { gap:6px; }
  .portal-shell.is-sidebar-collapsed .nav-link,
  .portal-shell.is-sidebar-collapsed .admin-subnav-link,
  .portal-shell.is-sidebar-collapsed .admin-back-link {
    width:48px; min-height:48px; margin-inline:auto; justify-content:center; padding:0; border-radius:13px; transform:none;
  }
  .portal-shell.is-sidebar-collapsed .nav-link .icon,
  .portal-shell.is-sidebar-collapsed .admin-subnav-link .icon,
  .portal-shell.is-sidebar-collapsed .admin-back-link .icon {
    display:inline-grid; width:21px; height:21px; color:rgba(255,255,255,.82); opacity:1;
  }
  .portal-shell.is-sidebar-collapsed .nav-link.is-active .icon,
  .portal-shell.is-sidebar-collapsed .admin-subnav-link.is-active .icon { color:#fff; }
  .portal-shell.is-sidebar-collapsed .nav-dot { position:absolute; top:8px; right:7px; margin:0; }
  .portal-shell.is-sidebar-collapsed .admin-sidebar-nav { gap:7px; }
  .portal-shell.is-sidebar-collapsed .admin-nav-group { gap:5px; }
  .portal-shell.is-sidebar-collapsed .sidebar-user {
    width:48px; min-height:48px; grid-template-columns:36px; justify-content:center; margin-inline:auto; padding:6px; border-radius:13px;
  }
}
.notification-list { display: grid; gap: 0; }
.notification-list article { display: grid; grid-template-columns: 8px 1fr; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.notification-list article:last-child { border-bottom: 0; }
.notification-dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--mg-red); }
.notification-dot.is-muted { background: #bcc1c9; }
.notification-list strong { font-size: 11.5px; }
.notification-list p { margin: 3px 0; color: var(--muted); font-size: 10.5px; }
.notification-list small { color: #9da3ac; font-size: 9px; }
.notification-loading { min-height:180px; }

/* Documents / news */
.asset-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.asset-card { min-height: 188px; display: flex; flex-direction: column; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); }
.asset-card-top { display: flex; justify-content: space-between; gap: 10px; }
.file-type { width: 41px; height: 47px; display: grid; place-items: center; clip-path: polygon(0 0,72% 0,100% 28%,100% 100%,0 100%); background: #f5e6e8; color: var(--mg-burgundy); font-size: 9px; font-weight: 900; }
.asset-card h3 { margin: 15px 0 4px; font-size: 12.5px; line-height: 1.35; }
.asset-card p { margin: 0; color: var(--muted); font-size: 10px; }
.asset-card footer { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.news-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.news-card { min-height: 360px; display:flex; flex-direction:column; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); }
.news-card-interactive { cursor:pointer; transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease; }
.news-card-interactive:hover { transform:translateY(-3px); border-color:#a8d2ff; box-shadow:0 16px 38px rgba(1,77,163,.13); }
.news-card-interactive:focus-visible { outline:3px solid rgba(1,123,255,.22); outline-offset:3px; border-color:var(--mg-red); }
.news-visual { position: relative; min-height: 120px; display: flex; align-items: flex-end; padding: 16px; color: white; background: linear-gradient(135deg,#4a101d,#a7132a 60%,#d51d27); transition:filter .18s ease; }
.news-card-interactive:hover .news-visual { filter:saturate(1.08) brightness(1.04); }
.news-visual::after { content:"MG"; position:absolute; right:17px; top:3px; color:rgba(255,255,255,.08); font-size:79px; line-height:1; font-weight:900; letter-spacing:-.08em; }
.news-visual .badge { position: relative; z-index: 1; color: white; border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.12); }
.news-content { flex:1; display:flex; flex-direction:column; padding: 17px; }
.news-content h3 { margin: 0 0 7px; font-size: 15px; line-height: 1.3; }
.news-content p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.news-content footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9.5px; }
.news-read-more { display:inline-flex; align-items:center; gap:4px; color:var(--mg-burgundy); font-weight:800; white-space:nowrap; }
.news-read-more .icon { width:13px; height:13px; transition:transform .18s ease; }
.news-card-interactive:hover .news-read-more .icon { transform:translateX(3px); }
.news-meta-row { min-height:22px; display:flex; align-items:center; gap:10px; margin-top:11px; color:var(--muted); font-size:9.5px; }
.news-meta-row span { display:inline-flex; align-items:center; gap:5px; }
.news-meta-row .icon { width:13px; height:13px; }
.article-detail { color:var(--ink); font-size:12px; line-height:1.7; }
.article-detail>p { margin:0; white-space:normal; }
.article-detail .detail-section { margin-top:20px; }


/* Ranking podium */
.podium { min-height: 270px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: end; gap: 10px; padding: 28px 25px 0; }
.podium-item { min-width:0; text-align: center; }
.podium-avatar { width: 49px; height: 49px; display: grid; place-items: center; margin: auto auto 8px; border-radius: 14px; background: #f1e5e7; color: var(--mg-burgundy); font-weight: 900; }
.podium-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; }
.podium-item small { display: block; margin: 3px 0 10px; color: var(--muted); font-size: 9px; }
.podium-block { display: grid; place-content: center; min-height: 100px; border-radius: 10px 10px 0 0; color: #fff; background: linear-gradient(180deg,#8c2033,#651522); box-shadow: inset 0 1px rgba(255,255,255,.15); }
.podium-item.first .podium-block { min-height: 155px; background: linear-gradient(180deg,#d9222c,#9c1020); }
.podium-item.third .podium-block { min-height: 75px; }
.podium-block b { font-size: 29px; }
.podium-block span { font-size: 9px; opacity: .72; }

/* Admin */
.admin-workspace { min-width:0; max-width:100%; }
.admin-contextbar {
  min-width:0; display:flex; align-items:center; justify-content:space-between; gap:18px;
  margin-bottom:16px; padding:13px 15px;
  border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:var(--shadow-sm);
}
.admin-context-copy { min-width:0; display:grid; grid-template-columns:auto minmax(0,1fr); align-items:baseline; column-gap:10px; }
.admin-context-copy > span { color:#075db8; font-size:8px; font-weight:850; letter-spacing:.07em; text-transform:uppercase; }
.admin-context-copy > strong { overflow:hidden; color:var(--ink); font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.admin-context-copy p { grid-column:1 / -1; margin:4px 0 0; overflow:hidden; color:var(--muted); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.admin-contextbar > .btn { flex:0 0 auto; white-space:nowrap; }
.admin-content { min-width:0; max-width:100%; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; }
.admin-stat { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.admin-stat span { color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.admin-stat strong { display: block; margin-top: 7px; font-size: 21px; letter-spacing: -.04em; }
.runtime-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.runtime-card { padding: 13px; border-radius: 10px; background: #1f2229; color: white; }
.runtime-card span { color: rgba(255,255,255,.52); font-size: 9px; }
.runtime-card strong { display: block; margin-top: 5px; font-size: 11px; }
.readiness-summary { display:grid; grid-template-columns:minmax(150px,1.35fr) repeat(4,minmax(92px,1fr)); gap:10px; margin-bottom:12px; }
.readiness-score,.readiness-stat { min-width:0; padding:14px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.readiness-score { color:#fff; background:linear-gradient(135deg,#222833,#10141b); }
.readiness-score.is-ready { background:linear-gradient(135deg,#087354,#04533d); }
.readiness-score.is-blocked { background:linear-gradient(135deg,#a92131,#701522); }
.readiness-score span,.readiness-stat span { display:block; overflow:hidden; color:inherit; opacity:.68; font-size:8px; font-weight:850; letter-spacing:.07em; text-overflow:ellipsis; text-transform:uppercase; white-space:nowrap; }
.readiness-score strong,.readiness-stat strong { display:block; margin-top:5px; font-size:22px; letter-spacing:-.04em; }
.readiness-score small { display:block; margin-top:3px; color:rgba(255,255,255,.76); font-size:8px; font-weight:800; }
.readiness-stat span { color:var(--muted); opacity:1; }
.readiness-signoff-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.readiness-signoff { min-width:0; display:grid; align-content:start; gap:9px; padding:13px; border:1px solid var(--line); border-radius:10px; background:#fafbfc; }
.readiness-signoff p { margin:0; color:var(--muted); font-size:10px; line-height:1.45; }
.readiness-signoff .textarea { min-height:62px; resize:vertical; }
.readiness-signoff .action-row { justify-content:space-between; }
.period-flow { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.period-flow span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }
.period-flow span::after { content:"→"; color:#bcc1c9; }
.period-flow span:last-child::after { display:none; }
.import-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; }
.import-summary div { padding: 12px; border: 1px solid var(--line); border-radius: 9px; background:#fafbfc; }
.import-summary span { display:block; color:var(--muted); font-size:8.5px; text-transform:uppercase; font-weight:800; }
.import-summary strong { display:block; margin-top:5px; font-size:18px; }
.code-block { max-height: 280px; overflow: auto; padding: 13px; border-radius: 9px; color: #dce2ea; background: #1c1f24; font: 10px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace; white-space: pre-wrap; }

/* Modals / toast */
.modal-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(20,16,18,.62); backdrop-filter: blur(7px); animation: fadeIn .16s both; }
.modal-panel { width: min(660px,100%); max-height: min(92vh,900px); display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(255,255,255,.25); border-radius: 15px; background: #fff; box-shadow: var(--shadow-lg); animation: modalIn .22s var(--ease) both; }
.modal-panel.modal-wide { width: min(930px,100%); }
.modal-panel.modal-narrow { width: min(450px,100%); }
.modal-header { display: flex; align-items: flex-start; gap: 13px; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.modal-header > div { min-width:0; }
.modal-header h2 { margin: 0; font-size: 16px; letter-spacing: -.025em; }
.modal-header p { margin: 4px 0 0; color: var(--muted); font-size: 10.5px; }
.modal-close-button { margin-left: auto; flex:0 0 auto; width: 30px; height: 30px; display:grid; place-items:center; border:0; border-radius:8px; background:var(--surface-2); cursor:pointer; }
.modal-close-button .icon { width:14px; height:14px; }
.modal-body { overflow: auto; padding: 19px; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 13px 19px; border-top: 1px solid var(--line); background: #fafbfc; }
.toast-container { position: fixed; right: 18px; bottom: 18px; z-index: 150; width: min(360px,calc(100vw - 36px)); display: grid; gap: 8px; }
.toast { display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 9px; padding: 11px 12px; border: 1px solid rgba(255,255,255,.11); border-radius: 10px; color: #fff; background: #22262d; box-shadow: 0 15px 40px rgba(17,20,28,.28); animation: toastIn .25s var(--ease) both; }
.toast-icon { width:25px; height:25px; display:grid; place-items:center; border-radius:7px; background:rgba(255,255,255,.08); }
.toast-icon .icon { width:13px; height:13px; }
.toast p { margin:0; font-size:10.5px; font-weight:650; }
.toast button { border:0; color:rgba(255,255,255,.55); background:transparent; cursor:pointer; }
.toast-success .toast-icon { color:#59daa9; }
.toast-danger .toast-icon { color:#ff7c89; }
.toast-warning .toast-icon { color:#ffd477; }
.toast-success { border-left:4px solid #59daa9; background:#1d2927; }
.toast-danger { border-left:4px solid #ff7c89; background:#332126; }
.toast-warning { border-left:4px solid #ffd477; background:#302b20; }

/* Loading / error / empty */
.is-refreshing { position: relative !important; min-height: 160px; }
.refresh-overlay {
  position: absolute; inset: 0; z-index: 25; display: flex; align-items: flex-start; justify-content: center;
  padding: 24px; border-radius: inherit; background: rgba(242,243,245,.62); backdrop-filter: blur(1.5px);
}
.refresh-status {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 9px; align-items: center;
  padding: 10px 14px; border: 1px solid rgba(211,215,222,.9); border-radius: 11px;
  color: var(--ink-2); background: rgba(255,255,255,.96); box-shadow: var(--shadow);
}
.refresh-status .loading-spinner { grid-row: 1 / 3; width: 22px; height: 22px; border-width: 2px; }
.refresh-status > span:last-child { display: grid; gap: 1px; }
.refresh-status strong { font-size: 10.5px; }
.refresh-status small { color: var(--muted); font-size: 8.5px; }
.loading-skeleton { position: relative; min-height: 610px; overflow: hidden; }
.loading-skeleton::after {
  display:none;
}
.skeleton-heading { display: grid; gap: 9px; margin-bottom: 22px; }
.skeleton-heading i,.skeleton-heading b,.skeleton-heading span,.skeleton-kpis i,.skeleton-panels i { display: block; border: 1px solid #e8eaed; border-radius: 10px; background: #e5e8ec; }
.skeleton-heading i { width: 104px; height: 9px; }
.skeleton-heading b { width: min(330px,70%); height: 34px; }
.skeleton-heading span { width: min(610px,88%); height: 13px; }
.skeleton-kpis { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; }
.skeleton-kpis i { height: 128px; }
.skeleton-panels { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 16px; }
.skeleton-panels i { height: 350px; }
.loading-skeleton > p { position: absolute; z-index: 2; left: 50%; top: 235px; display: flex; align-items: center; gap: 9px; transform: translateX(-50%); margin: 0; padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: rgba(255,255,255,.94); box-shadow: var(--shadow-sm); font-size: 9.5px; white-space: nowrap; }
.portal-startup { min-height: 100vh; min-height: 100svh; display: grid; place-content: center; gap: 16px; text-align: center; color: var(--muted); font-size: 14px; }
.loading-state, .empty-state { min-height: 210px; display: grid; place-content: center; gap: 9px; padding: 30px; text-align: center; color: var(--muted); }
.loading-spinner { width: 28px; height: 28px; margin: auto; border: 3px solid var(--line); border-top-color: var(--mg-red); border-radius: 50%; animation: spin .75s linear infinite; }
.empty-state .icon { width:31px; height:31px; margin:auto; color:#9fa5ae; }
.empty-state h3 { margin:0; color:var(--ink-2); font-size:14px; }
.empty-state p { max-width:420px; margin:0; font-size:10.5px; }
.fatal-error { min-height: 100vh; display:grid; place-content:center; gap:12px; padding:30px; text-align:center; }
.fatal-brand-logo { width: 188px; height: auto; margin: 0 auto 10px; }
.not-found-brand-logo { width: 90px; height: auto; margin: 0 auto 8px; }
.fatal-error h1 { margin:6px 0 0; font-size:23px; }
.fatal-error p { max-width:500px; margin:0 auto; color:var(--muted); }

/* Login */
.login-screen { height: 100svh; min-height: 0; overflow: hidden; padding-bottom: 0; background: #eaf0f6; }
.login-screen #app { height: 100%; min-height: 0; }
.login-page {
  height: 100%; min-height: 0; display: grid; grid-template-columns: minmax(560px,56%) minmax(420px,44%); grid-template-rows: minmax(0,1fr); gap: clamp(10px,1vw,16px);
  padding: clamp(10px,1.25vw,20px); background: radial-gradient(circle at 8% 4%,rgba(1,123,255,.1),transparent 24rem),#eaf0f6;
}
.login-panel {
  isolation:isolate; position:relative; height:100%; min-height:0; overflow-y:auto; overscroll-behavior:contain; display:flex; align-items:center;
  padding: clamp(34px,5vw,82px); border: 1px solid rgba(0,47,112,.08); border-radius: 26px; background: #fff;
  box-shadow: 0 28px 80px rgba(18,35,58,.1);
}
.login-panel::before { content:""; position:absolute; z-index:-1; inset:0 0 auto; height:5px; border-radius:26px 26px 0 0; background:linear-gradient(90deg,#017bff 0%,#014da3 72%,#002f70 100%); }
.login-panel::after { content:""; position:absolute; z-index:-1; width:420px; height:420px; left:-250px; top:-260px; border-radius:50%; background:rgba(1,123,255,.055); }
.login-locale-picker { position:absolute; z-index:4; top:24px; right:24px; }
.login-locale-picker label { display:block; }
.login-locale-picker .ds-select { width:142px; }
.login-locale-picker .ds-select-trigger { min-height:42px; padding:0 13px; border-color:rgba(1,77,163,.16); background:rgba(255,255,255,.92); box-shadow:0 7px 22px rgba(0,47,112,.08); }
.login-locale-picker .ds-select-trigger:hover { border-color:#b9dcff; background:#fff; }
.login-panel-inner { position:relative; z-index:1; width:min(100%,560px); margin:auto; }
.login-brand { margin-bottom:clamp(34px,5vh,54px); }
.login-asman-logo { display:block; width:225px; height:auto; }
.login-product-context { display:flex; align-items:center; gap:9px; margin-bottom:12px; color:var(--mg-red-700); font-size:9.5px; font-weight:850; letter-spacing:.14em; }
.login-product-context span,.login-product-context b { font:inherit; }
.login-product-context i { width:22px; height:1px; background:#b9dcff; }
.login-copy h1 { max-width:540px; margin:0; font-size:clamp(42px,3.4vw,58px); line-height:1.01; letter-spacing:-.055em; }
.login-copy h1 em { display: block; color: var(--mg-red); font-style: normal; }
.login-copy > p { max-width:520px; margin:20px 0 30px; color:var(--muted); font-size:13.5px; line-height:1.65; }
.login-form { width:100%; max-width:520px; display:grid; gap:14px; }
.login-form .form-field { gap: 8px; }
.login-form .form-field > label { font-size: 10.5px; }
.login-form .input { min-height: 50px; padding: 11px 14px; border-radius: 11px; font-size: 13px; }
.login-form .btn { min-height: 50px; border-radius: 11px; font-size: 12.5px; }
.login-divider { display:flex; align-items:center; gap:12px; margin:3px 0; color:var(--muted); font-size:10px; letter-spacing:.04em; }
.login-divider::before,.login-divider::after { content:""; height:1px; flex:1; background:var(--line); }
.login-note { max-width:520px; margin:22px 0 0; padding-top:18px; border-top:1px solid var(--line); color:var(--muted); font-size:10.5px; }
.login-visual {
  isolation:isolate; position:relative; height:100%; min-height:0; overflow:hidden;
  display: flex; flex-direction: column; justify-content: space-between; padding: clamp(44px,5.2vw,84px); border-radius: 26px; color: #fff;
  background:radial-gradient(circle at 100% 100%,rgba(195,13,48,.52),transparent 27rem),radial-gradient(circle at 82% 13%,rgba(255,255,255,.13),transparent 19rem),linear-gradient(145deg,#00224f 0%,#003c7f 52%,#017bff 100%);
  box-shadow:0 28px 80px rgba(0,47,112,.2);
}
.login-visual::before { content:""; position:absolute; z-index:-1; inset:38% 0 0; opacity:.16; background-image:linear-gradient(rgba(255,255,255,.2) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.2) 1px,transparent 1px); background-size:48px 48px; mask-image:linear-gradient(to bottom,transparent,black); }
.login-visual::after { content:""; position:absolute; z-index:-1; width:min(56vw,760px); aspect-ratio:1; right:-30%; top:-27%; border:1px solid rgba(255,255,255,.13); border-radius:50%; box-shadow:0 0 0 80px rgba(255,255,255,.035),0 0 0 170px rgba(255,255,255,.025); }
.login-mg-logo { position:relative; z-index:1; width:clamp(200px,16vw,275px); height:auto; opacity:.96; }
.login-visual-content { position:relative; z-index:1; max-width:610px; }
.login-visual-kicker { display:block; margin-bottom:13px; color:rgba(255,255,255,.7); font-size:10px; font-weight:800; letter-spacing:.17em; }
.login-visual-content h2 { max-width:600px; margin:0; font-size:clamp(32px,2.65vw,44px); line-height:1.04; letter-spacing:-.05em; }
.login-visual-content > p { max-width:620px; margin:18px 0 0; color:rgba(255,255,255,.72); font-size:15px; line-height:1.6; }
.login-feature-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:30px 0 0; padding:0; list-style:none; }
.login-feature-list li { min-height:66px; display:flex; align-items:center; gap:9px; padding:13px 14px; border:1px solid rgba(255,255,255,.16); border-radius:12px; background:rgba(255,255,255,.07); backdrop-filter:blur(8px); font-size:10.5px; font-weight:700; line-height:1.35; }
.login-feature-list li::before { content:""; width:7px; height:7px; flex:0 0 7px; border-radius:50%; background:#fff; box-shadow:0 0 0 4px rgba(255,255,255,.12); }

@media (max-width: 1040px) {
  .login-page { grid-template-columns:minmax(490px,52%) minmax(0,48%); }
  .login-panel,.login-visual { padding:40px; }
  .login-feature-list { grid-template-columns:1fr; max-width:390px; }
  .login-feature-list li { min-height:48px; }
}
@media (max-width: 900px) {
  .login-page { grid-template-columns:1fr; padding:12px; }
  .login-panel { height:100%; min-height:0; padding:42px; }
  .login-visual { display:none; }
  .login-locale-picker { top:20px; right:20px; }
}

@media (max-height: 900px) and (min-width: 901px) {
  .login-locale-picker { top:20px; right:20px; }
  .login-panel,.login-visual { padding:38px clamp(42px,4.2vw,66px); }
  .login-brand { margin-bottom:25px; }
  .login-asman-logo { width:220px; }
  .login-product-context { margin-bottom:9px; }
  .login-copy h1 { font-size:clamp(42px,3.2vw,50px); }
  .login-copy > p { margin:16px 0 22px; }
  .login-form { gap:12px; }
  .login-form .input,.login-form .btn { min-height:46px; }
  .login-note { margin-top:18px; padding-top:15px; }
  .login-mg-logo { width:clamp(180px,13vw,200px); }
  .login-visual-content h2 { font-size:clamp(31px,2.55vw,40px); }
  .login-visual-content > p { margin-top:14px; font-size:13.5px; }
  .login-feature-list { margin-top:22px; }
  .login-feature-list li { min-height:56px; }
}

/* Mobile navigation */
.mobile-bottom-nav { display:none; }
.mobile-drawer-backdrop { display:none; }

@keyframes spin { to { transform:rotate(360deg); } }
@keyframes skeletonSweep { to { transform:translateX(110%); } }
@keyframes fadeIn { from{opacity:0} }
@keyframes modalIn { from{opacity:0;transform:translateY(12px) scale(.985)} }
@keyframes toastIn { from{opacity:0;transform:translateY(8px)} }

@media (max-width: 1320px) {
  .kpi-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .kpi-grid.margin-summary-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .skeleton-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .model-grid { grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); }
  .asset-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .network-trend-controls { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width: 1180px) and (min-width: 821px) {
  .portal-shell { display:block; }
  .sidebar { position:fixed; left:0; top:0; bottom:0; width:min(86vw,290px); height:100dvh; z-index:80; transform:translateX(-103%); transition:transform .23s var(--ease); box-shadow:var(--shadow-lg); }
  .sidebar.is-open { transform:translateX(0); }
  .mobile-drawer-backdrop { position:fixed; inset:0; z-index:70; display:block; visibility:hidden; opacity:0; background:rgba(18,13,15,.57); transition:opacity .2s,visibility .2s; }
  .mobile-drawer-backdrop.is-open { visibility:visible; opacity:1; }
  .mobile-menu-button { display:grid; }
  .sidebar-collapse-button { display:none; }
  .topbar { padding:0 18px; gap:11px; }
  .topbar-controls { gap:6px; }
  .dealer-select .ds-select { width:190px; max-width:190px; }
  .period-select .ds-select { width:185px; max-width:185px; }
}
@media (max-width: 1080px) and (min-width: 821px) {
  .dealer-select { display:none; }
}
@media (max-width: 1040px) {
  :root { --sidebar: 238px; }
  .page { padding:22px; }
  .grid-3,.grid-4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .admin-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .readiness-summary { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .readiness-score { grid-row:span 2; }
  .top-select .ds-select { max-width:170px; }
  .period-select .ds-select { width:170px; max-width:170px; }
  .donut-layout { grid-template-columns:150px 1fr; }
  .donut-chart { width:145px;height:145px; }
}
@media (max-width: 820px) {
  :root { --topbar: 62px; }
  body { padding-bottom:66px; }
  .portal-shell { display:block; }
  .sidebar { position:fixed; left:0; top:0; bottom:0; width:min(86vw,290px); height:100dvh; z-index:80; transform:translateX(-103%); transition:transform .23s var(--ease); box-shadow:var(--shadow-lg); }
  .sidebar.is-open { transform:translateX(0); }
  .mobile-drawer-backdrop { position:fixed; inset:0; z-index:70; display:block; visibility:hidden; opacity:0; background:rgba(18,13,15,.57); transition:opacity .2s,visibility .2s; }
  .mobile-drawer-backdrop.is-open { visibility:visible; opacity:1; }
  .topbar { height:var(--topbar); padding:0 13px; gap:9px; }
  .mobile-menu-button { display:grid; }
  .sidebar-collapse-button { display:none; }
  .topbar-title strong { font-size:13px; }
  .topbar-title span { font-size:8px; }
  .topbar-controls { gap:5px; }
  .dealer-select { display:none; }
  .period-select .ds-select { width:112px; max-width:112px; }
  .period-select .ds-select-trigger { padding-left:8px; }
  .locale-select { display:none; }
  .notification-button { width:34px;height:34px; }
  .page { padding:16px 13px 20px; }
  .page-header { align-items:flex-start; flex-direction:column; margin-bottom:16px; }
  .page-header-actions { width:100%; justify-content:flex-start; }
  .page-header-actions .btn { flex:1 1 auto; }
  .kpi-grid.sales-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .kpi-grid.margin-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .card-header { flex-direction:column; align-items:stretch; gap:12px; }
  .card-header > div { min-width:0; }
  .card-header .action-row { width:100%; max-width:100%; flex:1 1 auto; align-items:stretch; }
  .card-header .action-row > .select,.card-header .action-row > .ds-select { width:auto !important; min-width:0; flex:1 1 118px; }
  .card-header .action-row > .btn { min-width:0; flex:1 1 136px; white-space:normal; text-align:center; }
  .kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .kpi-card { min-height:116px;padding:13px; }
  .metric { font-size:22px; }
  .grid-2,.grid-3,.grid-4 { grid-template-columns:1fr; }
  .model-grid { grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); }
  .asset-grid,.news-grid { grid-template-columns:1fr; }
  .table-toolbar > .segmented { width:100%; max-width:100%; flex:1 1 100%; overflow-x:auto; overflow-y:hidden; overscroll-behavior-inline:contain; }
  .table-toolbar > .segmented button { flex:0 0 auto; white-space:nowrap; }
  .admin-contextbar { align-items:flex-start; gap:10px; padding:11px; }
  .admin-context-copy p { white-space:normal; }
  .runtime-grid { grid-template-columns:1fr; }
  .readiness-signoff-grid { grid-template-columns:1fr; }
  .form-grid,.form-grid.cols-3 { grid-template-columns:1fr; }
  .import-summary { grid-template-columns:repeat(2,1fr); }
  .donut-layout { grid-template-columns:1fr; }
  #model-donut .donut-layout { grid-template-columns:1fr; width:100%; min-height:0; }
  .donut-legend { grid-template-columns:repeat(2,1fr); }
  #model-donut .donut-legend article { grid-template-columns:8px minmax(70px,1fr) auto; }
  .skeleton-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .skeleton-panels { grid-template-columns:1fr; }
  .chart-card { min-height:315px; }
  .chart-wrap { min-height:235px; overflow-x:auto; }
  .bar-row { grid-template-columns:95px minmax(90px,1fr) 65px; }
  .categorical-chart-wrap,.horizontal-bar-chart { min-height:0; overflow:visible; }
  .categorical-chart-wrap .bar-row { grid-template-columns:minmax(105px,1fr) minmax(90px,1.8fr) minmax(72px,auto); gap:9px; font-size:10px; }
  .categorical-chart-wrap .bar-list { gap:13px; }
  .categorical-chart-wrap .bar-value { font-size:9.5px; }
  .network-trend-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .network-main-trend { min-height:270px; }
  .snapshot-strip { align-items:flex-start; flex-wrap:wrap; }
  .snapshot-strip .spacer { display:none; }
  .mobile-bottom-nav { position:fixed; left:0; right:0; bottom:0; z-index:55; min-height:63px; display:flex; align-items:stretch; justify-content:space-around; padding:4px max(6px,env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left)); border-top:1px solid var(--line); background:rgba(255,255,255,.95); backdrop-filter:blur(18px); }
  .mobile-bottom-nav a,.mobile-bottom-nav button { min-width:54px; flex:1; display:grid; place-content:center; justify-items:center; gap:3px; border:0; color:#78808b; background:transparent; font-size:8px; font-weight:700; cursor:pointer; }
  .mobile-bottom-nav .icon { width:18px;height:18px; }
  .mobile-bottom-nav .is-active { color:var(--mg-red); }
  .modal-overlay { align-items:end; padding:0; }
  .modal-panel,.modal-panel.modal-wide,.modal-panel.modal-narrow { width:100%; max-height:92dvh; border-radius:17px 17px 0 0; animation-name:sheetIn; }
  .table-wrap { margin-left:-1px; }
  .data-table { font-size:10.5px; }
  .data-table th,.data-table td { padding-left:10px;padding-right:10px; }
  .login-page { padding:10px; }
  .login-panel { height:100%; min-height:0; padding:34px 24px; border-radius:20px; }
  .login-brand { margin-bottom:36px; }
  .login-asman-logo { width:158px; }
  .login-copy h1 { font-size:clamp(34px,10vw,44px); }
}
@media (max-width: 480px) {
  .topbar-title { max-width:104px; }
  .topbar-title strong,.topbar-title span { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
  .kpi-grid { grid-template-columns:1fr 1fr; }
  .kpi-label { font-size:8px; }
  .metric { font-size:20px; }
  .model-grid { grid-template-columns:1fr; }
  .network-trend-controls { grid-template-columns:1fr; }
  .podium { gap:6px; padding:24px 10px 0; }
  .podium-avatar { width:44px; height:44px; }
  .podium-item strong { font-size:9px; }
  .podium-item small { font-size:8px; }
  .admin-stat-grid { grid-template-columns:1fr 1fr; }
  .readiness-summary { grid-template-columns:1fr 1fr; }
  .readiness-score { grid-column:1 / -1; grid-row:auto; }
  .admin-contextbar { align-items:stretch; flex-direction:column; }
  .admin-contextbar > .btn { width:100%; }
  .donut-legend { grid-template-columns:1fr; }
  .page-header h1 { font-size:25px; }
  .login-panel { padding:20px 24px; }
  .login-locale-picker { top:16px; right:16px; }
  .login-locale-picker .ds-select { width:116px; }
  .login-locale-picker .ds-select-trigger { min-height:38px; padding:0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}
@keyframes sheetIn { from{opacity:0;transform:translateY(35px)} }

@media print {
  .sidebar,.topbar,.mobile-bottom-nav,.page-header-actions,.btn { display:none !important; }
  .portal-shell { display:block; }
  .page { padding:0; }
  body { background:#fff; }
  .card,.kpi-card { box-shadow:none; break-inside:avoid; }
}
/* Compatibility with core-generated loaders/toasts */
.toast-root { position:fixed; right:18px; bottom:18px; z-index:150; width:min(360px,calc(100vw - 36px)); display:grid; gap:8px; }
.toast-root .toast { opacity:0; transform:translateY(8px); transition:opacity .2s,transform .2s; }
.toast-root .toast.is-visible { opacity:1; transform:translateY(0); }
.toast-root .toast > .icon { width:18px; height:18px; }
.toast-root .toast div strong { display:block; font-size:10px; }
.toast-root .toast div span { display:block; color:rgba(255,255,255,.7); font-size:10px; }
.loading-state .spinner { width:28px; height:28px; margin:auto; border:3px solid var(--line); border-top-color:var(--mg-red); border-radius:50%; animation:spin .75s linear infinite; }
.loading-state strong { color:var(--ink-2); font-size:12px; }
.loading-state small { font-size:9.5px; }
.confirm-visual { display:grid; justify-items:center; gap:10px; padding:14px; text-align:center; }
.confirm-visual .icon { width:34px; height:34px; color:var(--warning); }
.confirm-visual p { margin:0; color:var(--muted); font-size:11px; }
.modal-overlay:not(.is-open) { opacity:0; }
.modal-overlay { transition:opacity .18s; }
.full { grid-column:1/-1; }

/* Asman Auto corporate facet layer */
.workspace::before {
  content: ""; position: fixed; z-index: -1; inset: 72px 0 0 var(--sidebar); pointer-events: none; opacity: .34;
  background: linear-gradient(135deg, transparent 0 58%, rgba(1,123,255,.045) 58% 72%, transparent 72%),
              linear-gradient(25deg, transparent 0 76%, rgba(2,166,255,.035) 76% 88%, transparent 88%);
}
@media (max-width: 1180px) { .workspace::before { inset-left: 0; } }

/* v3.0 client-scope modules */
.ranking-triple { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.ranking-card .table-wrap { max-height:430px; overflow:auto; }
.top-rank-row { background:linear-gradient(90deg,rgba(255,190,63,.1),transparent); }
.data-table tr.is-assigned-dealer > td { background:linear-gradient(90deg,rgba(1,123,255,.105),rgba(1,123,255,.025)); }
.data-table tr.is-assigned-dealer > td:first-child { box-shadow:inset 3px 0 0 var(--mg-blue); }
.data-table tr.is-assigned-dealer:hover > td { background:rgba(1,123,255,.13); }
.assigned-dealer-badge { display:inline-flex; align-items:center; min-height:18px; margin-left:8px; padding:2px 7px; border-radius:999px; background:#e6f2ff; color:#005fc5; font-size:8px; font-weight:850; line-height:1; letter-spacing:.02em; vertical-align:middle; }
.podium-item.is-assigned-dealer .podium-avatar { outline:3px solid rgba(1,123,255,.22); background:#e9f4ff; color:#006bd6; }
.podium-item.is-assigned-dealer .podium-block { box-shadow:inset 0 0 0 3px rgba(1,123,255,.45),inset 0 1px rgba(255,255,255,.15); }
.podium-item .assigned-dealer-badge { margin:4px auto 0; width:max-content; }
.chart-toolbar { display:flex; justify-content:flex-end; margin:-4px 0 8px; }
.chart-toolbar label { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:10px; font-weight:750; }
.chart-toolbar .select { width:auto; min-width:170px; }
.chart-legend { margin-top:8px; justify-content:center; flex-wrap:wrap; }
.series-toggle { min-width:0; max-width:100%; display:flex; align-items:center; justify-content:flex-end; gap:6px; flex-wrap:wrap; }
.series-pill { display:inline-flex; align-items:center; gap:7px; min-height:30px; padding:6px 10px; border:1px solid transparent; border-radius:999px; background:#f3f5f8; color:var(--muted); font-size:10px; font-weight:760; line-height:1; cursor:pointer; transition:border-color .18s ease,background .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease; }
.series-pill:hover { transform:translateY(-1px); color:var(--text); border-color:#d8dde5; }
.series-pill:focus-visible { outline:3px solid rgba(1,123,255,.18); outline-offset:2px; }
.series-pill i { width:8px; height:8px; border-radius:50%; background:#b8bec8; box-shadow:0 0 0 2px #fff; }
.series-pill.is-active { background:#fff; color:var(--text); border-color:#d8dde5; box-shadow:0 2px 8px rgba(17,36,64,.08); }
.series-pill.is-active i { background:var(--series-color); }
.data-label-toggle { min-height:30px; padding:6px 10px; border-radius:999px; color:var(--muted); background:#f3f5f8; box-shadow:none; }
.data-label-toggle .icon { width:14px; height:14px; }
.data-label-toggle.is-active { color:#005fc5; border-color:#b8d9ff; background:#eaf4ff; }
.data-label-toggle.is-active .icon { color:#017bff; }
.model-series-toolbar { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin:-3px 0 5px; }
.model-series-toggle { justify-content:flex-start; }
.model-series-summary { flex:0 0 auto; padding-top:7px; color:var(--muted); font-size:9.5px; font-weight:700; white-space:nowrap; }
@media (max-width: 700px) {
  .series-toggle { justify-content:flex-start; width:100%; }
  .series-pill { flex:1 1 auto; justify-content:center; }
  .chart-card .card-header:has(.series-toggle) > div:first-child { padding-right:0; }
  .chart-card .card-header:has(.series-toggle) .data-label-toggle { position:static; order:-1; margin-left:auto; }
  .model-series-toolbar { flex-direction:column; }
  .model-series-summary { padding-top:0; }
}

.funnel-snapshot { flex-wrap:wrap; }
.crm-provider-badge { display:inline-flex; align-items:center; min-height:28px; padding:5px 10px; border:1px solid #b9dcff; border-radius:999px; background:#edf7ff; color:#014da3; font-size:9px; font-weight:850; letter-spacing:.025em; }
.funnel-section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin:22px 2px 12px; }
.funnel-section-heading h2 { margin:0; font-size:20px; letter-spacing:-.025em; }
.funnel-section-heading p { margin:4px 0 0; color:var(--muted); font-size:11px; }
.funnel-kpi-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.funnel-kpi { min-width:0; display:flex; align-items:center; gap:12px; padding:17px 15px; border:1px solid var(--line); border-radius:14px; background:linear-gradient(155deg,#fff,#fafcff); box-shadow:var(--shadow-sm); transition:transform .2s var(--ease),box-shadow .2s var(--ease); }
.funnel-kpi:hover { transform:translateY(-2px); box-shadow:var(--shadow); }
.funnel-kpi-icon { width:38px; height:38px; flex:0 0 38px; display:grid; place-items:center; border-radius:11px; color:#0166cb; background:#eaf4ff; }
.funnel-kpi-icon .icon { width:18px; height:18px; }
.funnel-kpi div { min-width:0; }
.funnel-kpi div>span { display:block; color:var(--muted); font-size:9px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; }
.funnel-kpi strong { display:block; margin-top:5px; font-size:24px; line-height:1; letter-spacing:-.04em; }
.funnel-kpi small { display:block; margin-top:7px; color:var(--muted); font-size:9px; white-space:nowrap; }
.funnel-conversion-grid,.funnel-operation-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.funnel-conversion-card,.funnel-operation-card { position:relative; min-width:0; overflow:hidden; padding:18px; border:1px solid var(--line); border-radius:14px; background:#fff; box-shadow:var(--shadow-sm); }
.funnel-conversion-card>span,.funnel-operation-card>span { display:block; min-height:26px; color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.025em; }
.funnel-conversion-card>strong,.funnel-operation-card>strong { display:block; margin-top:7px; font-size:28px; line-height:1; letter-spacing:-.045em; }
.funnel-conversion-card>small,.funnel-operation-card>small { display:block; min-height:14px; margin-top:10px; color:var(--muted); font-size:9px; }
.funnel-conversion-card>i { position:absolute; left:0; right:0; bottom:0; height:4px; background:linear-gradient(90deg,#017bff var(--conversion),#e7eef7 var(--conversion)); }
.funnel-operation-card.is-future { border-style:dashed; background:linear-gradient(145deg,#fbfcfe,#f5f8fb); }
.funnel-operation-card.is-future>strong { color:#a8b1bd; }
.funnel-analysis-card .card-body { padding:20px; }
.funnel-analysis-layout { display:grid; grid-template-columns:minmax(220px,260px) minmax(0,1fr); gap:26px; align-items:start; }
.funnel-filter-panel { display:grid; gap:14px; align-content:start; padding:18px; border:1px solid #dce4ee; border-radius:15px; background:#f7f9fc; }
.crm-provider-lockup { display:flex; align-items:center; gap:11px; padding-bottom:13px; border-bottom:1px solid #dce4ee; }
.crm-provider-mark { width:38px; height:38px; display:grid; place-items:center; border-radius:11px; background:linear-gradient(145deg,#147fd1,#29a9e0); color:#fff; font-size:10px; font-weight:900; letter-spacing:.04em; box-shadow:0 7px 16px rgba(20,127,209,.22); }
.crm-provider-lockup strong,.crm-provider-lockup small { display:block; }
.crm-provider-lockup strong { font-size:13px; }
.crm-provider-lockup small { margin-top:2px; color:#238463; font-size:9px; font-weight:800; }
.funnel-granularity { display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:4px; border:1px solid #dce4ee; border-radius:11px; background:#fff; }
.funnel-granularity button { min-height:32px; border:0; border-radius:8px; background:transparent; color:var(--muted); font:inherit; font-size:10px; font-weight:800; }
.funnel-granularity button.is-active { background:#e9f4ff; color:#014da3; }
.funnel-granularity button:disabled { opacity:.48; }
.funnel-filter-control { display:grid; gap:6px; }
.funnel-filter-control>span { color:var(--muted); font-size:9px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.funnel-filter-control select { width:100%; min-height:40px; padding:0 11px; border:1px solid #d8dee7; border-radius:10px; background:#fff; color:var(--text); font:inherit; font-size:10.5px; font-weight:700; }
.funnel-filter-control select:disabled { color:#8c96a4; background:#f1f4f7; }
.funnel-filter-control small { color:#98a2af; font-size:8.5px; }
.funnel-integration-note { margin:2px 0 0; padding:12px; border-radius:11px; background:#eaf4ff; color:#014da3; font-size:10px; font-weight:800; }
.funnel-integration-note small { display:block; margin-top:5px; color:#63758b; font-size:8.5px; font-weight:600; line-height:1.45; }
.integration-readiness { display:block; color:#5f6d7f; font-size:9.5px; line-height:1.45; }
.funnel-throughput { display:flex; align-items:center; gap:10px; margin:0 auto 13px; padding:13px 16px; max-width:720px; border:1px solid #d4e8ff; border-radius:13px; background:linear-gradient(90deg,#edf7ff,#f8fbff); }
.funnel-throughput>span { color:#014da3; font-size:10px; font-weight:850; }
.funnel-throughput>strong { margin-left:auto; font-size:20px; }

/* Inventory workspace */
.inventory-summary-section { margin-bottom:16px; padding:22px; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:var(--shadow-sm); }
.inventory-summary-section>header { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:16px; }
.inventory-summary-section h2 { margin:0; font-size:24px; letter-spacing:-.035em; }
.inventory-summary-section p { margin:4px 0 0; color:var(--muted); font-size:11px; }
.inventory-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.inventory-stat { min-width:0; min-height:116px; display:flex; flex-direction:column; justify-content:space-between; padding:19px 20px; border:1px solid #dce1e8; border-radius:16px; background:linear-gradient(145deg,#fff,#fafbfd); box-shadow:0 5px 14px rgba(12,39,78,.045); }
.inventory-stat>span { color:#485567; font-size:12px; font-weight:760; line-height:1.35; }
.inventory-stat>strong { color:var(--text); font-size:34px; line-height:1; letter-spacing:-.05em; }
.inventory-stat>strong small { margin-left:5px; color:#3f4855; font-size:13px; letter-spacing:0; }
.inventory-stat.is-primary { border-color:#b8d9ff; background:linear-gradient(145deg,#eef7ff,#fff); box-shadow:inset 4px 0 0 #017bff,0 5px 14px rgba(1,123,255,.08); }
.inventory-stat.is-fresh { box-shadow:inset 4px 0 0 #238463,0 5px 14px rgba(35,132,99,.07); }
.inventory-stat.is-warning { box-shadow:inset 4px 0 0 #b06b15,0 5px 14px rgba(176,107,21,.07); }
.inventory-stat.is-transit { box-shadow:inset 4px 0 0 #02a6ff,0 5px 14px rgba(2,166,255,.07); }
.inventory-ledger { margin-top:2px; }
.inventory-filter-panel { display:grid; grid-template-columns:minmax(210px,1.5fr) repeat(6,minmax(130px,1fr)) auto; gap:10px; align-items:end; padding:15px; border-bottom:1px solid var(--line); background:#fbfcfe; }
.inventory-filter,.inventory-search { min-width:0; display:grid; gap:6px; }
.inventory-filter>span,.inventory-search>span { color:var(--muted); font-size:9px; font-weight:820; letter-spacing:.045em; text-transform:uppercase; }
.inventory-filter .select { width:100%; min-width:0; }
.inventory-reset { min-height:42px; }
.inventory-vin { padding:4px 7px; border-radius:7px; background:#f1f4f8; color:#15375f; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:10px; font-weight:750; white-space:nowrap; }
.inventory-color-dot { display:inline-block; width:8px; height:8px; margin-right:7px; border-radius:50%; background:#b5bdc8; box-shadow:0 0 0 2px #edf0f4; vertical-align:1px; }

@media (max-width: 1320px) {
  .inventory-filter-panel { grid-template-columns:repeat(4,minmax(150px,1fr)); }
  .inventory-search { grid-column:span 2; }
}
@media (max-width: 900px) {
  .inventory-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .inventory-filter-panel { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .inventory-search { grid-column:1/-1; }
}
@media (max-width: 560px) {
  .inventory-summary-section { padding:16px; }
  .inventory-summary-grid { grid-template-columns:1fr; }
  .inventory-stat { min-height:96px; }
  .inventory-filter-panel { grid-template-columns:1fr; }
  .inventory-search { grid-column:auto; }
  .inventory-reset { width:100%; }
}
.funnel-throughput>small { color:var(--muted); font-size:9px; }
.visual-funnel { display:grid; justify-items:center; gap:9px; padding:8px 16px 12px; }
.funnel-stage { width:var(--funnel-width); min-width:310px; transition:width .3s var(--ease); }
.funnel-stage-bar { display:grid; grid-template-columns:34px 1fr auto; align-items:center; gap:12px; padding:13px 15px; border:1px solid rgba(0,47,112,.12); border-radius:10px; background:linear-gradient(105deg,var(--stage-tone),color-mix(in srgb,var(--stage-tone) 76%,#fff)); color:#fff; box-shadow:0 7px 17px color-mix(in srgb,var(--stage-tone) 17%,transparent); }
.funnel-stage.is-largest-loss .funnel-stage-bar { outline:2px solid #edb95d; outline-offset:2px; }
.stage-index { width:28px; height:28px; display:grid; place-items:center; border-radius:8px; background:rgba(255,255,255,.16); color:#fff; font-size:11px; font-weight:850; }
.funnel-stage-bar strong { display:block; font-size:12px; }
.funnel-stage-bar small { display:block; margin-top:2px; color:rgba(255,255,255,.7); font-size:9.5px; }
.funnel-stage-bar b { font-size:15px; color:#fff; }
.funnel-stage footer { display:flex; justify-content:space-between; padding:4px 14px 0; color:var(--muted); font-size:9px; }
.funnel-stage.is-largest-loss footer strong { color:var(--warning); }
.funnel-wide-chart { min-height:330px; }
.funnel-crm-grid .card-body { min-height:315px; }
.crm-future-state { min-height:270px; display:grid; place-items:center; align-content:center; gap:9px; padding:24px; text-align:center; border:1px dashed #ced8e5; border-radius:14px; background:linear-gradient(145deg,#fafcff,#f4f7fa); }
.crm-future-state .icon { width:30px; height:30px; color:#7d91a9; }
.crm-future-state strong { font-size:14px; }
.crm-future-state p { max-width:350px; margin:0; color:var(--muted); font-size:10px; line-height:1.5; }
.crm-future-state>span { padding:5px 9px; border-radius:999px; background:#e8f4ff; color:#0166cb; font-size:8.5px; font-weight:850; letter-spacing:.05em; }

.margin-component-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; padding:18px; }
.margin-component { min-width:0; display:flex; flex-direction:column; padding:15px; border:1px solid var(--line); border-radius:11px; background:linear-gradient(180deg,#fff,#fafbfc); }
.margin-component>div:first-child { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.margin-component span { color:var(--muted); font-size:10px; font-weight:700; }
.margin-component strong { text-align:right; font-size:16px; color:var(--mg-burgundy); }
.margin-component strong small { display:block; margin-top:2px; color:var(--muted); font-size:9px; font-weight:650; }
.margin-component footer { display:flex; justify-content:space-between; gap:8px; margin-top:9px; }
.margin-component footer span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.margin-component-download { width:100%; min-height:34px; margin-top:13px; justify-content:center; }
.margin-component-download span { color:inherit; font-size:9px; }
.matrix-total { background:#dceeff !important; color:#002f70; }
.cash-bonus-panel { overflow:hidden; border:1px solid #ecd39e; border-radius:14px; background:#fffaf0; box-shadow:var(--shadow-sm); }
.cash-bonus-panel>header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px; border-bottom:1px solid #ecdcb7; background:linear-gradient(120deg,#fff8e7,#fff); }
.cash-bonus-panel h2 { margin:3px 0 4px; font-size:18px; }
.cash-bonus-panel p { margin:0; color:#786843; font-size:10.5px; }
.cash-bonus-panel>header>strong { color:#8a5a04; font-size:22px; white-space:nowrap; }
.cash-bonus-panel .table-scroll { padding:0 18px 18px; }
.detail-section { margin-top:16px; padding:14px; border:1px solid var(--line); border-radius:10px; background:#fafbfc; }
.detail-section h3 { margin:0 0 7px; font-size:11px; }
.detail-section p { margin:0; color:var(--muted); font-size:11px; white-space:pre-wrap; }
.file-chip-list { display:flex; flex-wrap:wrap; gap:8px; }
.file-chip { display:inline-flex; align-items:center; gap:6px; padding:7px 10px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--mg-burgundy); font-size:10px; font-weight:700; }
.file-chip .icon { width:14px; height:14px; }
.status-timeline { display:grid; gap:8px; margin:0; padding-left:18px; }
.status-timeline li { padding-left:4px; }
.status-timeline strong,.status-timeline span,.status-timeline small { display:block; }
.status-timeline span,.status-timeline small { color:var(--muted); font-size:9.5px; }
.empty-inline { padding:24px; text-align:center; color:var(--muted); }

.brand-hero { position:relative; display:grid; grid-template-columns:1fr 220px; align-items:center; gap:30px; overflow:hidden; margin-bottom:16px; padding:34px; border-radius:18px; color:#fff; background:linear-gradient(135deg,#00224f,#014da3 58%,#017bff); box-shadow:0 20px 55px rgba(0,47,112,.22); }
.brand-hero::after { content:""; position:absolute; width:400px; height:400px; right:-190px; top:-230px; border-radius:50%; border:70px solid rgba(255,255,255,.055); }
.brand-hero h1 { margin:5px 0 8px; font-size:32px; letter-spacing:-.05em; }
.brand-hero p { max-width:670px; margin:0 0 18px; color:rgba(255,255,255,.72); }
.brand-hero .btn-secondary { color:#fff; border-color:rgba(255,255,255,.3); background:rgba(255,255,255,.08); }
.brand-hero-logo { position:relative; z-index:1; width:200px; height:auto; justify-self:end; }
.brand-category-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin-bottom:16px; }
.brand-category { display:grid; grid-template-columns:34px 1fr auto; align-items:start; gap:10px; padding:14px; text-align:left; border:1px solid var(--line); border-radius:11px; background:#fff; cursor:pointer; box-shadow:var(--shadow-sm); transition:transform .18s,box-shadow .18s,border-color .18s; }
.brand-category:hover { transform:translateY(-2px); box-shadow:var(--shadow); border-color:#b9dcff; }
.brand-category>span { width:32px; height:32px; display:grid; place-items:center; border-radius:8px; color:var(--mg-burgundy); background:#eaf4ff; }
.brand-category .icon { width:16px; height:16px; }
.brand-category strong { display:block; font-size:10.5px; }
.brand-category p { margin:3px 0 0; color:var(--muted); font-size:8.5px; line-height:1.35; }
.brand-category b { color:var(--mg-red); font-size:12px; }
.asset-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding:18px; }
.asset-card { display:flex; flex-direction:column; min-height:190px; padding:16px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.asset-card header { display:grid; grid-template-columns:42px 1fr; gap:11px; }
.asset-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:10px; background:#eaf4ff; color:var(--mg-burgundy); }
.asset-icon .icon { width:20px; height:20px; }
.asset-card h3 { margin:7px 0 0; font-size:12px; }
.asset-card>p { flex:1; margin:12px 0; color:var(--muted); font-size:10px; }
.asset-card footer { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-top:11px; border-top:1px solid var(--line); color:var(--muted); font-size:9px; }
.news-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding:18px; }
.news-card.compact-news { min-height:210px; padding:16px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.news-card.compact-news h3 { margin:11px 0 8px; font-size:13px; }
.news-card.compact-news p { color:var(--muted); font-size:10px; }
.news-card.compact-news footer { display:flex; justify-content:space-between; margin-top:16px; font-size:9px; }
.news-card.compact-news footer a { color:var(--mg-red); font-weight:750; }
.table-scroll { width:100%; overflow-x:auto; overscroll-behavior-inline:contain; }

/* Annual planning workspace */
.planning-workspace,.analytics-builder { min-height: 720px; }
.planning-controls,.analytics-filter-grid { display:grid; grid-template-columns:105px minmax(190px,1.1fr) minmax(150px,1fr) minmax(150px,1fr) minmax(190px,1.35fr); gap:11px; padding:15px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); background:#fafbfc; }
.control-field { min-width:0; display:flex; flex-direction:column; gap:6px; color:var(--muted); font-size:9px; font-weight:800; letter-spacing:.045em; text-transform:uppercase; }
.control-field > .select,.control-field > .search-field { width:100%; min-height:38px; background:#fff; }
.planning-metric { width:max-content; min-height:38px; align-items:center; }
.planning-metric button { min-height:30px; }
.planning-stat-strip { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); border-bottom:1px solid var(--line); background:#fff; }
.planning-stat-strip > div { min-width:0; padding:12px 15px; border-right:1px solid var(--line); }
.planning-stat-strip > div:last-child { border-right:0; }
.planning-stat-strip span { display:block; color:var(--muted); font-size:8.5px; font-weight:800; letter-spacing:.055em; text-transform:uppercase; }
.planning-stat-strip strong { display:block; margin-top:5px; color:var(--ink); font-size:18px; line-height:1; letter-spacing:-.03em; }
.planning-notice { display:flex; align-items:center; gap:16px; padding:10px 15px; border-bottom:1px solid #d8e9ff; background:#f2f8ff; }
.planning-notice > div { min-width:0; display:flex; flex:1; align-items:baseline; gap:9px; }
.planning-notice strong { color:#075db8; font-size:10.5px; }
.planning-notice span { color:#54708c; font-size:9.5px; }
.sheet-actionbar { position:relative; z-index:4; display:flex; align-items:center; gap:8px; min-height:58px; padding:10px 15px; border-bottom:1px solid var(--line); background:#fff; }
.sheet-selection { min-width:170px; display:flex; flex-direction:column; margin-right:auto; }
.sheet-selection strong { font-size:10.5px; }
.sheet-selection span { margin-top:2px; color:var(--muted); font-size:8.5px; }
.sheet-actionbar > .select { width:150px; }
.sheet-actionbar > .input { width:105px; }
.sheet-scroll-nav { display:flex; align-items:center; gap:3px; padding-left:6px; border-left:1px solid var(--line); }
.sheet-scroll-nav .btn { min-width:31px; padding:0 8px; font-size:14px; }
.annual-plan-host { min-height:430px; }
.annual-plan-scroll { width:100%; max-height:calc(100vh - 300px); min-height:430px; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
.annual-plan-table { width:max-content; min-width:100%; border-collapse:separate; border-spacing:0; table-layout:fixed; font-size:10.5px; }
.annual-plan-table th,.annual-plan-table td { box-sizing:border-box; height:52px; padding:7px 8px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); background:#fff; }
.annual-plan-table thead th { position:sticky; top:0; z-index:5; height:62px; background:#f7f9fb; box-shadow:0 1px 0 var(--line-strong); }
.plan-dealer-head,.plan-dealer-cell { position:sticky !important; left:0; z-index:6 !important; width:220px; min-width:220px; max-width:220px; text-align:left; }
.plan-dealer-head { z-index:8 !important; padding-left:15px !important; }
.plan-dealer-head span,.plan-dealer-cell span { display:block; overflow:hidden; color:var(--ink); font-weight:780; text-overflow:ellipsis; white-space:nowrap; }
.plan-dealer-head small,.plan-dealer-cell small,.plan-total-cell small { display:block; margin-top:3px; overflow:hidden; color:var(--muted); font-size:8.5px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.plan-month-head { width:104px; min-width:104px; text-align:center; }
.plan-month-head > span { display:block; color:var(--ink-2); font-size:10.5px; font-weight:800; text-transform:none; }
.plan-month-head > small { display:flex; align-items:center; justify-content:center; gap:4px; margin-top:4px; color:var(--muted); font-size:7.5px; font-weight:700; letter-spacing:0; text-transform:none; }
.plan-month-head > button { position:absolute; top:5px; right:5px; width:20px; height:20px; display:grid; place-items:center; border:0; border-radius:5px; color:#65707d; background:transparent; cursor:pointer; font-size:15px; line-height:1; }
.plan-month-head > button:hover { color:#017BFF; background:#e7f2ff; }
.period-dot { width:6px; height:6px; border-radius:50%; background:#9da4ae; }
.period-dot.status-draft,.period-dot.status-data_loaded,.period-dot.status-ready_for_review,.period-dot.status-calculated { background:#017BFF; }
.period-dot.status-published { background:#c77a18; }
.period-dot.status-locked { background:#69717d; }
.period-dot.status-not_created { background:#cfd3d9; }
.plan-grid-cell { width:104px; min-width:104px; padding:6px !important; text-align:center; transition:background .1s,box-shadow .1s; }
.plan-grid-cell input { width:100%; height:36px; padding:0 7px; border:1px solid transparent; border-radius:7px; color:var(--ink); background:transparent; text-align:right; font:750 10.5px/1 var(--font); font-variant-numeric:tabular-nums; outline:none; }
.plan-grid-cell input:hover { border-color:#cfd9e6; background:#fafcff; }
.plan-grid-cell input:focus { border-color:#017BFF; background:#fff; box-shadow:0 0 0 3px rgba(1,123,255,.13); }
.plan-grid-cell.is-selected { position:relative; background:#eaf4ff; box-shadow:inset 0 0 0 2px #017BFF; }
.plan-grid-cell.is-dirty::after { content:""; position:absolute; top:3px; right:3px; width:6px; height:6px; border-radius:50%; background:#c77a18; }
.plan-grid-cell.is-locked { color:#69717d; background:#f7f8f9; cursor:not-allowed; }
.plan-grid-cell.is-locked.is-selected { box-shadow:none; }
.plan-grid-cell.is-unavailable { color:#b4bac2; background:#fbfbfc; }
.plan-readonly { display:block; padding-right:5px; text-align:right; font-variant-numeric:tabular-nums; }
.plan-total-head,.plan-total-cell { position:sticky; right:0; z-index:6; width:112px; min-width:112px; border-right:0 !important; background:#f5f7fa !important; text-align:right; box-shadow:-1px 0 0 var(--line-strong); }
.plan-total-head { z-index:8; text-align:center; }
.plan-total-cell strong { font-variant-numeric:tabular-nums; }
.plan-group-row td { position:sticky; left:0; z-index:3; height:34px; padding:0 14px; color:#4c5561; background:#f0f2f5; text-transform:uppercase; letter-spacing:.035em; }
.plan-group-row strong { font-size:9px; }
.plan-group-row span { display:inline-flex; margin-left:7px; padding:2px 6px; border:1px solid #d9dde3; border-radius:10px; color:#7b838d; background:#fff; font-size:8px; }
.plan-dealer-row:hover > th,.plan-dealer-row:hover > td:not(.is-selected):not(.is-locked):not(.plan-total-cell) { background:#fafcff; }
.plan-dealer-row.is-inactive { opacity:.55; }

/* Network analytics builder */
.analytics-filter-grid { grid-template-columns:100px repeat(3,minmax(145px,1fr)) minmax(145px,1fr); }
.multi-filter { position:relative; min-width:0; }
.multi-filter summary { min-height:38px; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:0 11px; border:1px solid var(--line-strong); border-radius:8px; color:var(--ink); background:#fff; cursor:pointer; list-style:none; font-size:10px; font-weight:700; letter-spacing:0; text-transform:none; }
.multi-filter summary::-webkit-details-marker { display:none; }
.multi-filter summary i { width:7px; height:7px; border-right:1.5px solid #7a828c; border-bottom:1.5px solid #7a828c; transform:rotate(45deg) translateY(-2px); transition:transform .15s; }
.multi-filter[open] summary { border-color:#017BFF; box-shadow:0 0 0 3px rgba(1,123,255,.1); }
.multi-filter[open] summary i { transform:rotate(225deg) translate(-1px,-1px); }
.multi-filter-popover { position:absolute; top:calc(100% + 6px); left:0; z-index:30; width:min(310px,80vw); max-height:330px; overflow:hidden; border:1px solid var(--line-strong); border-radius:10px; background:#fff; box-shadow:var(--shadow-lg); }
.multi-filter-search { position:relative; padding:8px; border-bottom:1px solid var(--line); }
.multi-filter-search .icon { position:absolute; top:18px; left:18px; width:13px; height:13px; color:var(--muted); }
.multi-filter-search .input { padding-left:31px; }
.multi-filter-all,.multi-filter-options label { min-height:34px; display:flex; align-items:center; gap:7px; padding:7px 10px; color:var(--ink-2); cursor:pointer; font-size:9.5px; font-weight:650; letter-spacing:0; text-transform:none; }
.multi-filter-all { border-bottom:1px solid var(--line); }
.multi-filter-options { max-height:235px; overflow:auto; padding:4px 0; }
.multi-filter-options label > span { min-width:0; flex:1; display:flex; align-items:center; gap:7px; }
.facet-count { min-width:23px; margin-left:auto; padding:2px 6px; border-radius:999px; color:#5f6d7c; background:#eef1f4; text-align:center; font-size:8px; font-weight:800; }
.facet-meta { margin-left:auto; overflow:hidden; color:var(--muted); font-size:8px; font-weight:550; text-overflow:ellipsis; white-space:nowrap; }
.multi-filter-empty { margin:0; padding:18px 10px; color:var(--muted); text-align:center; font-size:9px; }
.multi-filter-options label:hover,.multi-filter-all:hover { background:#f5f9fe; }
.multi-filter input[type="checkbox"] { accent-color:#017BFF; }
.analytics-filter-footer { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:9px 15px; border-bottom:1px solid var(--line); color:#315e8c; background:#f7fbff; font-size:9.5px; font-weight:700; }
.analytics-filter-footer small { color:var(--muted); font-weight:500; }
.analytics-active-filters { min-height:0; padding:0 15px; border-bottom:1px solid var(--line); background:#fff; }
.analytics-active-filters:not(:empty) { min-height:43px; display:flex; align-items:center; padding-top:7px; padding-bottom:7px; }
.analytics-active-filters .active-filter-list { justify-content:flex-start; }
.analytics-metric-row { display:flex; align-items:center; gap:18px; padding:13px 15px; border-bottom:1px solid var(--line); }
.analytics-metric-row > div:first-child { min-width:155px; display:flex; flex-direction:column; }
.analytics-metric-row strong { font-size:10.5px; }
.analytics-metric-row span { margin-top:2px; color:var(--muted); font-size:8.5px; }
.metric-chip-list { display:flex; flex-wrap:wrap; gap:6px; }
.metric-chip { min-height:31px; display:inline-flex; align-items:center; gap:6px; padding:0 10px; border:1px solid var(--line-strong); border-radius:16px; color:#5f6874; background:#fff; cursor:pointer; font-size:9px; font-weight:750; }
.metric-chip i { width:6px; height:6px; border:1px solid #9ca4ae; border-radius:50%; background:#fff; }
.metric-chip:hover { border-color:#8ebbe8; color:#075db8; }
.metric-chip.is-active { border-color:#94c7f6; color:#075db8; background:#edf7ff; }
.metric-chip.is-active i { border-color:#017BFF; background:#017BFF; box-shadow:0 0 0 3px rgba(1,123,255,.12); }
.analytics-view-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 15px; }
.analytics-view-row > span { color:var(--muted); font-size:9px; font-weight:800; letter-spacing:.045em; text-transform:uppercase; }
.analytics-results { min-height:0; }
.analytics-kpis { margin-bottom:16px; }
.analytics-visual-grid { display:grid; gap:16px; }
.analytics-visual-card { min-height:420px; }
.analytics-main-chart { min-height:310px; }
.analytics-comparison-chart { min-height:310px; }
.analytics-categorical-card { min-height:0; }
.analytics-categorical-card .card-body { padding-block:20px 22px; }
.analytics-categorical-card .analytics-comparison-chart { min-height:0; }
.chart-note { margin:12px 0 0; color:var(--muted); font-size:8.5px; line-height:1.45; }
.trend-new { color:#0b66bd; background:#edf7ff; border-radius:999px; padding:2px 6px; font-weight:750; }
.bar-row.is-unavailable .bar-track { background:repeating-linear-gradient(135deg,#f0f2f5,#f0f2f5 4px,#fafbfc 4px,#fafbfc 8px); }
.bar-row.is-unavailable .bar-value { color:var(--muted); }
.analytics-matrix-scroll { max-height:570px; overflow:auto; }
.analytics-matrix { width:max-content; min-width:100%; border-collapse:separate; border-spacing:0; font-size:9px; }
.analytics-matrix th,.analytics-matrix td { min-width:88px; height:44px; padding:7px 9px; border-right:1px solid rgba(255,255,255,.45); border-bottom:1px solid var(--line); text-align:right; font-variant-numeric:tabular-nums; }
.analytics-matrix thead th { position:sticky; top:0; z-index:3; height:40px; color:var(--muted); background:#f8f9fb; text-align:center; font-size:8px; font-weight:800; text-transform:uppercase; }
.analytics-matrix th:first-child { position:sticky; left:0; z-index:2; width:220px; min-width:220px; max-width:220px; color:var(--ink); background:#fff; text-align:left; }
.analytics-matrix thead th:first-child { z-index:4; background:#f8f9fb; }
.analytics-matrix th span { display:block; overflow:hidden; font-weight:750; text-overflow:ellipsis; white-space:nowrap; }
.analytics-matrix th small { display:block; margin-top:2px; color:var(--muted); font-size:8px; font-weight:500; }

@media (max-width: 1120px) {
  .planning-controls,.analytics-filter-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .planning-search { grid-column:span 2; }
  .sheet-actionbar { flex-wrap:wrap; }
  .sheet-selection { flex-basis:100%; }
  .annual-plan-scroll { max-height:620px; }
}

@media (max-width: 720px) {
  .planning-workspace,.analytics-builder { min-height:600px; }
  .planning-controls,.analytics-filter-grid { grid-template-columns:1fr 1fr; padding:11px; }
  .planning-search { grid-column:1 / -1; }
  .planning-stat-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .planning-stat-strip > div { border-bottom:1px solid var(--line); }
  .planning-notice { align-items:flex-start; flex-direction:column; }
  .planning-notice > div { align-items:flex-start; flex-direction:column; gap:3px; }
  .sheet-actionbar > .select,.sheet-actionbar > .ds-select,.sheet-actionbar > .input { flex:1; width:auto; min-width:120px; }
  .sheet-actionbar .btn { flex:1; }
  .sheet-scroll-nav { width:100%; border-left:0; padding-left:0; }
  .plan-dealer-head,.plan-dealer-cell { width:170px; min-width:170px; max-width:170px; }
  .planning-metric { width:100%; }
  .planning-metric button { flex:1; }
  .analytics-filter-footer,.analytics-metric-row { align-items:flex-start; flex-direction:column; }
  .analytics-metric-row > div:first-child { min-width:0; }
  .analytics-matrix th:first-child { width:160px; min-width:160px; max-width:160px; }
}

@media (max-width: 820px) {
  .filter-toolbar { align-items:stretch; }
  .filter-toolbar .search-field { min-width:100%; flex-basis:100%; }
  .filter-toolbar .filter-control { min-width:calc(50% - 5px); flex:1 1 calc(50% - 5px); }
  .filter-toolbar .filter-control .select,.filter-toolbar .filter-control .ds-select { min-width:0; }
  .filter-context { align-items:flex-start; flex-direction:column; }
  .active-filter-list { justify-content:flex-start; }
}

@media (max-width: 480px) {
  .planning-controls,.analytics-filter-grid { grid-template-columns:1fr; }
  .multi-filter-popover { width:100%; max-width:100%; }
  .filter-toolbar .filter-control { min-width:100%; flex-basis:100%; }
  .filter-toolbar > .btn { flex:1 1 auto; }
  .filter-chip { max-width:100%; }
}

@media (max-width: 1240px) {
  .ranking-triple { grid-template-columns:1fr; }
  .funnel-kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .funnel-conversion-grid,.funnel-operation-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .brand-category-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .margin-component-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .asset-grid,.news-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .funnel-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .funnel-analysis-layout { grid-template-columns:1fr; }
  .funnel-filter-panel { grid-template-columns:1fr 1fr; }
  .crm-provider-lockup,.funnel-integration-note { grid-column:1/-1; }
  .margin-component-grid { grid-template-columns:1fr 1fr; }
  .brand-hero { grid-template-columns:1fr; padding:24px; }
  .brand-hero-logo { width:150px; justify-self:start; }
  .brand-category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .asset-grid,.news-grid { grid-template-columns:1fr; }
  .visual-funnel { align-items:stretch; justify-items:stretch; padding:12px; }
  .funnel-stage { width:100% !important; min-width:0; }
}
@media (max-width: 520px) {
  .kpi-grid.margin-summary-grid { grid-template-columns:1fr; }
  .funnel-kpi-grid { grid-template-columns:1fr 1fr; }
  .funnel-conversion-grid,.funnel-operation-grid { grid-template-columns:1fr; }
  .funnel-kpi { padding:12px; gap:8px; }
  .funnel-kpi-icon { width:30px; height:30px; flex-basis:30px; }
  .funnel-kpi strong { font-size:20px; }
  .funnel-filter-panel { grid-template-columns:1fr; }
  .crm-provider-lockup,.funnel-integration-note { grid-column:auto; }
  .funnel-throughput { align-items:flex-start; flex-direction:column; }
  .funnel-throughput>strong { margin-left:0; }
  .margin-component-grid { grid-template-columns:1fr; padding:12px; }
  .cash-bonus-panel>header { align-items:flex-start; flex-direction:column; }
  .brand-category-grid { grid-template-columns:1fr; }
  .brand-hero h1 { font-size:27px; }
  .asset-grid,.news-grid { padding:12px; }
}

/* v3.0.0 acceptance hardening: KPI captions must wrap inside six-column layouts. */
.funnel-kpi { overflow:hidden; }
.funnel-kpi > div { overflow:hidden; }
.funnel-kpi small { white-space:normal; overflow-wrap:anywhere; line-height:1.35; }

/* Sidebar fits the window: the navigation is a fixed panel, not a list to scroll.
   Laptop screens (768–900 px high) get tighter rows; scrolling stays only as a
   fallback for very short windows. */
@media (min-width: 901px) and (max-height: 900px) {
  .sidebar { padding-top: 18px; padding-bottom: 12px; scrollbar-gutter: auto; }
  .brand { min-height: 60px; }
  .sidebar-brand-logo { width: 112px; }
  .sidebar-rule { margin: 12px 0 10px; }
  .nav-label { margin-bottom: 6px; }
  .sidebar-nav { gap: 2px; }
  .nav-link { min-height: 36px; padding: 7px 12px; }
  .nav-divider { margin: 6px 5px; }
  .sidebar-spacer { min-height: 8px; }
  .sidebar-user { margin-top: 6px; padding: 8px 10px; }
  .admin-subnav-link { min-height: 32px; padding-top: 6px; padding-bottom: 6px; }
}
@media (min-width: 901px) and (max-height: 740px) {
  .brand { min-height: 48px; }
  .sidebar-brand-logo { width: 92px; }
  .brand-network-label { display: none; }
  .sidebar-rule { margin: 8px 0; }
  .nav-link { min-height: 31px; padding: 5px 12px; font-size: 12px; }
  .sidebar-user { padding: 6px 10px; }
}
@media (min-width: 901px) and (max-height: 900px) {
  .admin-sidebar .brand { min-height: 44px; }
  .admin-sidebar .sidebar-brand-logo { width: 76px; }
  .admin-sidebar .brand-network-label { display: none; }
  .admin-sidebar .admin-back-link { margin-top: 8px; }
  .admin-sidebar-nav { gap: 4px; }
  .admin-nav-group { gap: 1px; }
  .admin-subnav-link { min-height: 28px; padding-top: 4px; padding-bottom: 4px; }
}
@media (min-width: 901px) and (max-height: 790px) {
  .admin-subnav-link { min-height: 25px; padding-top: 3px; padding-bottom: 3px; font-size: 11.5px; }
  .admin-sidebar-nav { gap: 2px; }
}

.library-category-field { min-width:220px; margin:0; }
.news-audience { max-height:220px; overflow:auto; padding:8px 0; }
