﻿/* =========================================================
   GLOBAL BASE UI
   ========================================================= */
.investment-filter-card {
    position: relative;
    z-index: 3000;
}

    .investment-filter-card .dropdown-menu.show {
        z-index: 4000;
    }
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    white-space: nowrap;
}

th, td {
    padding: 4px 6px !important;
    font-size: 0.75rem;
}

input:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 2px #a7c9ff;
}

/* =========================================================
   SMART TABLE WRAPPER
   ========================================================= */
.smart-table-wrapper {
    overflow: auto;
    max-height: 650px;
    border: 1px solid #dcdcdc;
    opacity: 0;
    transition: opacity .4s ease-in-out;
}
.smart-table-wrapper {
    opacity: 1;
}
    .smart-table {
        width: 100%;
    }

        /* =========================================================
   STICKY HEADER
   ========================================================= */
        .smart-table thead th {
            position: sticky;
            top: 0;
            background-color: #eef2f4 !important;
            font-weight: 600;
            border-bottom: 2px solid #ccc;
            z-index: 800;
        }
        /* =========================================================
   STICKY FIRST 4 COLUMNS (Delete + Tower + Project + Job ID)
   ========================================================= */

        /* Applies to all dynamically sticky cells */
        .smart-table th,
        .smart-table td {
            transition: left .15s ease;
        }

            .smart-table td.sticky,
            .smart-table th.sticky {
                position: sticky;
                background: #ffffff !important;
                box-shadow: inset -1px 0 #ccc;
                z-index: calc(1000 - var(--sticky-index));
            }

        /* Ensure header stays above values */
        .smart-table thead th.sticky {
            z-index: 1000 !important;
        }

                /* Prevent flicker during scroll */
        .smart-table th.sticky,
        .smart-table td.sticky {
            background: #ffffff !important;
            backdrop-filter: blur(0px);
            will-change: transform;
        }
        /* Prevent background leaking through gaps between sticky and non-sticky cells */
        .smart-table th.sticky,
        .smart-table td.sticky {
            box-shadow: inset -1px 0 0 #ccc;
        }
       


        .smart-table td[data-type="date"],
        .smart-table th[data-type="date"] {
            width: 120px !important; /* Adjust as needed */
            min-width: 120px !important;
            max-width: 120px !important;
            box-sizing: border-box;
            overflow: hidden;
        }
        .smart-table td {
            transition: none !important;
        }

        .row-editing td{
            background-color: #fff6cc !important;
        }
        /* =========================================================
   EDITABLE + READONLY CELL UX
   ========================================================= */
        /* Cell background when editable (even before click) */
        .smart-table td.editable {
            background-color: #f9fff3 !important;
            cursor: pointer;
            transition: background-color 0.15s ease;
        }

            .smart-table td.editable:hover {
                background-color: #eefed9 !important;
            }
            /* Highlight editable text */
            .smart-table td.editable span {
                border-bottom: 1px dashed #7ea36d;
                cursor: pointer;
                font-weight: 500;
            }
        /* Current editing mode */
        .smart-table .editing-box input,
        .smart-table .editing-box select {
            background-color: #e8ffdb !important;
            border: 1px solid #6cb34c !important;
        }
        /* Standard input styling */
        .smart-table input,
        .smart-table select {
            background-color: #f6fff1 !important;
            border: 1px solid #c4d9a4;
            padding: 2px 4px !important;
            height: 22px;
            font-size: 0.75rem !important;
        }
        /* Readonly cells remain neutral */
        .smart-table td.readonly {
            background-color: #ffffff;
            cursor: default;
        }
        /* Hover highlight on editable cells */
.smart-table td.editable:hover::after {
    content: " 🖊";
    font-size: 10px;
    opacity: 0.5;
    padding-left: 3px;
}
        /* =========================================================
   ROW HOVER
   ========================================================= */
        .smart-table tbody tr:hover td {
            background-color: #f8fbff;
        }
    /* =========================================================
   DELETE COLUMN
   ========================================================= */

    .delete-col,
    .delete-header {
        width: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        text-align: center;
        background: #f8f8f8;
    }

    .delete-btn {
        background: transparent;
        border: none;
        cursor: pointer;
        color: #cc0000;
        font-size: 14px;
        padding: 4px;
        transition: 0.2s;
    }

        .delete-btn:hover {
            color: #ff0000;
            transform: scale(1.2);
        }
