/* ============================================================
   dashboard.css — PERUMDA Tirta Sanjiwani
   Letakkan di: public/css/dashboard.css
   Lalu panggil di layout: <link rel="stylesheet" href="{{ asset('css/dashboard.css') }}">
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
}

/* ── WRAPPER ── */
.db-wrap {
    font-family: 'Plus Jakarta Sans', sans-serif;
    padding: 1.5rem;
    background: #f4f6f8;
    min-height: 100vh;
}

/* ══════════════════════════════════════
   BANNER
   ══════════════════════════════════════ */
.db-banner {
    background: linear-gradient(135deg, #0f6e56 0%, #1d9e75 50%, #3ab574 100%);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 1.25rem;
}

.db-banner-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.db-av {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    font-weight: 700;
    color: #fff;
}

.db-av-name {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
}

.db-av-email {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 2px;
}

.db-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.db-chip {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chip-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    display: inline-block;
}

/* ══════════════════════════════════════
   STAT CARDS
   ══════════════════════════════════════ */
.db-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 1.25rem;
}

@media (max-width: 900px) {
    .db-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .db-stats { grid-template-columns: 1fr; }
}

.db-stat {
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    position: relative;
    overflow: hidden;
}

.db-stat-ico {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.db-stat-ico svg {
    width: 20px;
    height: 20px;
}

.db-stat-lbl {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    opacity: 0.7;
    margin-bottom: 5px;
}

.db-stat-num {
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.db-stat-sub {
    font-size: 11px;
    opacity: 0.65;
}

.db-stat-deco {
    position: absolute;
    right: -12px;
    top: -12px;
    width: 75px;
    height: 75px;
    border-radius: 50%;
    opacity: 0.13;
}

/* Warna stat cards */
.s-green                { background: #e1f5ee; color: #085041; }
.s-green .db-stat-ico   { background: #9fe1cb; }
.s-green .db-stat-deco  { background: #1d9e75; }

.s-blue                 { background: #e6f1fb; color: #042c53; }
.s-blue .db-stat-ico    { background: #b5d4f4; }
.s-blue .db-stat-deco   { background: #378add; }

.s-amber                { background: #faeeda; color: #412402; }
.s-amber .db-stat-ico   { background: #fac775; }
.s-amber .db-stat-deco  { background: #ef9f27; }

.s-violet               { background: #eeedfe; color: #26215c; }
.s-violet .db-stat-ico  { background: #cecbf6; }
.s-violet .db-stat-deco { background: #7f77dd; }

/* ══════════════════════════════════════
   CHART BAR WRAPPER
   ══════════════════════════════════════ */
.db-chart-wrap {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 1.2rem;
    margin-bottom: 1.25rem;
}

.db-bar-legend {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

/* ══════════════════════════════════════
   MAIN 2-COL GRID
   ══════════════════════════════════════ */
.db-main {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 12px;
}

@media (max-width: 900px) {
    .db-main { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════
   PANELS (kartu putih umum)
   ══════════════════════════════════════ */
.db-panel {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 1.2rem;
    margin-bottom: 12px;
}

.db-panel:last-child {
    margin-bottom: 0;
}

.db-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 0.85rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.db-panel-head-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.db-panel-head-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

/* ══════════════════════════════════════
   QUICK LINKS
   ══════════════════════════════════════ */
.db-qlink {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.15s;
    margin-bottom: 3px;
}

.db-qlink:hover {
    background: #f5f5f5;
}

.db-qlink-ico {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.db-qlink-ico svg {
    width: 17px;
    height: 17px;
}

.db-qlink-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

.db-qlink-sub {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.db-qlink-arr {
    margin-left: auto;
    color: #bbb;
    font-size: 18px;
}

/* ══════════════════════════════════════
   TARIF TABLE
   ══════════════════════════════════════ */
.db-tarif-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.db-tarif-table th {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    padding: 6px 8px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
}

.db-tarif-table td {
    padding: 7px 8px;
    border-bottom: 1px solid #f7f7f7;
    color: #1a1a1a;
    vertical-align: middle;
}

.db-tarif-table tr:last-child td {
    border-bottom: none;
}

.db-tarif-table tr:hover td {
    background: #fafafa;
}

.db-tarif-price {
    font-weight: 700;
}

/* Badge jenis pekerjaan */
.badge-jenis {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
}

.bj-sr        { background: #e1f5ee; color: #085041; }
.bj-pjp       { background: #e6f1fb; color: #042c53; }
.bj-perbaikan { background: #fcebeb; color: #501313; }
.bj-gali      { background: #faeeda; color: #412402; }
.bj-gv        { background: #eeedfe; color: #26215c; }
.bj-cat       { background: #fbeaf0; color: #4b1528; }

/* ══════════════════════════════════════
   KOLOM KANAN
   ══════════════════════════════════════ */
.db-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── STATUS SISTEM ── */
.db-sys {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 1.2rem;
}

.db-sys-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 0.85rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid #f0f0f0;
}

.db-sys-title svg {
    width: 15px;
    height: 15px;
    color: #888;
}

.db-sys-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid #f7f7f7;
}

.db-sys-row:last-child {
    border-bottom: none;
}

.db-sys-lbl {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 7px;
}

.db-sys-lbl svg {
    width: 13px;
    height: 13px;
}

/* Badge status */
.db-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.db-badge-ok  { background: #e1f5ee; color: #0f6e56; }
.db-badge-am  { background: #faeeda; color: #633806; }
.db-badge-num { background: #e6f1fb; color: #042c53; }

/* ── PERINGATAN ── */
.db-warn {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 1.2rem;
}

.db-warn-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 0.85rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.db-warn-box {
    background: #fffbeb;
    border: 1px solid #fac775;
    border-radius: 10px;
    padding: 0.9rem;
}

.db-warn-box-title {
    font-size: 12px;
    font-weight: 700;
    color: #633806;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
}

.db-warn-box-title svg {
    width: 14px;
    height: 14px;
    color: #d97706;
}

.db-warn-tag {
    background: #fac775;
    color: #412402;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: auto;
}

.db-warn-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #633806;
    padding: 5px 0;
    border-bottom: 1px solid #fde68a;
}

.db-warn-row:last-child {
    border-bottom: none;
}

.db-warn-date {
    font-size: 11px;
    opacity: 0.7;
}

.db-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #999;
    justify-content: center;
    padding: 0.75rem;
}

.db-empty svg {
    width: 16px;
    height: 16px;
}

/* ── INFO CARD PERUMDA ── */
.db-info-card {
    background: linear-gradient(145deg, #04342c, #0f6e56);
    border-radius: 14px;
    padding: 1.2rem;
    color: #fff;
}

.db-info-logo {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.65;
    margin-bottom: 4px;
}

.db-info-name {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 3px;
}

.db-info-region {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 0.85rem;
}

.db-info-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    margin-bottom: 0.85rem;
}

.db-info-row {
    font-size: 12px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.db-info-row svg {
    width: 13px;
    height: 13px;
    opacity: 0.7;
    flex-shrink: 0;
}

/* ── DONUT CARD ── */
.db-donut-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 1.2rem;
}

.db-chart-legend {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.db-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #666;
}

.db-legend-sq {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}