/*
 * Dashboard V2 shell: navbar, filter card, guest login and tab navigation.
 * Loaded only by application/views/dashboard_v2_view.php.
 */

body {
    background-color: #f4f6f9;
}

/* Navbar */
.navbar-custom {
    background: linear-gradient(135deg, #00838f 0%, #00acc1 100%);
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.navbar-custom .navbar-brand {
    color: #fff !important;
    font-weight: 600;
    font-size: 19px;
    padding: 15px 20px;
    letter-spacing: 0.3px;
}

.navbar-custom .navbar-text {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 13px;
    font-weight: 500;
}

.navbar-visit:not(:last-child) {
    margin-right: 20px;
}

/* Card/Panel */
.card-box {
    background: linear-gradient(to bottom, #ffffff 0%, #fafbfc 100%);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #e3e6ea;
}

/* Form Labels & Inputs */
.control-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 6px;
    display: block;
    letter-spacing: 0.5px;
}

.form-control {
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    border-color: #d1d5db;
    border-radius: 4px;
    height: 36px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #00acc1;
    box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.1);
    outline: none;
}

.input-sm {
    height: 34px;
    font-size: 13px;
    padding: 6px 12px;
}

/* Buttons */
.btn-custom {
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.8px;
    padding: 8px 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    border: none;
}

.btn-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.btn-custom:active {
    transform: translateY(0);
}

/* Login */
.login-title {
    text-align: center;
    margin-bottom: 25px;
    color: #495057;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1.5px;
    opacity: 0.9;
}

.input-group-addon {
    background-color: #f8f9fa;
    border-color: #d1d5db;
    color: #6c757d;
    min-width: 45px;
    text-align: center;
    border-right: none;
}

.login-input {
    border-left: none;
    padding-left: 0;
}

.login-input:focus {
    border-color: #d1d5db;
    box-shadow: none; /* remove default glow to keep it clean, or keep it subtle */
    border-left: none;
}

.btn-login {
    background-color: #ff8c66; /* Coral/Orange color */
    color: white;
    font-size: 13px;
    padding: 7px;
    margin-left: 5px;
    font-weight: 700;
}

.btn-login:hover,
.btn-login:focus {
    background-color: #ff7043;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 112, 67, 0.3);
}

.login-error {
    margin-top: 15px;
    font-size: 12px;
}

/* Tab Navigation */
.tab-section {
    position: relative;
    margin-top: 12px;
}

/* Font size and weight are owned by dashboard.css (loaded with !important). */
.btn-tab {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #495057;
    padding: 8px 16px;
    margin-right: 6px;
    margin-bottom: 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-tab:hover {
    background: #f8f9fa;
    border-color: #00acc1;
    color: #00838f;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.btn-tab.active {
    background: linear-gradient(135deg, #00838f 0%, #00acc1 100%);
    border-color: #00838f;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 131, 143, 0.3);
}

.btn-home,
.btn-home:hover,
.btn-home:focus {
    background: red;
    color: white;
}

/* Utilities */
.mt-20 {
    margin-top: 20px;
}

.mb-0 {
    margin-bottom: 0;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.7);
}

.icon-gap {
    margin-right: 10px;
}

.dashboard-flush {
    padding: 0 !important;
}

.filter-range-row {
    margin: 0 -5px;
}

.filter-range-col {
    padding: 0 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .card-box {
        padding: 16px;
    }

    .control-label {
        font-size: 9px;
    }

    .btn-tab {
        padding: 6px 12px;
    }
}
/* ==================== Overview tab ==================== */

/*
 * Presentation layer for the Overview tab only. Everything is scoped to
 * .overview (or the two Overview modals) so the shared shell and the other
 * dashboard tabs are unaffected.
 */

.overview,
.dash-skeleton,
#modalCase,
#modalODZeroCase {
    --ov-teal-900: #0b4f57;
    --ov-teal-700: #0f6f7a;
    --ov-teal-500: #00acc1;
    --ov-teal-50: #e6f6f8;
    --ov-indigo-700: #1e40af;
    --ov-purple-700: #5b21b6;
    --ov-green-800: #166534;
    --ov-slate-900: #111827;
    --ov-slate-700: #374151;
    --ov-slate-500: #6b7280;
    --ov-slate-600: #4b5563;
    --ov-gold: #f4c542;
    --ov-line: #dbe4ee;
    --ov-line-soft: #eef2f7;
    --ov-surface: #ffffff;
    --ov-radius: 10px;
    --ov-radius-lg: 14px;
    --ov-gap: 20px;
    --ov-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 14px 30px -24px rgba(16, 24, 40, 0.4);
}

.overview {
    max-width: 1720px;
    margin: 0 auto;
    padding: 0 20px 28px;
    color: var(--ov-slate-900);
}

.overview *,
.overview *::before,
.overview *::after {
    box-sizing: border-box;
}

/* The Overview no longer pins itself to a fixed canvas. */
.overview .chart-container,
.overview .chart-container2 {
    min-width: 0 !important;
}

/* ---------- Shared dashboard tables (used by the Surveillance tab) ---------- */
.modal {
    z-index: 999999 !important;
}

.clickable {
    cursor: pointer;
}

.align-items-center {
    align-items: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.title-row {
    height: 26px;
}

.title-compact {
    font-size: 11px !important;
}

#mapPatient {
    height: 615px;
}

#mapODZeroCase {
    height: 600px;
}

