:root {
    --auth-ink: #0b0b0b;
    --auth-red: #ed1d24;
    --auth-red-dark: #9e0c24;
    --auth-navy: #121212;
    --auth-muted: #6b7280;
    --auth-line: #e7e9ee;
    --auth-bg: #f3f5f8;
    --auth-card: #ffffff;
    --auth-shadow: 0 24px 60px rgba(11, 11, 11, 0.12);
}

.auth-page {
    min-height: calc(100vh - 60px);
    background:
        radial-gradient(1200px 420px at 10% -10%, rgba(237, 29, 36, 0.12), transparent 60%),
        radial-gradient(900px 380px at 100% 0%, rgba(18, 18, 18, 0.12), transparent 55%),
        linear-gradient(180deg, #f7f8fb 0%, #eef1f6 100%);
    padding: 48px 16px 72px;
}

.auth-shell {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    background: var(--auth-card);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--auth-shadow);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.auth-brand {
    position: relative;
    padding: 48px 40px;
    color: #fff;
    background:
        linear-gradient(160deg, rgba(18, 18, 18, 0.92), rgba(42, 20, 22, 0.78) 48%, rgba(237, 29, 36, 0.78)),
        url('../images/dressland_enhanced.png') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 560px;
}

.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(18, 18, 18, 0.35) 0%, rgba(18, 18, 18, 0.82) 100%);
}

.auth-brand > * {
    position: relative;
    z-index: 1;
}

.auth-brand__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
}

.auth-brand__eyebrow span {
    width: 28px;
    height: 2px;
    background: var(--auth-red);
    display: inline-block;
}

/* style.css sets h1 { color:#111 } and p { color:#636363 } — those beat
   inherited white from .auth-brand, so force readable colors here. */
.auth-brand h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2rem, 3vw, 2.6rem);
    line-height: 1.15;
    margin: 0 0 14px;
    font-weight: 700;
    color: #fff;
}

.auth-brand p {
    margin: 0;
    max-width: 34ch;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.55;
}

.auth-panel {
    padding: 42px 40px 36px;
    display: flex;
    flex-direction: column;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: #eceef3;
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 28px;
    border: 1px solid #e2e5eb;
}

.auth-tab {
    border: 0;
    background: transparent;
    border-radius: 9px;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 0.92rem;
    color: #4b5563;
    cursor: pointer;
    transition: 0.2s ease;
}

.auth-tab:hover {
    color: var(--auth-ink);
    background: rgba(255, 255, 255, 0.55);
}

.auth-tab.active {
    background: #fff;
    color: var(--auth-ink);
    box-shadow: 0 2px 8px rgba(18, 18, 18, 0.1);
}

.auth-panel h2 {
    margin: 0 0 6px;
    font-size: 1.65rem;
    color: var(--auth-ink);
    font-weight: 800;
}

.auth-panel .auth-sub {
    margin: 0 0 24px;
    color: var(--auth-muted);
    font-size: 0.95rem;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-field {
    margin-bottom: 16px;
}

.auth-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 7px;
}

.auth-field .input-wrap {
    position: relative;
}

.auth-field .input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.9rem;
}

.auth-field input {
    width: 100%;
    border: 1.5px solid var(--auth-line);
    border-radius: 14px;
    padding: 13px 14px 13px 42px;
    font-size: 0.95rem;
    color: var(--auth-ink);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field input:focus {
    outline: none;
    border-color: rgba(237, 29, 36, 0.55);
    box-shadow: 0 0 0 4px rgba(237, 29, 36, 0.1);
}

.auth-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-actions {
    margin-top: 8px;
}

.auth-btn {
    width: 100%;
    border: 0;
    border-radius: 999px;
    padding: 14px 18px;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: 0.2s ease;
}

.auth-btn-primary {
    background: var(--auth-red);
    color: #fff;
    box-shadow: 0 12px 24px rgba(237, 29, 36, 0.28);
}

.auth-btn-primary:hover {
    background: var(--auth-red-dark);
    transform: translateY(-1px);
}

.auth-btn-primary:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

.auth-btn-ghost {
    background: transparent;
    color: var(--auth-navy);
    font-weight: 700;
    border: 0;
    padding: 10px;
    cursor: pointer;
}

.auth-alert {
    display: none;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    line-height: 1.45;
}

.auth-alert.show {
    display: block;
}

.auth-alert.error {
    background: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
}

.auth-alert.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.auth-alert.info {
    background: #eff6ff;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
}

.otp-boxes {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin: 8px 0 18px;
}

.otp-boxes input {
    width: 100%;
    height: 54px;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;
    border: 1.5px solid var(--auth-line);
    border-radius: 12px;
    color: var(--auth-ink);
}

.otp-boxes input:focus {
    outline: none;
    border-color: var(--auth-red);
    box-shadow: 0 0 0 4px rgba(237, 29, 36, 0.12);
}

.auth-meta {
    margin-top: 18px;
    text-align: center;
    color: var(--auth-muted);
    font-size: 0.9rem;
}

.auth-meta a,
.auth-meta button {
    color: var(--auth-red);
    font-weight: 700;
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0;
}

.auth-debug {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px dashed #fdba74;
    color: #9a3412;
    font-size: 0.85rem;
    display: none;
}

.auth-debug.show {
    display: block;
}

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

    .auth-brand {
        min-height: 220px;
        padding: 28px 24px;
    }

    .auth-panel {
        padding: 28px 22px 30px;
    }

    .auth-field-row {
        grid-template-columns: 1fr;
    }
}
