
    :root {
      --bg: #f3f6fb;
      --panel: #ffffff;
      --panel-soft: #f8fafc;
      --text: #172033;
      --muted: #667085;
      --line: #dce3ee;
      --primary: #3157d5;
      --primary-strong: #2445b8;
      --success: #168354;
      --success-bg: #e9f8f1;
      --danger: #c43d4b;
      --danger-bg: #fff0f1;
      --warning: #a96900;
      --warning-bg: #fff7df;
      --shadow: 0 16px 45px rgba(31, 50, 95, 0.10);
      --radius: 18px;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      min-height: 100vh;
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      color: var(--text);
      background:
        radial-gradient(circle at 8% 8%, rgba(49, 87, 213, .13), transparent 31%),
        radial-gradient(circle at 93% 12%, rgba(22, 131, 84, .09), transparent 27%),
        var(--bg);
      overflow-x: hidden;
    }

    button, input, textarea, select { font: inherit; }

    .app {
      width: 100%;
      max-width: none;
      margin: 0 auto;
      padding: 12px;
    }

    .hero {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 24px;
      margin-bottom: 22px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .logo {
      width: 54px;
      height: 54px;
      border-radius: 16px;
      display: grid;
      place-items: center;
      color: #fff;
      background: linear-gradient(145deg, var(--primary), #6c84e7);
      box-shadow: 0 12px 26px rgba(49, 87, 213, .28);
    }

    .logo svg { width: 29px; height: 29px; }

    h1 {
      margin: 0 0 5px;
      font-size: clamp(1.55rem, 3vw, 2.25rem);
      letter-spacing: -0.035em;
    }

    .subtitle {
      margin: 0;
      color: var(--muted);
      line-height: 1.5;
    }

    .offline-badge {
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 9px 12px;
      border-radius: 999px;
      background: var(--success-bg);
      color: var(--success);
      font-size: .84rem;
      font-weight: 750;
      border: 1px solid #c7ebdb;
    }

    .offline-badge::before {
      content: "";
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--success);
      box-shadow: 0 0 0 4px rgba(22, 131, 84, .12);
    }

    .layout {
      display: grid;
      grid-template-columns: clamp(300px, 24vw, 380px) minmax(0, 1fr);
      gap: 10px;
      align-items: start;
    }

    .panel {
      background: rgba(255, 255, 255, .96);
      border: 1px solid rgba(220, 227, 238, .95);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
    }

    .sidebar {
      padding: 16px;
      position: sticky;
      top: 10px;
      max-height: calc(100vh - 20px);
      overflow: auto;
      scrollbar-gutter: stable;
    }

    .section-title {
      display: flex;
      align-items: center;
      gap: 9px;
      margin: 0 0 12px;
      font-size: 1rem;
    }

    .step {
      width: 25px;
      height: 25px;
      border-radius: 8px;
      display: grid;
      place-items: center;
      background: #edf1ff;
      color: var(--primary);
      font-size: .78rem;
      font-weight: 850;
    }

    .dropzone {
      border: 2px dashed #b8c4e2;
      border-radius: 15px;
      padding: 23px 16px;
      text-align: center;
      background: #f8faff;
      cursor: pointer;
      transition: .2s ease;
      outline: none;
    }

    .dropzone:hover,
    .dropzone.dragover,
    .dropzone:focus-visible {
      border-color: var(--primary);
      background: #f1f4ff;
      transform: translateY(-1px);
    }

    .drop-icon {
      width: 45px;
      height: 45px;
      margin: 0 auto 10px;
      border-radius: 13px;
      display: grid;
      place-items: center;
      background: #e8edff;
      color: var(--primary);
    }

    .dropzone strong { display: block; margin-bottom: 4px; }
    .dropzone small { color: var(--muted); line-height: 1.4; }
    #fileInput { display: none; }

    .file-card {
      display: none;
      margin-top: 12px;
      padding: 12px;
      border-radius: 12px;
      background: var(--panel-soft);
      border: 1px solid var(--line);
      gap: 10px;
      align-items: center;
    }

    .file-card.show { display: flex; }
    .file-card .file-icon { font-size: 1.35rem; }
    .file-info { min-width: 0; flex: 1; }
    .file-name { font-size: .9rem; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .file-meta { margin-top: 2px; color: var(--muted); font-size: .78rem; }

    .divider { height: 1px; background: var(--line); margin: 20px 0; }

    label.field-label {
      display: block;
      font-size: .84rem;
      font-weight: 750;
      margin-bottom: 7px;
    }

    textarea, input[type="text"], input[type="number"], select {
      width: 100%;
      border: 1px solid #cfd8e8;
      border-radius: 11px;
      color: var(--text);
      background: #fff;
      outline: none;
      transition: .16s ease;
    }

    textarea {
      min-height: 172px;
      resize: vertical;
      padding: 12px 13px;
      line-height: 1.5;
    }

    .compact-textarea {
      min-height: 68px;
      max-height: 120px;
      font-size: .82rem;
    }

    input[type="text"], input[type="number"], select { height: 42px; padding: 0 11px; }

    textarea:focus, input:focus, select:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(49, 87, 213, .12);
    }

    .help {
      margin: 7px 0 0;
      color: var(--muted);
      font-size: .76rem;
      line-height: 1.45;
    }

    .settings-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-top: 12px;
    }

    .setting label {
      display: block;
      font-size: .75rem;
      color: var(--muted);
      margin-bottom: 5px;
    }

    .check-row {
      display: flex;
      align-items: center;
      gap: 9px;
      margin-top: 12px;
      color: #46536b;
      font-size: .82rem;
    }

    .check-row input { width: 16px; height: 16px; accent-color: var(--primary); }

    .actions {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 9px;
      margin-top: 15px;
    }

    .btn {
      border: 0;
      border-radius: 11px;
      min-height: 43px;
      padding: 0 15px;
      cursor: pointer;
      font-weight: 780;
      transition: .16s ease;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .btn:disabled { cursor: not-allowed; opacity: .52; }
    .btn-primary { color: #fff; background: var(--primary); }
    .btn-primary:not(:disabled):hover { background: var(--primary-strong); transform: translateY(-1px); }
    .btn-secondary { color: #34405a; background: #eef2f8; }
    .btn-secondary:not(:disabled):hover { background: #e3e9f2; }
    .btn-excel { color: #fff; background: #168354; box-shadow: 0 8px 18px rgba(22, 131, 84, .18); }
    .btn-excel:not(:disabled):hover { background: #116a45; transform: translateY(-1px); }
    .btn-danger-soft { color: var(--danger); background: var(--danger-bg); }

    .status {
      display: none;
      margin-top: 13px;
      padding: 10px 12px;
      border-radius: 10px;
      font-size: .8rem;
      line-height: 1.4;
    }

    .status.show { display: block; }
    .status.info { color: #30509e; background: #edf2ff; border: 1px solid #d4defc; }
    .status.error { color: #9b2f3b; background: var(--danger-bg); border: 1px solid #f3ccd1; }
    .status.success { color: #116a45; background: var(--success-bg); border: 1px solid #c6ead9; }

    .main-panel { min-height: 590px; overflow: hidden; min-width: 0; }

    .empty-state {
      min-height: 590px;
      padding: 50px 24px;
      display: grid;
      place-items: center;
      text-align: center;
    }

    .empty-inner { max-width: 470px; }
    .empty-art {
      width: 104px;
      height: 104px;
      margin: 0 auto 20px;
      border-radius: 27px;
      display: grid;
      place-items: center;
      background: linear-gradient(145deg, #eef2ff, #e5f6ef);
      color: var(--primary);
    }
    .empty-art svg { width: 56px; height: 56px; }
    .empty-state h2 { margin: 0 0 8px; font-size: 1.28rem; }
    .empty-state p { margin: 0; color: var(--muted); line-height: 1.6; }

    .results { display: none; }
    .results.show { display: block; }

    .results-head {
      padding: 20px 22px 17px;
      border-bottom: 1px solid var(--line);
    }

    .results-topline {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 15px;
    }

    .results-topline h2 { margin: 0; font-size: 1.15rem; }
    .results-topline p { margin: 4px 0 0; color: var(--muted); font-size: .83rem; }

    .export-actions { display: flex; flex-wrap: wrap; gap: 8px; }
    .export-actions .btn { min-height: 37px; font-size: .8rem; padding: 0 12px; }

    .export-options {
      margin-top: 9px;
      padding: 10px 12px;
      border: 1px dashed #c9d4ea;
      border-radius: 12px;
      background: #f8fbff;
    }
    .export-options .check-row { margin-top: 6px; }
    .export-options-title {
      color: var(--muted);
      font-size: .74rem;
      font-weight: 800;
      margin-bottom: 4px;
      text-transform: uppercase;
      letter-spacing: .04em;
    }

    .kpis {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
    }

    .kpi {
      border: 1px solid var(--line);
      background: var(--panel-soft);
      border-radius: 13px;
      padding: 12px 13px;
    }
    .kpi .value { font-size: 1.35rem; font-weight: 850; letter-spacing: -0.03em; }
    .kpi .label { color: var(--muted); font-size: .73rem; margin-top: 3px; }
    .kpi.success .value { color: var(--success); }
    .kpi.danger .value { color: var(--danger); }

    .toolbar {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 13px 22px;
      border-bottom: 1px solid var(--line);
      background: #fbfcfe;
    }

    .toolbar-search { position: relative; flex: 1; }
    .toolbar-search input { padding-left: 36px; }
    .toolbar-search svg { position: absolute; left: 11px; top: 12px; width: 17px; color: #8994a8; }
    .toolbar select { width: 176px; flex: 0 0 auto; }

    .table-wrap { overflow: auto; max-height: 660px; width: 100%; }
    table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: min(1180px, 100%); }
    th {
      position: sticky;
      top: 0;
      z-index: 2;
      text-align: left;
      padding: 12px 14px;
      background: #f5f7fb;
      border-bottom: 1px solid var(--line);
      color: #59657a;
      font-size: .75rem;
      letter-spacing: .02em;
      text-transform: uppercase;
    }
    td {
      padding: 14px;
      border-bottom: 1px solid #e8edf4;
      vertical-align: top;
      font-size: .86rem;
    }
    tbody tr:hover { background: #fafbfe; }
    .person-cell { font-weight: 780; min-width: 180px; }
    .count-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 31px;
      height: 27px;
      padding: 0 8px;
      border-radius: 999px;
      font-size: .77rem;
      font-weight: 800;
    }
    .count-badge.ok { color: var(--success); background: var(--success-bg); }
    .count-badge.no { color: var(--danger); background: var(--danger-bg); }

    .chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 220px; }
    .chip {
      border-radius: 999px;
      padding: 5px 8px;
      font-size: .72rem;
      line-height: 1.2;
      border: 1px solid transparent;
    }
    .chip.found { color: #146d49; background: var(--success-bg); border-color: #c9eadb; }
    .chip.missing { color: #9f3340; background: var(--danger-bg); border-color: #f1cbd0; }
    .chip.hidden-sheet::after { content: " · oculta"; opacity: .72; }
    .none { color: #98a2b3; font-style: italic; }

    .details-cell { min-width: 330px; max-width: 520px; }
    .status-details { display: grid; gap: 7px; }
    .status-details details {
      border: 1px solid var(--line);
      border-radius: 11px;
      background: #fbfcfe;
      overflow: hidden;
    }
    .status-details summary {
      cursor: pointer;
      padding: 8px 10px;
      font-weight: 800;
      color: #33405a;
      font-size: .78rem;
    }
    .status-details summary .small-muted { font-weight: 650; color: var(--muted); }
    .detail-list { padding: 0 10px 9px; display: grid; gap: 5px; }
    .detail-item {
      display: grid;
      grid-template-columns: minmax(120px, 1.2fr) minmax(90px, .8fr);
      gap: 8px;
      padding: 6px 0;
      border-top: 1px dashed #d9e2ef;
      font-size: .75rem;
      line-height: 1.35;
    }
    .detail-title { color: #536077; overflow-wrap: anywhere; }
    .detail-value { color: #16243b; font-weight: 800; overflow-wrap: anywhere; }
    .detail-value.complete { color: var(--success); }
    .detail-value.empty { color: #98a2b3; font-style: italic; font-weight: 650; }
    .more-details { color: var(--muted); font-size: .73rem; padding-top: 5px; }

    .sheet-overview {
      padding: 15px 22px 20px;
      border-top: 1px solid var(--line);
      background: #fbfcfe;
    }
    .sheet-overview summary {
      cursor: pointer;
      font-size: .84rem;
      font-weight: 780;
      color: #4c5970;
    }
    .sheet-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
    .sheet-pill {
      padding: 6px 9px;
      border-radius: 8px;
      font-size: .75rem;
      background: #eef2f8;
      color: #4b5870;
    }
    .sheet-pill.skipped {
      background: #fff7df;
      color: #8b5c00;
      border: 1px solid #f4dca1;
    }

    .sheet-filter-box {
      margin-top: 12px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 13px;
      background: #fbfcfe;
    }
    .sheet-filter-box .setting + .setting { margin-top: 10px; }


    .audit-box {
      margin-top: 16px;
      padding: 13px;
      border: 1px solid #d6e1f0;
      border-radius: 15px;
      background: linear-gradient(180deg, #fbfcfe, #f6f9ff);
    }
    .audit-box .actions { grid-template-columns: 1fr auto; }
    .audit-box .setting { margin-top: 11px; }
    .audit-meta-box {
      display: none;
      margin-top: 10px;
      padding: 9px 10px;
      border-radius: 10px;
      background: #eef2ff;
      color: #334b93;
      border: 1px solid #d5defc;
      font-size: .78rem;
      line-height: 1.35;
    }
    .audit-meta-box.show { display: block; }
    .audit-results-panel {
      display: none;
      border-top: 1px solid var(--line);
      background: #fff;
    }
    .audit-results-panel.show { display: block; }
    .audit-results-panel .table-wrap { max-height: 520px; }
    .audit-results-panel table { min-width: 1120px; }
    .path-list { display: grid; gap: 7px; min-width: 280px; }
    .path-item {
      border: 1px solid #dce3ee;
      background: #fbfcfe;
      border-radius: 10px;
      padding: 8px 9px;
      overflow-wrap: anywhere;
    }
    .path-item.folder { border-left: 4px solid #3157d5; }
    .path-item.file { border-left: 4px solid #168354; }
    .path-link {
      color: var(--primary);
      font-weight: 820;
      text-decoration: none;
    }
    .path-link:hover { text-decoration: underline; }
    .path-text { color: #24304a; font-weight: 760; }
    .path-meta {
      color: var(--muted);
      font-size: .72rem;
      line-height: 1.35;
      margin-top: 3px;
    }
    .audit-note {
      padding: 11px 22px;
      background: #fff7df;
      border-bottom: 1px solid #f4dca1;
      color: #775000;
      font-size: .8rem;
      line-height: 1.45;
    }



    .side-menu {
      display: grid;
      grid-template-columns: 1fr;
      gap: 8px;
      margin-bottom: 16px;
      padding: 10px;
      border: 1px solid #dbe4f2;
      border-radius: 15px;
      background: linear-gradient(180deg, #f9fbff, #f1f5ff);
    }
    .menu-btn {
      width: 100%;
      min-height: 39px;
      border: 1px solid transparent;
      border-radius: 11px;
      background: transparent;
      color: #3a4660;
      display: flex;
      align-items: center;
      gap: 9px;
      justify-content: flex-start;
      padding: 0 11px;
      cursor: pointer;
      font-weight: 820;
      font-size: .84rem;
    }
    .menu-btn:hover { background: #eaf0ff; }
    .menu-btn.active { background: #3157d5; color: #fff; box-shadow: 0 10px 18px rgba(49, 87, 213, .18); }
    .menu-btn span:first-child {
      width: 23px; height: 23px; border-radius: 8px; display: grid; place-items: center;
      background: rgba(49, 87, 213, .12); color: inherit; font-size: .78rem;
    }
    .menu-btn.active span:first-child { background: rgba(255,255,255,.18); }


    .line-visual-summary {
      padding: 16px 22px 18px;
      border-top: 1px solid var(--line);
      background: linear-gradient(180deg, #ffffff, #f7faff);
      display: grid;
      grid-template-columns: minmax(240px, 320px) 1fr;
      gap: 16px;
    }
    .line-visual-summary[hidden] { display: none; }
    .line-score-card {
      border: 1px solid #dce6f5;
      border-radius: 18px;
      background: #fff;
      padding: 16px;
      box-shadow: 0 12px 28px rgba(23,32,51,.06);
      display: grid;
      gap: 12px;
      justify-items: center;
      text-align: center;
    }
    .line-donut {
      width: 156px;
      height: 156px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      background: conic-gradient(var(--success) 0deg, var(--success) 0deg, #fee2e2 0deg, #fee2e2 360deg);
      box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
    }
    .line-donut-inner {
      width: 112px;
      height: 112px;
      border-radius: 50%;
      background: #fff;
      display: grid;
      place-items: center;
      box-shadow: 0 8px 24px rgba(23,32,51,.08);
    }
    .line-donut-value {
      font-size: 1.85rem;
      font-weight: 950;
      color: #172033;
      letter-spacing: -0.04em;
    }
    .line-score-card small { color: var(--muted); font-weight: 760; }
    .line-visual-cards {
      display: grid;
      grid-template-columns: repeat(4, minmax(120px, 1fr));
      gap: 10px;
      margin-bottom: 12px;
    }
    .line-visual-card {
      border: 1px solid #dce6f5;
      border-radius: 15px;
      background: #fff;
      padding: 13px;
      box-shadow: 0 10px 24px rgba(23,32,51,.05);
    }
    .line-visual-card strong { display: block; font-size: 1.28rem; color: #172033; }
    .line-visual-card span { display: block; margin-top: 3px; color: var(--muted); font-size: .76rem; font-weight: 760; }
    .line-chart-box {
      border: 1px solid #dce6f5;
      border-radius: 18px;
      background: #fff;
      padding: 14px;
      box-shadow: 0 12px 28px rgba(23,32,51,.05);
    }
    .line-chart-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 10px;
      color: #26324a;
      font-weight: 900;
    }
    .line-bars { display: grid; gap: 9px; }
    .line-bar-row { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 52px; gap: 10px; align-items: center; }
    .line-bar-name {
      font-size: .78rem;
      color: #26324a;
      font-weight: 850;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .line-bar-track {
      height: 14px;
      border-radius: 999px;
      background: #edf2f8;
      overflow: hidden;
      border: 1px solid #dce3ee;
    }
    .line-bar-fill {
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, #dc2626, #ca8a04, #16a34a);
      width: 0%;
    }
    .line-bar-pct { font-size: .78rem; font-weight: 900; color: #172033; text-align: right; }
    @media (max-width: 1100px) {
      .line-visual-summary { grid-template-columns: 1fr; }
      .line-visual-cards { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
    }

    .line-box {
      margin-top: 16px;
      padding: 13px;
      border: 1px solid #d6e1f0;
      border-radius: 15px;
      background: linear-gradient(180deg, #ffffff, #f7fbff);
    }
    .step-title {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
      color: #26324a;
    }
    .step-title span {
      width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center;
      background: #edf1ff; color: var(--primary); font-size: .78rem; font-weight: 850;
    }
    .line-box .setting { margin-top: 10px; }
    .inline-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
    .line-report-panel, .floor-panel {
      display: none;
      border-top: 1px solid var(--line);
      background: #fff;
    }
    .line-report-panel.show, .floor-panel.show { display: block; }
    .line-report-panel .table-wrap, .floor-panel .table-wrap { max-height: 560px; }
    .line-report-panel table { min-width: min(1100px, 100%); }
    .floor-panel table { min-width: min(980px, 100%); }
    .floor-import-card {
      margin: 16px 22px;
      border: 1px solid #dbe5f4;
      border-radius: 18px;
      background: linear-gradient(180deg, #ffffff, #f7fbff);
      padding: 16px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 14px;
      align-items: center;
      box-shadow: 0 14px 28px rgba(23,32,51,.05);
    }
    .floor-import-card.dragover { border-color: var(--primary); background: #f0f5ff; }
    .floor-import-card h3 { margin: 0 0 6px; font-size: 1rem; color: #172033; }
    .floor-import-card p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }
    .floor-import-steps {
      margin-top: 10px;
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }
    .floor-step-card {
      border: 1px solid #e2e8f3;
      border-radius: 12px;
      background: #fff;
      padding: 9px 10px;
      font-size: .76rem;
      color: #3a4660;
      font-weight: 760;
      line-height: 1.35;
    }
    .floor-step-card strong { display: block; color: #172033; margin-bottom: 2px; }
    .floor-upload-label {
      min-width: 210px;
      min-height: 116px;
      border: 2px dashed #b8c8ed;
      border-radius: 16px;
      background: #f8fbff;
      display: grid;
      place-items: center;
      text-align: center;
      padding: 14px;
      cursor: pointer;
      color: var(--primary);
      font-weight: 900;
    }
    .floor-upload-label span { display: block; color: #667085; font-size: .75rem; font-weight: 750; margin-top: 5px; }
    .floor-empty-message {
      margin: 0 22px 16px;
      padding: 12px 14px;
      border-radius: 14px;
      background: #fff7df;
      border: 1px solid #f3dea6;
      color: #6d4b00;
      font-size: .82rem;
      line-height: 1.45;
      font-weight: 760;
    }
    @media (max-width: 900px) {
      .floor-import-card { grid-template-columns: 1fr; }
      .floor-import-steps { grid-template-columns: 1fr; }
      .floor-upload-label { min-width: 0; width: 100%; }
    }
    .report-section-title {
      padding: 14px 22px 9px;
      border-top: 1px solid var(--line);
      background: #fbfcfe;
    }
    .report-section-title h3 { margin: 0; font-size: .98rem; }
    .report-section-title p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.4; }
    .matrix-wrap { max-height: 520px; }
    .matrix-table { min-width: 1250px !important; }
    .matrix-table th:first-child,
    .matrix-table td:first-child {
      position: sticky;
      left: 0;
      z-index: 3;
      background: inherit;
      box-shadow: 1px 0 0 #e8edf4;
    }
    .matrix-table th:first-child { background: #f5f7fb; z-index: 4; }
    .matrix-status {
      min-width: 110px;
      max-width: 180px;
      white-space: normal;
      overflow-wrap: anywhere;
      font-weight: 820;
      text-align: center;
      border-radius: 8px;
    }
    .matrix-status.complete { color: var(--success); background: var(--success-bg); }
    .matrix-status.missing { color: var(--danger); background: var(--danger-bg); }
    .matrix-status.na { color: #667085; background: #f1f5f9; }
    .matrix-status.other { color: var(--warning); background: var(--warning-bg); }
    .matrix-status.empty { color: #98a2b3; background: #f8fafc; font-style: italic; }
    .mini-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 4px 8px;
      border-radius: 999px;
      font-size: .72rem;
      font-weight: 850;
      border: 1px solid transparent;
    }
    .mini-pill.ok { color: var(--success); background: var(--success-bg); border-color: #c9eadb; }
    .mini-pill.bad { color: var(--danger); background: var(--danger-bg); border-color: #f1cbd0; }
    .total-count { font-weight: 900; color: #22304a; }
    .progress-track {
      width: 100%;
      height: 12px;
      background: #eef2f8;
      border-radius: 999px;
      overflow: hidden;
      border: 1px solid #dde5f0;
    }
    .progress-fill {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, #dc2626, #ca8a04, #16a34a);
      border-radius: inherit;
    }
    .percent-strong { font-weight: 900; letter-spacing: -0.02em; }
    .evidence-list { display: grid; gap: 6px; min-width: 220px; }
    .evidence-pill {
      display: block;
      border: 1px solid #dce3ee;
      border-left: 4px solid #168354;
      border-radius: 10px;
      padding: 7px 8px;
      background: #fbfcfe;
      color: #284061;
      text-decoration: none;
      overflow-wrap: anywhere;
      font-size: .74rem;
      font-weight: 760;
    }
    .evidence-pill:hover { text-decoration: underline; }
    .line-status-complete { color: var(--success); font-weight: 850; }
    .line-status-pending { color: var(--danger); font-weight: 850; }
    .line-status-na { color: #667085; font-weight: 800; }
    .line-status-other { color: #a96900; font-weight: 800; }

    @media (max-width: 1180px) {
      .layout { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); }
      .results-topline { align-items: stretch; flex-direction: column; }
    }

    .noscript {
      margin: 25px auto;
      width: min(900px, calc(100% - 30px));
      padding: 18px;
      background: var(--danger-bg);
      color: var(--danger);
      border: 1px solid #f1cbd0;
      border-radius: 12px;
    }

    @media (max-width: 940px) {
      .layout { grid-template-columns: 1fr; }
      .sidebar { position: static; }
      .hero { align-items: center; }
      .kpis { grid-template-columns: 1fr 1fr; }
    }

    @media (max-width: 600px) {
      .app { width: 100%; padding: 10px; }
      .hero { align-items: flex-start; flex-direction: column; }
      .offline-badge { align-self: flex-start; }
      .sidebar { padding: 15px; }
      .settings-grid { grid-template-columns: 1fr; }
      .results-topline, .toolbar { align-items: stretch; flex-direction: column; }
      .toolbar select { width: 100%; }
      .kpis { grid-template-columns: 1fr 1fr; }
      .results-head, .toolbar, .sheet-overview, .audit-note { padding-left: 15px; padding-right: 15px; }
    }

    @media print {
      body { background: #fff; }
      .hero, .sidebar, .toolbar, .export-actions, .sheet-overview, .audit-note { display: none !important; }
      .app { width: 100%; padding: 0; }
      .layout { display: block; }
      .panel, .main-panel { border: 0; box-shadow: none; }
      .results { display: block !important; }
      .table-wrap { max-height: none; overflow: visible; }
      th { position: static; }
    }
  