/* Extracted from templates/auth/_auth_base.html (issue #677). */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    height: 100dvh;
    display: flex;
    background: #fff;
    color: #0f172a;
}

/* ── Debug banner ── */
.debug-banner {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
    background: #f59e0b; color: #000; text-align: center;
    padding: 0.35rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em;
}

/* ── Left brand panel ── */
.brand-panel {
    width: 520px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 2.75rem 3rem 2.5rem;
    position: relative;
    overflow: hidden;
    background: #0a1020;
}

.brand-panel-photo {
    position: absolute;
    inset: 0;
    background: url('/static/img/soccer_uniform_organizer_bag_view.webp') center center / cover no-repeat;
    z-index: 0;
}

.brand-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8,14,30,0.97) 0%, rgba(8,14,30,0.72) 50%, rgba(8,14,30,0.45) 100%);
    z-index: 1;
    pointer-events: none;
}

.brand-panel::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #10b981, transparent);
    z-index: 2;
}

.brand-logo {
    position: relative;
    z-index: 2;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    margin-bottom: auto;
}

.brand-main { position: relative; z-index: 2; }

.brand-headline {
    font-size: 2.875rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin-bottom: 0.875rem;
}

.brand-headline em {
    font-style: normal;
    color: #10b981;
}

.brand-sub {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.4);
    line-height: 1.65;
    margin-bottom: 2.25rem;
}

.brand-benefits { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; }

.brand-benefit {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.8375rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.45;
}

.benefit-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.benefit-dot svg { width: 9px; height: 9px; stroke: #10b981; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.brand-footer {
    position: relative;
    z-index: 2;
    margin-top: 2.5rem;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.18);
    letter-spacing: 0.04em;
}

/* ── Right form panel ── */
.form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7rem 3.5rem 1rem;
    overflow-y: auto;
    background: #fff;
}

.form-wrap {
    width: 100%;
    max-width: 500px;
    min-height: 620px;
}

/* ── Form elements ── */
.form-title {
    font-size: 1.625rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.03em;
    margin-bottom: 1.75rem;
}

.form-sub {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-top: -1.25rem;
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

.form-sub a { color: #0f172a; font-weight: 600; text-decoration: none; }
.form-sub a:hover { text-decoration: underline; }

.field { margin-bottom: 1.25rem; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }

label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

label .opt { font-weight: 400; color: #c7d2da; }

input[type=text],
input[type=email],
input[type=password],
input[type=tel],
input[type=number],
textarea {
    width: 100%;
    padding: 0.6875rem 0.9375rem;
    border: 1px solid #e8edf2;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #0f172a;
    background: #fff;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
}

input:focus, textarea:focus {
    border-color: #0f172a;
    box-shadow: 0 0 0 3px rgba(15,23,42,0.06);
}

input::placeholder, textarea::placeholder { color: #c7d2da; }

textarea { resize: vertical; min-height: 90px; line-height: 1.55; }

.social-row { display: grid; grid-template-columns: 1fr 130px; gap: 0.625rem; }

.handle-wrap { position: relative; }
.handle-prefix {
    position: absolute;
    left: 0.9375rem;
    top: 50%;
    transform: translateY(-50%);
    color: #c7d2da;
    font-size: 0.9rem;
    pointer-events: none;
}
.handle-wrap input { padding-left: 1.5625rem; }

/* ── Select ── */
select {
    width: 100%;
    padding: 0.6875rem 0.9375rem;
    border: 1px solid #e8edf2;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #0f172a;
    background: #fff;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    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='%23c7d2da' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9375rem center;
}
select:focus { border-color: #0f172a; box-shadow: 0 0 0 3px rgba(15,23,42,0.06); }

/* ── Radio group ── */
.radio-group { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.125rem; }

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e8edf2;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
    font-weight: 400;
    transition: border-color 0.15s, background 0.15s;
    margin-bottom: 0;
}
.radio-option:hover { border-color: #cbd5e1; background: #fafbfc; }
.radio-option.selected { border-color: #0f172a; background: #f8fafc; color: #0f172a; font-weight: 500; }
.radio-option input[type=radio] { accent-color: #0f172a; width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }

/* ── Google button ── */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.6875rem 1rem;
    border: 1px solid #e8edf2;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
    margin-bottom: 1.25rem;
}

.google-btn:hover { border-color: #cbd5e1; background: #fafbfc; }
.google-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Divider ── */
.divider {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1.5rem;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #f1f5f9;
}

.divider span {
    font-size: 0.75rem;
    color: #c7d2da;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ── Step indicator ── */
.step-dots {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2.25rem;
}

.step-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #e8edf2;
    transition: all 0.2s;
}

.step-dot.active { background: #0f172a; width: 22px; border-radius: 3px; }
.step-dot.done { background: #10b981; }

.step-line { height: 1px; width: 28px; background: #e8edf2; }

/* ── Primary button ── */
.btn-primary {
    width: 100%;
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.8125rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    margin-top: 0.5rem;
    letter-spacing: -0.01em;
}

.btn-primary:hover { opacity: 0.87; }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Error box ── */
.error-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}
.error-box p { color: #b91c1c; font-size: 0.825rem; line-height: 1.5; }

/* ── Success box ── */
.success-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}
.success-box p { color: #166534; font-size: 0.825rem; line-height: 1.5; }

/* ── Footer note ── */
.form-footer {
    margin-top: 2rem;
    font-size: 0.8125rem;
    color: #94a3b8;
    text-align: center;
    line-height: 1.6;
}
.form-footer a { color: #64748b; text-decoration: none; font-weight: 500; }
.form-footer a:hover { color: #0f172a; }

.form-footer .apply-link {
    display: block;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.875rem;
    color: #0f172a;
    font-weight: 600;
}

/* ── Error alert (floating) ── */
.error-alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-16px);
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 0.875rem 1.25rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    z-index: 9999;
    display: none;
    max-width: 90%;
    width: 400px;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
}
.error-alert.show { display: block; opacity: 1; transform: translateX(-50%) translateY(0); }
.error-alert-content { display: flex; align-items: center; gap: 0.75rem; }
.error-alert-message { flex: 1; font-weight: 500; font-size: 0.875rem; }
.error-alert-close { background: none; border: none; color: #991b1b; font-size: 1.25rem; cursor: pointer; padding: 0; line-height: 1; }

/* ── Mobile ── */
@media (max-width: 1000px) {
    body { flex-direction: column; height: auto; min-height: 100dvh; }

    .brand-panel {
        width: 100%;
        min-height: 88px;
        padding: 1.125rem 1.375rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .brand-panel::before {
        background: linear-gradient(to right, rgba(8,14,30,0.9) 0%, rgba(8,14,30,0.6) 100%);
    }

    .brand-main, .brand-benefits, .brand-sub, .brand-footer { display: none; }
    .brand-logo { margin-bottom: 0; font-size: 0.8125rem; color: rgba(255,255,255,0.8); }

    .mobile-secondary {
        font-size: 0.8125rem;
        color: rgba(255,255,255,0.55);
        text-decoration: none;
        position: relative;
        z-index: 2;
    }

    .form-panel { padding: 2rem 1.5rem; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
    .field-row > * { margin-bottom: 1.25rem; }
    .field-row > *:last-child { margin-bottom: 0; }
}

@media (min-width: 1001px) { .mobile-secondary { display: none; } }
