/* NGBVD Modern UI Revamp
   Government-grade interface layer for the authenticated application and public pages.
   It intentionally keeps existing Blade forms, selectize dropdowns, DataTables and chart markup compatible. */
:root {
    --ngbvd-yellow: #FDB209;
    --ngbvd-yellow-soft: #fff4cf;
    --ngbvd-black: #111827;
    --ngbvd-red: #d90429;
    --ngbvd-green: #15803d;
    --ngbvd-blue: #1d4ed8;
    --ngbvd-bg: #f4f6fb;
    --ngbvd-surface: #ffffff;
    --ngbvd-muted: #64748b;
    --ngbvd-border: #e5e7eb;
    --ngbvd-sidebar: #101827;
    --ngbvd-sidebar-2: #172033;
    --ngbvd-shadow: 0 18px 42px rgba(15, 23, 42, .08);
    --ngbvd-radius: 16px;
    --ngbvd-sidebar-width: 286px;
    --ngbvd-sidebar-collapsed-width: 82px;
    --ngbvd-topbar-height: 72px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.ngbvd-body {
    margin: 0;
    min-height: 100vh;
    background: var(--ngbvd-bg);
    color: var(--ngbvd-black);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
}
a { color: inherit; }
a:hover { text-decoration: none; }
.ngbvd-app-shell { min-height: 100vh; }
.ngbvd-sidebar-backdrop { display:none; }
.ngbvd-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--ngbvd-sidebar-width);
    background: linear-gradient(180deg, var(--ngbvd-sidebar), var(--ngbvd-sidebar-2));
    color: #e5e7eb;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    box-shadow: 12px 0 36px rgba(15, 23, 42, .2);
    transition: width .22s ease, transform .22s ease;
}
.ngbvd-sidebar-brand {
    min-height: var(--ngbvd-topbar-height);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.ngbvd-sidebar-brand img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #fff; padding: 4px; }
.ngbvd-sidebar-brand .brand-title { font-weight: 800; font-size: 1rem; line-height: 1.1; color: #fff; }
.ngbvd-sidebar-brand .brand-subtitle { display:block; font-size: .72rem; color: #aeb8ca; margin-top: 3px; }
.ngbvd-sidebar-body { padding: 14px 12px 24px; overflow-y: auto; flex: 1; }
.ngbvd-nav-section { margin: 8px 0 18px; }
.ngbvd-nav-section-title { padding: 0 12px 8px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #94a3b8; font-weight: 800; }
.ngbvd-nav-link,
.ngbvd-nav-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 12px;
    color: #dbe4f0;
    border: 0;
    background: transparent;
    text-align: left;
    font-weight: 700;
    cursor: pointer;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}
.ngbvd-nav-link:hover,
.ngbvd-nav-toggle:hover,
.ngbvd-nav-link.active,
.ngbvd-nav-toggle.active {
    color: #111827;
    background: var(--ngbvd-yellow);
    transform: translateX(2px);
}
.ngbvd-nav-icon { width: 22px; display:inline-flex; justify-content:center; font-size: 1rem; }
.ngbvd-nav-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ngbvd-nav-caret { margin-left: auto; transition: transform .16s ease; }
.ngbvd-nav-group.open .ngbvd-nav-caret { transform: rotate(90deg); }
.ngbvd-nav-submenu { display:none; margin: 5px 0 8px 36px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.14); }
.ngbvd-nav-group.open .ngbvd-nav-submenu { display:block; }
.ngbvd-nav-submenu a { display:block; padding: 8px 10px; border-radius: 10px; color:#cbd5e1; font-weight: 650; }
.ngbvd-nav-submenu a:hover,
.ngbvd-nav-submenu a.active { background: rgba(253,178,9,.16); color: #fff; }
.ngbvd-main {
    min-height: 100vh;
    margin-left: var(--ngbvd-sidebar-width);
    transition: margin-left .22s ease;
}
.ngbvd-topbar {
    min-height: var(--ngbvd-topbar-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--ngbvd-border);
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding: 0 24px;
}
.ngbvd-topbar-left { display:flex; align-items:center; gap:14px; min-width: 0; }
.ngbvd-sidebar-toggle,
.ngbvd-mobile-toggle {
    width: 42px; height: 42px; border-radius: 12px; border:1px solid var(--ngbvd-border); background:#fff; color:#111827;
    display:inline-flex; align-items:center; justify-content:center; cursor:pointer; font-weight:900;
}
.ngbvd-mobile-toggle { display:none; }
.ngbvd-topbar-title { margin:0; font-size: 1rem; font-weight: 900; line-height:1.2; }
.ngbvd-topbar-subtitle { color:var(--ngbvd-muted); font-size:.82rem; margin-top:2px; }
.ngbvd-user-menu { display:flex; align-items:center; gap:12px; }
.ngbvd-user-pill { display:flex; align-items:center; gap:10px; background:#fff; border:1px solid var(--ngbvd-border); border-radius:999px; padding:7px 12px; box-shadow:0 6px 18px rgba(15,23,42,.04); }
.ngbvd-avatar { width:34px; height:34px; border-radius:50%; background:var(--ngbvd-yellow); color:#111827; display:inline-flex; align-items:center; justify-content:center; font-weight:900; }
.ngbvd-logout { border:1px solid var(--ngbvd-border); background:#111827; color:#fff; border-radius:10px; padding:9px 13px; font-weight:800; }
.ngbvd-flag-strip { display:grid; grid-template-columns:1fr; }
.ngbvd-flag-strip span:nth-child(1){height:3px;background:#000}.ngbvd-flag-strip span:nth-child(2){height:3px;background:#facc15}.ngbvd-flag-strip span:nth-child(3){height:3px;background:#dc2626}
.ngbvd-content {
    padding: 24px;
}
.ngbvd-page-container { max-width: 100%; }
.ngbvd-card,
.card {
    border: 1px solid var(--ngbvd-border) !important;
    border-radius: var(--ngbvd-radius) !important;
    box-shadow: var(--ngbvd-shadow) !important;
    background: var(--ngbvd-surface) !important;
}
.card { margin-bottom: 18px; overflow: hidden; }
.card .card-block, .card .card-body { padding: 18px; }
.page-body { background: transparent !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; }

.card-header { background:#fff !important; border-bottom:1px solid var(--ngbvd-border) !important; font-weight:800; }
.ngbvd-alert { border-radius:14px; border:1px solid var(--ngbvd-border); box-shadow:0 10px 30px rgba(15,23,42,.06); }
.ngbvd-page-title { font-weight: 900; color:#111827; margin:0 0 4px; letter-spacing:-.01em; }
.ngbvd-page-subtitle { color:var(--ngbvd-muted); font-size:.95rem; }
.btn, button, input, select, textarea { font-family: inherit; }
.btn-primary, .btn.btn-primary { background:var(--ngbvd-yellow) !important; border-color:var(--ngbvd-yellow) !important; color:#111827 !important; font-weight:800; box-shadow:0 8px 20px rgba(253,178,9,.22); }
.btn-secondary { font-weight:800; }
.form-control, .selectize-input {
    border-radius: 10px !important;
    border-color: #d8dee9 !important;
    min-height: 40px;
}
.form-control:focus, .selectize-input.focus {
    border-color: var(--ngbvd-yellow) !important;
    box-shadow: 0 0 0 .18rem rgba(253,178,9,.16) !important;
}
label { font-weight: 700; color:#334155; }
.table { background:#fff; }
.table thead th { background:#f8fafc; color:#334155; border-bottom:1px solid var(--ngbvd-border); font-weight:900; }
.table td, .table th { vertical-align: middle !important; }
.ngbvd-tabs { display:flex; flex-wrap:wrap; gap:8px; border-bottom:0 !important; }
.ngbvd-tabs .nav-link { border:1px solid var(--ngbvd-border) !important; border-radius:999px !important; background:#fff; color:#475569; font-weight:800; }
.ngbvd-tabs .nav-link.active { background:var(--ngbvd-yellow) !important; border-color:var(--ngbvd-yellow) !important; color:#111827 !important; }
.ngbvd-form-section legend { font-size: 1rem; font-weight:900; color:#111827; border-left: 4px solid var(--ngbvd-yellow); padding-left:10px; margin:1.2rem 0 1rem; }
/* Compatibility with old pcoded page wrappers */
.pcoded-content, .pcoded-inner-content, .main-body, .page-wrapper { margin:0 !important; padding:0 !important; }
.page-header.card { margin-bottom: 18px; }
.pcoded-main-container, .pcoded-wrapper, .pcoded-container { background: transparent !important; margin:0 !important; }

/* Dashboard and legacy content stabilisation */
.ngbvd-content .row { margin-left: -10px; margin-right: -10px; }
.ngbvd-content [class*="col-"] { padding-left: 10px; padding-right: 10px; }
.widget-card-1 { min-height: 116px; }
.widget-card-1 .card-block-small { padding: 18px 18px 20px !important; min-height: 104px; }
.widget-card-1 h4 { margin: 6px 0 8px; font-weight: 900; color: #0f172a; }
.widget-card-1 .card1-icon { width: 46px; height: 46px; line-height: 46px; border-radius: 14px; }
#top_districts, #national_status, #regions, #line-example, #donut-example { min-height: 340px; width: 100%; }
#column-chart, #column-chart-agegroups { min-height: 560px; width: 100%; }
.highcharts-container, .highcharts-root { width: 100% !important; }
.ngbvd-page-container > .pcoded-content { width: 100%; }
.pcoded-content .page-body > .row:first-child { margin-top: 0; }
.ngbvd-license-alert { border-radius: 12px; font-size: .82rem; line-height: 1.35; }

/* Collapsed sidebar */
body.ngbvd-sidebar-collapsed .ngbvd-sidebar { width: var(--ngbvd-sidebar-collapsed-width); }
body.ngbvd-sidebar-collapsed .ngbvd-main { margin-left: var(--ngbvd-sidebar-collapsed-width); }
body.ngbvd-sidebar-collapsed .brand-title,
body.ngbvd-sidebar-collapsed .brand-subtitle,
body.ngbvd-sidebar-collapsed .ngbvd-nav-section-title,
body.ngbvd-sidebar-collapsed .ngbvd-nav-text,
body.ngbvd-sidebar-collapsed .ngbvd-nav-caret { display:none; }
body.ngbvd-sidebar-collapsed .ngbvd-nav-submenu { display:none !important; }
body.ngbvd-sidebar-collapsed .ngbvd-license-alert { display:none !important; }
body.ngbvd-sidebar-collapsed .ngbvd-sidebar-brand { justify-content:center; padding-left:10px; padding-right:10px; }
body.ngbvd-sidebar-collapsed .ngbvd-sidebar-brand img { width:48px; height:48px; }
body.ngbvd-sidebar-collapsed .ngbvd-sidebar-body { overflow-x:hidden; padding-left:10px; padding-right:10px; }
body.ngbvd-sidebar-collapsed .ngbvd-nav-link,
body.ngbvd-sidebar-collapsed .ngbvd-nav-toggle { justify-content:center; padding-left:10px; padding-right:10px; }
body.ngbvd-sidebar-collapsed .ngbvd-nav-link:hover,
body.ngbvd-sidebar-collapsed .ngbvd-nav-toggle:hover,
body.ngbvd-sidebar-collapsed .ngbvd-nav-link.active,
body.ngbvd-sidebar-collapsed .ngbvd-nav-toggle.active { transform:none; }
body.ngbvd-sidebar-collapsed .ngbvd-nav-icon { width:100%; font-size:1.15rem; }
/* Auth pages */
.ngbvd-auth-shell { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; background:linear-gradient(135deg, #fff8e6 0%, #f7fafc 52%, #fff 100%); }
.ngbvd-auth-card { width:min(1040px,100%); display:grid; grid-template-columns: .95fr 1.05fr; background:#fff; border-radius:24px; overflow:hidden; box-shadow:0 28px 80px rgba(15,23,42,.16); border:1px solid var(--ngbvd-border); }
.ngbvd-auth-brand { padding:46px; background:linear-gradient(145deg, var(--ngbvd-yellow), #ffe6a3); color:#111827; position:relative; overflow:hidden; }
.ngbvd-auth-brand:after { content:''; position:absolute; width:260px; height:260px; right:-90px; bottom:-90px; border-radius:50%; background:rgba(255,255,255,.35); }
.ngbvd-auth-brand img { max-width: 188px; margin-bottom:28px; position:relative; z-index:1; }
.ngbvd-auth-brand h1 { font-size:clamp(1.7rem, 4vw, 2.6rem); font-weight:900; line-height:1.08; letter-spacing:-.04em; position:relative; z-index:1; }
.ngbvd-auth-brand p { color:#374151; line-height:1.7; position:relative; z-index:1; }
.ngbvd-auth-form { padding:46px; }
.ngbvd-login-box .auth-box { box-shadow:none !important; border:0 !important; padding:0 !important; }
.ngbvd-login-box .login-card { width:100% !important; max-width: none !important; }
/* Optional development debugbar suppression: set NGBVD_HIDE_DEBUGBAR=true and add a view env check in layout. */
body.ngbvd-hide-debugbar #phpdebugbar,
body.ngbvd-hide-debugbar .phpdebugbar { display:none !important; }
@media (max-width: 991px) {
    .ngbvd-mobile-toggle { display:inline-flex; }
    .ngbvd-sidebar { transform: translateX(-102%); width: var(--ngbvd-sidebar-width); }
    body.ngbvd-sidebar-open .ngbvd-sidebar { transform: translateX(0); }
    body.ngbvd-sidebar-open .ngbvd-sidebar-backdrop { display:block; position:fixed; inset:0; background:rgba(15,23,42,.48); z-index:1030; }
    .ngbvd-main { margin-left:0 !important; }
    .ngbvd-content { padding:18px; }
    #top_districts, #national_status, #regions, #line-example, #donut-example { min-height: 300px; }
    .ngbvd-topbar { padding:0 16px; }
    .ngbvd-sidebar-toggle { display:none; }
    .ngbvd-user-pill small { display:none; }
}
@media (max-width: 768px) {
    .ngbvd-auth-card { grid-template-columns:1fr; }
    .ngbvd-auth-brand, .ngbvd-auth-form { padding:30px; }
}

/* Dashboard completion and chart stability patch */
.ngbvd-dashboard-header {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    margin-bottom:18px;
}
.ngbvd-dashboard-header h2 { margin:0; font-weight:900; letter-spacing:-.02em; }
.ngbvd-dashboard-header p { margin:5px 0 0; color:var(--ngbvd-muted); }
.ngbvd-dashboard-actions { display:flex; gap:8px; flex-wrap:wrap; }
.ngbvd-stat-row { margin-bottom:16px; }
.ngbvd-stat-card {
    display:flex;
    align-items:center;
    gap:16px;
    background:#fff;
    border:1px solid var(--ngbvd-border);
    border-radius:18px;
    padding:18px;
    box-shadow:var(--ngbvd-shadow);
    min-height:116px;
}
.ngbvd-stat-icon { width:58px; height:58px; border-radius:16px; background:#3b82f6; color:#fff; display:flex; align-items:center; justify-content:center; font-size:1.55rem; flex:0 0 auto; }
.ngbvd-stat-card span { display:block; color:#2563eb; font-weight:800; }
.ngbvd-stat-card strong { display:block; font-size:1.65rem; margin:3px 0; font-weight:900; }
.ngbvd-stat-card small { color:#64748b; }
.ngbvd-dashboard-grid .card { margin-bottom:24px; }
.ngbvd-chart-card { overflow:visible !important; }
.ngbvd-chart-card .card-block { padding:22px !important; overflow:visible; }
.ngbvd-chart-card #top_districts { min-height:520px; }
.ngbvd-chart-card #national_status,
.ngbvd-chart-card #regions,
.ngbvd-chart-card #line-example,
.ngbvd-chart-card #donut-example { min-height:420px; }
.ngbvd-chart-card #column-chart,
.ngbvd-chart-card #column-chart-agegroups { min-height:580px; overflow-x:auto; }
.ngbvd-chart-card .morris-hover { z-index: 40; }
.highcharts-container { overflow:visible !important; }
.highcharts-root text { font-family: Arial, Helvetica, sans-serif !important; }

/* Data-entry incident picker */
.ngbvd-date-field { position:relative; }
.ngbvd-date-field .form-control { padding-right:42px; background:#fff !important; cursor:pointer; }
.ngbvd-date-icon { position:absolute; right:13px; top:50%; transform:translateY(-50%); color:#64748b; pointer-events:none; }
.ngbvd-section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:14px; margin-top:16px; }
.ngbvd-section-heading legend { margin-bottom:2px; }
.ngbvd-section-heading p { margin:0 0 10px; color:#64748b; }
.ngbvd-selected-count { display:inline-flex; align-items:center; justify-content:center; padding:6px 12px; border-radius:999px; background:#fff7db; color:#92400e; font-weight:800; border:1px solid #fde68a; margin-bottom:10px; }
.ngbvd-incident-search-wrap { position:relative; margin-bottom:14px; }
.ngbvd-incident-search-wrap i { position:absolute; left:13px; top:50%; transform:translateY(-50%); color:#64748b; }
.ngbvd-incident-search-wrap input { padding-left:38px; }
.ngbvd-incident-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:10px; margin-bottom:14px; }
.ngbvd-incident-option { display:flex; align-items:center; gap:10px; margin:0; padding:12px; border:1px solid #e2e8f0; border-radius:14px; background:#fff; cursor:pointer; font-weight:700; color:#334155; transition:all .16s ease; min-height:54px; }
.ngbvd-incident-option:hover { border-color:#fbbf24; box-shadow:0 8px 20px rgba(15,23,42,.06); transform:translateY(-1px); }
.ngbvd-incident-option input { position:absolute; opacity:0; pointer-events:none; }
.ngbvd-incident-check { width:22px; height:22px; border-radius:7px; border:2px solid #cbd5e1; display:flex; align-items:center; justify-content:center; color:#fff; flex:0 0 auto; font-size:.75rem; }
.ngbvd-incident-option.is-selected { border-color:#fbbf24; background:#fff8e1; color:#111827; }
.ngbvd-incident-option.is-selected .ngbvd-incident-check { background:#fbbf24; border-color:#fbbf24; color:#111827; }
.ngbvd-incident-option.is-hidden { display:none; }

/* Profiled cases grid */
.ngbvd-filter-card { padding:18px; margin-bottom:18px; }
.ngbvd-table-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.ngbvd-profiled-table { font-size:.88rem; }
.ngbvd-profiled-table thead th { position:sticky; top:0; z-index:5; white-space:nowrap; }
.ngbvd-profiled-table td { white-space:nowrap; }
.ngbvd-profiled-table .survivor-code { font-weight:900; color:#1d4ed8; }
.ngbvd-badge { display:inline-flex; align-items:center; justify-content:center; padding:4px 9px; border-radius:999px; font-size:.75rem; font-weight:800; }
.ngbvd-badge-success { background:#dcfce7; color:#166534; }
.ngbvd-badge-muted { background:#f1f5f9; color:#475569; }
.ngbvd-action-btn { display:inline-flex; align-items:center; gap:6px; padding:7px 10px; border-radius:10px; background:#111827; color:#fff !important; font-weight:800; }

/* Offline import */
.ngbvd-import-grid { display:grid; grid-template-columns:minmax(0, 1fr) 320px; gap:18px; }
.ngbvd-import-drop { border:2px dashed #cbd5e1; border-radius:18px; padding:28px; background:#fff; text-align:center; }
.ngbvd-import-drop i { font-size:2rem; color:#2563eb; }
.ngbvd-import-notes { background:#f8fafc; border:1px solid #e2e8f0; border-radius:16px; padding:18px; }
.ngbvd-import-notes h5 { font-weight:900; }
.ngbvd-import-notes ul { padding-left:18px; margin-bottom:0; }
@media (max-width: 991px) {
    .ngbvd-dashboard-header { flex-direction:column; }
    .ngbvd-import-grid { grid-template-columns:1fr; }
}

/* NGBVD refinement patch: richer forms, resilient dashboard, modern data grids */
.ngbvd-page-header,
.page-header.card.ngbvd-card {
    background: linear-gradient(135deg, #ffffff 0%, #fffaf0 100%) !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 18px !important;
    padding: 20px !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07) !important;
}
.ngbvd-data-entry-shell .card,
.ngbvd-form-card,
.ngbvd-form-section-card {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 18px !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06) !important;
}
.ngbvd-data-entry-shell form > .row,
.ngbvd-data-entry-shell .tab-pane > .row,
.ngbvd-data-entry-shell .ngbvd-form-row-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 16px 14px 6px;
    margin: 0 0 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
}
.ngbvd-data-entry-shell legend,
.ngbvd-data-entry-shell .ngbvd-form-section legend,
.ngbvd-section-heading legend {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    padding: 0 0 0 10px;
    margin: 0 0 14px;
    border-left: 4px solid #fdb209;
    font-size: 1rem;
    font-weight: 900;
    color: #111827;
}
.ngbvd-data-entry-shell .form-group.row {
    align-items: center;
    margin-bottom: 14px;
}
.ngbvd-data-entry-shell label,
.ngbvd-data-entry-shell .control-label,
.ngbvd-data-entry-shell .col-form-label {
    font-weight: 800;
    color: #334155;
}
.ngbvd-data-entry-shell .form-control,
.ngbvd-data-entry-shell .selectize-input {
    min-height: 44px;
    border-radius: 12px !important;
    background: #fff;
}
.ngbvd-data-entry-shell textarea.form-control { min-height: 116px; }
.ngbvd-step-tabs {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 10px;
    box-shadow: 0 10px 24px rgba(15,23,42,.04);
}
.ngbvd-step-tabs .nav-link {
    padding: 10px 16px !important;
    min-height: 42px;
}
.ngbvd-incident-picker-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 28px rgba(15,23,42,.055) !important;
    padding: 18px 16px 8px !important;
}
.ngbvd-incident-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}
.ngbvd-incident-option {
    border-radius: 16px;
    padding: 14px;
    min-height: 62px;
    background: #fff;
}
.ngbvd-incident-name { line-height: 1.25; }
.ngbvd-incident-option.is-selected,
.ngbvd-incident-option:has(input:checked) {
    background: #fff7db;
    border-color: #fdb209;
    box-shadow: 0 10px 22px rgba(253,178,9,.18);
}
.ngbvd-incident-option.is-hidden { display: none !important; }
.ngbvd-incident-check {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    border: 2px solid #cbd5e1;
    color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.ngbvd-incident-option.is-selected .ngbvd-incident-check,
.ngbvd-incident-option:has(input:checked) .ngbvd-incident-check {
    background: #fdb209;
    border-color: #fdb209;
    color: #111827;
}
.ngbvd-incident-option input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }

.ngbvd-chart-card,
.ngbvd-dashboard-panel {
    min-height: 420px;
    background: #fff !important;
}
.ngbvd-chart-card .card-block { min-height: inherit; }
.ngbvd-chart-empty {
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:260px;
    color:#64748b;
    font-weight:800;
    background: repeating-linear-gradient(45deg,#fff,#fff 10px,#f8fafc 10px,#f8fafc 20px);
    border:1px dashed #cbd5e1;
    border-radius:14px;
}
.ngbvd-fallback-container { min-height: 320px; width: 100%; }
.ngbvd-fallback-head { margin-bottom: 14px; }
.ngbvd-fallback-head h5 { margin: 0; font-size: 1.05rem; font-weight: 900; color: #1f2937; }
.ngbvd-fallback-head p { margin: 4px 0 0; color: #64748b; }
.ngbvd-fallback-chart { width: 100%; }
.ngbvd-fallback-row { display: grid; grid-template-columns: minmax(120px, 220px) 1fr auto; gap: 10px; align-items: center; margin: 8px 0; }
.ngbvd-fallback-label { font-weight: 800; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ngbvd-fallback-track { height: 14px; border-radius: 999px; background: #e5e7eb; overflow: hidden; }
.ngbvd-fallback-track span { display: block; height: 100%; background: linear-gradient(90deg, #38bdf8, #4f46e5); border-radius: inherit; }
.ngbvd-fallback-row strong { color: #111827; }
.ngbvd-fallback-total { display:flex; justify-content:space-between; align-items:center; padding:14px 16px; border-radius:16px; background:#f8fafc; border:1px solid #e2e8f0; margin-bottom:12px; }
.ngbvd-fallback-total span { color:#64748b; font-weight:800; }
.ngbvd-fallback-total strong { font-size:1.4rem; font-weight:900; }
.ngbvd-fallback-pie-row { display:grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items:center; padding:8px 0; border-bottom:1px solid #f1f5f9; }
.ngbvd-fallback-dot { width:12px; height:12px; border-radius:50%; background:#38bdf8; }
.ngbvd-fallback-dot.dot-1 { background:#4f46e5; }.ngbvd-fallback-dot.dot-2 { background:#22c55e; }.ngbvd-fallback-dot.dot-3 { background:#f97316; }.ngbvd-fallback-dot.dot-4 { background:#ef4444; }.ngbvd-fallback-dot.dot-5 { background:#14b8a6; }.ngbvd-fallback-dot.dot-6 { background:#8b5cf6; }.ngbvd-fallback-dot.dot-7 { background:#0f172a; }

.ngbvd-table-card { overflow: hidden; }
.ngbvd-table-toolbar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    flex-wrap:wrap;
    margin-bottom:14px;
    padding-bottom:12px;
    border-bottom:1px solid #e2e8f0;
}
.ngbvd-modern-table,
.ngbvd-profiled-table,
table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
}
.ngbvd-modern-table thead th,
.ngbvd-profiled-table thead th,
table.dataTable thead th {
    background: #f8fafc !important;
    color: #334155 !important;
    font-weight: 900 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    white-space: nowrap;
}
.ngbvd-modern-table tbody tr:hover,
.ngbvd-profiled-table tbody tr:hover,
table.dataTable tbody tr:hover { background: #fff7db !important; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border:1px solid #d8dee9;
    border-radius:10px;
    min-height:36px;
    padding:6px 10px;
}
.dataTables_wrapper .dt-buttons .dt-button {
    border:1px solid #d8dee9 !important;
    border-radius:10px !important;
    background:#fff !important;
    font-weight:800;
    padding:6px 10px !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius:10px !important;
    border:1px solid transparent !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background:#fdb209 !important;
    border-color:#fdb209 !important;
    color:#111827 !important;
}
.survivor-code { font-weight:900; color:#0f172a; background:#f1f5f9; border-radius:999px; padding:5px 10px; display:inline-flex; }
.ngbvd-action-btn { display:inline-flex; align-items:center; gap:6px; border-radius:999px; background:#111827; color:#fff !important; padding:7px 11px; font-weight:800; }
@media(max-width: 767px){
    .ngbvd-fallback-row { grid-template-columns: 1fr; gap: 4px; }
    .ngbvd-dashboard-header { flex-direction: column; }
}

/* ===== NGBVD UX refinement: forms, buttons, local visuals, map drill-down ===== */
.ngbvd-page-container { max-width: 100%; }
.ngbvd-content { background: linear-gradient(180deg, #f4f7fb 0%, #eef3f9 100%) !important; }
.ngbvd-card, .page-header.card, .ngbvd-filter-card, .ngbvd-table-card, .ngbvd-chart-card,
.ngbvd-settings-card, .ngbvd-form-card, .ngbvd-wizard-card {
    border: 1px solid rgba(148,163,184,.22) !important;
    border-radius: 20px !important;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08) !important;
    background: #fff !important;
}
.ngbvd-btn-primary, .btn-primary {
    border: 0 !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #fdb209 0%, #f97316 100%) !important;
    color: #111827 !important;
    font-weight: 900 !important;
    box-shadow: 0 12px 26px rgba(249,115,22,.22) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.ngbvd-btn-soft, .btn-outline-secondary {
    border: 1px solid #dbe3ef !important;
    border-radius: 14px !important;
    background: #fff !important;
    color: #334155 !important;
    font-weight: 900 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 18px rgba(15,23,42,.06) !important;
}
.btn:hover, .ngbvd-action-btn:hover { transform: translateY(-1px); }
.btn, .ngbvd-action-btn { transition: .18s ease; }
.ngbvd-dashboard-hero {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    margin-bottom:22px;
    padding:22px;
    border-radius:24px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #2563eb 100%);
    color:#fff;
    box-shadow:0 22px 55px rgba(30,58,138,.22);
}
.ngbvd-dashboard-hero h2 { margin:3px 0 6px; color:#fff; font-weight:1000; }
.ngbvd-dashboard-hero p { margin:0; color:#dbeafe; }
.ngbvd-kicker { text-transform:uppercase; font-size:.75rem; letter-spacing:.12em; font-weight:1000; color:#fdb209; }
.ngbvd-dashboard-actions { display:flex; gap:10px; flex-wrap:wrap; }
.ngbvd-stat-card-lg { min-height: 128px; }

.ngbvd-viz-title { margin-bottom: 18px; }
.ngbvd-viz-title h4 { margin:0; font-weight:1000; color:#1f2937; font-size:1.22rem; }
.ngbvd-viz-title p { margin:5px 0 0; color:#64748b; font-weight:600; }
.ngbvd-viz-bar-chart { display:flex; flex-direction:column; gap:9px; }
.ngbvd-viz-bar-row { display:grid; grid-template-columns: minmax(130px,240px) 1fr auto; gap:12px; align-items:center; }
.ngbvd-viz-bar-label { color:#334155; font-weight:900; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ngbvd-viz-bar-track { height:17px; border-radius:999px; background:#e5e7eb; overflow:hidden; box-shadow: inset 0 1px 2px rgba(15,23,42,.06); }
.ngbvd-viz-bar-track span { display:block; height:100%; border-radius:inherit; }
.ngbvd-viz-bar-row strong { font-weight:1000; color:#0f172a; }
.ngbvd-viz-grouped { min-height:300px; display:flex; gap:16px; align-items:flex-end; overflow-x:auto; padding:22px 4px 8px; border-bottom:1px solid #cbd5e1; }
.ngbvd-viz-gcol { min-width:66px; flex:0 0 auto; display:flex; flex-direction:column; align-items:center; gap:8px; }
.ngbvd-viz-gbars { height:290px; width:52px; display:flex; align-items:flex-end; justify-content:center; gap:5px; }
.ngbvd-viz-gbar { width:20px; min-height:3px; border-radius:7px 7px 0 0; position:relative; box-shadow:0 8px 18px rgba(15,23,42,.12); }
.ngbvd-viz-gbar em { display:none; position:absolute; left:50%; bottom:100%; transform:translateX(-50%); background:#111827; color:#fff; padding:4px 6px; border-radius:6px; font-style:normal; font-size:.72rem; white-space:nowrap; z-index:5; }
.ngbvd-viz-gbar:hover em { display:block; }
.ngbvd-viz-gcol small { transform: rotate(-38deg); transform-origin: top left; width:90px; margin-top:24px; color:#334155; font-weight:800; }
.ngbvd-viz-legend { display:flex; gap:14px; flex-wrap:wrap; margin-bottom:8px; color:#475569; font-weight:800; }
.ngbvd-viz-legend span { display:inline-flex; align-items:center; gap:6px; }
.ngbvd-viz-legend i { width:12px; height:12px; display:inline-block; border-radius:99px; }
.ngbvd-viz-pie-wrap { display:grid; grid-template-columns: 260px 1fr; gap:24px; align-items:center; }
.ngbvd-viz-donut { width:240px; height:240px; border-radius:50%; display:flex; align-items:center; justify-content:center; box-shadow:0 18px 45px rgba(15,23,42,.12); }
.ngbvd-viz-donut > div { width:145px; height:145px; border-radius:50%; background:#fff; display:flex; flex-direction:column; align-items:center; justify-content:center; box-shadow: inset 0 0 0 1px #e2e8f0; }
.ngbvd-viz-donut span { color:#64748b; font-weight:900; }
.ngbvd-viz-donut strong { font-size:1.55rem; font-weight:1000; color:#0f172a; }
.ngbvd-viz-pie-list { display:flex; flex-direction:column; gap:8px; }
.ngbvd-viz-pie-row { display:grid; grid-template-columns:14px 1fr auto; gap:9px; align-items:center; padding-bottom:7px; border-bottom:1px solid #f1f5f9; }
.ngbvd-viz-pie-row span { width:12px; height:12px; border-radius:99px; }
.ngbvd-viz-pie-row b { color:#334155; }
.ngbvd-viz-pie-row strong { color:#0f172a; }
.ngbvd-viz-svg-scroll { overflow-x:auto; }
.ngbvd-viz-svg-scroll svg { min-width:760px; width:100%; height:auto; }
.ngbvd-viz-svg-scroll text { font-size:12px; fill:#475569; font-weight:800; }
.ngbvd-viz-empty { min-height:260px; border:1px dashed #cbd5e1; border-radius:16px; display:flex; flex-direction:column; align-items:center; justify-content:center; background:#f8fafc; color:#64748b; }
.ngbvd-viz-empty strong { color:#334155; font-size:1.05rem; }

.ngbvd-data-entry-shell .page-header.card { padding:24px !important; }
.ngbvd-data-entry-shell .ngbvd-page-title { font-size:1.35rem; font-weight:1000; }
.ngbvd-data-entry-shell form.form-horizontal,
.ngbvd-data-entry-shell .ngbvd-form-section {
    background:#fff !important;
    border:1px solid rgba(148,163,184,.24);
    border-radius:22px;
    box-shadow:0 20px 50px rgba(15,23,42,.08);
    padding:24px;
    margin-top:18px;
}
.ngbvd-data-entry-shell .tab-pane { background:transparent; }
.ngbvd-data-entry-shell legend,
.ngbvd-data-entry-shell h4,
.ngbvd-data-entry-shell h5 {
    font-weight:1000;
    color:#0f172a;
}
.ngbvd-data-entry-shell legend {
    border-left:5px solid #fdb209;
    padding:12px 14px;
    margin:18px 0 18px;
    background:linear-gradient(90deg,#fff7db,#fff);
    border-radius:14px;
    font-size:1.06rem;
}
.ngbvd-data-entry-shell .row > legend + .col-sm-6,
.ngbvd-data-entry-shell .row > .col-sm-6,
.ngbvd-data-entry-shell .row > .col-md-6 {
    margin-bottom:8px;
}
.ngbvd-data-entry-shell .form-control,
.ngbvd-data-entry-shell .selectize-input {
    border-radius:14px !important;
    min-height:46px;
    border-color:#dbe3ef !important;
    background:#fff !important;
    box-shadow:none !important;
}
.ngbvd-data-entry-shell .form-control:focus,
.ngbvd-data-entry-shell .selectize-input.focus {
    border-color:#fdb209 !important;
    box-shadow:0 0 0 4px rgba(253,178,9,.15) !important;
}
.ngbvd-data-entry-shell label { font-weight:900; color:#1f2937; }
.ngbvd-step-tabs { border:0 !important; display:flex; gap:10px; flex-wrap:wrap; margin:20px 0 4px; }
.ngbvd-step-tabs .nav-link { border:1px solid #dbe3ef !important; background:#fff; border-radius:999px !important; padding:11px 20px !important; font-weight:1000; color:#334155; }
.ngbvd-step-tabs .nav-link.active { background:#fdb209 !important; color:#111827 !important; border-color:#fdb209 !important; box-shadow:0 12px 24px rgba(253,178,9,.18); }
.ngbvd-data-entry-shell input[type="hidden"] { display:none !important; visibility:hidden !important; width:0 !important; height:0 !important; padding:0 !important; border:0 !important; }
.ngbvd-data-entry-shell .testborder.xhide { background:#fff; border-top:1px solid #eef2f7; padding-top:18px; margin-top:20px; }

.ngbvd-case-modal .modal-dialog { max-width: min(1180px, 96vw); }
.ngbvd-case-modal .modal-content { border:0; border-radius:22px; overflow:hidden; box-shadow:0 28px 80px rgba(15,23,42,.28); }
.ngbvd-case-modal .modal-header { background:#0f172a; color:#fff; border:0; }
.ngbvd-case-modal .close { color:#fff; opacity:1; }
.ngbvd-case-frame { width:100%; height:76vh; border:0; background:#f4f7fb; }
.ngbvd-action-btn.ngbvd-preview-btn { background:#fdb209; color:#111827 !important; }

.ngbvd-upload-zone { border:2px dashed #cbd5e1; border-radius:22px; background:#f8fafc; padding:26px; text-align:center; transition:.18s ease; }
.ngbvd-upload-zone:hover { border-color:#fdb209; background:#fff7db; }
.ngbvd-upload-zone input[type=file] { background:#fff; border:1px solid #dbe3ef; padding:13px; border-radius:14px; width:100%; }
.ngbvd-settings-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap:18px; }
.ngbvd-settings-card { padding:22px; }
.ngbvd-settings-card h4 { font-weight:1000; color:#0f172a; margin-bottom:12px; }
.ngbvd-user-form-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:16px 22px; }
.ngbvd-user-form-grid .full { grid-column:1/-1; }
.ngbvd-user-card { padding:24px; }
.ngbvd-role-note { border-left:4px solid #2563eb; background:#eff6ff; color:#1e3a8a; border-radius:14px; padding:14px 16px; margin-bottom:18px; font-weight:700; }

.ngbvd-public-map { height: 650px; border-radius:24px; overflow:hidden; box-shadow:0 18px 45px rgba(15,23,42,.12); border:1px solid #e2e8f0; }
.ngbvd-map-layout { display:grid; grid-template-columns: 1fr 360px; gap:18px; align-items:stretch; }
.ngbvd-map-panel { background:#fff; border:1px solid #e2e8f0; border-radius:24px; padding:22px; box-shadow:0 18px 45px rgba(15,23,42,.09); min-height: 300px; }
.ngbvd-map-panel h3 { font-weight:1000; margin:8px 0; color:#0f172a; }
.ngbvd-map-panel h4 { margin:18px 0 8px; font-size:.95rem; font-weight:1000; color:#334155; }
.ngbvd-map-placeholder { border:1px dashed #cbd5e1; border-radius:16px; background:#f8fafc; padding:22px; color:#64748b; text-align:center; }
.ngbvd-map-total { background:linear-gradient(135deg,#0f172a,#1e3a8a); color:#fff; border-radius:18px; padding:16px; display:flex; justify-content:space-between; align-items:center; }
.ngbvd-map-total strong { font-size:1.5rem; }
.ngbvd-map-stat-row { display:flex; justify-content:space-between; gap:10px; border-bottom:1px solid #eef2f7; padding:8px 0; }
.ngbvd-map-stat-row span { font-weight:800; color:#334155; }
.ngbvd-map-stat-row strong { color:#0f172a; }
.ngbvd-chip-row { display:flex; flex-wrap:wrap; gap:8px; }
.ngbvd-chip { background:#f1f5f9; border:1px solid #e2e8f0; border-radius:999px; padding:7px 10px; font-weight:800; color:#334155; }
@media(max-width: 991px){
    .ngbvd-dashboard-hero { flex-direction:column; align-items:flex-start; }
    .ngbvd-viz-pie-wrap { grid-template-columns:1fr; }
    .ngbvd-map-layout { grid-template-columns:1fr; }
    .ngbvd-user-form-grid { grid-template-columns:1fr; }
}

/* Theme + Highcharts preservation patch */
.ngbvd-highcharts-dashboard .ngbvd-legacy-dashboard-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 58%, #2563eb 100%);
    color: #fff;
    padding: 22px;
    border-radius: 22px;
    box-shadow: 0 22px 55px rgba(30,58,138,.22);
    margin-bottom: 22px;
}
.ngbvd-highcharts-dashboard .ngbvd-legacy-dashboard-header h2 { color:#fff; margin:4px 0 6px; font-weight:1000; }
.ngbvd-highcharts-dashboard .ngbvd-legacy-dashboard-header p { color:#dbeafe; margin:0; }
.ngbvd-highcharts-dashboard .ngbvd-stat-row { margin-bottom: 18px; }
.ngbvd-highcharts-dashboard .widget-card-1.ngbvd-stat-card-legacy {
    border-radius: 18px !important;
    min-height: 118px;
    overflow: hidden;
}
.ngbvd-highcharts-dashboard .widget-card-1 .card-block-small { padding: 18px 20px !important; }
.ngbvd-highcharts-dashboard .ngbvd-chart-card { border-radius: 18px !important; overflow: visible !important; }
.ngbvd-highcharts-dashboard .ngbvd-chart-card .card-block { padding: 22px !important; }
.ngbvd-highcharts-dashboard #top_districts { min-height: 520px; }
.ngbvd-highcharts-dashboard #national_status,
.ngbvd-highcharts-dashboard #regions,
.ngbvd-highcharts-dashboard #line-example,
.ngbvd-highcharts-dashboard #donut-example { min-height: 420px; }
.ngbvd-highcharts-dashboard #column-chart,
.ngbvd-highcharts-dashboard #column-chart-agegroups { min-height: 600px; overflow-x: auto; }
.highcharts-container, .highcharts-root { max-width: 100% !important; }

/* Make all data entry screens sit on white surfaces/cards */
.ngbvd-data-entry-shell .page-header.card.page-body,
.ngbvd-data-entry-shell .page-body.ngbvd-card {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
}
.ngbvd-data-entry-shell .page-header-title,
.ngbvd-data-entry-shell .page-header-breadcrumb,
.ngbvd-data-entry-shell .ngbvd-step-tabs,
.ngbvd-data-entry-shell form.form-horizontal,
.ngbvd-data-entry-shell .tab-content,
.ngbvd-data-entry-shell .ngbvd-form-section,
.ngbvd-data-entry-shell .testborder.xhide {
    background: #fff !important;
}
.ngbvd-data-entry-shell .page-header-title,
.ngbvd-data-entry-shell .page-header-breadcrumb {
    border-radius: 18px;
    padding: 18px;
    border: 1px solid rgba(148,163,184,.22);
    box-shadow: 0 14px 36px rgba(15,23,42,.06);
}
.ngbvd-data-entry-shell .page-header-title { display:flex; align-items:center; gap:14px; }
.ngbvd-data-entry-shell .page-header-title i {
    width: 58px; height: 58px; display:inline-flex; align-items:center; justify-content:center;
    border-radius: 14px; box-shadow: 0 14px 28px rgba(236,72,153,.22);
}
.ngbvd-data-entry-shell .ngbvd-step-tabs {
    padding: 12px !important;
    margin: 18px 0 !important;
    border: 1px solid rgba(148,163,184,.22) !important;
    border-radius: 20px !important;
    box-shadow: 0 14px 36px rgba(15,23,42,.055) !important;
}
.ngbvd-data-entry-shell form.form-horizontal.ngbvd-form-section {
    border: 1px solid rgba(148,163,184,.24) !important;
    border-radius: 24px !important;
    box-shadow: 0 22px 56px rgba(15,23,42,.08) !important;
    padding: 26px !important;
    margin-top: 18px !important;
}
.ngbvd-data-entry-shell form.form-horizontal .row {
    background: #fff;
}
.ngbvd-data-entry-shell legend {
    display: block !important;
    width: 100% !important;
    background: linear-gradient(90deg, #fff7db 0%, #fff 100%) !important;
    border-left: 5px solid var(--ngbvd-primary, #FDB209) !important;
    border-radius: 14px !important;
    padding: 12px 14px !important;
    margin: 20px 0 18px !important;
    font-size: 1.08rem !important;
    font-weight: 1000 !important;
    color: #0f172a !important;
}
.ngbvd-data-entry-shell .form-group.row,
.ngbvd-data-entry-shell .form-group {
    background:#fff;
}
.ngbvd-data-entry-shell .form-control,
.ngbvd-data-entry-shell .selectize-input,
.ngbvd-data-entry-shell select.form-control {
    background: #fff !important;
    border-radius: 14px !important;
    min-height: 46px;
    border-color: #dbe3ef !important;
}
.ngbvd-data-entry-shell .testborder.xhide {
    border-top: 1px solid #eef2f7;
    border-radius: 0 0 22px 22px;
    margin: 20px -26px -26px;
    padding: 18px 26px !important;
}

/* Theme settings UI */
.ngbvd-settings-page .ngbvd-settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    gap: 20px;
    align-items: start;
}
.ngbvd-theme-preview {
    height: 140px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    display: grid;
    grid-template-columns: 90px 1fr;
    overflow: hidden;
    margin-bottom: 18px;
    background: #f4f6fb;
}
.ngbvd-theme-preview .preview-sidebar { background: var(--ngbvd-sidebar); }
.ngbvd-theme-preview .preview-main { padding: 16px; background: var(--ngbvd-bg); }
.ngbvd-theme-preview .preview-topbar { height: 24px; border-radius: 999px; background: #fff; margin-bottom: 16px; }
.ngbvd-theme-preview .preview-card { height: 44px; border-radius: 14px; background: #fff; box-shadow: 0 8px 18px rgba(15,23,42,.06); margin-bottom: 12px; }
.ngbvd-theme-preview .preview-button { width: 100px; height: 28px; border-radius: 999px; background: var(--ngbvd-primary); }
.ngbvd-color-input {
    height: 48px !important;
    padding: 5px !important;
    cursor: pointer;
}
@media (max-width: 991px) {
    .ngbvd-settings-page .ngbvd-settings-grid { grid-template-columns: 1fr; }
}

/* NGBVD stabilization overrides: restore polished UI and prevent regressions */
.ngbvd-dashboard-page{padding:28px 28px 44px!important;}
.ngbvd-dashboard-header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:22px!important;padding:30px!important;border-radius:24px!important;background:linear-gradient(135deg,#101b38,#2f66df)!important;color:#fff!important;margin-bottom:26px!important;box-shadow:0 24px 50px rgba(30,70,150,.18)!important;}
.ngbvd-dashboard-header h2{font-size:42px!important;font-weight:900!important;color:#fff!important;margin:5px 0!important;}
.ngbvd-dashboard-header p{color:rgba(255,255,255,.88)!important;margin:0!important;}
.ngbvd-kicker{display:block;font-weight:900!important;letter-spacing:.18em!important;text-transform:uppercase!important;color:#ffb400!important;font-size:12px!important;}
.ngbvd-dashboard-actions{display:flex!important;gap:12px!important;flex-wrap:wrap!important;}
.ngbvd-btn-primary,.ngbvd-btn-soft{border-radius:14px!important;padding:12px 20px!important;font-weight:900!important;text-decoration:none!important;display:inline-flex!important;align-items:center!important;gap:9px!important;}
.ngbvd-btn-primary{background:linear-gradient(135deg,#ffb400,#ff7a18)!important;color:#07142b!important;border:0!important;box-shadow:0 12px 26px rgba(255,122,24,.22)!important;}
.ngbvd-btn-soft{background:#fff!important;color:#1b2b44!important;border:1px solid #dbe4f0!important;}
.ngbvd-stat-row .card,.ngbvd-stat-card-legacy{border-radius:22px!important;border:1px solid #e3e9f2!important;box-shadow:0 16px 38px rgba(15,31,61,.08)!important;overflow:hidden!important;}
.ngbvd-chart-card{border-radius:20px!important;border:1px solid #e3e9f2!important;box-shadow:0 16px 38px rgba(15,31,61,.08)!important;margin-bottom:24px!important;background:#fff!important;}
.ngbvd-chart-card .card-block{padding:22px!important;}
#top_districts,#national_status,#regions,#column-chart,#column-chart-agegroups,#line-example,#donut-example{min-height:430px!important;width:100%!important;}
#column-chart,#column-chart-agegroups{min-height:560px!important;}

.ngbvd-form-shell,.ngbvd-form-card,.ngbvd-form-section,.ngbvd-tab-card{background:#fff!important;border:1px solid #e3e9f2!important;border-radius:22px!important;box-shadow:0 16px 36px rgba(15,31,61,.06)!important;}
.ngbvd-form-shell{padding:22px!important;margin-top:18px!important;}
.ngbvd-form-section{padding:20px 22px!important;margin-bottom:18px!important;}
.ngbvd-form-section-title,.ngbvd-section-title{display:block!important;width:100%!important;background:#fff8e5!important;border-left:5px solid #ffb400!important;border-radius:14px!important;padding:14px 18px!important;margin:0 0 18px!important;font-size:19px!important;font-weight:900!important;color:#07142b!important;}
.ngbvd-form-section .row{margin-left:-10px!important;margin-right:-10px!important;}
.ngbvd-form-section [class*=col-]{padding-left:10px!important;padding-right:10px!important;}
.ngbvd-form-section label,.form-group label{display:block!important;margin-bottom:7px!important;font-weight:800!important;color:#1b2b44!important;line-height:1.3!important;}
.ngbvd-form-section .form-control,.ngbvd-form-section select,.ngbvd-form-section textarea{width:100%!important;border:1px solid #d7dfeb!important;border-radius:14px!important;min-height:46px!important;padding:10px 14px!important;background:#fff!important;box-shadow:none!important;}
.ngbvd-form-section textarea{min-height:110px!important;}
.ngbvd-form-section .form-control:focus,.ngbvd-form-section select:focus,.ngbvd-form-section textarea:focus{border-color:#ffb400!important;box-shadow:0 0 0 4px rgba(255,180,0,.14)!important;outline:0!important;}
.nav-tabs,.ngbvd-wizard-tabs{background:#fff!important;border:1px solid #e3e9f2!important;border-radius:22px!important;padding:12px!important;box-shadow:0 12px 28px rgba(15,31,61,.05)!important;}
.nav-tabs .nav-link,.ngbvd-wizard-tabs a{border-radius:999px!important;padding:12px 22px!important;font-weight:900!important;border:1px solid #dfe6f0!important;color:#1b2b44!important;margin:4px!important;}
.nav-tabs .nav-link.active,.ngbvd-wizard-tabs a.active{background:#ffb400!important;border-color:#ffb400!important;color:#07142b!important;}

.ngbvd-datatable-card,.dataTables_wrapper{background:#fff!important;border-radius:20px!important;}
.table thead th{background:#f4f7fb!important;color:#1b2b44!important;font-weight:900!important;border-bottom:1px solid #dbe4f0!important;}
.table tbody td{vertical-align:middle!important;}

.ngbvd-readonly-frame{width:100%;min-height:78vh;border:0;border-radius:18px;background:#fff;}
.modal.ngbvd-case-preview .modal-dialog{max-width:96vw!important;margin:2vh auto!important;}
.modal.ngbvd-case-preview .modal-content{border-radius:24px!important;overflow:hidden!important;}

@media(max-width:992px){.ngbvd-dashboard-header{flex-direction:column!important;align-items:flex-start!important}.ngbvd-dashboard-header h2{font-size:32px!important}.ngbvd-dashboard-page{padding:18px!important}}

/* NGBVD focused stabilization and UX polish */
.ngbvd-kpi-card{border:0;border-radius:24px;box-shadow:0 18px 45px rgba(15,31,61,.08);overflow:hidden;height:100%}.ngbvd-kpi-card .card-block-small{padding:24px;display:grid;grid-template-columns:74px 1fr;gap:10px 18px;align-items:center}.ngbvd-kpi-card .card1-icon{grid-row:1 / span 3;width:64px;height:64px;border-radius:18px;display:flex;align-items:center;justify-content:center;font-size:30px}.ngbvd-kpi-card span{font-weight:900;color:#2f6bff}.ngbvd-kpi-card h4{font-size:34px;font-weight:1000;color:#07142b;margin:0}.ngbvd-kpi-card small{color:#64748b;font-size:14px}.ngbvd-dashboard-tiles{margin-bottom:22px}
.ngbvd-chart-card{border:0;border-radius:22px;box-shadow:0 18px 45px rgba(15,31,61,.08);overflow:hidden}.ngbvd-chart-card .card-block{padding:18px}.ngbvd-chart-empty{padding:40px;text-align:center;color:#64748b;background:#f8fafc;border:1px dashed #d7deea;border-radius:16px}
.ngbvd-repeatable-section{background:#fff;border:1px solid #e2e8f0;border-radius:22px;padding:22px;margin-bottom:22px;box-shadow:0 15px 38px rgba(15,31,61,.06)}.ngbvd-section-header-row{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px;background:#fff8e6;border-left:5px solid var(--ngbvd-yellow,#FDB209);padding:16px 18px;border-radius:16px}.ngbvd-section-header-row h4{margin:0;font-weight:1000;color:#07142b}.ngbvd-section-header-row p{margin:4px 0 0;color:#64748b}.ngbvd-repeat-card{background:#fff;border:1px solid #e5ecf5;border-radius:18px;padding:18px;margin-bottom:14px}.ngbvd-repeat-title{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #eef2f7;margin-bottom:16px;padding-bottom:12px}.ngbvd-repeat-title strong{font-weight:1000;color:#07142b}.ngbvd-repeat-card label{font-weight:800;color:#1e2a44}.ngbvd-repeat-card .form-control{border-radius:13px;min-height:44px}.ngbvd-radio-row{display:flex;gap:18px;align-items:center;flex-wrap:wrap;padding:10px 0}.ngbvd-radio-row label{font-weight:700;margin:0}.ngbvd-checkbox-card{display:block;border:1px solid #e2e8f0;border-radius:12px;padding:10px 12px;margin-bottom:10px;background:#fff;cursor:pointer}.ngbvd-checkbox-card:hover{border-color:var(--ngbvd-yellow,#FDB209);background:#fffaf0}.ngbvd-check-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:18px;padding:16px}.ngbvd-check-card h5{font-weight:900;margin-bottom:12px}.ngbvd-page-hero,.ngbvd-filter-card,.ngbvd-table-card,.ngbvd-settings-card{border-radius:22px!important;box-shadow:0 16px 40px rgba(15,31,61,.07)!important}
.ngbvd-case-frame{width:100%;height:78vh;border:0;background:#fff}.ngbvd-modal-tools{padding:12px 14px;border-bottom:1px solid #edf2f7;background:#f8fafc;text-align:right}.ngbvd-action-btn{display:inline-flex!important;align-items:center;gap:6px;border-radius:999px;padding:8px 12px;font-weight:900;text-decoration:none!important;margin:2px}.ngbvd-preview-btn{background:#FDB209!important;color:#07142b!important}.ngbvd-action-btn:not(.ngbvd-preview-btn){background:#07142b!important;color:#fff!important}

/* Precision UI fixes */
.ngbvd-form-card{border:1px solid #e5ebf3;border-radius:22px;box-shadow:0 16px 38px rgba(15,31,61,.06);overflow:hidden;background:var(--ngbvd-surface,#fff)}
.ngbvd-form-card .card-block{padding:24px!important}.ngbvd-section-title{font-size:18px;font-weight:900;color:#07142b;margin:0 0 18px;padding:14px 18px;border-left:5px solid var(--ngbvd-primary,#ffb000);background:linear-gradient(90deg,rgba(255,176,0,.13),rgba(255,255,255,0));border-radius:14px}.ngbvd-color-row{display:flex;align-items:center;justify-content:space-between;gap:14px}.ngbvd-color-row input[type=color]{width:74px;height:42px;padding:4px;border-radius:12px}.ngbvd-theme-panel .btn{border-radius:14px;font-weight:900}.ngbvd-dashboard-tiles .ngbvd-kpi-card{min-height:140px}.ngbvd-kpi-card h4{font-weight:900;letter-spacing:-.03em}.ngbvd-report-tabs .nav-link{border-radius:999px;font-weight:800;margin-right:8px;color:#243247}.ngbvd-report-tabs .nav-link.active{background:var(--ngbvd-primary,#ffb000);color:#07142b}.ngbvd-analysis-card{border-radius:22px;border:1px solid #e4ebf4;box-shadow:0 14px 34px rgba(15,31,61,.06)}.ngbvd-pivot-container{min-height:440px;overflow:auto;background:#fff;border:1px solid #e7edf5;border-radius:18px;padding:14px}.ngbvd-report-toolbar{display:flex;gap:10px;align-items:center;justify-content:flex-end;margin-bottom:12px;flex-wrap:wrap}.ngbvd-report-toolbar input{max-width:320px}.ngbvd-pivot-fallback,.ngbvd-loading{padding:24px;border-radius:16px;background:#fff8df;border:1px solid #ffe7a6;color:#7a5400}.ngbvd-case-modal .modal-dialog{max-width:1180px}.ngbvd-case-frame{width:100%;height:78vh;border:0;background:#fff}.ngbvd-modal-tools{padding:12px;background:#f8fafc;border-bottom:1px solid #e5ebf3;text-align:right}.ngbvd-action-btn{display:inline-flex;align-items:center;gap:6px;padding:9px 14px;border-radius:999px;font-weight:900;border:1px solid #d8e2ef;background:#fff;color:#07142b;text-decoration:none!important;margin:2px}.ngbvd-preview-btn{background:linear-gradient(135deg,#ffb000,#ff8a00);border-color:#ffb000;color:#07142b!important}.ngbvd-action-btn:hover{transform:translateY(-1px);box-shadow:0 10px 22px rgba(15,31,61,.12)}
input[value$="=="]:not([type]), input[value$="=="][type="text"]{display:none!important}.ngbvd-page-header input[value$="=="], .tab-content input[value$="=="]{display:none!important}
@media(max-width:768px){.ngbvd-report-toolbar{justify-content:flex-start}.ngbvd-case-frame{height:72vh}.ngbvd-form-card .card-block{padding:16px!important}}

/* Patch: functional per-user theme variables */
.ngbvd-topbar { background: var(--ngbvd-topbar, #ffffff) !important; }
.ngbvd-sidebar { background: var(--ngbvd-sidebar, #101827) !important; }
.ngbvd-body, .ngbvd-content { background: var(--ngbvd-bg, #f4f6fb) !important; }
.card, .ngbvd-form-card, .ngbvd-modern-grid-card, .ngbvd-table-card, .ngbvd-section-card, .ngbvd-profile-card { background: var(--ngbvd-surface, #ffffff); }
.ngbvd-btn-primary, .ngbvd-nav-link.active, .ngbvd-nav-toggle.active, .ngbvd-wizard-tab.active { background: var(--ngbvd-yellow, #FDB209) !important; }
.ngbvd-theme-template-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-bottom:12px}.ngbvd-theme-template-card{border:1px solid #dbe3ef;border-radius:14px;padding:12px;background:#fff;cursor:pointer;transition:.2s}.ngbvd-theme-template-card:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(15,23,42,.12)}.ngbvd-theme-swatch{display:flex;gap:5px;margin-bottom:8px}.ngbvd-theme-swatch span{height:18px;flex:1;border-radius:8px}.ngbvd-theme-template-card input{margin-right:6px}
