/* ════════════════════════════════════════════════
   nexus-auth.css — Auth panel styles
   Requires nexus-tokens.css to be loaded first
   ════════════════════════════════════════════════ */

/* ── LAYOUT ───────────────────────────────── */
.auth-wrap {
    display: flex;
    min-height: 100vh;
}

/* ── LEFT DECORATIVE PANEL ────────────────── */
.auth-panel {
    width: 480px;
    flex-shrink: 0;
    background: linear-gradient(160deg, #0d1117 0%, #111827 60%, #0f2318 100%);
    position: relative;
    overflow: hidden;
    flex-direction: column;
    padding: 40px 44px;
    gap: 0;
}

/* Brand */
.ap-brand {
    display: flex; align-items: center; gap: 10px;
    flex-shrink: 0;
}
.ap-brand-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.1rem;
}
.ap-brand-name {
    font-family: var(--font-display);
    font-size: 1.15rem; font-weight: 800;
    color: #fff; letter-spacing: -.3px;
}
.ap-brand-name em { color: var(--accent); font-style: normal; }

/* Hero text */
.ap-hero {
    margin-top: auto;
    padding-bottom: 32px;
    position: relative; z-index: 2;
}
.ap-headline {
    font-family: var(--font-display);
    font-size: 2rem; font-weight: 800; line-height: 1.2;
    color: #fff; margin-bottom: 14px;
}
.ap-sub {
    font-size: .9rem; line-height: 1.65;
    color: rgba(255,255,255,.5);
    max-width: 340px;
}

/* Feature chips */
.ap-features {
    display: flex; flex-direction: column; gap: 10px;
    position: relative; z-index: 2;
}
.ap-feat {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px; padding: 10px 16px;
    font-size: .83rem; color: rgba(255,255,255,.75);
    backdrop-filter: blur(8px);
}
.ap-feat i { color: var(--accent); font-size: .95rem; flex-shrink: 0; }

/* Decorative blobs */
.ap-blob {
    position: absolute; border-radius: 50%;
    filter: blur(80px); pointer-events: none;
}
.ap-blob1 {
    width: 320px; height: 320px;
    background: rgba(16,185,129,.18);
    top: -60px; right: -80px;
}
.ap-blob2 {
    width: 260px; height: 260px;
    background: rgba(99,102,241,.14);
    bottom: 60px; left: -60px;
}

/* ── RIGHT FORM COLUMN ────────────────────── */
.auth-form-col {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 48px 24px;
    background: var(--bg);
    min-height: 100vh;
}

/* Mobile brand */
.auth-mobile-brand {
    align-items: center; gap: 10px;
    margin-bottom: 32px;
}
.auth-mobile-brand .ap-brand-icon {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1rem;
}
.auth-mobile-brand .ap-brand-name {
    font-family: var(--font-display);
    font-size: 1.1rem; font-weight: 800;
    color: var(--text);
}
.auth-mobile-brand .ap-brand-name em { color: var(--accent); font-style: normal; }

/* Card */
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 36px 36px 32px;
}

/* Card heading helpers (used inside each auth view) */
.auth-heading {
    font-family: var(--font-display);
    font-size: 1.45rem; font-weight: 800;
    color: var(--text); margin-bottom: 6px;
    letter-spacing: -.3px;
}
.auth-sub {
    font-size: .85rem; color: var(--muted);
    margin-bottom: 28px; line-height: 1.5;
}

/* Form elements */
.auth-label {
    display: block; font-size: .8rem; font-weight: 500;
    color: var(--text); margin-bottom: 6px;
}
.auth-input {
    width: 100%; padding: 10px 14px;
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: 10px; outline: none;
    font-family: var(--font-body); font-size: .88rem; color: var(--text);
    transition: border-color .18s, box-shadow .18s;
}
.auth-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(16,185,129,.12);
}
.auth-input::placeholder { color: var(--muted); }
.auth-input.is-invalid { border-color: var(--accent4); }
.auth-input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(239,68,68,.12); }

.auth-error {
    font-size: .76rem; color: var(--accent4);
    margin-top: 5px; display: flex; align-items: center; gap: 5px;
}

/* Input with icon */
.auth-input-wrap { position: relative; }
.auth-input-wrap .auth-input { padding-left: 38px; }
.auth-input-icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--muted); font-size: .9rem; pointer-events: none;
}
.auth-input-wrap .auth-input-action {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    color: var(--muted); font-size: .9rem; cursor: pointer;
    background: none; border: none; padding: 0;
    transition: color .18s;
}
.auth-input-wrap .auth-input-action:hover { color: var(--text); }

/* Submit button */
.auth-btn {
    width: 100%; padding: 11px 18px;
    background: var(--accent); color: #fff;
    border: none; border-radius: 10px;
    font-family: var(--font-body); font-size: .9rem; font-weight: 600;
    cursor: pointer; transition: opacity .18s, box-shadow .18s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.auth-btn:hover { opacity: .88; box-shadow: 0 4px 14px rgba(16,185,129,.3); }
.auth-btn:active { opacity: .75; }
.auth-btn:disabled { opacity: .55; cursor: not-allowed; }

/* Divider */
.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 22px 0; color: var(--muted); font-size: .78rem;
}
.auth-divider::before,
.auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

/* Links */
.auth-link {
    color: var(--accent); text-decoration: none; font-weight: 500;
    transition: opacity .18s;
}
.auth-link:hover { opacity: .75; }

/* Footer note */
.auth-footer-note {
    font-size: .75rem; color: var(--muted);
    margin-top: 28px; text-align: center;
}
.auth-footer-note a { color: var(--muted); text-decoration: none; }
.auth-footer-note a:hover { color: var(--accent); }

/* Alert / session status */
.auth-alert {
    padding: 11px 14px; border-radius: 10px;
    font-size: .83rem; display: flex; align-items: flex-start; gap: 9px;
    margin-bottom: 20px;
}
.auth-alert-success {
    background: rgba(16,185,129,.1); color: var(--accent);
    border: 1px solid rgba(16,185,129,.2);
}
.auth-alert-error {
    background: rgba(239,68,68,.08); color: var(--accent4);
    border: 1px solid rgba(239,68,68,.15);
}

/* ── ANIMATIONS ───────────────────────────── */
@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.auth-card { animation: authFadeIn .4s cubic-bezier(.4,0,.2,1) both; }

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 575.98px) {
    .auth-card { padding: 28px 22px 24px; border-radius: 14px; }
    .auth-heading { font-size: 1.25rem; }
}