/* Overview tables */
.overview-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.overview-table thead th {
    background: #f6f8fb;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 2px solid #e0e7ff;
}

.overview-table .table-heading {
    background: linear-gradient(135deg, #00838f, #00acc1);
    color: #fff;
}

.overview-table .table-heading .table-title,
.table-title {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

.table-title .title-heading {
    font-size: 17px;
}

.overview-table .table-heading .table-title span {
    font-size: 13px;
    font-weight: 600;
}

.overview-table .table-heading .table-title .table-range {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.85;
}

.overview-table tbody td,
.overview-table tbody th,
.overview-table tfoot th {
    border-bottom: 1px solid #f0f2f5;
    font-size: 13px;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.overview-table tbody tr:hover {
    background: #fdfdfd;
    box-shadow: inset 2px 0 0 #00acc1;
}

.overview-table .number-cell {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #111827;
}

.overview-table .badge-tag {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e0f2f1;
    color: #00695c;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.overview-table .with-divider {
    border-right: 2px solid #e5e7eb;
}

.overview-table tfoot th {
    background: #f8fafc;
    text-transform: uppercase;
    font-size: 12px;
}

/* Case investigation table: locally-acquired vs imported column groups.
   Text renders black in every cell; the vars below only tint backgrounds. */
.case-investigation-table {
    --local-cell-bg: #effaf7;
    --local-header-bg: linear-gradient(135deg, #d9f5ee, #cdeffc);
    --intl-cell-bg: #eef1ff;
    --intl-header-bg: linear-gradient(135deg, #e7e9ff, #dfe4ff);
    margin-top: 30px;
}

.case-investigation-table .local-heading,
.case-investigation-table .local-column-header {
    background: var(--local-header-bg);
    color: #000;
}

.case-investigation-table .local-column {
    background: var(--local-cell-bg);
    color: #000;
}

.case-investigation-table .intl-column-header {
    background: var(--intl-header-bg);
    color: #000;
}

.case-investigation-table .intl-column {
    background: var(--intl-cell-bg);
    color: #000;
}

.case-investigation-table tfoot th.local-summary {
    background: #e2f6ef;
    color: #000;
}

.case-investigation-table tfoot th.intl-summary {
    background: #ecefff;
    color: #000;
}

/* Surveillance tables (province + national share the same markup template) */
.surveillance-table {
    margin-top: 20px;
    margin-bottom: 0;
}

.surveillance-table.spaced-top {
    margin-top: 30px;
}

.surveillance-table .scope-province {
    background-color: #1e3799;
    color: #fff;
}

.surveillance-table .scope-national {
    border-right: 2px solid #e9ecef;
}

.surveillance-indicator-heading {
    border-right: 2px solid #e9ecef;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 13px;
}

.surveillance-group {
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: #1f2937;
    border-right: 2px solid #e9ecef;
}

.surveillance-column-header {
    text-align: center;
    font-size: 12px;
    padding: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    width: 110px;
}

.surveillance-footnotes {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
    font-size: 12px;
    color: #4b5563;
}

.overview button:focus-visible,
.overview a:focus-visible,
.overview input:focus-visible,
#modalCase button:focus-visible,
#modalODZeroCase button:focus-visible,
#modalODZeroCase input:focus-visible {
    /* contact/main.css forces `button { outline: none !important; }`. */
    outline: 3px solid var(--ov-teal-500) !important;
    outline-offset: 2px;
}

/* ---------- Section frame ---------- */

.ov-section {
    margin-bottom: 36px;
}

.ov-section:last-child {
    margin-bottom: 0;
}

.ov-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px 24px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ov-line);
}

.ov-section-titles {
    min-width: 0;
}

.ov-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ov-teal-700);
}

