/* =========================================================
   STYLE.CSS - DESAIN MODERN, ELEGAN & RESPONSIVE (INDEX/HOME)
   ========================================================= */

/* --- VARIABEL WARNA & TEMA (SAMA DENGAN TOP.CSS) --- */
:root {
    --primary-color: #2563eb;       /* Royal Blue */
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --bg-main: #f8fafc;             /* Light Slate BG */
    --card-bg: #ffffff;
    --text-main: #0f172a;           /* Dark Slate Text */
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* --- RESET & BASIC STYLES --- */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding-bottom: 90px; /* Space untuk bottom navigation */
    -webkit-font-smoothing: antialiased;
}

/* --- CONTAINER --- */
.container-app {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    padding: 0 16px;
}

/* --- HEADER --- */
.app-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    padding: 22px 0 18px 0;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-icon {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #60a5fa;
    backdrop-filter: blur(4px);
}

.app-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
}

.app-header p {
    margin: 2px 0 0;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* --- MAIN & PAGES --- */
.main-content {
    padding-top: 0;
}

.page {
    display: none;
    animation: fadeIn 0.25s ease-in-out;
}

.active-page {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- PAGE TITLE --- */
.page-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.page-title h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.page-title p {
    margin: 2px 0 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.date-badge {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 6px;
}

.date-badge i {
    color: var(--primary-color);
}

/* --- CARDS & FORMS --- */
.app-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(226, 232, 240, 0.8);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label, .form-label-custom {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.form-control {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-help {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* --- PLAT NO INPUT --- */
.plate-input-wrapper {
    display: flex;
    gap: 8px;
    position: relative;
}

.plate-input {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.plate-input-wrapper button {
    border-radius: var(--radius-md);
    padding: 0 16px;
}

.plate-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
    pointer-events: none;
}

/* --- STATUS VEHICLE CHECK --- */
.vehicle-status {
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.vehicle-status.available {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.vehicle-status.warning {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.vehicle-status.blocked {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* --- STATUS PAJAK RADIO --- */
.tax-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tax-option {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.tax-option input {
    position: absolute;
    opacity: 0;
}

.tax-option-content {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    background: var(--bg-main);
    transition: all 0.2s ease;
}

.tax-option-content i {
    font-size: 1.25rem;
    color: var(--text-muted);
}

.tax-option-content strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text-main);
}

.tax-option-content small {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.tax-option input:checked + .tax-option-content {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.tax-option input:checked + .tax-option-content i {
    color: var(--primary-color);
}

/* --- VOLUME INPUT --- */
.volume-wrapper {
    position: relative;
}

.volume-wrapper input {
    padding-right: 75px;
    font-weight: 600;
}

.volume-unit {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* --- CURRENT TIME --- */
.current-time {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 10px;
}

.current-time i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.current-time span {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.current-time small {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
}

/* --- BUTTONS --- */
.btn-submit {
    width: 100%;
    min-height: 48px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--primary-color);
    border: none;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
    transition: all 0.2s ease;
}

.btn-submit:hover:not(:disabled) {
    background-color: var(--primary-dark);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
}

.btn-submit:disabled {
    opacity: 0.6;
    box-shadow: none;
}

.icon-button {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: var(--radius-md);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.icon-button:active {
    transform: scale(0.95);
}

.btn-add-report {
    white-space: nowrap;
    border-radius: var(--radius-md);
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* --- DASHBOARD RINGKASAN / STATS GRID --- */
.section-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 24px 2px 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 12px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-sm);
}

.stat-card-clickable {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card-clickable:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.stat-card strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.stat-card span {
    display: block;
    color: var(--text-muted);
    font-size: 0.68rem;
    text-transform: uppercase;
    font-weight: 600;
}

/* --- SEARCH BOX --- */
.search-box {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    box-shadow: var(--shadow-sm);
}

.search-box i {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.search-box input {
    width: 100%;
    border: none;
    outline: none;
    margin-left: 10px;
    font-size: 0.9rem;
    background: transparent;
    color: var(--text-main);
}

.search-box input::placeholder {
    color: #94a3b8;
}

/* --- TABLES --- */
.table-card {
    padding: 0;
    overflow: hidden;
}

.table {
    margin: 0;
}

.table th {
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table td {
    padding: 12px 14px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    white-space: nowrap;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table td:first-child {
    font-weight: 700;
}

.empty-state {
    text-align: center;
    padding: 36px 14px !important;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --- FOTO UPLOAD & PREVIEW LAPORAN --- */
.photo-upload {
    display: block;
    width: 100%;
    cursor: pointer;
}

.photo-placeholder {
    width: 100%;
    min-height: 190px;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-md);
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    transition: all 0.2s ease;
}

.photo-placeholder:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.photo-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e7ff;
    margin-bottom: 10px;
}

.photo-icon i {
    font-size: 24px;
    color: var(--primary-color);
}

.photo-placeholder strong {
    font-size: 0.9rem;
    color: var(--text-main);
}

.photo-placeholder small {
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.photo-preview-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

/* Laporan Table Photo & Keluhan */
.laporan-table-photo {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: transform 0.15s ease;
}

.laporan-table-photo:active {
    transform: scale(0.95);
}

.laporan-keluhan {
    max-width: 220px;
    white-space: normal;
    line-height: 1.4;
    font-size: 0.82rem;
}

.laporan-form-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.laporan-form-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.laporan-form-header p {
    margin: 2px 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.laporan-textarea {
    resize: none;
    min-height: 110px;
    border-radius: var(--radius-md);
}

.textarea-counter {
    text-align: right;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* --- BOTTOM NAVIGATION BAR --- */
.bottom-nav {
    position: fixed;
    z-index: 1000;
    left: 0;
    right: 0;
    bottom: 0;
    height: 66px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

.nav-item {
    border: none;
    background: transparent;
    flex: 1;
    max-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.nav-item i {
    font-size: 1.35rem;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item.active i {
    transform: translateY(-2px);
}

/* --- MODAL NOTIFIKASI --- */
.notification-modal {
    border: none;
    border-radius: 20px;
    padding: 24px 20px;
    text-align: center;
}

.modal-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 28px;
}

.notification-modal h4 {
    font-size: 1.15rem;
    font-weight: 700;
}

.notification-modal p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* --- LOADING SPINNER --- */
.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (min-width: 768px) {
    .bottom-nav {
        position: static;
        height: 58px;
        border-top: none;
        border-bottom: 1px solid var(--border-color);
        box-shadow: none;
        margin-bottom: 20px;
        background: var(--card-bg);
    }
    .nav-item {
        flex: none;
        width: 160px;
        flex-direction: row;
        gap: 8px;
        font-size: 0.85rem;
    }
    .nav-item i {
        font-size: 1.1rem;
    }
    body {
        padding-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .container-app {
        padding-left: 12px;
        padding-right: 12px;
    }
    .app-card {
        padding: 16px;
    }
    .tax-option-content {
        padding: 10px 8px;
    }
    .tax-option-content small {
        display: none;
    }
    .stat-card {
        padding: 10px 6px;
        gap: 6px;
    }
    .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }
    .stat-card strong {
        font-size: 0.88rem;
    }
    .btn-add-report span {
        display: none;
    }
    .btn-add-report i {
        font-size: 1.1rem;
    }
}