/* ==========================================================================
   Auth pages (login, register, register details, register verify)
   Namespaced .ax-* so the global .auth-* overrides in style.css don't apply.
   ========================================================================== */
.ax-shell {
    --ax-bg: #150a26;
    --ax-field: #0f0620;
    --ax-line: rgba(255, 255, 255, 0.1);
    --ax-line-strong: rgba(255, 255, 255, 0.18);
    --ax-text: #f7f2ff;
    --ax-label: #e4d7fb;
    --ax-muted: #b9a8d6;
    --ax-subtle: #9483b3;
    --ax-accent: #e90052;
    --ax-violet: #6d4aff;
    --ax-link: #7ff0ff;
    --ax-green: #00ff87;
    --ax-ease: cubic-bezier(0.2, 0, 0, 1);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 180px);
    padding: 40px 20px 56px;
    color: var(--ax-text);
}
.ax-shell *, .ax-shell *::before, .ax-shell *::after { box-sizing: border-box; }

.ax-card {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    width: 100%;
    max-width: 1000px;
    overflow: hidden;
    border: 1px solid var(--ax-line-strong);
    border-radius: 28px;
    background: var(--ax-bg);
    box-shadow: 0 30px 80px rgba(3, 0, 16, 0.55);
}
.ax-card.is-wide { max-width: 1120px; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
.ax-card.is-compact { max-width: 900px; }

/* ---------- Brand side ---------- */
.ax-side {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 32px;
    overflow: hidden;
    padding: 36px 34px;
    background:
        radial-gradient(circle at 90% 8%, rgba(33, 215, 255, 0.28), transparent 32%),
        radial-gradient(circle at 10% 110%, rgba(233, 0, 82, 0.4), transparent 45%),
        linear-gradient(145deg, #37003c 0%, #2b075b 55%, #150334 100%);
    color: #ffffff;
}
.ax-side::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, #000, transparent 75%);
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%);
}
.ax-side > * { position: relative; z-index: 1; }
.ax-brand { display: inline-flex; align-items: center; gap: 12px; color: #ffffff; font-size: 1.05rem; font-weight: 900; text-decoration: none; }
.ax-brand img { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); }
.ax-kicker {
    display: inline-flex; align-items: center; gap: 8px;
    width: fit-content;
    margin-bottom: 14px;
    padding: 6px 12px 6px 8px;
    border: 1px solid rgba(0, 255, 135, 0.3);
    border-radius: 999px;
    background: rgba(0, 255, 135, 0.1);
    color: var(--ax-green);
    font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
}
.ax-kicker i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(0, 255, 135, 0.16); font-size: 0.62rem; }
.ax-side h1 {
    margin: 0 0 12px;
    color: #ffffff !important;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.08;
    text-shadow: none !important;
}
.ax-side h1 em { font-style: normal; background: linear-gradient(135deg, var(--ax-green), #21d7ff); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.ax-side p { margin: 0; color: rgba(255, 255, 255, 0.82); font-size: 0.98rem; line-height: 1.6; }
.ax-perks { display: grid; gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
.ax-perks li { display: flex; align-items: center; gap: 12px; color: #ffffff; font-size: 0.93rem; font-weight: 700; }
.ax-perks li i { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, 0.12); color: #7ff0ff; font-size: 0.85rem; }
.ax-side-foot { margin-top: auto !important; color: rgba(255, 255, 255, 0.7); font-size: 0.85rem; }
.ax-side-foot a { color: #ffffff; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

/* Register steps */
.ax-steps { display: grid; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; counter-reset: ax-step; }
.ax-steps li { display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; font-weight: 700; }
.ax-steps li::before {
    counter-increment: ax-step; content: counter(ax-step);
    display: grid; place-items: center; flex-shrink: 0;
    width: 30px; height: 30px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 0.8rem; font-weight: 900;
}
.ax-steps li.is-done { color: rgba(255, 255, 255, 0.85); }
.ax-steps li.is-done::before { content: "✓"; border-color: transparent; background: rgba(0, 255, 135, 0.2); color: var(--ax-green); }
.ax-steps li.is-current { color: #ffffff; }
.ax-steps li.is-current::before { border-color: transparent; background: #ffffff; color: #2b075b; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15); }

/* ---------- Form side ---------- */
.ax-main { display: flex; flex-direction: column; justify-content: center; padding: 40px 40px 36px; }
.ax-main h2 { margin: 0 0 6px; color: var(--ax-text) !important; font-size: 1.55rem; font-weight: 900; letter-spacing: -0.02em; }
.ax-sub { margin: 0 0 24px; color: var(--ax-muted); font-size: 0.93rem; line-height: 1.5; }
.ax-form { display: grid; gap: 16px; }
.ax-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
.ax-fieldset { display: grid; gap: 16px; margin: 0; padding: 0; border: 0; }
.ax-legend { margin: 10px 0 2px; padding: 0; color: var(--ax-subtle); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.ax-field { display: grid; align-content: start; gap: 7px; min-width: 0; }
.ax-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ax-field label, .ax-label { color: var(--ax-label); font-size: 0.86rem; font-weight: 700; }
.ax-optional { color: var(--ax-subtle); font-size: 0.78rem; font-weight: 600; }
.ax-hint { color: var(--ax-subtle); font-size: 0.8rem; line-height: 1.4; }

.ax-control { position: relative; }
.ax-control > .ax-icon {
    position: absolute; left: 15px; top: 50%; z-index: 1;
    transform: translateY(-50%);
    color: var(--ax-subtle); font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.15s;
}
html body .ax-shell .ax-input {
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    border: 1px solid var(--ax-line-strong) !important;
    border-radius: 14px;
    background: var(--ax-field) !important;
    color: var(--ax-text) !important;
    font: inherit;
    font-size: 0.98rem;
    outline: none;
    box-shadow: none !important;
    transition: border-color 0.15s var(--ax-ease), box-shadow 0.15s var(--ax-ease), background-color 0.15s;
}
html body .ax-shell .ax-control > .ax-icon + .ax-input { padding-left: 44px; }
html body .ax-shell .ax-control.has-toggle .ax-input { padding-right: 52px; }
html body .ax-shell .ax-input::placeholder { color: var(--ax-subtle); opacity: 1; }
html body .ax-shell .ax-input:hover { border-color: rgba(255, 255, 255, 0.3) !important; }
html body .ax-shell .ax-input:focus { border-color: var(--ax-accent) !important; box-shadow: 0 0 0 4px rgba(233, 0, 82, 0.2) !important; }
.ax-control:focus-within > .ax-icon { color: #ff6f9f; }
html body .ax-shell .ax-input:disabled { opacity: 0.6; cursor: not-allowed; }
html body .ax-shell .ax-input.is-valid { border-color: rgba(16, 185, 129, 0.8) !important; }
html body .ax-shell .ax-input.is-invalid { border-color: rgba(239, 68, 68, 0.8) !important; }
html body .ax-shell select.ax-input {
    appearance: none; -webkit-appearance: none;
    padding-right: 42px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b9a8d6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
}
html body .ax-shell select.ax-input option { background: #1a0030; color: #f7f2ff; }
html body .ax-shell input[type="date"].ax-input { color-scheme: dark; }

.ax-toggle {
    position: absolute; right: 5px; top: 50%;
    transform: translateY(-50%);
    display: grid; place-items: center;
    width: 42px; height: 40px;
    border: 0; border-radius: 10px;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--ax-muted) !important;
    font-size: 0.95rem;
    cursor: pointer;
    min-height: 0 !important;
}
.ax-toggle:hover { background: rgba(255, 255, 255, 0.08) !important; color: #ffffff !important; }

.ax-link { color: var(--ax-link); font-size: 0.84rem; font-weight: 700; text-decoration: none; }
.ax-link:hover { text-decoration: underline; text-underline-offset: 3px; }

html body .ax-shell .ax-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%;
    min-height: 52px;
    margin-top: 4px;
    padding: 0 22px;
    border: 0 !important;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--ax-accent), var(--ax-violet)) !important;
    color: #ffffff !important;
    font: inherit;
    font-size: 1rem; font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(233, 0, 82, 0.3) !important;
    transition: transform 0.15s var(--ax-ease), box-shadow 0.15s var(--ax-ease), filter 0.15s;
}
html body .ax-shell .ax-btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 16px 32px rgba(233, 0, 82, 0.38) !important; }
html body .ax-shell .ax-btn:active:not(:disabled) { transform: translateY(0); }
html body .ax-shell .ax-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none !important; }
html body .ax-shell .ax-btn.is-loading { pointer-events: none; }
.ax-btn .ax-spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #ffffff; border-radius: 50%; animation: ax-spin 0.7s linear infinite; }
.ax-btn.is-loading .ax-spinner { display: inline-block; }
.ax-btn.is-loading .ax-btn-icon { display: none; }
@keyframes ax-spin { to { transform: rotate(360deg); } }
html body .ax-shell .ax-btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; min-height: 48px;
    border: 1px solid var(--ax-line-strong) !important;
    border-radius: 14px;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--ax-muted) !important;
    font: inherit; font-size: 0.92rem; font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
html body .ax-shell .ax-btn-ghost:hover { background: rgba(255, 255, 255, 0.06) !important; color: #ffffff !important; }

.ax-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 0; color: var(--ax-subtle); font-size: 0.8rem; font-weight: 600; }
.ax-divider::before, .ax-divider::after { content: ""; flex: 1; height: 1px; background: var(--ax-line); }
.ax-alt { margin: 14px 0 0; color: var(--ax-muted); font-size: 0.93rem; text-align: center; }
.ax-alt a { color: var(--ax-link); font-weight: 800; text-decoration: none; }
.ax-alt a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Checkbox rows */
.ax-check { display: flex; align-items: flex-start; gap: 12px; color: var(--ax-label); font-size: 0.9rem; font-weight: 600; line-height: 1.45; cursor: pointer; }
.ax-check input { flex-shrink: 0; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ax-accent); cursor: pointer; }
.ax-check-text { flex: 1; }

/* Alerts */
.ax-alert { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 18px; padding: 13px 15px; border-radius: 14px; font-size: 0.9rem; font-weight: 600; line-height: 1.5; }
.ax-alert > i { margin-top: 3px; flex-shrink: 0; }
.ax-alert strong { color: #ffffff; }
.ax-alert.is-error { border: 1px solid rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.12); color: #fecaca; }
.ax-alert.is-success { border: 1px solid rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.12); color: #a7f3d0; }
.ax-alert.is-info { border: 1px solid rgba(127, 240, 255, 0.35); background: rgba(33, 215, 255, 0.1); color: #cffafe; }
.ax-alert.is-warning { border: 1px solid rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.1); color: #fde68a; }

/* Lockout + ban */
.ax-lockout { margin: 0 0 18px; padding: 18px; border: 1px solid rgba(251, 191, 36, 0.4); border-radius: 16px; background: rgba(251, 191, 36, 0.08); text-align: center; }
.ax-lockout-title { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 6px; color: #fde68a; font-size: 0.92rem; font-weight: 800; }
.ax-lockout p { margin: 0; color: #fef3c7; font-size: 0.86rem; line-height: 1.45; }
.ax-timer { display: inline-block; margin: 10px 0 6px; padding: 6px 18px; border: 1px solid rgba(251, 191, 36, 0.4); border-radius: 12px; background: rgba(0, 0, 0, 0.25); color: #ffffff; font-size: 2rem; font-weight: 900; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.ax-timer-sub.is-done { color: #6ee7b7 !important; font-weight: 700; }
.ax-banned { padding: 26px 20px; border: 1px solid rgba(239, 68, 68, 0.45); border-radius: 18px; background: rgba(239, 68, 68, 0.08); text-align: center; }
.ax-banned-icon { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 18px; background: rgba(239, 68, 68, 0.18); color: #fca5a5; font-size: 1.6rem; }
.ax-banned h3 { margin: 0 0 8px; color: #ffffff !important; font-size: 1.2rem; font-weight: 800; }
.ax-banned p { margin: 0 0 8px; color: #fecaca; font-size: 0.88rem; line-height: 1.5; }
.ax-banned .ax-banned-sub { color: var(--ax-subtle); font-size: 0.8rem; }
.ax-banned a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 8px; padding: 0 18px; border-radius: 12px; background: #ef4444; color: #ffffff; font-weight: 800; text-decoration: none; }

/* Code input (2FA / email verification) */
html body .ax-shell .ax-input.ax-code {
    min-height: 62px;
    padding: 0 12px;
    text-align: center;
    font-size: 1.7rem; font-weight: 900;
    letter-spacing: 0.5em; text-indent: 0.5em;
    font-variant-numeric: tabular-nums;
}
html body .ax-shell .ax-input.ax-code::placeholder { letter-spacing: 0.5em; color: rgba(255, 255, 255, 0.2); }

/* Password checklist */
.ax-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.ax-meter span { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); transition: background 0.2s; }
.ax-meter[data-score="1"] span:nth-child(-n+1) { background: #ef4444; }
.ax-meter[data-score="2"] span:nth-child(-n+2) { background: #f59e0b; }
.ax-meter[data-score="3"] span:nth-child(-n+3) { background: #eab308; }
.ax-meter[data-score="4"] span { background: #10b981; }
.ax-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin: 2px 0 0; padding: 0; list-style: none; }
.ax-checklist li { display: flex; align-items: center; gap: 8px; color: var(--ax-subtle); font-size: 0.8rem; font-weight: 600; transition: color 0.15s; }
.ax-checklist li i { font-size: 0.8rem; }
.ax-checklist li.valid { color: #6ee7b7; }
.ax-match { min-height: 1.2em; font-size: 0.82rem; font-weight: 700; }
.ax-match.valid { color: #6ee7b7; }
.ax-match.invalid { color: #fca5a5; }

/* Terms tooltip */
.ax-info { position: relative; display: inline-flex; vertical-align: middle; margin-left: 4px; }
html body .ax-shell .ax-info-btn {
    display: grid; place-items: center;
    width: 22px; height: 22px; min-height: 0 !important;
    padding: 0; border: 0 !important; border-radius: 50%;
    background: rgba(127, 240, 255, 0.16) !important; box-shadow: none !important;
    color: var(--ax-link) !important; font-size: 0.7rem; cursor: pointer;
}
.ax-info-pop {
    position: absolute; bottom: calc(100% + 8px); left: 50%; z-index: 20;
    width: max-content; max-width: 260px;
    padding: 8px 12px; border: 1px solid rgba(0, 255, 135, 0.3); border-radius: 10px;
    background: #1c0832; color: var(--ax-green);
    font-size: 0.82rem; font-weight: 700;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    opacity: 0; visibility: hidden; transform: translate(-50%, 4px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.ax-info:hover .ax-info-pop, .ax-info:focus-within .ax-info-pop, .ax-info-pop.active { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

.ax-shell :is(a, button, input, select):focus-visible { outline: 2px solid var(--ax-link); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .ax-shell * { transition: none !important; animation: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .ax-shell { padding: 20px 14px 40px; min-height: 0; align-items: flex-start; }
    .ax-card, .ax-card.is-wide { grid-template-columns: 1fr; max-width: 520px; border-radius: 22px; }
    .ax-side { gap: 0; padding: 24px 22px; }
    .ax-side .ax-brand, .ax-side .ax-side-foot, .ax-perks { display: none; }
    .ax-side h1 { font-size: 1.5rem; margin-bottom: 8px; }
    .ax-side p { font-size: 0.9rem; }
    .ax-steps { grid-template-columns: repeat(3, auto); justify-content: start; gap: 14px; margin-top: 16px; }
    .ax-steps li { gap: 8px; font-size: 0.78rem; }
    .ax-steps li::before { width: 26px; height: 26px; }
    .ax-main { padding: 26px 22px 28px; }
    .ax-main h2 { font-size: 1.35rem; }
}
@media (max-width: 520px) {
    .ax-grid { grid-template-columns: 1fr; }
    .ax-checklist { grid-template-columns: 1fr; }
    .ax-steps li span { display: none; }
}
