/**
 * TrinariaStyle – CSS unificato per prenotazione barbiere
 * Usato da: booking, my-bookings, profile, users, booking-confirmation, admin, oauth-callback
 */

/* ========== Variabili (design tokens) ========== */
:root {
    --brand-900: #0c1222;
    --brand-800: #1e293b;
    --brand-700: #1d4ed8;
    --brand-600: #2563eb;
    --brand-500: #3b82f6;
    --brand-100: #dbeafe;
    --brand-50: #eff6ff;
    --surface-border: #e2e8f0;
    --surface: #ffffff;
    --muted: #64748b;
    --radius: 16px;
    --radius-sm: 12px;
    --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.1);
    --content-max: 560px;
    --modal-max: 480px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --success-500: #22c55e;
    --success-100: #dcfce7;
    --warning-500: #f59e0b;
    --warning-100: #fef3c7;
    --error-500: #ef4444;
    --error-100: #fee2e2;
}

/* ========== Base – area prenotazioni/profilo (DM Sans) ========== */
body {
    font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(165deg, #f1f5f9 0%, #e2e8f0 50%, #f8fafc 100%);
    background-attachment: fixed;
    color: var(--brand-900);
    min-height: 100vh;
}

/* Layout centrato per pagine app */
body.app-body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.app-body.padding-page {
    padding: var(--space-6) var(--space-4);
}

/* ========== Admin (Inter, sfondo diverso) ========== */
body.admin-body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #f8fafc, #e0f2fe 45%, #f8fafc 100%);
    color: var(--brand-900);
}

/* ========== OAuth callback (pagina minimale) ========== */
body.oauth-callback-body {
    font-family: Arial, sans-serif;
    background: #f5f6f8;
    color: #1a1a1a;
}

body.oauth-callback-body .card {
    max-width: 520px;
    margin: 64px auto;
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

body.oauth-callback-body .status { font-weight: 600; margin-bottom: 8px; }
body.oauth-callback-body .status.success { color: #0f7b3e; }
body.oauth-callback-body .status.error { color: #b42318; }
body.oauth-callback-body a { color: #1f2937; }

/* ========== Booking page ========== */
.booking-page {
    width: 100%;
    max-width: calc(var(--content-max) + var(--space-8) * 2);
    margin: 0 auto;
    padding: var(--space-6) var(--space-4);
    align-items: center;
    justify-content: flex-start;
    flex: 1;
}

@media (min-width: 576px) {
    .booking-page { padding: var(--space-8) var(--space-6); }
}

@media (min-width: 768px) {
    .booking-page { padding: var(--space-10) var(--space-8); }
}

.booking-card-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    flex: 1;
}

.booking-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--surface-border);
    overflow: hidden;
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
}

.booking-card .card-body {
    position: relative;
    padding: var(--space-6) var(--space-5) !important;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

@media (min-width: 576px) {
    .booking-card .card-body { padding: var(--space-8) var(--space-6) !important; }
}

.brand-logo {
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: var(--space-3);
    font-weight: 600;
    text-align: center;
}

.booking-title {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--brand-900);
}

.booking-header {
    position: relative;
    text-align: center;
    margin-bottom: var(--space-5);
}

@media (min-width: 576px) {
    .booking-header { margin-bottom: var(--space-6); }
}

.booking-header .btn-icon {
    position: absolute;
    top: 0;
    right: 0;
}

.btn-primary {
    background: linear-gradient(180deg, var(--brand-500) 0%, var(--brand-600) 100%);
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(180deg, var(--brand-600) 0%, var(--brand-700) 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--surface-border);
    background: #ffffff;
    color: var(--brand-900);
    transition: background 0.2s, border-color 0.2s;
}

.btn-icon:hover {
    background: var(--brand-50);
    border-color: var(--brand-100);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

/* Calendario e slot */
.calendar-grid { display: grid; gap: 10px; }

.calendar-slot {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 12px;
    align-items: center;
}

.calendar-slot .btn {
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: transform 0.15s, box-shadow 0.15s;
}

.calendar-slot .btn:hover { transform: translateY(-1px); }

.calendar-time {
    font-weight: 600;
    color: var(--brand-800);
}

.calendar-slot button {
    width: 100%;
    text-align: left;
}

.month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-5);
    gap: var(--space-3);
}

