/* ============================================================
   SIGAP — dashboard.css
   ============================================================ */

/* ── Dashboard Nav (tabs + search in one bar) ────────────────── */
.db-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
    gap: 16px;
}

/* Dashboard overview */
.dash-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.dash-stat-card,
.dash-panel,
.dash-alert-strip {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #fff;
}

.dash-stat-card {
    padding: 20px;
    min-height: 128px;
}

.dash-stat-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 10px;
}

.dash-stat-value {
    font-size: 38px;
    line-height: 1;
    font-weight: 800;
    color: #111;
    margin-bottom: 12px;
}

.dash-stat-note {
    font-size: 13px;
    color: #777;
}

.dash-alert-card .dash-stat-value { color: #dc2626; }
.dash-medium-card .dash-stat-value { color: #d97706; }
.dash-low-card .dash-stat-value { color: #16a34a; }

.dash-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 14px;
    margin-bottom: 14px;
}

.dash-panel {
    padding: 22px;
}

.dash-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}

.dash-panel-head h3 {
    font-size: 17px;
    font-weight: 700;
    color: #111;
}

.dash-panel-head span {
    font-size: 12px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
}

.dash-risk-chart {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dash-risk-row {
    display: grid;
    grid-template-columns: 72px 1fr 36px;
    align-items: center;
    gap: 12px;
}

.dash-risk-label,
.dash-risk-count {
    font-size: 14px;
    font-weight: 700;
    color: #444;
}

.dash-risk-count { text-align: right; }

.dash-risk-track {
    height: 14px;
    border-radius: 999px;
    background: #f1f1f1;
    overflow: hidden;
}

.dash-risk-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    transition: width 0.25s ease;
}

.dash-risk-high { background: #ef4444; }
.dash-risk-medium { background: #f59e0b; }
.dash-risk-low { background: #22c55e; }

.dash-ai-insight {
    min-height: 86px;
    font-size: 16px;
    line-height: 1.65;
    color: #444;
    margin-bottom: 18px;
}

.dash-ai-focus {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.dash-ai-focus div {
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 12px;
    background: #fafafa;
}

.dash-ai-focus span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.dash-ai-focus strong {
    display: block;
    font-size: 14px;
    line-height: 1.4;
    color: #222;
}

.dash-alert-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
}

.dash-alert-strip > div {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
}

.dash-alert-strip strong {
    font-size: 14px;
    color: #111;
}

.dash-alert-strip p {
    font-size: 14px;
    color: #666;
    text-align: right;
}

.dash-alert-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239,68,68,0.12);
}

.db-nav-tabs {
    display: flex;
    align-items: center;
    gap: 0;
}

.db-nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #888;
    text-decoration: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.12s;
    white-space: nowrap;
    background: none;
    outline: none;
    border-radius: 4px 4px 0 0;
}

.db-nav-tab:hover {
    color: #111;
    text-decoration: none;
    background: #f7f7f7;
}

.db-nav-tab.active {
    color: #111;
    font-weight: 700;
    border-bottom-color: #111;
    background: none;
}

.db-tab-badge {
    display: none;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    padding: 1px 7px;
    min-width: 20px;
    text-align: center;
    line-height: 1.6;
}

.db-tab-badge:not(:empty) { display: inline-block; }

/* ── Global search (inside nav) ──────────────────────────────── */
.db-search-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    padding-bottom: 2px;
}

.db-search-wrap input {
    width: 240px;
    padding: 8px 13px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #111;
    outline: none;
    transition: border-color 0.15s;
}

