/* ============================================================
   BusShare 2026 - Mobile-first CSS
   ============================================================ */

:root {
    --bs-primary: #e85d04;
    --bs-primary-rgb: 232, 93, 4;
    --bs-border-color: #e5e7eb;
    --bs-border-color-translucent: rgba(0, 0, 0, 0.08);
    --navbar-height: 56px;
    --bottom-nav-height: 60px;
    --navbar-bg: #2e2f33;
    --font-display: 'Outfit', system-ui, sans-serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================================
   General
   ============================================================ */

body {
    font-family: var(--font-body);
    background-color: #eeeee8;
    color: #232427;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .modal-title {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

.main-content {
    padding-top: calc(var(--navbar-height) + 1.5rem);
    padding-bottom: calc(var(--bottom-nav-height) + 1.5rem);
    min-height: 100vh;
}

@media (min-width: 992px) {
    .main-content {
        padding-bottom: 2rem;
    }
}

/* ============================================================
   Navbar
   ============================================================ */

.navbar {
    backdrop-filter: blur(10px);
    background-color: var(--navbar-bg) !important;
    position: relative;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(232, 93, 4, 0.45), transparent);
    pointer-events: none;
}

.navbar-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.navbar-brand i {
    color: var(--bs-primary);
}

.navbar .nav-link.active {
    border-bottom: 2px solid var(--bs-primary);
    padding-bottom: calc(0.5rem - 2px);
}

/* ============================================================
   Bottom Navigation (mobile)
   ============================================================ */

.shadow-top {
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #6b7280;
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.bottom-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 1px;
}

.bottom-nav-item.active {
    color: var(--bs-primary);
    font-weight: 600;
}

.bottom-nav-item:hover {
    color: var(--bs-primary);
}

/* ============================================================
   Login
   ============================================================ */

.login-card {
    border-radius: 1rem;
}

.login-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.1), rgba(var(--bs-primary-rgb), 0.05));
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   Cards
   ============================================================ */

.card {
    --bs-card-border-color: #e5e7eb;
    --bs-card-bg: #ffffff;
    border-radius: 0.75rem;
    transition: transform 0.15s ease;
}

.entry-card:active {
    transform: scale(0.99);
}

.entry-type-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Card left-border accent (Carbon Rush) */
.card-accent {
    border: none !important;
    border-left: 3px solid var(--accent, var(--bs-primary)) !important;
}

/* ============================================================
   FAB (Floating Action Button)
   ============================================================ */

.fab {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 1rem);
    right: 1rem;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    border: none;
    background: var(--bs-primary);
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.4);
    z-index: 1050;
    transition: transform 0.2s, box-shadow 0.2s;
}

.fab:active {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(var(--bs-primary-rgb), 0.3);
}

/* ============================================================
   Calendar — Month View (Reservations)
   ============================================================ */

.calendar-grid {
    width: 100%;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}

.calendar-day-header {
    text-align: center;
    padding: 6px 4px;
}

.calendar-day-header .day-name {
    display: block;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.65rem;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    min-height: 70px;
    background: white;
    border-radius: 8px;
    padding: 4px;
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid #e5e7eb;
}

.calendar-day:hover {
    background: #f8f9fa;
}

.calendar-day.other-month {
    background: #f7f7f5;
    opacity: 0.5;
}

.calendar-day-num {
    font-size: 0.78rem;
    font-weight: 600;
    color: #232427;
    margin-bottom: 2px;
    padding: 0 2px;
}

.calendar-day-num.today-mark {
    background: var(--bs-primary);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    display: inline-block;
}

.calendar-day.today {
    border-color: var(--bs-primary);
}

.calendar-event {
    padding: 2px 5px;
    border-radius: 4px;
    margin-bottom: 2px;
    cursor: pointer;
    transition: opacity 0.15s;
}

.calendar-event:hover {
    opacity: 0.8;
}

@media (max-width: 767px) {
    .calendar-day {
        min-height: 50px;
        font-size: 0.7rem;
    }

    .calendar-day-num {
        font-size: 0.7rem;
    }

    .calendar-day-num.today-mark {
        width: 20px;
        height: 20px;
        line-height: 20px;
        font-size: 0.65rem;
    }

    .calendar-event {
        padding: 1px 3px;
    }

    .calendar-event .small {
        font-size: 0.55rem;
    }
}

/* ============================================================
   Charts
   ============================================================ */

canvas {
    max-height: 300px;
}

/* ============================================================
   Form controls — white background inside cards
   ============================================================ */

.form-control, .form-select {
    background-color: #ffffff;
}

/* ============================================================
   Utility classes
   ============================================================ */

.min-width-0 {
    min-width: 0;
}

.text-orange {
    color: var(--bs-primary);
}

/* Badge subtle variants for older Bootstrap */
.bg-primary-subtle {
    background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
}

/* ============================================================
   Toast overrides
   ============================================================ */

.toast {
    border-radius: 12px;
}

/* ============================================================
   Modal overrides
   ============================================================ */

@media (max-width: 576px) {
    .modal-dialog {
        margin: 0;
        min-height: 100%;
    }

    .modal-content {
        border: 0;
        border-radius: 1rem 1rem 0 0;
        min-height: auto;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal.fade .modal-dialog {
        transform: translateY(100%);
        transition: transform 0.3s ease-out;
    }

    .modal.show .modal-dialog {
        transform: translateY(0);
    }
}

/* ============================================================
   Type selector buttons
   ============================================================ */

.type-btn {
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 20px;
}

.type-btn.active {
    font-weight: 600;
}

/* ============================================================
   Responsive table
   ============================================================ */

.table-responsive {
    -webkit-overflow-scrolling: touch;
}

.table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #6b7280;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
}

/* ============================================================
   Scrollbar
   ============================================================ */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* ============================================================
   Print
   ============================================================ */

@media print {
    .navbar, #bottomNav, .fab, .toast-container {
        display: none !important;
    }
    .main-content {
        padding-top: 0;
        padding-bottom: 0;
    }
}
