/* Auth pages: sign in, forgot / reset password. Standalone, no framework, no inline styles (CSP-friendly). */
:root {
    --navy-900: #0b1722;
    --navy-800: #12263a;
    --navy-700: #1b3550;
    --accent: #e8730c;
    --accent-dark: #c85f06;
    --gold: #f7b733;
    --teal: #4abdac;
    --ink: #1c2733;
    --muted: #64748b;
    --line: #dbe2ea;
    --bg: #f3f5f8;
    --danger: #b42318;
    --danger-bg: #fef3f2;
    --ok: #067647;
    --ok-bg: #ecfdf3;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body.auth {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }

/* ---------- brand panel ---------- */
.auth-brand {
    position: relative; overflow: hidden; color: #fff;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 48px 56px;
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(232,115,12,.35), transparent 60%),
        radial-gradient(700px 500px at 0% 110%, rgba(74,189,172,.20), transparent 60%),
        linear-gradient(160deg, var(--navy-700) 0%, var(--navy-800) 45%, var(--navy-900) 100%);
}
.auth-brand::before {
    content: ""; position: absolute; width: 700px; height: 700px; right: -300px; bottom: -310px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600' fill='none' stroke='%23f7b733' stroke-width='1.2'%3E%3Ccircle cx='300' cy='300' r='44'/%3E%3Ccircle cx='300' cy='300' r='60' stroke-dasharray='2 6'/%3E%3Cellipse cx='300' cy='196' rx='26' ry='74' transform='rotate%280 300 300%29'/%3E%3Cellipse cx='300' cy='196' rx='26' ry='74' transform='rotate%2830 300 300%29'/%3E%3Cellipse cx='300' cy='196' rx='26' ry='74' transform='rotate%2860 300 300%29'/%3E%3Cellipse cx='300' cy='196' rx='26' ry='74' transform='rotate%2890 300 300%29'/%3E%3Cellipse cx='300' cy='196' rx='26' ry='74' transform='rotate%28120 300 300%29'/%3E%3Cellipse cx='300' cy='196' rx='26' ry='74' transform='rotate%28150 300 300%29'/%3E%3Cellipse cx='300' cy='196' rx='26' ry='74' transform='rotate%28180 300 300%29'/%3E%3Cellipse cx='300' cy='196' rx='26' ry='74' transform='rotate%28210 300 300%29'/%3E%3Cellipse cx='300' cy='196' rx='26' ry='74' transform='rotate%28240 300 300%29'/%3E%3Cellipse cx='300' cy='196' rx='26' ry='74' transform='rotate%28270 300 300%29'/%3E%3Cellipse cx='300' cy='196' rx='26' ry='74' transform='rotate%28300 300 300%29'/%3E%3Cellipse cx='300' cy='196' rx='26' ry='74' transform='rotate%28330 300 300%29'/%3E%3Cellipse cx='300' cy='150' rx='18' ry='52' transform='rotate%2815 300 300%29'/%3E%3Cellipse cx='300' cy='150' rx='18' ry='52' transform='rotate%2845 300 300%29'/%3E%3Cellipse cx='300' cy='150' rx='18' ry='52' transform='rotate%2875 300 300%29'/%3E%3Cellipse cx='300' cy='150' rx='18' ry='52' transform='rotate%28105 300 300%29'/%3E%3Cellipse cx='300' cy='150' rx='18' ry='52' transform='rotate%28135 300 300%29'/%3E%3Cellipse cx='300' cy='150' rx='18' ry='52' transform='rotate%28165 300 300%29'/%3E%3Cellipse cx='300' cy='150' rx='18' ry='52' transform='rotate%28195 300 300%29'/%3E%3Cellipse cx='300' cy='150' rx='18' ry='52' transform='rotate%28225 300 300%29'/%3E%3Cellipse cx='300' cy='150' rx='18' ry='52' transform='rotate%28255 300 300%29'/%3E%3Cellipse cx='300' cy='150' rx='18' ry='52' transform='rotate%28285 300 300%29'/%3E%3Cellipse cx='300' cy='150' rx='18' ry='52' transform='rotate%28315 300 300%29'/%3E%3Cellipse cx='300' cy='150' rx='18' ry='52' transform='rotate%28345 300 300%29'/%3E%3Ccircle cx='300' cy='300' r='238'/%3E%3Ccircle cx='300' cy='300' r='262' stroke-dasharray='1 7'/%3E%3Ccircle cx='300' cy='300' r='290'/%3E%3C/svg%3E"); background-size: contain; background-repeat: no-repeat;
    opacity: .38; pointer-events: none;
}
.auth-logo { display: block; width: 210px; height: auto; position: relative; }
.auth-hero { position: relative; max-width: 460px; }
.auth-hero h2 { margin: 0 0 14px; font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
.auth-hero p { margin: 0; font-size: 16px; line-height: 1.6; color: rgba(255,255,255,.78); }
.auth-points { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.auth-points li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: rgba(255,255,255,.9); }
.auth-points i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(247,183,51,.18); }
.auth-credit { position: relative; font-size: 12.5px; color: rgba(255,255,255,.55); }