.ov-eyebrow::before {
    content: "";
    display: block;
    width: 18px;
    height: 2px;
    flex: 0 0 auto;
    background: currentColor;
}

.ov-section-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ov-teal-900);
    text-shadow: none;
}

.ov-section-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: 0;
    font-size: 13px;
    color: var(--ov-slate-500);
}

/* ---------- Summary hero ---------- */

.ov-hero {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px 32px;
    margin-bottom: var(--ov-gap);
    padding: 22px 26px;
    border-radius: var(--ov-radius-lg);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 88% 8%, rgba(255, 255, 255, 0.16), transparent 40%),
        radial-gradient(circle at 4% 120%, rgba(0, 172, 193, 0.35), transparent 46%),
        linear-gradient(115deg, #082f52 0%, #0b4a75 55%, #0f6f7a 100%);
    box-shadow: 0 18px 36px -26px rgba(8, 47, 82, 0.85);
}

.ov-hero::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--ov-gold);
}

.ov-hero-watermark {
    position: absolute;
    top: -18px;
    right: 24px;
    font-size: 140px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.ov-hero-main,
.ov-hero-context {
    position: relative;
    z-index: 1;
}

.ov-hero-main {
    min-width: 0;
}

.ov-hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ov-gold);
}

.ov-hero-eyebrow::before {
    content: "";
    display: block;
    width: 18px;
    height: 2px;
    flex: 0 0 auto;
    background: currentColor;
}

.ov-hero-title {
    margin: 0 0 4px;
    font-size: 28px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
}

.ov-hero-subtitle {
    margin: 0;
    font-size: 13px;
    color: #e6f6f8;
}

.ov-hero-context {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

.ov-hero-chip {
    min-width: 128px;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 10px;
    background: rgba(6, 32, 56, 0.42);
}

.ov-hero-chip dt {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #dbe9f2;
}

.ov-hero-chip dt .fa {
    font-size: 12px;
}

.ov-hero-chip dd {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

/* ---------- Summary band ---------- */

.ov-summary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
    gap: var(--ov-gap);
    align-items: stretch;
}

.ov-kpi {
    --kpi-accent: var(--ov-teal-700);
    --kpi-bar: var(--kpi-accent);
    --kpi-tint: #fff;
    --kpi-border: var(--ov-line);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    padding: 20px 22px;
    border: 1px solid var(--kpi-border);
    border-radius: var(--ov-radius-lg);
    background: var(--kpi-tint);
    box-shadow: var(--ov-shadow);
    overflow: hidden;
}

.ov-kpi::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--kpi-bar);
}

.ov-kpi--today {
    --kpi-accent: #b3261e;
    --kpi-bar: #b3261e;
    --kpi-tint: #fdf1f0;
    --kpi-border: #f2d4d1;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.ov-kpi--today:hover {
    transform: translateY(-2px);
    border-color: var(--kpi-accent);
    box-shadow: 0 16px 32px -24px rgba(179, 38, 30, 0.55);
}

.ov-kpi--today:hover .ov-kpi-foot .fa {
    transform: translateX(3px);
}

.ov-kpi--origin {
    --kpi-accent: #0b4f7d;
    --kpi-tint: #f1f6fb;
    --kpi-border: #d7e4f1;
    background:
        url("../images/cambodia-watermark.svg") right -70px bottom -40px / 80% auto no-repeat,
        var(--kpi-tint);
}

.ov-kpi-bar {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
}

.ov-kpi--origin .ov-kpi-label {
    font-size: 15px;
    color: var(--kpi-accent);
}

.ov-kpi--zero {
    --kpi-accent: #166534;
    --kpi-bar: #166534;
    --kpi-tint: #f0f8f3;
    --kpi-border: #cfe7d8;
}

.ov-kpi-head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ov-kpi-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    color: var(--kpi-accent);
    font-size: 18px;
    line-height: 1;
    box-shadow: 0 6px 14px -10px rgba(16, 24, 40, 0.5);
}

