*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --ado-blue: #0078d4;
    --ado-blue-dark: #005a9e;
    --ado-blue-light: #deecf9;
    --ado-purple: #8764b8;
    --ado-purple-lt: #f4f0fb;
    --ado-teal: #00b7c3;
    --ado-teal-lt: #d1f8fb;
    --ado-green: #107c10;
    --ado-green-lt: #dff6dd;
    --ado-amber: #d08000;
    --ado-amber-lt: #fff4ce;
    --ado-red: #d13438;
    --ado-red-lt: #fde7e9;
    --bg: var(--da-surface-alt);
    --surface: var(--da-surface);
    --border: var(--da-border);
    --border-mid: var(--da-border-strong);
    --text-primary: var(--da-text);
    --text-secondary: var(--da-text-secondary);
    --text-muted: var(--da-text-disabled);
    --nav-h: 48px;
    --subnav-h: 40px;
}

/* ── Shared page loader overlay ── */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: color-mix(in srgb, var(--da-bg) 92%, transparent);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    transition: opacity 300ms ease, visibility 300ms ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loader-ring {
    display: inline-block;
    position: relative;
    width: 52px;
    height: 52px;
}

.loader-ring div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 44px;
    height: 44px;
    margin: 4px;
    border: 4px solid transparent;
    border-top-color: #0078d4;
    border-radius: 50%;
    animation: loader-spin 1s cubic-bezier(0.55, 0.05, 0.67, 0.19) infinite;
}

.loader-ring div:nth-child(1) {
    animation-delay: -0.45s;
}

.loader-ring div:nth-child(2) {
    animation-delay: -0.30s;
    border-top-color: #50a0e0;
}

.loader-ring div:nth-child(3) {
    animation-delay: -0.15s;
    border-top-color: #a0c8f0;
}

.loader-ring div:nth-child(4) {
    animation-delay: 0s;
    border-top-color: #d0e8f8;
}

@keyframes loader-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loader-text {
    font-size: 14px;
    color: #555;
    letter-spacing: 0.02em;
    margin: 0;
}

body {
    font-family: 'Segoe UI', -apple-system, sans-serif;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg);
    line-height: 1.4;
}

/* ── Subnav ── */
.subnav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    height: var(--subnav-h);
    display: flex;
    align-items: stretch;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 99;
}

.subnav-tab {
    display: flex;
    align-items: center;
    padding: 0 16px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    gap: 6px;
    user-select: none;
}

.subnav-tab:hover {
    color: var(--text-primary);
}

.subnav-tab.active {
    color: var(--ado-blue);
    border-bottom-color: var(--ado-blue);
    font-weight: 500;
}

.tab-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ── Page layout ── */
.page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px;
}

.page-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
}

.page-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ── Section ── */
.section {
    margin-bottom: 28px;
    display: none;
}

.section.active {
    display: block;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.section-bar {
    width: 3px;
    height: 18px;
    border-radius: 2px;
}

.section-name {
    font-size: 14px;
    font-weight: 600;
}

.section-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0 28px;
}

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 500;
}

.badge-blue {
    background: var(--ado-blue-light);
    color: #0c3f6e;
}

.badge-green {
    background: var(--ado-green-lt);
    color: #054b16;
}

.badge-amber {
    background: var(--ado-amber-lt);
    color: #6a3d00;
}

.badge-red {
    background: var(--ado-red-lt);
    color: #6b1515;
}

.badge-purple {
    background: var(--ado-purple-lt);
    color: #3b1f6e;
}

.badge-teal {
    background: var(--ado-teal-lt);
    color: #004f55;
}

.badge-grey {
    background: var(--da-surface-alt);
    color: var(--da-text-secondary);
}

/* ── KPI cards ── */
.cards-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.cards-row-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.kpi {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--border-mid);
    padding: 14px 16px;
}

.kpi.c-blue {
    border-top-color: var(--ado-blue);
}

.kpi.c-green {
    border-top-color: var(--ado-green);
}

.kpi.c-amber {
    border-top-color: var(--ado-amber);
}

.kpi.c-red {
    border-top-color: var(--ado-red);
}

.kpi.c-purple {
    border-top-color: var(--ado-purple);
}

.kpi.c-teal {
    border-top-color: var(--ado-teal);
}

.kpi-val {
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    color: var(--text-primary);
}

.kpi-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.kpi-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.kpi-trend {
    font-size: 11px;
    margin-top: 4px;
}

.kpi-trend.up {
    color: var(--ado-green);
}

.kpi-trend.down {
    color: var(--ado-red);
}

