/* =====================================================================
   ALL DISTRICTS LIMOUSINES — PORTAL STYLESHEET
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. THEME VARIABLES
   --------------------------------------------------------------------- */
:root {
    --adl-black: #0c0c0c;
    --adl-black-soft: #1a1a1a;
    --adl-gold: #c9a24b;
    --adl-gold-light: #e4c877;
    --adl-white: #f7f5f0;
    --adl-error: #d9534f;
    --adl-border-muted: #333;
    --adl-input-border: #444;
}

/* ---------------------------------------------------------------------
   2. RESET / BASE
   --------------------------------------------------------------------- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--adl-black);
    color: var(--adl-white);
    font-family: Georgia, "Times New Roman", serif;
}

h2 {
    font-weight: normal;
    color: var(--adl-gold-light);
    border-bottom: 1px solid var(--adl-gold);
    padding-bottom: 10px;
}

/* ---------------------------------------------------------------------
   3. LOGIN PAGE (index.html)
   --------------------------------------------------------------------- */
body.login-body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#adl-portal {
    width: 100%;
    max-width: 420px;
    background: var(--adl-black);
    padding: 40px 32px;
    border: 1px solid var(--adl-gold);
    border-radius: 5px;
}

#adl-portal h1 {
    margin: 0 0 25px;
    text-align: center;
    font-size: 22px;
    font-weight: normal;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--adl-gold-light);
}

#adl-portal h3 {
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: normal;
    color: var(--adl-gold-light);
    border-bottom: 1px solid var(--adl-gold);
    padding-bottom: 10px;
}

.role-cards {
    display: grid;
    /*grid-template-columns: 1fr 1fr;*/
    gap: 12px;
    margin-bottom: 24px;
}

.role-card {
    position: relative;
    background: #181818;
    border: 2px solid #2a2a2a;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.role-card:hover:not(.active) {
    border-color: #444444;
    background: #202020;
}

.role-card .role-icon {
    color: #888888;
    margin-bottom: 6px;
    display: flex;
    justify-content: center;
}

.role-card .role-title {
    font-size: 14px;
    font-weight: 600;
    color: #aaaaaa;
}

.role-card .role-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: transparent;
    color: transparent;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-weight: bold;
    transition: all 0.2s ease;
}

.role-card.active {
    background: #221e10;
    border-color: #d4af37;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.15);
}

.role-card.active .role-icon,
.role-card.active .role-title {
    color: #f1c40f;
}

.role-card.active .role-badge {
    background: #d4af37;
    color: #111111;
}

#adl-portal input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: var(--adl-black-soft);
    color: var(--adl-white);
    border: 1px solid var(--adl-input-border);
    border-radius: 4px;
    font-size: 14px;
}

#adl-portal input:focus {
    outline: none;
    border-color: var(--adl-gold);
}

#adl-portal button {
    width: 100%;
    padding: 12px;
    background: var(--adl-gold);
    color: var(--adl-black);
    border: none;
    border-radius: 4px;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 5px;
}

#adl-portal button:hover {
    background: var(--adl-gold-light);
}

#login-error {
    margin-top: 15px;
    color: var(--adl-error);
    font-size: 13px;
}

.otp-hint {
    font-size: 13px;
    color: var(--adl-gold-light);
    margin: 0 0 15px;
    text-align: center;
}

.retry-btn {
    margin-top: 10px;
    width: 100%;
}

/* ---------------------------------------------------------------------
   4. DASHBOARD SHELL & HEADER
   --------------------------------------------------------------------- */
#adl-dashboard {
    max-width: 1200px;
    margin: auto;
    padding: 25px;
}

.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 1px solid var(--adl-gold);
    padding-bottom: 20px;
}

.brand h1 {
    margin: 0;
    font-size: 22px;
    font-weight: normal;
    letter-spacing: 2px;
    color: var(--adl-gold-light);
}

.brand p {
    margin: 5px 0 0;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--adl-gold);
}

.portal-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 20px 0 30px;
}

.nav-btn {
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid #333333;
    background: #181818;
    color: #aaaaaa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn.active {
    background: #d4af37;
    color: #111111;
    border-color: #d4af37;
}

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

.ghost-btn {
    background: transparent;
    color: var(--adl-gold);
    border: 1px solid var(--adl-gold);
    padding: 10px 18px;
    border-radius: 3px;
    cursor: pointer;
}

.ghost-btn:hover {
    background: var(--adl-gold);
    color: var(--adl-black);
}

/* ---------------------------------------------------------------------
   5. MY BOOKINGS — TOOLBAR & FILTERING
   --------------------------------------------------------------------- */
.bookings-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 12px;
}

#bookings-search {
    flex: 1;
    min-width: 220px;
    padding: 11px;
    background: #111;
    color: var(--adl-white);
    border: 1px solid var(--adl-input-border);
    border-radius: 3px;
    font-family: inherit;
    font-size: 14px;
}

#bookings-search:focus {
    outline: none;
    border-color: var(--adl-gold);
}

.filter-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn {
    padding: 10px 16px;
    background: transparent;
    color: var(--adl-gold);
    border: 1px solid var(--adl-gold);
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}

.filter-btn.active {
    background: var(--adl-gold);
    color: var(--adl-black);
}

.refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    background: #181818;
    color: var(--adl-gold);
    border: 1px solid var(--adl-gold);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
}