.ov-kpi-heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ov-kpi-label {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #374151;
}

.ov-kpi-meta {
    font-size: 13px;
    line-height: 1.35;
    color: var(--ov-slate-600);
}

.ov-kpi-value {
    font-size: 52px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--kpi-accent);
}

.ov-kpi-note {
    font-size: 13px;
    line-height: 1.45;
    color: var(--ov-slate-600);
}

.ov-kpi--today .ov-kpi-foot {
    align-self: flex-start;
    padding: 8px 14px;
    border: 1px solid var(--kpi-accent);
    border-radius: 999px;
    background: #fff;
}

.ov-kpi-foot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--kpi-accent);
}

.ov-kpi-foot .fa {
    font-size: 12px;
    transition: transform 0.15s ease;
}

/* Cases by origin */
.ov-origin-charts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 14px;
    width: 100%;
    min-width: 0;
    margin-top: auto;
}

.ov-origin-chart {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--ov-line);
    border-radius: var(--ov-radius);
    background: #fff;
}

.ov-origin-chart-head {
    padding: 8px 12px;
    border-bottom: 1px solid var(--ov-line);
    background: var(--ov-line-soft);
}

.ov-origin-chart-title {
    display: block;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--ov-slate-900);
}

.ov-origin-chart-body {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px;
}

.ov-origin-donut {
    position: relative;
    flex: 0 0 auto;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    box-shadow: 0 10px 22px -16px rgba(16, 24, 40, 0.65);
}

.ov-origin-slice-label {
    position: absolute;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 2px rgba(16, 24, 40, 0.35);
    pointer-events: none;
}

.ov-origin-hole {
    position: absolute;
    inset: 24%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(16, 24, 40, 0.06);
}

.ov-origin-total {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--ov-slate-900);
}

.ov-origin-caption {
    margin-top: 2px;
    font-size: 10px;
    line-height: 1.2;
    color: var(--ov-slate-600);
}

.ov-origin-legend {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.ov-origin-legend-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "swatch name"
        ". value";
    align-items: center;
    column-gap: 8px;
    row-gap: 2px;
    font-size: 12px;
    line-height: 1.3;
}

.ov-origin-legend-name {
    grid-area: name;
    min-width: 0;
    font-weight: 600;
    color: var(--ov-slate-700);
}

.ov-origin-legend-value {
    grid-area: value;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--ov-slate-600);
}

.ov-origin-swatch {
    grid-area: swatch;
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* ODs with zero cases */
.ov-zero-total {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0;
}

.ov-zero-total-value {
    font-size: 46px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--kpi-accent);
}

.ov-zero-total-caption {
    max-width: 140px;
    font-size: 13px;
    line-height: 1.35;
    color: var(--ov-slate-600);
}

.ov-zero-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.ov-zero-chip {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 8px 10px;
    border: 1px solid var(--ov-line);
    border-radius: 10px;
    background: #fff;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ov-zero-chip:hover {
    border-color: var(--kpi-accent);
}

.ov-zero-chip-flag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ov-slate-600);
}

.ov-zero-chip-flag::before {
    content: "";
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9ca3af;
}

.ov-zero-chip--3-year .ov-zero-chip-flag::before {
    background: #1e8449;
}

.ov-zero-chip--2-year .ov-zero-chip-flag::before {
    background: #2f75b5;
}

.ov-zero-chip--1-year .ov-zero-chip-flag::before {
    background: #e6a700;
}

.ov-zero-chip-count {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: #111827;
}

.ov-zero-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--ov-line);
}

.ov-link-btn {
    padding: 2px 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--ov-teal-700);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.ov-link-btn:hover {
    color: var(--ov-teal-900);
}

.ov-empty {
    margin: 0;
    font-size: 13px;
    text-align: center;
    color: var(--ov-slate-600);
}

/* ---------- Panels ---------- */

.ov-panel {
    position: relative;
    min-width: 0;
    margin: 0;
    background: var(--ov-surface);
    border: 1px solid var(--ov-line);
    border-radius: var(--ov-radius);
    box-shadow: var(--ov-shadow);
}

.ov-section > .ov-panel {
    margin-bottom: var(--ov-gap);
}

.ov-section > .ov-panel:last-child {
    margin-bottom: 0;
}

.ov-panel--table,
.ov-panel--map {
    overflow: hidden;
}