/* =========================================================
   EDIT COLUMN
   ========================================================= */

/* Edit column sticks right after delete column */
.edit-col,
.edit-header {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    text-align: center;
    background: #ffffff;
}

.edit-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #3c62ff;
    font-size: 13px; /* same as delete size visually */
    padding: 2px;
    transition: 0.2s;
}

    .edit-btn:hover {
        color: #1a32ff;
        transform: scale(1.15);
    }
.dropdown-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040; /* less than the dropdown-menu z-index */
    background: transparent;
}

/* =========================================================
   Subtotal and Grouping
   ========================================================= */

.subtotal-row {
    background-color: #e6f2ff; /* light blue */
    font-weight: 600;
}

.group-header-tower {
    background-color: #f5f5f5;
    font-weight: 700;
    cursor: zoom-in;
}

.group-header-job {
    background-color: #fafafa;
    font-weight: 600;
    cursor: zoom-in;
}
/* Light blue background + bold text for all subtotal rows */
.smart-table tr.subtotal-row {
    background-color: #e8f4ff !important; /* light blue */
    font-weight: 600;
}
/* Tiny, unobtrusive collapse/expand buttons */
.smart-table .collapse-toggle {
    border: none;
    background: transparent;
    padding: 0 4px;
    margin: 0;
    cursor: pointer;
    font-size: 0.75rem;
    line-height: 1;
    vertical-align: middle;
}

    /* Optional: keep icon width stable so text doesn’t jump */
    .smart-table .collapse-toggle span,
    .smart-table .collapse-toggle {
        display: inline-block;
        width: 1rem;
        text-align: center;
    }

/* Row highlight (you already use __RowHighlight="row-highlight") */
.row-highlight {
    outline: 2px solid rgba(255, 193, 7, 0.8);
    outline-offset: -2px;
    background: #fff3cd;
}
    /* light warning */
    .cell-invalid {
        outline: 2px solid #dc3545;
        outline-offset: -2px;
    }
}

/* Cell highlight for validation errors */
.cell-invalid {
    box-shadow: inset 0 0 0 2px rgba(220, 53, 69, 0.9);
    background: rgba(220, 53, 69, 0.06);
}

/* Context menu container */
.smart-lookup-menu,
.lookup-menu,
.list-group.shadow {
    background: #fff; /* solid */
}

    /* Each item */
    .smart-lookup-menu .list-group-item,
    .lookup-menu .list-group-item,
    .list-group.shadow .list-group-item {
        background: #fff !important;
        color: inherit;
        white-space: normal; /* allow wrap */
    }

        /* Hover */
        .smart-lookup-menu .list-group-item:hover,
        .lookup-menu .list-group-item:hover,
        .list-group.shadow .list-group-item:hover {
            background: #f3f4f6 !important;
        }
    .list-group.shadow .list-group-item {
        white-space: nowrap !important;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/*burndashboard trend*/
.trend-shell {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 8px;
    align-items: start;
}

.trend-center {
    min-width: 0;
}

.trend-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding-top: 8px;
}

.trend-chart {
    position: relative;
    min-height: 310px;
}

.trend-col-abs {
    position: absolute;
    top: 0;
    z-index: 2;
}

.trend-plot {
    position: relative;
    height: 220px;
    border-bottom: 1px solid #adb5bd;
    z-index: 2;
    overflow: visible;
}

.trend-grid-line {
    position: absolute;
    left: 0;
    height: 1px;
    background: #e9ecef;
    z-index: 1;
}

.trend-bar {
    position: relative;
    width: 42px;
    border-radius: 6px 6px 0 0;
    background: #6c757d;
}

.trend-bar-wrap {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 42px;
    display: flex;
    justify-content: center;
    align-items: end;
    height: 100%;
    z-index: 2;
}