.refresh-btn:hover {
    background: var(--adl-gold);
    color: var(--adl-black);
}

.refresh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.refresh-icon {
    font-size: 1.1rem;
    display: inline-block;
    transition: transform 0.5s ease;
}

.refresh-btn.is-refreshing .refresh-icon {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ---------------------------------------------------------------------
   6. BOOKING CARDS
   --------------------------------------------------------------------- */
#bookings-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.booking-card {
    background: #141414;
    border: 1px solid #262626;
    border-left: 3px solid var(--adl-gold);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.booking-header-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #181818;
    border: 1px solid #222222;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
}

.booking-ref {
    display: flex;
    align-items: center;
    gap: 6px;
}

.booking-ref strong {
    font-size: 15px;
    color: #ffffff;
}

.status-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: capitalize;
}

.status-confirmed { background: rgba(212, 175, 55, 0.15); color: #d4af37; border: 1px solid rgba(212, 175, 55, 0.3); }
.status-completed { background: rgba(46, 204, 113, 0.15); color: #2ecc71; border: 1px solid rgba(46, 204, 113, 0.3); }
.status-draft     { background: rgba(231, 76, 60, 0.15); color: #e74c3c; border: 1px solid rgba(231, 76, 60, 0.3); }

.booking-time-banner {
    display: flex;
    gap: 20px;
    background: #1a1a1a;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.time-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dddddd;
    font-size: 13px;
    font-weight: 500;
}

.time-item svg {
    color: #d4af37;
}

.booking-route-clean {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    background: #181818;
    border: 1px solid #222222;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    text-align: center;
}

.route-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.route-col small {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: #888888;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.route-col p {
    margin: 0;
    font-size: 14px;
    color: #ffffff;
    font-weight: 500;
    line-height: 1.3;
}

.booking-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    background: #181818;
    border-radius: 8px;
    padding: 12px;
}

.grid-item small {
    display: block;
    font-size: 11px;
    color: #777777;
    margin-bottom: 2px;
}

.grid-item strong {
    font-size: 13px;
    color: #cccccc;
    font-weight: 500;
}

.booking-notes {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed #282828;
}

.booking-notes small {
    color: #777777;
    font-size: 11px;
}

.booking-notes p {
    margin: 2px 0 0;
    font-size: 13px;
    color: #aaaaaa;
    font-style: italic;
}

.booking-empty {
    color: var(--adl-gold);
    font-size: 14px;
}

/* ---------------------------------------------------------------------
   7. CREATE BOOKING — LAYOUT, FORM & MAP
   --------------------------------------------------------------------- */
.booking-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
}

.booking-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--adl-black-soft);
    padding: 25px;
    border: 1px solid var(--adl-border-muted);
}

.booking-form label {
    display: block;
    margin-top: 8px;
    margin-bottom: 2px;
    color: var(--adl-gold-light);
    font-size: 14px;
}

.required-mark {
    color: var(--adl-error);
}

.booking-form input,
.booking-form select,
.booking-form textarea {
    width: 100%;
    padding: 11px;
    background: #111;
    color: var(--adl-white);
    border: 1px solid var(--adl-input-border);
    border-radius: 3px;
    font-family: inherit;
}

.booking-form input:focus,
.booking-form select:focus,
.booking-form textarea:focus {
    outline: none;
    border-color: var(--adl-gold);
}

#special-instructions {
    resize: none;
}

.booking-form input[type="date"]::-webkit-calendar-picker-indicator,
.booking-form input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

#create-booking-btn {
    margin-top: 20px;
    width: 100%;
    padding: 12px;
    background: var(--adl-gold);
    color: var(--adl-black);
    border: none;
    border-radius: 3px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

#create-booking-btn:hover {
    background: var(--adl-gold-light);
}

#booking-message {
    margin-top: 12px;
    font-size: 13px;
    color: var(--adl-gold-light);
}

.booking-map {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    height: 100%;
    position: sticky;
    top: 2rem;
}

#map {
    width: 100%;
    flex: 1;
    min-height: 320px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border: 1px solid var(--adl-gold);
}

.route-summary-card {
    flex-shrink: 0;
    background: #181818;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.route-summary-title {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--adl-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.route-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.summary-box {
    background: #222222;
    border-left: 3px solid var(--adl-gold);
    border-radius: 6px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.summary-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #a0a0a0;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
}

/* ---------------------------------------------------------------------
   8. MODALS
   --------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-box {
    background: var(--adl-black-soft);
    border: 1px solid var(--adl-gold);
    border-radius: 5px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-box h3 {
    margin: 0 0 15px;
    font-weight: normal;
    color: var(--adl-gold-light);
    letter-spacing: 1px;
}

.modal-box h3.modal-error {
    color: var(--adl-error);
}

.modal-box p {
    margin: 0 0 20px;
    font-size: 14px;
    color: var(--adl-white);
    white-space: pre-line;
}

.modal-box .ghost-btn {
    width: 100%;
}

/* ---------------------------------------------------------------------
   9. RESPONSIVE DESIGN
   --------------------------------------------------------------------- */
@media (min-width: 600px) {
    .booking-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .booking-layout {
        grid-template-columns: 1fr;
    }

    .booking-map {
        position: static;
        height: auto;
    }

    #map {
        height: 320px;
        flex: none;
    }

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

@media (max-width: 480px) {
    .booking-route-clean {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}