.ov-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 16px;
    padding: 14px 18px 10px;
    border-bottom: 1px solid var(--ov-line);
}

.ov-panel-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
    text-shadow: none;
    color: var(--ov-teal-900);
}

.ov-panel-meta {
    font-size: 12px;
    color: var(--ov-slate-500);
}

.ov-panel-note {
    margin: 0;
    padding: 8px 18px 12px;
    border-top: 1px solid var(--ov-line-soft);
    font-size: 11px;
    color: var(--ov-slate-500);
}

/* ---------- Maps ---------- */

.ov-map {
    width: 100%;
}

/* #mapPatient {
    height: clamp(360px, 52vh, 615px);
} */

#mapODZeroCase {
    height: 600px;
    min-height: 420px;
}

/* ---------- Layout grids ---------- */

.ov-grid {
    display: grid;
    gap: var(--ov-gap);
    margin-bottom: var(--ov-gap);
}

.ov-grid--gauges {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ov-grid--prevention {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.ov-grid--trends {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ov-grid + .ov-notes {
    margin-top: 12px;
}

/* ---------- Gauges ---------- */

.ov-panel--gauge {
    min-height: 360px;
    padding-top: 4px;
}

.ov-plot-scroll {
    overflow-x: auto;
    overflow-y: hidden;
}

.ov-gauge {
    width: 100%;
    min-width: 520px;
}

/* ---------- Tables ---------- */

.ov-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.overview .ov-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    background: var(--ov-surface);
    color: var(--ov-slate-900);
}

.overview .ov-table caption {
    caption-side: top;
}

.overview .ov-table thead th {
    padding: 8px 8px;
    border: 0;
    vertical-align: bottom;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #ffffff;
    background: var(--ov-teal-700);
}

.overview .ov-table thead tr.ov-table-toolbar th {
    padding: 10px 14px;
    border-bottom: 1px solid var(--ov-line);
    background: #f7fafc;
    color: var(--ov-teal-900);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    vertical-align: middle;
}

.ov-table-toolbar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
}

.ov-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--ov-teal-50);
    color: var(--ov-teal-900);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ov-badge--purple {
    background: #f3e8ff;
    color: var(--ov-purple-700);
}

.ov-table-range {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ov-slate-500);
}

.overview .ov-table thead .ov-row-head,
.overview .ov-table thead .ov-col-head,
.overview .ov-table thead .ov-group-head {
    background: var(--ov-teal-700);
}

.overview .ov-table thead .ov-row-head,
.overview .ov-table thead .ov-group-head {
    background: var(--ov-teal-900);
}

.overview .ov-table thead .ov-col-head--active {
    background: var(--ov-green-800);
}

.overview .ov-table thead .ov-col-head--residual {
    background: var(--ov-indigo-700);
}

.overview .ov-table thead .ov-col-head--cleared {
    background: var(--ov-purple-700);
}

.overview .ov-table thead .ov-col-head--static {
    background: var(--ov-teal-700);
}

.overview .ov-table thead .ov-col-head--mobile {
    background: var(--ov-indigo-700);
}

.overview .ov-table thead .ov-group-head--local {
    background: #0f766e;
}

.overview .ov-table thead .ov-col-head--intl {
    background: var(--ov-indigo-700);
}

