/*
 * auth-v2.css
 * Split-panel layout for register and login pages.
 * Standalone — does not use header.php/footer.php.
 * Uses --t- prefixed tokens from theme-v2.css (loaded separately).
 */

/* =========================================================
   BASE (standalone page, no theme-v2.css)
   ========================================================= */
:root {
    --a-bg-abyss: #050508; --a-bg-deep: #08080c; --a-bg-card: #101018;
    --a-bg-surface: #1c1c28; --a-bg-elevated: #242434;
    --a-accent: #E63946; --a-accent-bright: #EF4444;
    --a-accent-dim: rgba(230,57,70,0.10);
    --a-green: #66bb6a; --a-green-dim: rgba(102,187,106,0.06); --a-green-border: rgba(102,187,106,0.18);
    --a-amber: #F59E0B;
    --a-text-hero: #faf6ee; --a-text-primary: #e8e2d6; --a-text-secondary: #918b7e;
    --a-text-muted: #5c574e; --a-text-dim: #3a362f;
    --a-border: #1a1a26; --a-border-mid: #28283a; --a-border-light: #38384a;
    --a-error: #ef5350; --a-error-dim: rgba(239,83,80,0.08);
}

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

body.auth-body {
    background: var(--a-bg-abyss); color: var(--a-text-primary);
    font-family: 'Barlow', sans-serif; min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body.auth-body::before {
    content: ''; position: fixed; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none; z-index: 9998;
}

/* =========================================================
   TOP BAR (minimal nav)
   ========================================================= */
.auth-topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 32px; height: 48px;
    background: rgba(5,5,8,0.85); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--a-border);
}

.auth-topbar-link {
    font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 500;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--a-text-muted); text-decoration: none; transition: color 0.2s;
}

.auth-topbar-link:hover { color: var(--a-text-hero); }

.auth-topbar-links {
    display: flex; gap: 24px;
}

.auth-topbar-links a {
    font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 500;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--a-text-muted); text-decoration: none; transition: color 0.2s;
}

.auth-topbar-links a:hover { color: var(--a-accent); }

/* =========================================================
   SPLIT-PANEL LAYOUT
   ========================================================= */
.auth-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* =========================================================
   LEFT PANEL — HERO/BRAND
   ========================================================= */
.auth-hero {
    position: relative;
    display: flex; flex-direction: column; justify-content: center;
    padding: 60px; overflow: hidden;
}

.auth-hero-bg { position: absolute; inset: 0; }
.auth-hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.25; filter: saturate(0.4) contrast(1.1); }
.auth-hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(5,5,8,0.9) 0%, rgba(5,5,8,0.7) 50%, rgba(5,5,8,0.85) 100%); }

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

/* Logo */
.auth-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-bottom: 48px; }
.auth-logo img { height: 36px; width: auto; }
.auth-logo-text { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 24px; letter-spacing: 3px; text-transform: uppercase; color: var(--a-text-hero); }
.auth-logo-text span { color: var(--a-accent); }

.auth-hero-title { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: clamp(32px, 4vw, 48px); text-transform: uppercase; letter-spacing: -1px; line-height: 0.95; color: var(--a-text-hero); margin-bottom: 16px; }
.auth-hero-title .accent { color: var(--a-accent); }

.auth-hero-desc { font-family: 'Barlow', sans-serif; font-size: 16px; font-weight: 300; color: var(--a-text-secondary); line-height: 1.7; margin-bottom: 40px; }

/* Perks */
.auth-perks { display: flex; flex-direction: column; gap: 14px; }
.auth-perk { display: flex; align-items: center; gap: 14px; font-family: 'Barlow', sans-serif; font-size: 14px; font-weight: 400; color: var(--a-text-secondary); }
.auth-perk-icon { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: 1px solid var(--a-border-mid); font-size: 16px; }
.auth-perk strong { color: var(--a-text-primary); font-weight: 500; }

/* =========================================================
   RIGHT PANEL — FORM
   ========================================================= */
.auth-form-panel {
    display: flex; flex-direction: column; justify-content: center;
    padding: 60px; background: var(--a-bg-deep);
    border-left: 1px solid var(--a-border); overflow-y: auto;
}

