/* ================================================================
   Custom CSS — LaporDes Tulang Bawang
   ================================================================ */

:root {
    --primary:       #1a6b3c;
    --primary-dark:  #134f2d;
    --primary-light: #e8f5ee;
    --accent:        #f0a500;
    --danger:        #ef4444;
    --info:          #3b82f6;
}

/* ── Utilities ────────────────────────────────────────────── */
.text-primary-custom { color: var(--primary) !important; }
.bg-primary-custom   { background: var(--primary) !important; }
.border-primary-custom { border-color: var(--primary) !important; }

/* Brand logo */
.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
}
.brand-logo {
    display: inline-block;
    object-fit: contain;
    flex-shrink: 0;
}
.brand-logo-sidebar { width: 34px; height: 38px; }
.brand-logo-navbar { width: 30px; height: 34px; }
.brand-logo-auth { width: 44px; height: 50px; }
.brand-logo-footer { width: 34px; height: 38px; }
.brand-logo-hero {
    width: 92px;
    height: 104px;
    object-fit: contain;
    filter: drop-shadow(0 14px 24px rgba(0,0,0,.25));
}

/* ── Status Badges (global) ───────────────────────────────── */
.bg-menunggu    { background: #fff3cd !important; color: #856404 !important; }
.bg-diverifikasi { background: #cfe2ff !important; color: #084298 !important; }
.bg-diproses    { background: #d1ecf1 !important; color: #0c5460 !important; }
.bg-selesai     { background: #d1e7dd !important; color: #0a3622 !important; }
.bg-ditolak     { background: #f8d7da !important; color: #842029 !important; }

/* ── Form Controls ───────────────────────────────────────── */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,107,60,.15);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-success {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-success:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}
.btn-outline-success {
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-success:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.card-header {
    border-radius: 12px 12px 0 0 !important;
}

/* ── Table ────────────────────────────────────────────────── */
.table > :not(caption) > * > * {
    padding-top: .65rem;
    padding-bottom: .65rem;
}

/* ── Spinner animation ───────────────────────────────────── */
.spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Print Styles ────────────────────────────────────────── */
@media print {
    .navbar, .btn, footer, .alert { display: none !important; }
    body { background: white !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* Warga dashboard and report pages */
.warga-dashboard-page,
.warga-lapor-page {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.warga-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: .5rem;
    color: var(--primary);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.warga-hero-card {
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    color: #fff;
    background: linear-gradient(135deg, #123f28 0%, #1a6b3c 65%, #2d8654 100%);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(19,79,45,.18);
}

.warga-hero-card .warga-kicker {
    color: #fde68a;
}

.warga-hero-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.warga-hero-copy {
    max-width: 680px;
}

.warga-hero-copy h4,
.warga-hero-copy p {
    color: #fff;
}

.warga-hero-copy h4 {
    margin-bottom: .4rem;
    font-weight: 800;
}

.warga-hero-copy p {
    margin-bottom: 0;
    color: rgba(255,255,255,.82);
}

.warga-hero-actions .btn {
    min-height: 44px;
    border-radius: 999px;
    white-space: nowrap;
}

.warga-stat-card {
    display: flex;
    align-items: center;
    gap: .9rem;
    height: 100%;
    min-width: 0;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15,23,42,.06);
}

.warga-stat-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 12px;
    font-size: 1.35rem;
}

.warga-stat-copy {
    min-width: 0;
}

.warga-stat-copy strong {
    display: block;
    color: #0f172a;
    font-size: 1.55rem;
    line-height: 1;
}

.warga-stat-copy span {
    display: block;
    margin-top: .25rem;
    color: #1f2937;
    font-size: .9rem;
    font-weight: 700;
}

.warga-stat-copy small {
    display: block;
    margin-top: .15rem;
    color: #64748b;
    font-size: .76rem;
    line-height: 1.35;
}

.warga-stat-total .warga-stat-icon {
    background: #eff6ff;
    color: #2563eb;
}

.warga-stat-waiting .warga-stat-icon {
    background: #fffbeb;
    color: #d97706;
}

.warga-stat-progress .warga-stat-icon {
    background: #ecfeff;
    color: #0891b2;
}

.warga-stat-done .warga-stat-icon {
    background: #dcfce7;
    color: #15803d;
}

.warga-history-card,
.warga-form-card,
.warga-help-card,
.warga-warning-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(15,23,42,.06);
}

.warga-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    border-bottom: 1px solid #e2e8f0;
}

.warga-section-header h5,
.warga-section-heading h5,
.warga-page-heading h4,
.warga-help-card h6 {
    margin-bottom: .25rem;
    color: #0f172a;
    font-weight: 800;
}

.warga-section-header p,
.warga-section-heading p,
.warga-page-heading p {
    margin-bottom: 0;
    color: #64748b;
    font-size: .9rem;
}

.warga-report-list {
    display: grid;
}

.warga-report-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid #e2e8f0;
    transition: background .2s ease, border-color .2s ease;
}

.warga-report-item:last-child {
    border-bottom: 0;
}

.warga-report-item:hover {
    color: inherit;
    background: #f8fafc;
}

.warga-report-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: 12px;
    font-size: 1.2rem;
}

.warga-report-body {
    min-width: 0;
}

.warga-report-title-row h6 {
    margin-bottom: .45rem;
    color: #0f172a;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.warga-report-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-bottom: .55rem;
}

.warga-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 28px;
    max-width: 100%;
    padding: .25rem .6rem;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
}

.warga-meta-success {
    color: #166534;
    background: #dcfce7;
    border-color: #bbf7d0;
}

.warga-meta-muted {
    color: #475569;
    background: #f1f5f9;
}

.warga-report-body p {
    margin-bottom: 0;
    color: #64748b;
    font-size: .88rem;
    line-height: 1.55;
}

.warga-report-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .35rem;
    text-align: right;
}

.warga-report-status .badge {
    padding: .55rem .75rem;
    font-weight: 700;
}

.warga-report-status small {
    color: #64748b;
    font-size: .76rem;
}

.warga-empty-state {
    max-width: 520px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    text-align: center;
}

.warga-empty-icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: 16px;
    font-size: 1.8rem;
}

