@font-face {
    font-family: 'VAGRounded';
    src: url('../assets/fonts/VAGRoundedStd-Light.otf') format('opentype');
}

/* BASE */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    font-family: 'VAGRounded', sans-serif;
    background: #ffffff;
    margin: 0;
    padding: 0;
    color: #1a1a1a;
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: 0.1rem;
}

/* BODY */
.db-body {
    max-width: 1440px;
    margin: 0 auto;
    padding: 14px 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#loadingScreen {
    position: fixed;
    inset: 0;
    background: #fff;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    z-index: 99999;
}

.loader-circle {
    width: 90px;
    height: 90px;

    border: 8px solid #e8f5e9;
    border-top: 8px solid #1b5e20;

    border-radius: 50%;

    animation: spin 1s linear infinite;
}

.loader-text {
    margin-top: 18px;

    font-size: .9rem;
    font-weight: 600;

    color: #2e7d32;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.error-box{
    margin:20px;
    padding:16px;
    background:#ffebee;
    border:1px solid #ef9a9a;
    color:#c62828;
    border-radius:8px;
    font-weight:600;
    white-space:pre-wrap;
}

/* NAVBAR */
.navbar-pt {
    position: sticky;
    top: 0;
    z-index: 999;
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.nav-link {
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all .2s ease;
}

.nav-link:hover {
    background: #f3f4f6;
    color: #111827;
}

.nav-link.active {
    background: #1b5e20;
    color: #ffffff;
}

/* HEADER */
.db-header {
    padding: 12px 0 10px;
}
.db-header-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.db-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.db-logo {
    height: 150px;
    width: auto;
}
.db-logo50 {
    height: 85px;
    width: auto;
}
.db-title {
    font-size: clamp(1.4rem, 2.8vw, 2.3rem);
    font-weight: 900;
    color: #1b5e20;
    line-height: 1.1;
    text-transform: uppercase;
}
.db-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 700;
    color: #1b5e20;
    margin-top: 2px;
}
.db-periode {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;

    font-size: clamp(0.78rem, 1.3vw, 0.95rem);
    color: #555;
}
.db-ico-sm {
    width: 16px;
    height: 16px;
}

/* KPI */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}
.kpi {
    border-radius: 14px;
    padding: 16px 12px 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}
.kpi-ico { width: 36px; height: 36px; flex-shrink: 0; }
.kpi-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 3px;
    line-height: 1.2;
}
.kpi-val {
    font-size: clamp(2.2rem, 3.5vw, 3.2rem);
    font-weight: 900;
    line-height: 1;
    margin-top: 3px;
}
.kpi-val-pct { font-size: clamp(1.8rem, 3vw, 2.7rem); }
.kpi-sub { font-size: 0.68rem; line-height: 1.35; opacity: 0.9; }

