/* ==========================================================================
   Universe 369 — account pages (login, register, forgot, verify, success)
   Loaded on top of the legacy master-page CSS, so everything is scoped to
   .auth and sized in px (the legacy theme sets html { font-size: 17px }).
   ========================================================================== */

body:not(.loaded) { overflow: auto !important; }
body { background: #06080f !important; height: auto !important; }
#Form1, form#Form1 { background: transparent !important; }

.auth {
    --bg: #06080f;
    --bg-2: #0a0e1a;
    --surface: rgba(255, 255, 255, .04);
    --border: rgba(255, 255, 255, .1);
    --border-2: rgba(255, 255, 255, .16);
    --text: #eef1f8;
    --muted: #9ba4ba;
    --gold: #e3b45a;
    --gold-2: #f5d991;
    --gold-3: #b5832c;
    --blue: #4a86ff;
    --danger: #ff7b7b;
    --success: #3ddc97;
    --gold-grad: linear-gradient(120deg, #fff3cf 0%, #f5d991 22%, #e3b45a 50%, #b5832c 78%, #f5d991 100%);
    --ease: cubic-bezier(.22, .8, .24, 1);

    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100svh;
    background: var(--bg);
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted);
    -webkit-font-smoothing: antialiased;
    text-align: left;
}
.auth *, .auth *::before, .auth *::after { box-sizing: border-box; }
.auth a, .auth p, .auth span, .auth label, .auth li, .auth button, .auth h1, .auth h2, .auth h3, .auth td, .auth th {
    font-family: inherit;
    letter-spacing: normal;
}
.auth img { max-width: 100%; display: block; }

/* ---------- Visual pane ---------- */
.auth__visual {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    isolation: isolate;
    display: grid;
    place-items: center;
    padding: 48px;
    border-right: 1px solid var(--border);
}
.auth__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 45%; transform: scale(1.12); animation: authDrift 30s ease-in-out infinite alternate; }
@keyframes authDrift { to { transform: scale(1.2) translate(-1.5%, 1%) rotate(1.5deg); } }
.auth__visual::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(60% 50% at 50% 50%, transparent 0%, rgba(6, 8, 15, .55) 100%),
        linear-gradient(180deg, rgba(6, 8, 15, .35), rgba(6, 8, 15, .2) 40%, rgba(6, 8, 15, .85));
}
.auth__visual::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(70% 60% at 50% 50%, #000 10%, transparent 75%);
    -webkit-mask-image: radial-gradient(70% 60% at 50% 50%, #000 10%, transparent 75%);
}
.auth__stage { position: relative; width: min(100%, 520px); aspect-ratio: 1 / .82; }
.auth__terminal {
    position: absolute; inset: 8% 0 6% 6%;
    display: flex; flex-direction: column;
    border-radius: 26px; overflow: hidden;
    background: linear-gradient(160deg, rgba(255,255,255,.1), rgba(255,255,255,.02));
    border: 1px solid var(--border-2);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 50px 100px -30px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(255,255,255,.1);
}
.auth__bar { display: flex; gap: 7px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.auth__bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.18); }
.auth__bar i:nth-child(1) { background: #ff6b6b; opacity: .75; }
.auth__bar i:nth-child(2) { background: var(--gold); opacity: .85; }
.auth__bar i:nth-child(3) { background: var(--success); opacity: .75; }
.auth__chart { flex: 1; padding: 22px; }
.auth__chart svg { width: 100%; height: 100%; overflow: visible; }
.auth .chart-line { fill: none; stroke: url(#authLine); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: authDraw 2.8s .3s var(--ease) forwards; }
.auth .chart-area { opacity: 0; animation: authFade 1.4s 1.5s var(--ease) forwards; }
.auth .chart-dot { opacity: 0; animation: authFade .5s 2.9s forwards; }
.auth .candles rect { transform-box: fill-box; transform-origin: bottom; animation: authRise 1s var(--ease) both; }
@keyframes authDraw { to { stroke-dashoffset: 0; } }
@keyframes authFade { to { opacity: 1; } }
@keyframes authRise { from { transform: scaleY(0); } }

.auth__chip {
    position: absolute; z-index: 2;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px 12px 12px; border-radius: 18px;
    background: rgba(14, 19, 34, .8);
    border: 1px solid var(--border-2);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .75);
    animation: authFloat 6s ease-in-out infinite;
}
.auth__chip svg { width: 80px; height: 30px; }
.auth__chip-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; }
.auth__chip-icon--gold { background: var(--gold-grad); color: #1a1306; }
.auth__chip-icon--blue { background: linear-gradient(135deg, #7aa7ff, #1f4fd1); color: #fff; }
.auth__chip--a { left: -4%; bottom: 0; }
.auth__chip--b { right: -6%; top: 0; animation-delay: -3s; }
@keyframes authFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Form pane ---------- */
.auth__main {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    padding: 56px 32px;
    overflow: hidden;
    isolation: isolate;
}
.auth__main::before, .auth__main::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.auth__main::before { width: 420px; height: 420px; right: -160px; top: -140px; background: rgba(227, 180, 90, .16); }
.auth__main::after { width: 380px; height: 380px; left: -180px; bottom: -160px; background: rgba(74, 134, 255, .16); }

.auth__card { width: 100%; max-width: 440px; animation: authIn .9s var(--ease) both; }
.auth__card--wide { max-width: 560px; }
@keyframes authIn { from { opacity: 0; transform: translateY(24px); } }

.auth__logo { display: inline-block; margin-bottom: 40px; }
.auth__logo img { height: 46px; width: auto; }
.auth .auth__title {
    margin: 0 0 8px;
    font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -.025em;
    color: var(--text);
}
.auth .auth__title em { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; color: var(--gold-2); font-size: 1.1em; }
.auth__rule { width: 56px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--gold), transparent); margin: 18px 0 32px; }

/* status messages (asp:Label output) */
.auth__msg { display: grid; gap: 6px; margin-bottom: 4px; }
.auth__msg span:empty, .auth__msg br { display: none; }
.auth__msg span:not(:empty) {
    display: block;
    padding: 12px 16px; border-radius: 12px;
    font-size: 14px !important; font-weight: 600; line-height: 1.5;
    background: rgba(255, 123, 123, .08); border: 1px solid rgba(255, 123, 123, .3);
    color: var(--danger) !important;
}
.auth__msg .is-ok:not(:empty), .auth__msg span[style*="Green"]:not(:empty) {
    background: rgba(61, 220, 151, .08); border-color: rgba(61, 220, 151, .3); color: var(--success) !important;
}

/* ---------- Fields ---------- */
.auth__fields { display: grid; gap: 16px; }
.auth__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
/* the UpdatePanel renders its own wrapper div — let it span and lay out its two fields */
.auth__pair > div:only-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.auth .field { position: relative; display: block; margin: 0; }
.auth .field__label { display: block; margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.auth .field__icon {
    position: absolute; left: 16px; top: 26px; transform: translateY(-50%); z-index: 2;
    font-size: 19px; line-height: 1; color: #6f7891; pointer-events: none;
    transition: color .25s var(--ease);
}
.auth .field:focus-within .field__icon { color: var(--gold-2); }
.auth input.field__input, .auth select.field__input, .auth .field__prefix {
    display: block; width: 100%; height: 52px; margin: 0;
    padding: 0 16px 0 48px;
    font-family: inherit; font-size: 15px !important; font-weight: 500; line-height: 52px;
    color: var(--text) !important;
    background: rgba(255, 255, 255, .04) !important;
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
    outline: none; box-shadow: none;
    transition: border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
    -webkit-appearance: none; appearance: none;
}
.auth input.field__input::placeholder { color: #6f7891 !important; font-size: 15px !important; opacity: 1; }
.auth input.field__input:hover, .auth select.field__input:hover { border-color: var(--border-2) !important; }
.auth input.field__input:focus, .auth select.field__input:focus {
    border-color: rgba(227, 180, 90, .7) !important;
    background: rgba(255, 255, 255, .06) !important;
    box-shadow: 0 0 0 4px rgba(227, 180, 90, .12) !important;
}
.auth input.field__input:disabled, .auth input.field__input.aspNetDisabled { opacity: .75; cursor: not-allowed; background: rgba(255, 255, 255, .02) !important; border-style: dashed !important; }
.auth input.field__input:-webkit-autofill,
.auth input.field__input:-webkit-autofill:hover,
.auth input.field__input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text) !important;
    -webkit-box-shadow: 0 0 0 1000px #121726 inset !important;
    caret-color: var(--text);
    transition: background-color 9999s;
}
.auth select.field__input {
    cursor: pointer; padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239ba4ba' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
}
.auth select.field__input option { background: #10141f; color: var(--text); }
.auth .field--plain input.field__input { padding-left: 18px; }
.auth .field--pw input.field__input { padding-right: 52px; }

/* country code + mobile */
.auth .field--phone { display: grid; grid-template-columns: 112px 1fr; gap: 0 10px; }
.auth .field__prefix { padding: 0 12px 0 44px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--gold-2) !important; font-weight: 600; }
.auth .field__prefix:empty::after { content: "+"; color: #6f7891; }
.auth .field--phone .field__validators { grid-column: 1 / -1; }

.auth .toggle-eye {
    position: absolute; right: 8px; top: 26px; transform: translateY(-50%); z-index: 3;
    width: 38px; height: 38px; border-radius: 10px;
    display: grid; place-items: center;
    font-size: 19px; color: #8a93ab; cursor: pointer;
    transition: color .2s, background .2s;
}
.auth .toggle-eye:hover { color: var(--gold-2); background: rgba(255,255,255,.06); }

/* validators */
.auth .field__validators { display: block; }
.auth .field__validators span, .auth .validator {
    display: block; margin-top: 6px;
    font-size: 13px !important; font-weight: 500; line-height: 1.4;
    color: var(--danger) !important;
}
.auth .field__validators span[style*="display:none"] { display: none !important; }
.auth .field__validators span[style*="visibility:hidden"] { display: none !important; }

/* options row */
.auth__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.auth .check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--muted); user-select: none; }
.auth .check input {
    -webkit-appearance: none; appearance: none;
    width: 20px; height: 20px; margin: 0; padding: 0; flex: none;
    border-radius: 6px !important; border: 1px solid var(--border-2) !important;
    background: rgba(255,255,255,.04) !important; cursor: pointer;
    display: grid; place-items: center;
    transition: background .2s, border-color .2s;
}
.auth .check input::after { content: ""; width: 5px; height: 10px; border: solid #1a1306; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px) scale(0); transition: transform .2s var(--ease); }
.auth .check input:checked { background: var(--gold-grad) !important; border-color: var(--gold) !important; }
.auth .check input:checked::after { transform: rotate(45deg) translate(-1px, -1px) scale(1); }
.auth .link, .auth a.link { color: var(--gold-2) !important; font-weight: 600; font-size: 14px; text-decoration: none; transition: color .2s; }
.auth .link:hover { color: #fff3cf !important; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Buttons ---------- */
.auth .auth-btn, .auth input.auth-btn, .auth a.auth-btn, .auth button.auth-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; height: 54px; margin: 10px 0 0; padding: 0 24px;
    border: 0 !important; border-radius: 999px !important;
    background: var(--gold-grad) !important; background-size: 160% auto !important;
    color: #1a1306 !important;
    font-family: inherit; font-size: 15px !important; font-weight: 700; letter-spacing: .08em; line-height: 54px; text-transform: uppercase; text-decoration: none !important;
    cursor: pointer;
    box-shadow: 0 16px 40px -14px rgba(227, 180, 90, .75), inset 0 1px 0 rgba(255,255,255,.5);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-position .5s var(--ease);
    -webkit-appearance: none; appearance: none;
}
.auth .auth-btn:hover { transform: translateY(-2px); background-position: 100% center !important; box-shadow: 0 22px 50px -14px rgba(227, 180, 90, .9), inset 0 1px 0 rgba(255,255,255,.5); }
.auth .auth-btn:active { transform: translateY(0); }

.auth__alt { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); text-align: center; }
.auth__alt a { margin-left: 4px; }

/* ---------- Result pages (verify / success) ---------- */
.auth__badge {
    width: 72px; height: 72px; margin-bottom: 28px;
    border-radius: 22px; display: grid; place-items: center;
    font-size: 36px; color: #1a1306;
    background: var(--gold-grad);
    box-shadow: 0 24px 50px -16px rgba(227, 180, 90, .75);
    animation: authPop .8s .2s var(--ease) both;
}
@keyframes authPop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } }
.auth .auth__lead { margin: 0; font-size: 16px; line-height: 1.75; color: #c3cadb; }
.auth .auth__lead strong { color: var(--gold-2); font-weight: 700; }
.auth .auth__subtitle { margin: 32px 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.auth .details {
    width: 100%; border-collapse: separate; border-spacing: 0; margin: 0;
    border: 1px solid var(--border-2); border-radius: 18px; overflow: hidden;
    background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
    box-shadow: none;
}
.auth .details th, .auth .details td {
    padding: 16px 20px; text-align: left; vertical-align: middle;
    border: 0; border-bottom: 1px solid var(--border);
    font-size: 15px; line-height: 1.4; background: none;
}
.auth .details tr:last-child th, .auth .details tr:last-child td { border-bottom: 0; }
.auth .details th { width: 40%; font-weight: 600; color: var(--muted) !important; }
.auth .details td, .auth .details td span { color: var(--text) !important; font-weight: 700; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 15px; word-break: break-all; }
.auth .details td span:empty::after { content: "—"; color: #6f7891; font-weight: 400; }
.auth a.auth-btn--link { margin-top: 28px; }

/* ---------- Success modal (register) ---------- */
.auth-modal {
    position: fixed; inset: 0; z-index: 1000;
    display: none; align-items: center; justify-content: center;
    padding: 24px;
    background: rgba(3, 5, 10, .72);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.auth-modal.is-open, .auth-modal.uk-open { display: flex; animation: authFade .3s ease both; opacity: 1; }
.auth-modal__dialog {
    width: 100%; max-width: 420px; padding: 40px 32px 32px;
    border-radius: 26px; text-align: center;
    background: linear-gradient(170deg, #121a30, #0a0e1a);
    border: 1px solid var(--border-2);
    box-shadow: 0 50px 100px -30px rgba(0,0,0,.9);
    animation: authIn .5s var(--ease) both;
}
.auth-modal .success-tick {
    position: relative; width: 76px; height: 76px; margin: 0 auto 22px;
    border-radius: 50%; background: var(--gold-grad);
    box-shadow: 0 0 0 10px rgba(227, 180, 90, .12), 0 24px 50px -16px rgba(227, 180, 90, .8);
}
.auth-modal .success-tick::after {
    content: ""; position: absolute; left: 28px; top: 16px;
    width: 16px; height: 32px; border: solid #1a1306; border-width: 0 5px 5px 0; transform: rotate(45deg);
}
.auth-modal h3 { margin: 0 0 10px; font-size: 24px; font-weight: 700; color: var(--text); }
.auth-modal p { margin: 0 0 8px; font-size: 15px; line-height: 1.6; color: #c3cadb !important; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .auth { grid-template-columns: 1fr; }
    .auth__visual { display: none; }
    .auth__main { min-height: 100vh; min-height: 100svh; padding: 40px 20px; }
    .auth__main { background: radial-gradient(120% 60% at 50% 0%, rgba(31, 79, 209, .18), transparent 60%), var(--bg); }
}
@media (max-width: 520px) {
    .auth__logo { margin-bottom: 32px; }
    .auth__logo img { height: 38px; }
    .auth .auth__title { font-size: 28px; }
    .auth__pair, .auth__pair > div:only-child { grid-template-columns: 1fr; }
    .auth .field--phone { grid-template-columns: 96px 1fr; }
    .auth .details th, .auth .details td { padding: 14px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .auth *, .auth *::before, .auth *::after { animation: none !important; transition: none !important; }
    .auth .chart-line { stroke-dashoffset: 0; }
    .auth .chart-area, .auth .chart-dot { opacity: 1; }
}
