/* =========================================================================
 * SkinsFlow — account pages (dashboard.skinsflow.com/auth/*): layouts/auth.php
 * Pushed into the head stack by the auth views. Builds on theme.css tokens and
 * borrows the marketing site's visual language (site.css): flow ribbon, mark
 * contour, slow glows, fading grid, frosted panels, real market items.
 *
 *   .auth              split grid: .auth-brand (≥ 960px only) + .auth-side
 *   .auth-brand        brand panel: deco layer, logo, title, .auth-points, .auth-market
 *     .auth-glow--a|b .auth-grid .auth-mark .auth-ribbon .auth-grain   (aria-hidden)
 *     .auth-market .auth-rail .auth-tile    compact live rail (views/auth/partials/market.php)
 *   .auth-side         .auth-top (logo on mobile + link to the other page) · .auth-main · .auth-foot
 *   .auth-card         the form card (frosted on desktop, flat on phones)
 *   .auth-head .auth-kicker .auth-form .auth-field .auth-label(-row) .auth-label-link
 *   .auth-input (+__icon __control __toggle)  .auth-hint .auth-error .auth-note(--warn|--ok|--bad)
 *   .auth-meter        password strength (4 bars + label)
 *   .auth-check        styled terms checkbox      .auth-captcha  reserved security-check slot
 *   .auth-submit       primary button with loading spinner
 *   .otp .otp__boxes .otp__box   six digit boxes (built by auth.js)
 *   .auth-switch .auth-help
 *
 * Phones: 16px+ inputs (no iOS zoom), 48px+ touch targets, safe-area insets,
 * nothing fixed over the keyboard, no motion or blur-heavy effects.
 * Every animation is off under prefers-reduced-motion (theme.css + below).
 * ========================================================================= */

.layout--auth {
    --grad-edge: linear-gradient(150deg, rgba(46, 230, 166, .5), rgba(255, 255, 255, .07) 30%, rgba(255, 255, 255, .04) 70%, rgba(139, 108, 255, .5));
    --ease: cubic-bezier(.2, .7, .2, 1);
    --field-h: 52px;
    --pad-x: max(var(--gutter), env(safe-area-inset-left), env(safe-area-inset-right));
    background: var(--bg);
}

.auth-skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--mint); color: var(--ink); font-weight: 700; font-size: 14px; }
.auth-skip:focus { top: calc(12px + env(safe-area-inset-top)); color: var(--ink); }

.auth { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }

/* ---------- Brand panel (desktop) -------------------------------------- */

.auth-brand { display: none; }

