/* Explain: Styles for various UI components and layout elements. */
.site-header {
    background: linear-gradient(180deg, rgba(246, 249, 254, 0.95), rgba(246, 249, 254, 0.74));
    backdrop-filter: blur(18px);
}

.brand-logo {
    height: 5.8rem;
    width: auto;
    max-width: 5.8rem;
    border-radius: 999px;
    object-fit: contain;
}

.brand-name {
    display: block;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    line-height: 1.1;
}

.brand-tagline {
    display: block;
    margin-top: 0.15rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.25;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--sage-dark);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.section-kicker::before {
    display: inline-block;
    width: 2.4rem;
    height: 1px;
    background: var(--accent-color);
    content: "";
}

.glass-panel {
    border: 1px solid var(--glass-border);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(234, 241, 251, 0.66));
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.frame {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    background: var(--surface-color);
    box-shadow: var(--shadow-soft);
}

.frame-tall {
    height: min(72vh, 640px);
    min-height: 420px;
}

.frame-wide {
    aspect-ratio: 16 / 11;
}

.trip-card {
    display: flex;
    flex-direction: column;
    border-radius: 2rem;
    padding: 1.35rem;
    transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.trip-card:hover {
    border-color: rgba(29, 78, 216, 0.5);
    box-shadow: 0 26px 80px rgba(11, 46, 111, 0.14);
    transform: translateY(-6px);
}

.trip-card.is-hidden {
    display: none;
}

.route-line {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
}

.route-line .fa-arrow-right-long {
    color: var(--accent-color);
    font-size: 0.8rem;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    background: var(--sage-soft);
    padding: 0.35rem 0.8rem;
    color: var(--sage-dark);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.badge-gold {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    background: var(--terracotta-soft);
    padding: 0.35rem 0.8rem;
    color: var(--logo-subtitle-color);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.step-card,
.role-card {
    height: 100%;
    border: 1px solid var(--glass-border);
    border-radius: 1.8rem;
    background: rgba(255, 255, 255, 0.72);
    padding: 1.6rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 999px;
    background: var(--primary-color);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
}

.role-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    background: var(--secondary-color);
    color: var(--accent-color);
    font-size: 1.2rem;
}

.field-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.field-input {
    width: 100%;
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    background: var(--field-bg);
    padding: 0.75rem 1rem;
    color: var(--text-color);
    font-family: var(--font-body);
}

.field-input::placeholder {
    color: var(--text-muted);
}

.field-input:focus {
    border-color: var(--accent-color);
    outline: none;
}

.city-suggest {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.4rem);
    z-index: 30;
    max-height: 14rem;
    overflow-y: auto;
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    background: #FFFFFF;
    box-shadow: var(--shadow-soft);
    padding: 0.35rem;
}

.city-suggest.is-open {
    display: block;
}

.city-suggest-item {
    display: block;
    width: 100%;
    min-height: 2.6rem;
    border: 0;
    border-radius: 0.75rem;
    background: transparent;
    padding: 0.55rem 0.8rem;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 200ms ease;
}

.city-suggest-item:hover,
.city-suggest-item:focus-visible {
    background: var(--secondary-color);
    outline: none;
}

.form-status.success {
    color: #14724A;
}

.form-status.error {
    color: #B5392E;
}

.cart-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--glass-bg);
    color: var(--text-color);
    transition: all 300ms ease;
}

.cart-button:hover {
    border-color: var(--accent-color);
    background: var(--secondary-color);
}

.cart-badge {
    position: absolute;
    top: -0.35rem;
    right: -0.35rem;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-align: center;
}

.sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    overflow-y: auto;
    background: rgba(15, 33, 56, 0.38);
    padding: 1rem;
}

.sheet-overlay.is-open {
    display: block;
}

.sheet-panel {
    min-height: calc(100vh - 2rem);
    border-radius: 2.4rem;
    background: var(--background-color);
    box-shadow: 0 30px 90px rgba(11, 46, 111, 0.26);
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

@media (max-width: 767px) {
    .section-kicker::before {
        width: 1.6rem;
    }

    .brand-logo {
        height: 4.2rem;
        max-width: 4.2rem;
    }

    .brand-name {
        font-size: 1.15rem;
        letter-spacing: 0.16em;
    }

    .brand-tagline {
        font-size: 0.78rem;
    }

    .frame-tall {
        height: 420px;
        min-height: 0;
    }

    .account-text {
        display: none;
    }
}

.account-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--glass-border);
    border-radius: 1.2rem;
    background: var(--glass-bg);
    color: var(--text-color);
    transition: all 300ms ease;
}

.account-button:hover,
.account-button.is-open {
    border-color: var(--accent-color);
    background: var(--secondary-color);
}

