/* ==========================================================================
   LAPOR FASILITAS DEPOK — Modern Bootstrap 5.3 Theme (DLHK Kota Depok)
   ========================================================================== */

:root {
    --dlhk-primary: #047857;
    --dlhk-primary-dark: #065f46;
    --dlhk-primary-light: #d1fae5;
    --dlhk-accent: #f59e0b;
    --dlhk-sidebar-bg: #0f172a;
    --dlhk-sidebar-darker: #020617;
    --dlhk-body-bg: #f1f5f9;

    --bs-primary: #047857;
    --bs-primary-rgb: 4, 120, 87;
    --bs-success: #059669;
    --bs-success-rgb: 5, 150, 105;
    --bs-body-bg: #f4f7f6;
    --bs-body-color: #1e293b;
    --bs-border-color: #e2e8f0;
    --bs-font-sans-serif: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    -webkit-font-smoothing: antialiased;
}

/* Primary button override for crisp DLHK Emerald */
.btn-primary {
    --bs-btn-bg: #047857;
    --bs-btn-border-color: #047857;
    --bs-btn-hover-bg: #065f46;
    --bs-btn-hover-border-color: #065f46;
    --bs-btn-active-bg: #064e3b;
    --bs-btn-active-border-color: #064e3b;
}

.btn-outline-primary {
    --bs-btn-color: #047857;
    --bs-btn-border-color: #047857;
    --bs-btn-hover-bg: #047857;
    --bs-btn-hover-border-color: #047857;
}

.text-emerald {
    color: #047857 !important;
}

.bg-emerald-gradient {
    background: linear-gradient(135deg, #064e3b 0%, #047857 50%, #0d9488 100%);
}

/* Modern Cards & Hover Effects */
.card-modern {
    border: 1px solid #e2e8f0;
    border-radius: 1.15rem;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.035);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    background-color: #ffffff;
}

.card-modern.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    border-color: #a7f3d0;
}

/* Hero Section */
.hero-banner {
    background: linear-gradient(135deg, #064e3b 0%, #047857 55%, #0f766e 100%);
    border-radius: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 32px -8px rgba(4, 120, 87, 0.32);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px);
    color: #ecfdf5;
}

/* Public Navbar */
.navbar-dlhk {
    background: linear-gradient(90deg, #065f46 0%, #047857 100%);
    box-shadow: 0 4px 16px rgba(6, 78, 59, 0.18);
}

.navbar-dlhk .nav-link {
    color: rgba(255, 255, 255, 0.88) !important;
    border-radius: 0.65rem;
    padding: 0.45rem 0.85rem !important;
    font-weight: 500;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.navbar-dlhk .nav-link:hover,
.navbar-dlhk .nav-link.active {
    background-color: rgba(255, 255, 255, 0.14);
    color: #ffffff !important;
}

/* Back-Office Sidebar Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 268px;
    background-color: var(--dlhk-sidebar-bg);
    color: #cbd5e1;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.app-main {
    flex: 1;
    margin-left: 268px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

@media (max-width: 991.98px) {
    .app-sidebar-desktop {
        display: none !important;
    }
    .app-main {
        margin-left: 0;
    }
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.9rem;
    border-radius: 0.7rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.sidebar-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

.sidebar-nav-link.active {
    background: linear-gradient(90deg, #059669 0%, #047857 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

.sidebar-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 0 0.9rem;
    margin-bottom: 0.45rem;
}

.app-topbar {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* Custom Status & Priority Badges */
.badge-purple {
    background-color: #f3e8ff !important;
    color: #6b21a8 !important;
    border: 1px solid #d8b4fe !important;
}

.badge-teal {
    background-color: #ccfbf1 !important;
    color: #115e59 !important;
    border: 1px solid #99f6e4 !important;
}

@keyframes subtlePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.68; }
}

.pulse-badge {
    animation: subtlePulse 1.8s infinite ease-in-out;
}

/* KPI Icon Box */
.kpi-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Progress Stepper (Public Tracking Page) */
.stepper-wrapper {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0;
}

.stepper-line-bg {
    position: absolute;
    top: 24px;
    left: 24px;
    right: 24px;
    height: 4px;
    background-color: #e2e8f0;
    border-radius: 999px;
    z-index: 0;
}

.stepper-line-fill {
    height: 100%;
    background: linear-gradient(90deg, #059669, #10b981);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.stepper-item {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.stepper-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    background-color: #e2e8f0;
    color: #64748b;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.stepper-circle.passed {
    background-color: #059669;
    color: #ffffff;
}

.stepper-circle.current {
    background-color: #047857;
    color: #ffffff;
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.25);
}

.stepper-label {
    font-size: 0.68rem;
    margin-top: 0.45rem;
    text-align: center;
    line-height: 1.2;
    max-width: 76px;
}

/* Vertical Timeline */
.timeline-vertical {
    position: relative;
    padding-left: 1.75rem;
}

.timeline-vertical::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background-color: #e2e8f0;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.15rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -1.75rem;
    top: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #059669;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 2px #a7f3d0;
}

/* Photo Upload Dropzone */
.upload-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 1rem;
    padding: 1.75rem;
    text-align: center;
    background-color: #f8fafc;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.upload-dropzone:hover {
    border-color: #059669;
    background-color: #ecfdf5;
}

/* Form controls polish */
.form-control:focus,
.form-select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 0.22rem rgba(16, 185, 129, 0.18);
}

/* Table polish */
.table-modern thead th {
    background-color: #f8fafc;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.table-modern tbody td {
    padding: 0.9rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.table-modern tbody tr:hover {
    background-color: #f8fafc;
}

/* Photo square preview */
.photo-thumb-box {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 0.85rem;
    border: 1px solid #e2e8f0;
}

.photo-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.photo-thumb-box:hover img {
    transform: scale(1.06);
}

/* QR Code Container */
.qr-frame svg {
    width: 100%;
    height: 100%;
    display: block;
}