@media (min-width: 960px) {
    .auth { grid-template-columns: minmax(0, 1.08fr) minmax(500px, 1fr); }

    .auth-brand {
        display: block; position: sticky; top: 0; height: 100vh; height: 100dvh;
        overflow: hidden; isolation: isolate;
        background: radial-gradient(120% 80% at 0% 100%, rgba(46, 230, 166, .07), transparent 55%), linear-gradient(180deg, #0D131A, #0A0E13);
    }
    .auth-brand::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, transparent, rgba(46, 230, 166, .45) 30%, rgba(139, 108, 255, .45) 70%, transparent); }

    .auth-brand__deco { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
    .auth-brand__deco > * { position: absolute; pointer-events: none; }
    .auth-glow { width: 720px; aspect-ratio: 1; border-radius: 50%; will-change: transform; }
    .auth-glow--a { top: -32%; right: -26%; background: radial-gradient(closest-side, rgba(139, 108, 255, .28), rgba(139, 108, 255, .08) 55%, transparent); animation: auth-drift-a 26s ease-in-out infinite alternate; }
    .auth-glow--b { bottom: -40%; left: -28%; background: radial-gradient(closest-side, rgba(46, 230, 166, .17), rgba(46, 230, 166, .05) 55%, transparent); animation: auth-drift-b 30s ease-in-out infinite alternate; }
    @keyframes auth-drift-a { to { transform: translate(-8%, 10%) scale(1.08); } }
    @keyframes auth-drift-b { to { transform: translate(9%, -7%) scale(1.12); } }
    .auth-grid { inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 56px 56px; background-position: -1px -1px; -webkit-mask-image: radial-gradient(ellipse 80% 60% at 30% 30%, #000 10%, transparent 72%); mask-image: radial-gradient(ellipse 80% 60% at 30% 30%, #000 10%, transparent 72%); }
    .auth-mark { right: -24%; top: 5%; height: 58%; width: auto; max-width: none; opacity: .12; }
    .auth-ribbon { position: absolute; left: 18%; width: 112%; bottom: 3%; height: 27%; opacity: .6; overflow: visible; -webkit-mask-image: linear-gradient(90deg, transparent 2%, #000 26%); mask-image: linear-gradient(90deg, transparent 2%, #000 26%); }
    .auth-ribbon .ribbon__lines path { stroke-width: 1.1; vector-effect: non-scaling-stroke; }
    .auth-ribbon .ribbon__pulse { stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 26 974; stroke-dashoffset: 1000; animation: auth-pulse 8s linear infinite; }
    .auth-ribbon .ribbon__pulse--2 { animation-duration: 10s; animation-delay: -4s; }
    .auth-ribbon .ribbon__pulse--3 { animation-duration: 9s; animation-delay: -7s; }
    @keyframes auth-pulse { to { stroke-dashoffset: 0; } }
    .auth-grain { inset: 0; opacity: .05; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

    .auth-brand__inner { position: relative; height: 100%; display: flex; flex-direction: column; gap: 28px; padding: clamp(28px, 4.2vh, 44px) clamp(36px, 4.4vw, 64px) clamp(24px, 3.6vh, 36px); }
    .auth-brand__top .logo { font-size: 24px; }
    .auth-brand__top .logo svg { width: 34px; height: 34px; }
    .auth-brand__copy { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; max-width: 560px; min-height: 0; }
    .auth-brand__title { font-family: var(--f-display); font-weight: 700; font-size: clamp(46px, 5vw, 76px); line-height: .98; letter-spacing: -0.05em; text-wrap: balance; }
    .auth-brand__title .auth-grad { display: block; }
    .auth-brand__lead { color: #B4BDCB; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.6; max-width: 42ch; }

    .auth-points { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
    .auth-points li { display: flex; align-items: flex-start; gap: 14px; }
    .auth-points__icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--mint); border: 1px solid transparent; background: linear-gradient(#141B24, #141B24) padding-box, linear-gradient(140deg, rgba(46, 230, 166, .55), rgba(139, 108, 255, .45)) border-box; box-shadow: 0 0 26px -10px rgba(46, 230, 166, .5); }
    .auth-points__icon svg { width: 19px; height: 19px; }
    .auth-points__text { display: flex; flex-direction: column; gap: 1px; padding-top: 1px; }
    .auth-points__text strong { font-family: var(--f-display); font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; color: var(--fg); }
    .auth-points__text span { color: var(--muted); font-size: 14.5px; }
}

/* Short desktop windows: keep the panel calm and inside the viewport. */
@media (min-width: 960px) and (max-height: 820px) {
    .auth-brand__copy { gap: 16px; }
    .auth-brand__title { font-size: clamp(40px, 4.2vw, 60px); }
    .auth-points { gap: 12px; }
}
@media (min-width: 960px) and (max-height: 700px) {
    .auth-market { display: none; }
}

.auth-kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--mint); }
.auth-kicker::before { content: ""; width: 22px; height: 1px; flex: none; background: linear-gradient(90deg, var(--mint), var(--violet)); }
.auth-grad { background: linear-gradient(100deg, var(--mint) 0%, #9DF9D9 38%, var(--mint) 62%, #7FE9D0 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: auth-grad 9s ease-in-out infinite alternate; }
@keyframes auth-grad { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* ---------- Live market rail (brand panel) ----------------------------- */

.auth-market { display: flex; flex-direction: column; gap: 12px; margin-inline: clamp(-64px, -4.4vw, -36px); }
.auth-market__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-inline: clamp(36px, 4.4vw, 64px); }
.auth-live { display: inline-flex; align-items: center; gap: 9px; font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg); padding: 7px 12px 7px 10px; border-radius: 999px; background: rgba(46, 230, 166, .07); border: 1px solid rgba(46, 230, 166, .3); }
.auth-live__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(46, 230, 166, .2); animation: auth-beat 2.4s ease-in-out infinite; }
@keyframes auth-beat { 50% { box-shadow: 0 0 0 6px rgba(46, 230, 166, .05); } }
.auth-market__note { font: 12px/1.4 var(--f-mono); color: var(--muted); padding: 4px 10px; border-radius: 999px; background: rgba(10, 14, 19, .78); }

.auth-rail { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.auth-rail:focus-visible { outline-offset: -2px; }
.auth-rail__track { display: flex; width: max-content; padding-block: 4px 6px; animation: auth-rail var(--dur, 48s) linear infinite; will-change: transform; }
.auth-rail:hover .auth-rail__track, .auth-rail:focus-within .auth-rail__track { animation-play-state: paused; }
@keyframes auth-rail { to { transform: translateX(-50%); } }
.auth-rail__group { list-style: none; margin: 0; padding: 0 12px 0 0; display: flex; gap: 12px; }

.auth-tile { --rar: var(--violet); position: relative; flex: none; width: 264px; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .07); background: radial-gradient(70% 90% at 20% 50%, color-mix(in srgb, var(--rar) 22%, transparent), transparent 70%), linear-gradient(180deg, #161E28, #10161E); }
.auth-tile::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 2px; border-radius: 0 3px 3px 0; background: var(--rar); box-shadow: 0 0 14px 1px color-mix(in srgb, var(--rar) 70%, transparent); }
.auth-tile__img { flex: none; width: 72px; height: 54px; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .55)); }
.auth-tile__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.auth-tile__name { font: 600 13px/1.3 var(--f-body); color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-tile__foot { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.auth-tile__price { font: 600 14px/1 var(--f-mono); color: var(--mint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.auth-tile__wear { font: 10.5px/1.2 var(--f-mono); color: #8792A3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ---------- Form side --------------------------------------------------- */

.auth-side { position: relative; isolation: isolate; display: flex; flex-direction: column; min-width: 0; min-height: 100vh; min-height: 100dvh; }
.auth-side::before { content: ""; position: absolute; z-index: -1; inset: 0 0 auto; height: 420px; pointer-events: none; background: radial-gradient(60% 70% at 70% 0%, rgba(139, 108, 255, .10), transparent 70%), radial-gradient(50% 60% at 15% 0%, rgba(46, 230, 166, .06), transparent 70%); }

.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) var(--pad-x) 14px; }
.auth-top__alt { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); white-space: nowrap; min-width: 0; }
.auth-top__link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--fg); border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .03); transition: border-color .15s, background-color .15s; }
.auth-top__link:hover { color: var(--fg); border-color: rgba(46, 230, 166, .45); background: rgba(46, 230, 166, .06); }
@media (min-width: 960px) {
    .auth-top { justify-content: flex-end; padding: 24px clamp(28px, 3.4vw, 48px) 8px; }
    .auth-top__logo { display: none; }
}

.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: clamp(12px, 3vh, 32px) var(--pad-x) clamp(24px, 4vh, 48px); outline: none; }
.auth-card { width: 100%; max-width: 440px; padding: 0; } /* theme.css pads .auth-card for the old focus layout */
@media (min-width: 960px) {
    .auth-card { max-width: 452px; padding: 40px 40px 34px; border-radius: 24px; border: 1px solid transparent; background: linear-gradient(180deg, rgba(30, 39, 51, .55), rgba(16, 22, 30, .55)) padding-box, var(--grad-edge) border-box; -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 40px 100px -40px rgba(0, 0, 0, .8); }
}

.auth-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 20px; padding: 16px var(--pad-x) calc(20px + env(safe-area-inset-bottom)); font-size: 13px; color: #8792A3; }
.auth-foot__links { display: flex; gap: 4px 18px; flex-wrap: wrap; }
.auth-foot a { color: #8792A3; display: inline-flex; align-items: center; min-height: 32px; }
.auth-foot a:hover { color: var(--fg); }

/* ---------- Alerts inside the card ------------------------------------- */

.auth-card .alerts { margin-bottom: 22px; }
.auth-card .alert { position: relative; padding: 12px 14px 12px 42px; border-radius: 12px; border: 1px solid var(--line); border-left-width: 1px; font-size: 14px; line-height: 1.5; color: var(--fg); background: rgba(255, 255, 255, .03); }
.auth-card .alert::before { content: ""; position: absolute; left: 14px; top: 14px; width: 16px; height: 16px; border-radius: 50%; background: currentColor; -webkit-mask: var(--alert-icon) center / 16px no-repeat; mask: var(--alert-icon) center / 16px no-repeat; color: var(--info); }
.auth-card .alert--success { border-color: rgba(46, 230, 166, .35); background: rgba(46, 230, 166, .07); --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m7.5 12.5 3 3 6-6.5'/%3E%3C/svg%3E"); }
.auth-card .alert--success::before { color: var(--mint); }
.auth-card .alert--info { border-color: rgba(127, 184, 255, .35); background: rgba(127, 184, 255, .07); --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 11v6M12 7.5v.01'/%3E%3C/svg%3E"); }
.auth-card .alert--warning { border-color: rgba(255, 200, 97, .35); background: rgba(255, 200, 97, .07); --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v6M12 16.5v.01'/%3E%3C/svg%3E"); }
.auth-card .alert--warning::before { color: var(--warning); }
.auth-card .alert--danger { border-color: rgba(255, 122, 138, .4); background: rgba(255, 122, 138, .08); --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v6M12 16.5v.01'/%3E%3C/svg%3E"); }
.auth-card .alert--danger::before { color: var(--danger); }

/* ---------- Heading ----------------------------------------------------- */

.auth-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
@media (min-width: 960px) { .auth-head .auth-kicker { display: none; } }
.auth-head h1 { font-size: clamp(28px, 3vw, 34px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; }
.auth-head p { color: var(--muted); font-size: 15.5px; line-height: 1.55; }

/* ---------- Fields ------------------------------------------------------ */

.auth-form { display: flex; flex-direction: column; gap: 20px; }
.auth-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auth-label { font-size: 14px; font-weight: 600; color: var(--fg); }
.auth-label-link { font-size: 13.5px; font-weight: 600; color: var(--mint); padding: 6px 0; margin: -6px 0; }

.auth-input { position: relative; display: flex; align-items: center; }
.auth-input__icon { position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--faint); pointer-events: none; transition: color .15s; }
.auth-input__control,
.layout--auth .otp__single {
    width: 100%; height: var(--field-h); padding: 0 16px 0 46px;
    background: rgba(11, 15, 20, .72); color: var(--fg);
    border: 1px solid var(--line); border-radius: 14px;
    font: 500 16px/1.4 var(--f-body);
    transition: border-color .15s, box-shadow .15s, background-color .15s;
    scroll-margin-block: 96px 160px;
}
.auth-input__control::placeholder { color: var(--faint); }
.auth-input__control:hover { border-color: var(--line-2); }
.auth-input__control:focus { outline: none; border-color: var(--mint); background: rgba(11, 15, 20, .9); box-shadow: 0 0 0 4px rgba(46, 230, 166, .14); }
.auth-input:focus-within .auth-input__icon { color: var(--mint); }
.auth-input--password .auth-input__control { padding-right: 56px; }
.auth-input__control:-webkit-autofill { -webkit-text-fill-color: var(--fg); -webkit-box-shadow: 0 0 0 40px #121A22 inset; caret-color: var(--fg); }

.auth-input__toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 48px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.auth-input__toggle:hover { color: var(--fg); background: rgba(255, 255, 255, .05); }
.auth-input__toggle:focus-visible { outline: 2px solid var(--mint); outline-offset: -2px; }
.auth-input__toggle svg { width: 20px; height: 20px; }
.auth-eye--hide { display: none; }
.auth-input__toggle[aria-pressed="true"] .auth-eye--show { display: none; }
.auth-input__toggle[aria-pressed="true"] .auth-eye--hide { display: block; }
.auth-input__toggle[hidden] { display: none; }

.auth-field.has-error .auth-input__control,
.auth-field.has-error .otp__box,
.auth-field.has-error .otp__single { border-color: color-mix(in srgb, var(--danger) 75%, var(--line)); }
.auth-field.has-error .auth-input__control:focus,
.auth-field.has-error .otp__box:focus { box-shadow: 0 0 0 4px rgba(255, 122, 138, .16); border-color: var(--danger); }
.auth-field.has-error .auth-input__icon { color: var(--danger); }

.auth-hint { font-size: 13px; color: var(--muted); line-height: 1.5; }
.auth-error, .auth-note { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; line-height: 1.45; }
.auth-error { color: var(--danger); font-weight: 600; }
.auth-error svg, .auth-note svg { flex: none; width: 15px; height: 15px; margin-top: 1.5px; }
.auth-note { color: var(--muted); }
.auth-note--warn { color: var(--warning); }
.auth-note--ok { color: var(--mint); }
.auth-note--bad { color: var(--danger); }

/* Strength meter */
.auth-meter { display: flex; align-items: center; gap: 12px; }
.auth-meter__bars { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.auth-meter__bars span { height: 5px; border-radius: 999px; background: var(--panel-3); transition: background-color .25s, box-shadow .25s; }
.auth-meter__label { min-width: 64px; text-align: right; font: 600 12px/1 var(--f-mono); letter-spacing: .04em; color: var(--muted); }
.auth-meter[data-level="1"] .auth-meter__bars span:nth-child(-n+1),
.auth-meter[data-level="0"] .auth-meter__bars span:nth-child(-n+1) { background: var(--danger); }
.auth-meter[data-level="2"] .auth-meter__bars span:nth-child(-n+2) { background: var(--warning); }
.auth-meter[data-level="3"] .auth-meter__bars span:nth-child(-n+3) { background: #7FE9C4; }
.auth-meter[data-level="4"] .auth-meter__bars span:nth-child(-n+4) { background: var(--mint); box-shadow: 0 0 10px -2px rgba(46, 230, 166, .7); }
.auth-meter[data-level="0"] .auth-meter__label, .auth-meter[data-level="1"] .auth-meter__label { color: var(--danger); }
.auth-meter[data-level="2"] .auth-meter__label { color: var(--warning); }
.auth-meter[data-level="3"] .auth-meter__label, .auth-meter[data-level="4"] .auth-meter__label { color: var(--mint); }

/* Terms checkbox: the native input stays (keyboard, forms, validation), only re-skinned. */
.auth-check { position: relative; display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); font-size: 14px; line-height: 1.5; color: var(--muted); cursor: pointer; transition: border-color .15s, background-color .15s; }
.auth-check:hover { border-color: var(--line-2); }
.auth-check input { position: absolute; z-index: 1; left: 14px; top: 13px; width: 22px; height: 22px; margin: 0; opacity: 0; cursor: pointer; }
.auth-check__box { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-2); background: var(--ink); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); transition: background-color .15s, border-color .15s; }
.auth-check__box svg { width: 14px; height: 14px; stroke-width: 3; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s var(--ease); }
.auth-check input:checked + .auth-check__box { background: var(--mint); border-color: var(--mint); }
.auth-check input:checked + .auth-check__box svg { opacity: 1; transform: none; }
.auth-check input:focus-visible + .auth-check__box { outline: 2px solid var(--mint); outline-offset: 3px; }
.auth-check:has(input:checked) { border-color: rgba(46, 230, 166, .35); background: rgba(46, 230, 166, .04); }
.auth-check a { color: var(--fg); text-decoration: underline; text-decoration-color: rgba(46, 230, 166, .6); text-underline-offset: 3px; }
.auth-check a:hover { color: var(--mint); }
.auth-field.has-error .auth-check { border-color: color-mix(in srgb, var(--danger) 70%, var(--line)); }

/* Security check: a reserved slot, so the form does not jump when the widget loads. */
.auth-captcha { position: relative; min-height: 65px; border-radius: 10px; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .012) 0 8px, transparent 8px 16px); }
.auth-captcha .captcha { min-height: 65px; }
@media (max-width: 345px) {
    .auth-captcha .captcha { transform: scale(.92); transform-origin: 0 0; width: 300px; min-height: 60px; }
    .auth-captcha { min-height: 60px; }
}

/* Primary button */
.auth-submit { position: relative; min-height: 54px; margin-top: 4px; font-size: 16px; gap: 10px; box-shadow: 0 0 0 1px rgba(46, 230, 166, .25), 0 12px 32px -12px rgba(46, 230, 166, .65); transition: background-color .15s, box-shadow .25s, transform .25s var(--ease); }
.auth-submit:hover { box-shadow: 0 0 0 1px rgba(46, 230, 166, .4), 0 16px 40px -12px rgba(46, 230, 166, .75); }
.auth-submit__icon { width: 18px !important; height: 18px !important; transition: transform .25s var(--ease); }
.auth-submit:hover .auth-submit__icon { transform: translateX(3px); }
.auth-submit.is-loading, .auth-submit[disabled] { opacity: .85; cursor: progress; }
.auth-submit.is-loading .auth-submit__icon { display: none; }
.auth-submit.is-loading::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(11, 15, 20, .25); border-top-color: var(--ink); animation: spin .8s linear infinite; }

.auth-switch { margin-top: 24px; text-align: center; font-size: 14.5px; color: var(--muted); }
.auth-switch a { font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }
.auth-switch__sep { margin: 0 10px; color: var(--faint); }

.auth-help { display: flex; gap: 12px; align-items: flex-start; margin-top: 24px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); font-size: 14px; line-height: 1.55; color: var(--muted); }
.auth-help strong { color: var(--fg); }
.auth-help__icon { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--info); }
.auth-help a { overflow-wrap: anywhere; }

/* ---------- Two-factor digit boxes ------------------------------------- */

.layout--auth .otp__single { padding: 0 16px; text-align: center; font: 500 24px/1 var(--f-mono); letter-spacing: .5em; }
.otp__boxes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 10px repeat(3, minmax(0, 1fr)); gap: 8px; }
.otp__sep { align-self: center; height: 2px; border-radius: 2px; background: var(--line-2); }
.otp__box {
    width: 100%; min-width: 0; height: 64px; padding: 0; text-align: center;
    background: rgba(11, 15, 20, .72); color: var(--fg); caret-color: var(--mint);
    border: 1px solid var(--line); border-radius: 14px;
    font: 600 26px/1 var(--f-mono); font-variant-numeric: tabular-nums;
    transition: border-color .15s, box-shadow .15s, background-color .15s, transform .15s var(--ease);
}
.otp__box:hover { border-color: var(--line-2); }
.otp__box:focus { outline: none; border-color: var(--mint); background: rgba(11, 15, 20, .9); box-shadow: 0 0 0 4px rgba(46, 230, 166, .14); }
.otp__box.is-filled { border-color: rgba(46, 230, 166, .45); background: rgba(46, 230, 166, .05); }
.otp.is-complete .otp__box { border-color: var(--mint); }
.auth-field.has-error .otp__boxes { animation: auth-shake .4s var(--ease) 1; }
@keyframes auth-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* ---------- Phones ------------------------------------------------------ */

@media (max-width: 959px) {
    .layout--auth { --field-h: 54px; }
    .auth-top { position: relative; }
    .auth-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent 5%, rgba(46, 230, 166, .35) 35%, rgba(139, 108, 255, .35) 65%, transparent 95%); opacity: .6; }
    .auth-top .logo { font-size: 20px; }
    .auth-top .logo svg { width: 28px; height: 28px; }
    .auth-main { align-items: flex-start; padding-top: clamp(24px, 5vh, 56px); }
    .auth-head h1 { font-size: 30px; }
    .auth-grad { animation: none; }
}
@media (min-width: 600px) and (max-width: 959px) {
    .auth-main { padding-top: clamp(40px, 8vh, 96px); }
    .auth-card { max-width: 460px; }
}
@media (max-width: 420px) {
    .auth-top__q { display: none; }
    .auth-top__link { padding: 0 16px; }
    .auth-head { margin-bottom: 22px; }
    .auth-head p { font-size: 15px; }
    .otp__boxes { gap: 6px; grid-template-columns: repeat(3, minmax(0, 1fr)) 6px repeat(3, minmax(0, 1fr)); }
    .otp__box { height: 58px; font-size: 24px; border-radius: 12px; }
}
@media (max-width: 340px) {
    .auth-top .logo span { font-size: 18px; }
    .auth-top__link { padding: 0 14px; font-size: 13.5px; }
}

/* ---------- Reduced motion --------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .auth-ribbon .ribbon__pulses { display: none; }
    .auth-grad { animation: none; }
    .auth-rail { overflow-x: auto; scrollbar-width: none; }
    .auth-rail__track { animation: none; padding-inline: clamp(36px, 4.4vw, 64px); }
    .auth-rail__group--copy { display: none; }
}
