:root {
    --biru-tua: #1565c0;
    --biru: #2196f3;
    --biru-muda: #64b5f6;
    --biru-lembut: #e3f2fd;
    --biru-bg: #eef7ff;
    --hijau: #2e7d32;
    --merah: #c62828;
    --kuning: #f9a825;
}

body {
    background: var(--biru-bg);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #263238;
}

/* ---------- LOGIN ---------- */
.login-body {
    background: linear-gradient(135deg, #90caf9 0%, #bbdefb 50%, #e3f2fd 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-wrapper { width: 100%; max-width: 420px; padding: 20px; }
.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 35px;
    box-shadow: 0 15px 40px rgba(21, 101, 192, 0.25);
}
.login-icon {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, var(--biru), var(--biru-tua));
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    margin: 0 auto 18px;
}
.btn-login {
    background: linear-gradient(135deg, var(--biru), var(--biru-tua));
    color: #fff; border: none; padding: 10px; font-weight: 600; border-radius: 10px;
}
.btn-login:hover { opacity: .92; color: #fff; }

/* ---------- LAYOUT ---------- */
.app-sidebar {
    background: linear-gradient(180deg, var(--biru-tua), #0d47a1);
    min-height: 100vh;
    color: #fff;
    padding-top: 20px;
    position: fixed;
    width: 240px;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
}
.app-sidebar .brand {
    text-align: center;
    padding: 0 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,.15);
    margin-bottom: 15px;
}
.app-sidebar .brand i { font-size: 30px; }
.app-sidebar .brand h5 { margin-top: 8px; font-weight: 700; }
.app-sidebar a.nav-link {
    color: rgba(255,255,255,.85);
    padding: 12px 22px;
    font-size: 15px;
    border-left: 4px solid transparent;
}
.app-sidebar a.nav-link i { width: 22px; }
.app-sidebar a.nav-link:hover,
.app-sidebar a.nav-link.active {
    background: rgba(255,255,255,.12);
    color: #fff;
    border-left: 4px solid #fff;
}
.app-content { margin-left: 240px; padding: 25px 30px 60px; }

.app-topbar {
    background: #fff;
    border-radius: 14px;
    padding: 14px 22px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 4px 14px rgba(33,150,243,.08);
    margin-bottom: 24px;
}
.app-topbar h4 { margin: 0; color: var(--biru-tua); font-weight: 700; }

@media (max-width: 991px) {
    .app-sidebar { width: 100%; height: auto; min-height: auto; position: relative; }
    .app-content { margin-left: 0; }
}

/* ---------- CARDS ---------- */
.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(33,150,243,.10);
    display: flex; align-items: center; gap: 16px;
    height: 100%;
}
.stat-icon {
    width: 55px; height: 55px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff; flex-shrink: 0;
}
.stat-card h3 { margin: 0; font-weight: 700; color: #1a237e; }
.stat-card small { color: #78909c; }

.bg-icon-blue { background: linear-gradient(135deg, #42a5f5, #1e88e5); }
.bg-icon-green { background: linear-gradient(135deg, #66bb6a, #388e3c); }
.bg-icon-orange { background: linear-gradient(135deg, #ffa726, #f57c00); }
.bg-icon-red { background: linear-gradient(135deg, #ef5350, #c62828); }

.card-panel {
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 6px 18px rgba(33,150,243,.10);
    margin-bottom: 24px;
}
.card-panel h5 { color: var(--biru-tua); font-weight: 700; margin-bottom: 18px; }

/* ---------- TABLE ---------- */
.table thead { background: var(--biru-lembut); }
.table thead th { color: var(--biru-tua); font-weight: 700; border: none; white-space: nowrap; }
.table td { vertical-align: middle; }
.table-responsive { border-radius: 12px; overflow: hidden; }

.badge-status-selesai { background: #2e7d32; }
.badge-status-pending { background: #f9a825; color: #212121; }
.badge-normal { background: #2e7d32; }
.badge-error { background: #c62828; }
.badge-downtime { background: #c62828; }
.badge-tidakrecord { background: #6d4c41; }

/* ---------- FORM ---------- */
.form-label { font-weight: 600; color: #37474f; font-size: 14px; }
.form-control:focus, .form-select:focus {
    border-color: var(--biru);
    box-shadow: 0 0 0 .2rem rgba(33,150,243,.18);
}
.btn-primary-blue {
    background: linear-gradient(135deg, var(--biru), var(--biru-tua));
    border: none; color: #fff; font-weight: 600;
}
.btn-primary-blue:hover { opacity: .9; color: #fff; }

.photo-thumb {
    width: 90px; height: 90px; object-fit: cover;
    border-radius: 10px; border: 2px solid var(--biru-lembut);
    margin: 4px;
}

.timeline {
    border-left: 3px solid var(--biru-muda);
    padding-left: 18px;
    margin-left: 6px;
}
.timeline-item {
    position: relative;
    padding-bottom: 18px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -25px; top: 4px;
    width: 12px; height: 12px;
    background: var(--biru);
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--biru-muda);
}