.month-nav .btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--surface-border);
    background: #fff;
    color: var(--brand-800);
    transition: background 0.2s, border-color 0.2s;
}

.month-nav .btn:hover {
    background: var(--brand-50);
    border-color: var(--brand-100);
}

.month-nav .btn svg { width: 20px; height: 20px; }

.month-label {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--brand-900);
    text-transform: capitalize;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-center {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4) 0;
}

#month-view { width: 100%; max-width: 100%; }

.month-weekday {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    text-align: center;
    padding-bottom: 6px;
    font-weight: 600;
}

.month-cell {
    aspect-ratio: 1;
    min-height: 44px;
    border: 2px solid var(--surface-border);
    border-radius: var(--radius-sm);
    padding: 6px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.1s;
}

.month-cell:hover:not(.disabled) {
    border-color: #bfdbfe;
    background: var(--brand-50);
}

.month-cell.today {
    border-color: var(--brand-500);
    color: var(--brand-600);
    font-weight: 700;
}

.month-cell.today.disabled {
    border-color: #e2e8f0;
    color: #94a3b8;
}

.month-cell.disabled {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
    border-color: #f1f5f9;
}

.month-cell.active {
    background: linear-gradient(135deg, var(--brand-100) 0%, var(--brand-50) 100%);
    color: var(--brand-700);
    font-weight: 700;
    border-color: var(--brand-500);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

/* Summary box – titolo a tutta larghezza, sotto pacchetto · data · orario */
.summary-box {
    border-radius: var(--radius-sm);
    padding: var(--space-2) var(--space-3);
    border: 1px solid transparent;
    margin-bottom: var(--space-3);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2) 0;
}

.summary-box-title {
    font-size: 0.8125rem;
    margin-bottom: 0;
    width: 100%;
}

.summary-lines {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 var(--space-2);
    font-size: 0.8125rem;
}

.summary-line {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.summary-line:not(:last-child)::after {
    content: "·";
    margin-left: var(--space-2);
    color: var(--muted);
    font-weight: 600;
}

.summary-icon {
    width: 12px;
    height: 12px;
    color: var(--muted);
    flex-shrink: 0;
}

.summary-line-time .summary-icon {
    display: none;
}

.summary-box .summary-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.summary-label {
    color: var(--muted);
    min-width: 0;
}

#wizard-message.alert {
    padding: var(--space-2) var(--space-3);
    font-size: 0.8125rem;
    margin-bottom: var(--space-2);
}

.summary-step-1 { background: var(--brand-50); border-color: rgba(37, 99, 235, 0.2); }
.summary-step-2 { background: #eef2ff; border-color: rgba(99, 102, 241, 0.2); }
.summary-step-3 { background: #ecfdf5; border-color: rgba(16, 185, 129, 0.2); }

#wizard-step-3 .form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.2);
}

#wizard-step-3 .invalid-feedback { margin-top: 0.25rem; }

/* Google button (booking) */
.btn-google {
    background: #fff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s;
}

.btn-google:hover {
    background: #f8f9fa;
    color: #202124;
    border-color: #dadce0;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.1);
}

.btn-google:focus {
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.4);
}

.btn-google-icon { flex-shrink: 0; }

.user-menu-avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.user-menu-bar-inline { padding: var(--space-2) 0; }

/* Wizard steps */
.wizard-step-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.wizard-step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e2e8f0;
    transition: background 0.2s, transform 0.2s;
}

.wizard-step-dot.active {
    background: var(--brand-500);
    transform: scale(1.2);
}

.wizard-step-dot.done { background: var(--brand-600); }

/* Package item */
.package-item {
    border-radius: var(--radius-sm) !important;
    border: 2px solid var(--surface-border) !important;
    padding: var(--space-4) var(--space-5) !important;
    margin-bottom: var(--space-3) !important;
    transition: border-color 0.2s, background 0.2s;
}

.package-item:hover {
    border-color: #bfdbfe !important;
    background: var(--brand-50) !important;
}

.package-item.active {
    border-color: var(--brand-500) !important;
    background: var(--brand-50) !important;
    color: var(--brand-900) !important;
}

.package-item.active .text-muted {
    color: var(--brand-800) !important;
}

