.nav-auth-button,
.auth-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.nav-auth-button {
    min-height: 50px;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 248, 239, 0.22);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    color: inherit;
    cursor: pointer;
    font-weight: 800;
    line-height: 1;
    vertical-align: middle;
}

.detail-header .nav-auth-button {
    border-color: rgba(255, 255, 255, 0.14);
}

.nav-auth-button:hover,
.secondary-auth-button:hover {
    transform: translateY(-1px);
}

.nav-auth-button.is-hidden,
.auth-only.is-hidden,
.guest-only.is-hidden,
.auth-modal-backdrop.is-hidden,
.auth-otp-row.is-hidden,
.secondary-auth-button.is-hidden {
    display: none !important;
}

.auth-user-chip {
    color: rgba(255, 248, 239, 0.92);
    font-weight: 700;
}

.detail-header .auth-user-chip {
    color: inherit;
}

.auth-status-badge {
    display: inline-flex;
    margin-top: 0.7rem;
    padding: 0.42rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 248, 239, 0.14);
    color: rgba(255, 248, 239, 0.88);
    font-size: 0.82rem;
    font-weight: 700;
}

.account-card .auth-status-badge,
.booking-card .auth-status-badge,
.booking-summary-card .auth-status-badge {
    background: rgba(36, 94, 89, 0.08);
    color: var(--teal);
}

.auth-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(13, 25, 24, 0.72);
    backdrop-filter: blur(8px);
}

.auth-modal {
    position: relative;
    width: min(100%, 520px);
    padding: 2rem;
    border-radius: 34px;
    background:
        radial-gradient(circle at top right, rgba(240, 200, 137, 0.18), transparent 28%),
        rgba(255, 249, 242, 0.98);
    color: var(--ink);
    box-shadow: 0 30px 90px rgba(11, 24, 23, 0.3);
}

.auth-modal h2 {
    margin: 0 0 0.7rem;
    font-family: "Playfair Display", serif;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
}

.auth-modal-copy {
    margin: 0 0 1.4rem;
    color: var(--muted);
    line-height: 1.7;
}

.auth-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.4rem;
    height: 2.4rem;
    border: 0;
    border-radius: 50%;
    background: rgba(29, 44, 41, 0.08);
    color: var(--ink);
    cursor: pointer;
    font-weight: 800;
}

.auth-google-block {
    display: grid;
    gap: 0.8rem;
    justify-items: center;
}

.google-login-button-shell,
.secondary-auth-button {
    min-height: 46px;
}

.google-login-button-shell {
    display: flex;
    justify-content: center;
    width: 100%;
}

.secondary-auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 1px solid rgba(29, 44, 41, 0.12);
    border-radius: 999px;
    background: linear-gradient(180deg, #fffdf8, #f6efe4);
    color: var(--ink);
    cursor: pointer;
    font-weight: 800;
}

.secondary-auth-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.auth-divider {
    position: relative;
    margin: 1.4rem 0 1.1rem;
    text-align: center;
}

.auth-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(29, 44, 41, 0.1);
}

.auth-divider span {
    position: relative;
    z-index: 1;
    padding: 0 0.9rem;
    background: rgba(255, 249, 242, 0.98);
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.auth-form {
    display: grid;
    gap: 0.9rem;
}

.auth-label {
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--teal-deep);
}

.auth-input,
.account-input,
.account-select,
.account-textarea {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(29, 44, 41, 0.14);
    background: #fffdf8;
    font: inherit;
    color: var(--ink);
}

.auth-input:focus,
.account-input:focus,
.account-select:focus,
.account-textarea:focus {
    outline: 2px solid rgba(217, 107, 45, 0.18);
    border-color: rgba(217, 107, 45, 0.35);
}

.auth-helper-text,
.auth-feedback {
    margin: 0;
    min-height: 1.4rem;
    font-size: 0.9rem;
}

.auth-helper-text {
    color: var(--muted);
}

.auth-feedback {
    color: #b24627;
    font-weight: 700;
}

.auth-feedback.is-success {
    color: #23665b;
}

.auth-actions {
    display: flex;
    gap: 0.8rem;
}

.auth-submit-button {
    flex: 1 1 auto;
}

#auth-toast-root {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1250;
    display: grid;
    gap: 0.65rem;
}

.auth-toast {
    min-width: 240px;
    max-width: 320px;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(20, 61, 57, 0.96);
    color: #fff;
    box-shadow: 0 22px 44px rgba(11, 24, 23, 0.24);
    font-weight: 700;
}

.auth-toast.is-error {
    background: rgba(156, 64, 34, 0.96);
}

.auth-toast.is-success {
    background: rgba(36, 94, 89, 0.96);
}

