/* =========================
   GLOBAL FONT
========================= */

* {
    font-family: 'Poppins', sans-serif;
}

body {
    background: #f5f6fa;
    font-family: 'Poppins', sans-serif;
}


/* =========================
   PAGE
========================= */

.page-title {
    font-size: 48px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
    line-height: 1;
}

.page-subtitle {
    color: #64748b;
    font-size: 16px;
    font-weight: 500;
}


/* =========================================
   HEADER TOP
========================================= */

.top-action {
    display: flex;
    align-items: center;
    gap: 14px;
}


/* =========================================
   NAVIGATION TANGGAL
========================================= */

.btn-nav {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #0f172a;
    font-size: 16px;
    font-weight: 600;
    transition: all .2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.btn-nav:hover {
    background: #2563eb;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.18);
}


/* =========================================
   DATE BOX
========================================= */

.calendar-date {
    min-width: 200px;
    height: 32px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.calendar-date::after {
    content: '📅';
    position: absolute;
    right: 16px;
    font-size: 16px;
    opacity: 0.7;
}


/* =========================================
   BUTTON HARI INI
========================================= */

.btn-today {
    height: 32px;
    padding: 0 18px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #0f172a;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    transition: all .2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.btn-today:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}


/* =========================================
   BUTTON RESERVASI
========================================= */

.btn-reservasi {
    height: 32px;
    padding: 0 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    transition: all .2s ease;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
    width: max-content;
}

.btn-reservasi:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.35);
}


/* =========================
   CARD ICON
========================= */

.card-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}


/* =========================
   SOFT BACKGROUND COLORS
========================= */

.bg-success-soft {
    background: #dcfce7;
}

.bg-warning-soft {
    background: #fef3c7;
}

.bg-danger-soft {
    background: #fee2e2;
}

.bg-primary-soft {
    background: #dbeafe;
}

.bg-secondary-soft {
    background: #e2e8f0;
}


/* =========================
   CARD 5 COLUMN
========================= */

.col-custom-5 {
    width: 33.33%;
}


/* =========================
   LEGEND
========================= */

.legend-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 18px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    margin-bottom: 12px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dot-success {
    background: #22c55e;
}

.dot-warning {
    background: #facc15;
}

.dot-danger {
    background: #ef4444;
}

.dot-empty {
    background: #ffffff;
    border: 1px solid #d1d5db;
}


/* =========================================
   CALENDAR WRAPPER
========================================= */


/* =========================================
   CALENDAR WRAPPER
========================================= */

.calendar-wrapper {
    width: 100%;
    background: #fff;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}


/* =========================================
   TABLE RESPONSIVE
========================================= */

.table-responsive {
    width: 100%;
    height: 72vh;
    overflow-y: auto;
    position: relative;
    white-space: nowrap;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}


/* =========================================
   TABLE
========================================= */

.calendar-table {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    min-width: 100%;
    white-space: nowrap;
    margin: 0;
}


/* =========================================
   BORDER
========================================= */

.calendar-table th,
.calendar-table td {
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}


/* =========================================
   HEADER
========================================= */

.calendar-table th {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 20;
}


/* =========================================
   STICKY
========================================= */

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 50 !important;
    background: #fff !important;
}

.sticky-col-1 {
    position: sticky;
    left: 0;
    z-index: 40;
    background: #fff;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.04);
}

thead .sticky-col-1 {
    z-index: 60 !important;
}

.sticky-col-2 {
    position: sticky;
    left: 200px;
    z-index: 40;
    background: #fff;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.04);
}

thead .sticky-col-2 {
    z-index: 60 !important;
}


/* =========================================
   COLUMN
========================================= */

.car-column {
    width: 200px;
    min-width: 200px;
}

.unit-column {
    width: 50px;
    min-width: 50px;
}

.date-column {
    width: 10px;
    min-width: 10px;
    max-width: 10px;
    text-align: center;
}


/* =========================================
   DATE
========================================= */

.date-number {
    font-size: 10px;
    font-weight: 700;
    color: #0f172a;
}