.auth-form-inner { max-width: 420px; width: 100%; margin: 0 auto; }

.auth-form-header { margin-bottom: 32px; }
.auth-form-title { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 28px; text-transform: uppercase; letter-spacing: 2px; color: var(--a-text-hero); margin-bottom: 6px; }
.auth-form-subtitle { font-family: 'Barlow Condensed', sans-serif; font-size: 14px; color: var(--a-text-muted); letter-spacing: 0.5px; }

/* Verification notice */
.auth-notice { display: flex; align-items: flex-start; gap: 12px; padding: 16px; margin-bottom: 24px; background: rgba(66,165,245,0.06); border: 1px solid rgba(66,165,245,0.15); }
.auth-notice-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.auth-notice-text { font-family: 'Barlow', sans-serif; font-size: 13px; font-weight: 300; color: var(--a-text-secondary); line-height: 1.5; }
.auth-notice-text strong { color: var(--a-text-primary); font-weight: 500; }

/* Error/success messages */
.auth-message { padding: 14px 16px; margin-bottom: 20px; font-family: 'Barlow', sans-serif; font-size: 13px; line-height: 1.5; }
.auth-message.error { background: var(--a-error-dim); border: 1px solid rgba(239,83,80,0.2); color: var(--a-error); }
.auth-message.success { background: var(--a-green-dim); border: 1px solid var(--a-green-border); color: var(--a-green); }

/* =========================================================
   FORM ELEMENTS
   ========================================================= */
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.auth-row.full { grid-template-columns: 1fr; }

.auth-group { display: flex; flex-direction: column; gap: 6px; }

.auth-label { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--a-text-muted); }
.auth-label .req { color: var(--a-accent); }

.auth-input {
    background: var(--a-bg-surface); border: 1px solid var(--a-border);
    padding: 12px 16px; font-family: 'Barlow', sans-serif; font-size: 14px;
    color: var(--a-text-primary); outline: none; transition: border-color 0.2s; width: 100%;
}
.auth-input:focus { border-color: var(--a-border-light); }
.auth-input::placeholder { color: var(--a-text-dim); }
.auth-input.error { border-color: var(--a-error); }

.auth-hint { font-family: 'Barlow', sans-serif; font-size: 11px; font-weight: 300; color: var(--a-text-dim); line-height: 1.4; }

/* Honeypot */
.auth-hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* =========================================================
   ROLE SELECTOR
   ========================================================= */
.role-selector { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.role-primary { display: block; }
.role-secondary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.role-option {
    padding: 16px; background: var(--a-bg-surface); border: 1px solid var(--a-border);
    cursor: pointer; transition: all 0.2s; text-align: center; position: relative;
}
.role-option:hover { border-color: var(--a-border-mid); }
.role-option.active { border-color: var(--a-accent); background: var(--a-accent-dim); }
.role-option input { display: none; }

.role-icon { font-size: 24px; margin-bottom: 6px; display: block; }
.role-name { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--a-text-hero); margin-bottom: 2px; }
.role-desc { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; color: var(--a-text-muted); letter-spacing: 0.5px; }
.role-option.active .role-name { color: var(--a-accent); }

/* Fan card — full width, horizontal */
.role-option.role-fan { display: flex; align-items: center; gap: 14px; text-align: left; }
.role-option.role-fan .role-icon { margin-bottom: 0; font-size: 22px; }
.role-option.role-fan .role-info { flex: 1; }
.role-option.role-fan .role-name { margin-bottom: 0; }
.role-option.role-fan .role-desc { margin-top: 1px; }

.role-default-badge {
    font-family: 'Barlow Condensed', sans-serif; font-size: 9px; font-weight: 600;
    letter-spacing: 2px; text-transform: uppercase;
    color: var(--a-green); padding: 2px 8px;
    border: 1px solid var(--a-green-border); background: var(--a-green-dim);
    white-space: nowrap;
}

/* =========================================================
   PASSWORD STRENGTH
   ========================================================= */