/* ── Panels & grid ── */
.panels-row {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

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

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

.col-1-1-1 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.panels-row .panel:only-child {
    grid-column: 1 / -1;
}

.panels-row .panel:nth-child(2):nth-last-child(1) {
    grid-column: 2 / -1;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 14px 16px;
}

.panel-title {
    font-size: 13px;
    font-weight: 500;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ── Stacked bar chart (Groom / Release / Summary) ── */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 110px;
}

.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bar-stacks {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex: 1;
}

.bar-seg {
    width: 60%;
    margin: 0 auto;
    min-height: 2px;
}

.bar-seg:first-child {
    border-radius: 2px 2px 0 0;
}

.bar-tick {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

.bar-val-lbl {
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

/* ── Legend ── */
.chart-legend {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-secondary);
}

.legend-sq {
    width: 10px;
    height: 10px;
    border-radius: 1px;
    flex-shrink: 0;
}

/* ── Donut ── */
.donut-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dl-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary);
}

/* ── Progress bars ── */
.prog-item {
    margin-bottom: 9px;
}

.prog-item:last-child {
    margin-bottom: 0;
}

.prog-head {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 3px;
}

.prog-val {
    font-weight: 500;
    color: var(--text-primary);
}

.prog-track {
    height: 6px;
    background: var(--bg);
    overflow: hidden;
}

.prog-fill {
    height: 100%;
}

/* ── Stat rows ── */
.stat-list {
    display: flex;
    flex-direction: column;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.stat-row:last-child {
    border-bottom: none;
}

/* ── Funnel bars ── */
.funnel {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.funnel-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.funnel-label {
    font-size: 11px;
    color: var(--text-secondary);
    width: 90px;
    flex-shrink: 0;
}

.funnel-bar-wrap {
    flex: 1;
}

.funnel-bar {
    height: 22px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 0 2px 2px 0;
}

/* ── Work-item type table ── */
.wi-table {
    width: 100%;
    border-collapse: collapse;
}

.wi-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 5px 8px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.wi-table td {
    padding: 5px 8px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.wi-table tr:last-child td {
    border-bottom: none;
}

.wi-table tr:hover td {
    background: var(--bg);
}

.wi-type-cell {
    display: flex;
    align-items: center;
    gap: 7px;
}

.wi-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ── Mini stats ── */
.mini-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.mini-stat {
    background: var(--bg);
    padding: 8px 10px;
    border-radius: 2px;
}

.mini-stat-val {
    font-size: 18px;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1;
}

.mini-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 3px;
}


/* ============================================================
   GROUPED BAR CHART — Evolve monthly (side-by-side bars)
   ============================================================ */

/* Outer wrapper — one per month, flex row of sub-bars + month label below */
.grouped-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

/* Container holding the 3 sub-bars side by side */
.grouped-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 100px;
    /* chart area height */
    width: 100%;
    justify-content: center;
}

/* Each sub-bar column: value label on top + the coloured bar */
.grouped-bar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    height: 100%;
    position: relative;
}

/* Value number above the bar */
.grouped-bar-val {
    font-size: 9px;
    color: var(--text-secondary);
    margin-bottom: 2px;
    line-height: 1;
    text-align: center;
}

/* The coloured bar itself */
.grouped-bar {
    width: 100%;
    min-height: 3px;
    border-radius: 2px 2px 0 0;
    position: relative;
    cursor: pointer;
}

/* Month label below the group of bars */
.grouped-tick {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: center;
}

/* Make bar-chart flex so grouped-col fills correctly */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 110px;
}


/* ============================================================
   BAR ANIMATION — fill from bottom
   ============================================================ */

@keyframes barFillUp {
    from {
        height: 0 !important;
    }

    to {
        height: var(--bar-h);
    }
}

/* Applied to every animated segment */
.bar-seg--anim {
    height: 0;
    animation: barFillUp 500ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
    position: relative;
    overflow: visible;
    cursor: pointer;
}


/* ============================================================
   HOVER TOOLTIP
   ============================================================ */

/* Tooltip bubble — hidden by default */
.bar-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #201f1e;
    color: #fff;
    font-size: 11px;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 3px;
    pointer-events: none;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
    line-height: 1.5;
}

/* Arrow pointing down from tooltip */
.bar-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--da-text);
}

/* Show tooltip + brighten bar on hover */
.bar-seg--anim:hover,
.grouped-bar:hover {
    filter: brightness(1.18);
}

.bar-seg--anim:hover .bar-tooltip,
.grouped-bar:hover .bar-tooltip {
    display: block;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 960px) {

    .cards-row,
    .cards-row-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .col-2-1,
    .col-2-1-1,
    .col-1-1-1,
    .col-1-1 {
        grid-template-columns: 1fr;
    }
}

.ov-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

