/* Login / Register (08/10/2026). Self-contained; header = includes/navbar.php + css/shared-header.css. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: #07080c;
    color: #f2f4f8;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
.au-page {
    --au-bg: #07080c;
    --au-panel: #0e1118;
    --au-field: #0a0d13;
    --au-line: rgba(255, 255, 255, .09);
    --au-line-strong: rgba(255, 255, 255, .16);
    --au-text: #f2f4f8;
    --au-muted: #9aa3b2;
    --au-accent: #0099ff;
    --au-accent-2: #00d4ff;
    --au-danger: #ff5c6c;
    --au-ok: #22d3a6;
    --au-warn: #ffb547;
    min-height: 100vh;
    box-sizing: border-box;
    padding: 116px 16px 48px; /* fixed 76px shared navbar */
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(900px 500px at 15% 0%, rgba(0, 153, 255, .16), transparent 60%),
        radial-gradient(700px 420px at 100% 100%, rgba(0, 194, 255, .08), transparent 60%),
        var(--au-bg);
    color: var(--au-text);
}

.au-shell {
    width: 100%;
    max-width: 1040px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--au-line);
    border-radius: 20px;
    overflow: hidden;
    background: var(--au-panel);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}

/* ---- Brand panel ---- */
.au-brand {
    position: relative;
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    background:
        linear-gradient(160deg, rgba(0, 153, 255, .22), rgba(0, 153, 255, 0) 55%),
        linear-gradient(0deg, #0b0f19, #0b0f19);
    border-right: 1px solid var(--au-line);
    overflow: hidden;
}
.au-brand::after {
    content: "";
    position: absolute;
    inset: auto -120px -160px auto;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 194, 255, .18), transparent 70%);
    pointer-events: none;
}
.au-logo {
    font-family: 'Orbitron', sans-serif; /* same logo as the shared navbar */
    font-weight: 900;
    font-size: 15px;
    letter-spacing: .3em;
    color: #fff;
    text-decoration: none;
}
.au-logo span { color: var(--au-accent-2); }
.au-brand h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 800;
}
.au-brand h2 em {
    font-style: normal;
    background: linear-gradient(90deg, var(--au-accent), var(--au-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.au-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.au-perks li { display: flex; gap: 14px; align-items: flex-start; }
.au-perk-ico {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(0, 153, 255, .14);
    border: 1px solid rgba(0, 153, 255, .3);
    color: #7fd6ff;
}
.au-perks strong { display: block; font-size: 15px; margin-bottom: 2px; }
.au-perks p { margin: 0; font-size: 13.5px; color: var(--au-muted); line-height: 1.45; }
.au-trust {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--au-muted);
}
.au-trust svg { color: var(--au-ok); }

/* ---- Form panel ---- */
.au-form-wrap { padding: 48px 44px; }
.au-form-wrap h1 { margin: 0 0 6px; font-size: 28px; font-weight: 800; }
.au-sub { margin: 0 0 28px; color: var(--au-muted); font-size: 14.5px; }

.au-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.45;
}
.au-alert svg { flex: 0 0 18px; margin-top: 1px; }
.au-alert-error { background: rgba(255, 92, 108, .1); border: 1px solid rgba(255, 92, 108, .35); color: #ff9aa4; }
.au-alert-ok { background: rgba(34, 211, 166, .1); border: 1px solid rgba(34, 211, 166, .35); color: #7cebcd; }

.au-form { display: grid; gap: 18px; }
.au-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #d6dbe4;
    margin-bottom: 7px;
}
.au-input-wrap { position: relative; }
.au-input-wrap > svg.au-lead {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7485;
    pointer-events: none;
}
.au-input {
    width: 100%;
    box-sizing: border-box;
    height: 48px;
    padding: 0 46px 0 42px;
    border-radius: 12px;
    border: 1px solid var(--au-line-strong);
    background: var(--au-field);
    color: var(--au-text);
    font-size: 15px;
    transition: border-color .15s, box-shadow .15s;
}
.au-input::placeholder { color: #5d6575; }
.au-input:focus {
    outline: none;
    border-color: var(--au-accent);
    box-shadow: 0 0 0 4px rgba(0, 153, 255, .18);
}
.au-input-wrap:focus-within > svg.au-lead { color: #7fd6ff; }
.au-help { margin-top: 6px; font-size: 12.5px; color: #7c8596; }

.au-eye {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #7c8596;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.au-eye:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.au-eye:focus-visible { outline: 2px solid var(--au-accent); outline-offset: 1px; }
.au-eye .au-eye-off { display: none; }
.au-eye[aria-pressed="true"] .au-eye-on { display: none; }
.au-eye[aria-pressed="true"] .au-eye-off { display: block; }

/* Password strength (hint only; the server enforces the real rule). */
.au-meter { display: flex; gap: 5px; margin-top: 8px; }
.au-meter span { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); transition: background .2s; }
.au-meter[data-level="1"] span:nth-child(-n+1) { background: var(--au-danger); }
.au-meter[data-level="2"] span:nth-child(-n+2) { background: var(--au-warn); }
.au-meter[data-level="3"] span:nth-child(-n+3) { background: var(--au-ok); }
.au-meter-label { font-size: 12px; color: #7c8596; margin-top: 5px; min-height: 16px; }

.au-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.au-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 13.5px; color: #c4cad5; line-height: 1.4; }
.au-check input {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    border-radius: 5px;
    border: 1px solid var(--au-line-strong);
    background: var(--au-field);
    display: grid;
    place-items: center;
    cursor: pointer;
}
.au-check input::after {
    content: "";
    width: 9px;
    height: 5px;
    border: 2px solid #fff;
    border-top: 0;
    border-right: 0;
    transform: rotate(-45deg) translate(1px, -1px);
    opacity: 0;
}
.au-check input:checked { background: var(--au-accent); border-color: var(--au-accent); }
.au-check input:checked::after { opacity: 1; }
.au-check input:focus-visible { outline: 2px solid var(--au-accent); outline-offset: 2px; }

.au-link { color: #5cc8ff; text-decoration: none; font-weight: 600; }
.au-link:hover { color: #fff; text-decoration: underline; }
.au-muted-link { color: var(--au-muted); font-size: 13.5px; text-decoration: none; }
.au-muted-link:hover { color: #fff; }

.au-policies {
    border: 1px solid var(--au-line);
    border-radius: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, .02);
    display: grid;
    gap: 12px;
}
.au-policies-title { margin: 0; font-size: 13px; font-weight: 700; color: #d6dbe4; }
.au-risk {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(255, 181, 71, .08);
    border: 1px solid rgba(255, 181, 71, .25);
    color: #f2d29a;
    font-size: 12.5px;
    line-height: 1.5;
}
.au-risk svg { flex: 0 0 18px; color: var(--au-warn); margin-top: 1px; }
.au-risk strong { display: block; color: #ffd28a; margin-bottom: 2px; }

.au-btn {
    height: 50px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--au-accent), #0077e6);
    color: #fff;
    font-size: 15.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 26px rgba(0, 153, 255, .35);
    transition: transform .12s, box-shadow .12s, filter .12s;
}
.au-btn:hover { filter: brightness(1.08); box-shadow: 0 12px 30px rgba(0, 153, 255, .45); }
.au-btn:active { transform: translateY(1px); }
.au-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.au-btn[disabled] { opacity: .7; cursor: progress; }
.au-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    animation: au-spin .7s linear infinite;
}
.au-btn.is-loading .au-spinner { display: block; }
.au-btn.is-loading .au-btn-ico { display: none; }
@keyframes au-spin { to { transform: rotate(360deg); } }

.au-switch { margin: 24px 0 0; text-align: center; font-size: 14px; color: var(--au-muted); }

@media (max-width: 900px) {
    .au-shell { grid-template-columns: 1fr; max-width: 520px; }
    .au-brand { display: none; }
    .au-form-wrap { padding: 36px 24px; }
}
@media (max-width: 420px) {
    .au-page { padding-top: 100px; }
    .au-form-wrap { padding: 28px 18px; }
    .au-form-wrap h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .au-spinner { animation: none; }
    .au-btn, .au-input, .au-meter span { transition: none; }
}

/* fieldset/legend reset for the policy box */
fieldset.au-policies { margin: 0; min-width: 0; }
.au-policies > legend.au-policies-title { float: left; width: 100%; padding: 0; margin-bottom: 2px; }
.au-policies > legend + * { clear: both; }

/*
 * Overrides for the inline mobile-optimization CSS (getCompleteOptimizationHead), which
 * targets every a/button/checkbox (min-height:44px, padding:12px 16px, inline-flex) and
 * paints input:invalid red. Scoped to .au-page with higher specificity.
 */
.au-page .au-form .au-input { padding: 0 46px 0 42px; min-height: 0; height: 48px; }
.au-page .au-form .au-input:invalid { border-color: var(--au-line-strong); box-shadow: none; }
.au-page .au-form .au-input:focus { border-color: var(--au-accent); box-shadow: 0 0 0 4px rgba(0, 153, 255, .18); }
.au-page .au-form .au-input.touched:invalid:not(:focus) { border-color: rgba(255, 92, 108, .6); }
.au-page .au-link, .au-page .au-muted-link { display: inline; min-height: 0; min-width: 0; padding: 0; }
.au-page .au-eye { min-height: 0; min-width: 0; padding: 0; display: grid; }
.au-page .au-btn { min-height: 0; padding: 0 16px; display: flex; width: 100%; }
.au-page .au-check input[type="checkbox"] { width: 18px; height: 18px; min-width: 0; min-height: 0; padding: 0; display: grid; }
/* Eye button pinned inside the 48px field (no translate: external button margins shifted it). */
.au-page .au-input-wrap .au-eye { top: 6px; bottom: auto; transform: none; margin: 0; }
.au-page .au-check input[type="checkbox"]:invalid { border-color: var(--au-line-strong); box-shadow: none; }
.au-page .au-check input[type="checkbox"]:checked { border-color: var(--au-accent); }
.au-page .au-meter-label:empty { display: none; }