.trend-bar-value {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: #495057;
    white-space: nowrap;
    font-weight: 600;
    background: #fff;
    padding: 0 4px;
    border-radius: 4px;
    line-height: 1.1;
}

.trend-line-svg {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 4;
    overflow: visible;
    pointer-events: none;
}

.trend-line-path {
    stroke: #0d6efd;
    stroke-width: 3;
    fill: none;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.trend-line-point {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0d6efd;
    border: 2px solid #fff;
    z-index: 5;
    box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.15);
}

.trend-point-label {
    position: absolute;
    transform: translateX(-50%);
    font-size: 0.72rem;
    color: #0d6efd;
    white-space: nowrap;
    font-weight: 700;
    z-index: 5;
    background: #fff;
    padding: 0 4px;
    border-radius: 4px;
    line-height: 1.1;
}

.trend-y-axis {
    position: relative;
    height: 220px;
    font-size: 0.72rem;
    color: #6c757d;
}

.trend-y-axis-left {
    border-right: 1px solid #e9ecef;
    padding-right: 8px;
}

.trend-y-axis-right-inside {
    position: absolute;
    top: 0;
    width: 70px;
    height: 220px;
    border-left: 1px solid #e9ecef;
    padding-left: 8px;
    z-index: 6;
    background: #fff;
}

.trend-y-tick {
    position: absolute;
    transform: translateY(50%);
    left: 0;
    right: 0;
    line-height: 1;
}

.trend-y-axis-left .trend-y-tick {
    text-align: right;
}

.trend-y-axis-right-inside .trend-y-tick {
    text-align: left;
}

.trend-axis-title {
    position: absolute;
    top: -22px;
    left: 0;
    right: 0;
    font-size: 0.72rem;
    font-weight: 600;
    color: #495057;
    text-align: center;
}

/* Burndashboard filter */
.analytics-filter-panel {
    background: #f8f9fb;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    overflow: visible;
}

.analytics-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px 10px 14px;
    border-bottom: 1px solid #eef1f4;
    flex-wrap: wrap;
}

.analytics-filter-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #344054;
}

.analytics-filter-toggle {
    color: #667085;
}

.analytics-filter-body {
    padding: 12px 14px 14px 14px;
}

.analytics-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.analytics-filter-controls-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: end;
    gap: 12px;
    overflow-x: auto;
    width: 100%;
    min-width: 0;
    padding-bottom: 2px;
}

    .analytics-filter-controls-row .filter-inline-item {
        display: flex;
        flex-direction: column;
        flex: 0 0 160px;
        min-width: 160px;
        max-width: 160px;
    }

    .analytics-filter-controls-row .filter-inline-tower {
        flex: 0 0 220px;
        min-width: 220px;
        max-width: 220px;
    }

    .analytics-filter-controls-row .msel-wrap {
        width: 100%;
    }

    .analytics-filter-controls-row .msel-btn {
        width: 100%;
        text-align: left;
    }

.analytics-filter-label {
    color: #475467;
    font-weight: 600;
}

.analytics-pill-btn {
    border-radius: 999px;
    background: #fff;
}

.analytics-filter-chips {
    margin-top: 10px;
}

.analytics-filter-summary {
    margin-top: 10px;
    font-size: 0.78rem;
    color: #667085;
}

.exec-page {
    padding: 1.25rem;
    background: #f6f8fb;
    min-height: calc(100vh - 60px);
}

.exec-filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 1px 5px rgba(15, 23, 42, 0.04);
}

.exec-filter-title {
    color: #334155;
    font-weight: 800;
}

.exec-filter-controls {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.exec-filter-field {
    min-width: 135px;
}

    .exec-filter-field label {
        display: block;
        margin-bottom: 0.2rem;
        color: #64748b;
        font-size: 0.78rem;
        font-weight: 700;
    }

.exec-filter-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.exec-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: stretch;
    padding: 1.25rem;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #eef5ff 100%);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.exec-eyebrow {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    font-weight: 700;
}

.exec-title {
    margin: 0.25rem 0;
    font-size: 1.85rem;
    font-weight: 800;
    color: #1e293b;
}

.exec-subtitle {
    color: #64748b;
    max-width: 820px;
}

