/* ============================================================
   Nerdisa Auth Pages — auth.css
   Standalone — does not depend on style.css
   ============================================================ */

/* ----------------------------------------------------------
   Variables (borrowed from brand)
   ---------------------------------------------------------- */
:root {
    --gradient-brand:   linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #D946EF 100%);
    --color-primary:    #6366F1;
    --color-primary-hover: #4F46E5;
    --color-dark:       #0F172A;
    --color-text:       #1E293B;
    --color-text-light: #64748B;
    --color-border:     #E2E8F0;
    --color-bg:         #F8FAFC;
    --color-surface:    #FFFFFF;
    --color-error:      #EF4444;
    --color-success:    #10B981;
    --color-warning:    #F59E0B;
    --radius-sm:        8px;
    --radius-md:        12px;
    --shadow-sm:        0 1px 2px rgba(0,0,0,.05);
    --shadow-md:        0 4px 6px -1px rgba(0,0,0,.1);
    --font:             'Inter', system-ui, -apple-system, sans-serif;
    --transition:       all .2s ease;
}

/* ----------------------------------------------------------
   Reset & Base
   ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: var(--font);
    font-size: 16px;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; font-size: inherit; }
input  { font-family: inherit; font-size: inherit; }

/* ----------------------------------------------------------
   Page Shell — split layout
   ---------------------------------------------------------- */
.auth-page {
    min-height: 100vh;
    display: flex;
}

/* ----------------------------------------------------------
   Left — Brand Panel
   ---------------------------------------------------------- */
.auth-brand {
    width: 50%;
    flex-shrink: 0;
    background: var(--gradient-brand);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}

/* Decorative orbs */
.auth-brand::before,
.auth-brand::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    pointer-events: none;
}
.auth-brand::before { width: 420px; height: 420px; top: -130px; right: -160px; }
.auth-brand::after  { width: 320px; height: 320px; bottom: -120px; left: -90px; }

.auth-brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 52px;
    position: relative;
    z-index: 1;
}

.auth-brand-logo-mark {
    width: 54px;
    height: 54px;
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: var(--radius-md);
    display: grid;
    place-items: center;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
}

.auth-brand-logo-text {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.4px;
}

.auth-brand-headline {
    font-size: 42px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -.6px;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.auth-brand-sub {
    font-size: 15px;
    color: rgba(255,255,255,.75);
    line-height: 1.65;
    margin-bottom: 44px;
    position: relative;
    z-index: 1;
}

.auth-brand-points {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.auth-brand-point {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,.9);
    font-size: 14px;
    font-weight: 500;
}

.auth-brand-point-icon {
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.auth-brand-point-icon svg {
    width: 13px;
    height: 13px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ----------------------------------------------------------
   Right — Form Panel
   ---------------------------------------------------------- */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: #F1F5F9;
    overflow-y: auto;
}

.auth-form-wrap {
    width: 100%;
    max-width: 420px;
}

/* Mobile-only logo (hidden on desktop) */
.auth-form-logo {
    display: none;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
}

.auth-form-logo-mark {
    width: 36px;
    height: 36px;
    background: var(--gradient-brand);
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}

.auth-form-logo-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-dark);
    letter-spacing: -.3px;
}

/* Back link */
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    color: var(--color-text-light);
    font-weight: 500;
    margin-bottom: 28px;
    transition: color .15s;
}
.auth-back:hover { color: var(--color-dark); }
.auth-back svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

/* Heading */
.auth-heading {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-dark);
    letter-spacing: -.3px;
    margin-bottom: 6px;
    line-height: 1.25;
}

.auth-subheading {
    font-size: 14.5px;
    color: var(--color-text-light);
    margin-bottom: 28px;
    line-height: 1.55;
}

/* ----------------------------------------------------------
   Google OAuth button
   ---------------------------------------------------------- */
.auth-btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 20px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    margin-bottom: 20px;
}
.auth-btn-oauth:hover {
    border-color: #94A3B8;
    background: var(--color-bg);
    box-shadow: var(--shadow-sm);
}