.package-item.active .badge {
    color: var(--brand-900) !important;
    background: var(--surface) !important;
    border: 1px solid var(--surface-border);
}

.package-item .badge {
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
}

/* Modal wizard */
.modal-dialog.modal-dialog-scrollable {
    margin: var(--space-8) auto;
    max-width: var(--modal-max);
    width: calc(100% - var(--space-8) * 2);
    max-height: calc(100vh - var(--space-8) * 2);
    display: flex;
    flex-direction: column;
}

.modal-dialog.modal-dialog-scrollable .modal-content {
    width: 100%;
    max-height: calc(100vh - var(--space-8) * 2);
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-dialog.modal-dialog-scrollable .modal-content #wizard-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}

.modal-dialog.modal-dialog-scrollable .modal-header {
    border-bottom: 1px solid var(--surface-border);
    padding: var(--space-5) var(--space-6);
    flex-shrink: 0;
}

.modal-dialog.modal-dialog-scrollable .modal-footer {
    border-top: 1px solid var(--surface-border);
    padding: var(--space-4) var(--space-6);
    flex-shrink: 0;
    gap: var(--space-3);
}

.modal-dialog.modal-dialog-scrollable .modal-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1 1 0;
    min-height: 0;
    max-height: calc(100vh - 200px);
    padding: var(--space-5) var(--space-6);
    touch-action: pan-y;
}

.modal-dialog.modal-dialog-scrollable .wizard-body-header { flex-shrink: 0; }

.modal-dialog.modal-dialog-scrollable .wizard-body-scroll {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

@media (max-width: 576px) {
    .modal.show {
        padding: 0 !important;
        display: flex !important;
        align-items: stretch;
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }

    .modal .modal-dialog { margin: 0; max-height: 100%; }

    .modal-dialog.modal-dialog-scrollable {
        margin: 0;
        width: 100%;
        max-width: none;
        height: 100%;
        min-height: 0;
        max-height: 100%;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .modal-dialog.modal-dialog-scrollable .modal-content {
        height: 100%;
        min-height: 0;
        max-height: 100%;
        border-radius: 0;
        padding-bottom: env(safe-area-inset-bottom);
        flex: 1 1 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .modal-dialog.modal-dialog-scrollable .modal-content #wizard-form {
        display: flex;
        flex-direction: column;
        flex: 1 1 0;
        min-height: 0;
        overflow: hidden;
    }

    .modal-dialog.modal-dialog-scrollable .modal-header {
        padding: var(--space-4) var(--space-5);
        flex-shrink: 0;
    }

    .modal-dialog.modal-dialog-scrollable .modal-footer {
        padding: var(--space-4) var(--space-5);
        flex-shrink: 0;
    }

    .modal-dialog.modal-dialog-scrollable .modal-body {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        position: relative;
        touch-action: pan-y;
        flex: 1 1 0;
        min-height: 0;
        max-height: none;
        padding: var(--space-4) var(--space-5) var(--space-8);
    }

    .modal-dialog.modal-dialog-scrollable .wizard-body-header { flex-shrink: 0; }

    .modal-dialog.modal-dialog-scrollable .wizard-body-scroll {
        flex: 1 1 0;
        min-height: 0;
        overflow-y: scroll;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    /* Modal conferma prenotazione: sempre centrato e compatto, non a tutta altezza */
    #emailSentModal.modal.show {
        align-items: center;
        justify-content: center;
        padding: 1rem;
        height: 100vh;
        height: 100dvh;
    }

    #emailSentModal .modal-dialog {
        margin: auto;
        width: 100%;
        max-width: 520px;
        height: auto;
        max-height: none;
    }

    #emailSentModal .modal-content {
        max-height: none;
    }

    #emailSentModal .modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        max-height: 85vh;
    }

    /* Modal "Come vuoi verificare?" centrato su mobile */
    #verifyChoiceModal.modal.show {
        align-items: center;
        justify-content: center;
        padding: 1rem;
        height: 100vh;
        height: 100dvh;
    }

    #verifyChoiceModal .modal-dialog {
        margin: auto;
        width: 100%;
        max-width: 24rem;
        height: auto;
        max-height: none;
    }

    /* Modal "Verifica con Telegram" centrato su mobile */
    #telegramVerifyModal.modal.show {
        align-items: center;
        justify-content: center;
        padding: 1rem;
        height: 100vh;
        height: 100dvh;
    }

    #telegramVerifyModal .modal-dialog {
        margin: auto;
        width: 100%;
        max-width: 520px;
        height: auto;
        max-height: none;
    }

    /* Modal "Verifica il tuo numero" centrato su mobile */
    #phoneVerifyModal.modal.show {
        align-items: center;
        justify-content: center;
        padding: 1rem;
        height: 100vh;
        height: 100dvh;
    }

    #phoneVerifyModal .modal-dialog {
        margin: auto;
        width: 100%;
        max-width: 520px;
        height: auto;
        max-height: none;
    }
}

