/* =============================================================
 * BRL Auth page — dark two-column login/signup.
 * Left pane:  brand pitch with decorative glyphs.
 * Right pane: card with tabs + form + Google button.
 * Mirrors the Cheragh auth UI (dark navy + gold accent).
 * Typography: system stack (zero external requests).
 * ============================================================= */

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

.brl-auth-body {
    --bg:            #0b1424;
    --bg-2:          #0f1c35;
    --bg-3:          #152445;
    --panel:         #121d33;
    --border:        #1f2d49;
    --border-soft:   #1a2740;
    --text:          #e6ecf5;
    --text-dim:      #8b97ad;
    --text-muted:    #5b6780;

    --accent:        #ffd24a;
    --accent-deep:   #f5b800;
    --accent-ink:    #1a1506;

    --shadow:        0 30px 80px -20px rgba(0,0,0,.6);
    --radius:        18px;

    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, 'Segoe UI', 'Segoe UI Variable', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ================= SHELL ================= */
.brl-auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}

/* ================= LEFT PANE ================= */
.brl-auth-left {
    position: relative;
    padding: 56px 64px;
    background:
        radial-gradient(1200px 600px at 30% 20%, rgba(255,210,74,.07), transparent 60%),
        radial-gradient(900px 500px at 80% 90%, rgba(30,100,200,.15), transparent 60%),
        linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 60%, var(--bg-3) 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
}
.brl-auth-bg { position: absolute; inset: 0; pointer-events: none; }
.brl-auth-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 75%);
}
.brl-glyph {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .55;
}
.brl-glyph-1 {
    top: -100px; left: -80px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,210,74,.22) 0%, transparent 70%);
}
.brl-glyph-2 {
    bottom: -140px; right: 20%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(33,150,243,.18) 0%, transparent 70%);
}
.brl-glyph-3 {
    top: 40%; right: -100px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(139,92,246,.18) 0%, transparent 70%);
}

.brl-auth-pitch {
    position: relative;
    z-index: 1;
    max-width: 520px;
}

.brl-brand-badge {
    display: inline-flex; align-items: center; gap: 12px;
    margin-bottom: 60px;
}
.brl-brand-badge img { height: 42px; width: auto; }
.brl-brand-mark {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
    color: var(--accent-ink);
    font-weight: 800;
    display: grid; place-items: center;
    font-size: 15px;
    letter-spacing: -.5px;
    box-shadow: 0 8px 20px -8px rgba(255,210,74,.5);
}
.brl-brand-name { font-size: 18px; font-weight: 700; letter-spacing: -.3px; }

.brl-auth-title {
    font-size: 48px; font-weight: 800;
    line-height: 1.08;
    letter-spacing: -1.5px;
    margin: 0 0 22px;
}
.brl-accent { color: var(--accent); }

.brl-auth-tag {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-dim);
    max-width: 460px;
    margin: 0 0 40px;
}

.brl-feature-stack {
    display: flex; flex-direction: column; gap: 14px;
}
.brl-feat {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    transition: transform .2s, border-color .2s, background .2s;
}
.brl-feat:hover {
    transform: translateX(4px);
    border-color: var(--border);
    background: rgba(255,255,255,.05);
}
.brl-feat-ico {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: grid; place-items: center;
    flex-shrink: 0;
}
.brl-feat-ico svg { width: 22px; height: 22px; }
.brl-feat-ico-a { background: rgba(33,150,243,.15);  color: #64b5f6; }
.brl-feat-ico-b { background: rgba(255,210,74,.15);  color: var(--accent); }
.brl-feat-ico-c { background: rgba(239,68,68,.15);   color: #f87171; }
.brl-feat-title { font-weight: 600; font-size: 14.5px; margin-bottom: 2px; }
.brl-feat-sub   { font-size: 12.5px; color: var(--text-muted); }

.brl-auth-footer {
    margin-top: 60px;
    color: var(--text-muted);
    font-size: 12.5px;
}

/* ================= RIGHT PANE ================= */
.brl-auth-right {
    position: relative;
    padding: 56px 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-2);
    border-left: 1px solid var(--border-soft);
}

.brl-theme-toggle {
    position: absolute; top: 24px; left: 24px;
    width: 42px; height: 42px;
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    color: var(--text-dim);
    cursor: pointer;
    display: grid; place-items: center;
    transition: color .15s, border-color .15s;
}
.brl-theme-toggle:hover { color: var(--text); border-color: var(--border); }
.brl-theme-toggle svg { width: 18px; height: 18px; }

.brl-auth-card {
    width: 100%;
    max-width: 440px;
}
.brl-auth-heading {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.5px;
    margin: 0 0 28px;
    text-align: center;
}

/* Tabs (pill style like Cheragh) */
.brl-auth-tabs {
    display: flex;
    padding: 5px;
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    margin-bottom: 28px;
}
.brl-auth-tab {
    flex: 1;
    padding: 11px 20px;
    border-radius: 999px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dim);
    text-decoration: none;
    transition: all .2s;
}
.brl-auth-tab.is-active {
    background: var(--bg-3);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--border);
}
.brl-auth-tab:hover:not(.is-active) { color: var(--text); }