.auth-toast.is-leaving {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.protected-shell {
    width: min(calc(100% - 2rem), var(--max-width));
    margin: 0 auto;
    padding: 2.4rem 0 4.5rem;
}

.protected-notice,
.account-card,
.booking-card,
.booking-summary-card,
.empty-state-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.56);
    box-shadow: var(--shadow-soft);
    border-radius: 28px;
    backdrop-filter: blur(18px);
}

.protected-notice,
.empty-state-card {
    padding: 1.6rem;
}

.protected-notice h2,
.account-section-title,
.account-card h2,
.booking-summary-card h2 {
    margin-top: 0;
}

.protected-notice p,
.account-helper,
.booking-meta,
.booking-summary-card p,
.booking-card p,
.empty-state-card p {
    color: var(--muted);
    line-height: 1.7;
}

.account-helper.is-error,
.booking-meta.is-error {
    color: #9c4022;
}

.account-card,
.booking-summary-card,
.booking-card {
    padding: 1.8rem;
}

.account-grid,
.booking-grid {
    display: grid;
    gap: 1.15rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-field,
.booking-field {
    display: grid;
    gap: 0.5rem;
}

.account-field-full,
.booking-field-full {
    grid-column: 1 / -1;
}

.account-actions,
.booking-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.booking-list {
    display: grid;
    gap: 1rem;
}

.booking-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.booking-status-pill {
    display: inline-flex;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(36, 94, 89, 0.1);
    color: var(--teal);
    font-size: 0.82rem;
    font-weight: 800;
}

.booking-status-pill.is-pending {
    background: rgba(217, 107, 45, 0.12);
    color: var(--accent);
}

.booking-status-pill.is-cancelled,
.booking-status-pill.is-unpaid {
    background: rgba(156, 64, 34, 0.12);
    color: #9c4022;
}

.booking-status-pill.is-completed,
.booking-status-pill.is-paid {
    background: rgba(36, 94, 89, 0.12);
    color: #23665b;
}

.traveler-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.traveler-card {
    padding: 1.15rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.64);
    border: 1px solid rgba(29, 44, 41, 0.08);
    box-shadow: 0 16px 32px rgba(24, 37, 36, 0.06);
}

.traveler-card h4 {
    margin-top: 0;
}

.booking-document-card {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.64);
    border: 1px solid rgba(29, 44, 41, 0.08);
    box-shadow: 0 16px 32px rgba(24, 37, 36, 0.06);
}

.booking-document-title {
    margin: 0;
}

.booking-subscribe-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.booking-subscribe-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 40px;
    padding: 0.65rem 0.85rem;
    border-radius: 999px;
    background: rgba(15, 106, 105, 0.08);
    color: var(--teal-deep);
    font-size: 0.82rem;
    font-weight: 700;
}

.booking-subscribe-toggle input {
    accent-color: var(--teal);
}

.booking-departure-selector {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.4rem;
}

.booking-departure-grid {
    display: grid;
    gap: 0.85rem;
}

.booking-departure-card {
    display: grid;
    gap: 0.45rem;
    width: 100%;
    padding: 1rem;
    text-align: left;
    border-radius: 22px;
    border: 1px solid rgba(29, 44, 41, 0.08);
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.booking-departure-card:hover:not(:disabled),
.booking-departure-card.is-selected {
    transform: translateY(-2px);
    border-color: rgba(36, 94, 89, 0.22);
    box-shadow: 0 18px 36px rgba(24, 37, 36, 0.08);
}

.booking-departure-card:disabled {
    cursor: not-allowed;
    opacity: 0.56;
}

.booking-departure-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.booking-departure-price {
    color: var(--teal-deep);
    font-size: 1.15rem;
    font-weight: 800;
}

.booking-departure-copy {
    color: var(--muted);
    line-height: 1.6;
}

.booking-departure-status,
.booking-departure-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 32px;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.booking-departure-status {
    background: rgba(36, 94, 89, 0.1);
    color: var(--teal);
}

.booking-departure-badge {
    background: rgba(217, 107, 45, 0.12);
    color: var(--accent);
}

@media (max-width: 860px) {
    .account-grid,
    .booking-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .auth-modal {
        padding: 1.35rem;
        border-radius: 26px;
    }

    .auth-actions,
    .account-actions,
    .booking-actions {
        flex-direction: column;
    }

    .nav-auth-button,
    .auth-user-chip {
        width: 100%;
        justify-content: center;
    }

    .protected-shell {
        width: min(calc(100% - 1rem), var(--max-width));
        padding-top: 1.4rem;
    }

    .account-card,
    .booking-summary-card,
    .booking-card,
    .protected-notice {
        padding: 1.25rem;
    }

    .booking-subscribe-row {
        flex-direction: column;
    }
}