/* ----------------------------------------------------------
   Divider
   ---------------------------------------------------------- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--color-text-light);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

/* ----------------------------------------------------------
   Form Fields
   ---------------------------------------------------------- */
.auth-field { margin-bottom: 16px; }

.auth-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 6px;
}

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

.auth-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14.5px;
    color: var(--color-text);
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.auth-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.auth-input.has-error {
    border-color: var(--color-error);
}
.auth-input.has-error:focus {
    box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}

/* Password toggle */
.auth-input-wrap.has-toggle .auth-input { padding-right: 42px; }

.auth-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-light);
    padding: 2px;
    display: grid;
    place-items: center;
    transition: color .15s;
}
.auth-toggle-btn:hover { color: var(--color-text); }
.auth-toggle-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Hint & error text */
.auth-field-hint  { margin-top: 5px; font-size: 12px; color: var(--color-text-light); }
.auth-field-error { margin-top: 5px; font-size: 12px; color: var(--color-error); font-weight: 500; display: none; }
.auth-field-error.show { display: block; }

/* ----------------------------------------------------------
   Password Strength Meter
   ---------------------------------------------------------- */
.auth-strength { margin-top: 8px; }

.auth-strength-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 5px;
}

.auth-strength-seg {
    flex: 1;
    height: 3px;
    border-radius: 3px;
    background: var(--color-border);
    transition: background .25s;
}
.s-weak   { background: var(--color-error) !important; }
.s-fair   { background: var(--color-warning) !important; }
.s-good   { background: #3B82F6 !important; }
.s-strong { background: var(--color-success) !important; }

.auth-strength-label {
    font-size: 11px;
    color: var(--color-text-light);
    font-weight: 500;
}

/* ----------------------------------------------------------
   Remember me / Forgot row
   ---------------------------------------------------------- */
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 8px;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    color: var(--color-text);
    cursor: pointer;
    user-select: none;
}
.auth-check input {
    cursor: pointer;
    accent-color: var(--color-primary);
    width: 15px;
    height: 15px;
}

/* Terms checkbox */
.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--color-text-light);
    line-height: 1.55;
    margin-bottom: 20px;
    cursor: pointer;
    user-select: none;
}
.auth-terms input {
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--color-primary);
    width: 15px;
    height: 15px;
}
.auth-terms a { color: var(--color-primary); font-weight: 500; }
.auth-terms a:hover { text-decoration: underline; }

/* ----------------------------------------------------------
   Links
   ---------------------------------------------------------- */
.auth-link {
    font-size: 13.5px;
    color: var(--color-primary);
    font-weight: 500;
}
.auth-link:hover { text-decoration: underline; }

/* ----------------------------------------------------------
   Primary Button
   ---------------------------------------------------------- */
.auth-btn {
    width: 100%;
    padding: 12px 20px;
    background: var(--gradient-brand);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.1px;
    transition: opacity .2s, transform .15s, box-shadow .2s;
    margin-bottom: 20px;
}
.auth-btn:hover {
    opacity: .9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.auth-btn:active { transform: translateY(0); opacity: 1; }

/* ----------------------------------------------------------
   Alert Box (success / error)
   ---------------------------------------------------------- */
.auth-alert {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 20px;
    display: none;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}
.auth-alert.show { display: flex; }
.auth-alert svg  { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.auth-alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.auth-alert-error   { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.auth-alert-info    { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }

/* ----------------------------------------------------------
   Footer text
   ---------------------------------------------------------- */
.auth-footer {
    text-align: center;
    font-size: 13.5px;
    color: var(--color-text-light);
}

/* ----------------------------------------------------------
   Responsive — hide brand panel on mobile
   ---------------------------------------------------------- */
@media (max-width: 768px) {
    .auth-brand { display: none; }
    .auth-form-panel {
        padding: 40px 24px;
        align-items: flex-start;
    }
    .auth-form-logo { display: flex; }
}
