/* Login modal + signup / account pages */
.auth-modal[hidden] {
    display: none !important;
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}

.auth-modal__dialog {
    width: min(100%, 420px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.auth-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 88%, #0f172a), color-mix(in srgb, var(--secondary) 85%, #111827));
    color: #fff;
}

.auth-modal__head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.auth-modal__close {
    border: 0;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.auth-modal__close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.auth-modal__body {
    padding: 20px 18px 22px;
}

.auth-modal__body label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.auth-modal__body input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 14px;
    box-sizing: border-box;
}

.auth-modal__body .error {
    color: #b91c1c;
    font-size: 13px;
    margin-top: -10px;
    margin-bottom: 12px;
}

.auth-modal__submit {
    width: 100%;
    padding: 12px;
    border: 0;
    border-radius: 8px;
    font-weight: 800;
    font-size: 15px;
    color: #fff;
    background: var(--button);
    cursor: pointer;
    margin-top: 4px;
}

.auth-modal__submit:hover {
    filter: brightness(1.05);
}

.auth-modal__footer {
    text-align: center;
    padding: 0 18px 18px;
    font-size: 14px;
    color: #64748b;
}

.auth-modal__footer a {
    color: var(--button);
    font-weight: 700;
    text-decoration: none;
}

.auth-modal__footer a:hover {
    text-decoration: underline;
}

/* Signup page two-column card */
.signup-page {
    background: #f1f5f9;
    min-height: 100vh;
}

.signup-hero {
    position: relative;
    padding: 48px 0 32px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
}

.signup-hero--banner {
    background-size: cover;
    background-position: center;
}

.signup-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
}

.signup-hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.signup-hero h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
}

.signup-breadcrumb {
    font-size: 14px;
    background: rgba(255, 255, 255, 0.12);
    padding: 10px 16px;
    border-radius: 999px;
}

.signup-breadcrumb a {
    color: #fff;
    text-decoration: none;
}

.signup-breadcrumb a:hover {
    text-decoration: underline;
}

.signup-card {
    max-width: 920px;
    margin: 0 auto 48px;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    border: 1px solid #e2e8f0;
}

.signup-card__aside {
    background: linear-gradient(180deg, color-mix(in srgb, var(--button) 92%, #0f172a), color-mix(in srgb, var(--primary) 75%, #0f172a));
    color: #fff;
    padding: 36px 28px;
}

.signup-card__aside h2 {
    margin: 0 0 24px;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
}

.signup-feature {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.signup-feature__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 20px;
}

.signup-feature strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.signup-feature p {
    margin: 0;
    font-size: 13px;
    opacity: 0.92;
    line-height: 1.45;
}

.signup-card__form {
    background: #fff;
    padding: 36px 32px 40px;
}

.signup-card__form h1 {
    margin: 0 0 22px;
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
}

.signup-card__form label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}

.signup-card__form input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.signup-card__form .mb-0 {
    margin-bottom: 0;
}

.signup-card__form .error {
    color: #b91c1c;
    font-size: 13px;
    margin-top: -12px;
    margin-bottom: 14px;
}

.signup-card__form button[type="submit"] {
    width: 100%;
    padding: 14px;
    border: 0;
    border-radius: 8px;
    font-weight: 800;
    font-size: 16px;
    color: #fff;
    background: var(--button);
    cursor: pointer;
    margin-top: 8px;
}

.signup-card__form .signup-foot {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: #64748b;
}

.signup-card__form .signup-foot a {
    color: var(--button);
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 768px) {
    .signup-card {
        grid-template-columns: 1fr;
    }
}

/* My account */
.account-app {
    background: #f8fafc;
    min-height: 100vh;
    padding-bottom: 48px;
}

.account-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 16px 0;
}

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

.account-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.account-profile-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.account-profile-card__avatar {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--button) 15%, #f1f5f9);
    color: var(--button);
    font-weight: 800;
    font-size: 26px;
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
}

.account-profile-card h3 {
    margin: 0 0 4px;
    font-size: 17px;
    color: #0f172a;
}

.account-profile-card p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.account-nav-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.account-nav-card__head {
    padding: 12px 16px;
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    background: var(--button);
}

.account-nav-card a {
    display: block;
    padding: 12px 16px;
    color: #334155;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-top: 1px solid #f1f5f9;
}

.account-nav-card a:hover {
    background: #f8fafc;
}

.account-nav-card a.is-active {
    background: color-mix(in srgb, var(--button) 10%, #fff);
    color: var(--button);
}

.account-main-panel {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.account-main-panel__head {
    padding: 14px 18px;
    font-weight: 800;
    font-size: 16px;
    color: #fff;
    background: var(--button);
}

.account-main-panel__head--between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.account-action-link {
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: #fff;
    color: #0f766e;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.18);
}

.account-action-link:hover {
    background: #ecfeff;
}

.account-action-link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.account-main-panel__body {
    padding: 24px 18px;
    color: #475569;
    line-height: 1.6;
}

.account-main-panel__body .placeholder-note {
    padding: 28px;
    text-align: center;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
}

.address-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.address-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    background: #fff;
}

.address-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.address-type {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 4px 10px;
}

.address-default {
    font-size: 11px;
    font-weight: 700;
    color: #065f46;
    background: #d1fae5;
    border-radius: 999px;
    padding: 3px 8px;
}

.address-card p {
    margin: 0 0 4px;
    color: #1e293b;
    font-size: 14px;
    line-height: 1.4;
}

.address-card__actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.address-btn {
    border: 0;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.address-btn--edit {
    background: #059669;
    color: #fff;
}

.address-btn--delete {
    background: #b91c1c;
    color: #fff;
}

.address-modal[hidden] {
    display: none !important;
}

.address-modal {
    position: fixed;
    inset: 0;
    z-index: 220;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.address-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
}

.address-modal__dialog {
    position: relative;
    width: min(100%, 650px);
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.25);
    padding: 18px 18px 22px;
    z-index: 2;
}

.address-modal__close {
    position: absolute;
    right: 10px;
    top: 8px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #475569;
    cursor: pointer;
}

#address-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
}

#address-form label {
    display: block;
    grid-column: span 2;
    margin-bottom: -4px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

#address-form input[type='text'] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

.address-type-row {
    grid-column: span 2;
    display: flex;
    gap: 18px;
    color: #0f172a;
    font-size: 14px;
}

.address-default-check {
    grid-column: span 2;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    font-size: 14px;
}

.address-submit-btn {
    grid-column: span 2;
    justify-self: center;
    min-width: 150px;
    border: 0;
    border-radius: 8px;
    padding: 10px 18px;
    background: #059669;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 760px) {
    .address-grid {
        grid-template-columns: 1fr;
    }

    #address-form {
        grid-template-columns: 1fr;
    }

    #address-form label,
    .address-type-row,
    .address-default-check,
    .address-submit-btn {
        grid-column: span 1;
    }

    .account-main-panel__head--between {
        flex-wrap: wrap;
    }
}