/* KPI colors */
/* Total Alat */
.kpi-total { background: #fff; color: #1b5e20; border: 2px solid #c8e6c9; }
.kpi-total .kpi-ico { color: #2e7d32; }
/* Pass */
.kpi-pass   { background: #66B345; color: #fff; }
/* Kondisional */
.kpi-kond   { background: #E6B800; color: #fff; }
/* Fail */
.kpi-fail   { background: #ED1C24; color: #fff; }
/* Target */
.kpi-target { background: #fff; color: #1b5e20; border: 2px solid #c8e6c9; }
.kpi-target .kpi-ico { color: #2e7d32; }

/* LAPORAN + DOKUMENTASI */
.row-mid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 14px;
    align-items: stretch;
}

/* LAPORAN */
.laporan-col {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,.09);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.laporan-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.laporan-info-box {
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
}
.laporan-lab-name {
    font-size: 1rem;
    font-weight: 900;
    color: #1b5e20;
    margin-bottom: 8px;
}
.laporan-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    margin-bottom: 4px;
}
.laporan-grid-2-bottom {
    align-items: start;
}
.laporan-field {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}
.laporan-field-full {
    grid-column: 1 / -1;
}
.laporan-field-lbl {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .68rem;
    font-weight: 700;
    color: #1b5e20;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
}
.lf-ico {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.laporan-field-val {
    font-size: .78rem;
    color: #444;
    line-height: 1.5;
}
.laporan-lokasi-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding-top: 10px;
}
.laporan-pin {
    width: 18px;
    height: 18px;
    color: #1b5e20;
    flex-shrink: 0;
    margin-top: 2px;
}
.laporan-lokasi-title {
    font-size: .72rem;
    font-weight: 700;
    color: #1b5e20;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 3px;
}
.laporan-lokasi-val {
    font-size: .78rem;
    color: #444;
    line-height: 1.55;
}
.laporan-map-box {
    flex: 1;
    min-height: 180px;
    overflow: hidden;
}
.laporan-iframe {
    width: 100%;
    height: 100%;
    min-height: 180px;
    border: none;
    display: block;
}

/* DOKUMENTASI */
.dok-col {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.09);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.section-green-hd {
    background: #1b5e20;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}
.hd-ico {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.dok-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
    flex: 1;
}
.dok-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    background: #f5f5f5;
}
.dok-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.dok-item:hover .dok-img {
    transform: scale(1.05);
}
.dok-caption {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.3;
    padding: 6px 8px;
    text-align: center;
}

/* ROW DATA */
.row-data {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 14px;
    align-items: stretch;
}
.row-data-summary{
    grid-template-columns: 2fr 1.5fr;
}

/* TABEL */
.tbl-col {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,.09);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.tbl-scroll {
    flex: 1;
    overflow-x: auto;
    display: flex;
    flex-direction: column;
}
.alat-tbl {
    width: 100%;
    min-width: 700px;
    height: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: .78rem;
}
.alat-tbl th, .alat-tbl td {
    padding: 8px 10px;
    white-space: nowrap;
}
.th-no{
    width:55px;
}
.alat-tbl th:last-child,
.alat-tbl td:last-child{
    width:110px;
}
.thead-main th {
    background: #1b5e20;
    color: #fff;
    font-size: .76rem;
    font-weight: 700;
    text-align: left;
    padding: 10px;
    border-right: 1px solid rgba(255,255,255,.15);
}
.th-no, .th-center, .tc {
    text-align: center;
}
.tbl-row {
    border-bottom: 1px solid #eee;
    transition: .15s;
}
.tbl-row:hover {
    background: #f1f8f2;
}
.tbl-row:nth-child(even) {
    background: #fafafa;
}
.tbl-row:nth-child(even):hover {
    background: #f1f8f2;
}
.thead-main th, .thead-sub th {

    background: #1f6b3d;
    color: white;
    text-align: center;
    vertical-align: middle;
}
.thead-sub th {
    border-top: 1px solid rgba(255,255,255,.2);
}
.pass-cell {
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 600;
}
.kondisional-cell {
    background: #fff8e1;
    color: #e6b800;
    font-weight: 600;
}
.fail-cell {
    background: #ffebee;
    color: #c62828;
    font-weight: 600;
}
.pass-cell,
.kondisional-cell,
.fail-cell{
    min-width:70px;
    width:70px;
    text-align:center;
}
.progress-wrap{
    position:relative;
    width:100%;
    height:32px;
    border-radius:8px;
    overflow:hidden;
}
.progress-fill{
    height:100%;
}
.progress-label{
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%, -50%);
    font-weight:700;
    font-size:13px;
    color:#222;
}

/* BADGE */
.eval-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .03em;
}
.badge-pass {
    background: #66B345;
    color: #fff;
}
.badge-kondisional {
    background: #E6B800;
    color: #fff;
}
.badge-fail {
    background: #ED1C24;
    color: #fff;
}
.badge-unknown {
    background: #9e9e9e;
    color: #fff;
}

/* REKAP */
.rekap-col {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,.09);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.rekap-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* DONUT */
.rekap-left {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
}
.donut-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}
.donut-svg {
    width: 140px;
    height: 140px;
}
.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.donut-center-val {
    font-size: 1.2rem;
    font-weight: 900;
    color: #1b5e20;
    line-height: 1;
}
.donut-center-lbl {
    font-size: .6rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* DONUT LEGEND */
.donut-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dl-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #fafafa;
    border-radius: 8px;
    border-left: 4px solid transparent;
}
.dl-item:nth-child(1) {
    border-left-color: #66B345;
}
.dl-item:nth-child(2) {
    border-left-color: #E6B800;
}
.dl-item:nth-child(3) {
    border-left-color: #ED1C24;
}
.dl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dl-text {
    flex: 1;
}
.dl-name {
    font-size: .7rem;
    font-weight: 700;
    color: #222;
}
.dl-val {
    font-size: .64rem;
    color: #777;
}

/* SUMMARY PROGRESS */
.summary-progress-section {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

#summaryProgress {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#summaryProgress * {
    letter-spacing: 0;
}

/* PREMIUM DASHBOARD */
.premium-dashboard {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    height: 100%;
    flex: 1;
}

.premium-metrics-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.premium-metric-card,
.premium-composition-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.premium-composition-card {
    flex: 1;
    justify-content: space-between;
}

.pm-header, .pc-header {
    margin-bottom: 12px;
}

.pm-title, .pc-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}

.pm-subtitle, .pc-subtitle {
    font-size: 0.7rem;
    color: #64748b;
}

.pm-value {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}
.pm-value.success { color: #2e7d32; }
.pm-value.progress { color: #1565c0; }

.pm-bar-track {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.pm-bar-fill {
    height: 100%;
    border-radius: 4px;
}
.pm-bar-fill.success { background: #66B345; }
.pm-bar-fill.progress { background: #3b82f6; }

.pm-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #475569;
}
.pm-meta strong {
    color: #0f172a;
    font-weight: 700;
}

/* COMPOSITION CARD */
.pc-stacked-bar {
    display: flex;
    width: 100%;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin: 16px 0;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.pc-bar {
    height: 100%;
    transition: width 0.3s ease;
}
.pc-bar.pass { background: #66B345; }
.pc-bar.kondisional { background: #E6B800; }
.pc-bar.fail { background: #ED1C24; }

.pc-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: auto;
}

.pc-stat-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
}

.pc-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
}
.pc-indicator.pass { background: #66B345; box-shadow: 0 0 0 2px #dcfce7; }
.pc-indicator.kondisional { background: #E6B800; box-shadow: 0 0 0 2px #fef08a; }
.pc-indicator.fail { background: #ED1C24; box-shadow: 0 0 0 2px #fee2e2; }

.pc-stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pc-stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.02em;
}

.pc-stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.pc-stat-value span {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

/* ROW BOTTOM */
.row-bot {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    align-items: stretch;
}
.bot-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.09);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.bot-hd {
    background: #f5f5f5;
    border-bottom: 3px solid #1b5e20;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1b5e20;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.bot-list {
    padding: 12px 14px 12px 28px;
    margin: 0;
    list-style: disc;
    font-size: 0.78rem;
    color: #333;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    line-height: 1.65;
}

/* Petugas */
.petugas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px;
    flex: 1;
}
.petugas-item { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
    gap: 8px; 
}
.petugas-ava {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}
.petugas-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.petugas-name { 
    font-size: 0.8rem; 
    font-weight: 700; 
    color: #1b5e20; 
    line-height: 1.3; 
}
.petugas-role { 
    font-size: 0.7rem;
    color: #666;
    line-height: 1.2;
}

/* CATATAN */
.catatan-body{
    padding:14px;
    display:flex;
    flex-direction:column;
    flex:1;
    gap:14px;
}
.catatan-text{
    margin:0;
    font-size:.78rem;
    line-height:1.7;
    color:#444;
    text-align:justify;
}

/* TANDA TANGAN */
.ttd-block{
    margin-top:auto;
    padding-top:10px;
    border-top:1px solid #eee;
}
.ttd-top{
    font-size:.72rem;
    color:#666;
    margin-bottom:8px;
}
.ttd-img-wrap{
    height:70px;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    margin-bottom:4px;
}
.ttd-img{
    max-height:70px;
    max-width:160px;
    object-fit:contain;
    display:block;
}
.ttd-line{
    width:180px;
    border-top:2px solid #333;
    margin-bottom:6px;
}
.ttd-name{
    font-size:.82rem;
    font-weight:700;
    color:#222;
    line-height:1.4;
}
.ttd-role{
    font-size:.72rem;
    color:#666;
    margin-top:2px;
}
/* tidak ada gambar ttd */
.ttd-img-wrap:empty{
    height:50px;
}

/* FOOTER */
.db-footer{
    background:#1b5e20;
    color:#fff;
    padding:14px 24px;
    margin-top:6px;
}
.footer-inner{
    max-width:1440px;
    margin:0 auto;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
}
.footer-vals{
    display:flex;
    gap:28px;
    flex-wrap:wrap;
}
.footer-vals span{
    display:flex;
    align-items:center;
    gap:7px;
    font-size:.82rem;
    font-weight:700;
    letter-spacing:.02em;
}
.ft-ico{
    width:18px;
    height:18px;
    flex-shrink:0;
}
.footer-tag{
    font-size:.85rem;
    font-weight:700;
    opacity:.88;
    letter-spacing:.03em;
    white-space:nowrap;
}

/*  RESPONSIVE  */
@media (max-width: 1200px) {
    .row-data { grid-template-columns: 2.5fr 1fr; }
    .rekap-body { flex-direction: row; flex-wrap: wrap; }
    .rekap-left { 
        flex: 1;
        min-width: 200px;
        border-top: none;
        border-left: 1px solid #eee;
        padding-top: 0;
        padding-left: 14px;
        flex-direction: row;
        flex-wrap: wrap; 
    }
    .donut-legend { flex: 1; min-width: 240px; }
}

@media (max-width: 1024px) {
    .row-mid { grid-template-columns: 1fr; }
    .row-bot { grid-template-columns: repeat(2, 1fr); }
    .dok-grid { grid-template-columns: repeat(4, 1fr); }
    .dok-img { height: 110px; }
}

@media (max-width: 768px) {
    .db-body { padding: 10px 12px 20px; gap: 10px; }
    .db-logo { height: 100px; }
    .db-logo50 { height: 56px; }
    .kpi-row { grid-template-columns: repeat(5, 1fr); gap: 6px;}
    .kpi-row .kpi-target { grid-column: auto; flex-direction: column; }
    .kpi-ico { width: 24px; height: 24px; }
    .kpi-val { font-size: 1.3rem; }
    .kpi-val-pct { font-size: 1.1rem; }
    .kpi-label { font-size: 0.5rem; }
    .kpi-sub { font-size: 0.55rem; }
    .kpi { padding: 8px 4px; }
    .laporan-grid-2 { grid-template-columns: 1fr; }
    .laporan-map-box,
    .laporan-iframe { min-height: 220px; }
    .dok-grid { grid-template-columns: repeat(2, 1fr); }
    .dok-img { height: 120px; }
    .tbl-scroll { overflow-x: auto; }
    .rekap-left { flex-direction: row; flex-wrap: wrap; }
    .summary-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ri-item { min-width: 120px; }
    .row-data { grid-template-columns: 1fr; }  
    .row-bot { grid-template-columns: 1fr 1fr; }
    .footer-vals { gap: 14px; }
    .footer-vals span { font-size: 0.74rem; }
    .footer-tag { font-size: 0.74rem; }
}

@media (max-width: 540px) {
    .db-header-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
    .db-header-right { position: absolute; top: 12px; right: 12px; }
    .db-logo { height: 58px; }
    .db-logo50 { height: 38px; }
    .db-title { font-size: 1.1rem; }
    .kpi-row { grid-template-columns: repeat(5, 1fr); gap: 4px; }
    .kpi-row .kpi-total, .kpi-row .kpi-target { grid-column: auto; flex-direction: column; }
    .kpi-ico { width: 18px; height: 18px; }
    .kpi-val { font-size: 1rem; }
    .kpi-val-pct { font-size: 0.85rem; }
    .kpi-label { font-size: 0.42rem; }
    .kpi-sub { font-size: 0.42rem; }
    .kpi { padding: 6px 2px; }
    .laporan-card { flex-direction: column; }
    .laporan-lab { padding: 12px 18px; font-size: 1.1rem; }
    .laporan-sep { width: 100%; height: 2px; }
    .laporan-map-box { min-height: 160px; }
    .laporan-iframe { min-height: 160px; }
    .laporan-grid-2 { grid-template-columns: 1fr; }
    .dok-grid { grid-template-columns: 1fr 1fr; }
    .dok-img { height: 100px; }
    .tbl-col { overflow: hidden; }
    .row-bot { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
    .footer-vals { justify-content: center; gap: 10px; }
    .summary-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .summary-stat-card { padding: 9px; }
    .summary-stat-value { font-size: 1.45rem; }
    .summary-progress-list { gap: 8px; }
    .summary-progress-list .summary-metric { padding: 10px 9px; }
    .summary-progress-list .summary-metric-head {
        min-height: 66px;
        padding-right: 42px;
    }
    .summary-progress-list .summary-metric-value {
        top: 9px;
        right: 9px;
        padding: 3px 7px;
        font-size: .7rem;
    }
    .summary-bar-meta {
        flex-direction: column;
        gap: 2px;
    }
    .rekap-info { flex-direction: row; flex-wrap: wrap; gap: 8px 12px; }
    .ri-item { min-width: 100%; }
}

@media (max-width: 380px) {
    .db-title { font-size: .9rem; }
    .kpi-val { font-size: 1.2rem; }
    .donut-wrap,
    .donut-svg { width: 140px; height: 140px; }
    .summary-stat-grid { grid-template-columns: 1fr; }
    .summary-composition-head { flex-direction: column; }
    .summary-progress-list { grid-template-columns: 1fr; }
    .summary-progress-list .summary-metric-head {
        min-height: 0;
        padding-right: 48px;
    }
    .summary-legend-item { grid-template-columns: auto minmax(0, 1fr); }
    .summary-legend-item strong { grid-column: 2; }
}

/*  PRINT  */
@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }

    html, body {
        width: 210mm;
        height: 297mm;
        overflow: hidden;
        background: #fff;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    #app {
        width: 1440px;
        transform: scale(0.55);
        transform-origin: top left;
        overflow: hidden;
        height: calc(297mm / 0.55);
    }

    .navbar-pt {
        display: none !important;
    }

    .rekap-left {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }

    .donut-wrap {
        flex: 0 0 130px !important;
    }

    .donut-legend {
        flex: 1 !important;
        width: auto !important;
        min-width: 0 !important;
    }

    .row-mid {
        grid-template-columns: 1fr 1.15fr !important;
    }

    .dok-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .laporan-map-box {
        display: none !important;
    }

    .row-data {
        grid-template-columns: 2.5fr 1fr !important;
    }

    .row-bot {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* KPI SUMMARY GRID */
.summary-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 8px;
}

.summary-stat-card {
    min-width: 0;
    padding: 10px 10px 9px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #94a3b8;
    border-radius: 8px;
}

.summary-stat-label {
    font-size: .62rem;
    font-weight: 800;
    line-height: 1.25;
    color: #475569;
    text-transform: uppercase;
}

.summary-stat-value {
    margin-top: 5px;
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1;
    color: #0f172a;
}

.summary-stat-sub {
    margin-top: 5px;
    font-size: .64rem;
    line-height: 1.35;
    color: #64748b;
}

.summary-stat-total { border-left-color: #1b5e20; }
.summary-stat-evaluated { border-left-color: #1e88e5; }
.summary-stat-pending { border-left-color: #94a3b8; }
.summary-stat-pass { border-left-color: #66B345; }
.summary-stat-kondisional { border-left-color: #E6B800; }
.summary-stat-fail { border-left-color: #ED1C24; }

.summary-stat-total .summary-stat-value,
.summary-stat-pass .summary-stat-value {
    color: #2e7d32;
}

.summary-stat-evaluated .summary-stat-value {
    color: #1565c0;
}

.summary-stat-kondisional .summary-stat-value {
    color: #9a6b00;
}

.summary-stat-fail .summary-stat-value {
    color: #c62828;
}