.pw-strength { display: flex; gap: 4px; margin-top: 6px; }
.pw-bar { flex: 1; height: 3px; background: var(--a-border); transition: background 0.3s; }
.pw-bar.weak { background: var(--a-error); }
.pw-bar.medium { background: var(--a-amber); }
.pw-bar.strong { background: var(--a-green); }

/* Password match indicator */
.pw-match {
    font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 500;
    letter-spacing: 1px; text-transform: uppercase; margin-top: 6px; min-height: 16px;
}
.pw-match.match { color: var(--a-green); }
.pw-match.mismatch { color: var(--a-error); }

.auth-input.match { border-color: var(--a-green); }

/* =========================================================
   TERMS CHECKBOX
   ========================================================= */
.auth-check { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0; cursor: pointer; }
.auth-check input { width: 16px; height: 16px; accent-color: var(--a-accent); cursor: pointer; margin-top: 2px; }
.auth-check-label { font-family: 'Barlow', sans-serif; font-size: 13px; font-weight: 300; color: var(--a-text-muted); line-height: 1.5; }
.auth-check-label a { color: var(--a-accent); text-decoration: none; }
.auth-check-label a:hover { text-decoration: underline; }

/* =========================================================
   SUBMIT BUTTON
   ========================================================= */
.auth-submit {
    display: block; width: 100%; margin-top: 8px;
    font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 14px;
    letter-spacing: 3px; text-transform: uppercase;
    background: var(--a-accent); color: var(--a-bg-abyss); border: none;
    padding: 16px; cursor: pointer; transition: all 0.2s;
}
.auth-submit:hover { background: var(--a-accent-bright); }

/* =========================================================
   WHAT HAPPENS NEXT (register only)
   ========================================================= */
.auth-next { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--a-border); }
.auth-next-title { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--a-text-muted); margin-bottom: 12px; }
.auth-next-steps { display: flex; flex-direction: column; gap: 10px; }
.auth-next-step { display: flex; align-items: center; gap: 12px; font-family: 'Barlow', sans-serif; font-size: 13px; font-weight: 300; color: var(--a-text-secondary); }

.step-dot {
    width: 24px; height: 24px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 11px;
    color: var(--a-accent); border: 1px solid rgba(230,57,70,0.2); background: var(--a-accent-dim);
}

/* =========================================================
   SWITCH LINK
   ========================================================= */
.auth-switch {
    text-align: center; margin-top: 28px;
    font-family: 'Barlow Condensed', sans-serif; font-size: 14px;
    color: var(--a-text-muted); letter-spacing: 0.5px;
}
.auth-switch a { color: var(--a-accent); text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* =========================================================
   LOGIN EXTRAS (remember me + forgot password)
   ========================================================= */
.login-extras { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 8px; }

.remember-me {
    display: flex; align-items: center; gap: 8px;
    font-family: 'Barlow', sans-serif; font-size: 13px; font-weight: 300;
    color: var(--a-text-muted); cursor: pointer;
}
.remember-me input { width: 14px; height: 14px; accent-color: var(--a-accent); cursor: pointer; }

.forgot-link {
    font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 500;
    letter-spacing: 1px; text-transform: uppercase; color: var(--a-accent); text-decoration: none;
}
.forgot-link:hover { text-decoration: underline; }

/* =========================================================
   TURNSTILE
   ========================================================= */
.auth-turnstile { margin-top: 16px; margin-bottom: 8px; }

/* =========================================================
   RESPONSIVE — 960px
   ========================================================= */
@media (max-width: 960px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-hero { min-height: 40vh; padding: 40px; }
    .auth-form-panel { padding: 40px; border-left: none; border-top: 1px solid var(--a-border); }
}

/* =========================================================
   RESPONSIVE — 640px
   ========================================================= */
@media (max-width: 640px) {
    .auth-hero { padding: 32px 20px; min-height: 35vh; }
    .auth-form-panel { padding: 32px 20px; }
    .auth-row { grid-template-columns: 1fr; }
    .role-selector { gap: 6px; }
    .role-secondary { grid-template-columns: 1fr; }
    .auth-perks { display: none; }
}