/* 2×2 cards — top-left cell */
.ov-cards-grid {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

/* Module stats — right column, spans BOTH rows */
.ov-stats-panel {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
}

/* Heatmap — bottom-left cell */
.ov-heatmap-panel {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
}


/* ── Overview module cards ── */
.ov-module-card {
    display: flex;
    flex-direction: column;
}

.ov-module-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.ov-module-val {
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    color: var(--text-primary);
}

.ov-module-val2 {
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
    color: var(--text-primary);
}

.ov-module-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

.ov-module-divider {
    height: 1px;
    background: var(--border);
    margin: 10px 0;
}


/* ── Heatmap ── */
.heatmap {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.heatmap th {
    padding: 5px 8px;
    text-align: center;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.heatmap th.row-head {
    text-align: left;
}

.heatmap td {
    padding: 4px 6px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.heatmap tr:last-child td {
    border-bottom: none;
}

.heatmap tr:hover td {
    background: var(--bg);
}

.hm-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 26px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 500;
}

.hm-high {
    background: #dff6dd;
    color: #054b16;
}

.hm-mid {
    background: #deecf9;
    color: #0c3f6e;
}

.hm-low {
    background: #fff4ce;
    color: #6a3d00;
}

.hm-zero {
    background: var(--da-surface-alt);
    color: var(--text-muted);
}

/* Work item type cell with icon */
.hm-type-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    text-align: left;
    padding: 2px 0;
}

.hm-type-icon {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    flex-shrink: 0;
    object-fit: contain;
}

.hm-type-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Heatmap legend */
.heatmap-legend {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    font-size: 10px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.heatmap-legend span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hm-legend-sq {
    width: 10px;
    height: 10px;
    border-radius: 1px;
    display: inline-block;
    flex-shrink: 0;
}


/* ── Summary KPI — last summarised card ── */
.kpi-last-summarised-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    color: var(--text-primary);
}

.kpi-last-summarised-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}


/* ── Bar animation ── */
@keyframes barFillUp {
    from {
        height: 0 !important;
    }

    to {
        height: var(--bar-h);
    }
}

.bar-seg--anim {
    height: 0;
    animation: barFillUp 500ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
    position: relative;
    overflow: visible;
    cursor: pointer;
}

.bar-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #201f1e;
    color: #fff;
    font-size: 11px;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 3px;
    pointer-events: none;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
    line-height: 1.5;
}

.bar-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--da-text);
}

.bar-seg--anim:hover,
.grouped-bar:hover {
    filter: brightness(1.18);
}

.bar-seg--anim:hover .bar-tooltip,
.grouped-bar:hover .bar-tooltip {
    display: block;
}

/* No data placeholder */
.chart-no-data {
    color: var(--text-muted);
    font-size: 12px;
    padding: 20px 0;
    text-align: center;
}


/* ── Grouped bar chart ── */
.grouped-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.grouped-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 100px;
    width: 100%;
    justify-content: center;
}

.grouped-bar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    height: 100%;
    position: relative;
}

.grouped-bar-val {
    font-size: 9px;
    color: var(--text-secondary);
    margin-bottom: 2px;
    line-height: 1;
    text-align: center;
}

.grouped-bar {
    width: 100%;
    min-height: 3px;
    border-radius: 2px 2px 0 0;
    position: relative;
    cursor: pointer;
}

.grouped-tick {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: center;
}


/* ── Responsive ── */
@media (max-width: 960px) {
    .ov-main-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .ov-cards-grid {
        grid-column: 1;
        grid-row: auto;
    }

    .ov-stats-panel {
        grid-column: 1;
        grid-row: auto;
    }

    .ov-heatmap-panel {
        grid-column: 1;
        grid-row: auto;
    }
}

/* ── Summary KPI card — last summarised ── */
.kpi-last-summarised-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    color: var(--text-primary);
}

.kpi-last-summarised-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}


/* ── Bar animation ── */
@keyframes barFillUp {
    from {
        height: 0 !important;
    }

    to {
        height: var(--bar-h);
    }
}

.bar-seg--anim {
    height: 0;
    animation: barFillUp 500ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
    position: relative;
    overflow: visible;
    cursor: pointer;
}

.bar-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #201f1e;
    color: #fff;
    font-size: 11px;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 3px;
    pointer-events: none;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
    line-height: 1.5;
}

.bar-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--da-text);
}

.bar-seg--anim:hover,
.grouped-bar:hover {
    filter: brightness(1.18);
}

.bar-seg--anim:hover .bar-tooltip,
.grouped-bar:hover .bar-tooltip {
    display: block;
}


/* ── Grouped bar chart ── */
.grouped-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.grouped-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 100px;
    width: 100%;
    justify-content: center;
}

.grouped-bar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    height: 100%;
    position: relative;
}

