﻿/* ===============================================================
   Project Brain  Auth-Specific Styles
   Global reset, forms, buttons, animations, and app layout are
   in /static/css/common.css. This file is auth-only.
   =============================================================== */

/* ═══════════════════════════════════════════════════════════════
   AUTH PAGES â€” Split-screen Layout
   ═══════════════════════════════════════════════════════════════ */

.auth-page {
    display: flex;
    min-height: 100vh;
    overflow: hidden;
}

/* --- Brand Panel (Left) --- */
.auth-brand {
    flex: 0 0 48%;
    background: var(--color-ink-900);
    color: var(--color-text-inv);
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-brand__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.auth-brand__logo-icon {
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.auth-brand__logo-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: white;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-brand__logo-text {
    display: flex;
    flex-direction: column;
}

.auth-brand__logo-name {
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1;
}

.auth-brand__logo-tag {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

.auth-brand__content {
    position: relative;
    z-index: 2;
    max-width: 440px;
}

.auth-brand__title {
    font-size: clamp(2.2rem, 3.8vw, 3.2rem);
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.auth-brand__title em {
    font-style: normal;
    background: linear-gradient(135deg, #a5b4fc 0%, #818cf8 60%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.auth-brand__desc {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.65);
    margin-bottom: 32px;
}

.auth-brand__features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-brand__feature {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    transition: background var(--transition), transform var(--transition);
}
.auth-brand__feature:hover {
    background: rgba(255,255,255,0.06);
    transform: translateY(-2px);
}

.auth-brand__feature-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.auth-brand__feature-icon--purple { background: var(--color-purple-alpha-08); }
.auth-brand__feature-icon--teal   { background: var(--color-group-green-alpha-15); }
.auth-brand__feature-icon--blue   { background: var(--color-blue-alpha-08); }

.auth-brand__feature strong {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--color-text-inv);
}

.auth-brand__feature span {
    display: block;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.5;
}

.auth-brand__footer {
    position: relative;
    z-index: 2;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.3);
}

/* --- Form Panel (Right) --- */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: var(--color-surface);
    overflow-y: auto;
    min-height: 100vh;
}

.auth-form-container {
    width: 100%;
    max-width: 420px;
    animation: fadeSlideUp 0.5s var(--ease-out) both;
}

.auth-form-container__mobile-logo {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
}

.auth-form-container__heading {
    font-size: 1.85rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.auth-form-container__subtext {
    font-size: 0.95rem;
    color: var(--color-text-sec);
    margin-bottom: 32px;
    line-height: 1.5;
}



/* --- Divider --- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--color-text-muted);
    font-size: 0.82rem;
    font-weight: 500;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--color-border);
}



.auth-footer-text {
    margin-top: 32px;
    text-align: center;
    font-size: 0.88rem;
    color: var(--color-text-sec);
}
.auth-footer-text a {
    font-weight: 600;
}


/* ═══════════════════════════════════════════════════════════════
   CENTERED CARD LAYOUT (Verify, Profile, Team Select)
   ═══════════════════════════════════════════════════════════════ */

.auth-centered {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: var(--color-page-bg);
}

.auth-card {
    width: 100%;
    max-width: 520px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border-lt);
    padding: 48px 40px;
    animation: fadeSlideUp 0.5s var(--ease-out) both;
}

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

.auth-card__icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}
.auth-card__icon--purple {
    background: linear-gradient(135deg, var(--color-primary-alpha-12), var(--color-purple-alpha-08));
}
.auth-card__icon--green {
    background: linear-gradient(135deg, var(--color-success-alpha-10), var(--color-group-green-alpha-08));
}
.auth-card__icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--color-primary);
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-card__title {
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 8px;
}

.auth-card__subtitle {
    text-align: center;
    color: var(--color-text-sec);
    font-size: 0.95rem;
    margin-bottom: 32px;
    line-height: 1.5;
}

.auth-card__step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary);
    background: var(--color-primary-alpha-08);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    margin: 0 auto 20px;
    text-align: center;
}


/* --- Status Card (inside verify email) --- */
.status-card {
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    background: var(--color-page-bg);
    margin-bottom: 24px;
}

.status-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.status-card__label {
    font-weight: 600;
    font-size: 0.9rem;
}