.date-day {
    font-size: 10px;
    color: #64748b;
    margin-top: 2px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.weekend {
    color: #f30505 !important;
}


/* =========================================
   CAR INFO
========================================= */

.car-info {
    padding: 14px;
    background: #fff;
}

.car-flex {
    display: flex;
    align-items: center;
    gap: 12px;
}

.car-image {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 12px;
}

.car-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.car-plate {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}


/* =========================================
   CELL
========================================= */

.calendar-cell {
    width: 24px;
    min-width: 24px;
    height: 40px;
    padding: 0 !important;
    position: relative;
    background: #ffffff;
    overflow: visible;
}


/* =========================================
   BOOKING STATUS
========================================= */

.booking-confirmed {
    background: #22c55e;
}

.booking-pending {
    background: #facc15;
}

.booking-plan {
    background: #ef4444;
}


/* =========================================
   BOOKING RADIUS
========================================= */

.booking-start {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.booking-end {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}


/* WRAPPER SCROLL */

.table-wrapper {
    overflow: auto;
    max-height: 80vh;
    position: relative;
}


/* HEADER */

table thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 9999;
}


/* PENTING */

table {
    border-collapse: separate;
    border-spacing: 0;
}


/* CELL */

table td,
table th {
    position: relative;
    overflow: visible !important;
}


/* BOOKING */

.booking-bar {
    position: absolute;
    top: 2px;
    left: 0;
    height: calc(100% - 4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    overflow: visible;
    z-index: 5;
    /* di bawah header */
    /* FULL SESUAI TANGGAL */
    white-space: nowrap;
}

.booking-label {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    text-align: center;
    white-space: nowrap;
    z-index: 5;
    font-size: 10px;
    cursor: pointer;
}

.booking-title,
.booking-date {
    white-space: nowrap;
    color: #fff;
}


/* GRID */

.calendar-cell,
.calendar-row,
.calendar-grid {
    position: relative;
    overflow: visible !important;
}

.booking-pending .booking-title,
.booking-pending .booking-date {
    color: #000000;
}


/* =========================================
   RESPONSIVE
========================================= */

@media(max-width:1200px) {
    .col-custom-5 {
        width: 50%;
    }
}

@media(max-width:992px) {
    .car-column {
        width: 220px;
        min-width: 220px;
    }
    .sticky-col-2 {
        left: 220px;
    }
    .date-column {
        width: 65px;
        min-width: 65px;
        max-width: 65px;
    }
    .top-action {
        flex-wrap: wrap;
        margin-top: 20px;
    }
    .calendar-date {
        min-width: 180px;
    }
}

@media(max-width:768px) {
    body {
        position: relative;
        overflow-x: hidden;
    }
    .main-content {
        margin-left: 0px;
        padding: 0px;
    }
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }
    .col-custom-5 {
        width: 50%;
    }
    .main-content {
        padding: 15px;
    }
    .title-header {
        width: 100vw;
        display: block;
    }
    .page-title {
        font-size: 34px;
        width: 100%;
        display: block;
    }
    .top-action {
        gap: 10px;
        width: 100%;
        display: block;
    }
    .btn-nav,
    .btn-today,
    .calendar-date {
        height: 44px;
    }
    .btn-reservasi {
        height: 44px;
        width: 100%;
    }
    .calendar-wrapper {
        border-radius: 14px;
    }
    .date-column {
        width: 58px;
        min-width: 58px;
        max-width: 58px;
    }
    .booking-title {
        font-size: 11px;
    }
    .booking-date {
        font-size: 9px;
    }
    .calendar-navigation {
        display: flex;
        align-items: center;
        width: 100%;
        gap: 10px;
        margin-bottom: 24px;
    }
    .calendar-date {
        flex: 1;
        text-align: center;
    }
    .btn-nav {
        width: 42px;
        height: 42px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .btn-booking {
        margin-bottom: 24px;
    }
    .car-column {
        width: 100px;
        min-width: 100px;
        font-size: 6px;
    }
    .car-name {
        width: 100px;
        min-width: 100px;
        font-size: 6px;
    }
}

.calendar-navigation {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
    margin-bottom: 24px;
}

.btn-booking {
    margin-bottom: 24px;
}