/* Auth pages — login & register (aligned with customer dashboard) */

@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap");

:root {
    --font-body: "Manrope", system-ui, -apple-system, sans-serif;
    --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
    --dash-navy: #1e3653;
    --dash-navy-deep: #162a40;
    --dash-gold: #c9a962;
    --dash-gold-soft: rgba(201, 169, 98, 0.18);
    --dash-surface: #ffffff;
    --dash-surface-warm: #f8f6f2;
    --dash-border: rgba(30, 54, 83, 0.1);
    --dash-shadow: 0 18px 40px -28px rgba(22, 42, 64, 0.35);
    --dash-muted: #5c6b7e;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

.auth-page {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    padding-top: 3.5rem;
    padding-bottom: 2rem;
    position: relative;
    font-family: var(--font-body);
    color: var(--dash-navy-deep);
    background: linear-gradient(180deg, var(--dash-surface-warm) 0%, #ffffff 14rem);
}

.auth-skip {
    position: absolute;
    left: -9999px;
    top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--dash-navy-deep);
    color: #fff;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    z-index: 2;
}

.auth-skip:focus {
    left: 0.75rem;
    outline: 2px solid var(--dash-gold);
    outline-offset: 2px;
}

.auth-back {
    position: absolute;
    top: 1.1rem;
    left: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--dash-muted);
    text-decoration: none;
    z-index: 1;
    transition: color 0.15s ease;
}

.auth-back:hover {
    color: var(--dash-navy);
}

.auth-back i {
    font-size: 0.82em;
    opacity: 0.85;
}

.auth-card--wide {
    max-width: 520px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    margin-top: auto;
    margin-bottom: auto;
    flex-shrink: 0;
    background: var(--dash-surface);
    border-radius: 16px;
    padding: 2.15rem 1.85rem 1.85rem;
    box-shadow: var(--dash-shadow), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
    border: 1px solid var(--dash-border);
    border-top: 3px solid var(--dash-gold);
}

.auth-brand {
    margin: 0 0 0.45rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--dash-gold);
    text-align: center;
}

.auth-title {
    margin: 0 0 0.45rem;
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 4vw, 1.85rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--dash-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    text-align: center;
}

.auth-title__icon {
    font-size: 1.05rem;
    color: var(--dash-gold);
    font-weight: 400;
}

.auth-lede {
    margin: 0 0 1.35rem;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--dash-muted);
    text-align: center;
}

.auth-messages {
    margin-bottom: 1rem;
}

.auth-message {
    margin: 0 0 0.5rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.45;
    border: 1px solid transparent;
}

.auth-message:last-child {
    margin-bottom: 0;
}

.auth-message--info {
    background: rgba(30, 54, 83, 0.06);
    color: var(--dash-navy);
    border-color: rgba(30, 54, 83, 0.14);
}

.auth-message--success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.auth-message--warning {
    background: #fffbeb;
    color: #92400e;
    border-color: rgba(201, 169, 98, 0.45);
}

.auth-message--error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.auth-messages > p:not(.auth-message) {
    margin: 0 0 0.5rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.45;
    background: rgba(30, 54, 83, 0.06);
    color: var(--dash-navy);
    border: 1px solid rgba(30, 54, 83, 0.14);
}

.auth-messages > p:not(.auth-message):last-child {
    margin-bottom: 0;
}

.auth-nonfield ul.errorlist {
    margin: 0;
    padding: 0.65rem 0.85rem;
    list-style: none;
    font-size: 0.88rem;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
}

.auth-nonfield ul.errorlist li + li {
    margin-top: 0.35rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form > p {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.auth-form > p[hidden] {
    display: none !important;
}

.auth-form label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dash-navy);
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="tel"],
.auth-form select,
.auth-form textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1.45;
    border: 1px solid rgba(30, 54, 83, 0.18);
    border-radius: 10px;
    background: var(--dash-surface-warm);
    color: var(--dash-navy-deep);
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease;
}

.auth-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231e3653' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    padding-right: 2.25rem;
}

.auth-form input::placeholder {
    color: #94a3b8;
}

