/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fb;
    color: #1e293b;
}


/* =========================================================
   NAVBAR
========================================================= */

.navbar {
    height: 65px;

    background: #0f172a;

    color: white;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 35px;

    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.12);
}

.navbar-title {
    font-size: 20px;
    font-weight: bold;
}

.menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu a {
    text-decoration: none;

    color: #cbd5e1;

    padding: 10px 18px;

    border-radius: 8px;

    font-size: 14px;

    transition: all 0.2s ease;
}

.menu a:hover {
    background: #1e40af;
    color: white;
}

.menu a.active {
    background: #2563eb;
    color: white;
}


/* =========================================================
   CONTAINER
========================================================= */

.container {
    width: 94%;
    max-width: 1400px;

    margin: 35px auto;
}


/* =========================================================
   TITLE
========================================================= */

.title {
    margin-bottom: 25px;
}

.title h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.title p {
    color: #64748b;
    font-size: 14px;
}


/* =========================================================
   DASHBOARD STATISTICS
========================================================= */

.stats {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;

    margin-bottom: 25px;
}

.stat-card {
    background: white;

    padding: 25px;

    border-radius: 15px;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.06);

    transition: transform 0.2s ease,
                box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.09);
}

.stat-card h4 {
    color: #64748b;

    font-size: 14px;

    margin-bottom: 12px;

    font-weight: normal;
}

.stat-card .number {
    font-size: 32px;

    font-weight: bold;

    color: #0f172a;
}


/* =========================================================
   CHART
========================================================= */

.chart-card {
    background: white;

    padding: 30px;

    border-radius: 15px;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.06);
}

.chart-title {
    font-size: 20px;

    font-weight: bold;

    margin-bottom: 6px;
}

.chart-description {
    color: #64748b;

    font-size: 14px;

    margin-bottom: 25px;
}

.chart-container {
    position: relative;

    width: 100%;

    height: 400px;
}


/* =========================================================
   DATA TABLE
========================================================= */

.table-card {
    background: white;

    border-radius: 15px;

    padding: 25px;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.06);
}

.table-wrapper {
    width: 100%;

    overflow-x: auto;
}

table {
    width: 100%;

    min-width: 1300px;

    border-collapse: collapse;
}

thead th {
    background: #f8fafc;

    padding: 14px 10px;

    font-size: 12px;

    font-weight: bold;

    color: #475569;

    border-bottom:
        1px solid #e2e8f0;

    white-space: nowrap;

    text-align: center;
}

tbody td {
    padding: 12px 10px;

    font-size: 13px;

    text-align: center;

    border-bottom:
        1px solid #f1f5f9;

    white-space: nowrap;
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: #f8fafc;
}


/* =========================================================
   FOTO DETEKSI
========================================================= */

.foto {
    width: 100px;

    height: 65px;

    object-fit: cover;

    border-radius: 8px;

    border:
        1px solid #e2e8f0;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.foto:hover {
    transform: scale(1.08);

    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.15);
}


/* =========================================================
   STATUS APD
========================================================= */

.status {
    display: inline-block;

    padding: 6px 9px;

    border-radius: 6px;

    font-size: 10px;

    font-weight: bold;

    white-space: nowrap;
}


/* MEMAKAI */

.memakai {
    background: #dcfce7;

    color: #166534;
}


/* TIDAK MEMAKAI */

.tidak-memakai {
    background: #fee2e2;

    color: #991b1b;
}


/* TIDAK TERDETEKSI */

.tidak-terdeteksi {
    background: #fef3c7;

    color: #92400e;
}


/* =========================================================
   PERSENTASE
========================================================= */

.persentase {
    font-size: 15px;

    font-weight: bold;
}

.persentase.lengkap {
    color: #16a34a;
}

.persentase.tidak-lengkap {
    color: #dc2626;
}


/* =========================================================
   BADGE
========================================================= */

.badge {
    display: inline-block;

    padding: 6px 10px;

    border-radius: 6px;

    font-size: 11px;

    font-weight: bold;
}

.badge-lengkap {
    background: #dcfce7;

    color: #166534;
}

.badge-tidak-lengkap {
    background: #fee2e2;

    color: #991b1b;
}


