/* Sign-in / registration — uses theme CSS variables from storefront-head */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-page-bg, #f6f5f3);
    color: var(--color-text, #1a1a1a);
}

.auth-page-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 10% 0%, color-mix(in srgb, var(--color-primary, #1a1a1a) 12%, transparent), transparent),
        radial-gradient(ellipse 60% 40% at 90% 100%, color-mix(in srgb, var(--color-secondary, #888) 15%, transparent), transparent);
    z-index: 0;
}

.auth-page-header {
    position: relative;
    z-index: 1;
    padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem);
}

.auth-page-logo {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--color-primary, #2563eb);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.auth-page-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem clamp(1rem, 4vw, 2rem) 3rem;
    position: relative;
    z-index: 1;
}

.auth-card-wrap {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e8e6e3);
    border-radius: var(--radius-card, 16px);
    box-shadow: var(--shadow-card, 0 16px 48px rgba(0, 0, 0, 0.08));
    padding: 2rem 1.75rem;
}

.auth-card--wide {
    max-width: 520px;
}

.auth-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.auth-card-lead {
    color: color-mix(in srgb, var(--color-text, #333) 65%, transparent);
    font-size: 0.9375rem;
    margin: 0 0 1.5rem;
}

.auth-alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.auth-alert--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-alert--success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.auth-alert--info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.auth-field {
    margin-bottom: 0.85rem;
}

.auth-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--color-text, #333);
}

.auth-field input,
.auth-field select,
.auth-field textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--color-border, #ddd);
    border-radius: 10px;
    font: inherit;
    background: var(--color-surface, #fff);
    color: var(--color-text, #1a1a1a);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
    outline: none;
    border-color: var(--color-primary, #1a1a1a);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary, #1a1a1a) 18%, transparent);
}

.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 480px) {
    .auth-row {
        grid-template-columns: 1fr;
    }
}

.auth-account-type {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.auth-type-option {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.auth-type-option:has(input:checked) {
    border-color: var(--color-primary, #1a1a1a);
    background: color-mix(in srgb, var(--color-primary, #1a1a1a) 6%, var(--color-surface, #fff));
}

.auth-type-option input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.auth-type-option strong {
    display: block;
    font-size: 0.9375rem;
}

.auth-type-option span {
    font-size: 0.8125rem;
    color: color-mix(in srgb, var(--color-text, #555) 70%, transparent);
}

.auth-business-panel {
    display: none;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--color-border, #ddd);
}

.auth-business-panel.is-open {
    display: block;
}

.auth-section-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 1.25rem 0 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border, #e8e6e3);
}

.auth-submit {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    background: var(--color-primary, #1a1a1a);
    color: var(--color-primary-contrast, #fff);
    transition: opacity 0.15s, transform 0.1s;
}

.auth-submit:hover {
    opacity: 0.92;
}

.auth-footer-link {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.875rem;
}

.auth-footer-link a {
    color: var(--color-primary, #1a1a1a);
    font-weight: 600;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
