:root {
    --teal-950: #072c50;
    --teal-900: #0b3d73;
    --teal-800: #0d6fb7;
    --teal-100: #dcecf8;
    --orange: #f58220;
    --orange-deep: #d95d0b;
    --canvas: #f1f6fb;
    --surface: #ffffff;
    --ink: #17324d;
    --muted: #6e8194;
    --line: #d6e2ee;
    --danger: #b64343;
    --shadow: 0 24px 70px rgba(7, 44, 80, .15);
}

* { box-sizing: border-box; }
html { min-width: 300px; background: var(--canvas); }
body { min-width: 300px; min-height: 100vh; margin: 0; color: var(--ink); background: var(--canvas); font-family: "DM Sans", sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }

.login-shell { position: relative; display: grid; place-items: center; min-height: 100vh; overflow: hidden; padding: 34px 18px; background: radial-gradient(circle at 12% 8%, rgba(91, 166, 220, .2), transparent 30%), linear-gradient(145deg, #f8fbff, #eef5fb 58%, #e6f0fa); }
.login-shell::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(11, 61, 115, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(11, 61, 115, .035) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, #000, transparent 82%); }
.login-glow { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(1px); }
.login-glow-one { top: -180px; right: -120px; width: 420px; height: 420px; border: 1px solid rgba(11, 61, 115, .13); box-shadow: 0 0 0 28px rgba(11, 61, 115, .035), 0 0 0 58px rgba(11, 61, 115, .025); }
.login-glow-two { bottom: -160px; left: -135px; width: 360px; height: 360px; background: rgba(245, 130, 32, .12); }
.login-main { position: relative; z-index: 1; width: min(100%, 400px); }

.login-brand { display: flex; align-items: center; justify-content: center; width: fit-content; margin: 0 auto 18px; color: var(--ink); text-decoration: none; }
.login-brand-image { display: block; width: min(240px, 76vw); height: auto; filter: drop-shadow(0 10px 16px rgba(7, 44, 80, .12)); }
.login-brand-mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; color: #fff; background: linear-gradient(145deg, #f9a03f, #d95d0b); box-shadow: 0 12px 25px rgba(217, 93, 11, .2); }
.login-brand-mark svg { width: 32px; height: 32px; }
.login-brand-copy { display: grid; gap: 2px; }
.login-brand-copy strong { font-family: "Plus Jakarta Sans", sans-serif; font-size: 1.18rem; letter-spacing: -.04em; }
.login-brand-copy small { color: var(--muted); font-size: .7rem; }

.login-card { padding: 20px; border: 1px solid rgba(214, 226, 238, .9); border-radius: 14px; background: rgba(255, 255, 255, .93); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.login-heading { margin-bottom: 16px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--teal-800); font-family: "Plus Jakarta Sans", sans-serif; font-size: .64rem; font-weight: 800; letter-spacing: .12em; }
.eyebrow i { width: 8px; height: 8px; border-radius: 3px; background: var(--orange); transform: rotate(45deg); }
.login-heading h1 { margin: 7px 0 5px; font-family: "Plus Jakarta Sans", sans-serif; font-size: clamp(1.5rem, 5vw, 1.9rem); line-height: 1.15; letter-spacing: -.045em; }
.login-heading p { max-width: 350px; margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.4; }

.field { display: block; margin-top: 11px; }
.field > span:first-child { display: block; margin-bottom: 5px; color: var(--ink); font-family: "Plus Jakarta Sans", sans-serif; font-size: .7rem; font-weight: 800; }
.field input { width: 100%; height: 40px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; outline: 0; color: var(--ink); background: #fbfdff; font-size: .76rem; transition: border-color .2s, box-shadow .2s, background .2s; }
.field input::placeholder { color: #9aaabd; }
.field input:focus { border-color: var(--teal-800); background: #fff; box-shadow: 0 0 0 4px rgba(13, 111, 183, .12); }
.password-control { position: relative; display: block; }
.password-control input { padding-right: 62px; }
.password-toggle { position: absolute; top: 50%; right: 10px; min-width: 42px; padding: 4px 6px; border: 0; color: var(--teal-800); background: transparent; font-size: .64rem; font-weight: 800; transform: translateY(-50%); }
.password-toggle:hover { color: var(--orange-deep); }
.password-strength { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.password-strength i { display: block; width: 62px; height: 5px; overflow: hidden; border-radius: 8px; background: var(--line); }
.password-strength i::after { content: ""; display: block; width: 0; height: 100%; border-radius: inherit; background: #c2d5e6; transition: width .2s, background .2s; }
.password-strength[data-level="weak"] i::after { width: 33%; background: #e9a258; }
.password-strength[data-level="medium"] i::after { width: 66%; background: #d8b14c; }
.password-strength[data-level="strong"] i::after { width: 100%; background: #38a57f; }
.password-strength small { color: var(--muted); font-size: .63rem; }

.captcha-box { margin-top: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #f4f8fc; }
.captcha-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.captcha-heading span, .captcha-heading small { display: block; }
.captcha-heading span { font-family: "Plus Jakarta Sans", sans-serif; font-size: .7rem; font-weight: 800; }
.captcha-heading small { margin-top: 2px; color: var(--muted); font-size: .62rem; }
.captcha-refresh { display: grid; place-items: center; width: 29px; height: 29px; padding: 0; border: 1px solid var(--line); border-radius: 9px; color: var(--teal-800); background: var(--surface); font-size: 1.05rem; }
.captcha-refresh:hover { border-color: var(--teal-800); color: var(--orange-deep); transform: rotate(-20deg); }
.captcha-row { display: grid; grid-template-columns: minmax(0, 1fr) 128px; align-items: center; gap: 8px; margin-top: 8px; }
#captcha-canvas, #captcha-image { display: block; width: 100%; max-width: 260px; height: 58px; border: 1px solid #c6dbea; border-radius: 9px; background: #eaf3fb; object-fit: fill; }
.captcha-row input { min-width: 0; height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; outline: 0; color: var(--ink); background: var(--surface); font-size: .72rem; letter-spacing: .04em; }
.captcha-row input:focus { border-color: var(--teal-800); box-shadow: 0 0 0 4px rgba(13, 111, 183, .12); }

.login-options { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; }
.check-label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .66rem; cursor: pointer; }
.check-label input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.check-label span { display: inline-grid; place-items: center; width: 17px; height: 17px; border: 1px solid #c0d4e5; border-radius: 5px; color: transparent; background: var(--surface); font-size: .7rem; font-weight: 800; }
.check-label input:checked + span { border-color: var(--teal-900); color: #fff; background: var(--teal-900); }
.security-note { display: inline-flex; align-items: center; gap: 6px; color: var(--teal-800); font-size: .64rem; font-weight: 700; }
.security-note i { width: 7px; height: 7px; border-radius: 50%; background: #50c28e; box-shadow: 0 0 0 4px rgba(80, 194, 142, .13); }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.login-submit { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; margin-top: 14px; padding: 0 16px 0 18px; border: 0; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--teal-900), var(--teal-800)); box-shadow: 0 11px 22px rgba(7, 61, 115, .19); font-family: "Plus Jakarta Sans", sans-serif; font-size: .76rem; font-weight: 800; transition: transform .2s, box-shadow .2s, opacity .2s; }
.login-submit-label { min-width: 0; }
.login-submit-arrow { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; background: rgba(255, 255, 255, .14); }
.login-submit:hover { transform: translateY(-2px); box-shadow: 0 15px 28px rgba(7, 61, 115, .24); }
.login-submit:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.login-errors { display: grid; gap: 2px; margin: -4px 0 4px; }
.login-errors .login-feedback { min-height: 0; margin: 0; }
.login-feedback { min-height: 16px; margin: 7px 2px 0; color: var(--muted); font-size: .66rem; line-height: 1.45; }
.login-feedback.error { color: var(--danger); }
.login-feedback.success { color: #218466; }
.login-footnote { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 11px 0 0; color: var(--muted); font-size: .63rem; text-align: center; }
.login-footnote span { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; color: #fff; background: var(--teal-800); font-size: .58rem; font-weight: 800; }
.noscript-note { margin: 10px auto 0; color: var(--danger); font-size: .66rem; text-align: center; }

button:focus-visible, input:focus-visible { outline: 3px solid rgba(245, 130, 32, .42); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (max-width: 520px) {
    .login-shell { padding: 24px 13px; }
    .login-card { padding: 16px 14px; border-radius: 14px; }
    .captcha-row { grid-template-columns: 1fr; }
    #captcha-canvas { max-width: none; }
    .captcha-row input { width: 100%; }
}

@media (max-width: 360px) {
    .login-options { align-items: flex-start; flex-direction: column; }
    .login-heading h1 { font-size: 1.45rem; }
}