.overview .ov-table thead .ov-sub-head {
    padding: 7px 8px;
    border-bottom: 1px solid var(--ov-line);
    background: var(--ov-teal-50);
    color: var(--ov-teal-900);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.overview .ov-table thead .ov-sub-head--local {
    background: #d9f5ee;
    color: #064e3b;
}

.overview .ov-table tbody td,
.overview .ov-table tbody th {
    padding: 8px;
    border-top: 1px solid var(--ov-line-soft);
    font-size: 13px;
    font-weight: 400;
    color: var(--ov-slate-900);
    vertical-align: middle;
}

.overview .ov-table tbody th {
    font-weight: 600;
}

.overview .ov-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.overview .ov-table tbody tr:hover {
    background: var(--ov-teal-50);
}

.overview .ov-table .ov-cell--local {
    background: #effaf7;
}

.overview .ov-table .ov-cell--intl {
    background: #eef1ff;
}

.overview .ov-table tfoot th {
    padding: 8px;
    border-top: 2px solid var(--ov-line);
    background: #f7fafc;
    color: var(--ov-slate-700);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.overview .ov-table tfoot .ov-total-local {
    background: #e2f6ef;
    color: #064e3b;
}

.overview .ov-table tfoot .ov-total-intl {
    background: #ecefff;
    color: #1e3a8a;
}

.overview .ov-table .ov-num {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.overview .ov-table thead .ov-divider {
    border-right: 2px solid rgba(255, 255, 255, 0.35);
}

.overview .ov-table tbody .ov-divider,
.overview .ov-table tfoot .ov-divider {
    border-right: 2px solid #e5e7eb;
}

.overview .case-investigation-table {
    min-width: 980px;
}

.overview .case-investigation-table thead th,
.overview .case-investigation-table tbody th,
.overview .case-investigation-table tbody td,
.overview .case-investigation-table tfoot th {
    padding-right: 6px;
    padding-left: 6px;
}

.overview .risk-table {
    min-width: 640px;
}

.overview .itn-table {
    min-width: 360px;
}

.overview .foci-table {
    min-width: 360px;
}

.overview .foci-table thead th,
.overview .foci-table tbody th,
.overview .foci-table tbody td {
    padding-right: 6px;
    padding-left: 6px;
}

.ov-scroll-hint {
    display: none;
    margin: 0;
    padding: 8px 14px;
    border-top: 1px solid var(--ov-line);
    background: #f7fafc;
    font-size: 11px;
    color: var(--ov-slate-500);
}

/* ---------- Notes ---------- */

.ov-notes {
    margin: 0;
    padding: 12px 16px;
    border-top: 1px solid var(--ov-line);
    background: #fbfdfe;
    font-size: 12px;
    line-height: 1.55;
    color: var(--ov-slate-500);
}

.ov-notes p {
    margin: 0 0 6px;
}

.ov-notes p:last-child {
    margin-bottom: 0;
}

.ov-notes strong {
    color: var(--ov-slate-700);
}

/* ---------- Trend charts ---------- */

.ov-chart {
    width: 100%;
}

#chartSpecie {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 4px;
    min-height: 320px;
    margin: 0;
    padding: 4px 8px;
}

.specie-pie {
    width: 100%;
    max-width: 420px;
    height: 320px;
    min-width: 0;
    justify-self: center;
}

.specie-chart-empty {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    height: 100%;
    font-size: 13px;
    text-align: center;
    color: var(--ov-slate-500);
}

.ov-specie-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
    padding: 4px 16px 16px;
}

.ov-toggle-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ov-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 4px 10px;
    border: 1px solid var(--ov-line);
    border-radius: 999px;
    background: var(--ov-surface);
    font-size: 12px;
    font-weight: 600;
    color: var(--ov-slate-700);
    cursor: pointer;
}

.ov-toggle:hover {
    border-color: var(--ov-teal-500);
}

.ov-toggle input {
    margin: 0;
    cursor: pointer;
}

.ov-toggle-swatch {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

/* ---------- Overview modals ---------- */

#modalCase .modal-dialog {
    max-width: 950px;
}

#modalCase .modal-content {
    width: auto;
}

#modalCase .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#modalCase .case-modal-table {
    margin-bottom: 0;
}

#modalCase .case-modal-table thead th,
#modalODZeroCase .od-zero-table thead th {
    background: var(--ov-teal-700);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

#modalCase .no-data-cell {
    padding: 10px;
}

#modalODZeroCase .modal-dialog {
    max-width: 1100px;
}

.od-zero-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.od-zero-toolbar .btn.active {
    background-color: var(--ov-teal-700);
    border-color: var(--ov-teal-700);
    color: #ffffff;
}

.od-zero-search {
    width: 260px;
    max-width: 100%;
}

.od-zero-table td {
    vertical-align: middle;
}

.od-zero-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.od-zero-badge--3 {
    background: #d1fae5;
    color: #065f46;
}

.od-zero-badge--2 {
    background: #dbeafe;
    color: #1e40af;
}

.od-zero-badge--1 {
    background: #fef3c7;
    color: #92400e;
}

.od-zero-badge--none {
    background: #f3f4f6;
    color: #4b5563;
}

.od-zero-scroll {
    max-height: 60vh;
    overflow: auto;
}

.od-zero-result-count {
    line-height: 34px;
}

.od-zero-footnote {
    margin: 10px 0 0;
    font-size: 11px;
    color: var(--ov-slate-500);
}