.account-button:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.account-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.3rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 1rem;
}

.account-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    object-fit: cover;
}

.account-cart-badge {
    position: absolute;
    top: -0.55rem;
    right: 60%;
    z-index: 3;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: var(--button-color);
    color: var(--text-color);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.5rem;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(11, 46, 111, 0.32);
}

.account-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.15;
}

.account-name {
    max-width: 9.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-color);
    font-size: 0.76rem;
    font-weight: 700;
}

.account-role {
    max-width: 9.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.account-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.6rem);
    z-index: 70;
    width: 17rem;
    max-width: calc(100vw - 2rem);
    padding: 0.6rem;
    border: 1px solid var(--glass-border);
    border-radius: 1.4rem;
    background: #ffffff;
    box-shadow: 0 26px 70px rgba(11, 46, 111, 0.2);
}

.account-menu-head {
    padding: 0.55rem 0.7rem 0.35rem;
}

.account-menu-name {
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    word-break: break-word;
}

.account-menu-role {
    margin-top: 0.15rem;
    color: var(--sage-dark);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.account-menu-email {
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-size: 0.74rem;
    line-height: 1.5;
    word-break: break-word;
}

.account-menu-pending {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.4rem;
    border-radius: 999px;
    background: var(--terracotta-soft);
    padding: 0.2rem 0.6rem;
    color: var(--logo-subtitle-color);
    font-size: 0.66rem;
    font-weight: 700;
}

.account-menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    min-height: 2.7rem;
    padding: 0.5rem 0.7rem;
    border: 0;
    border-radius: 0.9rem;
    background: transparent;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 200ms ease;
}

.account-menu-item:hover {
    background: var(--secondary-color);
}

.account-menu-item.is-primary {
    justify-content: center;
    background: var(--primary-color);
    color: #ffffff;
}

.account-menu-item.is-primary:hover {
    background: var(--primary-hover);
    color: var(--text-color);
}

.account-menu-divider {
    height: 1px;
    margin: 0.45rem 0.4rem;
    background: var(--glass-border);
}

.dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 75;
    display: none;
    overflow-y: auto;
    background: rgba(15, 33, 56, 0.42);
    padding: 1rem;
}

.dialog-overlay.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog-panel {
    width: 100%;
    max-width: 30rem;
    margin: auto;
    border-radius: 2rem;
    background: var(--background-color);
    box-shadow: 0 30px 90px rgba(11, 46, 111, 0.26);
    padding: clamp(1.4rem, 4vw, 2rem);
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    padding: 0.3rem;
    border-radius: 1.1rem;
    background: var(--secondary-color);
}

.auth-tab {
    min-height: 2.6rem;
    border: 0;
    border-radius: 0.85rem;
    background: transparent;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 200ms ease;
}

.auth-tab.is-active {
    background: #ffffff;
    color: var(--primary-color);
    box-shadow: 0 6px 18px rgba(11, 46, 111, 0.12);
}

.auth-note {
    border-radius: 1.1rem;
    background: var(--secondary-color);
    padding: 0.85rem 1rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.6;
}

.calendar-value {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
}

.calendar-value.is-filled {
    color: var(--text-color);
    font-weight: 700;
}

.calendar-pop {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 0.5rem);
    z-index: 50;
    width: 19.5rem;
    max-width: calc(100vw - 2rem);
    padding: 0.9rem;
    border: 1px solid var(--glass-border);
    border-radius: 1.3rem;
    background: #ffffff;
    box-shadow: 0 26px 70px rgba(11, 46, 111, 0.2);
}

.calendar-pop.is-open {
    display: block;
}

.calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.calendar-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border: 1px solid var(--glass-border);
    border-radius: 0.8rem;
    background: var(--surface-color);
    color: var(--text-color);
    cursor: pointer;
    transition: background 200ms ease;
}

.calendar-nav:hover {
    background: var(--secondary-color);
}

.calendar-selects {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.calendar-select {
    border: 1px solid var(--glass-border);
    border-radius: 0.7rem;
    background: var(--field-bg);
    padding: 0.4rem 0.5rem;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.calendar-weekdays,
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.25rem;
}

.calendar-weekdays {
    margin-top: 0.85rem;
}

.calendar-weekday {
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.calendar-days {
    margin-top: 0.35rem;
}

.calendar-day {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.2rem;
    border: 0;
    border-radius: 0.7rem;
    background: transparent;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease;
}

.calendar-day:hover {
    background: var(--secondary-color);
}

.calendar-day.is-empty {
    visibility: hidden;
    pointer-events: none;
}

.calendar-day.is-today {
    box-shadow: inset 0 0 0 1px var(--accent-color);
}

.calendar-day.is-selected {
    background: var(--primary-color);
    color: #ffffff;
}