/* ============================================================
   RU JAPAN — Auth Pages Dark Theme (Login & Register)
   ============================================================ */

:root {
    --bg:      #0d0d0d;
    --bg-card: #161616;
    --bg-card2:#1e1e1e;
    --gold:    #D4AF37;
    --gold-lt: #e8c84a;
    --border:  #252525;
    --muted:   #6e6e6e;
    --text:    #e8e8e8;
    --radius:  10px;
}

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

/* Hide old shared header */
header { display: none !important; }

html, body {
    height: 100%;
    background: var(--bg) !important;
    color: var(--text) !important;
    font-family: 'Segoe UI', system-ui, sans-serif !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

a { text-decoration: none; color: inherit; }

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

/* ============================================================
   LEFT PANEL — branding
   ============================================================ */
.auth-left {
    position: relative;
    overflow: hidden;
    background: #080808;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 48px 52px;
}

.auth-left .al-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .35;
    transition: opacity .4s;
}

.auth-left::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,.2) 0%,
        rgba(0,0,0,.6) 60%,
        rgba(0,0,0,.9) 100%
    );
}

.auth-left .al-content {
    position: relative;
    z-index: 2;
}

.auth-left .logo {
    display: block;
    height: 38px;
    margin-bottom: 48px;
}

.auth-left h2 {
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -.4px;
    color: #fff;
    margin-bottom: 14px;
}
.auth-left h2 span { color: var(--gold); }

.auth-left p {
    font-size: 14px;
    color: #aaa;
    line-height: 1.7;
    max-width: 380px;
    margin-bottom: 36px;
}

.auth-left .al-stats {
    display: flex;
    gap: 36px;
}
.al-stat-num  { font-size: 22px; font-weight: 700; color: var(--gold); line-height: 1; }
.al-stat-label { font-size: 10px; color: #888; margin-top: 3px; letter-spacing: .6px; text-transform: uppercase; }

/* ============================================================
   RIGHT PANEL — form
   ============================================================ */
.auth-right {
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 44px;
    overflow-y: auto;
}

.auth-right .ar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}
.auth-right .ar-logo {
    display: block;
    height: 30px;
}
.auth-right .ar-switch {
    font-size: 12.5px;
    color: var(--muted);
}
.auth-right .ar-switch a {
    color: var(--gold);
    font-weight: 600;
    margin-left: 4px;
}
.auth-right .ar-switch a:hover { color: var(--gold-lt); }

/* Back link */
.ar-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 28px;
    transition: color .2s;
}
.ar-back:hover { color: var(--gold); }

/* Heading */
.auth-right h1 {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}
.auth-right .ar-subtitle {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 32px;
}

/* ---- form controls ---- */
.af-group {
    margin-bottom: 18px;
}
.af-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #aaa;
    letter-spacing: .3px;
    margin-bottom: 7px;
    text-transform: uppercase;
}
.af-input-wrap {
    position: relative;
}
.af-input-wrap .af-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 15px;
    pointer-events: none;
}
.af-group input[type="text"],
.af-group input[type="email"],
.af-group input[type="password"],
.af-group input[type="number"],
.af-group select {
    width: 100%;
    background: var(--bg-card2) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    padding: 11px 14px 11px 40px !important;
    color: var(--text) !important;
    font-size: 13.5px !important;
    outline: none !important;
    transition: border-color .2s, box-shadow .2s;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none !important;
    height: auto !important;
}
.af-group input:not(.af-no-icon),
.af-group select { padding-left: 40px !important; }
.af-group input.af-no-icon { padding-left: 14px !important; }
.af-group input:focus,
.af-group select:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 3px rgba(212,175,55,.1) !important;
}
.af-group input::placeholder { color: #555; }
.af-group select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%23888' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 14px center !important; padding-right: 36px !important; }
.af-group select option { background: #1a1a1a; color: #e8e8e8; }

/* 2-col row */
.af-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* error message */
.af-error {
    font-size: 11.5px;
    color: #e05252;
    margin-top: 5px;
    display: none;
}
.bf-validation-error-msg { display: none; font-size: 11.5px; color: #e05252; margin-top: 4px; }

/* flash messages */
.af-flash { font-size: 12px; margin-top: 5px; }
.af-flash.error { color: #e05252; }
.af-flash.success { color: #4db8ff; }

/* checkbox & remember row */
.af-check-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    font-size: 12.5px;
}
.af-check-row label { display: flex; align-items: center; gap: 7px; color: #aaa; cursor: pointer; }
.af-check-row input[type="checkbox"] {
    width: 15px !important; height: 15px !important;
    accent-color: var(--gold);
    padding: 0 !important; border: none !important;
}
.af-check-row a { color: var(--gold); font-size: 12.5px; }
.af-check-row a:hover { color: var(--gold-lt); }

/* submit button */
.af-btn {
    width: 100%;
    padding: 13px;
    background: var(--gold);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .4px;
    cursor: pointer;
    transition: background .2s, transform .15s;
    margin-bottom: 20px;
}
.af-btn:hover { background: var(--gold-lt); transform: translateY(-1px); }

/* divider */
.af-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.af-divider span { flex: 1; height: 1px; background: var(--border); }
.af-divider p { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* bottom note */
.af-note {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    line-height: 1.65;
}
.af-note a { color: var(--gold); }
.af-note a:hover { color: var(--gold-lt); }

/* captcha block */
.af-captcha {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 18px;
}
.af-captcha p { font-size: 12px; color: var(--muted); margin-top: 8px; }
.af-captcha a { color: var(--gold); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-left  { display: none; }
    .auth-right {
        padding: 36px 28px;
        min-height: 100vh;
        justify-content: flex-start;
        padding-top: 48px;
    }
}
@media (max-width: 480px) {
    .auth-right { padding: 24px 18px; }
    .af-row { grid-template-columns: 1fr; }
}