.message { margin-top: var(--space-5); font-size: 0.9rem; text-align: center; }
.message.success { color: var(--brand-700); font-weight: 500; }
.message.error { color: #dc2626; }

.fullscreen-loader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(248, 250, 252, 0.9);
    z-index: 2000;
}

.fullscreen-loader .spinner-border { width: 2.5rem; height: 2.5rem; }

#emailSentModal.modal .modal-dialog { margin: 1rem auto; }

#emailSentModal.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.email-sent-modal-dialog {
    max-width: 520px;
    width: auto;
    margin: auto;
}

.email-sent-modal-content {
    border-radius: var(--radius);
    box-shadow: 0 25px 80px rgba(15, 23, 42, 0.25);
    border: 1px solid var(--surface-border);
}

.email-sent-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-100) 0%, var(--brand-50) 100%);
    color: var(--brand-600);
    display: flex;
    align-items: center;
    justify-content: center;
}

.email-sent-modal-alert {
    font-size: 1rem;
    background: #fef3c7;
    color: #92400e;
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-sm);
    border: 1px solid #fcd34d;
    line-height: 1.5;
}

.email-sent-modal-deadline {
    font-size: 1.05rem;
    padding: 0.5rem 1rem;
    background: var(--brand-50);
    color: var(--brand-700);
    border-radius: var(--radius-sm);
    display: inline-block;
}

/* ========== Pagine comuni (my-bookings, profile, users) ========== */
.my-bookings-page,
.profile-page {
    max-width: var(--content-max);
    margin: 0 auto;
}

.profile-page.users-page { max-width: 720px; }

.page-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--surface-border);
    overflow: hidden;
}

.page-card .card-body {
    padding: var(--space-6) var(--space-5) !important;
}

@media (min-width: 576px) {
    .page-card .card-body { padding: var(--space-8) var(--space-6) !important; }
}

.page-title {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--brand-900);
    margin-bottom: var(--space-4) !important;
}

.profile-page .page-title { margin-bottom: var(--space-6) !important; }

.info-box {
    background: var(--brand-100);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-sm);
    padding: var(--space-4);
    margin-bottom: var(--space-6);
    font-size: 0.9rem;
    color: var(--brand-800);
}

.info-box a { color: var(--brand-500); font-weight: 500; text-decoration: none; }
.info-box a:hover { text-decoration: underline; }

/* Card prenotazione in lista (my-bookings) */
.my-bookings-page .booking-card {
    background: #f8fafc;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    padding: var(--space-5);
    margin-bottom: var(--space-4);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.my-bookings-page .booking-card:hover {
    box-shadow: var(--shadow);
    border-color: #cbd5e1;
}

.my-bookings-page .booking-card:last-child { margin-bottom: 0; }

.booking-date {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--brand-900);
    margin-bottom: 2px;
}

.booking-time { font-size: 0.9rem; color: var(--muted); }

.booking-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--surface-border);
    font-size: 0.85rem;
    color: var(--muted);
}

.booking-meta span { display: inline-flex; align-items: center; gap: 4px; }

.badge-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 8px;
}

