:root {
  color-scheme: light;
  --background: #f4f7fb;
  --surface: #ffffff;
  --surface-secondary: #eef4fa;
  --border: #d8e3ef;
  --text-primary: #102f55;
  --text-secondary: #52677d;
  --text-muted: #718399;
  --primary: #0b63f6;
  --primary-hover: #084fc4;
  --success: #16a66a;
  --warning: #f59e0b;
  --danger: #dc4c64;
  --info: #0eb7e9;
  --disabled: #aab8c7;
  --sidebar: #f8fafd;
  --sidebar-surface: #edf4fb;
  --sidebar-text: #173a62;
  --sidebar-secondary: #526d89;
  --sidebar-muted: #647b94;
  --sidebar-border: #dce6f0;
  --sidebar-hover: #eef4fa;
  --sidebar-active-bg: #e5f0ff;
  --sidebar-active-text: #0b63f6;
  --sidebar-mark-bg: #e5f0ff;
  --sidebar-mark-text: #0b63f6;
  --sidebar-decoration: #3772b5;
  --sidebar-toggle-border: #d5e1ed;
  --sidebar-toggle-text: #526d89;
  --sidebar-shadow: 0 3px 10px rgba(16,47,85,.14);
  --sidebar-workspace-bg: #f2f6fb;
  --shadow-soft: 0 8px 24px rgba(6, 30, 56, 0.08);
  --shadow-card: 0 2px 10px rgba(6, 30, 56, 0.06);
  --shadow-pop: 0 16px 36px rgba(6, 30, 56, 0.16);
  --focus: 0 0 0 3px rgba(14, 183, 233, 0.26);
  --radius-control: 8px;
  --radius-card: 12px;
  font-family: Inter, 'Segoe UI', Roboto, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --background: #061626;
  --surface: #0a2036;
  --surface-secondary: #0e2a43;
  --border: #1e4567;
  --text-primary: #f4f8fc;
  --text-secondary: #afc3d6;
  --text-muted: #7f9ab3;
  --primary: #1680ff;
  --primary-hover: #3d9bff;
  --success: #27d48b;
  --warning: #ffb72e;
  --danger: #ff657b;
  --info: #21c3ef;
  --disabled: #597188;
  --sidebar: #041321;
  --sidebar-surface: #0b2945;
  --sidebar-text: #eef5ff;
  --sidebar-secondary: #afc7e5;
  --sidebar-muted: #8da8c4;
  --sidebar-border: rgba(221, 236, 255, .12);
  --sidebar-hover: rgba(255,255,255,.075);
  --sidebar-active-bg: #1680ff;
  --sidebar-active-text: #ffffff;
  --sidebar-mark-bg: #194777;
  --sidebar-mark-text: #cbe3ff;
  --sidebar-decoration: #5698da;
  --sidebar-toggle-border: rgba(221,236,255,.18);
  --sidebar-toggle-text: #c4d6ea;
  --sidebar-shadow: 0 3px 10px rgba(3,17,31,.2);
  --sidebar-workspace-bg: rgba(255,255,255,.035);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.22);
  --shadow-pop: 0 16px 36px rgba(0, 0, 0, 0.42);
  --focus: 0 0 0 3px rgba(33, 195, 239, 0.27);
}

* { box-sizing: border-box; }
html { min-width: 360px; background: var(--background); scroll-behavior: smooth; }
body { min-width: 360px; margin: 0; color: var(--text-primary); background: var(--background); font-size: 14px; line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 0; box-shadow: var(--focus); }
button:disabled { cursor: not-allowed; opacity: .56; }
button { color: inherit; }
a { color: var(--primary); text-decoration: none; }
.icon { display: inline-block; flex: 0 0 auto; width: 18px; height: 18px; }

.app-shell { min-height: 100vh; --sidebar-width: 248px; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; width: var(--sidebar-width); flex-direction: column; padding: 0 14px 16px; overflow-y: auto; color: var(--sidebar-text); background: var(--sidebar); border-right: 1px solid var(--sidebar-border); transition: width .18s ease, background-color .16s ease, color .16s ease; }
.brand { position: relative; display: flex; min-height: 82px; align-items: center; gap: 12px; padding: 13px 8px 12px; border-bottom: 1px solid var(--sidebar-border); }
.brand-gear { width: 40px; height: 40px; color: #2e91ff; stroke-width: 2; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { font-size: 15px; font-weight: 650; letter-spacing: -.3px; }
.brand-copy span { margin-top: 3px; color: var(--sidebar-secondary); font-size: 12px; }
.brand-image { width: 40px; height: 40px; object-fit: contain; }
.workspace-switch { display: flex; align-items: center; gap: 10px; margin: 16px 0 23px; padding: 10px 8px; border: 1px solid var(--sidebar-border); border-radius: 10px; background: var(--sidebar-workspace-bg); }
.workspace-mark { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; color: var(--sidebar-mark-text); background: var(--sidebar-mark-bg); font-size: 13px; font-weight: 700; }
.workspace-switch > span:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.workspace-switch strong { overflow: hidden; color: var(--sidebar-text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-switch small { margin-top: 2px; color: var(--sidebar-muted); font-size: 10px; }
.workspace-chevron { width: 14px; height: 14px; color: var(--sidebar-muted); }
.primary-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-label { margin: 0 11px 6px; color: var(--sidebar-muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.nav-item { display: flex; min-height: 44px; align-items: center; gap: 13px; padding: 0 12px; border: 0; border-radius: 9px; color: var(--sidebar-secondary); background: transparent; text-align: left; transition: color .14s ease, background .14s ease; }
.nav-item .icon { width: 19px; height: 19px; }
.nav-item span { font-size: 13px; font-weight: 500; }
.nav-item:hover { color: var(--sidebar-text); background: var(--sidebar-hover); }
.nav-item.active { color: var(--sidebar-active-text); background: var(--sidebar-active-bg); box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 12%, transparent); }
.nav-item.active span { font-weight: 600; }
.sidebar-footer { position: relative; display: flex; flex: 1; flex-direction: column; justify-content: flex-end; min-height: 150px; margin-top: 24px; padding: 0 8px 7px; color: var(--sidebar-muted); }
.sidebar-footer::before { position: absolute; right: -14px; bottom: 110px; left: -14px; height: 125px; content: ''; opacity: .11; background: radial-gradient(ellipse at 10% 95%, var(--sidebar-decoration) 0 1px, transparent 2px), linear-gradient(150deg, transparent 45%, var(--sidebar-decoration) 45.5% 46%, transparent 46.5%); pointer-events: none; }
.sidebar-footer-icon { display: none; }
.sidebar-footer strong { color: var(--sidebar-secondary); font-size: 11px; font-weight: 600; }
.sidebar-footer span, .sidebar-footer small { margin-top: 5px; font-size: 10px; }
.sidebar-footer small { margin-top: 14px; }
.sidebar-close, .mobile-menu, .sidebar-overlay { display: none; }
.sidebar-collapse-button { position: fixed; top: 86px; left: calc(var(--sidebar-width) - 14px); z-index: 35; display: grid; width: 28px; height: 36px; place-items: center; padding: 0; border: 1px solid var(--sidebar-toggle-border); border-radius: 0 8px 8px 0; color: var(--sidebar-toggle-text); background: var(--sidebar); box-shadow: var(--sidebar-shadow); transition: left .18s ease, background .14s ease, color .14s ease; }
.sidebar-collapse-button:hover { color: var(--sidebar-text); background: var(--sidebar-surface); }
.sidebar-collapse-button .icon { width: 17px; height: 17px; }

@media (min-width: 761px) {
  .app-shell.sidebar-collapsed { --sidebar-width: 76px; }
  .sidebar-collapsed .sidebar { padding-right: 8px; padding-left: 8px; overflow-x: hidden; }
  .sidebar-collapsed .brand { justify-content: center; padding-right: 0; padding-left: 0; }
  .sidebar-collapsed .brand-copy,
  .sidebar-collapsed .workspace-switch > span:nth-child(2),
  .sidebar-collapsed .workspace-chevron,
  .sidebar-collapsed .nav-label,
  .sidebar-collapsed .nav-item span,
  .sidebar-collapsed .sidebar-footer > :not(.sidebar-footer-icon) { display: none; }
  .sidebar-collapsed .brand-gear, .sidebar-collapsed .brand-image { width: 36px; height: 36px; }
  .sidebar-collapsed .workspace-switch { justify-content: center; margin: 16px 0 23px; padding: 8px 0; border-color: transparent; background: transparent; }
  .sidebar-collapsed .nav-item { justify-content: center; gap: 0; padding: 0; }
  .sidebar-collapsed .sidebar-footer { min-height: 60px; flex: 0 0 60px; align-items: center; justify-content: flex-end; padding: 0; }
  .sidebar-collapsed .sidebar-footer::before { display: none; }
  .sidebar-collapsed .sidebar-footer-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; color: var(--sidebar-secondary); background: var(--sidebar-surface); }
  .sidebar-collapsed .sidebar-footer-icon .icon { width: 18px; height: 18px; }
}

.main-column { min-height: 100vh; margin-left: var(--sidebar-width); transition: margin-left .18s ease; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; height: 68px; align-items: center; gap: 16px; padding: 0 28px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: blur(14px); }
.topbar-context { display: flex; min-width: 220px; flex: 1; align-items: baseline; gap: 4px; overflow: hidden; }
.breadcrumb { display: none; color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.topbar-title { overflow: hidden; font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.global-search { display: flex; width: min(320px, 25vw); height: 40px; flex: 0 1 320px; align-items: center; gap: 10px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-muted); background: var(--surface); }
.global-search .icon { width: 17px; height: 17px; }
.global-search input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--text-primary); background: transparent; font-size: 12px; }
.global-search input::placeholder { color: var(--text-muted); }
.global-search kbd { display: grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; border-radius: 5px; color: var(--text-muted); background: var(--surface-secondary); font-size: 11px; }
.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; font-weight: 600; white-space: nowrap; transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.button .icon { width: 16px; height: 16px; }
.button-primary { border-color: var(--primary); color: #fff; background: var(--primary); box-shadow: 0 3px 8px rgba(11, 99, 246, .16); }
.button-primary:hover { border-color: var(--primary-hover); background: var(--primary-hover); }
.button-secondary { border-color: var(--border); color: var(--text-primary); background: var(--surface); }
.button-secondary:hover, .button-tertiary:hover { border-color: var(--primary); color: var(--primary); background: color-mix(in srgb, var(--primary) 5%, var(--surface)); }
.button-tertiary { min-height: 34px; border-color: var(--border); color: var(--text-secondary); background: var(--surface); }
.topbar-upload { height: 40px; }
.topbar-divider { width: 1px; height: 27px; background: var(--border); }
.theme-toggle { display: flex; align-items: center; gap: 8px; padding: 4px 0; border: 0; color: var(--text-muted); background: transparent; }
.theme-toggle > .icon { width: 16px; height: 16px; }
.toggle-track { display: flex; width: 38px; height: 22px; align-items: center; padding: 3px; border-radius: 999px; background: #c8d5e4; transition: background .15s; }
.toggle-track span { width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); transition: transform .15s; }
[data-theme='dark'] .toggle-track { background: var(--primary); }
[data-theme='dark'] .toggle-track span { transform: translateX(16px); }
.profile-button { display: flex; align-items: center; gap: 9px; padding: 0 0 0 1px; border: 0; color: var(--text-primary); background: transparent; text-align: left; }
.avatar { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border)); border-radius: 50%; color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); font-size: 11px; font-weight: 700; }
.profile-copy { display: flex; flex-direction: column; }
.profile-copy strong { font-size: 11px; font-weight: 600; white-space: nowrap; }
.profile-copy small { margin-top: 2px; color: var(--text-muted); font-size: 10px; }
.profile-button > .icon { width: 14px; height: 14px; color: var(--text-muted); }