/* ---------- Responsive ---------- */

@media (max-width: 1639.98px) {
    .ov-grid--gauges {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1399.98px) {
    .ov-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ov-kpi--origin {
        grid-column: 1 / -1;
        order: 3;
    }

    .ov-origin-donut {
        width: 180px;
        height: 180px;
    }

    .ov-origin-total {
        font-size: 32px;
    }
}

@media (max-width: 1199.98px) {
    .ov-grid--prevention {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) and (max-width: 1639.98px) {
    .ov-grid--gauges > .ov-panel--gauge:last-child {
        grid-column: 1 / -1;
    }

    .ov-grid--gauges > .ov-panel--gauge:last-child .ov-gauge {
        max-width: 760px;
        margin: 0 auto;
    }
}

@media (max-width: 1099.98px) {
    .ov-grid--gauges {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 1399.98px) {
    .ov-scroll-hint {
        display: block;
    }
}

@media (max-width: 991.98px) {
    .ov-section {
        margin-bottom: 28px;
    }

    .ov-section-title {
        font-size: 19px;
    }

    .ov-section-head {
        align-items: flex-start;
    }

    .ov-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .ov-hero-title {
        font-size: 24px;
    }

    .ov-grid--trends {
        grid-template-columns: minmax(0, 1fr);
    }

    .ov-grid--prevention {
        grid-template-columns: minmax(0, 1fr);
    }

    .ov-kpi-value {
        font-size: 46px;
    }
}

@media (max-width: 767.98px) {
    .ov-summary-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ov-origin-charts {
        grid-template-columns: minmax(0, 1fr);
    }

    .ov-hero-watermark {
        display: none;
    }

    .od-zero-search {
        width: 100%;
    }

    .od-zero-toolbar {
        align-items: stretch;
    }
}

@media (max-width: 575.98px) {
    .overview {
        padding: 0 12px 24px;
    }

    .ov-hero {
        padding: 18px;
    }

    .ov-hero-title {
        font-size: 20px;
    }

    .ov-hero-subtitle {
        font-size: 12px;
    }

    .ov-hero-chip {
        flex: 1 1 140px;
    }

    .ov-kpi {
        padding: 16px;
    }

    .ov-kpi-value {
        font-size: 44px;
    }

    .ov-origin-donut {
        width: 140px;
        height: 140px;
    }

    .ov-origin-total {
        font-size: 24px;
    }

    .ov-section-meta {
        font-size: 12px;
    }

    .ov-panel-head {
        padding: 12px 14px 8px;
    }

    .ov-notes {
        padding: 10px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ov-kpi--today,
    .ov-kpi--today .ov-kpi-foot .fa,
    .ov-zero-chip {
        transition: none;
    }
}

/* ==================== Dashboard skeleton ==================== */

/*
 * First-load placeholder for the Overview tab. Geometry mirrors .overview and
 * the top of dashboard_overview_view.php so nothing shifts when data lands.
 * Heights below track .ov-hero, .ov-kpi, #mapPatient (615), #mapODZeroCase
 * (600) and the case-investigation table; update them together.
 */

.dash-skeleton {
    max-width: 1720px;
    margin: 25px auto 0; /* matches .bluecontainer + .overview */
    padding: 0 20px 28px;
}

.dash-skeleton .sk-block {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 6px;
    background: #e8f1f3;
}

.dash-skeleton .sk-block::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
    animation: dash-skeleton-sweep 1.6s ease-in-out infinite;
}

@keyframes dash-skeleton-sweep {
    100% {
        transform: translateX(100%);
    }
}

/* Hero */
.dash-skeleton-hero {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px 32px;
    min-height: 110px;
    margin-bottom: var(--ov-gap);
    padding: 22px 26px;
    border-radius: var(--ov-radius-lg);
    overflow: hidden;
    background:
        radial-gradient(circle at 88% 8%, rgba(255, 255, 255, 0.16), transparent 40%),
        radial-gradient(circle at 4% 120%, rgba(0, 172, 193, 0.35), transparent 46%),
        linear-gradient(115deg, #082f52 0%, #0b4a75 55%, #0f6f7a 100%);
}

.dash-skeleton-hero::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--ov-gold);
}

.dash-skeleton-hero .sk-block {
    background: rgba(255, 255, 255, 0.16);
}

.dash-skeleton-hero-main {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.dash-skeleton-hero-chips {
    display: flex;
    gap: 10px;
}

.sk-eyebrow {
    width: 120px;
    height: 12px;
}

.sk-hero-title {
    width: 320px;
    max-width: 100%;
    height: 30px;
}

.sk-hero-subtitle {
    width: 420px;
    max-width: 100%;
    height: 14px;
}

.sk-block.sk-chip {
    width: 128px;
    height: 54px;
    border-radius: 10px;
}

/* Summary band */
.dash-skeleton-kpis {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
    gap: var(--ov-gap);
    margin-bottom: 36px;
}

.sk-panel {
    background: var(--ov-surface);
    border: 1px solid var(--ov-line);
    border-radius: var(--ov-radius-lg);
    box-shadow: var(--ov-shadow);
}

.sk-panel--kpi {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 270px;
    padding: 20px 22px;
}

.sk-panel--origin {
    min-height: 0;
}

.sk-kpi-head {
    height: 44px;
}

.sk-kpi-value {
    width: 45%;
    height: 46px;
}

.sk-kpi-note {
    width: 70%;
    height: 14px;
}

.sk-kpi-foot {
    width: 180px;
    height: 30px;
    margin-top: auto;
}

.sk-kpi-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.sk-kpi-chips .sk-chip {
    width: auto;
}

.sk-origin-charts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 14px;
    width: 100%;
    margin: auto 0 0;
}

.sk-origin-chart {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--ov-line);
    border-radius: var(--ov-radius);
    background: #fff;
}

.sk-origin-head {
    height: 32px;
    border-bottom: 1px solid var(--ov-line);
}

.sk-origin-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
}

