* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7f6;
    color: #333;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 25px;
}

header {
    margin-bottom: 20px;
    border-bottom: 2px solid #eef2f5;
    padding-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

header h1 {
    color: #2c3e50;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

header p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 3px;
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.search-box.filter-box {
    flex: 0 0 auto;
    min-width: 200px;
    width: 200px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
}

.search-box input {
    width: 100%;
    padding: 10px 10px 10px 38px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-box select {
    width: 100%;
    padding: 10px 10px 10px 38px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
    color: #1e293b;
    -webkit-appearance: none;
    appearance: none;
}

.search-box input:focus {
    border-color: #3b82f6;
}

.info-badge {
    background-color: #e8f4fd;
    color: #2980b9;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Diagram Sebar Alamat (Peta Dashboard) */
.map-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.map-header h3 {
    color: #1e293b;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.scatter-map {
    height: 420px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    z-index: 0;
    position: relative;
}

.scatter-info {
    margin-top: 10px;
    font-size: 0.85rem;
}

/* Card List Layout (Flex Column) */
.card-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vehicle-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: box-shadow 0.2s, transform 0.2s;
}

.vehicle-card:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.06);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
}

.card-header-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.btn-icon-delete {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 6px;
    border-radius: 6px;
    color: #ef4444;
    transition: background-color 0.2s;
}

.btn-icon-delete:hover {
    background-color: #fef2f2;
}

.card-note {
    margin-top: 12px;
    border-top: 1px dashed #e2e8f0;
    padding-top: 10px;
}

.note-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #334155;
    outline: none;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.2s;
}

.note-input:focus {
    border-color: #3b82f6;
}

.btn-history-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #7c3aed;
    color: white;
    padding: 9px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-history-action:hover {
    background-color: #6d28d9;
}

.btn-import-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #1e293b;
    color: white;
    padding: 9px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-import-action:hover {
    background-color: #0f172a;
}

.btn-json-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #1e293b;
    color: white;
    padding: 9px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-json-action:hover {
    background-color: #0f172a;
}

.btn-export-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #1e293b;
    color: white;
    padding: 9px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-export-action:hover {
    background-color: #0f172a;
}

.format-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 6px;
    font-size: 0.78rem;
}

.format-table th, .format-table td {
    border: 1px solid #cbd5e1;
    padding: 4px 6px;
    text-align: left;
}

.format-table th {
    background-color: #f1f5f9;
}

.card-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-number {
    background: #e2e8f0;
    color: #334155;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
}

.badge.nopol {
    background-color: #1e293b;
    color: #fff;
    font-family: monospace;
    font-size: 0.9rem;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 1px;
}