.exec-status-card {
    min-width: 220px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #dbe4f0;
    padding: 1rem;
}

.exec-headlines {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.exec-headline-chip {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.28rem 0.65rem;
}

.exec-health {
    font-size: 1.35rem;
    font-weight: 800;
}

.exec-health-green {
    color: #15803d;
}

.exec-health-amber {
    color: #b45309;
}

.exec-health-red {
    color: #b91c1c;
}

.insight-card {
    border-radius: 16px;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    min-height: 100%;
    height: 100%;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
}

    .insight-card.risk {
        border-left: 5px solid #dc2626;
    }

    .insight-card.warning {
        border-left: 5px solid #d97706;
    }

    .insight-card.opportunity {
        border-left: 5px solid #16a34a;
    }

    .insight-card.neutral {
        border-left: 5px solid #2563eb;
    }

.insight-label {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.insight-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1e293b;
    margin-top: 0.35rem;
}

.insight-text {
    margin-top: 0.5rem;
    color: #475569;
    font-size: 0.9rem;
}

.insight-action {
    margin-top: auto;
    align-self: flex-start;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(160px, 1fr));
    gap: 0.85rem;
}

.exec-panel {
    background: #ffffff;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    padding: 1rem;
    box-shadow: 0 1px 5px rgba(15, 23, 42, 0.05);
    height: 100%;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.panel-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e293b;
}

.panel-subtitle {
    font-size: 0.85rem;
    color: #64748b;
}

.panel-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

    .panel-badge.green {
        background: #dcfce7;
        color: #166534;
    }

    .panel-badge.amber {
        background: #fef3c7;
        color: #92400e;
    }

    .panel-badge.red {
        background: #fee2e2;
        color: #991b1b;
    }

.metric-row {
    display: flex;
    justify-content: space-between;
    padding: 0.45rem 0;
    border-bottom: 1px dashed #e2e8f0;
    color: #475569;
}

    .metric-row strong {
        color: #1e293b;
    }

.panel-insight {
    margin-top: 1rem;
    border-radius: 12px;
    background: #f8fafc;
    padding: 0.75rem;
    color: #475569;
    font-size: 0.9rem;
}

.mini-bars {
    display: flex;
    gap: 4px;
    height: 8px;
    margin-top: 0.85rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

    .mini-bars span:nth-child(1) {
        background: #2563eb;
    }

    .mini-bars span:nth-child(2) {
        background: #38bdf8;
    }

    .mini-bars span:nth-child(3) {
        background: #cbd5e1;
    }

    .mini-bars.two span:nth-child(1) {
        background: #16a34a;
    }

    .mini-bars.two span:nth-child(2) {
        background: #f59e0b;
    }

.exec-action-table th {
    color: #475569;
    font-size: 0.78rem;
    text-transform: uppercase;
}

.exec-action-table td {
    color: #334155;
}

.priority-badge {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.75rem;
}

.priority-high {
    background: #fee2e2;
    color: #991b1b;
}

.priority-medium {
    background: #fef3c7;
    color: #92400e;
}

.priority-low {
    background: #dcfce7;
    color: #166534;
}

.exec-list {
    margin-bottom: 0;
    padding-left: 1.2rem;
    color: #475569;
}

    .exec-list li {
        margin-bottom: 0.5rem;
    }

.outlook-risk {
    border-left: 5px solid #dc2626;
}

.outlook-opportunity {
    border-left: 5px solid #16a34a;
}

@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }
}

@media (max-width: 768px) {
    .exec-filter-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .exec-filter-controls,
    .exec-filter-actions {
        justify-content: flex-start;
    }

    .exec-hero {
        flex-direction: column;
    }

    .kpi-grid {
        grid-template-columns: repeat(1, minmax(160px, 1fr));
    }
}

/* ProBizOps executive dashboard refresh */
.exec-page {
    --pb-navy: #0b1f3a;
    --pb-blue: #2563eb;
    --pb-sky: #60a5fa;
    --pb-green: #10b981;
    --pb-amber: #f59e0b;
    --pb-gray: #64748b;
    padding: 1.5rem;
    background:
        radial-gradient(900px 260px at 68% 0%, rgba(96, 165, 250, 0.20), transparent 72%),
        linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
    min-height: calc(100vh - 60px);
    color: var(--pb-navy);
}