.sk-block.sk-donut {
    flex: 0 0 auto;
    width: 150px;
    height: 150px;
    border-radius: 50%;
}

.sk-legend {
    flex: 1 1 auto;
    height: 76px;
}

/* Section frame */
.sk-section {
    margin-bottom: 36px;
}

.sk-section-head {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ov-line);
}

.sk-section-title {
    width: 280px;
    height: 24px;
}

/* Panels */
.sk-panel--map,
.sk-panel--table {
    overflow: hidden;
}

.sk-panel--map {
    margin-bottom: var(--ov-gap);
}

.sk-panel--map:last-child {
    margin-bottom: 0;
}

.sk-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px 10px;
    border-bottom: 1px solid var(--ov-line);
}

.sk-panel-title {
    width: 260px;
    height: 16px;
}

.sk-panel-meta {
    width: 140px;
    height: 12px;
}

.sk-block.sk-map {
    border-radius: 0;
}

.sk-map--patient {
    height: 615px;
}

.sk-map--zero {
    height: 600px;
}

/* Investigation table */
.sk-table-toolbar {
    padding: 10px 14px;
    border-bottom: 1px solid var(--ov-line);
    background: #f7fafc;
}

.sk-badge {
    width: 130px;
    height: 16px;
}

.sk-table-row {
    display: grid;
    grid-template-columns: 1.6fr repeat(8, minmax(0, 1fr));
    gap: 10px;
    padding: 10px 8px;
    border-top: 1px solid var(--ov-line-soft);
}

.sk-table-row .sk-block {
    height: 14px;
}

/* Trends */
.dash-skeleton-trends {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--ov-gap);
}

.sk-block.sk-chart {
    height: 320px;
    border-radius: 0;
}

/* Responsive: mirrors the .overview breakpoints */
@media (max-width: 1399.98px) {
    .dash-skeleton-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sk-panel--origin {
        grid-column: 1 / -1;
        order: 3;
    }

    .sk-block.sk-donut {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 991.98px) {
    .dash-skeleton-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .dash-skeleton-kpis,
    .sk-section {
        margin-bottom: 28px;
    }

    .dash-skeleton-trends {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 767.98px) {
    .dash-skeleton-kpis {
        grid-template-columns: minmax(0, 1fr);
    }

    .sk-origin-charts {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 575.98px) {
    .dash-skeleton {
        padding: 0 12px 24px;
    }

    .dash-skeleton-hero {
        padding: 18px;
    }

    .sk-panel--kpi {
        padding: 16px;
    }

    .sk-block.sk-donut {
        width: 140px;
        height: 140px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dash-skeleton .sk-block::after {
        animation: none;
    }
}
