        :root {
            --primary-color: #002060;
            --secondary-color: #0070C0;
            --teal-green: #03A88B;
            --success-color: #70AD47;
            --warning-color: #FFC000;
            --danger-color: #ED7D31;
            --light-bg: #F4F6FA;

            /* Unified dashboard card tokens */
            --card-bg: #ffffff;
            --card-border: rgba(0,32,96,.08);
            --card-radius: 14px;
            --card-pad: 22px 24px;
            --card-shadow: 0 1px 2px rgba(15,23,42,.04), 0 4px 16px rgba(0,32,96,.06);
            --card-shadow-hover: 0 2px 4px rgba(15,23,42,.06), 0 12px 28px rgba(0,32,96,.10);
            --text-strong: #002060;
            --text-muted: #6b7f92;
            --text-soft: #8C9BB5;
            --ring-track: #eef2f8;
        }

        body {
            background-color: var(--light-bg);
            font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
        }
        html, body {
            scrollbar-width: none;
        }
        html::-webkit-scrollbar, body::-webkit-scrollbar {
            display: none;
        }

        /* ===== SIDEBAR NAVIGATION ===== */
        .app-sidebar {
            position: fixed;
            right: 0;
            top: 0;
            height: 100vh;
            width: 260px;
            background: #002060;
            display: flex;
            flex-direction: column;
            z-index: 1035;
            box-shadow: -4px 0 20px rgba(0,32,96,.16);
            overflow-y: auto;
            scrollbar-width: none;
        }
        .app-sidebar::-webkit-scrollbar {
            display: none;
        }

        .sidebar-logo-area {
            padding: 20px 16px 16px;
            border-bottom: 1px solid rgba(255,255,255,0.15);
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .sidebar-app-logo {
            width: 52px;
            height: 52px;
            border-radius: 50%;
            background: rgba(255,255,255,0.92);
            padding: 3px;
            object-fit: contain;
            flex-shrink: 0;
        }

        .sidebar-app-name {
            color: white;
            font-size: 0.95rem;
            font-weight: 700;
            line-height: 1.2;
        }

        .sidebar-app-sub {
            color: rgba(255,255,255,0.6);
            font-size: 0.72rem;
            margin-top: 2px;
        }

        .sidebar-nwc-area {
            padding: 12px 16px;
            border-bottom: 1px solid rgba(255,255,255,0.15);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .sidebar-nwc-logo {
            width: 36px;
            height: 36px;
            object-fit: contain;
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
            flex-shrink: 0;
        }

        .sidebar-nwc-label {
            color: rgba(255,255,255,0.65);
            font-size: 0.75rem;
            line-height: 1.4;
        }

        .sidebar-month-section {
            padding: 14px 16px;
            border-bottom: 1px solid rgba(255,255,255,0.15);
        }

        .sidebar-section-label {
            color: rgba(255,255,255,0.55);
            font-size: 0.7rem;
            font-weight: 600;
            letter-spacing: 0.05em;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .sidebar-month-filter {
            width: 100%;
            background: rgba(255,255,255,0.12);
            border: 1px solid rgba(255,255,255,0.25);
            border-radius: 8px;
            color: white;
            padding: 7px 10px;
            font-size: 0.85rem;
            font-family: 'Cairo', sans-serif;
            cursor: pointer;
            outline: none;
        }

        .sidebar-month-filter:focus {
            border-color: rgba(255,255,255,0.55);
            background: rgba(255,255,255,0.2);
        }

        .sidebar-month-filter option {
            background: #002060;
            color: white;
        }

        .sidebar-nav {
            flex: 1;
            padding: 10px;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .sidebar-nav-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 11px 14px;
            border-radius: 10px;
            color: rgba(255,255,255,0.72);
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 0.92rem;
            font-weight: 500;
            border: none;
            background: none;
            width: 100%;
            text-align: right;
            font-family: 'Cairo', sans-serif;
        }

        .sidebar-nav-item:hover {
            background: rgba(255,255,255,0.1);
            color: white;
        }

        .sidebar-nav-item.active {
            background: rgba(0,167,226,.2);
            color: white;
            font-weight: 600;
        }

        .sidebar-nav-item i {
            font-size: 1.15rem;
            flex-shrink: 0;
            width: 22px;
            text-align: center;
        }

        /* Collapsible sidebar groups */
        .sidebar-group {
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        .sidebar-group-toggle {
            display: flex; align-items: center; gap: 8px;
            width: 100%; padding: 12px 16px;
            background: none; border: none; color: rgba(255,255,255,0.85);
            font-family: 'Cairo', sans-serif; font-size: 0.85rem; font-weight: 600;
            cursor: pointer; transition: background 0.2s ease;
        }
        .sidebar-group-toggle:hover { background: rgba(255,255,255,0.08); }
        .sidebar-group-toggle .toggle-arrow {
            margin-right: auto; font-size: 0.7rem; transition: transform 0.25s ease;
            opacity: 0.5;
        }
        .sidebar-group.open .toggle-arrow { transform: rotate(180deg); }
        .sidebar-group-content {
            max-height: 0; overflow: hidden;
            transition: max-height 0.3s ease;
        }
        .sidebar-group.open .sidebar-group-content {
            max-height: 500px;
        }
        .sidebar-group-content .sidebar-nav-item {
            padding: 8px 16px 8px 36px !important;
            font-size: 0.82rem !important;
        }
        .sidebar-group-content .sidebar-filter-row {
            padding: 4px 16px 4px 20px;
        }
        .sidebar-group-content .sidebar-filter-row label {
            font-size: 0.7rem; color: rgba(255,255,255,0.5);
            margin-bottom: 2px; display: block;
        }
        .sidebar-group-content .sidebar-filter-row select {
            width: 100%; background: rgba(255,255,255,0.12);
            border: 1px solid rgba(255,255,255,0.2); border-radius: 6px;
            color: white; font-family: 'Cairo', sans-serif; font-size: 0.78rem;
            padding: 5px 8px; margin-bottom: 6px; outline: none;
        }
        .sidebar-group-content .sidebar-filter-row select option {
            background: #002060; color: white;
        }
        .sidebar-nav-divider {
            height: 1px;
            background: rgba(255,255,255,0.1);
            margin: 4px 12px;
        }

        .sidebar-bottom {
            padding: 12px 10px 20px;
            border-top: 1px solid rgba(255,255,255,0.15);
        }

        .sidebar-upload-btn {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            border-radius: 10px;
            color: rgba(255,255,255,0.72);
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 0.85rem;
            font-family: 'Cairo', sans-serif;
            border: 1px solid rgba(255,255,255,0.2);
            background: rgba(255,255,255,0.08);
            width: 100%;
            text-align: right;
        }

        .sidebar-upload-btn:hover {
            background: rgba(255,255,255,0.15);
            color: white;
            border-color: rgba(255,255,255,0.4);
        }

        .sidebar-reset-btn {
            display: flex; align-items: center; gap: 10px;
            padding: 8px 14px; border-radius: 10px;
            color: rgba(255,255,255,0.6); cursor: pointer; transition: all 0.2s ease;
            font-size: 0.82rem; font-family: 'Cairo', sans-serif;
            border: 1px solid rgba(237,125,49,0.3);
            background: rgba(237,125,49,0.10);
            width: 100%; text-align: right; margin-top: 8px;
        }
        .sidebar-reset-btn:hover { background: rgba(237,125,49,0.22); color: rgba(255,255,255,0.85); border-color: rgba(237,125,49,0.55); }

        /* Content area pushed left from sidebar (RTL = margin-right) */
        .with-sidebar {
            margin-right: 260px;
            min-height: 100vh;
            background: var(--light-bg);
            overflow-y: auto;
            height: 100vh;
            scrollbar-width: none;
        }
        .with-sidebar::-webkit-scrollbar {
            display: none;
        }

        /* ===== END SIDEBAR ===== */

        .global-month-filter {
            background: rgba(255,255,255,0.15);
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 8px;
            color: white;
            padding: 4px 10px;
            font-size: 0.82rem;
            cursor: pointer;
            outline: none;
            min-width: 130px;
        }

        .global-month-filter:focus {
            border-color: rgba(255,255,255,0.6);
            background: rgba(255,255,255,0.25);
        }

        .global-month-filter option {
            background: #002060;
            color: white;
        }

        .upload-zone {
            border: 3px dashed #dee2e6;
            border-radius: 10px;
            padding: 40px;
            text-align: center;
            transition: all 0.3s ease;
            cursor: pointer;
            background: white;
        }

        .upload-zone:hover, .upload-zone.dragover {
            border-color: var(--secondary-color);
            background: rgba(0,112,192,.06);
        }

        .upload-zone i {
            font-size: 3rem;
            color: var(--secondary-color);
        }

        /* ============================================================
           UNIFIED DASHBOARD CARD SYSTEM
           .kpi-card / .chart-container / .metric-card / .panel share the same
           background, radius, shadow, border, hover. Per-card accent is driven
           by --accent; legacy HTML can set inline style="--accent:#XXX" on the
           card root. .source-card is LEFT ALONE — the legacy layout works and
           rewriting it caused d-flex flex-wrap collapse in task results.
           NOTHING here touches .report-view / .mr-* / .pr-* — protected below.
           ============================================================ */
        .kpi-card,
        .metric-card,
        .chart-container,
        .panel {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: var(--card-radius);
            box-shadow: var(--card-shadow);
            position: relative;
            overflow: hidden;
            transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease;
        }

        .kpi-card,
        .metric-card {
            --accent: var(--primary-color);
            padding: var(--card-pad);
        }

        .kpi-card { height: 100%; }

        .kpi-card:hover,
        .metric-card:hover {
            transform: translateY(-2px);
            box-shadow: var(--card-shadow-hover);
            border-color: color-mix(in srgb, var(--accent) 30%, var(--card-border));
        }

        /* Top accent stripe on kpi-card / metric-card, tinted by --accent */
        .kpi-card::before,
        .metric-card::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 3px;
            background: var(--accent);
            opacity: .9;
        }

        /* Chart container / panel get more breathing room */
        .chart-container,
        .panel {
            padding: 22px 24px;
            margin-bottom: 20px;
        }

        /* Legacy KPI atoms */
        .kpi-icon {
            width: 56px;
            height: 56px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.45rem;
            color: white;
            box-shadow: 0 4px 14px rgba(0,32,96,.08);
        }

        .kpi-value {
            font-size: 2rem;
            font-weight: 800;
            color: var(--text-strong);
            font-variant-numeric: tabular-nums;
            font-feature-settings: 'tnum';
            line-height: 1.1;
        }

        .kpi-label {
            color: var(--text-soft);
            font-size: .9rem;
        }

        /* ===== New metric-card anatomy (opt-in for new work) ===== */
        .metric-card--compact { padding: 16px 20px; }
        .metric-card__head {
            display: flex; align-items: center; justify-content: space-between; gap: 12px;
            margin-bottom: 10px;
        }
        .metric-card__icon {
            width: 44px; height: 44px; border-radius: 10px;
            background: var(--accent); color: #fff;
            display: flex; align-items: center; justify-content: center;
            font-size: 1.1rem; flex-shrink: 0;
            box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent);
        }
        .metric-card__title {
            font-size: .9rem; font-weight: 700; color: var(--text-strong);
            text-align: center; margin: 4px 0;
        }
        .metric-card__value {
            font-size: 2.15rem; font-weight: 800; color: var(--text-strong);
            line-height: 1.1; text-align: center;
            font-variant-numeric: tabular-nums; font-feature-settings: 'tnum';
        }
        .metric-card__unit { font-size: .72rem; color: var(--text-soft); text-align: center; margin-top: 2px; }
        .metric-card__sub  {
            font-size: .74rem; color: var(--text-muted); text-align: center;
            padding-top: 10px; margin-top: 10px;
            border-top: 1px dashed color-mix(in srgb, var(--card-border) 60%, transparent);
        }

        /* Progress ring used by renderRingSVG() */
        .metric-ring { width: 56px; height: 56px; flex-shrink: 0; }
        .metric-ring__track { fill: none; stroke: var(--ring-track); stroke-width: 5; }
        .metric-ring__fill  {
            fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round;
            transform: rotate(-90deg); transform-origin: center;
            transition: stroke-dashoffset .8s cubic-bezier(.22,.61,.36,1);
        }
        .metric-ring__label {
            fill: var(--text-strong); font-weight: 700; font-size: 11px;
            text-anchor: middle; dominant-baseline: central;
            font-family: 'Cairo', sans-serif;
        }

        /* Panel header pattern — replaces ad-hoc <h5> + icon inside chart-containers */
        .panel__head {
            display: flex; align-items: center; justify-content: space-between; gap: 12px;
            padding-bottom: 14px; margin-bottom: 16px;
            border-bottom: 1px solid var(--card-border);
        }
        .panel__title {
            display: flex; align-items: center; gap: 10px;
            font-size: 1.02rem; font-weight: 700; color: var(--text-strong);
            margin: 0;
        }
        .panel__title i { font-size: 1.15rem; color: var(--accent, var(--primary-color)); }

        /* Callout — replaces inline gradient/banner boxes (e.g. بلاغ vs مهمة explainer) */
        .callout {
            background: linear-gradient(135deg,
                color-mix(in srgb, var(--primary-color) 5%, transparent),
                color-mix(in srgb, var(--teal-green) 5%, transparent));
            border: 1px solid var(--card-border);
            border-radius: var(--card-radius);
            padding: 14px 20px;
            display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
            color: var(--text-strong);
        }
        .callout__icon {
            width: 40px; height: 40px; border-radius: 10px;
            background: var(--primary-color); color: #fff;
            display: flex; align-items: center; justify-content: center;
            font-size: 1.1rem; flex-shrink: 0;
        }

        /* Section heading — unified pattern for <h5> used above card rows */
        .section-heading {
            display: flex; align-items: center; gap: 10px;
            margin: 4px 0 14px;
        }
        .section-heading__icon {
            width: 34px; height: 34px; border-radius: 9px;
            background: color-mix(in srgb, var(--primary-color) 10%, transparent);
            color: var(--primary-color);
            display: flex; align-items: center; justify-content: center;
            font-size: 1rem; flex-shrink: 0;
        }
        .section-heading__title {
            font-size: 1rem; font-weight: 700; color: var(--text-strong); margin: 0;
        }
        .section-heading__sub {
            font-size: .8rem; color: var(--text-muted); margin: 2px 0 0;
        }

        .filter-section {
            background: white;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 2px 12px rgba(0,32,96,.07);
            border: 1px solid rgba(0,32,96,.06);
            margin-bottom: 20px;
        }

        .btn-filter {
            border-radius: 8px;
            padding: 10px 25px;
            border: 1.5px solid #002060;
            color: #002060;
        }

        .btn-filter.active {
            background: #002060;
            color: white;
            border-color: #002060;
        }

        .table-container {
            background: white;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 2px 12px rgba(0,32,96,.07);
            border: 1px solid rgba(0,32,96,.06);
        }

        .journey-timeline {
            position: relative;
            padding: 20px 0;
        }

        .journey-step {
            display: flex;
            align-items: flex-start;
            margin-bottom: 20px;
            position: relative;
        }

        .journey-step::before {
            content: '';
            position: absolute;
            right: 20px;
            top: 40px;
            bottom: -20px;
            width: 2px;
            background: #dee2e6;
        }

        .journey-step:last-child::before {
            display: none;
        }

        .journey-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            margin-left: 15px;
            z-index: 1;
        }

        .journey-content {
            flex: 1;
            background: #F4F6FA;
            padding: 15px;
            border-radius: 12px;
        }

        .file-status {
            display: inline-flex;
            align-items: center;
            padding: 8px 15px;
            border-radius: 20px;
            font-size: 0.9rem;
            margin: 5px;
        }

        .file-status.loaded {
            background: rgba(112,173,71,.12);
            color: #70AD47;
        }

        .file-status.pending {
            background: rgba(255,192,0,.12);
            color: #b8860b;
        }

        .status-badge {
            padding: 5px 12px;
            border-radius: 9999px;
            font-size: 0.8rem;
        }

        .phase-inspection {
            background: rgba(0,167,226,.1);
            color: #0070C0;
        }

        .phase-corrective {
            background: rgba(237,125,49,.1);
            color: #ED7D31;
        }

        .phase-restore {
            background: rgba(3,168,139,.1);
            color: #03A88B;
        }

        /* Isolation Gauge */
        .isolation-gauge {
            width: 90px; height: 90px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            margin: 0 auto 8px;
            transition: background 0.4s ease;
        }
        .isolation-gauge-inner {
            width: 68px; height: 68px; border-radius: 50%;
            background: white; display: flex; align-items: center; justify-content: center;
            font-weight: 700; font-size: 1rem; color: #002060;
            box-shadow: 0 1px 4px rgba(0,32,96,.08);
        }
        .isolation-mini-bar {
            display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
        }
        .isolation-mini-bar-label {
            font-size: 0.78rem; color: #666; min-width: 80px; text-align: right;
        }
        .isolation-mini-bar-track {
            flex: 1; height: 8px; background: #E7E6E6; border-radius: 999px; overflow: hidden;
        }
        .isolation-mini-bar-fill {
            height: 100%; border-radius: 999px; transition: width 0.5s ease;
        }
        .isolation-mini-bar-value {
            font-size: 0.78rem; font-weight: 700; color: #002060; min-width: 30px;
        }
        .isolation-subclass-card {
            background: #f8f9fa; border-radius: 10px; padding: 14px 16px;
            border: 1px solid rgba(0,32,96,.06);
            text-align: center;
            min-width: 140px;
            flex: 1;
            position: relative;
            overflow: hidden;
        }
        .isolation-subclass-card .value {
            font-size: 1.5rem; font-weight: 700; color: #002060;
        }
        .isolation-subclass-card .label {
            font-size: 0.78rem; color: #555; margin-top: 4px; line-height: 1.3;
        }

        .modal-xl-custom {
            max-width: 90%;
        }

        #loadingOverlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255,255,255,0.9);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 9999;
        }

        .spinner-custom {
            width: 60px;
            height: 60px;
        }

        .hidden {
            display: none !important;
        }

        .search-box {
            max-width: 400px;
        }

        .table-responsive {
            max-height: 500px;
            overflow-y: auto;
        }

        .clickable-row {
            cursor: pointer;
        }

        .clickable-row:hover {
            background-color: rgba(0,32,96,.04) !important;
        }

        /* Table chip filters */
        .table-chip {
            padding: 4px 14px;
            border-radius: 20px;
            border: 1px solid #dee2e6;
            background: white;
            font-size: 0.8rem;
            font-weight: 500;
            color: #555;
            cursor: pointer;
            transition: all 0.15s;
            white-space: nowrap;
        }
        .table-chip:hover {
            border-color: #0070C0;
            color: #0070C0;
        }
        .table-chip.active {
            background: #002060;
            color: white;
            border-color: #002060;
        }

        /* Duration badge */
        .dur-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 10px;
            border-radius: 6px;
            font-size: 0.8rem;
            font-weight: 600;
        }
        .dur-badge.fast { background: rgba(3,168,139,.1); color: #03A88B; }
        .dur-badge.normal { background: rgba(0,112,192,.1); color: #0070C0; }
        .dur-badge.slow { background: rgba(255,192,0,.15); color: #b8860b; }
        .dur-badge.critical { background: rgba(237,125,49,.1); color: #ED7D31; }

        /* Result mini-badge */
        .result-tag {
            display: inline-block;
            padding: 2px 10px;
            border-radius: 6px;
            font-size: 0.78rem;
            font-weight: 600;
            max-width: 160px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        /* SLA Styles */
        .sla-indicator {
            display: flex;
            align-items: center;
            margin-top: 10px;
            padding: 8px 12px;
            border-radius: 8px;
            font-size: 0.85rem;
        }

        .sla-good {
            background: rgba(112,173,71,.12);
            color: #70AD47;
        }

        .sla-warning {
            background: rgba(255,192,0,.12);
            color: #b8860b;
        }

        .sla-bad {
            background: rgba(237,125,49,.12);
            color: #ED7D31;
        }

        .sla-progress {
            height: 8px;
            border-radius: 4px;
            margin-top: 8px;
            background: #e9ecef;
            overflow: hidden;
        }

        .sla-progress-bar {
            height: 100%;
            border-radius: 4px;
            transition: width 0.3s ease;
        }

        .sla-target {
            font-size: 0.8rem;
            color: #6c757d;
            margin-top: 5px;
        }

        .sla-input-group {
            background: #F4F6FA;
            padding: 15px;
            border-radius: 12px;
            margin-bottom: 15px;
        }

        .sla-input-group label {
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 8px;
            display: block;
        }

        .sla-input-group input {
            text-align: center;
            font-weight: bold;
        }

        .kpi-card.sla-exceeded {
            border: 2px solid var(--danger-color);
        }

        .kpi-card.sla-met {
            border: 2px solid var(--success-color);
        }

        /* Simple Chart Styles */
        .simple-bar-row {
            margin-bottom: 15px;
        }

        .simple-bar-label {
            font-weight: 600;
            margin-bottom: 5px;
            font-size: 0.9rem;
        }

        .simple-bar-container {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .simple-bar-track {
            flex: 1;
            height: 30px;
            background: #e9ecef;
            border-radius: 5px;
            overflow: hidden;
            position: relative;
        }

        .simple-bar-fill {
            height: 100%;
            border-radius: 5px;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            padding-right: 10px;
            color: white;
            font-weight: bold;
            font-size: 0.85rem;
            min-width: 50px;
        }

        .simple-bar-value {
            min-width: 80px;
            text-align: left;
            font-weight: bold;
            font-size: 0.9rem;
        }

        .bar-inspection {
            background: #0070C0;
        }

        .bar-corrective {
            background: #ED7D31;
        }

        /* ---- Analysis Tab Section Headers ---- */
        .analysis-section-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 2px solid #e9ecef;
        }
        .analysis-section-header i {
            font-size: 1.4rem;
            color: #002060;
        }
        .analysis-section-header h5 {
            margin: 0;
            color: #002060;
            font-weight: 700;
            font-size: 1.1rem;
        }

        /* ---- Summary Strip (inline KPI row) ---- */
        .analysis-summary-strip {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
            padding: 12px 16px;
            background: #F4F6FA;
            border-radius: 10px;
            margin-bottom: 16px;
        }
        .analysis-summary-item {
            text-align: center;
            min-width: 100px;
        }
        .analysis-summary-item .value {
            font-size: 1.6rem;
            font-weight: 700;
        }
        .analysis-summary-item .label {
            font-size: 0.8rem;
            color: #8C9BB5;
        }

        /* ---- Horizontal Bar Row (for distribution charts) ---- */
        .analysis-bar-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 8px;
            font-size: 0.85rem;
            padding: 4px 6px;
            border-radius: 6px;
            transition: background 0.15s;
        }
        .analysis-bar-row .bar-label {
            width: 220px;
            min-width: 220px;
            max-width: 220px;
            text-align: start;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .analysis-bar-row .bar-track {
            flex: 1;
            height: 22px;
            background: #e9ecef;
            border-radius: 6px;
            overflow: hidden;
        }
        .analysis-bar-row .bar-fill {
            height: 100%;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            padding-inline-end: 6px;
            color: white;
            font-size: 0.75rem;
            font-weight: 600;
            min-width: 28px;
            transition: width 0.4s ease;
        }
        .analysis-bar-row .bar-count {
            width: 45px;
            min-width: 45px;
            text-align: center;
            font-weight: 600;
        }

        /* ---- City × Type Matrix ---- */
        .city-type-matrix {
            width: 100%; border-collapse: separate; border-spacing: 0;
            font-size: 0.82rem; border-radius: 10px; overflow: hidden;
            border: 1px solid #e4e8ee;
        }
        .city-type-matrix th {
            background: #002060; color: #fff; padding: 10px 12px;
            font-weight: 600; text-align: center; font-size: 0.78rem;
            border-left: 1px solid rgba(255,255,255,.12);
        }
        .city-type-matrix th:first-child { text-align: right; border-left: none; }
        .city-type-matrix th:last-child { background: #003a75; }
        .city-type-matrix td {
            padding: 10px 12px; text-align: center; border-bottom: 1px solid #eef1f6;
            border-left: 1px solid #eef1f6;
        }
        .city-type-matrix td:first-child {
            text-align: right; font-weight: 700; color: #002060;
            border-left: none; background: rgba(0,32,96,.03);
        }
        .city-type-matrix tr:last-child td { border-bottom: none; }
        .city-type-matrix tr:hover td { background: rgba(3,168,139,.04); }
        .city-type-matrix .matrix-total-row td {
            background: rgba(0,32,96,.06); font-weight: 700; color: #002060;
            border-top: 2px solid #002060;
        }
        .city-type-matrix .matrix-total-col {
            font-weight: 700; color: #002060; background: rgba(0,32,96,.04);
        }
        .city-type-matrix .matrix-cell-val {
            display: inline-block; min-width: 32px; padding: 3px 10px;
            border-radius: 8px; font-weight: 600;
        }
        .city-type-matrix .matrix-cell-val.has-val { background: rgba(0,112,192,.08); color: #002060; }
        .city-type-matrix .matrix-cell-val.zero-val { color: #ccc; }
        .city-type-matrix .matrix-grand-total {
            background: #002060; color: #fff; padding: 3px 14px;
            border-radius: 8px; font-weight: 700;
        }

        /* ---- Inline Expandable Table ---- */
        .analysis-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            font-size: 0.85rem;
        }
        .analysis-table thead th {
            background: #F4F6FA;
            color: #002060;
            font-weight: 600;
            padding: 10px 12px;
            white-space: nowrap;
            border-bottom: 2px solid #dee2e6;
            position: sticky;
            top: 0;
            z-index: 1;
        }
        .analysis-table tbody tr {
            cursor: pointer;
            transition: background 0.15s;
        }
        .analysis-table tbody tr:hover {
            background: #f0f4ff;
        }
        .analysis-table tbody td {
            padding: 8px 12px;
            border-bottom: 1px solid #eee;
            vertical-align: middle;
        }

        /* Expandable detail row (hidden by default) */
        .analysis-table .detail-row {
            display: none;
        }
        .analysis-table .detail-row.open {
            display: table-row;
        }
        .analysis-table .detail-row td {
            background: #f8f9fc;
            padding: 12px 20px;
            border-bottom: 2px solid #dee2e6;
            cursor: default;
        }
        .analysis-table .detail-row:hover {
            background: #f8f9fc;
        }
        .analysis-table tr[id^="trigger-"] {
            cursor: pointer;
        }
        .analysis-table tr[id^="trigger-"]:hover {
            background: #f0f4ff;
        }
        .analysis-table tr[id^="trigger-"].expanded {
            background: #eef2fa;
        }
        .chevron-icon {
            transition: transform 0.25s ease;
            display: inline-block;
            font-size: 0.85rem;
            color: #999;
        }
        .analysis-table tr.expanded .chevron-icon {
            transform: rotate(180deg);
            color: #002060;
        }
        .detail-summary-chips {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 10px;
        }
        .detail-summary-chips .chip {
            background: #f0f4ff;
            border-radius: 8px;
            padding: 6px 12px;
            font-size: 0.78rem;
            color: #333;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .detail-summary-chips .chip strong {
            color: #002060;
        }
        .detail-status-badges {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            margin-bottom: 10px;
        }
        .detail-status-badges .sbadge {
            padding: 3px 10px;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 600;
        }

        /* ---- Source Cards (Section 2) ---- */
        /* Left unchanged from original design — the unified card system does NOT touch
           this class because it's used inside d-flex flex-wrap containers where
           height/stretch overrides caused layout collapse. */
        .source-card {
            flex: 1;
            min-width: 280px;
            background: #f8f9fa;
            border-radius: 14px;
            padding: 24px;
            position: relative;
            overflow: hidden;
        }
        .source-card .source-icon {
            width: 56px;
            height: 56px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            color: white;
        }

        /* ---- Top Offenders highlight ---- */
        .top-offender-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 2px 8px;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 600;
            background: #fff3cd;
            color: #856404;
            margin-inline-start: 6px;
        }

        /* Scrollable table container with hidden scrollbar */
        .analysis-table-scroll {
            max-height: 400px;
            overflow-y: auto;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }
        .analysis-table-scroll::-webkit-scrollbar {
            display: none;
        }

        .task-type-item {
            display: flex;
            align-items: center;
            padding: 12px;
            background: #F4F6FA;
            border-radius: 8px;
            margin-bottom: 10px;
        }

        .task-type-color {
            width: 12px;
            height: 12px;
            border-radius: 3px;
            margin-left: 10px;
        }

        .task-type-name {
            flex: 1;
            font-size: 0.9rem;
        }

        .task-type-count {
            font-weight: bold;
            font-size: 1.1rem;
            color: var(--primary-color);
        }

        .task-type-percent {
            font-size: 0.8rem;
            color: #6c757d;
            margin-right: 10px;
            min-width: 45px;
        }

        .comparison-legend {
            display: flex;
            justify-content: center;
            gap: 30px;
            margin-bottom: 20px;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.9rem;
        }

        .legend-color {
            width: 20px;
            height: 20px;
            border-radius: 4px;
        }

        /* ===== UPLOAD PAGE STYLES ===== */
        /* ============================================================
           UPLOAD PAGE — refined, solid-light, matches landing-page treatment
           ============================================================ */
        .upload-page {
            min-height: 100vh;
            background: var(--light-bg);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 60px 24px;
            position: relative;
            overflow: hidden;
        }
        .upload-page::before,
        .upload-page::after {
            content: '';
            position: absolute;
            border-radius: 50%;
            pointer-events: none;
            z-index: 0;
        }
        .upload-page::before {
            width: 520px; height: 520px;
            top: -180px; right: -160px;
            background: radial-gradient(circle, rgba(0,32,96,.07), transparent 70%);
        }
        .upload-page::after {
            width: 600px; height: 600px;
            bottom: -220px; left: -200px;
            background: radial-gradient(circle, rgba(3,168,139,.07), transparent 70%);
        }

        .upload-page-container {
            max-width: 1080px;
            width: 100%;
            text-align: center;
            position: relative;
            z-index: 1;
        }

        .upload-page-header {
            margin-bottom: 48px;
        }

        .upload-logos-wrapper {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 24px;
        }

        .upload-nwc-logo {
            width: 112px;
            height: 112px;
            object-fit: contain;
            filter: drop-shadow(0 10px 24px rgba(0,32,96,.18));
        }

        .upload-page-header h1 {
            color: var(--primary-color);
            font-size: 2.4rem;
            font-weight: 800;
            margin-bottom: 12px;
            letter-spacing: -0.4px;
        }

        .upload-subtitle {
            color: var(--text-muted);
            font-size: 1.02rem;
            font-weight: 500;
        }

        .upload-cards-container {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 28px;
            margin-bottom: 36px;
            max-width: 760px;
            margin-left: auto;
            margin-right: auto;
        }

        .upload-card {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: var(--card-radius);
            padding: 40px 30px;
            width: 100%;
            cursor: pointer;
            transition: transform .25s ease, box-shadow .3s ease, border-color .3s ease;
            box-shadow: var(--card-shadow);
            position: relative;
            overflow: hidden;
        }

        .upload-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--primary-color), var(--teal-green));
            opacity: .85;
        }

        .upload-card:hover {
            transform: translateY(-4px);
            box-shadow: var(--card-shadow-hover);
            border-color: color-mix(in srgb, var(--teal-green) 35%, var(--card-border));
        }

        .upload-card.file-loaded {
            border: 2px solid #03A88B;
        }

        .upload-card.file-loaded::before {
            background: linear-gradient(90deg, #002060, #03A88B);
            transform: scaleX(1);
        }

        .upload-card-icon {
            width: 80px;
            height: 80px;
            border-radius: 20px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
        }

        .upload-card-icon i {
            font-size: 2.5rem;
            color: white;
        }

        .maintenance-icon {
            background: #03A88B;
        }

        .quality-icon {
            background: #03A88B;
        }

        .upload-card h3 {
            color: var(--primary-color);
            font-size: 1.4rem;
            font-weight: 700;
            margin-bottom: 10px;
        }

        .upload-card p {
            color: #6c757d;
            font-size: 0.95rem;
            margin-bottom: 20px;
        }

        .upload-card-status {
            background: #F4F6FA;
            padding: 15px;
            border-radius: 10px;
            color: #8C9BB5;
            margin-bottom: 15px;
            transition: all 0.3s ease;
        }

        .upload-card-status i {
            font-size: 1.5rem;
            display: block;
            margin-bottom: 8px;
        }

        .upload-card:hover .upload-card-status {
            background: rgba(0,167,226,.08);
            color: #0070C0;
        }

        .upload-card.file-loaded .upload-card-status {
            background: rgba(112,173,71,.1);
            color: #70AD47;
        }

        .upload-card.file-loaded .upload-card-status {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .upload-card.file-loaded .upload-card-status i {
            font-size: 1.5rem;
            margin-bottom: 0;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        .btn-start-analysis:not(.hidden) {
            animation: pulse 2s infinite;
        }

        .upload-progress-section {
            margin-bottom: 30px;
        }

        .upload-progress-bar {
            height: 6px;
            background: rgba(0,32,96,.10);
            border-radius: 3px;
            overflow: hidden;
            margin-bottom: 15px;
        }

        .upload-progress-fill {
            height: 100%;
            background: var(--teal-green);
            width: 0%;
            transition: width 0.5s ease;
            border-radius: 3px;
        }

        .upload-progress-section p {
            color: var(--text-muted);
        }

        .btn-start-analysis {
            background: #002060;
            color: white;
            border: none;
            padding: 18px 50px;
            font-size: 1.2rem;
            font-weight: 600;
            border-radius: 999px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 16px rgba(0,32,96,.25);
        }

        .btn-start-analysis:hover {
            background: #001845;
            box-shadow: 0 6px 24px rgba(0,32,96,.35);
        }

        .upload-footer {
            margin-top: 40px;
            color: var(--text-soft);
            font-size: 0.86rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        .upload-footer i { color: var(--teal-green); }

        .upload-back-btn {
            position: absolute;
            top: 20px;
            right: 20px;
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            color: var(--text-strong);
            border-radius: 10px;
            padding: 9px 18px;
            font-family: 'Cairo', sans-serif;
            font-size: .85rem;
            font-weight: 700;
            cursor: pointer;
            transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease;
            display: flex;
            align-items: center;
            gap: 6px;
            z-index: 10;
            box-shadow: var(--card-shadow);
        }
        .upload-back-btn:hover {
            transform: translateY(-1px);
            box-shadow: var(--card-shadow-hover);
            border-color: color-mix(in srgb, var(--teal-green) 40%, var(--card-border));
            color: var(--teal-green);
        }

        /* ===== LANDING PAGE STYLES ===== */
        /* ============================================================
           LANDING PAGE — refined, solid-light, matches dashboard token family
           ============================================================ */
        .landing-page {
            min-height: 100vh;
            background: var(--light-bg);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 60px 24px;
            position: relative;
            overflow: hidden;
        }
        /* Decorative geometry — subtle circles in brand colors, no loud gradient */
        .landing-page::before,
        .landing-page::after {
            content: '';
            position: absolute;
            border-radius: 50%;
            pointer-events: none;
            z-index: 0;
        }
        .landing-page::before {
            width: 520px; height: 520px;
            top: -180px; right: -160px;
            background: radial-gradient(circle, rgba(0,32,96,.07), transparent 70%);
        }
        .landing-page::after {
            width: 600px; height: 600px;
            bottom: -220px; left: -200px;
            background: radial-gradient(circle, rgba(3,168,139,.07), transparent 70%);
        }

        .landing-container {
            max-width: 960px;
            width: 100%;
            text-align: center;
            position: relative;
            z-index: 1;
        }

        .landing-header {
            margin-bottom: 56px;
        }

        .landing-logos {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 28px;
        }

        .landing-nwc-logo {
            width: 128px;
            height: 128px;
            object-fit: contain;
            filter: drop-shadow(0 10px 24px rgba(0,32,96,.18));
        }

        .landing-title {
            color: var(--primary-color);
            font-size: 2.6rem;
            font-weight: 800;
            margin-bottom: 12px;
            letter-spacing: -0.5px;
        }

        .landing-subtitle {
            color: var(--text-muted);
            font-size: 1.05rem;
            font-weight: 500;
            letter-spacing: .2px;
        }
        .landing-subtitle strong {
            color: var(--text-strong);
            font-weight: 700;
        }

        .landing-modules {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 28px;
        }

        .landing-module {
            background: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: var(--card-radius);
            padding: 44px 36px 36px;
            position: relative;
            overflow: hidden;
            box-shadow: var(--card-shadow);
            transition: transform .25s ease, box-shadow .3s ease, border-color .3s ease;
            text-align: center;
        }
        .landing-module::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--primary-color), var(--teal-green));
            opacity: .85;
        }
        .landing-module.clickable { cursor: pointer; }
        .landing-module.clickable:hover {
            transform: translateY(-4px);
            box-shadow: var(--card-shadow-hover);
            border-color: color-mix(in srgb, var(--teal-green) 35%, var(--card-border));
        }
        .landing-module.coming-soon {
            cursor: not-allowed;
            opacity: 0.68;
            filter: grayscale(30%);
        }

        .landing-module-icon {
            width: 86px;
            height: 86px;
            border-radius: 20px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
            background: linear-gradient(135deg, var(--primary-color), #003a8a);
            box-shadow: 0 8px 24px rgba(0,32,96,.18);
        }
        .landing-module.coming-soon .landing-module-icon {
            background: linear-gradient(135deg, #94a3b8, #64748b);
            box-shadow: none;
        }
        .landing-module-icon i {
            font-size: 2.6rem;
            color: white;
        }

        .landing-module h2 {
            color: var(--text-strong);
            font-size: 1.45rem;
            font-weight: 800;
            margin-bottom: 10px;
            letter-spacing: -0.2px;
        }
        .landing-module.coming-soon h2 { color: #64748b; }

        .landing-module p {
            color: var(--text-muted);
            font-size: .95rem;
            margin-bottom: 20px;
            line-height: 1.7;
        }

        .landing-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 7px 18px;
            border-radius: 9999px;
            font-size: .82rem;
            font-weight: 700;
        }
        .landing-badge.available {
            background: rgba(3,168,139,.12);
            color: var(--teal-green);
        }
        .landing-badge.soon {
            background: #f3f4f6;
            color: #6b7280;
        }

        .landing-footer {
            margin-top: 48px;
            color: var(--text-soft);
            font-size: .86rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        .landing-footer i { color: var(--teal-green); }

        /* Dashboard page adjustments */
        #dashboardPage {
            min-height: 100vh;
            background: var(--light-bg);
        }

        /* ===== MAP PAGE STYLES ===== */
        #mapPage {
            min-height: 100vh;
            background: var(--light-bg);
        }

        #mapContainer {
            height: calc(100vh - 40px);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 2px 12px rgba(0,32,96,.07);
        }

        .map-sidebar {
            background: white;
            border-radius: 12px;
            padding: 15px;
            box-shadow: 0 2px 12px rgba(0,32,96,.07);
            height: calc(100vh - 40px);
            overflow-y: auto;
        }

        .zone-item {
            padding: 10px 12px;
            border-radius: 8px;
            margin-bottom: 6px;
            cursor: pointer;
            transition: all 0.2s ease;
            border-right: 4px solid transparent;
        }

        .zone-item:hover {
            background: rgba(0,32,96,.04);
        }

        .zone-item .zone-name {
            font-weight: 600;
            font-size: 0.85rem;
        }

        .zone-item .zone-neighborhood {
            font-size: 0.78rem;
            color: #8C9BB5;
        }

        .zone-item .zone-count {
            font-size: 1.1rem;
            font-weight: bold;
        }

        .map-upload-zone {
            border: 2px dashed rgba(0,32,96,.15);
            border-radius: 12px;
            padding: 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-bottom: 15px;
        }

        .map-upload-zone:hover {
            border-color: var(--secondary-color);
            background: rgba(0,112,192,.06);
        }

        .map-upload-zone.loaded {
            border-color: #03A88B;
            background: rgba(112,173,71,.08);
        }

        .map-stats-bar {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
        }

        .map-stat {
            background: white;
            border-radius: 12px;
            padding: 10px 18px;
            box-shadow: 0 2px 12px rgba(0,32,96,.07);
            text-align: center;
        }

        .map-stat-value {
            font-size: 1.3rem;
            font-weight: bold;
        }

        .map-stat-label {
            font-size: 0.78rem;
            color: #8C9BB5;
        }

        .map-legend {
            position: absolute;
            bottom: 20px;
            left: 20px;
            z-index: 1000;
            background: white;
            border-radius: 12px;
            padding: 12px;
            box-shadow: 0 2px 12px rgba(0,32,96,.10);
            font-size: 0.82rem;
        }

        .map-legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 4px;
        }

        .map-legend-color {
            width: 14px;
            height: 14px;
            border-radius: 50%;
        }

        /* Zone Detail Breakdown */
        .zone-detail-panel {
            background: white;
            border-radius: 12px;
            padding: 15px 20px;
            box-shadow: 0 2px 12px rgba(0,32,96,.07);
            margin-bottom: 15px;
            position: relative;
            animation: slideDown 0.3s ease;
        }

        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-15px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .zone-detail-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            padding-bottom: 10px;
            border-bottom: 2px solid #f0f0f0;
        }

        .zone-detail-title {
            font-weight: bold;
            font-size: 1.05rem;
            color: var(--primary-color);
        }

        .zone-detail-close {
            background: none;
            border: none;
            font-size: 1.3rem;
            color: #6c757d;
            cursor: pointer;
            padding: 2px 8px;
            border-radius: 8px;
            transition: all 0.2s ease;
        }

        .zone-detail-close:hover {
            background: #f0f0f0;
            color: #ED7D31;
        }

        .zone-detail-section-title {
            font-weight: 600;
            font-size: 0.88rem;
            color: #6c757d;
            margin-bottom: 8px;
            margin-top: 10px;
        }

        .zone-detail-cards {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .zone-detail-card {
            background: #F4F6FA;
            border-radius: 10px;
            padding: 10px 14px;
            min-width: 120px;
            border-right: 4px solid #0070C0;
            transition: transform 0.2s ease;
        }

        .zone-detail-card:hover {
            transform: translateY(-2px);
        }

        .zone-detail-card-value {
            font-size: 1.3rem;
            font-weight: bold;
            color: var(--primary-color);
        }

        .zone-detail-card-label {
            font-size: 0.78rem;
            color: #6c757d;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 180px;
        }

        /* Team Performance Page */
        #teamPage {
            min-height: 100vh;
            background: var(--light-bg);
        }

        .team-card {
            background: white;
            border-radius: 12px;
            box-shadow: 0 2px 12px rgba(0,32,96,.07);
            margin-bottom: 20px;
            overflow: hidden;
        }

        .team-card-header {
            padding: 15px 20px;
            color: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
        }

        .team-card-header h5 {
            margin: 0;
            font-size: 1rem;
        }

        .team-card-body {
            padding: 20px;
        }

        .team-metric {
            background: #F4F6FA;
            border-radius: 10px;
            padding: 12px 15px;
            text-align: center;
            border-top: 3px solid #0070C0;
        }

        .team-metric-value {
            font-size: 1.4rem;
            font-weight: bold;
            color: var(--primary-color);
        }

        .team-metric-label {
            font-size: 0.75rem;
            color: #6c757d;
            margin-top: 2px;
        }

        .team-response-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 6px 10px;
            border-radius: 8px;
            margin-bottom: 4px;
            background: #F4F6FA;
            font-size: 0.85rem;
        }

        .team-response-count {
            font-weight: bold;
            min-width: 30px;
            text-align: center;
            border-radius: 6px;
            padding: 2px 8px;
            color: white;
        }

        .team-effectiveness {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .team-effectiveness-bar {
            flex: 1;
            height: 10px;
            background: #e9ecef;
            border-radius: 5px;
            overflow: hidden;
        }

        .team-effectiveness-fill {
            height: 100%;
            border-radius: 5px;
            transition: width 0.5s ease;
        }

        .team-summary-stats {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
            margin-bottom: 20px;
        }

        .team-summary-stat {
            background: white;
            border-radius: 12px;
            padding: 15px 22px;
            box-shadow: 0 2px 12px rgba(0,32,96,.07);
            text-align: center;
            flex: 1;
            min-width: 140px;
        }

        .team-summary-stat .value {
            font-size: 1.6rem;
            font-weight: bold;
        }

        .team-summary-stat .label {
            font-size: 0.8rem;
            color: #6c757d;
        }

        .team-sort-bar {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 15px;
        }

        .team-sort-btn {
            border: 1.5px solid #002060;
            background: white;
            border-radius: 8px;
            padding: 6px 14px;
            font-size: 0.82rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .team-sort-btn:hover, .team-sort-btn.active {
            background: #002060;
            color: white;
            border-color: #002060;
        }

        /* ===== COMPLAINT PDF REPORT STYLES ===== */
        .complaint-report-overlay {
            position: fixed; inset: 0; z-index: 9999;
            background: #e8eaed; overflow-y: auto;
            display: flex; flex-direction: column; align-items: center;
        }
        .complaint-report-toolbar {
            position: sticky; top: 0; z-index: 10;
            width: 100%; background: #002060;
            display: flex; justify-content: center; align-items: center; gap: 12px;
            padding: 10px 20px; box-shadow: 0 2px 12px rgba(0,0,0,.25);
        }
        .complaint-report-toolbar button {
            padding: 8px 28px; border: none; border-radius: 6px;
            font-family: 'Cairo', sans-serif; font-size: 14px; font-weight: 600;
            cursor: pointer; transition: all .2s;
        }
        .complaint-report-toolbar .btn-print-pdf {
            background: #03A88B; color: #fff;
        }
        .complaint-report-toolbar .btn-print-pdf:hover { background: #028a72; }
        .complaint-report-toolbar .btn-close-report {
            background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.3);
        }
        .complaint-report-toolbar .btn-close-report:hover { background: rgba(255,255,255,.25); }

        #complaintReportView {
            display: flex; flex-direction: column; align-items: center;
            padding: 24px 0 60px;
        }

        #complaintReportView .cr-page {
            width: 210mm; height: 297mm;
            background: white; position: relative; overflow: hidden;
            margin-bottom: 16px; box-shadow: 0 2px 20px rgba(0,0,0,.15);
            flex-shrink: 0; font-family: 'Cairo', 'IBM Plex Sans Arabic', sans-serif;
            page-break-after: always; break-after: page;
        }
        #complaintReportView .cr-page-inner {
            width: 100%; height: 100%; padding: 14mm 18mm 24mm; position: relative;
            box-sizing: border-box; overflow: hidden;
        }

        /* Cover Page */
        #complaintReportView .cr-cover {
            background: linear-gradient(160deg, #001029 0%, #002060 45%, #003a75 100%);
            color: white; display: flex; align-items: center; justify-content: center;
            height: 297mm; overflow: hidden;
        }
        #complaintReportView .cr-cover-dots { position: absolute; top: 0; right: 0; width: 55%; height: 100%; pointer-events: none; z-index: 1; }
        #complaintReportView .cr-cover-dots circle { fill: rgba(3,168,139,.15); }
        #complaintReportView .cr-cover-inner { position: relative; z-index: 2; text-align: center; }
        #complaintReportView .cr-cover-logo { height: 200px; margin-bottom: 24px; filter: drop-shadow(0 4px 16px rgba(0,0,0,.3)); }
        #complaintReportView .cr-cover-divider { width: 80px; height: 3px; background: #03A88B; margin: 0 auto 28px; border-radius: 2px; }
        #complaintReportView .cr-cover h1 { font-size: 26pt; font-weight: 800; margin-bottom: 8px; line-height: 1.3; }
        #complaintReportView .cr-cover .cr-cover-caseid { font-size: 18pt; font-weight: 600; color: #03A88B; margin-bottom: 32px; direction: ltr; }
        #complaintReportView .cr-cover-meta {
            display: grid; grid-template-columns: 1fr 1fr;
            gap: 12px; margin-top: 12px; width: 100%; max-width: 480px; margin-left: auto; margin-right: auto;
        }
        #complaintReportView .cr-cover-meta .meta-item {
            background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
            border-radius: 8px; padding: 10px 14px; text-align: center;
        }
        #complaintReportView .cr-cover-meta .meta-item.meta-full { grid-column: 1 / -1; }
        #complaintReportView .cr-cover-meta .meta-label { font-size: 9pt; opacity: .6; margin-bottom: 4px; }
        #complaintReportView .cr-cover-meta .meta-val { font-size: 12pt; font-weight: 700; line-height: 1.4; }
        #complaintReportView .cr-cover-confidential {
            position: absolute; top: 18px; right: 18px; z-index: 10;
            background: #c00; color: #fff; font-size: 10pt; font-weight: 700;
            padding: 4px 18px; border-radius: 4px; letter-spacing: .5px;
        }
        #complaintReportView .cr-cover-accent { position: absolute; bottom: 0; left: 0; width: 100%; height: 5px; background: linear-gradient(90deg, #03A88B, #0070C0, #03A88B); }

        /* Page Header */
        #complaintReportView .cr-page-header {
            display: flex; justify-content: space-between; align-items: center; margin-bottom: 8mm;
        }
        #complaintReportView .cr-page-header h2 {
            font-size: 18pt; font-weight: 700; color: #03A88B; line-height: 1.3; margin: 0;
        }
        #complaintReportView .cr-title-bar { width: 50px; height: 3px; background: #03A88B; border-radius: 2px; margin-top: 4px; }
        #complaintReportView .cr-page-logo { height: 52px; }

        /* Page Footer */
        #complaintReportView .cr-page-footer {
            position: absolute; bottom: 8mm; left: 18mm; right: 18mm;
            display: flex; justify-content: space-between; align-items: center;
            font-size: 9pt; color: #6b7f92; border-top: 1px solid #dfe3e8; padding-top: 3mm;
        }
        #complaintReportView .cr-page-footer .cr-page-num { font-weight: 600; }

        /* Sections */
        #complaintReportView .cr-section { margin-bottom: 6mm; }
        #complaintReportView .cr-section-title {
            font-size: 12pt; font-weight: 700; color: #002060;
            padding: 5px 12px; margin-bottom: 4mm; border-right: 4px solid #03A88B;
            background: rgba(3,168,139,.06); border-radius: 0 6px 6px 0;
        }
        #complaintReportView .cr-fields {
            display: grid; grid-template-columns: 1fr 1fr; gap: 2mm 6mm;
        }
        #complaintReportView .cr-field {
            display: flex; gap: 6px; padding: 4px 8px; border-bottom: 1px solid #f0f0f0;
            font-size: 9.5pt; line-height: 1.6;
        }
        #complaintReportView .cr-field-label {
            color: #6b7f92; white-space: nowrap; min-width: 100px; font-weight: 600;
        }
        #complaintReportView .cr-field-value { color: #1a2a3a; font-weight: 500; word-break: break-word; }
        #complaintReportView .cr-field-value:empty::after { content: '—'; color: #ccc; }

        /* Closing Page */
        #complaintReportView .cr-closing {
            background: linear-gradient(160deg, #001029 0%, #002060 45%, #003a75 100%);
            color: white; display: flex; align-items: center; justify-content: center;
            height: 297mm; overflow: hidden;
        }
        #complaintReportView .cr-closing-inner { position: relative; z-index: 2; text-align: center; }
        #complaintReportView .cr-closing-logo { height: 140px; margin-bottom: 20px; filter: drop-shadow(0 4px 16px rgba(0,0,0,.3)); }
        #complaintReportView .cr-closing-divider { width: 60px; height: 3px; background: #03A88B; margin: 0 auto 20px; border-radius: 2px; }
        #complaintReportView .cr-closing-thank { font-size: 28pt; font-weight: 800; margin-bottom: 4px; }
        #complaintReportView .cr-closing-thank-en { font-size: 16pt; font-weight: 400; opacity: .7; margin-bottom: 16px; }
        #complaintReportView .cr-closing-dept { font-size: 11pt; opacity: .6; line-height: 1.7; }
        #complaintReportView .cr-closing-accent { position: absolute; bottom: 0; left: 0; width: 100%; height: 5px; background: linear-gradient(90deg, #03A88B, #0070C0, #03A88B); }
        #complaintReportView .cr-closing-dots { position: absolute; top: 0; left: 0; width: 55%; height: 100%; pointer-events: none; z-index: 1; }
        #complaintReportView .cr-closing-dots circle { fill: rgba(3,168,139,.15); }

        /* ===== MANAGEMENT REPORT STYLES (Landscape A4) ===== */
        .mgmt-report-overlay {
            position: fixed; inset: 0; z-index: 9999;
            background: #e8eaed; overflow-y: auto;
            display: flex; flex-direction: column; align-items: center;
        }
        .mgmt-report-toolbar {
            position: sticky; top: 0; z-index: 10;
            width: 100%; background: #002060;
            display: flex; justify-content: center; align-items: center; gap: 12px;
            padding: 10px 20px; box-shadow: 0 2px 12px rgba(0,0,0,.25);
        }
        .mgmt-report-toolbar button {
            padding: 8px 28px; border: none; border-radius: 6px;
            font-family: 'Cairo', sans-serif; font-size: 14px; font-weight: 600;
            cursor: pointer; transition: all .2s;
        }
        .mgmt-report-toolbar .btn-print-pdf { background: #03A88B; color: #fff; }
        .mgmt-report-toolbar .btn-print-pdf:hover { background: #028a72; }
        .mgmt-report-toolbar .btn-close-report { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.3); }
        .mgmt-report-toolbar .btn-close-report:hover { background: rgba(255,255,255,.25); }

        .report-view { display: flex; flex-direction: column; align-items: center; padding: 24px 0 60px; }

        .report-view .mr-page {
            width: 297mm; height: 210mm;
            background: white; position: relative; overflow: hidden;
            margin-bottom: 16px; box-shadow: 0 2px 20px rgba(0,0,0,.15);
            flex-shrink: 0; font-family: 'Cairo', 'IBM Plex Sans Arabic', sans-serif;
        }
        .report-view .mr-page-inner {
            width: 100%; height: 100%; padding: 12mm 16mm 20mm; position: relative; box-sizing: border-box; overflow: hidden;
        }

        /* Cover */
        .report-view .mr-cover {
            background: linear-gradient(160deg, #001029 0%, #002060 45%, #003a75 100%);
            color: white; display: flex; align-items: center; justify-content: center; height: 210mm;
        }
        .report-view .mr-cover-dots { position: absolute; top: 0; right: 0; width: 55%; height: 100%; pointer-events: none; z-index: 1; }
        .report-view .mr-cover-dots circle { fill: rgba(3,168,139,.15); }
        .report-view .mr-cover-inner { position: relative; z-index: 2; text-align: center; }
        .report-view .mr-cover-logo { height: 210px; margin-bottom: 28px; filter: drop-shadow(0 4px 16px rgba(0,0,0,.3)); }
        .report-view .mr-cover-divider { width: 100px; height: 4px; background: #03A88B; margin: 0 auto 32px; border-radius: 2px; }
        .report-view .mr-cover h1 { font-size: 34pt; font-weight: 800; margin-bottom: 10px; line-height: 1.3; }
        .report-view .mr-cover .mr-cover-sub { font-size: 20pt; opacity: .7; margin-bottom: 12px; letter-spacing: 0.5px; }
        .report-view .mr-cover-meta { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; max-width: 600px; margin: 0 auto; }
        .report-view .mr-cover-meta .meta-item { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 16px 18px; text-align: center; }
        .report-view .mr-cover-meta .meta-label { font-size: 12pt; opacity: .6; margin-bottom: 5px; }
        .report-view .mr-cover-meta .meta-val { font-size: 18pt; font-weight: 700; }
        .report-view .mr-cover-accent { position: absolute; bottom: 0; left: 0; width: 100%; height: 5px; background: linear-gradient(90deg, #03A88B, #0070C0, #03A88B); }

        /* Page header/footer */
        .report-view .mr-page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5mm; }
        .report-view .mr-page-header h2 { font-size: 18pt; font-weight: 700; color: #03A88B; margin: 0; }
        .report-view .mr-title-bar { width: 50px; height: 3px; background: #03A88B; border-radius: 2px; margin-top: 3px; }
        .report-view .mr-page-logo { height: 44px; }
        .report-view .mr-page-footer {
            position: absolute; bottom: 6mm; left: 16mm; right: 16mm;
            display: flex; justify-content: space-between; align-items: center;
            font-size: 9pt; color: #6b7f92; border-top: 1px solid #dfe3e8; padding-top: 2mm;
        }
        .report-view .mr-page-footer .mr-page-num { font-weight: 600; }

        /* KPI cards */
        .report-view .mr-kpi-row { display: grid; gap: 4mm; margin-bottom: 5mm; }
        .report-view .mr-kpi-row.cols-5 { grid-template-columns: repeat(5, 1fr); }
        .report-view .mr-kpi-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
        .report-view .mr-kpi-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
        .report-view .mr-kpi {
            background: linear-gradient(135deg, #f8f9fb 0%, #f0f2f6 100%); border-radius: 10px;
            padding: 5mm 4mm; text-align: center;
            border: 1px solid #e4e8ee; box-shadow: 0 1px 4px rgba(0,32,96,.04);
        }
        .report-view .mr-kpi-val { font-size: 20pt; font-weight: 800; color: #002060; line-height: 1.2; }
        .report-view .mr-kpi-label { font-size: 9.5pt; color: #6b7f92; margin-top: 3px; }

        /* Report tables */
        .report-view .mr-table {
            width: 100%; border-collapse: separate; border-spacing: 0;
            font-size: 11pt; border-radius: 10px; overflow: hidden; border: 1px solid #e4e8ee;
        }
        .report-view .mr-table th {
            background: #002060; color: #fff; padding: 10px 14px;
            font-weight: 600; text-align: center; font-size: 11pt;
            border-left: 1px solid rgba(255,255,255,.12);
        }
        .report-view .mr-table th:first-child { text-align: right; border-left: none; }
        .report-view .mr-table td {
            padding: 9px 14px; text-align: center; border-bottom: 1px solid #eef1f6;
            border-left: 1px solid #eef1f6;
        }
        .report-view .mr-table td:first-child { text-align: right; font-weight: 600; color: #002060; border-left: none; }
        .report-view .mr-table tr:last-child td { border-bottom: none; }
        .report-view .mr-table .mr-rank-1 { background: rgba(112,173,71,.1); }
        .report-view .mr-table .mr-rank-last { background: rgba(237,125,49,.08); }

        /* SLA pill */
        .report-view .mr-sla-pill {
            display: inline-block; padding: 4px 16px; border-radius: 8px;
            font-weight: 700; font-size: 12pt; min-width: 56px; text-align: center;
        }

        /* Section divider */
        .report-view .mr-section-title {
            font-size: 13pt; font-weight: 700; color: #002060;
            padding: 6px 14px; margin-bottom: 4mm; border-right: 4px solid #03A88B;
            background: rgba(3,168,139,.05); border-radius: 0 6px 6px 0;
        }

        /* Two-column layout */
        .report-view .mr-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; }

        /* City card grid */
        .report-view .mr-city-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; }
        .report-view .mr-city-card {
            border: 1px solid #e4e8ee; border-radius: 10px; padding: 4mm 5mm; background: #fafbfc;
        }
        .report-view .mr-city-name { font-size: 13pt; font-weight: 700; color: #002060; margin-bottom: 2mm; }
        .report-view .mr-city-stat {
            display: flex; justify-content: space-between; align-items: center;
            padding: 6px 12px; font-size: 11pt; border-bottom: 1px solid #f0f0f0;
            background: #fafbfc; border-radius: 6px; margin-bottom: 2px;
        }
        .report-view .mr-city-stat:last-child { border-bottom: none; }
        .report-view .mr-city-stat .stat-label { color: #6b7f92; font-size: 10.5pt; }
        .report-view .mr-city-stat .stat-val { font-weight: 700; color: #002060; }

        /* Mini bar for report */
        .report-view .mr-bar-row { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; font-size: 9.5pt; }
        .report-view .mr-bar-label { width: 140px; min-width: 140px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #3d5166; }
        .report-view .mr-bar-track { flex: 1; height: 16px; background: #eef1f6; border-radius: 4px; overflow: hidden; }
        .report-view .mr-bar-fill { height: 100%; border-radius: 4px; min-width: 2px; }
        .report-view .mr-bar-val { width: 50px; min-width: 50px; text-align: center; font-weight: 700; color: #002060; font-size: 10pt; }

        /* Closing */
        .report-view .mr-closing {
            background: linear-gradient(160deg, #001029 0%, #002060 45%, #003a75 100%);
            color: white; display: flex; align-items: center; justify-content: center; height: 210mm;
        }
        .report-view .mr-closing-dots { position: absolute; top: 0; left: 0; width: 55%; height: 100%; pointer-events: none; z-index: 1; }
        .report-view .mr-closing-dots circle { fill: rgba(3,168,139,.15); }
        .report-view .mr-closing-inner { position: relative; z-index: 2; text-align: center; }
        .report-view .mr-closing-logo { height: 120px; margin-bottom: 16px; filter: drop-shadow(0 4px 16px rgba(0,0,0,.3)); }
        .report-view .mr-closing-divider { width: 60px; height: 3px; background: #03A88B; margin: 0 auto 16px; border-radius: 2px; }
        .report-view .mr-closing-accent { position: absolute; bottom: 0; left: 0; width: 100%; height: 5px; background: linear-gradient(90deg, #03A88B, #0070C0, #03A88B); }

        /* Action button in table */
        .merged-pdf-btn {
            background: #002060; color: #fff; border: none; border-radius: 5px;
            padding: 3px 10px; font-size: 0.72rem; cursor: pointer;
            display: inline-flex; align-items: center; gap: 4px;
            transition: all .15s; white-space: nowrap;
        }
        .merged-pdf-btn:hover { background: #03A88B; transform: scale(1.05); }
        .merged-pdf-btn i { font-size: 0.8rem; }

        /* File validation error modal */
        .file-error-modal {
            position: fixed; inset: 0; z-index: 99999;
            background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
            display: flex; align-items: center; justify-content: center;
        }
        .file-error-card {
            background: #fff; border-radius: 16px; width: 90%; max-width: 480px;
            box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden;
            font-family: 'Cairo', sans-serif; animation: fileErrorIn .25s ease-out;
        }
        @keyframes fileErrorIn { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
        .file-error-header {
            background: linear-gradient(135deg, #b91c1c, #991b1b); color: #fff;
            padding: 18px 24px; font-size: 16px; font-weight: 700;
            display: flex; align-items: center; gap: 10px;
        }
        .file-error-header i { font-size: 22px; }
        .file-error-body {
            padding: 20px 24px; font-size: 13px; color: #334155;
            max-height: 300px; overflow-y: auto; line-height: 1.7;
        }
        .file-error-btn {
            display: block; width: calc(100% - 48px); margin: 0 24px 20px;
            padding: 10px; background: #002060; color: #fff; border: none;
            border-radius: 8px; font-family: 'Cairo', sans-serif; font-size: 14px;
            font-weight: 600; cursor: pointer; transition: background .2s;
        }
        .file-error-btn:hover { background: #0070C0; }

        /* Print styles — portrait (complaint report) */
        @media print {
            html, body { margin: 0 !important; padding: 0 !important; height: auto !important; overflow: visible !important; background: white !important; }
            body > *:not(.complaint-report-overlay):not(.mgmt-report-overlay) { display: none !important; }
            .complaint-report-toolbar, .mgmt-report-toolbar { display: none !important; }

            /* Complaint report (portrait) */
            body.print-portrait { }
            body.print-portrait .mgmt-report-overlay { display: none !important; }
            @page { size: 210mm 297mm; margin: 0 !important; }
            .complaint-report-overlay {
                position: static !important; background: white !important; overflow: visible !important;
                display: block !important; width: 210mm !important; padding: 0 !important; margin: 0 !important;
            }
            #complaintReportView { padding: 0 !important; margin: 0 !important; display: block !important; width: 210mm !important; }
            #complaintReportView .cr-page {
                width: 210mm !important; height: 297mm !important;
                margin: 0 !important; padding: 0 !important; box-shadow: none !important;
                page-break-after: always; break-after: page;
                page-break-inside: avoid; break-inside: avoid;
                -webkit-print-color-adjust: exact; print-color-adjust: exact; color-adjust: exact;
                overflow: hidden !important;
            }
            #complaintReportView .cr-page:last-child { page-break-after: auto; break-after: auto; }
            #complaintReportView .cr-page-inner { height: 297mm !important; overflow: hidden !important; }
            #complaintReportView .cr-cover, #complaintReportView .cr-closing { height: 297mm !important; }
            #complaintReportView .cr-section { page-break-inside: avoid; break-inside: avoid; }

            /* Management report (landscape) */
            body.print-landscape .complaint-report-overlay { display: none !important; }
            body.print-landscape .mgmt-report-overlay {
                position: static !important; background: white !important; overflow: visible !important;
                display: block !important; width: 297mm !important; padding: 0 !important; margin: 0 !important;
            }
            body.print-landscape #mgmtReportView { padding: 0 !important; margin: 0 !important; display: block !important; width: 297mm !important; }
            body.print-landscape #mgmtReportView .mr-page {
                width: 297mm !important; height: 210mm !important;
                margin: 0 !important; box-shadow: none !important;
                page-break-after: always; break-after: page;
                -webkit-print-color-adjust: exact; print-color-adjust: exact; color-adjust: exact;
                overflow: hidden !important;
            }
            body.print-landscape #mgmtReportView .mr-page:last-child { page-break-after: auto; break-after: auto; }

            /* Transfer report (landscape) — reuses mr-page classes */
            body.print-landscape #transferReportOverlay {
                position: static !important; background: white !important; overflow: visible !important;
                display: block !important; width: 297mm !important; padding: 0 !important; margin: 0 !important;
            }
            body.print-landscape #transferReportView { padding: 0 !important; margin: 0 !important; display: block !important; width: 297mm !important; }
            body.print-landscape #transferReportView .mr-page {
                width: 297mm !important; height: 210mm !important;
                margin: 0 !important; box-shadow: none !important;
                page-break-after: always; break-after: page;
                -webkit-print-color-adjust: exact; print-color-adjust: exact; color-adjust: exact;
                overflow: hidden !important;
            }
            body.print-landscape #transferReportView .mr-page:last-child { page-break-after: auto; break-after: auto; }

            /* Rejected report (landscape) — reuses mr-page classes */
            body.print-landscape #rejectedReportOverlay {
                position: static !important; background: white !important; overflow: visible !important;
                display: block !important; width: 297mm !important; padding: 0 !important; margin: 0 !important;
            }
            body.print-landscape #rejectedReportView { padding: 0 !important; margin: 0 !important; display: block !important; width: 297mm !important; }
            body.print-landscape #rejectedReportView .mr-page {
                width: 297mm !important; height: 210mm !important;
                margin: 0 !important; box-shadow: none !important;
                page-break-after: always; break-after: page;
                -webkit-print-color-adjust: exact; print-color-adjust: exact; color-adjust: exact;
                overflow: hidden !important;
            }
            body.print-landscape #rejectedReportView .mr-page:last-child { page-break-after: auto; break-after: auto; }

            /* Repeated report (landscape) — reuses mr-page classes */
            body.print-landscape #repeatedReportOverlay {
                position: static !important; background: white !important; overflow: visible !important;
                display: block !important; width: 297mm !important; padding: 0 !important; margin: 0 !important;
            }
            body.print-landscape #repeatedReportView { padding: 0 !important; margin: 0 !important; display: block !important; width: 297mm !important; }
            body.print-landscape #repeatedReportView .mr-page {
                width: 297mm !important; height: 210mm !important;
                margin: 0 !important; box-shadow: none !important;
                page-break-after: always; break-after: page;
                -webkit-print-color-adjust: exact; print-color-adjust: exact; color-adjust: exact;
                overflow: hidden !important;
            }
            body.print-landscape #repeatedReportView .mr-page:last-child { page-break-after: auto; break-after: auto; }
        }
        /* Landscape @page override — applied when body has .print-landscape */
        body.print-landscape { }
        @media print { body.print-landscape ~ * { } }