.exec-filter-panel {
    align-items: end;
    padding: 0.85rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 28px rgba(11, 31, 58, 0.06);
}

.exec-filter-title {
    color: var(--pb-navy);
    font-size: 1.15rem;
    font-weight: 800;
}

.exec-filter-subtitle {
    color: var(--pb-gray);
    font-size: 0.78rem;
    font-weight: 600;
}

.exec-filter-field {
    min-width: 128px;
}

.exec-filter-field label {
    color: #475569;
    letter-spacing: 0;
}

.exec-filter-panel .btn,
.exec-filter-panel .form-select {
    border-radius: 6px;
    font-weight: 700;
}

.exec-filter-panel .btn-primary {
    background: var(--pb-blue);
    border-color: var(--pb-blue);
}

.exec-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 1rem;
    padding: 1.45rem 1.55rem;
    border: 1px solid #dbe7f5;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 246, 255, 0.96) 100%),
        #ffffff;
    box-shadow: 0 16px 40px rgba(11, 31, 58, 0.08);
}

.exec-hero-copy {
    min-width: 0;
}

.exec-eyebrow {
    color: var(--pb-blue);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.exec-title {
    margin: 0.22rem 0 0.35rem;
    color: var(--pb-navy);
    font-size: clamp(1.75rem, 2.3vw, 2.45rem);
    font-weight: 900;
    line-height: 1.05;
}

.exec-subtitle {
    color: #334155;
    max-width: 780px;
    font-size: 0.95rem;
    line-height: 1.55;
}

.exec-headline-chip {
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #f8fbff;
    color: #1d4ed8;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 0.28rem 0.62rem;
}

.exec-status-card {
    position: relative;
    min-width: 0;
    border: 1px solid #dbe7f5;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.10);
}

.exec-status-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.exec-health {
    color: var(--pb-navy);
    font-size: 1.75rem;
    line-height: 1;
}

.exec-health-green {
    color: var(--pb-green);
}

.exec-health-amber {
    color: var(--pb-amber);
}

.exec-health-red {
    color: #ef4444;
}

.exec-refresh {
    margin-top: 0.55rem;
    color: var(--pb-gray);
    font-size: 0.76rem;
}

.exec-health-label-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
}

.exec-health-info {
    position: relative;
}

.exec-health-info-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.05rem;
    height: 1.05rem;
    padding: 0;
    border: 1px solid #94a3b8;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-family: Georgia, serif;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    cursor: help;
}

.exec-health-info-button:hover,
.exec-health-info-button:focus-visible {
    border-color: #2563eb;
    color: #1d4ed8;
    outline: 2px solid rgba(37, 99, 235, 0.2);
    outline-offset: 1px;
}

.exec-health-evaluations {
    position: absolute;
    z-index: 1100;
    top: calc(100% + 0.45rem);
    right: -0.75rem;
    width: min(23rem, calc(100vw - 2rem));
    display: grid;
    gap: 0.45rem;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.2rem);
    transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
}

.exec-health-info:hover .exec-health-evaluations,
.exec-health-info:focus-within .exec-health-evaluations {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.exec-health-tooltip-title {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
    font-size: 0.76rem;
    font-weight: 800;
}

.exec-health-evaluation {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
}

.exec-health-indicator {
    flex: 0 0 auto;
    width: 0.5rem;
    height: 0.5rem;
    margin-top: 0.28rem;
    border-radius: 999px;
    background: #94a3b8;
}

.exec-health-indicator-green {
    background: var(--pb-green);
}

.exec-health-indicator-amber {
    background: var(--pb-amber);
}

.exec-health-indicator-red {
    background: #ef4444;
}

.exec-health-evaluation-copy {
    min-width: 0;
    flex: 1;
}

.exec-health-evaluation-top {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    color: #334155;
    font-size: 0.72rem;
    line-height: 1.25;
}

.exec-health-evaluation-top strong {
    color: #0f172a;
    white-space: nowrap;
}

.exec-health-threshold {
    margin-top: 0.08rem;
    color: #64748b;
    font-size: 0.64rem;
    line-height: 1.25;
}

.kpi-grid {
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 0.75rem;
}

.executive-kpi-card {
    min-height: 122px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(11, 31, 58, 0.06);
    display: flex;
    flex-direction: column;
}

.kpi-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.kpi-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eaf2ff;
    color: var(--pb-blue);
    font-size: 0.82rem;
    font-weight: 900;
}