/* ---------- form panel ---------- */
.auth-main { min-width: 0; display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.auth-card {
    width: 100%; max-width: 420px; background: #fff; border-radius: 16px; padding: 40px 36px 32px;
    box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 12px 32px -8px rgba(16,24,40,.14);
    border: 1px solid #eef1f5;
}
.auth-mobile-logo { display: none; }
.auth-card h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.auth-card .lead { margin: 0 0 24px; color: var(--muted); font-size: 15px; line-height: 1.5; }

.alert { margin: 0 0 18px; padding: 11px 14px; border-radius: 10px; font-size: 14px; line-height: 1.45; border: 1px solid transparent; }
.alert-error { color: var(--danger); background: var(--danger-bg); border-color: #fecdca; }
.alert-ok { color: var(--ok); background: var(--ok-bg); border-color: #abefc6; }

.auth-form label { display: block; margin: 0 0 6px; font-size: 13.5px; font-weight: 600; color: #344054; }
.field { position: relative; margin-bottom: 18px; }
.field > svg.ico { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; margin-top: -9px; stroke: #98a2b3; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.field input {
    width: 100%; height: 46px; padding: 0 14px 0 40px; font-size: 15px; color: var(--ink);
    background: #fff; border: 1px solid var(--line); border-radius: 10px; outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.field input.has-reveal { padding-right: 62px; }
.field input::placeholder { color: #a0aab8; }
.field input:hover { border-color: #c3ccd8; }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(232,115,12,.16); }
.reveal {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 34px; padding: 0 10px;
    border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
}
.reveal:hover { color: var(--ink); background: #f2f4f7; }
.reveal:focus-visible { outline: 2px solid var(--accent); }
.hint { margin: -10px 0 18px; font-size: 12.5px; color: var(--muted); min-height: 16px; }
.hint.warn { color: var(--danger); }

.btn-primary {
    display: block; width: 100%; height: 48px; margin-top: 6px; border: 0; border-radius: 10px; cursor: pointer;
    font-size: 15.5px; font-weight: 700; color: #fff; letter-spacing: .01em; text-align: center; text-decoration: none; line-height: 48px;
    background: linear-gradient(180deg, #f08419 0%, var(--accent) 100%);
    box-shadow: 0 1px 2px rgba(16,24,40,.2), inset 0 1px 0 rgba(255,255,255,.25);
    transition: transform .06s, box-shadow .15s, background .15s;
}
.btn-primary:hover { background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:focus-visible { outline: 3px solid rgba(232,115,12,.35); outline-offset: 2px; }
.btn-primary[disabled] { opacity: .7; cursor: progress; }

.aux { margin: 22px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.aux a { color: var(--accent-dark); font-weight: 600; text-decoration: none; }
.aux a:hover { text-decoration: underline; }
.aux a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: -8px 0 8px; }
.meter + .hint { margin-top: 0; }
.meter span { height: 4px; border-radius: 3px; background: #e4e9f0; transition: background .2s; }
.meter[data-level="1"] span:nth-child(-n+1) { background: #f04438; }
.meter[data-level="2"] span:nth-child(-n+2) { background: #f79009; }
.meter[data-level="3"] span:nth-child(-n+3) { background: #84caff; }
.meter[data-level="4"] span:nth-child(-n+4) { background: #12b76a; }

.status-icon { width: 56px; height: 56px; margin: 0 0 18px; border-radius: 50%; display: grid; place-items: center; background: #fff4e8; }
.status-icon svg { width: 28px; height: 28px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.status-icon.bad { background: var(--danger-bg); }
.status-icon.bad svg { stroke: var(--danger); }

.caps { display: none; margin: -10px 0 14px; font-size: 12.5px; color: #b54708; }
.caps.on { display: block; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-main { padding: 20px 16px; align-items: flex-start; padding-top: 6vh; background:
        radial-gradient(600px 300px at 50% -80px, rgba(232,115,12,.16), transparent 70%), var(--bg); }
    .auth-mobile-logo { display: block; margin: 0 auto 22px; width: 170px; height: auto; padding: 10px 14px; background: var(--navy-800); border-radius: 12px; }
    .auth-card { padding: 30px 22px 26px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
