﻿/* MSIA Oculus — sign-in, sign-up and account settings. Shares tokens with gateway.css. */
:root {
    --ink: #0A1A33;
    --body: #425466;
    --muted: #6B7C93;
    --line: #E3E8EF;
    --soft: #F6F9FC;
    --brand: #00875A;
    --brand-hover: #006E49;
    --brand-tint: #E3F6EE;
    --indigo: #4F46E5;
    --danger: #C0362C;
    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body.auth, body.acct { margin: 0; font-family: var(--font); color: var(--body); -webkit-font-smoothing: antialiased; }
.auth h1, .auth h2, .auth h3, .acct h1, .acct h2, .acct h3, .acct h4 { color: var(--ink); letter-spacing: -.02em; }
.auth a, .acct a { color: var(--brand); text-decoration: none; font-weight: 600; }
.auth a:hover, .acct a:hover { color: var(--brand-hover); text-decoration: underline; }
.auth :focus-visible, .acct :focus-visible { outline: 3px solid rgba(79,70,229,.6); outline-offset: 2px; }

/* ---------- Form controls (Bootstrap overrides) ---------- */
.auth .form-label, .acct .form-label { font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: .35rem; }
.auth .form-control, .acct .form-control, .acct .form-select {
    font: inherit; color: var(--ink); border: 1px solid #CBD5E1; border-radius: 8px; padding: .68rem .85rem; box-shadow: 0 1px 1px rgba(0,0,0,.03);
}
.auth .form-control:focus, .acct .form-control:focus, .acct .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,135,90,.18); }
.auth .form-control:disabled, .acct .form-control:disabled { background: var(--soft); color: var(--muted); }
.auth .form-control.input-validation-error, .acct .form-control.input-validation-error { border-color: var(--danger); }
.auth .field-validation-error, .acct .field-validation-error, .auth .text-danger, .acct .text-danger { color: var(--danger) !important; font-size: .85rem; }
.auth .validation-summary-errors ul, .acct .validation-summary-errors ul { margin: 0 0 1rem; padding: .75rem 1rem .75rem 2rem; background: #FDECEA; border-radius: 8px; }
.auth .form-check-input:checked, .acct .form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.auth .form-check-input:focus, .acct .form-check-input:focus { box-shadow: 0 0 0 3px rgba(0,135,90,.18); border-color: var(--brand); }

.auth .btn, .acct .btn { font-weight: 600; border-radius: 999px; padding: .62rem 1.2rem; }
.auth .btn-brand, .acct .btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.auth .btn-brand:hover, .acct .btn-brand:hover, .auth .btn-brand:focus, .acct .btn-brand:focus { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }
.auth .btn-brand:disabled, .acct .btn-brand:disabled { background: #8CC7B1; border-color: #8CC7B1; }
.acct .btn-outline-ink { border: 1px solid #CBD5E1; color: var(--ink); background: #fff; }
.acct .btn-outline-ink:hover { border-color: var(--ink); color: var(--ink); }
.acct .btn-danger { background: var(--danger); border-color: var(--danger); }
.acct .btn-outline-danger { color: var(--danger); border-color: #E8B4AF; }
.acct .btn-outline-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.auth .btn-lg, .acct .btn-lg { padding: .8rem 1.3rem; font-size: 1rem; }

.auth .alert, .acct .alert { border: 0; border-radius: 10px; font-size: .92rem; }
.auth .alert-success, .acct .alert-success { background: var(--brand-tint); color: #05603A; }
.auth .alert-danger, .acct .alert-danger { background: #FDECEA; color: #8A1C12; }
.auth .alert-warning, .acct .alert-warning { background: #FFF4DB; color: #7A4D00; }
.auth .alert-info, .acct .alert-info { background: #EEF0FF; color: #312E81; }
.auth .alert p:last-child, .acct .alert p:last-child { margin-bottom: 0; }

/* password reveal */
.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 3rem; }
.pw-toggle { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); padding: .35rem .5rem; border-radius: 6px; line-height: 1; }
.pw-toggle:hover { color: var(--ink); }

/* ---------- Sign-in / sign-up shell ---------- */
.auth-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-main { display: flex; flex-direction: column; padding: 1.75rem clamp(1.25rem, 5vw, 4rem); background: #fff; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.auth-top img { height: 40px; width: auto; }
.auth-top .back { color: var(--body); font-weight: 600; font-size: .92rem; }
.auth-top__end { display: flex; align-items: center; gap: 1.1rem; }
.acct-user .ccy-picker { margin-right: .5rem; }
@media (max-width: 480px) { .auth-top .back span, .auth-top__end .back { font-size: .85rem; } }
.auth-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2.5rem 0; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card.is-wide { max-width: 600px; }
.auth-head { margin-bottom: 1.75rem; }
.auth-head h1 { font-size: 1.85rem; font-weight: 800; margin: 0 0 .4rem; line-height: 1.15; }
.auth-head p { margin: 0; font-size: 1rem; }
.auth-field { margin-bottom: 1.1rem; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: -.25rem 0 1.4rem; font-size: .92rem; }
.auth-alt { text-align: center; margin: 1.5rem 0 0; font-size: .95rem; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem 1.25rem; margin-top: .9rem; font-size: .88rem; }
.auth-links a { font-weight: 500; color: var(--body); }
.auth-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 1.25rem; background: var(--brand-tint); color: var(--brand); }
.auth-icon.is-warn { background: #FFF4DB; color: #9A6200; }
.auth-icon.is-danger { background: #FDECEA; color: var(--danger); }
.auth-foot { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; justify-content: space-between; font-size: .82rem; color: var(--muted); }
.auth-foot a { color: var(--muted); font-weight: 500; }

.auth-aside { position: relative; overflow: hidden; color: #fff; padding: clamp(2rem, 5vw, 4.5rem); display: flex; flex-direction: column; justify-content: center;
    background:
        radial-gradient(45% 50% at 15% 20%, rgba(0,195,137,.95), transparent 70%),
        radial-gradient(40% 45% at 85% 25%, rgba(0,184,217,.85), transparent 70%),
        radial-gradient(55% 60% at 70% 85%, rgba(79,70,229,.95), transparent 70%),
        radial-gradient(35% 35% at 20% 90%, rgba(255,176,32,.7), transparent 70%),
        #0A1A33;
}
.auth-aside::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,26,51,.05), rgba(10,26,51,.45)); pointer-events: none; }
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside h2 { color: #fff; font-size: clamp(1.8rem, 2.8vw, 2.6rem); line-height: 1.12; font-weight: 800; max-width: 16ch; margin: 0 0 1.25rem; }
.auth-aside ul { list-style: none; padding: 0; margin: 0 0 2.5rem; display: grid; gap: .7rem; font-size: 1rem; color: rgba(255,255,255,.92); }
.auth-aside li { display: flex; gap: .6rem; align-items: center; }
.auth-aside li i { color: #7FE3C4; }
.auth-preview { max-width: 380px; background: #fff; color: var(--body); border-radius: 14px; padding: 1.1rem 1.2rem; box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); font-size: .85rem; font-variant-numeric: tabular-nums; }
.auth-preview h4 { font-size: .8rem; font-weight: 600; color: var(--muted); margin: 0; letter-spacing: 0; }
.auth-preview strong { color: var(--ink); }
.auth-preview__value { font-size: 1.45rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin: .15rem 0 .5rem; }
.auth-preview ul { list-style: none; padding: 0; margin: .5rem 0 0; display: block; color: var(--body); font-size: .85rem; }
.auth-preview li { display: flex; justify-content: space-between; padding: .4rem 0; border-top: 1px solid var(--line); }
.auth-pill { font-size: .72rem; font-weight: 700; border-radius: 6px; padding: .05rem .45rem; background: var(--brand-tint); color: #0E9F6E; }
.auth-pill.is-wait { background: #FFF4DB; color: #9A6200; }

/* ---------- Account settings shell ---------- */
body.acct { background: var(--soft); }
.acct-bar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.acct-bar__in { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; height: 66px; display: flex; align-items: center; gap: 1.75rem; }
.acct-bar img { height: 34px; width: auto; }
.acct-bar nav { display: flex; gap: 1.25rem; margin-right: auto; }
.acct-bar nav a { color: var(--ink); font-size: .92rem; }
.acct-user { display: flex; align-items: center; gap: .75rem; font-size: .9rem; margin-left: auto; }
.acct-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #00C389, #4F46E5); color: #fff; font-weight: 800; font-size: .85rem; }
.acct-user form { margin: 0; }
.acct-main { max-width: 1140px; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.acct-title { margin-bottom: 1.75rem; }
.acct-title h1 { font-size: 1.75rem; font-weight: 800; margin: 0 0 .25rem; }
.acct-title p { margin: 0; }
.acct-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1.75rem; align-items: start; }
.acct-nav { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .5rem; position: sticky; top: 90px; }
.acct-nav a { display: flex; align-items: center; gap: .7rem; padding: .62rem .8rem; border-radius: 9px; color: var(--body); font-weight: 600; font-size: .93rem; }
.acct-nav a i { font-size: 1.05rem; color: var(--muted); }
.acct-nav a:hover { background: var(--soft); color: var(--ink); text-decoration: none; }
.acct-nav a.active { background: var(--brand-tint); color: var(--brand); }
.acct-nav a.active i { color: var(--brand); }
.acct-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: clamp(1.25rem, 3vw, 2rem); }
.acct-card + .acct-card { margin-top: 1.25rem; }
.acct-card__head { margin-bottom: 1.5rem; }
.acct-card__head h2 { font-size: 1.25rem; font-weight: 800; margin: 0 0 .3rem; }
.acct-card__head p { margin: 0; }
.acct-form { max-width: 480px; }
.acct-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.acct-section-title { font-size: 1rem; font-weight: 700; margin: 1.75rem 0 .75rem; }
.acct-steps { padding-left: 1.2rem; }
.acct-steps li { margin-bottom: 1.25rem; }
.acct-key { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: .1rem .4rem; color: var(--ink); }
.acct-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; max-width: 520px; }
.acct-codes code { display: block; text-align: center; padding: .6rem; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: .95rem; }
.acct-status { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 700; border-radius: 999px; padding: .15rem .6rem; }
.acct-status.is-on { background: var(--brand-tint); color: var(--brand); }
.acct-status.is-off { background: #EEF2F6; color: var(--muted); }
.acct-danger { border-color: #F3C7C2; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .acct-grid { grid-template-columns: 1fr; }
    .acct-nav { position: static; display: flex; overflow-x: auto; gap: .25rem; }
    .acct-nav a { white-space: nowrap; }
    .acct-bar nav { display: none; }
}
@media (max-width: 560px) {
    .acct-user span.email { display: none; }
}

/* reCAPTCHA writes an inline style to hide its response field; CSP blocks inline styles, so hide it here. */
.g-recaptcha-response { display: none !important; }