.kpi-title {
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
}

.kpi-value {
    margin-top: 0.7rem;
    color: var(--pb-navy);
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.kpi-delta {
    margin-top: 0.45rem;
    color: var(--pb-gray);
    font-size: 0.78rem;
    font-weight: 700;
}

.executive-kpi-card.kpi-good .kpi-delta {
    color: var(--pb-green);
}

.executive-kpi-card.kpi-warning .kpi-delta {
    color: var(--pb-amber);
}

.executive-kpi-card.kpi-risk .kpi-delta {
    color: #ef4444;
}

.kpi-action-row {
    margin-top: auto;
    padding-top: 0.8rem;
}

.kpi-action {
    min-height: 30px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    background: #eff6ff;
    color: var(--pb-blue);
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.1);
}

.kpi-action:hover:not(:disabled) {
    background: var(--pb-blue);
    color: #ffffff;
}

.kpi-action:disabled {
    cursor: not-allowed;
    opacity: 0.48;
    box-shadow: none;
}

.exec-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(360px, 1.55fr) minmax(280px, 0.9fr) minmax(280px, 0.9fr);
    gap: 0.85rem;
}

.exec-panel {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(11, 31, 58, 0.06);
}

.panel-title {
    color: var(--pb-navy);
    font-size: 0.98rem;
    font-weight: 900;
}

.panel-subtitle {
    color: var(--pb-gray);
    font-size: 0.78rem;
}

.panel-badge {
    border-radius: 6px;
    white-space: nowrap;
}

.trend-year-control {
    min-width: 112px;
    position: relative;
}

.trend-year-control label {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--pb-gray);
    font-size: 0.7rem;
    font-weight: 800;
}

.trend-year-control .form-select {
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 750;
}

.trend-year-dropdown {
    position: relative;
    min-width: 9.5rem;
}

.trend-year-dropdown-toggle {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: var(--pb-navy);
    padding: 0.36rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 800;
}

.trend-year-menu {
    position: absolute;
    z-index: 10;
    top: calc(100% + 0.35rem);
    right: 0;
    min-width: 10rem;
    display: grid;
    gap: 0.2rem;
    padding: 0.45rem;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.trend-year-menu label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.36rem 0.4rem;
    border-radius: 6px;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 750;
}

.trend-year-menu label:hover {
    background: #f1f5f9;
}

.trend-year-menu input {
    accent-color: var(--pb-blue);
}

.trend-note {
    margin: -0.35rem 0 0.65rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 650;
}

.exec-line-chart {
    position: relative;
    min-height: 250px;
    padding: 0.4rem 0 1.5rem 2.8rem;
}

.quarter-trend-chart {
    padding-right: 2.8rem;
}

.quarter-trend-chart svg text {
    display: none;
}

.trend-refreshing svg,
.trend-refreshing .chart-x-axis,
.trend-refreshing .chart-y-axis,
.trend-refreshing .margin-y-axis {
    opacity: 0.35;
}

.trend-loading-overlay {
    position: absolute;
    inset: 0 2.8rem 1.5rem 2.8rem;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    color: #0b1f3a;
    font-size: 0.8rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(2px);
}