.content { width: 100%; max-width: 1760px; margin: 0 auto; padding: 24px 28px 36px; }
.page-heading { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.eyebrow { margin-bottom: 4px; color: var(--primary); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.page-heading h1 { margin: 0; color: var(--text-primary); font-size: clamp(23px, 2vw, 29px); font-weight: 650; letter-spacing: -.045em; line-height: 1.2; }
.page-heading p { margin: 5px 0 0; color: var(--text-secondary); font-size: 13px; }
.heading-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.surface { border: 1px solid color-mix(in srgb, var(--border) 72%, transparent); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-card); }
.dashboard-stack, .page-stack { display: flex; flex-direction: column; gap: 16px; }
.analysis-scope { display: flex; min-width: 0; align-items: center; gap: 12px; padding: 11px 14px; background: color-mix(in srgb, var(--primary) 3%, var(--surface)); box-shadow: none; }
.analysis-scope-icon, .dashboard-detail-icon, .report-ready-icon { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.analysis-scope-icon .icon, .dashboard-detail-icon .icon, .report-ready-icon .icon { width: 18px; height: 18px; }
.analysis-scope-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 2px; }
.analysis-scope-copy > span { color: var(--text-muted); font-size: 9px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.analysis-scope-copy > strong { overflow: hidden; color: var(--text-primary); font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.analysis-scope-copy > small { color: var(--text-muted); font-size: 9px; }
.dashboard-detail-link, .report-ready-card { display: flex; min-width: 0; align-items: center; gap: 12px; padding: 12px 14px; }
.dashboard-detail-link > div, .report-ready-card > div { min-width: 0; flex: 1; }
.dashboard-detail-link strong, .report-ready-card strong { color: var(--text-primary); font-size: 11px; }
.dashboard-detail-link p, .report-ready-card p { margin: 3px 0 0; color: var(--text-muted); font-size: 10px; }
.print-report-source { display: none; }

.filter-panel { position: relative; z-index: 4; padding: 15px 16px; box-shadow: none; }
.filter-row { display: grid; align-items: end; gap: 12px; }
.filter-row-top { grid-template-columns: minmax(268px, 1.35fr) minmax(165px, .8fr) minmax(165px, .9fr) minmax(150px, .82fr) minmax(150px, .85fr); }
.filter-row-bottom { grid-template-columns: repeat(5,minmax(110px,1fr)) auto; margin-top: 12px; }
.filter-field { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.filter-field > label, .multi-select summary label { color: var(--text-secondary); font-size: 10px; font-weight: 600; }
.filter-field > select, .filter-field > input, .multi-select summary, .searchable-select > summary { width: 100%; height: 39px; min-width: 0; padding: 0 10px; border: 1px solid var(--border); border-radius: 7px; outline: 0; color: var(--text-primary); background: var(--surface); font-size: 12px; }
.filter-field select { padding-right: 22px; }
.filter-field input[type='date'] { color: var(--text-secondary); }
.filter-field > select:hover, .filter-field > input:hover, .multi-select summary:hover, .searchable-select > summary:hover { border-color: color-mix(in srgb, var(--primary) 48%, var(--border)); }
.filter-date-group { display: grid; grid-template-columns: minmax(116px,1fr) 16px minmax(116px,1fr); align-items: end; gap: 6px; }
.filter-period-note { display: flex; align-items: center; gap: 6px; margin: 8px 0 2px; color: var(--text-muted); font-size: 9px; line-height: 1.4; }
.filter-period-note .icon { width: 13px; height: 13px; flex: 0 0 auto; color: var(--primary); }
.filter-period-note strong { color: var(--text-secondary); font-weight: 600; }
.filter-dash { padding-bottom: 10px; color: var(--text-muted); text-align: center; }
.segmented { display: flex; min-height: 39px; align-items: center; padding: 3px; border-radius: 8px; background: var(--surface-secondary); }
.segment { display: flex; min-width: 0; min-height: 32px; flex: 1; align-items: center; justify-content: center; padding: 0 9px; border: 0; border-radius: 6px; color: var(--text-secondary); background: transparent; font-size: 11px; font-weight: 500; }
.segment.selected { color: var(--primary); background: var(--surface); box-shadow: 0 1px 4px rgba(6, 30, 56, .1); font-weight: 650; }
.multi-select { position: relative; }
.multi-select > summary, .searchable-select > summary { display: flex; height: 39px; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.multi-select > summary::-webkit-details-marker, .searchable-select > summary::-webkit-details-marker { display: none; }
.multi-select summary span:first-child, .searchable-select summary span:first-child { display: flex; min-width: 0; flex-direction: column; gap: 0; }
.multi-select summary label { line-height: 1.1; }
.filter-picker-label { color: var(--text-secondary); font-size: 10px; font-weight: 600; line-height: 1.1; }
.select-summary { overflow: hidden; color: var(--text-primary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.multi-select summary > .icon, .searchable-select summary > .icon { width: 15px; height: 15px; flex: 0 0 auto; color: var(--text-muted); }
.multi-options, .search-picker-options { position: absolute; top: calc(100% + 5px); right: 0; z-index: 12; display: flex; flex-direction: column; gap: 5px; padding: 8px; overflow: hidden; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); box-shadow: var(--shadow-pop); }
.multi-options { width: min(340px, max(280px, 100%)); max-height: 360px; }
.search-picker-options { width: max(230px, 100%); max-height: 320px; }
.searchable-select { position: relative; }
.search-picker-options { left: 0; }
.filter-options-search { display: flex; min-height: 36px; flex: 0 0 auto; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid var(--border); border-radius: 6px; color: var(--text-muted); background: var(--surface); }
.filter-options-search .icon { width: 14px; height: 14px; flex: 0 0 auto; }
.filter-field .filter-options-search input { width: 100%; height: 34px; min-width: 0; flex: 1; padding: 0; border: 0; border-radius: 0; outline: 0; color: var(--text-primary); background: transparent; font-size: 11px; }
.filter-options-search:focus-within { border-color: color-mix(in srgb, var(--primary) 58%, var(--border)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 11%, transparent); }
.search-option-list, .multi-option-list { min-height: 0; overflow-y: auto; }
.multi-option-list { max-height: 245px; padding: 2px; overscroll-behavior: contain; }
.search-option { display: flex; width: 100%; min-height: 33px; align-items: center; padding: 6px 8px; border: 0; border-radius: 5px; color: var(--text-primary); background: transparent; text-align: left; font-size: 11px; cursor: pointer; }
.search-option:hover, .search-option[aria-pressed="true"] { color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.search-option[aria-pressed="true"] { font-weight: 650; }
.search-result-hint { display: block; padding: 6px 8px; color: var(--text-muted); font-size: 9px; line-height: 1.4; }
.select-all { display: flex; width: 100%; min-height: 31px; flex: 0 0 auto; align-items: center; padding: 0 7px; border: 0; border-bottom: 1px solid var(--border); border-radius: 5px 5px 0 0; color: var(--primary); background: transparent; text-align: left; font-size: 10px; font-weight: 600; cursor: pointer; }
.select-all:hover { background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.select-all:disabled { color: var(--text-muted); cursor: not-allowed; }
.check-option { display: grid; min-height: 34px; grid-template-columns: 16px minmax(0,1fr); align-items: center; gap: 9px; padding: 5px 8px; border-radius: 6px; color: var(--text-secondary); cursor: pointer; font-size: 11px; line-height: 1.3; transition: background .12s ease, color .12s ease; }
.check-option:hover, .check-option:has(input:checked) { color: var(--text-primary); background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.check-option input[type='checkbox'] { appearance: auto; width: 16px; height: 16px; min-width: 16px; flex: 0 0 16px; margin: 0; padding: 0; border: 0; accent-color: var(--primary); cursor: pointer; }
.check-option > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.option-empty { color: var(--text-muted); font-size: 11px; }
.search-picker-options .option-empty, .multi-option-list .option-empty { margin: 8px; }
.filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.text-button { display: inline-flex; min-height: 36px; align-items: center; gap: 6px; padding: 0 4px; border: 0; color: var(--primary); background: transparent; font-size: 11px; font-weight: 600; white-space: nowrap; }
.text-button:hover { color: var(--primary-hover); }
.text-button .icon { width: 14px; height: 14px; }

.empty-banner { display: flex; align-items: center; gap: 14px; padding: 14px 17px; border-color: color-mix(in srgb, var(--info) 30%, var(--border)); background: color-mix(in srgb, var(--info) 4%, var(--surface)); box-shadow: none; }
.empty-banner > .icon { width: 24px; height: 24px; color: var(--primary); }
.empty-banner div { flex: 1; }
.empty-banner strong { font-size: 12px; }
.empty-banner p { margin: 2px 0 0; color: var(--text-secondary); font-size: 11px; }

.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 12px; }
.equipment-kpis { grid-template-columns: repeat(5, minmax(0,1fr)); }
.kpi-card { display: flex; min-width: 0; min-height: 104px; align-items: center; gap: 12px; padding: 15px 14px; }
.kpi-icon { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border-radius: 50%; }
.kpi-icon .icon { width: 20px; height: 20px; }
.kpi-icon.blue { color: #0b63f6; background: #e7f1ff; }
.kpi-icon.teal { color: #079f85; background: #e0f6f1; }
.kpi-icon.violet { color: #7750db; background: #eee9ff; }
.kpi-icon.amber { color: #e68611; background: #fff1df; }
.kpi-icon.pink { color: #d94c78; background: #ffe9f0; }
.kpi-icon.sky { color: #1c8cc8; background: #e3f5ff; }
[data-theme='dark'] .kpi-icon.blue { color: #64a9ff; background: #102e4b; }
[data-theme='dark'] .kpi-icon.teal { color: #53d8bc; background: #0d3b3a; }
[data-theme='dark'] .kpi-icon.violet { color: #ad91ff; background: #30255a; }
[data-theme='dark'] .kpi-icon.amber { color: #ffc66e; background: #48341c; }
[data-theme='dark'] .kpi-icon.pink { color: #ff8aa9; background: #472438; }
[data-theme='dark'] .kpi-icon.sky { color: #75d1ff; background: #113853; }
.kpi-content { display: flex; min-width: 0; flex-direction: column; gap: 1px; }
.kpi-content > span { overflow: hidden; color: var(--text-secondary); font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.kpi-content > strong { overflow: hidden; color: var(--text-primary); font-size: clamp(16px,1.35vw,22px); font-weight: 700; letter-spacing: -.035em; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.kpi-content > small { overflow: hidden; color: var(--text-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }

.dashboard-grid { display: grid; gap: 14px; }
.dashboard-grid-main { grid-template-columns: minmax(0,1fr); }
.dashboard-grid-bottom { grid-template-columns: minmax(0,1.8fr) minmax(0,1fr); align-items: stretch; }
.dashboard-trend-chart { display: flex; flex-direction: column; }
.dashboard-trend-chart .trend-plot { margin-block: auto; }
.dashboard-resource-card .resource-list { gap: 7px; }
.chart-card, .ranking-card { min-width: 0; padding: 16px 17px 13px; }
.card-heading { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.card-heading select { max-width: 164px; height: 34px; padding: 0 25px 0 9px; border: 1px solid var(--border); border-radius: 7px; color: var(--text-secondary); background: var(--surface); font-size: 10px; }
.card-title { display: flex; min-width: 0; align-items: flex-start; gap: 9px; }
.card-title > .icon { width: 19px; height: 19px; margin-top: 2px; color: var(--primary); stroke-width: 2.3; }
.card-title h2, .card-heading h2 { margin: 0; color: var(--text-primary); font-size: 13px; font-weight: 650; letter-spacing: -.015em; }
.card-title p { margin: 3px 0 0; color: var(--text-muted); font-size: 10px; }
.bar-chart, .trend-svg { display: block; width: 100%; height: auto; overflow: visible; }
.trend-plot { position: relative; min-width: 0; }
.trend-plot .trend-svg { margin: 0; }
.trend-svg[data-trend-crosshair='true'] { cursor: crosshair; }
.trend-crosshair { pointer-events: none; stroke: var(--primary); stroke-width: 1.5; stroke-dasharray: 4 4; opacity: .9; }
.trend-crosshair-point { pointer-events: none; fill: var(--surface); stroke: var(--primary); stroke-width: 2.5; }
.trend-svg circle[data-trend-x] { cursor: crosshair; }
.trend-svg circle[data-trend-x]:focus { outline: none; stroke: var(--info); stroke-width: 3; }
.trend-period-label { font-size: 14px; font-weight: 500; }
.trend-value-label { fill: var(--text-primary); font-family: Inter, sans-serif; font-size: 12px; font-weight: 700; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.trend-tooltip { position: absolute; z-index: 5; display: grid; width: max-content; min-width: 154px; max-width: min(252px,calc(100% - 10px)); max-height: 178px; gap: 3px; overflow: auto; padding: 9px 11px; border: 1px solid color-mix(in srgb, var(--primary) 32%, var(--border)); border-radius: 9px; color: var(--text-primary); background: var(--surface); box-shadow: var(--shadow-pop); pointer-events: none; }
.trend-tooltip[hidden] { display: none; }
.trend-tooltip-header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.trend-tooltip-period { color: var(--text-primary); font-size: 11px; font-weight: 700; }
.trend-tooltip-value { color: var(--primary); font-size: 10px; font-weight: 700; white-space: nowrap; }
.trend-tooltip-heading { color: var(--text-muted); font-size: 9px; font-weight: 600; }
.trend-tooltip-quantities { display: flex; flex-wrap: wrap; gap: 3px 9px; padding-top: 3px; border-top: 1px solid var(--border); }
.trend-tooltip-quantities > span { color: var(--text-secondary); font-size: 10px; line-height: 1.4; white-space: nowrap; }
.trend-tooltip-quantities strong { color: var(--text-primary); font-weight: 700; }
.grid-line { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.axis-label { fill: var(--text-muted); font-family: Inter, sans-serif; font-size: 10px; }
.bar-value { fill: var(--text-primary); font-family: Inter, sans-serif; font-size: 9px; font-weight: 600; }
.chart-bar.interactive { cursor: pointer; }
.chart-bar.interactive:hover rect { filter: brightness(1.12); }
.chart-bar:focus { outline: none; }
.chart-bar:focus rect { stroke: var(--info); stroke-width: 2px; }
.chart-legend-note { margin: 5px 0 0; color: var(--text-muted); font-size: 9px; }
.chart-note { margin: 8px 0 0; padding: 8px 10px; border-radius: 7px; color: var(--text-secondary); background: var(--surface-secondary); font-size: 10px; }
.chart-empty { display: flex; min-height: 150px; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; color: var(--text-muted); text-align: center; font-size: 11px; }
.chart-empty .icon { width: 22px; height: 22px; color: var(--disabled); }
.compact-segments { width: 142px; min-height: 32px; }
.compact-segments .segment { min-height: 26px; padding: 0 6px; font-size: 9px; }
.resource-list, .people-list { display: flex; flex-direction: column; gap: 9px; margin-top: 7px; }
.resource-row { display: grid; grid-template-columns: 21px minmax(0,1fr) auto; align-items: center; gap: 8px; }
.rank-index { color: var(--text-muted); font-size: 9px; font-weight: 600; }
.resource-info { min-width: 0; }
.resource-name-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.resource-name-line strong { overflow: hidden; color: var(--text-primary); font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.resource-name-line span { color: var(--text-muted); font-size: 9px; }
.rank-value { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; color: var(--text-secondary); font-size: 10px; font-weight: 600; white-space: nowrap; }
.rank-value small { color: var(--text-muted); font-size: 8px; font-weight: 500; }
.rank-track { display: block; height: 6px; overflow: hidden; border-radius: 999px; background: var(--surface-secondary); }
.rank-track > span { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: linear-gradient(90deg, #388fff, #0b63f6); }
.people-row { display: grid; grid-template-columns: 27px minmax(0,1fr) minmax(82px,.7fr); align-items: center; gap: 8px; }
.person-dot { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; color: var(--primary); background: color-mix(in srgb, var(--primary) 11%, var(--surface)); font-size: 10px; font-weight: 700; }
.person-detail { display: flex; min-width: 0; flex-direction: column; }
.person-detail strong, .person-value strong { overflow: hidden; color: var(--text-primary); font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.person-detail small { color: var(--text-muted); font-size: 9px; }
.person-value { display: flex; flex-direction: column; gap: 4px; }
.unit-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.unit-row { display: grid; grid-template-columns: 24px minmax(0,1fr) auto auto; align-items: center; gap: 7px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.unit-row:last-child { border: 0; }
.unit-marker { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 6px; color: var(--primary); background: var(--surface-secondary); }
.unit-marker .icon { width: 13px; height: 13px; }
.unit-row strong { overflow: hidden; color: var(--text-secondary); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.unit-row b { font-size: 11px; }
.unit-row small { color: var(--text-muted); font-size: 9px; }

.table-card { min-width: 0; padding: 14px 16px 12px; }
.table-heading { margin-bottom: 10px; }
.table-heading .text-button .icon { transform: rotate(0deg); }
.table-wrap { width: 100%; overflow: auto hidden; border: 1px solid var(--border); border-radius: 8px; scrollbar-color: var(--disabled) transparent; scrollbar-width: thin; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
thead { position: sticky; top: 0; z-index: 1; }
th { height: 35px; padding: 0 10px; border-bottom: 1px solid var(--border); color: var(--text-secondary); background: var(--surface-secondary); font-size: 10px; font-weight: 600; }
td { height: 37px; padding: 6px 10px; border-bottom: 1px solid color-mix(in srgb, var(--border) 74%, transparent); color: var(--text-secondary); font-size: 10px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--primary) 3%, var(--surface)); }
.align-right { text-align: right; }
.strong-cell { color: var(--text-primary); font-weight: 600; }
.table-link { padding: 0; border: 0; color: var(--primary); background: transparent; font-size: inherit; font-weight: 600; }
.table-link:hover { text-decoration: underline; }
.resource-name-cell { color: var(--text-primary); font-weight: 500; }
.clickable-row { cursor: pointer; }
.row-arrow { width: 16px; height: 16px; color: var(--primary); }
.status-badge { display: inline-flex; min-height: 22px; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 9px; font-weight: 600; }
.status-badge::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ''; }
.status-success { color: var(--success); background: color-mix(in srgb, var(--success) 10%, var(--surface)); }
.status-warning { color: #ad7400; background: color-mix(in srgb, var(--warning) 14%, var(--surface)); }
.status-danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.status-neutral { color: var(--text-muted); background: var(--surface-secondary); }
.table-empty { display: flex; min-height: 185px; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--text-muted); text-align: center; }
.table-empty > .icon { width: 28px; height: 28px; color: var(--disabled); }
.table-empty strong { color: var(--text-primary); font-size: 13px; }
.table-empty p { max-width: 420px; margin: 0 0 7px; font-size: 11px; }
.compact-empty { min-height: 90px; }
.pagination { display: flex; min-height: 45px; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; color: var(--text-muted); font-size: 10px; }
.pagination > div { display: flex; align-items: center; gap: 8px; }
.page-count { color: var(--text-secondary); }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.table-toolbar-title { display: flex; min-width: 180px; align-items: center; }
.table-toolbar-controls { display: flex; align-items: center; gap: 8px; }
.table-search { display: flex; width: min(250px, 24vw); height: 37px; align-items: center; gap: 8px; padding: 0 9px; border: 1px solid var(--border); border-radius: 7px; color: var(--text-muted); background: var(--surface); }
.table-search .icon { width: 16px; height: 16px; }
.table-search input { width: 100%; border: 0; outline: 0; color: var(--text-primary); background: transparent; font-size: 10px; }
.page-size { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 10px; }
.page-size select { height: 34px; padding: 0 8px; border: 1px solid var(--border); border-radius: 7px; color: var(--text-primary); background: var(--surface); font-size: 10px; }
.summary-kpi-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.summary-kpi-grid.single { grid-template-columns: repeat(3,minmax(0,1fr)); }
.summary-kpi-grid .kpi-card { min-height: 82px; padding: 12px 14px; }
.consumption-summary-card { padding-bottom: 8px; }
.summary-table-wrap { overflow-x: auto; }
.summary-table { min-width: 760px; }
.summary-table th { height: 42px; }
.summary-table td { height: 48px; }
.summary-product-cell { max-width: 460px; overflow: hidden; color: var(--text-primary); font-weight: 550; text-overflow: ellipsis; }
.summary-action-cell { width: 1%; text-align: right; }
.summary-action-cell .text-button { min-height: 32px; justify-content: flex-end; font-size: 10px; }
.summary-action-cell .text-button .icon { width: 14px; height: 14px; }
.summary-details-row td { padding: 0; background: color-mix(in srgb, var(--surface-secondary) 54%, var(--surface)); }
.summary-details-content { padding: 12px 16px 14px; }
.summary-details-heading, .summary-details-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.summary-details-heading { margin-bottom: 8px; color: var(--text-primary); font-size: 10px; }
.summary-details-heading span, .summary-details-pagination { color: var(--text-muted); font-size: 9px; }
.summary-movements-wrap { border-radius: 7px; }
.summary-movements-table { min-width: 680px; }
.summary-movements-table th { height: 31px; font-size: 9px; }
.summary-movements-table td { height: 33px; font-size: 9px; }
.summary-movement-description { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.summary-details-pagination { padding-top: 8px; }
.summary-details-pagination > div { display: flex; align-items: center; gap: 8px; }
.summary-details-pagination .button { min-height: 28px; height: 28px; padding: 0 8px; font-size: 9px; }
.summary-details-loading { padding: 16px; color: var(--text-muted); font-size: 10px; }
.summary-details-error { color: var(--danger); }
.wide-table { min-width: 1640px; }
.sort-button { display: inline-flex; align-items: center; gap: 2px; padding: 0; border: 0; color: inherit; background: transparent; font-size: inherit; font-weight: inherit; }
.sort-button .icon { width: 12px; height: 12px; transform: rotate(180deg); }
.group-summary { display: flex; align-items: flex-start; gap: 14px; margin: 4px 0 12px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; background: color-mix(in srgb, var(--surface-secondary) 48%, var(--surface)); }
.group-summary > label { display: flex; min-width: 115px; flex-direction: column; gap: 3px; color: var(--text-muted); font-size: 9px; }
.group-summary select { height: 30px; padding: 0 6px; border: 1px solid var(--border); border-radius: 6px; color: var(--text-primary); background: var(--surface); font-size: 10px; }
.group-tags { display: flex; min-width: 0; flex: 1; gap: 7px; overflow-x: auto; }
.group-tag { display: grid; min-width: 142px; grid-template-columns: minmax(0,1fr) auto; gap: 1px 7px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); }
.group-tag strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.group-tag > span { color: var(--text-secondary); font-size: 9px; }
.group-tag small { grid-column: 1 / -1; overflow: hidden; color: var(--text-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.subtle { color: var(--text-muted); font-size: 10px; }

.equipment-list-card { padding: 16px; }
.equipment-cell { display: inline-flex; align-items: center; gap: 9px; }
.equipment-avatar { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.equipment-avatar .icon { width: 17px; height: 17px; }
.equipment-cell > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.equipment-cell strong { color: var(--text-primary); font-size: 11px; }
.equipment-cell small { color: var(--text-muted); font-size: 9px; }
.equipment-profile { display: grid; grid-template-columns: 190px minmax(0,1fr) 220px; align-items: center; gap: 20px; padding: 14px; }
.equipment-photo { display: flex; min-height: 132px; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border); border-radius: 9px; color: var(--primary); background: linear-gradient(135deg, var(--surface-secondary), color-mix(in srgb, var(--primary) 9%, var(--surface))); }
.equipment-photo .icon { width: 49px; height: 49px; }
.equipment-photo span { color: var(--text-muted); font-size: 9px; }
.equipment-ident { align-self: stretch; padding: 4px 2px; }
.equipment-title-row { display: flex; align-items: center; gap: 10px; }
.equipment-title-row h2 { margin: 2px 0; font-size: 21px; letter-spacing: -.035em; }
.equipment-ident > p { margin: 4px 0 16px; color: var(--text-secondary); font-size: 12px; }
.equipment-ident > p span { margin: 0 6px; color: var(--disabled); }
.equipment-meta { display: flex; flex-wrap: wrap; gap: 22px; }
.equipment-meta > span { display: grid; grid-template-columns: 22px auto; gap: 2px 6px; }
.equipment-meta .icon { grid-row: span 2; width: 17px; height: 17px; color: var(--primary); }
.equipment-meta small { color: var(--text-muted); font-size: 9px; }
.equipment-meta strong { color: var(--text-primary); font-size: 10px; font-weight: 600; }
.equipment-last { display: grid; grid-template-columns: 35px 1fr; gap: 0 8px; align-items: center; padding: 13px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-secondary); }
.equipment-last > span { display: grid; width: 34px; height: 34px; grid-row: span 3; place-items: center; border-radius: 50%; color: var(--primary); background: color-mix(in srgb, var(--primary) 11%, var(--surface)); }
.equipment-last .icon { width: 18px; height: 18px; }
.equipment-last small { color: var(--text-muted); font-size: 9px; }
.equipment-last strong { margin-top: 1px; font-size: 12px; }
.equipment-last p { grid-column: 2; margin: 3px 0 0; color: var(--text-secondary); font-size: 9px; }
.kpi-grid-four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.equipment-detail-grid { grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); }
.observation-cell { max-width: 230px; overflow: hidden; text-overflow: ellipsis; }

.import-card { padding: 19px; }
.import-intro { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.import-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 10px; color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.import-intro h2, .preview-card h2 { margin: 0; font-size: 15px; font-weight: 650; }
.import-intro p, .preview-card .card-title p { margin: 4px 0 0; color: var(--text-secondary); font-size: 11px; }
.drop-zone { display: flex; min-height: 230px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border: 1px dashed color-mix(in srgb, var(--primary) 43%, var(--border)); border-radius: 10px; background: color-mix(in srgb, var(--primary) 2.5%, var(--surface)); transition: background .14s ease, border-color .14s ease; }
.drop-zone.drag-over { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, var(--surface)); }
.drop-zone.busy { pointer-events: none; opacity: .6; }
.drop-icon { display: grid; width: 49px; height: 49px; place-items: center; border-radius: 50%; color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.drop-icon .icon { width: 22px; height: 22px; }
.drop-zone > strong { margin-top: 5px; font-size: 13px; }
.drop-zone > p { margin: 0; color: var(--text-secondary); font-size: 11px; }
.drop-zone > small { color: var(--text-muted); font-size: 9px; }
.import-security-note { display: flex; align-items: center; gap: 7px; margin-top: 11px; color: var(--text-muted); font-size: 10px; }
.import-security-note .icon { width: 14px; height: 14px; color: var(--success); }
.preview-card { padding: 17px; }
.preview-kpis { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; margin: 15px 0; }
.preview-kpis > div { display: flex; min-height: 73px; flex-direction: column; justify-content: center; gap: 5px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-secondary); }
.preview-kpis span { color: var(--text-muted); font-size: 9px; }
.preview-kpis strong { color: var(--text-primary); font-size: 18px; font-weight: 700; }
.preview-kpis .period-value { font-size: 11px; }
.issues-panel { margin-top: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; }
.issues-panel > strong { font-size: 11px; }
.issues-list { display: flex; max-height: 250px; flex-direction: column; margin: 8px 0; overflow: auto; }
.issue-row { display: grid; min-height: 38px; grid-template-columns: 62px 105px minmax(0,1fr); align-items: center; gap: 8px; border-bottom: 1px solid var(--border); color: var(--text-secondary); font-size: 10px; }
.issue-row:last-child { border: 0; }
.issue-row small { color: var(--text-muted); font-size: 9px; }
.preview-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--text-secondary); font-size: 10px; }
.file-name-cell { display: inline-flex; align-items: center; gap: 7px; color: var(--text-primary); font-weight: 600; }
.file-name-cell .icon { width: 15px; height: 15px; color: var(--primary); }
.imports-table { min-width: 920px; table-layout: fixed; }
.imports-table th:nth-child(1) { width: 21%; }
.imports-table th:nth-child(2) { width: 18%; }
.imports-table th:nth-child(3) { width: 15%; }
.imports-table th:nth-child(4) { width: 8%; }
.imports-table th:nth-child(5), .imports-table th:nth-child(6) { width: 9%; }
.imports-table th:nth-child(7), .imports-table th:nth-child(8) { width: 10%; }
.imports-table td:not(.import-actions) { overflow: hidden; text-overflow: ellipsis; }
.imports-table .file-name-cell { display: flex; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imports-table .file-name-cell .icon { flex: 0 0 auto; }
.imports-table th:last-child { position: sticky; right: 0; z-index: 3; background: var(--surface-secondary); }
.import-actions { position: sticky; right: 0; z-index: 2; width: 10%; text-align: center; background: var(--surface); box-shadow: -8px 0 12px -10px var(--text-muted); }
.imports-table tbody tr:hover .import-actions { background: color-mix(in srgb, var(--primary) 3%, var(--surface)); }
.import-delete-button { display: inline-flex; min-height: 30px; align-items: center; justify-content: center; gap: 5px; margin: auto; padding: 0 6px; border: 1px solid color-mix(in srgb, var(--danger) 24%, var(--border)); border-radius: 7px; color: var(--danger); background: color-mix(in srgb, var(--danger) 5%, var(--surface)); font-size: 9px; font-weight: 600; white-space: nowrap; transition: color .14s ease, background .14s ease, border-color .14s ease; }
.import-delete-button .icon { width: 14px; height: 14px; }
.import-delete-button:hover, .import-delete-button:focus-visible { border-color: color-mix(in srgb, var(--danger) 22%, var(--border)); color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.duplicate-file-notice { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border-color: color-mix(in srgb, var(--warning) 45%, var(--border)); background: color-mix(in srgb, var(--warning) 5%, var(--surface)); }
.duplicate-file-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: #a86d00; background: color-mix(in srgb, var(--warning) 17%, var(--surface)); }
.duplicate-file-copy { min-width: 0; flex: 1; }
.duplicate-file-copy strong { font-size: 12px; }
.duplicate-file-copy p { margin: 3px 0 0; color: var(--text-secondary); font-size: 10px; }
.confirm-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(5, 22, 40, .48); backdrop-filter: blur(3px); }
.confirm-dialog { width: min(100%, 440px); padding: 22px; border: 1px solid var(--border); border-radius: 13px; color: var(--text-primary); background: var(--surface); box-shadow: var(--shadow-pop); }
.confirm-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 10px; color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.confirm-dialog h2 { margin: 14px 0 5px; font-size: 17px; }
.confirm-file { overflow-wrap: anywhere; margin: 0 0 9px; color: var(--text-primary); font-size: 12px; font-weight: 650; }
.confirm-dialog #delete-import-description { margin: 0; color: var(--text-secondary); font-size: 11px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 19px; }
.button-danger { border-color: var(--danger); color: #fff; background: var(--danger); }
.button-danger:hover { border-color: color-mix(in srgb, var(--danger) 80%, #000); background: color-mix(in srgb, var(--danger) 88%, #000); }

.report-action-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.report-action-row strong { font-size: 12px; }
.report-action-row p { margin: 3px 0 0; color: var(--text-muted); font-size: 10px; }
.report-mode-panel { display: grid; gap: 13px; padding: 16px; }
.report-mode-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.report-mode-heading h2 { margin: 0; color: var(--text-primary); font-size: 13px; }
.report-mode-heading p { margin: 4px 0 0; color: var(--text-muted); font-size: 10px; }
.report-mode-period { flex: 0 0 auto; padding: 7px 10px; border: 1px solid var(--border); border-radius: 7px; color: var(--text-secondary); background: var(--surface-secondary); font-size: 10px; font-weight: 600; }
.report-mode-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.report-mode-card { display: flex; min-width: 0; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); cursor: pointer; transition: border-color .14s ease, background .14s ease, box-shadow .14s ease; }
.report-mode-card:hover { border-color: color-mix(in srgb, var(--primary) 48%, var(--border)); }
.report-mode-card.selected { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 5%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 10%, transparent); }
.report-mode-card input { width: 15px; height: 15px; flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--primary); }
.report-mode-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 4px; }
.report-mode-copy strong { color: var(--text-primary); font-size: 11px; }
.report-mode-copy small { color: var(--text-muted); font-size: 9px; line-height: 1.45; }
.report-mode-count, .report-included-count { flex: 0 0 auto; padding: 4px 7px; border-radius: 6px; color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, var(--surface)); font-size: 9px; font-weight: 700; white-space: nowrap; }
.report-included-equipment { padding-top: 11px; border-top: 1px solid var(--border); }
.report-included-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.report-included-heading > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.report-included-heading strong { color: var(--text-primary); font-size: 10px; }
.report-included-heading small { color: var(--text-muted); font-size: 9px; }
.report-team-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; margin: 9px 0 0; padding: 0; list-style: none; }
.report-team-grid li { display: flex; min-width: 0; align-items: center; gap: 7px; padding: 7px 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-secondary); }
.report-team-grid li > span { color: var(--text-muted); font-size: 8px; font-variant-numeric: tabular-nums; }
.report-team-grid li > strong { overflow: hidden; color: var(--text-primary); font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.report-team-empty, .report-empty-note { margin: 9px 0 0; color: var(--text-muted); font-size: 10px; }
.report-placeholder { display: flex; min-height: 190px; align-items: center; justify-content: center; gap: 14px; padding: 20px; }
.report-placeholder > span { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 11px; color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, var(--surface)); }
.report-placeholder > div { max-width: 370px; }
.report-placeholder strong { font-size: 13px; }
.report-placeholder p { margin: 4px 0 0; color: var(--text-muted); font-size: 11px; }
.generated-report { padding: 17px; }
.report-heading { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 15px; border-bottom: 1px solid var(--border); }
.report-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.report-heading p { margin: 5px 0 0; color: var(--text-secondary); font-size: 10px; }
.report-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 11px; color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.report-logo { width: 38px; height: 38px; object-fit: contain; }
.report-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 14px; }
.report-meta { margin: 12px 0; padding: 9px 11px; border-radius: 7px; color: var(--text-secondary); background: var(--surface-secondary); font-size: 10px; }
.report-charts { grid-template-columns: repeat(3,minmax(0,1fr)); margin: 12px 0; }
.report-equipment-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 10px 0; }
.report-equipment-facts > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-secondary); }
.report-equipment-facts span { color: var(--text-muted); font-size: 8px; }
.report-equipment-facts strong { overflow-wrap: anywhere; color: var(--text-primary); font-size: 10px; font-weight: 600; }
.report-equipment-badge { flex: 0 0 auto; padding: 5px 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-secondary); background: var(--surface-secondary); font-size: 9px; font-weight: 600; }
.report-equipment-overview { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(270px,.8fr); gap: 9px; margin: 10px 0; }
.report-equipment-overview > article, .report-equipment-resource-card { min-width: 0; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.report-equipment-overview .card-heading, .report-equipment-resource-card .card-heading { min-height: 28px; margin-bottom: 3px; }
.report-equipment-overview .card-heading h2, .report-equipment-resource-card .card-heading h2 { margin: 0; font-size: 11px; }
.report-equipment-overview .card-heading p, .report-equipment-resource-card .card-heading p { margin: 3px 0 0; color: var(--text-muted); font-size: 8px; }
.report-equipment-trend .trend-svg { display: block; width: 100%; height: auto; }
.report-people-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px 8px; margin: 6px 0 0; padding: 0; list-style: none; }
.report-people-list li { display: grid; min-width: 0; grid-template-columns: 18px minmax(0,1fr) auto; align-items: center; gap: 3px 6px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.report-person-rank { color: var(--text-muted); font-size: 8px; }
.report-people-list li > strong { overflow: hidden; color: var(--text-primary); font-size: 8px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.report-people-list li > span:nth-of-type(2) { grid-column: 2; color: var(--text-muted); font-size: 7px; }
.report-people-list li > b { grid-column: 3; grid-row: 1 / span 2; color: var(--text-primary); font-size: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-equipment-resource-card { margin-top: 8px; }
.report-equipment-resource-wrap { max-height: none; overflow: visible; }
.report-equipment-resource-table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; }
.report-equipment-resource-table th, .report-equipment-resource-table td { padding: 5px 7px; border-bottom: 1px solid var(--border); text-align: left; font-size: 8px; }
.report-equipment-resource-table th { color: var(--text-secondary); background: var(--surface-secondary); font-size: 7px; font-weight: 700; }
.report-equipment-resource-table th:first-child, .report-equipment-resource-table td:first-child { width: 36px; }
.report-equipment-resource-table th:nth-child(2) { width: 44%; }
.report-equipment-resource-table th:nth-child(3) { width: 12%; }
.report-equipment-resource-table th:nth-child(4) { width: 12%; }
.report-equipment-resource-table th:nth-child(5) { width: 13%; }
.report-equipment-resource-table th:nth-child(6) { width: 14%; }
.report-equipment-resource-table td { color: var(--text-secondary); }
.report-equipment-resource-table .report-equipment-resource-name { overflow-wrap: anywhere; color: var(--text-primary); font-weight: 550; }
.report-equipment-resource-table .strong-cell { color: var(--text-primary); font-variant-numeric: tabular-nums; }

.settings-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(235px,.7fr); align-items: start; gap: 16px; }
.settings-card, .settings-side { padding: 17px; }
.settings-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 15px; }
.settings-form > label { display: flex; flex-direction: column; gap: 6px; color: var(--text-secondary); font-size: 10px; font-weight: 600; }
.settings-form input:not([type='file']), .settings-form select { min-height: 40px; padding: 0 10px; border: 1px solid var(--border); border-radius: 7px; color: var(--text-primary); background: var(--surface); font-size: 11px; }
.logo-setting { grid-column: 1 / -1; }
.logo-upload-row { display: flex; flex-direction: column; gap: 6px; }
.logo-upload-row input { color: var(--text-secondary); font-size: 10px; }
.logo-upload-row small { color: var(--text-muted); font-size: 9px; font-weight: 400; }
.form-footer { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 12px; margin-top: 5px; padding-top: 13px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 10px; }
.settings-side { color: var(--text-secondary); }
.settings-side-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 9px; color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.settings-side h3 { margin: 11px 0 4px; color: var(--text-primary); font-size: 13px; }
.settings-side p { margin: 0; font-size: 10px; }
.settings-side .settings-note { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--border); }
.settings-facts { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.settings-facts span { display: flex; justify-content: space-between; gap: 10px; color: var(--text-muted); font-size: 9px; }
.settings-facts strong { color: var(--text-primary); font-size: 9px; font-weight: 600; }

.toast-region { position: fixed; top: 82px; right: 22px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; min-width: 250px; max-width: min(420px,calc(100vw - 36px)); align-items: center; gap: 9px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 9px; color: var(--text-primary); background: var(--surface); box-shadow: var(--shadow-pop); font-size: 11px; animation: toast-in .18s ease-out; }
.toast .icon { width: 16px; height: 16px; }
.toast-success .icon { color: var(--success); }
.toast-error .icon { color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.auth-shell { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(ellipse at 15% 12%, color-mix(in srgb, var(--primary) 12%, var(--background)), transparent 38%), var(--background); }
.auth-card { width: min(100%, 430px); padding: 31px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-soft); }
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 28px; }
.auth-brand .brand-gear { width: 36px; height: 36px; }
.auth-brand > span { display: flex; flex-direction: column; }
.auth-brand strong { color: var(--text-primary); font-size: 13px; }
.auth-brand small { margin-top: 2px; color: var(--text-muted); font-size: 10px; }
.auth-card .eyebrow { color: var(--primary); font-size: 9px; font-weight: 700; letter-spacing: .09em; }
.auth-card h1 { margin: 7px 0 6px; color: var(--text-primary); font-size: 23px; line-height: 1.2; letter-spacing: -.035em; }
.auth-intro { margin: 0 0 21px; color: var(--text-secondary); font-size: 12px; }
#auth-form { display: flex; flex-direction: column; gap: 13px; }
#auth-form .auth-field { display: flex; flex-direction: column; gap: 6px; color: var(--text-secondary); font-size: 10px; font-weight: 600; }
#auth-form input { min-height: 42px; padding: 0 11px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); background: var(--surface); font-size: 12px; }
#auth-form .button { width: 100%; min-height: 42px; margin-top: 4px; }
.auth-hint { margin-top: -7px; color: var(--text-muted); font-size: 9px; font-weight: 400; }
.auth-error { margin: 0; padding: 9px 10px; border-radius: 7px; color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, var(--surface)); font-size: 10px; }
.auth-local-note { display: flex; align-items: center; gap: 7px; margin: 19px 0 0; padding-top: 13px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 9px; }
.auth-local-note .icon { width: 14px; height: 14px; }
.server-error { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: var(--background); }
.server-error-card { width: min(480px,100%); padding: 26px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-soft); }
.server-error-card > .icon { color: var(--primary); }
.server-error-card h1 { font-size: 21px; }
.server-error-card p { color: var(--text-secondary); font-size: 12px; }
.server-error-card small { color: var(--text-muted); font-size: 10px; }
.loading-indicator { position: fixed; inset: 0 0 auto var(--sidebar-width); z-index: 60; height: 2px; background: linear-gradient(90deg,var(--primary),var(--info),var(--primary)); background-size: 200% 100%; animation: loading 1.4s linear infinite; }
@keyframes loading { to { background-position: -200% 0; } }

@media (min-width: 1600px) {
  .content { padding-right: 34px; padding-left: 34px; }
  .dashboard-stack, .page-stack { gap: 18px; }
  .kpi-grid { gap: 14px; }
  .kpi-card { min-height: 110px; padding: 16px; }
  .chart-card, .ranking-card { padding: 18px 19px 15px; }
}

@media (max-width: 1439px) {
  .topbar { gap: 12px; padding: 0 22px; }
  .content { padding: 21px 22px 32px; }
  .topbar-context { min-width: 170px; }
  .kpi-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .equipment-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .kpi-card { min-height: 91px; }
  .filter-row-top { grid-template-columns: minmax(255px,1.2fr) minmax(150px,.7fr) minmax(150px,.9fr) minmax(145px,.8fr); }
  .filter-row-top > :last-child { display: none; }
  .filter-row-bottom { grid-template-columns: repeat(5,minmax(100px,1fr)) auto; }
  .dashboard-grid-bottom { grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); }
}

@media (max-width: 1100px) {
  .app-shell { --sidebar-width: 228px; }
  .topbar { padding: 0 16px; }
  .content { padding: 18px 16px 28px; }
  .topbar-context { min-width: 125px; }
  .topbar-title { font-size: 12px; }
  .global-search { width: 250px; }
  .profile-copy { display: none; }
  .profile-button > .icon { display: none; }
  .filter-row-top { grid-template-columns: minmax(240px,1.1fr) minmax(142px,.7fr) minmax(150px,.9fr); }
  .filter-row-top > :nth-child(4), .filter-row-top > :nth-child(5) { display: none; }
  .filter-row-bottom { grid-template-columns: repeat(5,minmax(90px,1fr)); }
  .filter-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .equipment-profile { grid-template-columns: 160px minmax(0,1fr); }
  .equipment-last { grid-column: 1 / -1; grid-template-columns: 35px auto auto 1fr; }
  .equipment-last > span { grid-row: span 2; }
  .equipment-last p { grid-column: 4; grid-row: 1 / 3; margin: auto 0; }
}

@media (max-width: 760px) {
  .app-shell { --sidebar-width: 0px; }
  html, body { min-width: 360px; }
  .sidebar { width: min(280px,84vw); transform: translateX(-104%); transition: transform .2s ease; box-shadow: none; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-pop); }
  .sidebar-collapse-button { display: none; }
  .sidebar-close { display: grid; width: 32px; height: 32px; place-items: center; margin-left: auto; border: 0; border-radius: 7px; color: var(--sidebar-secondary); background: transparent; }
  .sidebar-overlay { position: fixed; inset: 0; z-index: 25; background: rgba(2,12,24,.44); }
  .sidebar.open ~ .sidebar-overlay { display: block; }
  .main-column { margin-left: 0; }
  .topbar { height: 60px; gap: 8px; padding: 0 12px; }
  .mobile-menu { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border: 1px solid var(--border); border-radius: 7px; color: var(--text-secondary); background: var(--surface); }
  .topbar-context { min-width: 0; flex: 1; }
  .topbar-title { font-size: 12px; }
  .global-search { display: none; }
  .topbar-upload { min-height: 36px; height: 36px; padding: 0 10px; }
  .topbar-upload span { display: none; }
  .topbar-divider, .theme-toggle > .icon:first-child, .profile-button { display: none; }
  .theme-toggle { gap: 0; }
  .toggle-track { width: 34px; height: 20px; }
  .toggle-track span { width: 14px; height: 14px; }
  [data-theme='dark'] .toggle-track span { transform: translateX(14px); }
  .content { padding: 17px 12px 26px; }
  .page-heading { align-items: flex-start; margin-bottom: 15px; }
  .page-heading h1 { font-size: 22px; }
  .page-heading p { max-width: 430px; font-size: 11px; }
  .heading-actions { gap: 5px; }
  .heading-actions .button { width: 38px; min-width: 38px; padding: 0; font-size: 0; }
  .heading-actions .button .icon { width: 17px; height: 17px; }
  .filter-panel { padding: 12px; }
  .filter-row-top, .filter-row-bottom { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .filter-row-top > :nth-child(4), .filter-row-top > :last-child { display: flex; }
  .filter-date-group { grid-column: 1 / -1; }
  .filter-granularity { grid-column: 1 / -1; }
  .filter-actions { grid-column: 1 / -1; justify-content: space-between; }
  .analysis-scope, .dashboard-detail-link, .report-ready-card { align-items: flex-start; flex-wrap: wrap; }
  .analysis-scope-copy, .dashboard-detail-link > div, .report-ready-card > div { width: calc(100% - 50px); flex: 1 1 calc(100% - 50px); }
  .analysis-scope-copy > strong { white-space: normal; overflow-wrap: anywhere; }
  .analysis-scope > .button, .dashboard-detail-link > .button, .report-ready-card > .button, .report-placeholder > .button { width: 100%; justify-content: center; }
  .report-placeholder { flex-wrap: wrap; }
  .report-placeholder > div { flex: 1; }
  .multi-options { left: 0; right: auto; }
  .empty-banner { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .empty-banner > .icon { width: 21px; height: 21px; }
  .empty-banner div { min-width: calc(100% - 35px); }
  .empty-banner > .button { width: 100%; }
  .kpi-grid, .kpi-grid-four { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .summary-kpi-grid, .summary-kpi-grid.single { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .summary-kpi-grid .kpi-card { min-height: 78px; padding: 10px; }
  .equipment-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .kpi-card { min-height: 82px; gap: 9px; padding: 10px; }
  .kpi-icon { width: 36px; height: 36px; }
  .kpi-icon .icon { width: 17px; height: 17px; }
  .kpi-content > span { font-size: 9px; }
  .kpi-content > strong { font-size: 16px; }
  .kpi-content > small { font-size: 8px; }
  .dashboard-grid-main, .dashboard-grid-bottom, .equipment-detail-grid, .report-charts { grid-template-columns: minmax(0,1fr); }
  .chart-card, .ranking-card, .table-card { padding: 12px; }
  .bar-chart, .trend-svg { min-height: 175px; }
  .card-heading { gap: 6px; }
  .card-heading select { max-width: 122px; font-size: 9px; }
  .compact-segments { width: 117px; }
  .compact-segments .segment { font-size: 8px; }
  .table-heading { align-items: flex-start; }
  .table-toolbar { align-items: flex-start; flex-direction: column; }
  .table-toolbar-title { width: 100%; }
  .table-toolbar-controls { width: 100%; flex-wrap: wrap; }
  .table-search { width: auto; min-width: 170px; flex: 1; }
  .table-search input { min-width: 0; }
  .summary-table { min-width: 690px; }
  .summary-table th, .summary-table td { padding-right: 8px; padding-left: 8px; }
  .summary-details-content { padding: 10px; }
  .summary-details-heading, .summary-details-pagination { align-items: flex-start; }
  .summary-details-pagination { flex-direction: column; }
  .group-summary { align-items: stretch; flex-direction: column; gap: 8px; }
  .group-summary > label { width: 100%; }
  .group-tags { width: 100%; }
  .pagination { align-items: flex-start; flex-direction: column; }
  .pagination > div { width: 100%; justify-content: space-between; }
  .equipment-profile { grid-template-columns: 1fr; gap: 12px; }
  .equipment-photo { min-height: 105px; }
  .equipment-ident > p { margin-bottom: 12px; }
  .equipment-meta { gap: 12px; }
  .equipment-last { grid-template-columns: 35px 1fr; }
  .equipment-last > span { grid-row: span 3; }
  .equipment-last p { grid-column: 2; grid-row: auto; }
  .preview-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .preview-kpis > div:last-child { grid-column: 1 / -1; }
  .preview-footer { align-items: stretch; flex-direction: column; }
  .preview-footer .button { width: 100%; }
  .duplicate-file-notice { align-items: flex-start; flex-wrap: wrap; }
  .duplicate-file-copy { width: calc(100% - 55px); }
  .duplicate-file-notice > .button { width: 100%; }
  .confirm-dialog { padding: 18px; }
  .confirm-actions { flex-direction: column-reverse; }
  .confirm-actions .button { width: 100%; }
  .issue-row { grid-template-columns: 45px 88px minmax(0,1fr); gap: 5px; font-size: 9px; }
  .issue-row small { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .report-action-row { align-items: stretch; flex-direction: column; }
  .report-action-row .button { width: 100%; }
  .report-mode-panel { gap: 10px; padding: 12px; }
  .report-mode-heading { align-items: flex-start; flex-direction: column; }
  .report-mode-options { grid-template-columns: 1fr; }
  .report-mode-card { padding: 10px; }
  .report-team-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .report-equipment-facts { grid-template-columns: 1fr; }
  .report-equipment-overview { grid-template-columns: 1fr; }
  .report-people-list { grid-template-columns: 1fr; }
  .report-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-form { grid-template-columns: 1fr; }
  .logo-setting, .form-footer { grid-column: auto; }
  .form-footer { align-items: stretch; flex-direction: column; }
  .form-footer .button { width: 100%; }
  .loading-indicator { left: 0; }
  .toast-region { top: 68px; right: 10px; }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 8mm 10mm 9mm;
    @top-left { content: none; }
    @top-center { content: none; }
    @top-right { content: none; }
    @bottom-left { content: none; }
    @bottom-center { content: none; }
    @bottom-right { content: "Página " counter(page); color: #667b91; font: 8pt Inter, sans-serif; }
  }
  :root, :root[data-theme='dark'] { color-scheme: light; --background: #fff; --surface: #fff; --surface-secondary: #f1f4f8; --border: #d5dce5; --text-primary: #102f55; --text-secondary: #52677d; --text-muted: #667b91; }
  html, body { min-width: 0; background: #fff; }
  body { color: #193654; font-size: 10pt; line-height: 1.4; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .sidebar, .sidebar-collapse-button, .topbar, .heading-actions, .filter-panel, .report-mode-panel, .report-action-row, .report-placeholder, .toast-region, .button, .text-button, .content > .page-heading, .analysis-scope, .report-ready-card { display: none !important; }
  .print-report-source { display: block !important; }
  .app-shell, .main-column, .content, .report-page, .print-report-source { width: auto; max-width: none; min-width: 0; margin: 0; padding: 0; overflow: visible; }
  .report-page { display: block; }
  .generated-report { display: block; padding: 0; overflow: visible; border: 0; box-shadow: none; break-inside: auto; }
  .report-summary-sheet { break-before: auto; page-break-before: auto; }
  .report-equipment-sheet { break-before: page; page-break-before: always; padding-top: 0; }
  .generated-report > * + * { margin-top: 6px; }
  .surface { box-shadow: none; }
  .report-heading { align-items: flex-end; gap: 18px; padding: 0 0 6px; border-bottom: 2px solid #0b63f6; break-inside: avoid; }
  .report-heading h2 { font-size: 18pt; line-height: 1.12; letter-spacing: -.02em; text-transform: uppercase; }
  .report-heading p { margin-top: 4px; color: #52677d; font-size: 8.5pt; }
  .report-equipment-heading { align-items: center; }
  .report-equipment-heading h2 { text-transform: none; }
  .report-equipment-badge { border-color: #d9e3ee; color: #52677d; background: #f3f7fb; font-size: 7.5pt; }
  .report-equipment-facts { gap: 6px; margin: 6px 0; break-inside: avoid; }
  .report-equipment-facts > div { gap: 2px; padding: 5px 8px; border-color: #d9e3ee; border-radius: 5px; background: #f6f8fb; }
  .report-equipment-facts span { color: #667b91; font-size: 7pt; }
  .report-equipment-facts strong { color: #193654; font-size: 8pt; }
  .report-mark { display: none; }
  .report-logo { width: 34px; height: 34px; }
  .report-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin: 0; break-inside: avoid; }
  .report-kpis .kpi-card { min-height: 52px; gap: 9px; padding: 6px 9px; border: 1px solid #d9e3ee; border-left: 3px solid #0b63f6; border-radius: 7px; background: #fff; }
  .report-kpis .kpi-icon { width: 30px; height: 30px; }
  .report-kpis .kpi-icon .icon { width: 17px; height: 17px; }
  .report-kpis .kpi-content > span { color: #52677d; font-size: 8pt; }
  .report-kpis .kpi-content > strong { color: #102f55; font-size: 13pt; line-height: 1.2; }
  .report-kpis .kpi-content > small { color: #667b91; font-size: 7.5pt; }
  .report-equipment-kpis { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 5px; margin-top: 6px; }
  .report-equipment-kpis .kpi-card { min-height: 45px; gap: 6px; padding: 5px 7px; }
  .report-equipment-kpis .kpi-icon { width: 25px; height: 25px; }
  .report-equipment-kpis .kpi-icon .icon { width: 14px; height: 14px; }
  .report-equipment-kpis .kpi-content > span { font-size: 7pt; }
  .report-equipment-kpis .kpi-content > strong { font-size: 10pt; }
  .report-equipment-kpis .kpi-content > small { font-size: 6.5pt; }
  .report-meta { margin: 0; padding: 8px 10px; border-left: 3px solid #0b63f6; border-radius: 3px; color: #40566d; background: #f3f7fb; font-size: 8.5pt; line-height: 1.35; overflow-wrap: anywhere; break-inside: avoid; }
  .report-charts { display: block; margin: 0; break-inside: auto; }
  .report-charts article { min-width: 0; padding: 7px 9px; border: 1px solid #d9e3ee; border-radius: 8px; break-inside: avoid; }
  .report-equipment-card { margin-bottom: 8px; }
  .report-charts .card-heading { min-height: 26px; margin-bottom: 3px; }
  .report-charts .card-heading h2 { color: #102f55; font-size: 10pt; }
  .report-charts .card-heading p { margin-top: 1px; color: #667b91; font-size: 7pt; }
  .report-charts .bar-chart, .report-charts .trend-svg { display: block; width: 100%; height: auto; overflow: visible; }
  .report-equipment-card .bar-chart-wide { width: 100%; height: 200px; }
  .report-charts .axis-label { fill: #52677d; font-size: 13px; }
  .report-charts .bar-value { fill: #102f55; font-size: 12px; }
  .report-charts .chart-legend-note { margin-top: 3px; color: #667b91; font-size: 7.5pt; }
  .report-resource-track { display: block; height: 5px; overflow: hidden; border-radius: 999px; background: #e8edf3; }
  .report-resource-track > span { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: #0b63f6; }
  .report-secondary-charts { display: grid; grid-template-columns: minmax(0,1.12fr) minmax(0,.88fr); align-items: stretch; gap: 7px; break-inside: auto; }
  .report-secondary-charts > article { min-width: 0; break-inside: avoid; }
  .report-resource-list { display: flex; flex-direction: column; gap: 1px; margin-top: 2px; }
  .report-resource-item { display: grid; min-width: 0; grid-template-columns: 18px minmax(90px,1fr) minmax(55px,.65fr) auto; align-items: center; gap: 6px; min-height: 14px; }
  .report-resource-rank { color: #667b91; font-size: 6.8pt; }
  .report-resource-name { overflow: hidden; color: #193654; font-size: 7pt; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
  .report-resource-value { color: #102f55; font-size: 6.8pt; white-space: nowrap; }
  .report-trend-card .trend-svg { max-height: 145px; }
  .report-trend-card .trend-value-label { stroke-width: 2px; }
  .report-trend-card .chart-legend-note { margin-top: 2px; }
  .report-charts .chart-empty { min-height: 60px; }
  .report-equipment-overview { grid-template-columns: minmax(0,1.45fr) minmax(260px,.8fr); gap: 7px; margin: 7px 0; break-inside: avoid; }
  .report-equipment-overview > article, .report-equipment-resource-card { padding: 7px 8px; border-color: #d9e3ee; border-radius: 7px; break-inside: avoid; }
  .report-equipment-overview .card-heading, .report-equipment-resource-card .card-heading { min-height: 23px; margin-bottom: 2px; }
  .report-equipment-overview .card-heading h2, .report-equipment-resource-card .card-heading h2 { font-size: 9pt; }
  .report-equipment-overview .card-heading p, .report-equipment-resource-card .card-heading p { font-size: 6.5pt; }
  .report-equipment-trend .trend-svg { max-height: 165px; }
  .report-equipment-trend .axis-label { fill: #52677d; font-size: 12px; }
  .report-equipment-trend .trend-value-label { fill: #102f55; font-size: 12px !important; stroke: #fff; stroke-width: 3px; paint-order: stroke; }
  .report-people-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px 8px; margin-top: 3px; }
  .report-people-list li { gap: 2px 5px; padding: 3px 0; border-color: #e4eaf1; break-inside: avoid; }
  .report-person-rank, .report-people-list li > strong { font-size: 6.8pt; }
  .report-people-list li > span:nth-of-type(2) { font-size: 6pt; }
  .report-people-list li > b { font-size: 6.5pt; }
  .report-equipment-resource-card { margin-top: 6px; }
  .report-equipment-resource-wrap { overflow: visible; }
  .report-equipment-resource-table { display: table; width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; }
  .report-equipment-resource-table thead { display: table-header-group; }
  .report-equipment-resource-table tr { break-inside: avoid; page-break-inside: avoid; }
  .report-equipment-resource-table th, .report-equipment-resource-table td { padding: 3px 5px; border-bottom: 1px solid #e2e8f0; font-size: 7pt; }
  .report-equipment-resource-table th { color: #52677d; background: #f1f4f8; font-size: 6.5pt; }
  .report-equipment-resource-table td { color: #40566d; }
  .report-equipment-resource-table .report-equipment-resource-name, .report-equipment-resource-table .strong-cell { color: #193654; }
  .report-empty-note { margin-top: 4px; font-size: 7pt; }
  .wide-table { min-width: 0; }
}