/* =========================================================
   EMPTY DATA
========================================================= */

.empty {
    text-align: center;

    padding: 60px 20px;

    color: #94a3b8;

    font-size: 14px;
}


/* =========================================================
   LINK FOTO
========================================================= */

.table-wrapper a {
    display: inline-block;

    text-decoration: none;
}


/* =========================================================
   RESPONSIVE TABLE
========================================================= */

@media (max-width: 900px) {

    .container {
        width: 92%;
    }

    .stats {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 700px) {

    .navbar {
        height: auto;

        padding: 15px 20px;

        flex-direction: column;

        gap: 15px;
    }

    .navbar-title {
        font-size: 18px;
    }

    .menu {
        width: 100%;

        justify-content: center;
    }

    .menu a {
        padding: 9px 14px;

        font-size: 13px;
    }

    .title h2 {
        font-size: 24px;
    }

    .chart-card {
        padding: 20px;
    }

    .chart-container {
        height: 320px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 480px) {

    .container {
        width: 94%;

        margin: 25px auto;
    }

    .title h2 {
        font-size: 22px;
    }

    .title p {
        font-size: 13px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-card .number {
        font-size: 28px;
    }

    .chart-card {
        padding: 15px;
    }

    .chart-title {
        font-size: 18px;
    }

    .chart-container {
        height: 280px;
    }

    .table-card {
        padding: 15px;
    }

}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


body {
    font-family: Arial, Helvetica, sans-serif;

    background: #f4f7fb;

    color: #1e293b;
}


/* =====================================================
   NAVBAR
===================================================== */

.navbar {
    height: 65px;

    background: #ffffff;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 35px;

    border-bottom: 1px solid #e5eaf0;

    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}


.navbar-title {
    font-size: 19px;

    font-weight: 700;

    color: #172554;
}


.menu {
    display: flex;

    gap: 8px;
}


.menu a {
    text-decoration: none;

    color: #64748b;

    padding: 9px 16px;

    border-radius: 7px;

    font-size: 13px;
}


.menu a:hover {
    background: #eff6ff;

    color: #2563eb;
}


.menu a.active {
    background: #2563eb;

    color: white;
}


/* =====================================================
   DASHBOARD
===================================================== */

.dashboard-container {

    width: 94%;

    max-width: 1450px;

    margin: 30px auto 50px;
}


.dashboard-header {

    margin-bottom: 25px;
}


.dashboard-header h1 {

    font-size: 26px;

    margin-bottom: 5px;
}


.dashboard-header p {

    color: #64748b;

    font-size: 14px;
}


/* =====================================================
   STATISTICS
===================================================== */

.dashboard-stats {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 18px;

    margin-bottom: 20px;
}


.dashboard-stat {

    background: white;

    min-height: 120px;

    padding: 22px;

    border-radius: 12px;

    display: flex;

    align-items: center;

    gap: 17px;

    border: 1px solid #edf1f5;

    box-shadow:
        0 4px 15px rgba(15,23,42,.04);
}


.stat-icon {

    width: 55px;

    height: 55px;

    min-width: 55px;

    border-radius: 12px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 25px;

    font-weight: bold;
}


.stat-icon.blue {

    background: #e0efff;

    color: #2563eb;
}


.stat-icon.green {

    background: #dcfce7;

    color: #16a34a;
}


.stat-icon.red {

    background: #fee2e2;

    color: #dc2626;
}


.stat-icon.yellow {

    background: #fef3c7;

    color: #d97706;
}


.stat-label {

    font-size: 11px;

    color: #64748b;

    font-weight: bold;

    margin-bottom: 5px;
}


.stat-value {

    font-size: 28px;

    font-weight: 700;

    color: #111827;
}


.stat-unit {

    font-size: 11px;

    color: #94a3b8;

    margin-top: 2px;
}


/* =====================================================
   GRID
===================================================== */

.dashboard-grid {

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 20px;

    margin-bottom: 20px;
}


/* =====================================================
   CARD
===================================================== */

.dashboard-card {

    background: #ffffff;

    border-radius: 12px;

    border: 1px solid #edf1f5;

    box-shadow:
        0 4px 15px rgba(15,23,42,.04);

    padding: 22px;

    min-height: 300px;
}


.card-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 20px;
}


.card-header h3 {

    font-size: 15px;

    color: #1e293b;
}


.card-header span {

    font-size: 11px;

    color: #94a3b8;
}


/* =====================================================
   DONUT
===================================================== */

.donut-layout {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 45px;

    height: 220px;
}


.donut-box {

    width: 190px;

    height: 190px;
}


.chart-legend {

    display: flex;

    flex-direction: column;

    gap: 20px;
}


.legend-item {

    display: grid;

    grid-template-columns:
        12px 1fr auto;

    align-items: center;

    gap: 9px;

    font-size: 12px;

    min-width: 170px;
}


.legend-dot {

    width: 10px;

    height: 10px;

    border-radius: 50%;
}


.legend-dot.lengkap {

    background: #2563eb;
}


.legend-dot.tidak {

    background: #f59e0b;
}


.legend-item strong {

    font-size: 13px;
}


/* =====================================================
   LINE CHART
===================================================== */

.line-chart {

    position: relative;

    width: 100%;

    height: 220px;
}


/* =====================================================
   STATUS APD
===================================================== */

.apd-status-list {

    display: flex;

    flex-direction: column;

    gap: 16px;
}


.apd-row {

    display: grid;

    grid-template-columns:
        130px 1fr 45px;

    align-items: center;

    gap: 12px;
}


.apd-name {

    font-size: 12px;

    color: #475569;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.apd-progress {

    height: 9px;

    background: #e2e8f0;

    border-radius: 20px;

    overflow: hidden;
}


.apd-progress-fill {

    height: 100%;

    background: #2563eb;

    border-radius: 20px;

    transition: width .5s ease;
}


.apd-percent {

    font-size: 12px;

    font-weight: bold;

    text-align: right;
}


/* =====================================================
   COMPLIANCE
===================================================== */

.compliance-content {

    height: 220px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 40px;
}


.compliance-circle {

    position: relative;

    width: 190px;

    height: 190px;
}


.compliance-circle svg {

    width: 100%;

    height: 100%;

    transform: rotate(-90deg);
}


.circle-bg {

    fill: none;

    stroke: #e8edf2;

    stroke-width: 14;
}


.circle-progress {

    fill: none;

    stroke: #16a34a;

    stroke-width: 14;

    stroke-linecap: round;

    transition: stroke-dasharray .5s ease;
}


.compliance-number {

    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-direction: column;

    font-size: 38px;

    font-weight: bold;
}


.compliance-number span {

    font-size: 20px;
}


.compliance-number small {

    font-size: 11px;

    color: #64748b;

    font-weight: normal;

    margin-top: 3px;
}


.compliance-info {

    max-width: 250px;
}


.compliance-title {

    font-size: 17px;

    font-weight: bold;

    margin-bottom: 8px;
}


.compliance-info p {

    font-size: 12px;

    line-height: 1.7;

    color: #64748b;

    margin-bottom: 15px;
}


.compliance-badge {

    display: inline-block;

    padding: 7px 14px;

    border-radius: 20px;

    font-size: 10px;

    font-weight: bold;
}


.compliance-badge.good {

    background: #dcfce7;

    color: #166534;
}


.compliance-badge.warning {

    background: #fef3c7;

    color: #92400e;
}


.compliance-badge.danger {

    background: #fee2e2;

    color: #991b1b;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1100px) {

    .dashboard-stats {

        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 850px) {

    .dashboard-grid {

        grid-template-columns: 1fr;
    }

}


@media (max-width: 650px) {

    .navbar {

        height: auto;

        padding: 15px;

        flex-direction: column;

        gap: 15px;
    }


    .dashboard-container {

        width: 92%;
    }


    .dashboard-stats {

        grid-template-columns: 1fr;
    }


    .donut-layout {

        gap: 15px;

        flex-direction: column;

        height: auto;

        padding-bottom: 15px;
    }


    .chart-legend {

        width: 100%;
    }


    .compliance-content {

        flex-direction: column;

        height: auto;

        padding-bottom: 20px;
    }


    .apd-row {

        grid-template-columns:
            110px 1fr 40px;
    }

}