.status-card__body {
    font-size: 0.85rem;
    color: var(--color-text-sec);
    line-height: 1.5;
}

.status-card--pending .status-card__label  { color: var(--color-warning); }
.status-card--success .status-card__label  { color: var(--color-success); }
.status-card--error   .status-card__label  { color: var(--color-error); }

.status-card--success {
    border-color: var(--color-success-alpha-18);
    background: var(--color-success-alpha-08);
}
.status-card--error {
    border-color: var(--color-danger-alpha-20);
    background: var(--color-danger-alpha-05);
}

.resend-section {
    border-top: 1px solid var(--color-border);
    padding-top: 24px;
    margin-top: 24px;
}

.resend-section h3 {
    font-size: 0.88rem;
    margin-bottom: 4px;
}

.resend-section p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 14px;
}

.inline-form {
    display: flex;
    gap: 10px;
}

.inline-form .form-input {
    flex: 1;
}


/* ═══════════════════════════════════════════════════════════════
   TEAM SELECT â€” Dual Card Layout
   ═══════════════════════════════════════════════════════════════ */

.team-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.team-option {
    padding: 28px 24px;
    border-radius: var(--radius-lg);
    border: 2px solid var(--color-border);
    background: var(--color-surface);
    cursor: pointer;
    text-align: center;
    transition: all var(--transition);
}

.team-option:hover {
    border-color: var(--color-primary-light);
    box-shadow: 0 4px 20px var(--color-primary-alpha-10);
}

.team-option.active {
    border-color: var(--color-primary);
    background: var(--color-primary-alpha-04);
    box-shadow: 0 4px 20px var(--color-primary-alpha-12);
}

.team-option__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 1.4rem;
}

.team-option__title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.team-option__desc {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.team-form {
    animation: fadeSlideUp 0.3s var(--ease-out) both;
}

.team-preview {
    padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--color-primary-alpha-04);
    border: 1px solid var(--color-primary-alpha-12);
    margin-bottom: 20px;
    animation: fadeSlideUp 0.3s var(--ease-out) both;
}

.team-preview__name {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.team-preview__meta {
    font-size: 0.85rem;
    color: var(--color-text-sec);
    line-height: 1.5;
}


/* --- Avatar Preview --- */
.avatar-preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-blue));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0 auto 24px;
    box-shadow: 0 4px 20px var(--color-primary-alpha-20);
    letter-spacing: 1px;
}


/* ── Already-Logged-In Banner ── */
.already-logged-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 12px;
    background: var(--color-primary-alpha-08);
    border: 1px solid var(--color-primary-alpha-20);
    animation: bannerSlideIn 0.35s ease;
}
@keyframes bannerSlideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.already-logged-banner__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-blue));
    color: var(--color-text-inv);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 500;
    flex-shrink: 0;
}
.already-logged-banner__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.already-logged-banner__body strong {
    font-size: 0.92rem;
    color: var(--color-text);
}
.already-logged-banner__hint {
    font-size: 0.78rem;
    color: var(--color-muted);
}
.already-logged-banner .btn--sm {
    padding: 6px 14px;
    font-size: 0.82rem;
    white-space: nowrap;
}


/* --- Password Strength --- */
.password-strength {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.password-strength__bar {
    flex: 1;
    height: 3px;
    border-radius: var(--radius-full);
    background: var(--color-border);
    transition: background var(--transition);
}

.password-strength__bar.active-weak   { background: var(--color-error); }
.password-strength__bar.active-medium { background: var(--color-warning); }
.password-strength__bar.active-strong { background: var(--color-success); }

.password-strength__text,
.password-match-text {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 4px;
}




/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .auth-brand {
        flex: 0 0 42%;
        padding: 40px;
    }
    .auth-form-panel {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .auth-page {
        flex-direction: column;
    }

    .auth-brand {
        flex: 0 0 auto;
        display: none;
    }

    .auth-form-panel {
        padding: 32px 24px;
    }

    .auth-form-container__mobile-logo {
        display: flex;
    }

    .auth-card {
        padding: 32px 24px;
    }

    .team-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-form-panel {
        padding: 12px;
    }

    .auth-card {
        padding: 28px 20px;
    }

    .inline-form {
        flex-direction: column;
    }
}


