  :root {
    --blue: #2563eb; --blue-soft: #dbeafe;
    --amber: #d97706; --amber-soft: #fef3c7;
    --purple: #7c3aed; --purple-soft: #ede9fe;
    --red: #dc2626; --red-soft: #fee2e2;
    --green: #16a34a; --green-soft: #dcfce7;
    --bg: #f4f7fb; --card-bg: #ffffff; --border: #e2e8f0;
    --text-main: #0f172a; --text-sub: #64748b;
    --sidebar-bg: #0b1739; --sidebar-text: #b8c4dc; --sidebar-active-bg: rgba(59,130,246,.16);
    --navy: #0b1739; --cyan: #0891b2; --shadow: 0 8px 26px rgba(15,23,42,.07);
  }
  * { box-sizing: border-box; }
  body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg); margin: 0; padding: 0; color: var(--text-main);
  }
  h1, h2, h3 { margin-top: 0; }
  label { display: block; font-size: 12px; margin-bottom: 4px; color: #374151; }
  input, select, textarea {
    padding: 8px 10px; font-size: 14px; border-radius: 8px;
    border: 1px solid #d1d5db; box-sizing: border-box; font-family: inherit;
  }
  button { border: none; border-radius: 999px; padding: 8px 16px; cursor: pointer; font-size: 13px; font-weight: 600; }
  button:disabled { opacity: 0.55; cursor: default; }
  .btn-primary { background: var(--blue); color: #fff; }
  .btn-secondary { background: #e5e7eb; color: #111827; }
  .btn-small { padding: 5px 12px; font-size: 12px; }
  .error { color: var(--red); font-size: 13px; margin-top: 8px; }
  .status { font-size: 13px; color: var(--text-sub); }

  #login-view {
    max-width: 420px; margin: 60px auto; padding: 28px; background: var(--card-bg);
    border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.06); display: none;
  }
  #app-view { display: none; }
  .app-shell { display: flex; min-height: 100vh; }
  .sidebar {
    width: 220px; flex-shrink: 0; background: var(--sidebar-bg); color: var(--sidebar-text);
    padding: 18px 0; position: sticky; top: 0; height: 100vh;
  }
  .sidebar .brand {
    font-weight: 700; color: #fff; font-size: 15px; padding: 0 20px 18px;
    border-bottom: 1px solid #1f2937; margin-bottom: 12px;
  }
  .sidebar a { display: block; padding: 10px 20px; color: var(--sidebar-text); text-decoration: none; font-size: 14px; border-left: 3px solid transparent; }
  .sidebar a:hover { background: var(--sidebar-active-bg); color: #fff; }
  .sidebar a.active { background: var(--sidebar-active-bg); color: #fff; border-left-color: var(--blue); font-weight: 600; }
  .sidebar a[data-hr-approval-link][hidden] { display: none !important; }
  .main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 14px 28px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px);
  }
  .topbar .product-name { font-weight: 700; font-size: 16px; }
  .topbar-right { display: flex; align-items: center; gap: 16px; }
  .avatar {
    width: 32px; height: 32px; border-radius: 999px; background: var(--blue-soft); color: var(--blue);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
  }
  .content { padding: 22px 28px 60px; max-width: 1800px; width: 100%; margin: 0 auto; }

  .filters-card {
    background: rgba(255,255,255,.96); border: 1px solid var(--border); border-radius: 16px;
    padding: 14px 16px; margin-bottom: 18px; display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap;
    box-shadow: 0 4px 18px rgba(15,23,42,.05); position: sticky; top: 61px; z-index: 15;
  }
  .filters-card .field { min-width: 200px; }

  .kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
  .card { border-radius: 16px; border: 1px solid var(--border); padding: 16px 18px; background: var(--card-bg); box-shadow: 0 4px 16px rgba(15,23,42,.045); }
  .card-title { font-size: 13px; font-weight: 600; color: #4b5563; margin-bottom: 6px; }
  .card-value { font-size: 24px; font-weight: 800; }
  .card-meta { margin-top: 7px; font-size: 12px; color: var(--text-sub); line-height: 1.4; }
  .kpi-blue .card-value { color: var(--blue); }
  .kpi-amber .card-value { color: var(--amber); }
  .kpi-green .card-value { color: var(--green); }
  .kpi-red .card-value { color: var(--red); }

  .dashboard-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin: 6px 0 16px; }
  .dashboard-hero h1 { font-size: 25px; margin:0 0 5px; letter-spacing:-.025em; }
  .dashboard-hero p { margin:0; color:var(--text-sub); font-size:13px; }
  .freshness { display:flex; align-items:center; gap:7px; color:var(--text-sub); font-size:12px; white-space:nowrap; }
  .freshness-dot { width:8px; height:8px; border-radius:50%; background:var(--green); box-shadow:0 0 0 4px var(--green-soft); }
  .executive-kpis { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:14px; margin-bottom:18px; }
  .executive-kpi { position:relative; overflow:hidden; min-height:142px; padding:18px 18px 18px 16px; border-left:4px solid var(--tone, var(--blue)); }
  .executive-kpi::after { content:""; position:absolute; inset:auto -25px -35px auto; width:100px; height:100px; border-radius:50%; background:var(--tone-soft); opacity:.65; }
  .kpi-top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
  .kpi-icon { width:34px; height:34px; border-radius:10px; display:grid; place-items:center; font-size:17px; font-weight:800; background:var(--tone-soft); color:var(--tone); }
  .executive-kpi .card-value { color:var(--tone); font-size:29px; margin-top:12px; position:relative; z-index:1; }
  .executive-kpi .card-meta { position:relative; z-index:1; }
  .executive-kpi-action { width:100%; border-radius:16px; text-align:left; color:inherit; font:inherit; cursor:pointer; transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
  .executive-kpi-action:hover { transform:translateY(-2px); border-color:var(--tone); box-shadow:0 10px 24px rgba(15,23,42,.10); }
  .executive-kpi-action:focus-visible { outline:3px solid color-mix(in srgb, var(--tone) 28%, transparent); outline-offset:2px; }
  .executive-kpi-action[aria-expanded="true"] { border-color:var(--tone); box-shadow:0 0 0 3px color-mix(in srgb, var(--tone) 12%, transparent); }
  .kpi-action-hint { display:block; margin-top:4px; color:var(--tone); font-weight:750; }
  .report-drilldown { margin:-4px 0 18px; padding:18px; border:1px solid #cfe0ff; border-radius:16px; background:linear-gradient(145deg,#fff,#f7faff); box-shadow:0 8px 24px rgba(37,99,235,.07); }
  .report-drilldown[hidden] { display:none; }
  .report-drilldown-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:14px; }
  .report-drilldown-title { margin:0 0 4px; font-size:16px; }
  .report-drilldown-subtitle { margin:0; color:var(--text-sub); font-size:12px; }
  .report-drilldown-close { flex:none; padding:6px 11px; background:#e8eef8; color:#475569; }
  .report-building-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:10px; }
  .report-building-item { display:flex; align-items:center; justify-content:space-between; gap:12px; min-width:0; padding:12px 13px; border:1px solid var(--border); border-radius:13px; background:#fff; }
  .report-building-main { min-width:0; }
  .report-building-link { display:block; max-width:100%; padding:0; border-radius:4px; background:transparent; color:var(--navy); font-size:13px; font-weight:800; text-align:left; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .report-building-link:hover { color:var(--blue); text-decoration:underline; }
  .report-building-time { margin-top:4px; color:var(--text-sub); font-size:11px; }
  .report-building-action { flex:none; display:grid; justify-items:end; gap:6px; }
  .report-open-label { color:var(--blue); font-size:11px; font-weight:750; }
  .company-kpi-value { font-size:14px; font-weight:850; color:var(--metric-color,var(--blue)); white-space:nowrap; }
  .company-kpi-detail { margin-top:4px; color:var(--text-sub); font-size:11px; line-height:1.45; }
  .tone-blue { --tone:var(--blue); --tone-soft:var(--blue-soft); }
  .tone-green { --tone:var(--green); --tone-soft:var(--green-soft); }
  .tone-amber { --tone:var(--amber); --tone-soft:var(--amber-soft); }
  .tone-red { --tone:var(--red); --tone-soft:var(--red-soft); }
  .tone-purple { --tone:var(--purple); --tone-soft:var(--purple-soft); }
  .dashboard-tabs { display:flex; gap:6px; margin:0 0 18px; padding:5px; background:#e9eef6; border-radius:13px; overflow-x:auto; }
  .dashboard-tab { border-radius:9px; padding:9px 15px; background:transparent; color:#475569; white-space:nowrap; }
  .dashboard-tab.active { background:#fff; color:var(--navy); box-shadow:0 3px 10px rgba(15,23,42,.08); }
  .dashboard-tab-panel { display:none; }
  .dashboard-tab-panel.active { display:block; animation:tabIn .18s ease-out; }
  @keyframes tabIn { from { opacity:.45; transform:translateY(3px); } to { opacity:1; transform:none; } }
  .overview-grid { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(330px,.75fr); gap:16px; margin-bottom:18px; }
  .visual-card { background:#fff; border:1px solid var(--border); border-radius:16px; padding:18px; box-shadow:var(--shadow); min-width:0; }
  .visual-card-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:16px; }
  .visual-card-title { font-weight:750; font-size:15px; }
  .visual-card-subtitle { color:var(--text-sub); font-size:12px; margin-top:3px; }
  .comparison-chart { display:grid; gap:18px; }
  .chart-legend { display:flex; align-items:center; gap:18px; flex-wrap:wrap; margin:-5px 0 2px; font-size:11.5px; color:var(--text-sub); }
  .chart-legend span { display:flex; align-items:center; gap:6px; }
  .chart-legend i { display:inline-block; width:18px; height:7px; border-radius:99px; }
  .compare-block { padding:12px 13px; border:1px solid #e8edf5; border-radius:13px; background:linear-gradient(135deg,#fff,#fbfdff); }
  .compare-block[data-dashboard-detail], .summary-action { cursor:pointer; transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
  .compare-block[data-dashboard-detail]:hover, .summary-action:hover { border-color:#93b4f5; box-shadow:0 8px 20px rgba(37,99,235,.09); transform:translateY(-1px); }
  .compare-block[data-dashboard-detail]:focus-visible, .summary-action:focus-visible { outline:3px solid rgba(37,99,235,.18); outline-offset:2px; }
  .summary-action { width:100%; border-radius:16px; text-align:left; color:inherit; font:inherit; }
  .detail-affordance { display:block; margin-top:5px; color:var(--blue); font-size:10.5px; font-weight:750; }
  .dashboard-detail-overlay { position:fixed; inset:0; z-index:100; display:grid; justify-items:end; background:rgba(15,23,42,.32); backdrop-filter:blur(2px); }
  .dashboard-detail-overlay[hidden] { display:none; }
  .dashboard-detail-drawer { width:min(560px,100%); height:100%; overflow:auto; background:#f8fafc; box-shadow:-16px 0 44px rgba(15,23,42,.20); animation:drawerIn .2s ease-out; }
  @keyframes drawerIn { from { transform:translateX(28px); opacity:.6; } to { transform:none; opacity:1; } }
  .dashboard-detail-head { position:sticky; top:0; z-index:2; display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:20px; background:rgba(255,255,255,.96); border-bottom:1px solid var(--border); backdrop-filter:blur(10px); }
  .dashboard-detail-head h2 { margin:0 0 5px; font-size:19px; }
  .dashboard-detail-head p { margin:0; color:var(--text-sub); font-size:12px; }
  .dashboard-detail-close { flex:none; padding:7px 12px; background:#e8eef8; color:#334155; }
  .dashboard-detail-body { display:grid; gap:12px; padding:18px 20px 28px; }
  .detail-metric-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .detail-metric { padding:12px; border:1px solid var(--border); border-radius:12px; background:#fff; }
  .detail-metric span { display:block; color:var(--text-sub); font-size:11px; }
  .detail-metric strong { display:block; margin-top:4px; font-size:17px; }
  .incident-detail { padding:13px; border:1px solid var(--border); border-radius:12px; background:#fff; }
  .incident-detail-head { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; margin-bottom:7px; }
  .incident-detail-title { font-weight:800; font-size:13px; }
  .incident-detail p { margin:5px 0 0; color:#475569; font-size:12px; line-height:1.5; }
  .comparison-item-head { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:12.5px; margin-bottom:10px; }
  .delta-pill { padding:3px 8px; border-radius:999px; font-size:11px; font-weight:800; background:var(--delta-soft); color:var(--delta); white-space:nowrap; }
  .paired-bars { display:grid; gap:7px; }
  .paired-row { display:grid; grid-template-columns:74px minmax(0,1fr) 76px; gap:8px; align-items:center; font-size:11px; }
  .paired-label { color:var(--text-sub); }
  .paired-value { text-align:right; font-weight:750; color:#334155; }
  .comparison-track { height:11px; border-radius:999px; background:#eef2f7; overflow:hidden; position:relative; }
  .comparison-current { height:100%; min-width:3px; border-radius:999px; background:linear-gradient(90deg,#2563eb,#06b6d4); box-shadow:0 2px 8px rgba(37,99,235,.22); }
  .comparison-previous { height:100%; min-width:3px; border-radius:999px; background:#94a3b8; }
  .energy-chart-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-bottom:18px; }
  .metric-chart { display:grid; gap:13px; }
  .metric-row { display:grid; grid-template-columns:minmax(80px,125px) minmax(0,1fr); gap:12px; align-items:center; }
  .metric-name { font-size:11.5px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .metric-bars { display:grid; gap:5px; }
  .metric-line { display:grid; grid-template-columns:minmax(0,1fr) 92px; gap:8px; align-items:center; }
  .metric-track { height:10px; border-radius:999px; background:#eef2f7; overflow:hidden; }
  .metric-fill { height:100%; min-width:3px; border-radius:999px; background:var(--metric-color); }
  .metric-fill.previous { background:#cbd5e1; }
  .metric-value { font-size:10.5px; text-align:right; color:#475569; white-space:nowrap; }
  .energy-insight { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:15px; padding:11px 12px; background:var(--insight-bg); border-radius:11px; color:var(--insight-color); font-size:12px; }
  .energy-insight strong { font-size:14px; }
  .trend-chart-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-bottom:18px; }
  .trend-chart-grid .visual-card:first-child { grid-column:1/-1; }
  .trend-svg { width:100%; height:auto; display:block; overflow:visible; }
  .trend-grid-line { stroke:#e8eef6; stroke-width:1; }
  .trend-axis-label { fill:#64748b; font-size:10px; }
  .trend-current-line { fill:none; stroke:var(--chart-color); stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
  .trend-previous-line { fill:none; stroke:#94a3b8; stroke-width:2; stroke-dasharray:6 5; stroke-linecap:round; stroke-linejoin:round; }
  .trend-current-area { fill:var(--chart-soft); opacity:.72; }
  .trend-dot { fill:#fff; stroke:var(--chart-color); stroke-width:2; }
  .trend-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:12px; }
  .trend-stat { padding:9px 10px; border-radius:10px; background:#f8fafc; }
  .trend-stat span { display:block; color:var(--text-sub); font-size:10px; }
  .trend-stat strong { display:block; margin-top:3px; font-size:12px; }
  .operations-visual-grid { display:grid; grid-template-columns:minmax(310px,.75fr) minmax(0,1.25fr); gap:16px; margin-bottom:18px; }
  .operations-donut-wrap { display:grid; grid-template-columns:135px minmax(0,1fr); gap:18px; align-items:center; }
  .operations-donut { width:130px; height:130px; border-radius:50%; display:grid; place-items:center; position:relative; }
  .operations-donut::after { content:""; width:78px; height:78px; background:#fff; border-radius:50%; position:absolute; }
  .operations-donut-center { position:relative; z-index:1; text-align:center; font-size:25px; font-weight:850; }
  .operations-donut-center small { display:block; font-size:9px; color:var(--text-sub); }
  .task-progress-list { display:grid; gap:12px; }
  .task-progress-head { display:flex; justify-content:space-between; align-items:center; gap:10px; font-size:11.5px; }
  .task-progress-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:700; }
  .task-progress-track { display:flex; height:11px; border-radius:99px; background:#e8edf4; overflow:hidden; margin-top:5px; }
  .task-progress-track span { min-width:0; }
  .error-ranking { display:grid; gap:11px; }
  .error-rank-row { display:grid; grid-template-columns:minmax(100px,145px) minmax(0,1fr) 26px; gap:9px; align-items:center; font-size:11.5px; }
  .error-rank-label { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .error-rank-track { height:9px; background:#fee2e2; border-radius:99px; overflow:hidden; }
  .error-rank-fill { height:100%; background:linear-gradient(90deg,#f97316,#ef4444); border-radius:99px; }
  .detail-disclosure { margin:14px 0 20px; border:1px solid var(--border); border-radius:13px; background:#fff; overflow:hidden; }
  .detail-disclosure > summary { cursor:pointer; padding:12px 14px; font-size:12.5px; font-weight:750; color:#334155; background:#f8fafc; }
  .detail-disclosure .table-card { border:0; border-radius:0; margin:0; }
  .risk-chart-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-bottom:18px; }
  .asset-health-layout { display:grid; grid-template-columns:150px minmax(0,1fr); gap:20px; align-items:center; margin-bottom:15px; }
  .asset-donut { width:144px; height:144px; border-radius:50%; display:grid; place-items:center; position:relative; }
  .asset-donut::after { content:""; width:88px; height:88px; background:#fff; border-radius:50%; position:absolute; }
  .asset-donut-value { position:relative; z-index:1; text-align:center; font-size:25px; font-weight:850; }
  .asset-donut-value small { display:block; font-size:9.5px; color:var(--text-sub); font-weight:700; }
  .alert-list { display:grid; gap:9px; }
  .alert-item { display:grid; grid-template-columns:34px minmax(0,1fr) auto; gap:10px; align-items:center; padding:10px 11px; border:1px solid var(--border); border-radius:11px; background:#fbfdff; }
  .alert-item.clickable { cursor:pointer; }
  .alert-item.clickable:hover { border-color:#bfdbfe; background:#eff6ff; }
  .alert-avatar { width:34px; height:34px; border-radius:50%; display:grid; place-items:center; flex:none; font-size:12px; font-weight:800; color:#fff; background:var(--alert-color); }
  .alert-title { font-size:12.5px; font-weight:700; }
  .alert-detail { font-size:11.5px; color:var(--text-sub); margin-top:2px; }
  .alert-level { font-size:10px; font-weight:800; text-transform:uppercase; color:var(--alert-color); }
  .alert-source { display:inline-flex; margin-top:5px; padding:2px 6px; border-radius:6px; background:#f1f5f9; color:#64748b; font-size:10px; font-weight:700; }
  .distribution-wrap { display:grid; grid-template-columns:150px minmax(0,1fr); align-items:center; gap:22px; }
  .donut { width:138px; height:138px; border-radius:50%; display:grid; place-items:center; position:relative; }
  .donut::after { content:""; width:88px; height:88px; border-radius:50%; background:#fff; position:absolute; }
  .donut-center { position:relative; z-index:1; text-align:center; font-weight:800; font-size:24px; }
  .donut-center small { display:block; color:var(--text-sub); font-size:10px; font-weight:600; }
  .donut-multi { position:relative; width:150px; height:150px; flex:none; }
  .donut-ring { position:absolute; border-radius:50%; }
  .donut-ring-outer { inset:0; }
  .donut-ring-inner { inset:20px; }
  .donut-multi-center { position:absolute; inset:40px; border-radius:50%; background:#fff; display:grid; place-items:center; text-align:center; box-shadow:inset 0 0 0 1px var(--border); }
  .donut-multi-center strong { font-size:22px; font-weight:800; line-height:1.1; }
  .donut-multi-center small { display:block; margin-top:2px; color:var(--text-sub); font-size:9px; font-weight:700; }
  .legend { display:grid; gap:10px; }
  .legend-row { display:flex; justify-content:space-between; align-items:center; gap:12px; font-size:12px; }
  .legend-label { display:flex; align-items:center; gap:8px; }
  .legend-swatch { width:9px; height:9px; border-radius:3px; }
  .stacked-bar { height:16px; border-radius:999px; overflow:hidden; display:flex; background:#e5e7eb; margin:12px 0 14px; }
  .stacked-bar span { min-width:0; }
  .section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin:2px 0 11px; }
  .section-heading h2 { font-size:17px; margin:0; }
  .section-heading p { font-size:12px; color:var(--text-sub); margin:3px 0 0; }
  .health-cell { display:flex; align-items:center; gap:8px; }
  .health-rail { width:4px; height:29px; border-radius:4px; background:var(--health-color); }
  .health-score { font-weight:800; color:var(--health-color); }
  .row-link { cursor:pointer; }
  .row-link:hover td { background:#eff6ff !important; }

  .table-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; overflow-x: auto; margin-bottom: 20px; }
  table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  th, td { padding: 7px 10px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--border); }
  th { background: #f9fafb; font-weight: 600; color: #4b5563; position: sticky; top: 0; }
  tbody tr:hover td { background: #f9fafb; }
  tfoot td { font-weight: 700; background: #f9fafb; }

  .badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
  .badge-ok { background: var(--green-soft); color: var(--green); }
  .badge-warn { background: var(--red-soft); color: var(--red); }
  .badge-neutral { background: #f3f4f6; color: #6b7280; }
  .badge-incident { background: var(--red-soft); color: var(--red); }
  .badge-checklist { background: var(--amber-soft); color: var(--amber); }
  .badge-task { background: var(--blue-soft); color: var(--blue); }
  .badge-planned_task { background: var(--purple-soft); color: var(--purple); }

  .timeline { list-style: none; margin: 0; padding: 0; }
  .timeline li { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
  .timeline li:last-child { border-bottom: none; }
  .timeline .t-time { color: var(--text-sub); font-size: 11.5px; margin-left: 8px; }
  .timeline .t-title { font-weight: 600; margin-top: 3px; }
  .timeline .t-desc { color: #4b5563; margin-top: 2px; }
  .timeline .t-meta { color: var(--text-sub); font-size: 11.5px; margin-top: 2px; }
  .clickable-row { cursor: pointer; }
  .clickable-row:hover td { background: var(--blue-soft) !important; }
  .filter-chip {
    display: inline-flex; align-items: center; gap: 6px; background: var(--blue-soft); color: var(--blue);
    font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
  }
  .filter-chip button { background: none; padding: 0; margin: 0; color: var(--blue); font-size: 14px; line-height: 1; }

  .empty-state { color: var(--text-sub); font-size: 13px; padding: 30px 10px; text-align: center; }
  .section-title { font-size: 15px; font-weight: 700; margin: 22px 0 10px; }
  .period-context { margin: -4px 0 10px; font-size: 12px; color: var(--text-sub); }
  .period-context span { margin: 0 6px; color: #9ca3af; }
  .footer-note { margin-top: 18px; font-size: 12px; color: var(--text-sub); font-style: italic; }
  .trend-up { color: var(--green); font-weight: 700; }
  .trend-down { color: var(--red); font-weight: 700; }
  .trend-flat { color: var(--text-sub); font-weight: 700; }
  .status-missing { background: #f3f4f6; color: #6b7280; }
  .status-draft { background: var(--amber-soft); color: var(--amber); }
  .status-submitted { background: var(--blue-soft); color: var(--blue); }
  .status-approved { background: var(--green-soft); color: var(--green); }
  .status-locked { background: #dcfce7; color: #166534; }
  .report-form { padding: 16px; }
  .report-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .report-form .field { min-width: 0; }
  .report-form .field.full { grid-column: 1 / -1; }
  .report-form input, .report-form textarea, .report-form select { width: 100%; }
  .report-form textarea { min-height: 92px; resize: vertical; }
  .report-summary { min-height: 76px !important; }
  .report-section { grid-column: 1 / -1; border: 1px solid var(--border); border-radius: 14px; background: #f8fafc; padding: 14px; }
  .report-section-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
  .report-section-title { font-size: 14px; font-weight: 800; color: var(--text-main); }
  .report-section-note { margin-top: 3px; color: var(--text-sub); font-size: 12px; line-height: 1.45; }
  .report-section-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
  .report-section-stats { padding: 5px 9px; border-radius: 999px; background: #e8eef7; color: #475569; font-size: 11px; font-weight: 750; white-space: nowrap; }
  .structured-list { display: grid; gap: 10px; }
  .structured-row { position: relative; display: grid; grid-template-columns: repeat(var(--report-cols, 4), minmax(128px, 1fr)); align-items: end; gap: 9px; padding: 11px 54px 11px 11px; border: 1px solid #dbe4ef; border-radius: 12px; background: #fff; }
  .structured-cell { min-width: 0; }
  .structured-cell label { display: block; margin-bottom: 5px; color: #64748b; font-size: 10.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .025em; }
  .structured-cell input, .structured-cell select, .structured-cell textarea { min-width: 0; padding: 8px 9px; font-size: 12px; background: #fff; }
  .structured-cell textarea { min-height: 56px; }
  .structured-row-number { grid-column: 1 / -1; color: var(--blue); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .035em; }
  .structured-output { min-height: 34px; display: flex; align-items: center; padding: 8px 9px; border: 1px solid #dbe4ef; border-radius: 8px; background: #f1f5f9; color: #0f172a; font-size: 12px; font-weight: 800; }
  .structured-output.positive { color: var(--red); background: #fff1f2; border-color: #fecaca; }
  .structured-output.negative { color: var(--green); background: #f0fdf4; border-color: #bbf7d0; }
  .structured-remove { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; padding: 0; border-radius: 9px; border: 1px solid #fecaca; background: #fff1f2; color: #dc2626; font-size: 18px; cursor: pointer; }
  .structured-cell.wide { grid-column: span 2; }
  .structured-empty { padding: 13px; border: 1px dashed #cbd5e1; border-radius: 10px; color: var(--text-sub); font-size: 12px; text-align: center; }
  .system-health-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
  .system-health-chip { padding: 10px; border: 1px solid #dbe4ef; border-radius: 11px; background: #fff; }
  .system-health-chip strong { display: block; font-size: 12px; margin-bottom: 4px; }
  .system-health-chip span { color: var(--text-sub); font-size: 11px; line-height: 1.35; }
  .system-health-chip.good { border-color: #bbf7d0; background: #f0fdf4; }
  .system-health-chip.warning { border-color: #fde68a; background: #fffbeb; }
  .system-health-chip.danger { border-color: #fecaca; background: #fff1f2; }
  .report-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
  .score { font-weight: 800; }
  .score-a { color: var(--green); }
  .score-b { color: var(--amber); }
  .score-c { color: var(--red); }
  @media (max-width: 760px) {
    .app-shell { display: block; }
    .sidebar { width: 100%; height: auto; position: static; display: flex; overflow-x: auto; padding: 8px 0; }
    .sidebar .brand { display: none; }
    .sidebar a { flex: 0 0 auto; border-left: 0; border-bottom: 3px solid transparent; padding: 9px 12px; }
    .sidebar a.active { border-left-color: transparent; border-bottom-color: var(--blue); }
    .content { padding: 14px 12px 40px; }
    .topbar { padding: 10px 12px; }
    .filters-card .field, .filters-card select, .filters-card input { min-width: 100% !important; width: 100%; }
    .filters-card .field[style] { margin-left: 0 !important; }
    .report-form-grid { grid-template-columns: 1fr; }
    .report-form .field.full { grid-column: auto; }
    .report-section { grid-column: auto; }
    .structured-row { grid-template-columns: 1fr 1fr; padding-right: 11px; }
    .structured-remove { position: static; width: 100%; grid-column: 1 / -1; }
    .report-section-header { align-items: stretch; flex-direction: column; }
    .report-section-tools { justify-content: space-between; }
    .system-health-summary { grid-template-columns: 1fr 1fr; }
    .executive-kpis { grid-template-columns:1fr 1fr; }
    .executive-kpi:first-child { grid-column:1/-1; }
    .overview-grid { grid-template-columns:1fr; }
    .energy-chart-grid { grid-template-columns:1fr; }
    .trend-chart-grid, .operations-visual-grid { grid-template-columns:1fr; }
    .trend-chart-grid .visual-card:first-child { grid-column:auto; }
    .trend-stats { grid-template-columns:1fr 1fr; }
    .risk-chart-grid { grid-template-columns:1fr; }
    .dashboard-hero { align-items:flex-start; flex-direction:column; }
    .distribution-wrap { grid-template-columns:120px minmax(0,1fr); }
    .donut { width:116px; height:116px; }
    .donut::after { width:74px; height:74px; }
    .paired-row { grid-template-columns:66px minmax(0,1fr) 68px; }
    .metric-row { grid-template-columns:85px minmax(0,1fr); }
    .asset-health-layout { grid-template-columns:120px minmax(0,1fr); }
    .asset-donut { width:116px; height:116px; }
    .asset-donut::after { width:72px; height:72px; }
  }
  @media (max-width: 430px) { .executive-kpis { grid-template-columns:1fr; } .executive-kpi:first-child { grid-column:auto; } }
