:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: #0d1118;
  color: #e7edf5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #0d1118;
  --sidebar: #10151d;
  --panel: #131a23;
  --panel-hover: #18212c;
  --line: #263140;
  --line-soft: #202b37;
  --muted: #91a0b2;
  --faint: #758499;
  --text: #e7edf5;
  --strong: #f6f9fc;
  --primary: #69ebbb;
  --primary-muted: #17362f;
  --blue: #7ca9f9;
  --purple: #a99af9;
  --warning: #ffbd70;
  --danger: #ff818b;
  --radius: 12px;
  --sidebar-w: 222px;
  --header-h: 65px;
}
* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; }
:where(h1, h2, h3, p, ul, dl, dd) { margin: 0; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
svg { vertical-align: middle; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
::selection { background: #245949; color: #fff; }
.skip-link { position: fixed; z-index: 500; inset: 8px auto auto 8px; padding: 12px 16px; background: var(--primary); color: #08251d; border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.boot-layout { display: grid; min-height: 100vh; place-content: center; gap: 16px; text-align: center; }
.boot-brand { display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 22px; }
.icon { width: 19px; height: 19px; flex: none; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 24px; height: 24px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.emphasis { color: var(--strong); font-weight: 600; }
.mono, .number { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.break { overflow-wrap: anywhere; }
.small { font-size: 12px; }
.spacer { flex: 1; }
.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 9px; }
.row { display: flex; gap: 9px; align-items: center; }
.wrap { flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 37px; padding: 8px 12px; border: 1px solid #303c4d; border-radius: 8px;
  color: var(--text); background: #19212c; font-size: 13px; font-weight: 550; white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.button:hover { background: #222e3d; border-color: #485971; }
.button-primary { background: var(--primary); border-color: var(--primary); color: #0a261d; font-weight: 700; }
.button-primary:hover { background: #96f5d4; border-color: #96f5d4; }
.button-subtle { background: transparent; }
.button-quiet { background: transparent; border-color: transparent; color: var(--muted); }
.button-quiet:hover { color: var(--text); background: var(--panel-hover); border-color: transparent; }
.button-danger { color: #ffc0c5; border-color: #643640; background: #34242d; }
.button-danger:hover { background: #452833; border-color: #a54b58; }
.button-icon { width: 37px; padding: 7px; }
.button-sm { min-height: 30px; padding: 6px 8px; font-size: 12px; }
.button-wide { width: 100%; }
.text-button { background: transparent; border: 0; color: var(--primary); padding: 3px 0; font: inherit; text-align: left; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
input, select, textarea {
  border: 1px solid #354257; border-radius: 8px; min-height: 40px; max-width: 100%;
  color: var(--text); background: #101720; padding: 8px 11px; outline-offset: 2px;
}
input::placeholder, textarea::placeholder { color: #728197; }
input[type="checkbox"] { width: 16px; min-height: 16px; accent-color: var(--primary); }
textarea { min-height: 86px; resize: vertical; line-height: 1.55; }
select { cursor: pointer; padding-right: 26px; }
.tool-select { min-height: 36px; padding: 5px 25px 5px 9px; font-size: 13px; background: #151d27; }
.field { display: grid; align-content: start; gap: 8px; color: var(--text); font-size: 13px; }
.field span:first-child { font-weight: 600; }
.field small { color: var(--muted); line-height: 1.5; font-size: 12px; }
.field-error { margin-top: 3px; color: #ff9ba3; font-size: 13px; line-height: 1.55; }
.fields { display: grid; gap: 16px; }
.fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.checkbox-field { display: flex; align-items: flex-start; gap: 8px; line-height: 1.55; font-size: 13px; }
.checkbox-field input { flex: none; margin: 2px 0 0; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 21px; }
.layout { min-height: 100vh; padding-left: var(--sidebar-w); }
.sidebar {
  position: fixed; z-index: 20; left: 0; top: 0; bottom: 0; width: var(--sidebar-w);
  display: flex; flex-direction: column; background: var(--sidebar); border-right: 1px solid var(--line-soft);
}
.brand { display: flex; gap: 11px; align-items: center; height: var(--header-h); padding: 0 20px; flex: none; }
.brand-logo { width: 36px; height: 36px; }
.brand-name { display: block; color: var(--strong); font-size: 19px; font-weight: 740; letter-spacing: .02em; line-height: 1.2; }
.brand-name small { color: #a9b9ca; font-size: 11px; letter-spacing: .11em; margin-left: 4px; font-weight: 700; vertical-align: 2px; }
.workspace {
  display: flex; align-items: center; gap: 10px; margin: 16px 13px 25px; padding: 10px;
  border: 1px solid #2a3747; border-radius: 9px; min-width: 0; background: #151d27;
}
.workspace-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 7px; flex: none; color: #98b9ef; background: #233146; }
.workspace-text { min-width: 0; flex: 1; }
.workspace-text strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--strong); font-size: 13px; }
.workspace-text small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.nav { display: grid; gap: 3px; padding: 0 12px; overflow: auto; }
.nav-label { margin: 0 10px 6px; color: var(--faint); font-size: 11px; font-weight: 650; letter-spacing: .04em; }
.nav-label:not(:first-child) { margin-top: 19px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 10px; border: 1px solid transparent; padding: 10px 10px; border-radius: 8px; font-size: 13px; color: #aab8c9; min-height: 40px; text-align: left; background: transparent; }
.nav-link:hover { background: #18212c; color: var(--strong); }
.nav-link.active { background: #17312c; color: #83edc7; border-color: #275245; font-weight: 650; }
.nav-link.active::before { content: ''; width: 3px; height: 15px; position: absolute; left: -13px; top: 12px; border-radius: 0 3px 3px 0; background: var(--primary); }
.sidebar-foot { display: grid; gap: 7px; margin-top: auto; padding: 12px; border-top: 1px solid var(--line-soft); }
.sidebar-foot .nav-link { width: 100%; }
.account-mini { display: flex; align-items: center; gap: 9px; padding: 4px 8px 0; min-width: 0; }
.account-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text); font-size: 12px; }
.avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: #d5e0fa; background: #33415f; font-size: 12px; flex: none; }
.mobile-nav-button, .mobile-overlay { display: none; }
.topbar {
  position: sticky; z-index: 12; top: 0; height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 26px; background: #10151dec; border-bottom: 1px solid var(--line-soft); backdrop-filter: blur(12px);
}
.breadcrumb { display: flex; align-items: center; gap: 9px; font-size: 13px; white-space: nowrap; }
.breadcrumb .icon { color: var(--faint); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-divider { border-left: 1px solid var(--line); height: 24px; margin: 0 1px; }
.main { padding: 27px 26px 42px; max-width: 1780px; margin: auto; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 21px; }
.page-heading h1 { color: var(--strong); font-size: 28px; font-weight: 730; letter-spacing: -.02em; line-height: 1.22; }
.page-heading p { color: var(--muted); font-size: 13px; line-height: 1.55; margin-top: 8px; }
.page-actions, .filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.overview-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 13px; }
.sync-state { display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; color: var(--muted); font-size: 12px; }
.dot { width: 7px; height: 7px; border-radius: 100%; background: var(--faint); flex: none; }
.dot-good { background: var(--primary); }
.dot-danger { background: var(--danger); }
.dot-warn { background: var(--warning); }
.dot-blue { background: var(--blue); }
.sync-state .dot-good { box-shadow: 0 0 0 3px #69ebbb18; }
.kpis { display: grid; gap: 13px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.kpi, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.kpi { padding: 15px; min-height: 110px; }
.kpi-top { display: flex; align-items: center; gap: 9px; color: #a5b4c6; font-size: 12px; font-weight: 580; }
.kpi-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: #223043; color: var(--blue); }
.kpi-icon.good { background: #1b3733; color: var(--primary); }
.kpi-icon.warn { background: #3a2e27; color: var(--warning); }
.kpi-icon.alert { background: #392a35; color: #ffa2ad; }
.kpi-value { color: var(--strong); font-size: clamp(23px, 2.7vw, 32px); font-weight: 710; line-height: 1.17; letter-spacing: -.033em; margin-top: 12px; overflow-wrap: anywhere; }
.kpi-note { color: var(--faint); font-size: 11px; margin-top: 4px; line-height: 1.4; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(270px, 1fr); gap: 14px; align-items: stretch; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 15px 16px 12px; }
.panel-heading > .table-link { width: auto; flex: none; }
.panel-heading h2, .panel-heading h3 { color: var(--strong); font-size: 15px; font-weight: 690; line-height: 1.5; }
.panel-heading p { color: var(--muted); font-size: 12px; margin-top: 3px; line-height: 1.45; }
.panel-body { padding: 0 16px 16px; }
.panel-pad { padding: 16px; }
.panel-pad h2 { font-size: 16px; }
.chart-panel { min-height: 305px; }
.chart-legend { display: flex; gap: 11px; align-items: center; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-top: 4px; }
.chart-legend span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.chart-key { background: var(--primary); width: 12px; height: 2px; border-radius: 3px; }
.chart-key.alert { background: var(--danger); }
.chart-wrap { position: relative; height: 232px; padding: 1px 12px 13px 9px; }
.chart-svg { width: 100%; height: 100%; overflow: visible; }
.chart-axis { fill: #8796aa; font-size: 10px; }
.chart-grid-line { stroke: #283442; stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.chart-grid-base { stroke: #303e50; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-value-line { stroke-width: 2; fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.chart-wrap .empty { padding: 25px 10px; min-height: 100%; }
.risk-panel { min-height: 305px; }
.donut-wrap { display: flex; justify-content: center; align-items: center; padding: 1px 16px 13px; }
.donut { position: relative; width: 121px; height: 121px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #263343; }
.donut::before { position: absolute; content: ''; width: 92px; height: 92px; background: var(--panel); border-radius: 50%; }
.donut-content { position: relative; text-align: center; }
.donut-content strong { display: block; color: var(--strong); font-size: 25px; line-height: 1.13; font-weight: 720; }
.donut-content span { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.donut-list { padding: 0 16px 13px; display: grid; gap: 0; list-style: none; }
.donut-list li { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 6px 0; border-top: 1px solid var(--line-soft); }
.donut-list li span:nth-child(2) { flex: 1; color: #c3cedc; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.donut-list li .number { font-weight: 650; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
th { padding: 9px 12px; color: var(--muted); background: #101720; font-size: 11px; font-weight: 600; white-space: nowrap; border-block: 1px solid var(--line-soft); }
td { padding: 12px; white-space: nowrap; border-bottom: 1px solid var(--line-soft); }
th:first-child, td:first-child { padding-left: 16px; }
th:last-child, td:last-child { padding-right: 16px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #17212b; }
td .table-primary { display: block; color: var(--text); font-weight: 620; }
td .table-secondary { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
td .text-button { color: var(--text); }
.table-link { display: flex; width: 100%; color: var(--primary); align-items: center; gap: 3px; white-space: nowrap; font-size: 12px; margin: 2px 0 0; }
.table-link:hover { text-decoration: underline; }
.feed { display: grid; align-content: start; list-style: none; padding: 0 16px 12px; }
.feed-row { display: flex; align-items: center; gap: 9px; padding: 11px 0; border-top: 1px solid var(--line-soft); text-align: left; min-width: 0; }
.feed-row button { color: var(--text); }
.feed-icon { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 7px; color: var(--warning); background: #3a2e27; }
.feed-icon.alert { color: var(--danger); background: #3b2832; }
.feed-icon.good { color: var(--primary); background: #1b3530; }
.feed-info { flex: 1; min-width: 0; }
.feed-info button { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 650; }
.feed-info p { margin-top: 4px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; }
.feed-time { font-size: 11px; color: var(--faint); white-space: nowrap; }
.status {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; border: 1px solid transparent;
  border-radius: 999px; padding: 4px 7px; line-height: 1; color: #b9c6d7; background: #263244; font-size: 11px; font-weight: 600;
}
.status .dot { width: 5px; height: 5px; background: currentColor; }
.status.good { color: #88ebc7; background: #1b3731; border-color: #2a584a; }
.status.warn { color: #ffd39c; background: #3a2e25; border-color: #5c4530; }
.status.alert { color: #ffb5bd; background: #412832; border-color: #623740; }
.status.blue { color: #aabfff; background: #26334e; border-color: #384b74; }
.status.purple { color: #d6cfff; background: #302744; border-color: #50416d; }
.empty { padding: 37px 16px; display: grid; gap: 8px; place-content: center; justify-items: center; text-align: center; min-height: 130px; }
.empty-icon { display: grid; place-items: center; color: var(--primary); background: var(--primary-muted); width: 39px; height: 39px; border-radius: 9px; margin-bottom: 2px; }
.empty h3 { font-size: 14px; font-weight: 680; color: var(--text); }
.empty p { color: var(--muted); font-size: 12px; max-width: 340px; line-height: 1.55; }
.empty .button { margin-top: 4px; }
.callout { display: flex; gap: 10px; padding: 12px; border: 1px solid #314b63; border-radius: 8px; background: #182735; color: #bdd1e5; font-size: 13px; line-height: 1.55; }
.callout > .icon { margin-top: 1px; color: var(--blue); }
.callout strong { font-weight: 700; }
.callout-warning { border-color: #604831; background: #302722; color: #efcfac; }
.callout-warning > .icon { color: var(--warning); }
.callout-error { border-color: #64414a; background: #382630; color: #f1b8c1; }
.callout-error > .icon { color: var(--danger); }
.metric-banner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 17px; border-radius: var(--radius); border: 1px solid #2f574f; background: linear-gradient(107deg, #162c2a, #151e28 72%); }
.metric-banner h2 { font-size: 16px; color: var(--strong); }
.metric-banner p { max-width: 680px; margin-top: 6px; color: #adc2c8; font-size: 13px; line-height: 1.55; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.data-pair { display: grid; gap: 5px; min-width: 0; }
.data-pair dt { color: var(--muted); font-size: 12px; }
.data-pair dd { color: var(--text); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.data-pair.full { grid-column: 1 / -1; }
.break-line { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.site-grid, .tenant-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.site-card { display: grid; gap: 14px; padding: 15px; }
.site-head { display: flex; align-items: center; gap: 9px; min-width: 0; }
.site-symbol { width: 34px; height: 34px; border-radius: 8px; flex: none; display: grid; place-items: center; color: var(--blue); background: #26354b; }
.site-head > div { min-width: 0; }
.site-head h2 { margin-bottom: 4px; font-size: 15px; overflow-wrap: anywhere; }
.site-head .mono { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.site-card .detail-grid { border-top: 1px solid var(--line-soft); padding-top: 13px; }
.site-card-actions { border-top: 1px solid var(--line-soft); padding-top: 11px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.search { position: relative; display: flex; align-items: center; min-width: min(230px, 100%); }
.search .icon { position: absolute; left: 10px; color: var(--faint); pointer-events: none; }
.search input { min-height: 36px; padding-left: 33px; width: 100%; font-size: 13px; }
.event-table td:first-child { min-width: 185px; }
.event-table td:nth-child(3) { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.event-table td .mono { font-size: 11px; }
.toolbar-panel { padding: 12px 15px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.tab { font-size: 13px; color: var(--muted); padding: 7px 10px; border-radius: 7px; border: 1px solid transparent; background: transparent; }
.tab.active { color: #8beacc; border-color: #2c5149; background: #1a322e; }
.tab:hover { color: var(--text); }
.rule-form { padding: 16px; }
.rule-form .fields { max-width: 660px; }
.policy-actions { margin-top: 18px; }
.report-grid { display: grid; grid-template-columns: minmax(240px, .82fr) minmax(0, 1.7fr); gap: 14px; align-items: start; }
.report-content { display: grid; gap: 15px; font-size: 14px; line-height: 1.7; color: #d2dce9; overflow-wrap: anywhere; }
.report-content h2, .report-content h3 { color: var(--strong); font-size: 15px; }
.report-content ul { display: grid; gap: 5px; padding-left: 20px; }
.report-text { white-space: pre-wrap; }
.report-meta { padding: 12px; border: 1px solid var(--line-soft); border-radius: 8px; background: #101720; }
.report-content section { min-width: 0; }
.report-content h3 .small { margin-left: 6px; font-weight: 500; }
.report-table { min-width: 0; border: 1px solid var(--line-soft); border-radius: 8px; }
.report-table th, .report-table td { padding: 8px; }
.report-table thead th { border-top: 0; }
.report-table th[scope="row"] { color: var(--text); background: transparent; font-size: 12px; white-space: normal; }
.report-table td:last-child, .report-table thead th:last-child { text-align: right; }
.report-table tbody tr:last-child th { border-bottom: 0; }
.report-rule-details summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.report-rule-details[open] summary { margin-bottom: 7px; }
.report-rule { display: block; font-weight: 400; }
.report-history { list-style: none; display: grid; gap: 5px; padding: 0; max-height: 390px; overflow: auto; }
.report-history button { display: grid; gap: 3px; width: 100%; padding: 8px 10px; text-align: left; border: 1px solid transparent; border-radius: 7px; background: #101720; color: var(--text); }
.report-history button:hover, .report-history button[aria-current="true"] { border-color: #39685c; background: #172e2c; }
.report-history button span { color: var(--muted); font-size: 12px; }
.report-comparison { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 6px; }
.report-comparison div { padding: 7px 9px; border: 1px solid var(--line-soft); border-radius: 6px; }
.report-comparison dt { font-size: 12px; color: var(--muted); }
.report-comparison dd { color: var(--strong); font-weight: 650; }
.report-task { padding-top: 8px; border-top: 1px solid var(--line-soft); }
.report-task-form { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; align-items: center; gap: 6px; }
.report-task-form :is(input,select) { min-height: 34px; min-width: 0; font-size: 13px; }
.report-task-form .field-error { grid-column: 1 / -1; }
@media (max-width: 460px) { .report-task-form { grid-template-columns: 1fr auto; } .report-task-form input { grid-column: 1 / -1; grid-row: 2; } }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0; margin-bottom: 20px; }
.step { display: flex; align-items: center; gap: 7px; padding: 8px 7px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.step b { display: grid; place-items: center; border-radius: 50%; background: #253145; width: 20px; height: 20px; flex: none; font-size: 11px; }
.step.current { color: var(--primary); background: #173029; border-color: #345d51; }
.step.current b, .step.completed b { color: #0e2b22; background: var(--primary); }
.step.completed { color: var(--text); }
.copy-row { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); gap: 8px; padding: 7px 8px 7px 10px; border-radius: 8px; background: #0e151e; }
.copy-row code { overflow-wrap: anywhere; color: #d4e3f4; font-size: 12px; }
.copy-row .button { flex: none; }
.login-layout { min-height: 100vh; padding: 28px; display: grid; place-items: center; background: radial-gradient(ellipse at 21% 25%, #142b2a 0%, transparent 49%), #0d1118; }
.login-shell { width: min(900px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); align-items: center; gap: clamp(24px, 6vw, 78px); }
.login-intro { padding: 12px 0; }
.login-intro h1 { margin-top: 28px; max-width: 450px; color: var(--strong); font-size: clamp(30px, 4.1vw, 54px); line-height: 1.23; letter-spacing: -.035em; }
.login-intro p { max-width: 390px; font-size: 14px; margin-top: 16px; color: #acbdc6; line-height: 1.7; }
.login-brand { display: flex; align-items: center; gap: 11px; color: var(--strong); font-size: 21px; font-weight: 750; }
.login-brand small { margin-left: 4px; font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.login-card { padding: 24px; box-shadow: 0 16px 50px #0004; }
.login-card h2 { margin-bottom: 7px; color: var(--strong); font-size: 20px; }
.login-card form { margin-top: 20px; }
.login-card .form-actions { margin-top: 18px; }
.login-card input { width: 100%; }
.login-demo { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.login-demo legend { color: var(--muted); font-size: 12px; }
dialog { border: 1px solid #39495e; border-radius: 14px; padding: 0; color: var(--text); background: #151d27; width: min(590px, calc(100% - 24px)); max-height: min(calc(100% - 28px), 780px); box-shadow: 0 20px 80px #0008; }
dialog::backdrop { background: #05090fbc; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 17px 18px 13px; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { color: var(--strong); font-size: 18px; line-height: 1.4; }
.dialog-heading p { color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.5; }
.dialog-body { padding: 17px 18px 19px; }
.toast { position: fixed; bottom: 18px; right: 18px; z-index: 200; max-width: min(430px, calc(100% - 36px)); color: var(--text); }
.toast.show { padding: 11px 14px; border: 1px solid #386957; border-radius: 9px; background: #1b3531; font-size: 13px; line-height: 1.5; box-shadow: 0 8px 24px #0007; }
.toast.show.error { border-color: #79424b; background: #412b34; }
.paginate { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 15px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.screen-layout .sidebar, .screen-layout .topbar { display: none; }
.screen-layout { min-height: 100vh; padding-left: 0; background: radial-gradient(ellipse at 12% 0%, #18332f 0%, transparent 46%), var(--bg); }
.screen-layout .main { max-width: 1920px; padding: 23px; }
.screen-layout .dashboard-grid { grid-template-columns: minmax(0, 2fr) minmax(290px, 1fr); }
.screen-layout .chart-wrap { height: max(250px, 27vh); }
.screen-layout .kpi { min-height: 126px; }
.screen-layout .kpi-value { font-size: clamp(30px, 3vw, 43px); }
@media (max-width: 1150px) {
  :root { --sidebar-w: 191px; }
  .topbar { padding-inline: 18px; }
  .main { padding-inline: 19px; }
  .site-grid, .tenant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --sidebar-w: 175px; }
  .brand { padding-inline: 14px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.55fr) minmax(230px, 1fr); }
  .main { padding-inline: 14px; }
  .kpis, .dashboard-grid { gap: 9px; }
  .kpi { padding: 10px; min-height: 99px; }
  .kpi-top { gap: 6px; font-size: 11px; }
  .panel-heading { padding-inline: 11px; }
  .chart-legend { gap: 5px; }
  .report-grid { grid-template-columns: 1fr; }
}
@media (max-width: 740px) {
  :root { --header-h: 56px; --sidebar-w: 219px; }
  .layout { padding-left: 0; }
  .sidebar { transform: translateX(-100%); transition: transform .18s ease; z-index: 40; }
  .sidebar.open { transform: none; }
  .mobile-nav-button { display: inline-flex; margin-right: 1px; }
  .mobile-overlay.open { display: block; border: none; position: fixed; inset: 0; z-index: 30; background: #03070ba8; width: 100%; height: 100%; }
  .topbar { padding-inline: 12px; }
  .header-actions { gap: 3px; }
  .topbar .header-divider { margin-inline: 4px; }
  .main { padding: 19px 12px 31px; }
  .page-heading { align-items: flex-start; margin-bottom: 15px; }
  .page-heading h1 { font-size: 23px; }
  .page-heading p { font-size: 12px; }
  .dashboard-grid, .screen-layout .dashboard-grid { grid-template-columns: 1fr; }
  .risk-panel { min-height: auto; }
  .site-grid, .tenant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-shell { grid-template-columns: minmax(0, 390px); justify-content: center; gap: 12px; }
  .login-intro h1 { font-size: 28px; margin-top: 16px; }
  .login-intro p { margin-top: 8px; }
}
@media (max-width: 470px) {
  .page-heading { flex-direction: column; }
  .page-actions { width: 100%; }
  .report-table th, .report-table td { padding-inline: 6px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-grid, .tenant-grid, .fields.two { grid-template-columns: 1fr; }
  .toolbar-panel, .panel-pad { padding-inline: 11px; }
  .breadcrumb .root-crumb, .breadcrumb .crumb-icon { display: none; }
  .chart-legend { font-size: 10px; }
  .login-layout { padding: 16px; }
  .login-card { padding: 19px; }
  .steps { gap: 5px; }
  .step { padding-inline: 5px; gap: 4px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
.dialog-status { margin-top: 13px; }