.badge.warna {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.card-body {
    display: grid;
    grid-template-columns: 2fr 1.5fr;
    gap: 15px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        gap: 8px;
    }

    .header-actions .btn-primary-action,
    .header-actions .btn-route-action,
    .header-actions .btn-history-action,
    .header-actions .btn-import-action,
    .header-actions .btn-json-action,
    .header-actions .btn-export-action,
    .header-actions .btn-logout-action {
        width: 42px;
        height: 42px;
        padding: 0;
        flex: 0 0 auto;
        justify-content: center;
    }

    .btn-text {
        display: none;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .search-box,
    .search-box.filter-box {
        flex: 1 1 100%;
        width: 100%;
        min-width: 100%;
    }

    .btn-dl-action {
        width: 100%;
        justify-content: center;
    }

    .info-badge {
        text-align: center;
    }

    .card-body {
        grid-template-columns: 1fr;
    }

    .card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .card-inputs {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .card-inputs > div {
        width: 100%;
    }

    .status-select,
    .date-input {
        width: 100%;
    }

    .card-actions {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .card-actions .btn-gmaps {
        flex: 1;
        justify-content: center;
    }

    .card-title-group {
        flex-wrap: wrap;
    }

    .user-badge {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .modal-content {
        padding: 20px;
    }

    .map-header {
        flex-direction: column;
        align-items: stretch;
    }

    .scatter-map {
        height: 300px;
    }
}

.info-item {
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.info-label {
    color: #64748b;
    font-weight: 500;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    color: #1e293b;
    font-weight: 500;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.card-inputs {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.status-select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

.status-belum {
    background-color: #f1f5f9;
    color: #475569;
}

.status-dimiliki {
    background-color: #dcfce7;
    color: #166534;
}

.status-jual {
    background-color: #fef9c3;
    color: #854d0e;
}

.status-tidak-jelas {
    background-color: #fee2e2;
    color: #991b1b;
}

.date-input {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 0.85rem;
    color: #334155;
    outline: none;
    background: #fff;
    cursor: pointer;
}

.date-input:focus {
    border-color: #3b82f6;
}

.card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-icon, .btn-icon-edit {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 6px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.btn-icon {
    color: #2563eb;
}

.btn-icon:hover {
    background-color: #eff6ff;
}

.btn-icon-edit {
    color: #475569;
}

.btn-icon-edit:hover {
    background-color: #f1f5f9;
}

.btn-gmaps {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #1e293b;
    color: white;
    padding: 7px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: background-color 0.2s;
    white-space: nowrap;
}

    .btn-redirect {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background-color: #d1d5db;
        color: #111827;
        padding: 7px 12px;
        border-radius: 6px;
        text-decoration: none;
        font-weight: 500;
        font-size: 0.85rem;
        transition: background-color 0.2s;
        white-space: nowrap;
    }

.btn-gmaps:hover {
    background-color: #0f172a;
}

.btn-primary-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #1e293b;
    color: white;
    padding: 9px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-primary-action:hover {
    background-color: #0f172a;
}

.btn-route-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #1e293b;
    color: white;
    padding: 9px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-route-action:hover {
    background-color: #0f172a;
}

.btn-dl-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #16a34a;
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.btn-dl-action:hover {
    background-color: #15803d;
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 15px;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 10px;
    width: 100%;
    max-width: 450px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.modal-content h3 {
    margin-bottom: 5px;
    color: #1e293b;
    font-size: 1.25rem;
}

.modal-subtitle {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
}

.form-group input:focus {
    border-color: #3b82f6;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn-primary, .btn-secondary {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: #1e293b;
    color: white;
}

.btn-primary:hover {
    background-color: #0f172a;
}

.btn-secondary {
    background-color: #e2e8f0;
    color: #475569;
}

.btn-secondary:hover {
    background-color: #cbd5e1;
}

/* Modal Upload JSON */
.modal-content.wide {
    max-width: 720px;
}

.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    resize: vertical;
    font-family: inherit;
}

.json-input {
    font-family: monospace;
    font-size: 0.82rem;
}

.form-group textarea:focus {
    border-color: #3b82f6;
}

.json-result {
    margin-top: 12px;
    max-height: 320px;
    overflow-y: auto;
}

.json-summary {
    color: #15803d;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.json-error {
    color: #b91c1c;
    font-size: 0.9rem;
}

.json-empty {
    color: #64748b;
    font-size: 0.9rem;
}

.json-vehicle {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background-color: #f8fafc;
}

.json-vehicle-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.json-index {
    background: #e2e8f0;
    color: #334155;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.75rem;
}

.json-status {
    background-color: #dbeafe;
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.json-vehicle-body {
    display: grid;
    gap: 4px;
}

.json-row {
    display: flex;
    gap: 8px;
    font-size: 0.82rem;
    line-height: 1.4;
}

.json-label {
    flex: 0 0 130px;
    color: #64748b;
}

.json-value {
    color: #1e293b;
    font-weight: 500;
    word-break: break-word;
}

.alamat-group {
    position: relative;
}

.alamat-input-row {
    display: flex;
    gap: 8px;
}

.alamat-input-row input {
    flex: 1;
}

.btn-search-alamat {
    background-color: #1e293b;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
}

.btn-search-alamat:hover {
    background-color: #0f172a;
}

.places-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 1050;
    max-height: 220px;
    overflow-y: auto;
    margin-top: 4px;
}

.places-item {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background-color 0.15s;
}

.places-item:last-child {
    border-bottom: none;
}

.places-item:hover {
    background-color: #f8fafc;
}

.places-item-name {
    font-weight: 600;
    font-size: 0.88rem;
    color: #1e293b;
}

.places-item-addr {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 2px;
}

.places-loading, .places-empty {
    padding: 12px;
    font-size: 0.85rem;
    color: #64748b;
    text-align: center;
}

/* User Badge & Logout Button in Header */
.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #f1f5f9;
    color: #334155;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
}

.btn-logout-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #ef4444;
    color: white;
    padding: 9px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-logout-action:hover {
    background-color: #dc2626;
}

.optimized-badge {
    color: #15803d;
    font-size: 1rem;
    margin-left: 2px;
}

.detail-alamat-badge {
    color: #0284c7 !important;
    font-weight: 600 !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f9ff;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #bae6fd;
    font-size: 0.85rem;
    margin-top: 2px;
}

.history-time {
    color: #64748b;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Auth Pages Styling */
.auth-body {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    padding: 30px;
}

.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-icon {
    font-size: 2.5rem;
    color: #1e293b;
    margin-bottom: 10px;
}

.auth-header h1 {
    color: #1e293b;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.auth-header p {
    color: #64748b;
    font-size: 0.9rem;
}

.auth-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #64748b;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.auth-tab.active {
    background: #ffffff;
    color: #1e293b;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.auth-form .form-group {
    margin-bottom: 15px;
}

.auth-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 5px;
}

.auth-input-wrapper {
    position: relative;
}

.auth-input-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.auth-input-wrapper input {
    width: 100%;
    padding: 10px 10px 10px 38px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.auth-input-wrapper input:focus {
    border-color: #1e293b;
}

.btn-auth-submit {
    width: 100%;
    background-color: #1e293b;
    color: white;
    border: none;
    padding: 11px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.btn-auth-submit:hover {
    background-color: #0f172a;
}

.auth-error {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.auth-success {
    background-color: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.auth-footer-text {
    text-align: center;
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 20px;
}

/* Chatbot Widget */
.chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.chatbot-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background-color: #1e293b;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s;
}

.chatbot-toggle:hover {
    background-color: #0f172a;
    transform: scale(1.05);
}

.chatbot-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 340px;
    max-height: 480px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.chatbot-window.open {
    display: flex;
}

.chatbot-header {
    background-color: #1e293b;
    color: white;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header strong {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chatbot-status {
    font-size: 0.7rem;
    color: #4ade80;
    margin-top: 2px;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.chatbot-messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    max-height: 340px;
    background-color: #f8fafc;
}

.chat-msg {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.chat-msg-ai {
    background-color: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-msg-user {
    background-color: #1e293b;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    margin-left: auto;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
    width: fit-content;
}

.typing-indicator .dot {
    width: 7px;
    height: 7px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typing 1.2s infinite ease-in-out;
}

.typing-indicator .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

.chatbot-input-row {
    display: flex;
    padding: 10px;
    gap: 8px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}

.chatbot-input-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-size: 0.85rem;
    outline: none;
}

.chatbot-input-row input:focus {
    border-color: #1e293b;
}

.chatbot-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background-color: #1e293b;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.chatbot-send:hover {
    background-color: #0f172a;
}

@media (max-width: 768px) {
    .chatbot-widget {
        bottom: 12px;
        right: 12px;
    }
    .chatbot-window {
        width: calc(100vw - 24px);
        max-width: 340px;
        bottom: 62px;
        right: 0;
    }
}

/* ===== Halaman Start DL (swipe antar kendaraan) ===== */
.dl-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.dl-progress {
    color: #475569;
    font-weight: 600;
    font-size: 0.9rem;
}

.dl-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    min-height: 320px;
}

.dl-card .card-body {
    grid-template-columns: 2fr 1.5fr;
}

.dl-dots {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.dl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #e2e8f0;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s;
}

.dl-dot.active {
    background-color: #16a34a;
    border-color: #16a34a;
    transform: scale(1.25);
}

.dl-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-top: 16px;
}

.btn-dl-nav {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background-color: #1e293b;
    color: white;
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, opacity 0.2s;
}

.btn-dl-nav:hover:not(:disabled) {
    background-color: #0f172a;
}

.btn-dl-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.btn-dl-back {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: #1e293b;
    color: white;
    font-size: 1.05rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    flex: 0 0 auto;
}

.btn-dl-back:hover {
    background-color: #0f172a;
}

.dl-hint {
    text-align: center;
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 14px;
}

.dl-photo-link {
    display: inline-block;
    margin-top: 6px;
}

.dl-photo-link img {
    max-height: 220px;
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .dl-card .card-body {
        grid-template-columns: 1fr;
    }
    .dl-card .card-actions {
        margin-top: 4px;
    }
}