.grouped-bar-val {
    font-size: 9px;
    color: var(--text-secondary);
    margin-bottom: 2px;
    line-height: 1;
    text-align: center;
}

.grouped-bar {
    width: 100%;
    min-height: 3px;
    border-radius: 2px 2px 0 0;
    position: relative;
    cursor: pointer;
}

.grouped-tick {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: center;
}


/* ── Responsive ── */
@media (max-width: 960px) {
    .col-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Summary — last summarised KPI card ── */
.kpi-last-summarised-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    color: var(--text-primary);
}

.kpi-last-summarised-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Responsive adjustments for overview cards */
@media (max-width: 1200px) {
    .ov-cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .ov-cards-grid {
        grid-template-columns: 1fr;
    }

    .ov-main-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .ov-stats-panel {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
    }

    .ov-heatmap-panel {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
    }
}

/* ════════════════════════════════════════════════════
   TIMESHEETS TAB
   ════════════════════════════════════════════════════ */

/* Amber accent for KPI card */
.kpi.pt-kpi-total::before,
.kpi.pt-kpi-total {
    --kpi-accent: #ca8a00;
}
.kpi.pt-kpi-total::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: #ca8a00;
}
.kpi.c-amber::before {
    background: #ca8a00;
}

/* Filter bar */
.pt-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 0 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.pt-filter-label {
    font-size: 12px;
    color: var(--text-secondary);
}
.pt-filter-select {
    border: 1px solid var(--border-mid);
    border-radius: 4px;
    padding: 5px 10px;
    background: var(--surface);
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-primary);
}
.pt-filter-select:focus {
    outline: 2px solid var(--ado-blue);
    outline-offset: 1px;
}
.pt-filter-sep {
    width: 1px;
    height: 22px;
    background: var(--border-mid);
    margin: 0 4px;
}
.pt-refresh-btn {
    margin-left: auto;
    border: 1px solid var(--border-mid);
    background: var(--surface);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    font-family: inherit;
}
.pt-refresh-btn:hover { background: var(--bg); }

/* Manager-only visibility */
.pt-manager-only { display: none; }
.pt-manager-panel { display: none; }

/* Work type chart row */
.pt-wt-row {
    display: flex;
    align-items: center;
    gap: 20px;
}
.pt-donut-wrap {
    width: 180px;
    height: 180px;
    flex-shrink: 0;
    position: relative;
}
.pt-wt-legend {
    flex: 1;
    font-size: 12px;
    line-height: 1.9;
}
.pt-wt-legend-row {
    display: flex;
    align-items: center;
    gap: 7px;
}
.pt-wt-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pt-wt-legend-label { flex: 1; }
.pt-wt-legend-val {
    color: var(--text-secondary);
    font-size: 11px;
    white-space: nowrap;
}

/* Trend chart */
.pt-trend-wrap {
    position: relative;
    height: 150px;
}

/* Billable badge */
.pt-badge-billable {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: var(--ado-green-lt);
    color: var(--ado-green);
}
.pt-badge-nonbillable {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: var(--bg);
    color: var(--text-secondary);
    border: 1px solid var(--border-mid);
}

/* Active timer rows */
.pt-timer-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}
.pt-timer-row:last-of-type { border-bottom: none; }
.pt-timer-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ado-teal), var(--ado-blue));
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
}
.pt-timer-info { flex: 1; min-width: 0; }
.pt-timer-user { font-weight: 600; font-size: 12px; }
.pt-timer-wi {
    font-size: 11px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pt-timer-elapsed {
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    min-width: 72px;
    text-align: right;
    color: var(--text-primary);
}
.pt-timer-elapsed.own { color: var(--ado-blue); }
.pt-stop-btn {
    flex-shrink: 0;
    border: 1px solid var(--ado-red);
    background: var(--surface);
    color: var(--ado-red);
    padding: 4px 9px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
}
.pt-stop-btn:hover { background: var(--ado-red-lt); }
.pt-more-btn {
    width: 100%;
    padding: 9px;
    font-size: 12px;
    background: var(--bg);
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-family: inherit;
}
.pt-more-btn:hover { background: var(--da-surface-alt); color: var(--text-primary); }

/* Live badge */
.pt-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    background: var(--ado-green-lt);
    color: var(--ado-green);
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
}
.pt-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ado-green);
    display: inline-block;
    animation: pt-pulse 1.8s infinite;
}
@keyframes pt-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(16,124,16,.6); }
    50%      { box-shadow: 0 0 0 5px rgba(16,124,16,0); }
}

/* Manager badge */
.pt-mgr-badge {
    font-size: 11px;
    background: var(--ado-purple-lt);
    color: var(--ado-purple);
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
}

/* col-1-1 panels row */
.panels-row.col-1-1 {
    grid-template-columns: 1fr 1fr;
}