.db-search-wrap input:focus { border-color: #111; }
.db-search-wrap input::placeholder { color: #bbb; }

.db-btn-reset {
    padding: 8px 14px;
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.db-btn-reset:hover { border-color: #111; color: #111; }

/* ── Section header ──────────────────────────────────────────── */
.db-section-header { display: none; }

/* ── Sections ────────────────────────────────────────────────── */
.db-section { display: none; }
.db-section.active { display: block; }
#tab-home .db-section-header,
#tab-home .db-stat-grid,
#tab-home .db-info-grid {
    display: none;
}

#tab-info .info-legacy-grid {
    display: none;
}

/* Legacy home text styles - hidden */
.home-text-space { display: none; }
.home-text-grid  { display: none; }

.home-text-space h2 {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin-bottom: 14px;
}

.home-text-editor {
    min-height: 220px;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fafafa;
    color: #333;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    outline: none;
    white-space: pre-wrap;
}

.home-text-editor:focus {
    border-color: #111;
    background: #fff;
}

/* ── Stat cards ──────────────────────────────────────────────── */
.db-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.db-stat-card {
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 20px 22px 24px;
    background: #fff;
}

.db-stat-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #aaa;
    margin-bottom: 8px;
}

.db-stat-value {
    font-size: 36px;
    font-weight: 800;
    color: #111;
    line-height: 1;
}

.stat-low  .db-stat-value { color: #16a34a; }
.stat-medium .db-stat-value { color: #d97706; }
.stat-high .db-stat-value { color: #dc2626; }

/* ── Info grid ───────────────────────────────────────────────── */
.db-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.dash-info-grid {
    margin-top: 14px;
}

.db-info-card {
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 22px 24px;
}

.db-info-card h4 {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    margin-bottom: 14px;
}

.db-info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.db-info-list li {
    font-size: 14px;
    color: #555;
    padding-left: 14px;
    position: relative;
}

.db-info-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: #ccc;
}

/* ── Alur flow ───────────────────────────────────────────────── */
.db-flow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.db-flow-step {
    background: #f4f4f4;
    border: 1px solid #e4e4e4;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.db-flow-arrow {
    color: #ccc;
    font-size: 16px;
    font-weight: 700;
}

/* ── Data layout (main + sidebar) ───────────────────────────── */
.db-data-layout {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 28px;
    align-items: start;
}

.db-data-main { min-width: 0; }

/* ── Angkatan bar ─────────────────────────────────────────────── */
.db-angkatan-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.db-angkatan-tabs {
    display: flex;
    gap: 6px;
}

.db-angkatan-tab {
    padding: 7px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.12s;
    white-space: nowrap;
}

.db-angkatan-tab:hover { background: #f5f5f5; color: #111; }
.db-angkatan-tab.active { background: #111; color: #fff; border-color: #111; font-weight: 700; }

.db-angkatan-search input {
    padding: 8px 13px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #111;
    outline: none;
    width: 220px;
    transition: border-color 0.15s;
}

.db-angkatan-search input:focus { border-color: #111; }
.db-angkatan-search input::placeholder { color: #bbb; }

/* ── Sidebar Kategori Risiko ─────────────────────────────────── */
.db-data-sidebar {
    position: sticky;
    top: 24px;
}

.db-sidebar-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #aaa;
    margin-bottom: 12px;
}

.db-sidebar-card {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #e8e8e8;
    border-radius: 5px;
    margin-bottom: 8px;
    background: #fff;
}

.db-sidebar-icon { font-size: 16px; flex-shrink: 0; line-height: 1.4; }

.db-sidebar-label {
    font-size: 13px;
    font-weight: 700;
    color: #111;
    margin-bottom: 5px;
}

.db-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.db-sidebar-list li {
    font-size: 12px;
    color: #888;
    padding-left: 10px;
    position: relative;
}

.db-sidebar-list li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: #ccc;
    font-weight: 700;
}

/* ── Table ───────────────────────────────────────────────────── */
.db-table-wrap {
    overflow-x: auto;
    margin-bottom: 20px;
}

.db-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}

.db-table thead th {
    padding: 11px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #aaa;
    border-bottom: 1px solid #e8e8e8;
    white-space: nowrap;
}

.db-table-row td {
    padding: 13px 14px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    font-weight: 500;
    vertical-align: middle;
}

.db-table-row:hover td { background: #fafafa; cursor: pointer; }
.db-table-row:last-child td { border-bottom: none; }

/* Score bar */
.db-score-wrap { display: flex; align-items: center; gap: 10px; }

.db-score {
    font-size: 14px;
    font-weight: 800;
    min-width: 28px;
    -webkit-text-stroke: 0.6px #111;
    paint-order: stroke fill;
}

.db-score-bar {
    flex: 1;
    height: 5px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    min-width: 60px;
}

.db-score-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* Score number — color on text only, no background */
.score-low    { color: #16a34a; }
.score-medium { color: #d97706; }
.score-high   { color: #dc2626; }

/* Score bar fill — colored background */
.score-low    .db-score-fill { background: #22c55e; }
.score-medium .db-score-fill { background: #f59e0b; }
.score-high   .db-score-fill { background: #ef4444; }
.db-score-fill.score-low    { background: #22c55e; }
.db-score-fill.score-medium { background: #f59e0b; }
.db-score-fill.score-high   { background: #ef4444; }

/* Badges */
.db-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
}

.badge-low    { background: #dcfce7; color: #15803d; }
.badge-medium { background: #fff7ed; color: #c2410c; }
.badge-high   { background: #fee2e2; color: #b91c1c; }
.badge-aman   { background: #dcfce7; color: #15803d; }

/* Empty */
.db-empty {
    text-align: center;
    padding: 32px;
    color: #bbb;
    font-size: 16px;
}

/* ── Detail panel ────────────────────────────────────────────── */
.db-detail-panel {
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 20px 22px;
    min-height: 80px;
}

.db-detail-placeholder {
    color: #bbb;
    font-size: 16px;
}

.db-detail-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
}

.db-detail-name { font-size: 20px; font-weight: 800; color: #111; }
.db-detail-satuan { font-size: 16px; color: #888; margin-top: 2px; }

.db-detail-score-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.db-detail-score {
    font-size: 30px;
    font-weight: 800;
}

.db-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.db-detail-item {
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    padding: 10px 14px;
}

.db-detail-key {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #aaa;
    margin-bottom: 4px;
}

.db-detail-val { font-size: 16px; font-weight: 500; color: #333; }

.db-detail-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
    font-size: 16px;
    color: #444;
}

/* ── Alert cards ─────────────────────────────────────────────── */
.db-alert-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.db-filter-btn {
    padding: 7px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
}

.db-filter-btn:hover { border-color: #111; color: #111; }
.db-filter-btn.active { background: #111; color: #fff; border-color: #111; }

.db-alert-card {
    border: 1px solid #e8e8e8;
    border-left-width: 4px;
    border-radius: 4px;
    padding: 16px 18px;
    margin-bottom: 10px;
}

.db-alert-card.badge-high   { border-left-color: #ef4444; }
.db-alert-card.badge-medium { border-left-color: #f97316; }
.db-alert-card.badge-low    { border-left-color: #22c55e; }
.db-alert-card.badge-aman   { border-left-color: #22c55e; }

.db-alert-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.db-alert-score { font-size: 15px; font-weight: 700; color: #999; }
.db-alert-name  { font-size: 17px; font-weight: 700; color: #111; margin-bottom: 5px; }
.db-alert-faktor { font-size: 15px; color: #666; margin-bottom: 3px; }
.db-alert-rek   { font-size: 15px; color: #999; }

/* ── Pembinaan ───────────────────────────────────────────────── */
.db-pembinaan-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.db-pembinaan-card {
    border: 1px solid #e8e8e8;
    border-top-width: 3px;
    border-radius: 8px;
    padding: 20px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #fff;
}

.card-low    { border-top-color: #22c55e; }
.card-medium { border-top-color: #f97316; }
.card-high   { border-top-color: #ef4444; }
.card-aman   { border-top-color: #22c55e; }

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

.db-pembinaan-header h4 { font-size: 15px; font-weight: 700; color: #111; flex: 1; }

.db-pem-count {
    font-size: 11px;
    font-weight: 700;
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 99px;
    min-width: 22px;
    text-align: center;
}

.db-risk-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-low    { background: #22c55e; }
.dot-medium { background: #f97316; }
.dot-high   { background: #ef4444; }
.dot-aman   { background: #22c55e; }

.db-pem-actions {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
    padding: 0;
}

.db-pem-actions li {
    font-size: 12px;
    color: #555;
    padding-left: 14px;
    position: relative;
    line-height: 1.4;
}

.db-pem-actions li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #bbb;
    font-size: 11px;
}

.db-pem-personel-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
    margin-bottom: 8px;
}

.db-pem-personel-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
}

.db-pem-empty {
    font-size: 12px;
    color: #aaa;
    font-style: italic;
}

.db-pem-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    background: #f8fafc;
    border-radius: 6px;
}

.db-pem-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.db-pem-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.db-pem-nama {
    font-size: 12px;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.db-pem-sub {
    font-size: 10px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.db-pem-faktor {
    font-size: 10px;
    color: #ef4444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Kategori tab divider ─────────────────────────────────────── */
.db-kat-divider {
    border: none;
    border-top: 1px solid #e8e8e8;
    margin: 32px 0;
}

/* ── Mini panel ──────────────────────────────────────────────── */
.db-kat-panel {
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
}

/* ── Tab Data Prajurit ───────────────────────────────────────── */
.data-panel-shell {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.data-panel-titlebar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.data-panel-titlebar h3 { font-size: 17px; font-weight: 800; color: #111; margin-bottom: 3px; }
.data-panel-titlebar p  { font-size: 13px; color: #777; }
.data-panel-titlebar span {
    padding: 5px 9px; border-radius: 4px; background: #f4f4f4;
    color: #333; font-size: 12px; font-weight: 800; white-space: nowrap;
}

/* Layout 2 kolom: kartu kiri, detail kanan */
.db-search-detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}

.db-search-col {
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-self: start;
    max-height: none;
    overflow: visible;
    scrollbar-width: none;
    position: relative;
    z-index: 20;
    background: #fff;
}
.db-search-col::-webkit-scrollbar { display: none; }

.data-page-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid #f0f0f0;
    color: #777;
    font-size: 13px;
    font-weight: 700;
}

.data-page-tools select {
    height: 36px;
    border: 1px solid #dddddd;
    border-radius: 6px;
    background: #fff;
    color: #111;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 700;
    padding: 0 10px;
    outline: none;
}

.data-page-tools select:focus {
    border-color: #111;
}

.data-page-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.data-page-actions button {
    height: 36px;
    border: 1px solid #dddddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 800;
    padding: 0 12px;
    cursor: pointer;
}

.data-page-actions button:hover:not(:disabled) {
    border-color: #111;
    color: #111;
}

.data-page-actions button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

/* Kartu hasil — scrollable max height */
.data-search-result-panel {
    max-height: none;
    overflow: visible;
    scrollbar-width: none;
}
.data-search-result-panel::-webkit-scrollbar { display: none; }

.data-search-result-empty {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

/* ── Result panel ────────────────────────────────────────────── */
.data-search-result-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
}

/* ── Result Card (drc) ───────────────────────────────────────── */
.drc {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
    padding: 16px 16px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.drc:hover  { border-color: #bbb; box-shadow: 0 2px 10px rgba(0,0,0,0.07); }
.drc.active { border-color: #111; background: #f8f8f8; }

.drc-avatar {
    flex-shrink: 0;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: #111;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 700; color: #fff;
    transition: background 0.2s;
}

.drc-body { flex: 1; min-width: 0; }

.drc-row-top {
    display: flex; align-items: center;
    justify-content: space-between; gap: 8px;
    margin-bottom: 4px;
}
.drc-nama   { font-size: 15px; font-weight: 700; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drc-nrp    { font-size: 12px; color: #111; font-family: 'Roboto', sans-serif; letter-spacing: 0.3px; margin-bottom: 3px; }
.drc-satuan { font-size: 12px; color: #111; margin-bottom: 3px; }
.drc-kodim  { font-size: 11px; color: #111; }

.drc-tags   { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.drc-tag-status {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 700; padding: 2px 8px;
    border-radius: 20px;
}
.tag-aktif    { background:#f0fdf4; color:#16a34a; }
.tag-nonaktif { background:#f5f5f5; color:#999; }

.drc-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor; display: inline-block;
}

.drc-tag-risk {
    display: inline-block; font-size: 11px; font-weight: 700;
    padding: 2px 8px; border-radius: 20px;
}
.drc-tag-risk.badge-high   { background:#fef2f2; color:#dc2626; }
.drc-tag-risk.badge-medium { background:#fff7ed; color:#c2410c; }
.drc-tag-risk.badge-low    { background:#f0fdf4; color:#16a34a; }
.drc-tag-risk.badge-aman   { background:#f0fdf4; color:#16a34a; }

/* ── Detail Panel (dc) ───────────────────────────────────────── */
.data-simple-panel {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #fff;
    padding: 18px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    scrollbar-width: none;
    font-size: 13px;
    z-index: 10001;
    display: none;
    box-shadow: 0 22px 70px rgba(15,23,42,0.28);
}
.data-simple-panel::-webkit-scrollbar { display: none; }
.data-simple-panel.is-open { display: block; }

body.data-detail-open {
    overflow: hidden;
}

body.data-detail-open::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 23, 42, 0.45);
}

.data-detail-close {
    position: sticky;
    top: 0;
    float: right;
    width: 34px;
    height: 34px;
    margin: -6px -6px 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    z-index: 2;
}

.data-detail-close:hover {
    background: #f3f4f6;
}

.dc-header {
    display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px;
}
.dc-avatar {
    flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%;
    background: #111;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700; color: #fff;
}

.dc-identity { flex: 1; min-width: 0; }
.dc-nama  { font-size: 18px; font-weight: 800; color: #111; margin-bottom: 3px; }
.dc-meta  { font-size: 12px; color: #111; margin-bottom: 2px; }
.dc-satuan{ font-size: 13px; color: #555; margin-bottom: 3px; }
.dc-kodim { font-size: 12px; color: #111; margin-bottom: 8px; }
.dc-tags  { display: flex; gap: 6px; flex-wrap: wrap; }

.dc-score-box { text-align: center; flex-shrink: 0; }
.dc-score-num {
    font-size: 36px; font-weight: 900; line-height: 1;
    padding: 8px 14px; border-radius: 8px; margin-bottom: 4px;
}
.dc-score-num.score-high   { background:#fef2f2; color:#dc2626; }
.dc-score-num.score-medium { background:#fffbeb; color:#d97706; }
.dc-score-num.score-low    { background:#f0fdf4; color:#16a34a; }
.dc-score-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; color: #aaa; }

.dc-info-list {
    display: flex; flex-direction: column;
    gap: 0; margin-bottom: 16px;
    border: 1px solid #f0f0f0; border-radius: 8px; overflow: hidden;
}
.dc-info-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 14px; font-size: 13px;
    border-bottom: 1px solid #f5f5f5;
}
.dc-info-row:last-child { border-bottom: none; }
.dc-info-row span  { color: #aaa; flex-shrink: 0; }
.dc-info-row strong { color: #111; font-weight: 600; text-align: right; }

/* ── data-simple-panel top grid ─────────────────────────── */
.dc-top-grid {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 14px;
    align-items: start;
    margin-bottom: 14px;
}
.dc-top-left { display: flex; flex-direction: column; gap: 10px; }

/* ── Risk block (right side) ─────────────────────────────── */
.dc-top-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.dc-top-row .dc-header { flex: 1; margin-bottom: 0; }

.dc-risk-block {
    width: 204px;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    min-width: 0;
}
.dc-risk-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #bbb;
}
.dc-risk-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.dc-risk-score {
    font-size: 12px;
    font-weight: 700;
}
.dc-risk-faktors {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.db-faktor-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: #f1f1f1;
    color: #555;
}

/* ── AI description block ────────────────────────────────── */
.dc-ai-block {
    background: #f8faff;
    border: 1px solid #e0e8ff;
    border-radius: 8px;
    padding: 12px 14px;
}
.dc-ai-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6366f1;
    margin-bottom: 7px;
}
.dc-ai-header svg { flex-shrink: 0; stroke: #6366f1; }
.dc-ai-text {
    font-size: 12px;
    color: #444;
    line-height: 1.65;
    margin: 0;
}

/* ── Timeline Aktivitas AI ───────────────────────────────── */
.dc-timeline-block {
    border: 1px solid #e8eaf0;
    border-radius: 8px;
    padding: 12px 14px 6px;
    background: #fafafa;
    margin-top: 10px;
}

.dc-timeline-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #7c8db5;
    margin-bottom: 14px;
}

.dc-timeline-header svg { flex-shrink: 0; stroke: #7c8db5; }

.dc-timeline {
    display: flex;
    flex-direction: column;
}

.dc-tl-item {
    display: grid;
    grid-template-columns: 12px 16px 1fr;
    gap: 0 10px;
    align-items: start;
    position: relative;
    padding-bottom: 14px;
}

.dc-tl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 3px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.dc-tl-line {
    width: 2px;
    background: #e4e4e7;
    position: absolute;
    left: 4px;
    top: 13px;
    bottom: 0;
}

.dc-tl-last .dc-tl-line { display: none; }

.dc-tl-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 2px;
}

.dc-tl-date {
    font-size: 10px;
    color: #aaa;
    font-weight: 500;
}

.dc-tl-label {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.dc-tl-desc {
    font-size: 11px;
    color: #666;
    line-height: 1.5;
}

.dc-desc-wrap { margin-top: 4px; }
.dc-desc-wrap .dc-section-title {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; color: #bbb; margin-bottom: 6px;
}
.dc-desc-text { font-size: 13px; color: #555; line-height: 1.6; }

.dc-bar-wrap { margin-bottom: 22px; }
.dc-bar-track {
    height: 10px; border-radius: 999px; background: #f1f1f1; overflow: hidden; margin-bottom: 5px;
}
.dc-bar-fill { height: 100%; border-radius: inherit; transition: width 0.4s ease; }
.dc-bar-fill.high   { background: #ef4444; }
.dc-bar-fill.medium { background: #f59e0b; }
.dc-bar-fill.low    { background: #22c55e; }
.dc-bar-labels {
    display: flex; justify-content: space-between;
    font-size: 10px; color: #bbb; font-weight: 600;
}

.dc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

.dc-section-title {
    font-size: 12px; font-weight: 800; text-transform: uppercase;
    color: #999; letter-spacing: 0.5px; margin-bottom: 12px;
}

.dc-indicators { display: flex; flex-direction: column; gap: 8px; }
.dc-ind-row { display: flex; align-items: flex-start; gap: 10px; }
.dc-ind-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.dc-ind-body { flex: 1; }
.dc-ind-label { display: block; font-size: 11px; color: #999; font-weight: 600; }
.dc-ind-val   { display: block; font-size: 13px; font-weight: 700; color: #333; }
.dc-ind-val.val-ok   { color: #16a34a; }
.dc-ind-val.val-risk { color: #dc2626; }

.dc-timeline { display: flex; flex-direction: column; gap: 0; }
.dc-tl-item {
    display: flex; gap: 12px; padding-bottom: 14px;
    border-left: 2px solid #e8e8e8; margin-left: 6px; padding-left: 14px; position: relative;
}
.dc-tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.dc-tl-dot {
    position: absolute; left: -6px; top: 4px;
    width: 10px; height: 10px; border-radius: 50%;
    background: #111; border: 2px solid #fff; box-shadow: 0 0 0 1px #ccc;
}
.dc-tl-body strong { display: block; font-size: 13px; color: #111; margin-bottom: 2px; }
.dc-tl-body p      { font-size: 12px; color: #777; line-height: 1.5; }

.dc-ai { padding: 16px; background: #fafafa; border-radius: 8px; border: 1px solid #efefef; }
.dc-ai-text { font-size: 14px; color: #444; line-height: 1.65; margin-top: 8px; }

/* ── Search bar + multi-select ───────────────────────────────── */
.db-search2-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px 84px;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    z-index: 30;
    background: #fff;
    padding-bottom: 10px;
}

#dataRegionFilter {
    grid-column: span 2;
}

.db-search2-bar input[type="text"] {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #111;
    outline: none;
    line-height: 1.4;
    transition: border-color 0.15s;
}

.db-search2-bar input[type="text"]:focus { border-color: #111; }
.db-search2-bar input[type="text"]::placeholder { color: #bbb; }

.db-search2-bar .db-btn-reset {
    width: 100%;
    height: 40px;
    padding: 8px 10px;
    font-size: 14px;
}

.db-search-select {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #444;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 600;
    outline: none;
}

.db-search-select:focus {
    border-color: #111;
}

.db-search-select-small {
    min-width: 118px;
}

/* ── Multi-select dropdown ───────────────────────────────────── */
.db-multiselect {
    position: relative;
    min-width: 0;
}

.db-multiselect-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 40px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s;
    min-width: 0;
    justify-content: space-between;
}

.db-multiselect-btn:hover { border-color: #111; color: #111; }

.db-multiselect-arrow {
    font-size: 11px;
    color: #aaa;
    transition: transform 0.15s;
}

.db-multiselect-panel.open + .db-multiselect-btn .db-multiselect-arrow,
.db-multiselect-btn:has(+ .db-multiselect-panel.open) .db-multiselect-arrow {
    transform: rotate(180deg);
}

.db-multiselect-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.10);
    z-index: 200;
    padding: 8px 0;
}

.db-multiselect-panel.open { display: block; }

.db-ms-group {
    padding: 8px 14px 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #bbb;
}

.db-ms-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: background 0.1s;
}

.db-ms-item:hover { background: #f5f5f5; }

.db-ms-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #111;
    flex-shrink: 0;
    cursor: pointer;
}

/* ── Hasil pencarian (kartu) ─────────────────────────────────── */
.db-result-card {
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 16px 18px;
    margin-bottom: 10px;
    background: #fff;
    transition: box-shadow 0.15s;
}

.db-result-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.07); }

.db-result-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.db-result-nama {
    font-size: 17px;
    font-weight: 700;
    color: #111;
    margin-bottom: 2px;
}

.db-result-satuan {
    font-size: 15px;
    color: #999;
}

.db-result-score-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    flex-shrink: 0;
}

.db-result-body {
    display: flex;
    gap: 10px;
    font-size: 15px;
    color: #555;
    margin-bottom: 5px;
    align-items: baseline;
}

.db-result-body:last-child { margin-bottom: 0; }

.db-result-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #bbb;
    flex-shrink: 0;
    width: 90px;
}

.db-kat-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1px;
    padding: 10px 14px;
    border-bottom: 1px solid #e8e8e8;
    background: #fafafa;
}

.db-kat-panel-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #aaa;
}

/* Mini tabs AD / AL / AU */
.db-mini-tabs {
    display: flex;
    gap: 1px;
    padding-left: 1px;
}

.db-mini-tab {
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #888;
    cursor: pointer;
    transition: all 0.12s;
}

.db-mini-tab:hover { color: #111; border-color: #aaa; }
.db-mini-tab.active { background: #111; color: #fff; border-color: #111; }

/* Row item dalam mini panel */
.db-kat-row {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border-bottom: 1px solid #f0f0f0;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    background: #fff;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}

.db-kat-row:last-child { border-bottom: none; }
.db-kat-row:hover,
.db-kat-row.active { background: #fafafa; }

.db-kat-row-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    gap: 8px;
}

.db-kat-name {
    font-size: 15px;
    font-weight: 700;
    color: #111;
}

.db-kat-score {
    font-size: 17px;
    font-weight: 800;
    flex-shrink: 0;
}

.db-kat-badge-wrap {
    margin-bottom: 5px;
}

.db-kat-faktor {
    font-size: 12px;
    color: #999;
    line-height: 1.45;
}

.data-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.data-check-panel {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #fff;
    padding: 18px;
}

.data-check-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.data-check-head h3 {
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

.data-check-head span {
    font-size: 11px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
}

.data-person-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.data-person-avatar {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #111;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    flex-shrink: 0;
}

.data-person-name {
    font-size: 18px;
    font-weight: 800;
    color: #111;
    margin-bottom: 3px;
}

.data-person-unit {
    font-size: 14px;
    color: #777;
}

.data-detail-list {
    display: grid;
    gap: 10px;
}

.data-detail-list div,
.data-factor-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.data-detail-list span,
.data-factor-row span {
    font-size: 12px;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
}

.data-detail-list strong,
.data-factor-row strong {
    font-size: 14px;
    color: #333;
    line-height: 1.45;
}

.data-score-wrap {
    display: grid;
    gap: 16px;
}

.data-score-value {
    font-size: 52px;
    line-height: 1;
    font-weight: 900;
    color: #111;
}

.data-score-track {
    height: 14px;
    border-radius: 999px;
    background: #f1f1f1;
    overflow: hidden;
}

.data-score-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    transition: width 0.25s ease;
}

.data-score-fill.high { background: #ef4444; }
.data-score-fill.medium { background: #f59e0b; }
.data-score-fill.low { background: #22c55e; }

.data-timeline {
    display: grid;
    gap: 13px;
}

.data-timeline-item {
    display: grid;
    grid-template-columns: 12px 1fr;
    gap: 10px;
}

.data-timeline-item > span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #111;
    margin-top: 5px;
}

.data-timeline-item strong {
    display: block;
    font-size: 14px;
    color: #111;
    margin-bottom: 2px;
}

.data-timeline-item p {
    font-size: 14px;
    color: #666;
    line-height: 1.45;
}

.data-risk-factors {
    display: grid;
    gap: 10px;
}

.data-check-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -8px 0 20px;
}

.data-check-menu span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #e4e4e4;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 13px;
    font-weight: 700;
}

.data-search-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.data-search-summary div {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #fff;
    padding: 14px;
}

.data-search-summary span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 7px;
}

.data-search-summary strong {
    display: block;
    font-size: 20px;
    line-height: 1.2;
    color: #111;
}

.data-verification-list {
    display: grid;
    gap: 10px;
}

.data-verify-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
}

.data-verify-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.data-verify-row span {
    font-size: 13px;
    font-weight: 700;
    color: #777;
}

.data-verify-row strong {
    padding: 4px 8px;
    border-radius: 4px;
    background: #f4f4f4;
    color: #222;
    font-size: 12px;
    font-weight: 800;
}

.data-action-box {
    min-height: 112px;
    border: 1px solid #eee;
    border-radius: 6px;
    background: #fafafa;
    padding: 14px;
    color: #333;
    font-size: 15px;
    line-height: 1.6;
}


.data-simple-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.data-simple-head h3 {
    font-size: 20px;
    font-weight: 800;
    color: #111;
    margin-bottom: 4px;
}

.data-simple-head p {
    font-size: 14px;
    color: #777;
}

.data-simple-score {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.data-simple-score span {
    padding: 5px 9px;
    border-radius: 4px;
    background: #f4f4f4;
    color: #555;
    font-size: 12px;
    font-weight: 800;
}

.data-simple-score strong {
    font-size: 34px;
    line-height: 1;
    color: #111;
}

.data-simple-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.data-simple-meta div {
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}

.data-simple-meta span,
.data-simple-sections h4,
.data-simple-footer h4 {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 7px;
}

.data-simple-meta strong {
    display: block;
    font-size: 14px;
    color: #222;
}

.data-simple-sections,
.data-simple-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.data-simple-footer {
    margin-top: 16px;
}

.data-simple-footer p {
    color: #333;
    font-size: 14px;
    line-height: 1.55;
}

.data-hidden-value {
    display: none;
}

/* ── Kategori Risiko & Level ─────────────────────────────────── */
.db-level-section {
    margin-bottom: 32px;
}

.db-level-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #aaa;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.db-level-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.db-level-card {
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 22px 20px;
}

.db-level-score {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.db-level-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.db-level-desc {
    font-size: 15px;
    color: #777;
    line-height: 1.6;
    margin-bottom: 14px;
}

.db-level-pem-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
    margin-bottom: 6px;
    margin-top: 12px;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}

.db-level-action {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}

.db-level-action li {
    font-size: 15px;
    font-weight: 500;
    color: #555;
    padding-left: 12px;
    position: relative;
}

.db-level-action li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #ccc;
    font-size: 11px;
}

/* ── Kategori grid ───────────────────────────────────────────── */
.db-kategori-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.db-kategori-card {
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 22px 20px;
}

.db-kategori-icon {
    margin-bottom: 12px;
}
.db-kategori-icon img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.db-kategori-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin-bottom: 12px;
}

.db-kategori-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.db-kategori-card ul li {
    font-size: 15px;
    color: #666;
    padding-left: 12px;
    position: relative;
}

.db-kategori-card ul li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: #bbb;
    font-weight: 700;
}

/* ══════════════════════════════════════════════════════
   STATUS MONITORING PERSONEL (mon-)  — compact sidebar
   ══════════════════════════════════════════════════════ */

/* Layout: alert kiri + monitoring kanan */
.alert-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 20px;
    align-items: start;
}

.alert-main { min-width: 0; }

/* Panel monitoring */
.mon-section {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 14px 14px 10px;
    position: static;
    align-self: start;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    scrollbar-width: none;
}
.mon-section::-webkit-scrollbar { display: none; }

/* Header */
.mon-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.mon-title {
    font-size: 13px;
    font-weight: 800;
    color: #111;
    flex: 1;
    margin: 0;
}

.mon-live-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    color: #16a34a;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: #dcfce7;
    border-radius: 99px;
    padding: 3px 8px;
}

.mon-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #16a34a;
    animation: mon-pulse 1.6s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes mon-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.75); }
}

/* Status list */
.mon-status-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: none;
}
.mon-status-list::-webkit-scrollbar { display: none; }

/* Each row */
.mon-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 9px 10px;
    border-bottom: 1px solid #f5f5f5;
    background: #fff;
    transition: background 0.12s;
}

.mon-row:last-child { border-bottom: none; }
.mon-row:hover { background: #fafafa; }

/* Nama */
.mon-nama {
    font-size: 12px;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Key-value grid */
.mon-keys {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 8px;
    margin-top: 3px;
}

.mon-kv {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mon-kv-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #bbb;
    line-height: 1.2;
}

.mon-kv-val {
    font-size: 11px;
    color: #444;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Empty state */
.mon-empty {
    padding: 24px 12px;
    text-align: center;
    color: #bbb;
    font-size: 12px;
}

/* Status dot (kecil, di sebelah nama) */
.mon-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mon-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mon-status-dot.dot-kritis {
    background: #ef4444;
    animation: mon-kritis-pulse 1.4s ease-in-out infinite;
}

.mon-status-dot.dot-perhatian { background: #f97316; }
.mon-status-dot.dot-normal    { background: #22c55e; }

@keyframes mon-kritis-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0.45); }
    70%  { box-shadow: 0 0 0 5px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

/* ── Responsive ──────────────────────────────────────────────── */
/* ── Sub-nav (Pencarian / Daerah Sekitar) ────────────────────── */
.db-sub-nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 24px;
}

.db-sub-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #aaa;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.db-sub-tab:hover { color: #111; }
.db-sub-tab.active { color: #111; border-bottom-color: #111; }

.db-sub-section { display: none; }
.db-sub-section.active { display: block; }

/* ── Near Me Layout (two-column: card left | map right) ─────── */
.nm-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 12px;
    align-items: flex-start;
    min-height: 320px;
}

/* ── Near Me Card (left column) ──────────────────────────────── */
.nm-card {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.nm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
    gap: 10px;
}

.nm-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nm-icon-pin {
    font-size: 16px;
    color: #1d6fc4;
}

.nm-title {
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

.nm-subtitle {
    font-size: 11px;
    color: #aaa;
    font-weight: 400;
    margin-top: 1px;
}

.nm-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.nm-count-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 1.5px solid #1d6fc4;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 800;
    color: #1d6fc4;
    min-width: 64px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.nm-help-btn {
    width: 22px;
    height: 22px;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #fff;
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #aaa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Prompt lokasi ───────────────────────────────────────────── */
.nm-prompt {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    padding: 22px 20px;
    text-align: left;
}

.nm-prompt-icon {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
}
.nm-prompt-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.nm-prompt p { font-size: 15px; color: #999; max-width: 280px; line-height: 1.5; }

.nm-locate-btn {
    padding: 9px 24px;
    background: #1d6fc4;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.nm-locate-btn:hover { background: #1558a0; }

/* ── Loading ─────────────────────────────────────────────────── */
.nm-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 20px;
    color: #aaa;
    font-size: 15px;
}

.nm-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e8e8e8;
    border-top-color: #1d6fc4;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ── Map right column ────────────────────────────────────────── */
.nm-map-right {
    position: fixed;
    left: 300px;
    top: 130px;
    z-index: 1000;
    width: min(760px, calc(100vw - 32px));
    height: 430px;
    min-width: 360px;
    min-height: 260px;
    border: 1px solid #cfd7e3;
    border-radius: 8px;
    overflow: hidden;
    resize: both;
    background: #fff;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.22);
    display: flex;
    flex-direction: column;
}

.nm-map-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 34px;
    padding: 0 10px 0 12px;
    border-bottom: 1px solid #dbe2ea;
    background: #f8fafc;
    color: #111827;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    cursor: move;
    user-select: none;
}

.nm-map-close {
    width: 22px;
    height: 22px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    font-size: 16px;
    line-height: 18px;
}

.nm-map-close:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.nm-map-overlay {
    position: absolute;
    top: 42px;
    right: 12px;
    z-index: 2000;
    display: block;
    visibility: visible;
    pointer-events: none;
}

.nm-map-overlay .nm-count-badge {
    min-width: 62px;
    padding: 3px 9px;
    border-radius: 4px;
    background: rgba(255,255,255,0.96);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
    font-size: 11px;
    line-height: 1.4;
}

#nmMap {
    position: relative;
    width: 100%;
    flex: 1;
    height: 100%;
    overflow: hidden;
    background: #eef3f8;
}

.nm-map-pin {
    display: block;
    width: 24px;
    height: 24px;
    background: var(--pin-color, #ef4444);
    border: 2px solid #fff;
    border-radius: 50% 50% 50% 0;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.28);
    cursor: pointer;
    transform: rotate(-45deg);
    transform-origin: 50% 50%;
}

.nm-map-pin.is-user {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transform: none;
    box-shadow: 0 0 0 3px rgba(29, 111, 196, .18), 0 2px 5px rgba(15, 23, 42, 0.28);
}

.leaflet-marker-icon .nm-map-pin {
    display: block;
}

.nm-offscreen-layer {
    position: absolute;
    inset: 0;
    z-index: 650;
    pointer-events: none;
}

.nm-offscreen-indicator {
    appearance: none;
    position: absolute;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    filter: drop-shadow(0 3px 5px rgba(15, 23, 42, 0.32));
    cursor: pointer;
    pointer-events: auto;
    transform: translate(-50%, -50%);
}

.nm-offscreen-indicator::after {
    content: '';
    position: absolute;
    left: 50%;
    top: -7px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 8px solid currentColor;
    color: inherit;
    transform: translateX(-50%) rotate(var(--nm-angle));
    transform-origin: 50% 19px;
}

.nm-map-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #1d4060;
    gap: 10px;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.nm-risk-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.12);
}

.nm-risk-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.2);
}

.nm-risk-indicator.risk-high   .nm-risk-dot { background: #ef4444; }
.nm-risk-indicator.risk-medium .nm-risk-dot { background: #f59e0b; }
.nm-risk-indicator.risk-low    .nm-risk-dot { background: #22c55e; }
/* Dynamic color via inline style — dot inherits from JS */
.nm-risk-dot { transition: background 0.2s; }

/* Legacy — kept so old JS refs don't error */
.nm-map-window { display: none; }
.nm-map-body { flex: 1; min-height: 0; }

/* ── Custom Leaflet markers ──────────────────────────────────── */
/* .nm-pin — ukuran & style diatur dinamis via JS (makePinIcon) */
.nm-pin { transition: width 0.2s ease, height 0.2s ease; }

.nm-user-pin {
    width: 16px;
    height: 16px;
    background: #1d6fc4;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px rgba(29,111,196,0.25);
}

/* Leaflet popup */
.nm-popup { font-family: 'Roboto', sans-serif; min-width: 180px; }
.nm-popup-name { font-size: 15px; font-weight: 700; color: #111; margin-bottom: 6px; }
.nm-popup-detail { font-size: 14px; color: #666; line-height: 1.6; }

/* ── Bottom info bar ─────────────────────────────────────────── */
.nm-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    background: #1d4060;
    gap: 10px;
    flex-shrink: 0;
}

.nm-info-text {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nm-info-arrow {
    width: 26px;
    height: 26px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 1320px) {
    .db-search-detail-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .data-simple-panel { margin-left: 0; }
}

@media (max-width: 1024px) {
    .db-stat-grid            { grid-template-columns: repeat(2, 1fr); }
    .dash-overview-grid      { grid-template-columns: repeat(2, 1fr); }
    .dash-main-grid          { grid-template-columns: 1fr; }
    .db-level-grid           { grid-template-columns: 1fr; }
    .db-kategori-grid        { grid-template-columns: repeat(2, 1fr); }
    .db-data2-layout         { grid-template-columns: 1fr; }
    .data-check-grid         { grid-template-columns: 1fr; }
    .data-simple-meta        { grid-template-columns: repeat(2, 1fr); }
    .data-simple-sections,
    .data-simple-footer      { grid-template-columns: 1fr; }
    .data-search-summary     { grid-template-columns: repeat(2, 1fr); }
    .db-kat-panel-side       { position: static; }
    .nm-layout               { grid-template-columns: 200px 1fr; }
    .db-search-detail-layout { grid-template-columns: 1fr; }
    .mon-section             { position: static; width: auto; max-height: none; }
}

@media (max-width: 768px) {
    /* Nav tabs — disembunyikan pada mobile, diganti bottom nav */
    .db-nav                  { display: none; }

    /* Stat grids */
    .db-stat-grid            { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .dash-overview-grid      { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .dash-stat-value         { font-size: 28px; }
    .dash-stat-card          { min-height: 100px; padding: 14px; }

    /* Dashboard panels */
    .dash-main-grid          { grid-template-columns: 1fr; }
    .dash-alert-strip        { align-items: flex-start; flex-direction: column; }
    .dash-alert-strip p      { text-align: left; }
    .dash-ai-focus           { grid-template-columns: 1fr; }

    /* Home */
    .home-text-grid          { grid-template-columns: 1fr; }
    .db-info-grid            { grid-template-columns: 1fr; }
    .db-section-header h2    { font-size: 18px; }
    .db-section-header p     { font-size: 13px; }

    /* Alur sistem — vertical */
    .db-flow                 { flex-direction: column; align-items: flex-start; gap: 4px; }
    .db-flow-arrow           { transform: rotate(90deg); margin-left: 8px; }

    /* Pembinaan grid */
    .db-pembinaan-grid       { grid-template-columns: 1fr; gap: 12px; }

    /* Alert layout */
    .alert-layout            { grid-template-columns: 1fr; }
    .mon-section             { position: static; width: auto; max-height: 300px; }
    .db-alert-filter         { flex-wrap: wrap; gap: 6px; }
    .db-filter-btn           { padding: 7px 14px; font-size: 13px; }

    /* Data prajurit */
    .data-search-summary     { grid-template-columns: 1fr; }
    .data-simple-head        { flex-direction: column; }
    .data-simple-meta        { grid-template-columns: 1fr; }
    .db-search-wrap input    { width: 100%; }
    .data-panel-shell        { width: 100%; overflow: visible; }
    .data-panel-titlebar     { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 12px; }
    .data-panel-titlebar h3  { font-size: 16px; }
    .data-panel-titlebar p   { font-size: 12px; line-height: 1.45; }
    .data-panel-titlebar span{ align-self: flex-start; }
    .db-search-detail-layout { display: flex; flex-direction: column; gap: 14px; width: 100%; }
    .db-search-col           { width: 100%; max-height: none; overflow: visible; position: relative; z-index: 20; background: #fff; }
    .db-search2-bar          { flex-direction: column; align-items: stretch; gap: 8px; }
    .db-search2-bar          { display: flex; margin-bottom: 14px; overflow: visible; position: static; top: auto; z-index: auto; padding-bottom: 0; }
    .db-search2-bar input    { width: 100%; height: 46px; font-size: 16px; padding: 12px; }
    .db-search-select        { width: 100%; height: 46px; font-size: 16px; padding: 12px; }
    #dataRegionFilter        { grid-column: auto; }
    .db-multiselect          { width: 100%; position: relative; z-index: 6; }
    .db-multiselect-panel    { position: static; width: 100%; min-width: 0; margin-top: 6px; box-shadow: none; border-radius: 8px; }
    .db-multiselect-panel.open { margin-bottom: 8px; }
    .db-multiselect-btn      { width: 100%; height: 46px; font-size: 15px; padding: 12px; }
    .data-search-result-panel{ gap: 10px; position: relative; z-index: 1; clear: both; }
    .data-page-tools         { align-items: stretch; flex-wrap: wrap; gap: 8px; }
    .data-page-tools label,
    .data-page-tools select,
    .data-page-tools span    { flex: 1 1 auto; }
    .data-page-actions       { width: 100%; margin-left: 0; }
    .data-page-actions button{ flex: 1; }
    .drc                     { padding: 12px; gap: 10px; border-radius: 8px; }
    .drc-avatar              { width: 42px; height: 42px; font-size: 14px; }
    .drc-row-top             { align-items: flex-start; flex-direction: column; gap: 5px; }
    .drc-nama                { max-width: 100%; white-space: normal; line-height: 1.3; }
    .drc-satuan,
    .drc-kodim               { line-height: 1.35; }
    .data-simple-panel       { position: fixed; width: calc(100vw - 24px); max-height: calc(100vh - 72px); overflow-y: auto; padding: 14px; border-radius: 10px; z-index: 10001; }
    .dc-top-grid             { grid-template-columns: 1fr; }
    .dc-header               { gap: 12px; margin-bottom: 12px; }
    .dc-avatar               { width: 42px; height: 42px; font-size: 15px; }
    .dc-nama                 { font-size: 16px; line-height: 1.3; }
    .dc-info-row             { align-items: flex-start; flex-direction: column; gap: 3px; }
    .dc-info-row strong      { text-align: left; overflow-wrap: anywhere; }
    .db-angkatan-bar         { flex-direction: column; align-items: flex-start; }
    .db-angkatan-search input { width: 100%; }

    /* Kategori level */
    .db-level-grid           { grid-template-columns: 1fr; }
    .db-kategori-grid        { grid-template-columns: repeat(2, 1fr); }
    .db-detail-grid          { grid-template-columns: 1fr; }
    .dc-top-row              { flex-direction: column; }
    .dc-risk-block           { width: 100%; }
    .db-detail-footer        { grid-template-columns: 1fr; }

    /* Daerah sekitar / map */
    .nm-layout               { grid-template-columns: 1fr; }
    .nm-card                 { margin: 0; }
    .nm-map-right            { left: 10px; top: 80px; width: calc(100vw - 20px); height: 300px; }
}

@media (max-width: 480px) {
    /* Stat cards — 2 per baris */
    .db-stat-grid            { grid-template-columns: 1fr 1fr; gap: 8px; }
    .dash-overview-grid      { grid-template-columns: 1fr 1fr; gap: 8px; }
    .dash-stat-value         { font-size: 24px; }
    .dash-stat-card          { padding: 12px; min-height: 90px; }

    /* Kategori grid → 1 kolom */
    .db-kategori-grid        { grid-template-columns: 1fr; }

    /* Nav tab lebih compact */
    .db-nav-tab              { font-size: 12px; padding: 9px 11px; }

    /* Sub nav */
    .db-sub-nav              { flex-wrap: wrap; gap: 6px; }
    .db-sub-tab              { flex: 1 1 auto; font-size: 13px; padding: 8px 12px; text-align: center; }
    .db-search-detail-layout,
    .db-search-col,
    .data-search-result-panel,
    .data-simple-panel       { min-width: 0; }
    .drc                     { align-items: flex-start; }
    .drc-body,
    .dc-identity             { min-width: 0; }

    /* Tabel kategori */
    .db-table-wrap           { overflow-x: auto; }
    .db-table                { min-width: 520px; }
}

/* ══════════════════════════════════════════════════════════════
   HOME HERO + FEATURES
   ══════════════════════════════════════════════════════════════ */

.home-hero {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
    margin-bottom: 32px;
}

.home-hero-title {
    font-size: 26px;
    font-weight: 800;
    color: #111;
    line-height: 1.25;
    margin-bottom: 14px;
}

.home-hero-desc {
    font-size: 17px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 24px;
}

.home-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.home-btn-primary {
    padding: 12px 24px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.home-btn-primary:hover { background: #333; }

.home-btn-secondary {
    padding: 12px 24px;
    background: #fff;
    color: #111;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    white-space: nowrap;
}

.home-btn-secondary:hover { border-color: #111; background: #f9f9f9; }

.home-hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.home-hs-card {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 16px;
    background: #fff;
    text-align: center;
}

.home-hs-value {
    font-size: 32px;
    font-weight: 800;
    color: #111;
    line-height: 1;
    margin-bottom: 6px;
}

.home-hs-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #aaa;
}

.home-hs-high .home-hs-value  { color: #dc2626; }
.home-hs-medium .home-hs-value { color: #d97706; }
.home-hs-low .home-hs-value   { color: #16a34a; }

/* Features grid */
.home-features-section {
    margin-bottom: 32px;
}

.home-features-title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.home-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.home-feature-card {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.home-feature-card:hover {
    border-color: #bbb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.home-feature-icon {
    width: 40px;
    height: 40px;
    background: #f4f4f4;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.home-feature-icon svg {
    width: 20px;
    height: 20px;
    stroke: #555;
}

.home-feature-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    margin-bottom: 8px;
}

.home-feature-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════
   MOBILE BOTTOM NAVIGATION
   ══════════════════════════════════════════════════════════════ */

.db-mobile-nav {
    display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
    /* Sembunyikan desktop tabs on mobile */
    .db-nav {
        display: none;
    }

    /* Mobile bottom nav — fixed/floating di dasar layar */
    .db-mobile-nav {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 9999;
        background: #fff;
        border-bottom: 1px solid #e5e5e5;
        box-shadow: 0 2px 10px rgba(0,0,0,0.06);
        overflow-x: auto;
        scrollbar-width: none;
    }

    .db-mobile-nav::-webkit-scrollbar { display: none; }

    /* Sembunyikan footer; nav sudah fixed di bawah layar */
    footer { display: none; }
    .page  {
        padding-top: 48px !important;
        padding-bottom: 0 !important;
    }

    .db-mbn-tab {
        flex: 0 0 auto;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0;
        padding: 0 14px;
        font-family: 'Roboto', sans-serif;
        font-size: 12px;
        font-weight: 700;
        color: #999;
        background: none;
        border: none;
        cursor: pointer;
        position: relative;
        min-height: 44px;
        transition: color 0.15s, background 0.15s;
        -webkit-tap-highlight-color: transparent;
    }

    .db-mbn-tab svg {
        display: none;
    }

    .db-mbn-tab span {
        font-size: 12px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .db-mbn-tab.active {
        color: #111;
        background: #f7f7f7;
        font-weight: 700;
    }

    .db-mbn-tab.active::after {
        content: '';
        position: absolute;
        left: 12px;
        right: 12px;
        bottom: 0;
        height: 2px;
        background: #111;
        border-radius: 2px 2px 0 0;
    }

    .db-mbn-badge {
        position: absolute;
        top: 5px;
        right: 6px;
        background: #ef4444;
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        border-radius: 10px;
        padding: 1px 5px;
        min-width: 16px;
        text-align: center;
        line-height: 1.5;
        display: none;
    }

    .db-mbn-badge:not(:empty) { display: block; }

    /* Responsive home hero on mobile */
    .home-hero {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 20px;
    }

    .home-hero-title  { font-size: 20px; }
    .home-hero-desc   { font-size: 15px; }
    .home-hero-stats  { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .home-hs-value    { font-size: 26px; }
    .home-features-grid { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 480px) {
    .home-btn-primary,
    .home-btn-secondary { width: 100%; text-align: center; }
    .home-hero-actions  { flex-direction: column; }
}