.badge-status.confirmed { background: #dcfce7; color: #166534; }
.badge-status.pending { background: #fef9c3; color: #854d0e; }
.badge-status.cancelled { background: #f1f5f9; color: var(--muted); }

.booking-actions {
    margin-top: var(--space-4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.btn-cancel {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.4em 0.9em;
    border-radius: 10px;
}

.non-cancellable { font-size: 0.8rem; color: var(--muted); }

/* Profile section */
.profile-section {
    background: #f8fafc;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    padding: var(--space-5);
    margin-bottom: var(--space-6);
}

.profile-section h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--brand-800);
    margin-bottom: var(--space-4);
}

.profile-section .form-label {
    font-weight: 500;
    color: var(--brand-800);
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: var(--space-4);
}

.footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    padding-top: var(--space-6);
    margin-top: var(--space-6);
    border-top: 1px solid var(--surface-border);
}

.footer-actions .btn {
    font-weight: 500;
    border-radius: 10px;
}

/* Google button (profile) */
.btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff;
    color: #1f2937;
    border: 1px solid #d1d5db;
    padding: 0.5em 1em;
    border-radius: 10px;
    font-weight: 500;
    text-decoration: none;
}

.btn-google:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #1f2937;
}

.user-menu-bar .btn-back {
    color: var(--muted);
    padding: 0.25rem 0.5rem;
    text-decoration: none;
    border-radius: var(--radius-sm);
}

.user-menu-bar .btn-back:hover {
    color: var(--brand-900);
    background: rgba(0, 0, 0, 0.06);
}

.empty-state {
    text-align: center;
    padding: var(--space-8) var(--space-4);
}

.empty-state p { color: var(--muted); margin-bottom: var(--space-5); }

.empty-state .btn {
    font-weight: 500;
    border-radius: 10px;
    padding: 0.5em 1.25em;
}

.pagination-wrapper {
    margin-top: var(--space-5);
    display: flex;
    justify-content: center;
}

/* ========== Booking confirmation ========== */
.confirm-page {
    width: 100%;
    max-width: 420px;
}

body.confirm-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.confirm-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--surface-border);
    padding: 2rem 1.75rem;
    text-align: center;
}

@media (min-width: 576px) {
    .confirm-card { padding: 2.5rem 2rem; }
}

.status-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.status-icon-wrap.success { background: var(--success-100); color: var(--success-500); }
.status-icon-wrap.warning { background: var(--warning-100); color: var(--warning-500); }
.status-icon-wrap.error { background: var(--error-100); color: var(--error-500); }
.status-icon-wrap.neutral { background: var(--brand-100); color: var(--brand-700); }

.status-icon-wrap svg { width: 32px; height: 32px; }

.confirm-card h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--brand-900);
    margin-bottom: 0.75rem;
}

.confirm-card .lead {
    font-size: 0.95rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.confirm-detail {
    font-size: 0.9rem;
    color: var(--brand-800);
    padding: 0.75rem 1rem;
    background: var(--brand-50);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.confirm-card .btn-primary {
    background: linear-gradient(180deg, var(--brand-500) 0%, var(--brand-600) 100%);
    border: none;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.confirm-card .btn-primary:hover {
    background: linear-gradient(180deg, var(--brand-600) 0%, var(--brand-700) 100%);
}

.confirm-card .link-primary { font-weight: 600; text-decoration: none; }
.confirm-card .link-primary:hover { text-decoration: underline; }

/* ========== Admin ========== */
body.admin-body .card {
    background: var(--surface);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    border: 1px solid var(--surface-border);
}

body.admin-body .nav a {
    margin-left: 12px;
    text-decoration: none;
    color: #111827;
    font-size: 14px;
}

body.admin-body .btn-primary {
    background-color: var(--brand-600);
    border-color: var(--brand-600);
}

body.admin-body .btn-primary:hover {
    background-color: var(--brand-700);
    border-color: var(--brand-700);
}

body.admin-body .btn-outline-secondary {
    color: #475569;
    border-color: #cbd5e1;
}

body.admin-body .btn-outline-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

body.admin-body .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--surface-border);
    background: #f1f5f9;
    color: var(--brand-900);
}

.badge-soft {
    background: var(--brand-100);
    color: var(--brand-700);
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-soft.inactive {
    background: #e2e8f0;
    color: #64748b;
}

.errors {
    background: #fde8e8;
    color: #b42318;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

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

.admin-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: #64748b;
    text-decoration: none;
}

.admin-back:hover {
    color: var(--brand-900);
    background: #f1f5f9;
}

body.admin-body .card.login-card {
    max-width: 420px;
    margin: 0 auto;
    padding: 24px;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    border: 1px solid var(--surface-border);
}