/* Notices */
.brl-auth-notice,
.brl-auth-error {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 13.5px;
    line-height: 1.5;
}
.brl-auth-notice {
    background: rgba(33,150,243,.1);
    color: #64b5f6;
    border: 1px solid rgba(33,150,243,.2);
}
.brl-auth-error {
    background: rgba(239,68,68,.1);
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,.25);
}

/* Form */
.brl-auth-form { display: flex; flex-direction: column; gap: 18px; }
.brl-auth-field { display: flex; flex-direction: column; gap: 6px; }
.brl-auth-label {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500;
}
.brl-auth-input {
    display: flex; align-items: center;
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 0 16px;
    transition: border-color .15s, background .15s;
}
.brl-auth-input:focus-within {
    border-color: var(--accent);
    background: var(--bg-3);
}
.brl-auth-input svg {
    width: 18px; height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.brl-auth-input input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: inherit;
    font-size: 14.5px;
    padding: 15px 14px;
    outline: none;
    width: 100%;
}
.brl-auth-input input::placeholder { color: var(--text-muted); }

.brl-eye {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    display: inline-flex;
    align-items: center;
}
.brl-eye:hover { color: var(--text-dim); }

/* Row between form elements */
.brl-auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin: -4px 0 4px;
}
.brl-auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    cursor: pointer;
}
.brl-auth-remember input {
    appearance: none;
    width: 16px; height: 16px;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    background: var(--panel);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}
.brl-auth-remember input:checked {
    background: var(--accent);
    border-color: var(--accent);
}
.brl-auth-remember input:checked::after {
    content: '';
    position: absolute;
    left: 4px; top: 1px;
    width: 4px; height: 8px;
    border: solid var(--accent-ink);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.brl-auth-forgot {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
.brl-auth-forgot:hover { text-decoration: underline; }

.brl-auth-terms {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}
.brl-auth-terms a {
    color: var(--text-dim);
    text-decoration: underline;
}

/* Submit button (yellow like Cheragh) */
.brl-auth-submit {
    width: 100%;
    padding: 15px 22px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
    color: var(--accent-ink);
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.1px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform .15s, box-shadow .15s, filter .15s;
    margin-top: 4px;
}
.brl-auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px -10px rgba(255,210,74,.5);
    filter: brightness(1.05);
}
.brl-auth-submit svg { width: 18px; height: 18px; }

/* Divider */
.brl-auth-divider {
    text-align: center;
    position: relative;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.brl-auth-divider::before,
.brl-auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 30px);
    height: 1px;
    background: var(--border-soft);
}
.brl-auth-divider::before { left: 0; }
.brl-auth-divider::after  { right: 0; }
.brl-auth-divider span {
    background: var(--bg-2);
    padding: 0 10px;
    position: relative;
}

/* Google button */
.brl-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 22px;
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.brl-google-btn:hover {
    background: var(--bg-3);
    border-color: var(--border);
}
.brl-google-btn.is-disabled {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
}
.brl-auth-mini {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}
.brl-auth-mini em { color: var(--text-dim); font-style: normal; }

/* Switch link */
.brl-auth-switch {
    margin-top: 28px;
    text-align: center;
    font-size: 14px;
    color: var(--text-dim);
}
.brl-auth-switch a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
}
.brl-auth-switch a:hover { text-decoration: underline; }

/* ================= RESPONSIVE ================= */
@media (max-width: 980px) {
    .brl-auth-shell { grid-template-columns: 1fr; }
    .brl-auth-left {
        padding: 36px 28px 28px;
        min-height: auto;
    }
    .brl-auth-title { font-size: 32px; }
    .brl-auth-right { padding: 32px 24px; border-left: none; border-top: 1px solid var(--border-soft); }
    .brl-feature-stack { display: none; }
    .brl-auth-footer { display: none; }
    .brl-auth-tag { font-size: 14px; margin-bottom: 0; }
    .brl-brand-badge { margin-bottom: 30px; }
}

/* ================= LIGHT THEME ================= */
.brl-auth-body[data-theme="light"] {
    --bg:            #f5f7fb;
    --bg-2:          #ffffff;
    --bg-3:          #eef2f8;
    --panel:         #ffffff;
    --border:        #d7dde9;
    --border-soft:   #e7ecf4;
    --text:          #0b1424;
    --text-dim:      #4b5773;
    --text-muted:    #8593ae;
}
.brl-auth-body[data-theme="light"] .brl-auth-left {
    background:
        radial-gradient(1200px 600px at 30% 20%, rgba(255,210,74,.12), transparent 60%),
        radial-gradient(900px 500px at 80% 90%, rgba(30,100,200,.08), transparent 60%),
        linear-gradient(160deg, #fff 0%, #eef2f8 60%, #dfe7f3 100%);
}
.brl-auth-body[data-theme="light"] .brl-feat {
    background: rgba(255,255,255,.8);
}
.brl-auth-body[data-theme="light"] .brl-auth-input {
    background: #fff;
}
.brl-auth-body[data-theme="light"] .brl-auth-input:focus-within {
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255,210,74,.18);
}
.brl-auth-body[data-theme="light"] .brl-auth-grid {
    background-image:
        linear-gradient(rgba(0,0,0,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,.04) 1px, transparent 1px);
}
