/* ============================================
   ANUGRAH TRANSPORT - UNIFIED STYLESHEET
   ============================================ */

/* ============ BASE RESET ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
}

/* ============ SIDEBAR NAVIGATION ============ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: #1e1e2f;
    border-right: 1px solid #2a2a3e;
    padding: 20px;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #2a2a3e;
    margin-bottom: 20px;
}

.sidebar-header h1 {
    font-size: 20px;
    color: #4fc3f7;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 12px;
    color: #aaa;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #aaa;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.nav-link:hover, .nav-link.active {
    background: rgba(79, 195, 247, 0.1);
    color: #4fc3f7;
}

.nav-link .icon {
    font-size: 18px;
}

.nav-divider {
    height: 1px;
    background: #2a2a3e;
    margin: 15px 0;
}

/* ============ MAIN CONTENT AREA ============ */
.main-content {
    margin-left: 260px;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ============ TOP BAR ============ */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-title {
    font-size: 24px;
    color: #fff;
}

.top-bar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ============ HEADER (for forms) ============ */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: #fff;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 5px;
    color: #4fc3f7;
}

.header p {
    color: #aaa;
    font-size: 14px;
}

/* ============ SETTINGS BUTTON ============ */
.settings-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2a2a3e;
    border: 2px solid #4fc3f7;
    color: #4fc3f7;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.settings-btn:hover {
    background: #4fc3f7;
    color: #1a1a2e;
}

/* ============ MOBILE TOGGLE ============ */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 200;
    background: #1e1e2f;
    border: 2px solid #4fc3f7;
    color: #4fc3f7;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
}

/* ============ CARDS ============ */
.form-card, .chart-card, .table-card {
    background: #1e1e2f;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid #2a2a3e;
    margin-bottom: 20px;
}

/* ============ FORM SECTIONS ============ */
.form-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #2a2a3e;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-title {
    color: #4fc3f7;
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: #4fc3f7;
    border-radius: 2px;
}

/* ============ FORM GROUPS ============ */
.form-group {
    margin-bottom: 18px;
}

.form-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    color: #ccc;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

/* ============ FORM INPUTS ============ */
input[type="text"],
input[type="date"],
input[type="number"],
input[type="url"],
input[type="month"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #2a2a3e;
    border-radius: 8px;
    background: #252536;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #4fc3f7;
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.1);
}

select {
    cursor: pointer;
}

select option {
    background: #252536;
    color: #fff;
}

select option:disabled {
    color: #888;
    background: #1a1a2e;
}

/* ============ GRID LAYOUTS ============ */
.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

/* ============ STATS GRID ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: #1e1e2f;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #2a2a3e;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.stat-card.blue::before { background: #4fc3f7; }
.stat-card.green::before { background: #66bb6a; }
.stat-card.orange::before { background: #ff9800; }
.stat-card.purple::before { background: #ab47bc; }
.stat-card.red::before { background: #f44336; }
.stat-card.cyan::before { background: #26c6da; }

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.stat-title {
    font-size: 13px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon {
    font-size: 24px;
    opacity: 0.8;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card.blue .stat-value { color: #4fc3f7; }
.stat-card.green .stat-value { color: #66bb6a; }
.stat-card.orange .stat-value { color: #ff9800; }
.stat-card.purple .stat-value { color: #ab47bc; }
.stat-card.red .stat-value { color: #f44336; }
.stat-card.cyan .stat-value { color: #26c6da; }

.stat-subtitle {
    font-size: 12px;
    color: #888;
}

/* ============ BUTTONS ============ */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #4fc3f7, #29b6f6);
    color: #1a1a2e;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(79, 195, 247, 0.4);
}

.btn-secondary {
    background: #2a2a3e;
    color: #fff;
    border: 2px solid #3a3a4e;
}

.btn-secondary:hover:not(:disabled) {
    border-color: #4fc3f7;
    color: #4fc3f7;
}

.btn-submit {
    background: linear-gradient(135deg, #4fc3f7, #29b6f6);
    color: #1a1a2e;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(79, 195, 247, 0.4);
}

.btn-edit {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: #fff;
}

.btn-edit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 152, 0, 0.4);
}

.btn-delete {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: #fff;
}

.btn-delete:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(244, 67, 54, 0.4);
}