.warga-empty-state h6 {
    color: #0f172a;
    font-weight: 800;
}

.warga-empty-state p {
    color: #64748b;
}

.warga-page-heading {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.warga-back-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 999px;
}

.warga-form-card {
    overflow: hidden;
}

.warga-lapor-form {
    display: grid;
    gap: 0;
}

.warga-form-section {
    padding: 1.35rem;
    border-bottom: 1px solid #e2e8f0;
}

.warga-section-heading {
    display: flex;
    gap: .9rem;
    margin-bottom: 1.25rem;
}

.warga-section-icon,
.warga-help-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: 12px;
    font-size: 1.15rem;
}

.warga-field {
    margin-bottom: 1.15rem;
}

.warga-field:last-child {
    margin-bottom: 0;
}

.warga-field-label {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .5rem;
    color: #0f172a;
    font-weight: 800;
}

.warga-field-label i {
    color: var(--primary);
}

.warga-field-label span {
    color: var(--danger);
}

.warga-field-label .warga-optional {
    color: #64748b;
    font-weight: 600;
}

.warga-control {
    min-height: 48px;
    border-color: #cbd5e1;
    border-radius: 10px;
}

.warga-textarea {
    min-height: 170px;
    resize: vertical;
}

.warga-field-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.warga-upload-zone {
    display: grid;
    place-items: center;
    gap: .35rem;
    min-height: 180px;
    padding: 1.3rem;
    text-align: center;
    cursor: pointer;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    transition: background .2s ease, border-color .2s ease;
}

.warga-upload-zone:hover,
.warga-upload-zone:focus,
.warga-upload-zone.is-dragover,
.warga-upload-zone.has-file {
    background: #f0fdf4;
    border-color: var(--primary);
    outline: none;
}

.warga-upload-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    font-size: 1.6rem;
}

.warga-upload-zone small {
    color: #64748b;
}

.warga-file-preview-card {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin-top: .75rem;
}

.warga-preview-image {
    max-width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(15,23,42,.14);
}

.warga-clear-file {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 999px;
}

.warga-file-preview-card p {
    max-width: 260px;
    margin: .45rem auto 0;
    color: #64748b;
    font-size: .78rem;
    overflow-wrap: anywhere;
}

.warga-anonymous-option {
    display: flex;
    gap: .8rem;
    padding: 1rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 14px;
}

.warga-anonymous-option .form-check-input {
    width: 1.15rem;
    height: 1.15rem;
    margin-top: .2rem;
    flex: 0 0 auto;
    border-color: #d97706;
}

.warga-anonymous-option .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.warga-anonymous-option strong,
.warga-anonymous-option span {
    display: block;
}

.warga-anonymous-option strong {
    color: #78350f;
}

.warga-anonymous-option span {
    margin-top: .25rem;
    color: #92400e;
    font-size: .85rem;
    line-height: 1.5;
}

.warga-form-actions {
    display: flex;
    gap: .75rem;
    padding: 1.2rem 1.35rem;
    background: #f8fafc;
}

.warga-form-actions .btn {
    min-height: 44px;
    padding-inline: 1.4rem;
    border-radius: 999px;
}

.warga-lapor-sidebar {
    display: grid;
    gap: 1rem;
}

.warga-help-card,
.warga-warning-card {
    padding: 1.2rem;
}

.warga-help-card h6 {
    margin-top: .75rem;
}

.warga-tip-list {
    display: grid;
    gap: .65rem;
    margin: 1rem 0 0;
    padding: 0;
    color: #64748b;
    font-size: .9rem;
    list-style: none;
}

.warga-tip-list li {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
}

.warga-tip-list i {
    margin-top: .12rem;
    color: var(--primary);
}

.warga-step-list {
    display: grid;
    gap: .8rem;
    margin-top: 1rem;
}

.warga-step-list div {
    display: flex;
    gap: .75rem;
}

.warga-step-list span {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #fff;
    background: var(--primary);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
}

.warga-step-list p {
    margin-bottom: 0;
    color: #64748b;
    font-size: .9rem;
    line-height: 1.45;
}

.warga-warning-card {
    display: flex;
    gap: .75rem;
    color: #78350f;
    background: #fffbeb;
    border-color: #fde68a;
}

.warga-warning-card i {
    margin-top: .15rem;
    color: #d97706;
    font-size: 1.1rem;
}

.warga-warning-card strong {
    display: block;
    margin-bottom: .2rem;
}

.warga-warning-card p {
    margin-bottom: 0;
    color: #92400e;
    font-size: .86rem;
    line-height: 1.5;
}

@media (max-width: 991.98px) {
    .warga-dashboard-page,
    .warga-lapor-page {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .warga-hero-main,
    .warga-section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .warga-hero-actions .btn,
    .warga-section-header .btn {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .warga-hero-card,
    .warga-form-section,
    .warga-form-actions,
    .warga-section-header {
        padding: 1rem;
    }

    .warga-stat-card {
        flex-direction: column;
        align-items: flex-start;
        gap: .7rem;
    }

    .warga-report-item {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .warga-report-icon {
        display: none;
    }

    .warga-report-status {
        align-items: flex-start;
        text-align: left;
    }

    .warga-field-footer,
    .warga-form-actions {
        flex-direction: column;
    }

    .warga-form-actions .btn {
        width: 100%;
    }
}