.auth-form input:hover,
.auth-form select:hover,
.auth-form textarea:hover {
    border-color: rgba(30, 54, 83, 0.28);
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    outline: none;
    border-color: rgba(201, 169, 98, 0.55);
    background: #fff;
    box-shadow: 0 0 0 3px var(--dash-gold-soft);
}

.auth-form .helptext,
.auth-form ul.helptext {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.8rem;
    color: #7b8a9a;
    line-height: 1.4;
}

.auth-form ul.errorlist {
    margin: 0;
    padding: 0.5rem 0.65rem;
    list-style: none;
    font-size: 0.82rem;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
}

.auth-form ul.errorlist li + li {
    margin-top: 0.25rem;
}

.auth-form button[type="submit"] {
    margin-top: 0.35rem;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.03em;
    color: #fff;
    background: linear-gradient(180deg, var(--dash-navy) 0%, var(--dash-navy-deep) 100%);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 10px 24px -14px rgba(22, 42, 64, 0.55);
    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.1s ease;
}

.auth-form button[type="submit"]:hover {
    background: linear-gradient(180deg, #243f5c 0%, var(--dash-navy) 100%);
    box-shadow: 0 14px 28px -12px rgba(22, 42, 64, 0.45);
}

.auth-form button[type="submit"]:active {
    transform: translateY(1px);
}

.auth-form button[type="submit"]:focus-visible {
    outline: 2px solid var(--dash-gold);
    outline-offset: 2px;
}

.auth-forgot-password {
    display: block;
    margin: 0.85rem 0 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dash-muted);
    text-decoration: none;
    text-align: center;
}

.auth-forgot-password:hover {
    color: var(--dash-navy);
}

.auth-forgot-password:focus-visible {
    outline: 2px solid var(--dash-gold);
    outline-offset: 2px;
    border-radius: 4px;
}

.auth-switch {
    margin: 1.35rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--dash-gold-soft);
    font-size: 0.9rem;
    color: var(--dash-muted);
    text-align: center;
}

.auth-switch a {
    color: var(--dash-navy);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(201, 169, 98, 0.55);
    transition:
        color 0.15s ease,
        border-color 0.15s ease;
}

.auth-switch a:hover {
    color: var(--dash-navy-deep);
    border-bottom-color: var(--dash-gold);
}

.auth-switch a:focus-visible {
    outline: 2px solid var(--dash-gold);
    outline-offset: 2px;
    border-radius: 4px;
}

.auth-switch--follow {
    margin-top: 0.75rem;
    padding-top: 0;
    border-top: none;
}

.auth-agree {
    margin: 0.25rem 0 0;
}

.auth-agree__label {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0;
    color: var(--dash-navy);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.45;
    cursor: pointer;
}

.auth-agree__label input[type="checkbox"] {
    width: auto;
    min-width: 1.05rem;
    min-height: 1.05rem;
    margin-top: 0.15rem;
    flex: 0 0 auto;
    accent-color: var(--dash-gold);
}

.auth-agree__label a {
    color: var(--dash-navy);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.auth-agree__label a:hover {
    color: var(--dash-gold-deep, #ad8d45);
}

.auth-legal {
    margin-top: 1.5rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--dash-gold-soft);
    text-align: center;
}

.auth-legal__note {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--dash-muted);
}

.auth-legal__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-legal__links a {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--dash-muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition:
        color 0.15s ease,
        border-color 0.15s ease;
}

.auth-legal__links a:hover {
    color: var(--dash-navy);
    border-bottom-color: rgba(201, 169, 98, 0.55);
}

.auth-legal__links a:focus-visible {
    outline: 2px solid var(--dash-gold);
    outline-offset: 2px;
    border-radius: 4px;
}

.auth-back:focus-visible {
    outline: 2px solid var(--dash-gold);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (max-width: 480px) {
    .auth-page {
        padding: 1.15rem;
        padding-top: 3.25rem;
    }

    .auth-card {
        padding: 1.65rem 1.25rem 1.45rem;
        border-radius: 14px;
    }

    .auth-title {
        font-size: 1.4rem;
    }
}