.btn-view {
    background: linear-gradient(135deg, #66bb6a, #43a047);
    color: #fff;
}

.btn-view:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 187, 106, 0.4);
}

.btn-reset {
    background: linear-gradient(135deg, #78909c, #546e7a);
    color: #fff;
}

.btn-reset:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(120, 144, 156, 0.4);
}

.btn-home {
    background: linear-gradient(135deg, #5e35b1, #4527a0);
    color: #fff;
}

.btn-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(94, 53, 177, 0.4);
}

.btn-pay {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    color: #fff;
}

.btn-pay:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(156, 39, 176, 0.4);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 25px;
}

/* ============ INFO BOXES ============ */
.info-box {
    background: rgba(79, 195, 247, 0.1);
    border: 1px solid rgba(79, 195, 247, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    color: #4fc3f7;
    font-size: 13px;
    margin-bottom: 15px;
}

.warning-box {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    color: #ff9800;
    font-size: 13px;
    margin-bottom: 15px;
}

.success-box {
    background: rgba(102, 187, 106, 0.1);
    border: 1px solid rgba(102, 187, 106, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    color: #66bb6a;
    font-size: 13px;
    margin-bottom: 15px;
}

/* ============ DISPLAY BOXES ============ */
.day-display {
    background: #4fc3f7;
    color: #1a1a2e;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    margin-top: 8px;
}

.biaya-sewa-display {
    background: rgba(102, 187, 106, 0.1);
    border: 2px solid rgba(102, 187, 106, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    color: #66bb6a;
    font-size: 14px;
    text-align: center;
    font-weight: 600;
}

.profit-box {
    background: linear-gradient(135deg, #66bb6a, #43a047);
    color: #fff;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 15px;
}

.profit-box .label {
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 5px;
    opacity: 0.9;
}

.profit-box .amount {
    font-size: 22px;
    font-weight: 700;
}

.profit-box.negative {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.total-box {
    background: linear-gradient(135deg, #4fc3f7, #29b6f6);
    color: #1a1a2e;
    padding: 18px;
    border-radius: 10px;
    text-align: center;
    margin-top: 10px;
    border: 2px solid rgba(255,255,255,0.3);
}

.total-box .label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
}

.total-box .amount {
    font-size: 26px;
    font-weight: 700;
}

.tagihan-highlight {
    background: linear-gradient(135deg, #1e3a5f, #2d5a87);
    border: 2px solid #4fc3f7;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    margin-bottom: 20px;
}

.tagihan-highlight .tagihan-label {
    font-size: 12px;
    color: #4fc3f7;
    margin-bottom: 5px;
    font-weight: 500;
}

.tagihan-highlight .tagihan-amount {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

/* ============ PENGELUARAN GRID ============ */
.pengeluaran-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pengeluaran-item {
    background: #252536;
    border: 2px solid #2a2a3e;
    border-radius: 8px;
    padding: 12px;
}

.pengeluaran-item label {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 6px;
}

.pengeluaran-item input {
    padding: 8px 10px;
    font-size: 13px;
}

/* ============ BADGES ============ */
.vehicle-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 5px;
}

.badge-avanza { background: #e3f2fd; color: #1976d2; }
.badge-xpander { background: #fce4ec; color: #c2185b; }
.badge-reborn { background: #e8f5e9; color: #388e3c; }
.badge-zenix { background: #fff3e0; color: #f57c00; }
.badge-brio { background: #e1f5fe; color: #0277bd; }
.badge-fortuner { background: #f3e5f5; color: #7b1fa2; }

.status-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

.status-tersedia { background: #4caf50; color: #fff; }
.status-disewa { background: #ff9800; color: #fff; }
.status-maintenance { background: #f44336; color: #fff; }

.payment-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

.badge-lunas {
    background: rgba(102, 187, 106, 0.2);
    color: #66bb6a;
    border: 1px solid rgba(102, 187, 106, 0.3);
}

.badge-dp {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.badge-cicilan {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.badge-belum {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* ============ PAYMENT STATUS ============ */
.payment-status-box {
    background: #252536;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    border: 1px solid #2a2a3e;
}

.status-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #2a2a3e;
    color: #ccc;
    font-size: 14px;
}

.status-row:last-child {
    border-bottom: none;
}

.status-row.sisa {
    padding-top: 12px;
    margin-top: 5px;
    border-top: 2px solid #4fc3f7;
    font-weight: 600;
    font-size: 16px;
}

.text-success { color: #66bb6a !important; }
.text-danger { color: #f44336 !important; }
.text-warning { color: #ff9800 !important; }

/* ============ HUTANG ALERT ============ */
.hutang-alert {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 8px;
    padding: 10px 12px;
    color: #f44336;
    font-size: 12px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hutang-alert.warning {
    background: rgba(255, 152, 0, 0.1);
    border-color: rgba(255, 152, 0, 0.3);
    color: #ff9800;
}

.hutang-alert.success {
    background: rgba(102, 187, 106, 0.1);
    border-color: rgba(102, 187, 106, 0.3);
    color: #66bb6a;
}

/* ============ CONNECTION STATUS ============ */
.connection-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 20px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-connected {
    background: rgba(102, 187, 106, 0.2);
    color: #66bb6a;
}

.status-connected .status-dot {
    background: #66bb6a;
    animation: pulse 2s infinite;
}

.status-disconnected {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.status-disconnected .status-dot {
    background: #ff9800;
}

.status-offline {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.status-offline .status-dot {
    background: #f44336;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============ MODALS ============ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #1e1e2f;
    border-radius: 15px;
    padding: 25px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid #2a2a3e;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #2a2a3e;
}

.modal-header h3 {
    color: #4fc3f7;
}

.modal-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 24px;
    cursor: pointer;
}

.modal-close:hover {
    color: #f44336;
}

/* ============ DATA LIST ============ */
.data-list {
    max-height: 400px;
    overflow-y: auto;
}

.data-item {
    background: #252536;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #4fc3f7;
}

.data-item.has-hutang {
    border-left-color: #f44336;
}

.data-item.lunas {
    border-left-color: #66bb6a;
}

.data-item h4 {
    color: #fff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.data-item p {
    color: #aaa;
    font-size: 13px;
    margin-bottom: 4px;
}

.data-item .price {
    color: #66bb6a;
    font-weight: 600;
}

.data-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* ============ SEARCH & FILTER ============ */
.search-box {
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #2a2a3e;
    border-radius: 8px;
    background: #252536;
    color: #fff;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: #4fc3f7;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 16px;
    border: 1px solid #2a2a3e;
    border-radius: 20px;
    background: #252536;
    color: #aaa;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab:hover {
    border-color: #4fc3f7;
    color: #4fc3f7;
}

.filter-tab.active {
    background: #4fc3f7;
    color: #1a1a2e;
    border-color: #4fc3f7;
}

/* ============ SUMMARY CARDS ============ */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.summary-card {
    background: #252536;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    border: 1px solid #2a2a3e;
}

.summary-card .card-label {
    font-size: 11px;
    color: #aaa;
    margin-bottom: 5px;
}

.summary-card .card-value {
    font-size: 16px;
    font-weight: 700;
}

.summary-card.total .card-value { color: #4fc3f7; }
.summary-card.lunas .card-value { color: #66bb6a; }
.summary-card.hutang .card-value { color: #f44336; }

/* ============ LOADING ============ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    flex-direction: column;
    gap: 15px;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

.loading-overlay .spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

.loading-overlay p {
    color: #fff;
    font-size: 14px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============ CHARTS ============ */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 16px;
    color: #fff;
    font-weight: 600;
}

.chart-container {
    position: relative;
    height: 300px;
}

/* ============ TABLES ============ */
.tables-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.table-title {
    font-size: 16px;
    color: #fff;
    font-weight: 600;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #2a2a3e;
    font-size: 13px;
}

th {
    color: #aaa;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

td {
    color: #fff;
}

tr:hover {
    background: rgba(79, 195, 247, 0.05);
}

/* ============ VEHICLE & DRIVER STATUS ============ */
.vehicle-grid, .driver-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.vehicle-item, .driver-item {
    background: #252536;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #2a2a3e;
}

.vehicle-icon {
    font-size: 28px;
}

.vehicle-info h4, .driver-name {
    font-size: 12px;
    color: #fff;
    margin-bottom: 4px;
}

.vehicle-info .status, .driver-status {
    font-size: 11px;
}

.driver-item {
    text-align: center;
    flex-direction: column;
}

.driver-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4fc3f7, #29b6f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 auto 10px;
}

/* ============ CALENDAR ============ */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.calendar-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.calendar-nav button {
    background: #252536;
    border: 1px solid #2a2a3e;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.calendar-nav button:hover {
    border-color: #4fc3f7;
    color: #4fc3f7;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day-header {
    text-align: center;
    padding: 10px;
    font-size: 12px;
    color: #aaa;
    font-weight: 500;
}

.calendar-day {
    background: #252536;
    border-radius: 6px;
    padding: 8px;
    min-height: 80px;
    border: 1px solid #2a2a3e;
}

.calendar-day.other-month {
    opacity: 0.4;
}

.calendar-day.today {
    border-color: #4fc3f7;
}

.calendar-date {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 5px;
}

.calendar-event {
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 4px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.calendar-event.rental {
    background: rgba(79, 195, 247, 0.2);
    color: #4fc3f7;
}

.calendar-event.with-driver {
    background: rgba(102, 187, 106, 0.2);
    color: #66bb6a;
}

/* ============ DATE FILTER ============ */
.date-filter {
    display: flex;
    gap: 10px;
    align-items: center;
}

.date-filter input {
    padding: 10px 15px;
    border: 2px solid #2a2a3e;
    border-radius: 8px;
    background: #252536;
    color: #fff;
    font-size: 14px;
}

.date-filter input:focus {
    outline: none;
    border-color: #4fc3f7;
}

/* ============ QUICK ACTIONS ============ */
.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============ SECTION HEADER ============ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* ============ UTILITY CLASSES ============ */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #3a3a4e;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4fc3f7;
}

/* ============ RESPONSIVE DESIGN ============ */
@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .tables-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .top-bar {
        padding-left: 60px;
    }

    .row, .row-3 {
        grid-template-columns: 1fr;
    }

    .pengeluaran-grid {
        grid-template-columns: 1fr;
    }

    .btn-group {
        grid-template-columns: 1fr 1fr;
    }

    .header h1 {
        font-size: 22px;
    }

    .total-box .amount {
        font-size: 20px;
    }

    .settings-btn {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .filter-tabs {
        justify-content: center;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .tagihan-highlight .tagihan-amount {
        font-size: 22px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .calendar-grid {
        font-size: 10px;
    }

    .calendar-day {
        min-height: 60px;
        padding: 5px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .date-filter {
        flex-direction: column;
        width: 100%;
    }

    .date-filter input {
        width: 100%;
    }

    .btn-group {
        grid-template-columns: 1fr;
    }
}

/* ============ PRINT STYLES ============ */
@media print {
    .sidebar,
    .mobile-toggle,
    .settings-btn,
    .btn-group,
    .top-bar-actions,
    .modal {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    body {
        background: white;
        color: black;
    }

    .form-card,
    .chart-card,
    .table-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
/* ============ KENDARAAN PAGE SPECIFIC ============ */

/* Reminder Cards */
.reminder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.reminder-card {
    background: linear-gradient(135deg, #1e1e2f 0%, #252536 100%);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid;
}

.reminder-card.pajak { border-left-color: #f44336; }
.reminder-card.cicilan { border-left-color: #ff9800; }
.reminder-card.maintenance { border-left-color: #4fc3f7; }

.reminder-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.reminder-icon {
    font-size: 24px;
}

.reminder-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.reminder-count {
    margin-left: auto;
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.reminder-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reminder-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reminder-item-name {
    font-weight: 500;
    color: #fff;
}

.reminder-item-date {
    font-size: 12px;
    color: #aaa;
}

.reminder-item-days {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.reminder-item-days.warning {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

/* Countdown Cards */
.countdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.countdown-card {
    border-radius: 12px;
    padding: 20px;
    color: #fff;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.countdown-card.status-aman {
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
}

.countdown-card.status-warning {
    background: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
}

.countdown-card.status-urgent {
    background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
    animation: pulse-urgent 2s infinite;
}

@keyframes pulse-urgent {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(239, 83, 80, 0.3); }
    50% { transform: scale(1.02); box-shadow: 0 6px 20px rgba(239, 83, 80, 0.5); }
}

.countdown-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.countdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.countdown-vehicle {
    font-size: 16px;
    font-weight: 700;
}

.countdown-timer {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.countdown-number {
    font-size: 48px;
}

.countdown-unit {
    font-size: 18px;
    font-weight: 500;
    opacity: 0.9;
}

.countdown-label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.countdown-status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    margin-bottom: 12px;
}

.countdown-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.countdown-info-row {
    display: flex;
    justify-content: space-between;
}

/* Vehicle Cards */
.vehicle-grid-new {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.vehicle-card-new {
    background: linear-gradient(135deg, #1e1e2f 0%, #252536 100%);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.vehicle-card-new:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.vehicle-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.vehicle-icon-large {
    font-size: 36px;
}

.vehicle-name {
    flex: 1;
}

.vehicle-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.vehicle-type {
    font-size: 12px;
    color: #aaa;
    text-transform: uppercase;
}

.vehicle-status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge-tersedia {
    background: rgba(102, 187, 106, 0.2);
    color: #66bb6a;
}

.status-badge-disewa {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.status-badge-maintenance {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.vehicle-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.detail-label {
    color: #aaa;
}

.detail-value {
    color: #fff;
    font-weight: 600;
}

.detail-value.warning {
    color: #f44336;
    animation: pulse-warning 2s infinite;
}

.detail-value.alert {
    color: #ff9800;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.rental-info {
    background: rgba(255, 152, 0, 0.1);
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 13px;
}

.rental-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.rental-info-row:last-child {
    margin-bottom: 0;
}

/* Mini Stats Cards */
.stat-card-mini {
    background: linear-gradient(135deg, #1e1e2f 0%, #252536 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-mini-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.stat-mini-value {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.stat-mini-label {
    font-size: 13px;
    color: #aaa;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #aaa;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #aaa;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 600;
}

.filter-btn:hover {
    border-color: #4fc3f7;
    color: #4fc3f7;
}

.filter-btn.active {
    background: #4fc3f7;
    color: #1e1e2f;
    border-color: #4fc3f7;
}

/* Charts Grid Override for Kendaraan Page */
.charts-grid.kendaraan-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.chart-container {
    position: relative;
    height: 300px;
    padding: 20px;
}

/* ============ PRINT STYLES ============ */
@media print {
    .sidebar,
    .mobile-toggle,
    .settings-btn,
    .btn-group,
    .top-bar-actions,
    .modal {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    body {
        background: white;
        color: black;
    }

    .form-card,
    .chart-card,
    .table-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ==========================================================================
   🔧 MAINTENANCE & SERVICE STYLES (Tambahan Baru)
   ========================================================================== */

/* 1. Warna Teks Peringatan (Di dalam Kartu Kendaraan) */
.detail-value.warning {
    color: #f44336 !important; /* Merah menyala */
    font-weight: 700;
    animation: pulse-red 2s infinite; /* Efek berkedip halus */
}

.detail-value.alert {
    color: #ff9800 !important; /* Kuning/Oranye */
    font-weight: 700;
}

/* 2. Animasi Berkedip untuk yang Telat Servis */
@keyframes pulse-red {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* 3. Badge Status Maintenance */
.status-badge-maintenance {
    background: rgba(255, 152, 0, 0.15);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

/* 4. Info Box di dalam Modal (Instruksi) */
.info-box {
    background: rgba(79, 195, 247, 0.1);
    border-left: 4px solid #4fc3f7;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 13px;
    color: #ddd;
    line-height: 1.4;
}

/* 5. Penyesuaian Tombol di Header */
.btn-edit {
    background: #ff9800; /* Warna Oranye agar beda dari tombol Refresh */
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-edit:hover {
    background: #f57c00;
}

/* 6. Perbaikan Tampilan Input Date di Tema Gelap */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1); /* Agar ikon kalender menjadi putih */
    cursor: pointer;
}

/* 7. Perbaikan Layout Detail Row agar teks panjang tidak berantakan */
.vehicle-details .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.vehicle-details .detail-row:last-child {
    border-bottom: none;
}
/* Tombol WhatsApp */
.btn-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #25D366; /* Warna Hijau WA */
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-top: 8px;
    transition: background 0.2s;
    width: 100%; /* Full width di dalam kartu */
    box-sizing: border-box;
}

.btn-wa:hover {
    background-color: #128C7E;
}