/* ════════════════════════════════════════════════════════════════
   Auth / Identity Pages  — Modern Split-Panel Design
   ════════════════════════════════════════════════════════════════ */

/* ── Root wrapper ──────────────────────────────────────────────── */
.auth-root {
    display: flex;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    background: #f9fafb;
}

/* ── Centered-only layout (no left panel) ──────────────────────── */
.auth-root-centered {
    background: #f3f4f6;
    justify-content: center;
    align-items: center;
}

.auth-panel-center {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.auth-center-logo {
    display: flex;
    justify-content: center;
    padding: 2.5rem 2rem 0;
}

.auth-center-logo img {
    height: 2.25rem;
    width: auto;
}

.auth-root-centered .auth-form-scroll {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-root-centered .auth-form-area {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 1.25rem;
    padding: 2.5rem 2.5rem 2rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
}

/* ── Left branding panel ───────────────────────────────────────── */
.auth-panel-left {
    position: relative;
    width: 42%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: linear-gradient(145deg, #0d1b2a 0%, #1a2f46 50%, #0d1b2a 100%);
    flex-shrink: 0;
}

/* Tinted overlay using primary brand color */
.auth-panel-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg,
        color-mix(in srgb, var(--auth-brand, #13a4ec) 18%, transparent) 0%,
        color-mix(in srgb, var(--auth-brand, #13a4ec) 8%, transparent) 100%);
    pointer-events: none;
}

.auth-panel-inner {
    position: relative;
    z-index: 2;
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    height: 100%;
    justify-content: center;
}

/* Brand logo inside left panel */
.auth-brand-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    position: absolute;
    top: 2.5rem;
    left: 3rem;
}

.auth-brand-logo img {
    height: 2.25rem;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.auth-brand-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.04em;
}

/* Headline */
.auth-panel-headline h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.04em;
    margin: 0 0 1rem 0;
}

.auth-panel-headline p {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
    line-height: 1.6;
}

/* Feature bullets */
.auth-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    color: rgba(255, 255, 255, 0.80);
    font-size: 0.9375rem;
    font-weight: 500;
}

.auth-feature-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.auth-feature-icon svg {
    width: 0.875rem;
    height: 0.875rem;
}

/* Decorative orbs */
.auth-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.auth-orb-1 {
    width: 22rem;
    height: 22rem;
    top: -6rem;
    right: -8rem;
    background: radial-gradient(circle, color-mix(in srgb, var(--auth-brand, #13a4ec) 30%, transparent) 0%, transparent 70%);
}

.auth-orb-2 {
    width: 18rem;
    height: 18rem;
    bottom: -5rem;
    left: -6rem;
    background: radial-gradient(circle, color-mix(in srgb, var(--auth-brand, #13a4ec) 20%, transparent) 0%, transparent 70%);
}

.auth-orb-3 {
    width: 10rem;
    height: 10rem;
    bottom: 30%;
    right: 10%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
}

/* ── Right form panel ──────────────────────────────────────────── */
.auth-panel-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #fff;
}

.auth-mobile-logo {
    display: none;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f3f4f6;
}

.auth-mobile-site-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color, #13a4ec);
    text-decoration: none;
    letter-spacing: -0.03em;
}

.auth-form-scroll {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}

.auth-form-area {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Back to home link */
.auth-back-home {
    padding: 1.25rem 2rem 2rem;
    text-align: center;
}

.auth-back-home a {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-secondary, #9ca3af);
    font-size: 0.8125rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
    white-space: nowrap;
}

.auth-back-home a:hover {
    color: var(--primary-color, #13a4ec);
}

/* ── Auth page content (rendered by each page) ─────────────────── */

/* Page heading */
.auth-heading {
    margin-bottom: 2rem;
}

.auth-heading h2 {
    font-size: 1.875rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-main, #0d171b);
    margin: 0 0 0.375rem 0;
    line-height: 1.2;
}

.auth-heading p {
    font-size: 0.9375rem;
    color: var(--text-secondary, #6b7280);
    margin: 0;
    line-height: 1.5;
}

/* ── Form elements ─────────────────────────────────────────────── */
.auth-field {
    margin-bottom: 1.125rem;
}

.auth-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-main, #374151);
    margin-bottom: 0.4rem;
}

.auth-input-wrap {
    position: relative;
}

.auth-input {
    width: 100%;
    height: 2.875rem;
    padding: 0 1rem;
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.625rem;
    color: var(--text-main, #111827);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.auth-input:focus {
    border-color: var(--primary-color, #13a4ec);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color, #13a4ec) 12%, transparent);
}

.auth-input::placeholder {
    color: #9ca3af;
}

.auth-input[readonly] {
    background: #f9fafb;
    color: #6b7280;
}

/* Password toggle button */
.auth-eye-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.auth-eye-btn:hover { color: #6b7280; }

.auth-input.has-eye { padding-right: 2.75rem; }

/* Validation */
.auth-field-error {
    display: block;
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 0.3rem;
}

.auth-validation-summary {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.625rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
    color: #b91c1c;
    line-height: 1.5;
}

.auth-validation-summary:empty,
.auth-validation-summary:has(ul:empty) {
    display: none;
}

/* Remember me + forgot row */
.auth-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-check-input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-color, #13a4ec);
    cursor: pointer;
}

.auth-check-label {
    font-size: 0.8125rem;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    user-select: none;
}

.auth-forgot {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary-color, #13a4ec);
    text-decoration: none;
    transition: opacity 0.15s;
}

.auth-forgot:hover { opacity: 0.75; }

/* Primary submit button */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 3rem;
    border: none;
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    text-decoration: none;
}

.auth-btn:active { transform: scale(0.985); }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-btn-primary {
    background: var(--primary-color, #13a4ec);
    color: #fff;
}

.auth-btn-primary:hover { opacity: 0.88; }

/* External login (e.g. Google) */
.auth-btn-external {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    color: #374151;
    gap: 0.75rem;
}

.auth-btn-external:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin: 1.25rem 0;
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid #e5e7eb;
}

/* Footer link (sign up / sign in prompt) */
.auth-footer {
    margin-top: 1.75rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary, #6b7280);
    padding-top: 1.5rem;
    border-top: 1px solid #f3f4f6;
}

.auth-footer a {
    font-weight: 600;
    color: var(--primary-color, #13a4ec);
    text-decoration: none;
}

.auth-footer a:hover { text-decoration: underline; }

/* ── Confirmation / Success pages ──────────────────────────────── */
.auth-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 2rem 0;
}

.auth-success-icon {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-success-icon.green {
    background: #dcfce7;
    color: #16a34a;
}

.auth-success-icon.red {
    background: #fee2e2;
    color: #dc2626;
}

.auth-success-icon svg { width: 2rem; height: 2rem; }

.auth-success h2 {
    font-size: 1.625rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main, #111827);
    margin: 0;
}

.auth-success p {
    font-size: 0.9375rem;
    color: var(--text-secondary, #6b7280);
    margin: 0;
    line-height: 1.6;
    max-width: 22rem;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .auth-panel-left {
        display: none;
    }

    .auth-panel-right {
        min-height: 100vh;
    }

    .auth-mobile-logo {
        display: flex;
        align-items: center;
    }

    .auth-form-scroll {
        padding: 2rem 1.5rem;
        align-items: flex-start;
        padding-top: 2.5rem;
    }

    .auth-root-centered {
        align-items: flex-start;
    }

    .auth-root-centered .auth-form-scroll {
        padding: 1.5rem 1rem;
        align-items: flex-start;
    }

    .auth-root-centered .auth-form-area {
        padding: 2rem 1.5rem 1.5rem;
        border-radius: 1rem;
    }
}

/* Backward-compat aliases so old .identity-* classes still work */
.identity-validation-summary {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.625rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
    color: #b91c1c;
    line-height: 1.5;
}
.identity-validation-summary:empty { display: none; }
.identity-validation-error { display: block; font-size: .75rem; color: #ef4444; margin-top: .3rem; }
