/* ============================================================
   The AEO Suite | Auth Stylesheet v1
   Light-mode translation of the Caijo auth design language.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:       #fbfaff;
    --ink:      #1b2340;
    --purple:   #8b5cf6;
    --lpurple:  #a78bfa;
    --ppurple:  #c084fc;
    --violet:   #7c3aed;
    --success:  #10b981;
    --error:    #dc2626;
    --tm:       rgba(27,35,64,.62);
    --td:       rgba(27,35,64,.38);
    --surface:  rgba(139,92,246,.05);
    --surface2: rgba(139,92,246,.09);
    --border:   rgba(139,92,246,.16);
    --bhl:      rgba(139,92,246,.38);
    --white:    #ffffff;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
}

html, body {
    min-height: 100vh;
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

/* ── Grid texture overlay ───────────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(139,92,246,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139,92,246,.035) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
}

/* ── Glow blobs ─────────────────────────────────────────────── */
.auth-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.auth-glow::before,
.auth-glow::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
}
.auth-glow::before {
    width: 480px; height: 480px;
    top: -140px; left: -120px;
    background: rgba(139,92,246,.14);
}
.auth-glow::after {
    width: 420px; height: 420px;
    bottom: -160px; right: -100px;
    background: rgba(192,132,252,.12);
}

/* ── Page wrapper ───────────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    position: relative;
    z-index: 1;
}

.auth-shell {
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(27,35,64,.08);
}

/* ── Left brand panel ───────────────────────────────────────── */
.auth-left {
    padding: 40px 44px;
    background:
        radial-gradient(600px 300px at 0% 0%, rgba(139,92,246,.10), transparent 60%),
        var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.auth-logo { margin-bottom: 36px; }
.auth-logo a { display: inline-block; }
.auth-logo .logo-img { display: block; height: 22px; width: auto; }
.wordmark {
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -.01em;
    text-decoration: none;
}
.wordmark .wm-aeo   { color: var(--purple); font-weight: 700; }
.wordmark .wm-suite { color: var(--ink);    font-weight: 500; }

.left-eyebrow {
    display: inline-block;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--violet);
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 18px;
    align-self: flex-start;
}

.left-h1, .left-h2 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    line-height: 1.12;
    font-size: 2.15rem;
}
.left-h1 { color: var(--ink); }
.left-h2 { color: var(--purple); margin-bottom: 14px; }

.left-sub {
    color: var(--tm);
    font-size: .98rem;
    line-height: 1.55;
    margin-bottom: 26px;
    max-width: 40ch;
}

.feature-list { list-style: none; display: grid; gap: 12px; margin-bottom: 30px; }
.feature-list li {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: .93rem;
    color: var(--ink);
}
.feature-list svg {
    width: 18px; height: 18px;
    color: var(--purple);
    flex-shrink: 0;
}

.left-quote {
    margin-top: auto;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    min-height: 74px;
}
.q-text {
    display: block;
    font-family: 'DM Serif Display', serif;
    font-size: 1.02rem;
    color: var(--ink);
    line-height: 1.4;
}
.q-attr {
    display: block;
    margin-top: 6px;
    font-size: .8rem;
    color: var(--td);
}

/* ── Right form panel ───────────────────────────────────────── */
.auth-right {
    padding: 40px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header { margin-bottom: 24px; }
.form-header h3 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: 1.6rem;
    margin-bottom: 6px;
}
.form-header p { color: var(--tm); font-size: .93rem; }

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 500;
    margin-bottom: 7px;
}
.form-group input {
    width: 100%;
    font: inherit;
    font-size: .95rem;
    color: var(--ink);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-group input:focus {
    border-color: var(--bhl);
    box-shadow: 0 0 0 3px rgba(139,92,246,.12);
}
.form-hint { font-size: .78rem; color: var(--td); margin-top: 6px; }

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 18px;
    font-size: .85rem;
}
.form-row a { color: var(--violet); text-decoration: none; }
.form-row a:hover { text-decoration: underline; }

.btn-primary {
    width: 100%;
    font: inherit;
    font-size: .98rem;
    font-weight: 600;
    color: #fff;
    background: var(--purple);
    border: none;
    border-radius: var(--radius-md);
    padding: 13px 16px;
    cursor: pointer;
    transition: background .15s ease, transform .05s ease;
}
.btn-primary:hover  { background: var(--violet); }
.btn-primary:active { transform: translateY(1px); }

.form-footer {
    margin-top: 22px;
    text-align: center;
    font-size: .88rem;
    color: var(--tm);
}
.form-footer a { color: var(--violet); font-weight: 500; text-decoration: none; }
.form-footer a:hover { text-decoration: underline; }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: .9rem;
    margin-bottom: 18px;
    border: 1px solid transparent;
}
.alert-error {
    color: #991b1b;
    background: rgba(220,38,38,.07);
    border-color: rgba(220,38,38,.25);
}
.alert-success {
    color: #065f46;
    background: rgba(16,185,129,.08);
    border-color: rgba(16,185,129,.3);
}

/* ── Installer checks ───────────────────────────────────────── */
.check-list { list-style: none; display: grid; gap: 10px; margin-bottom: 22px; }
.check-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: .88rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 13px;
}
.check-note { color: var(--td); font-size: .78rem; }
.check-ok   { color: var(--success); font-weight: 600; }
.check-fail { color: var(--error);   font-weight: 600; }

/* ── Simple message pages ───────────────────────────────────── */
.message-only { text-align: center; }
.message-only .btn-primary { margin-top: 18px; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
    .auth-shell { grid-template-columns: 1fr; max-width: 480px; }
    .auth-left  { display: none; }
    .auth-right { padding: 34px 26px; }
}

/* ============================================================
   Redeem form additions (v1.01)
   ============================================================ */

.field-error {
    color: var(--error);
    font-size: .8rem;
    margin-top: 6px;
}

/* Password field with show/hide toggle */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 64px; }
.pw-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    font: inherit;
    font-size: .8rem;
    font-weight: 600;
    color: var(--violet);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
}
.pw-toggle:hover { color: var(--purple); }

/* Live password rule checklist */
.pw-rules {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: grid;
    gap: 5px;
}
.pw-rules li {
    font-size: .78rem;
    color: var(--td);
    padding-left: 20px;
    position: relative;
    transition: color .12s ease;
}
.pw-rules li::before {
    content: '○';
    position: absolute;
    left: 2px;
    top: -1px;
    color: var(--td);
}
.pw-rules li.met { color: var(--success); }
.pw-rules li.met::before { content: '✓'; color: var(--success); }

/* Consent checkbox */
.consent-group { margin-top: 4px; }
.consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .84rem;
    line-height: 1.5;
    color: var(--tm);
    cursor: pointer;
}
.consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--purple);
    cursor: pointer;
}
.consent a { color: var(--violet); text-decoration: none; }
.consent a:hover { text-decoration: underline; }

/* Disabled primary button */
.btn-primary:disabled {
    background: var(--lpurple);
    opacity: .55;
    cursor: not-allowed;
}
.btn-primary:disabled:hover { background: var(--lpurple); }