.exec-line-chart::before {
    content: "";
    position: absolute;
    inset: 0 0 1.5rem 2.8rem;
    background: repeating-linear-gradient(to bottom, #eaf0f7 0 1px, transparent 1px 54px);
    border-bottom: 1px solid #dbe4f0;
}

.exec-line-chart svg {
    position: relative;
    width: 100%;
    height: 220px;
    display: block;
}

.line-area {
    fill: url(#execRevenueFill);
}

.line-stroke {
    fill: none;
    stroke: var(--pb-blue);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.margin-line-stroke {
    fill: none;
    stroke: var(--pb-green);
    stroke-width: 3;
    stroke-dasharray: 8 7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cumulative-revenue-line-stroke {
    fill: none;
    stroke: #0b1f3a;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.quarter-bar {
    opacity: 0.88;
}

    .quarter-bar:hover {
        opacity: 1;
    }

.revenue-bar {
    fill: #2563eb;
}

.investment-bar {
    fill: #f59e0b;
}

.quarter-bar-label {
    font-size: 10px;
    font-weight: 700;
    paint-order: stroke;
    stroke: #ffffff;
    stroke-width: 3px;
    stroke-linejoin: round;
}

.revenue-bar-label {
    fill: #1d4ed8;
}

.investment-bar-label {
    fill: #b45309;
}

.legend-bar {
    display: inline-block;
    width: 12px;
    height: 10px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}

    .legend-bar.revenue {
        background: #2563eb;
    }

    .legend-bar.investment {
        background: #f59e0b;
    }

.cumulative-margin-line-stroke {
    fill: none;
    stroke: #f59e0b;
    stroke-width: 3;
    stroke-dasharray: 4 6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trend-dot {
    stroke: #fff;
    stroke-width: 2;
    cursor: default;
}

.revenue-dot {
    fill: var(--pb-blue);
}

.cumulative-revenue-dot {
    fill: #0b1f3a;
}

.margin-dot {
    fill: var(--pb-green);
}

.cumulative-margin-dot {
    fill: #f59e0b;
}

.investment-line-stroke {
    fill: none;
    stroke: #f59e0b;
    stroke-width: 2.5;
    stroke-dasharray: 5 4;
}

.cumulative-investment-line-stroke {
    fill: none;
    stroke: #d97706;
    stroke-width: 2.5;
    stroke-dasharray: 2 4;
}

.investment-dot {
    fill: #f59e0b;
}

.cumulative-investment-dot {
    fill: #d97706;
}

.legend-line.investment {
    background: #f59e0b;
}

.legend-line.cumulative-investment {
    background: #d97706;
}

.chart-y-axis {
    position: absolute;
    inset: 0 auto 1.5rem 0;
    width: 2.3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--pb-gray);
    font-size: 0.72rem;
    font-weight: 700;
}

.margin-y-axis {
    position: absolute;
    inset: 0 0 1.5rem auto;
    width: 2.4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--pb-green);
    font-size: 0.72rem;
    font-weight: 800;
    text-align: right;
}

.chart-x-axis {
    position: absolute;
    right: 2.8rem;
    bottom: 0;
    left: 2.8rem;
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 0 1.3rem;
    color: var(--pb-gray);
    font-size: 0.72rem;
    font-weight: 700;
}

.exec-chart-footer {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    border-top: 1px solid #edf2f7;
    padding-top: 0.75rem;
}

.exec-chart-footer span {
    color: var(--pb-gray);
    font-size: 0.78rem;
    font-weight: 700;
}

.exec-chart-footer strong {
    display: block;
    color: var(--pb-navy);
    font-size: 0.9rem;
}

.trend-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    margin-top: 0.7rem;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 750;
}

.trend-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.legend-line {
    width: 1.45rem;
    height: 0;
    border-top: 3px solid var(--pb-blue);
    border-radius: 999px;
}

.legend-line.revenue {
    border-color: var(--pb-blue);
}

.legend-line.cumulative-revenue {
    border-color: #0b1f3a;
}

.legend-line.margin {
    border-color: var(--pb-green);
    border-top-style: dashed;
}

.legend-line.cumulative-margin {
    border-color: #f59e0b;
    border-top-style: dashed;
}

.donut-row {
    display: grid;
    grid-template-columns: 170px 1fr;
    align-items: start;
    gap: 1rem;
}

.donut-figure {
    display: grid;
    justify-items: center;
    gap: 0.55rem;
}

.donut-comparison {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.donut-breakdown {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.burn-donut {
    position: relative;
    width: 150px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
}

.donut-breakdown .burn-donut {
    width: 120px;
}

.burn-donut > div {
    width: 88px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #ffffff;
    text-align: center;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.donut-total {
    display: grid;
    gap: 0.1rem;
    text-align: center;
}

.donut-total strong {
    color: var(--pb-navy);
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1.1;
}

.donut-total span {
    color: var(--pb-gray);
    font-size: 0.7rem;
    font-weight: 800;
}

.donut-breakdown .burn-donut > div {
    width: 74px;
}

.burn-donut strong {
    color: var(--pb-navy);
    font-size: 0.78rem;
    line-height: 1.1;
}

.burn-donut span {
    color: var(--pb-gray);
    font-size: 0.66rem;
    font-weight: 700;
}

.donut-slice-label {
    position: absolute;
    z-index: 1;
    transform: translate(-50%, -50%);
    max-width: 3.7rem;
    border-radius: 999px;
    padding: 0.1rem 0.24rem;
    background: rgba(255, 255, 255, 0.86);
    color: #0b1f3a;
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 1px 5px rgba(15, 23, 42, 0.14);
    pointer-events: none;
}

.donut-legend {
    display: grid;
    gap: 0.5rem;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 0;
}

.donut-legend div {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.45rem;
    align-items: center;
    min-width: 0;
}

.donut-legend strong {
    grid-column: 2;
    color: var(--pb-navy);
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.legend-dot.blue {
    background: var(--pb-blue);
}

.legend-dot.green {
    background: var(--pb-green);
}

.legend-dot.amber {
    background: var(--pb-amber);
}

.signal-list {
    display: grid;
    gap: 0.7rem;
}

.signal-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    background: #fbfdff;
}

.signal-copy {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
}

.signal-copy span {
    color: var(--pb-gray);
    font-size: 0.78rem;
    font-weight: 800;
}

.signal-copy strong {
    color: var(--pb-navy);
    font-size: 1rem;
    line-height: 1.1;
}

.signal-copy small {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 650;
    line-height: 1.25;
}

.signal-download {
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--pb-blue);
    padding: 0.34rem 0.68rem;
    font-size: 0.72rem;
    font-weight: 850;
    white-space: nowrap;
}

.signal-download:hover:not(:disabled) {
    border-color: var(--pb-blue);
    background: var(--pb-blue);
    color: #ffffff;
}

.signal-download:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.panel-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.signal-item.risk {
    border-left: 4px solid #ef4444;
}

.signal-item.good {
    border-left: 4px solid var(--pb-green);
}

.signal-item.warning {
    border-left: 4px solid var(--pb-amber);
}

.panel-insight.compact {
    font-size: 0.82rem;
}

.metric-row {
    color: #475569;
    font-size: 0.86rem;
}

.metric-row strong {
    color: var(--pb-navy);
}

.exec-action-table thead th {
    background: #f8fbff;
    color: #475569;
}

.exec-list {
    color: #334155;
}

@media (max-width: 1400px) {
    .kpi-grid {
        grid-template-columns: repeat(3, minmax(165px, 1fr));
    }

    .exec-dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .exec-hero {
        grid-template-columns: 1fr;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }

    .donut-row,
    .donut-comparison,
    .donut-breakdown,
    .exec-chart-footer {
        grid-template-columns: 1fr;
    }

    .signal-item {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .signal-download {
        justify-self: start;
    }
}

@media (max-width: 560px) {
    .exec-page {
        padding: 1rem;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* Module tabs should remain readable even when the left-nav link theme is present. */
.nav-tabs .nav-link {
    opacity: 1 !important;
    font-weight: 500;
}

.nav-tabs .nav-link:not(.active) {
    color: #0d6efd !important;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    color: #212529 !important;
    background-color: #ffffff;
    border-color: #dee2e6 #dee2e6 #ffffff;
    font-weight: 600;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
    color: #0a58ca !important;
}

<style >
.bizops-processing-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bizops-processing-card {
    min-width: 320px;
    max-width: 520px;
    background: #fff;
    border-radius: 16px;
    padding: 28px 32px;
    text-align: center;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

</style >
