@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --brand: #f00000;
    --ink: #193b36;
    --muted: #63746e;
    --paper: #f5f7f3;
    --line: #dce5df;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 'DM Sans', system-ui, sans-serif; }
h1, h2, strong { font-family: Manrope, system-ui, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid #d68b26; outline-offset: 3px; }
.skip-link { position: fixed; top: -70px; left: 16px; z-index: 10; padding: 12px; background: #fff; }
.skip-link:focus { top: 10px; }

.top { max-width: 1240px; margin: auto; padding: 26px 28px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.identity { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.identity img { width: 54px; height: 54px; object-fit: contain; border-radius: 12px; }
.identity strong { display: block; font-size: 19px; line-height: 1.3; }
.identity small { display: block; font-size: 10px; font-weight: 700; letter-spacing: 2px; }
.back-link { font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.back-link:hover { color: var(--brand); }

.login-layout { max-width: 1184px; min-height: calc(100vh - 164px); margin: auto; padding: 55px 28px 50px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(400px, .92fr); align-items: center; gap: clamp(40px, 6vw, 90px); }
.eyebrow, .card-eyebrow { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.9px; }
.eyebrow { margin-bottom: 24px; }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--brand); }
.welcome h1 { max-width: 580px; margin: 0 0 24px; font-size: clamp(38px, 4.3vw, 60px); font-weight: 800; line-height: 1.13; letter-spacing: -2.5px; }
.welcome h1 em { color: var(--brand); font-style: normal; }
.welcome p { max-width: 510px; margin: 0; color: var(--muted); font-size: 18px; }

.city-art { position: relative; height: 245px; max-width: 500px; margin-top: 38px; overflow: hidden; border-radius: 70px 20px 20px 20px; background: #dce9df; }
.moon { position: absolute; top: 26px; right: 62px; width: 54px; height: 54px; border-radius: 50%; background: #f6f9e9; }
.pole { position: absolute; bottom: 30px; left: 46%; width: 7px; height: 180px; border-radius: 4px; background: #285c50; }
.pole::before { content: ''; position: absolute; top: 0; left: 0; width: 80px; height: 30px; border: 7px solid #285c50; border-bottom: 0; border-left: 0; border-radius: 0 35px 0 0; }
.pole span { position: absolute; top: 21px; left: 58px; width: 42px; height: 12px; border: 4px solid #285c50; border-radius: 20px; background: #d7df73; }
.light-beam { position: absolute; bottom: 30px; left: 36%; width: 205px; height: 170px; clip-path: polygon(56% 0, 70% 0, 100% 100%, 0 100%); background: linear-gradient(#fff4a9aa, #fff4a900); }
.building { position: absolute; bottom: 30px; border-radius: 5px 5px 0 0; background-color: #acc5b6; background-image: repeating-linear-gradient(90deg, transparent 0 20px, #d0e1d4 20px 28px, transparent 28px 45px); background-size: 100% 12px; background-repeat: repeat-y; }
.b1 { left: 0; width: 120px; height: 100px; }
.b2 { left: 95px; width: 100px; height: 65px; background-color: #93b5a3; }
.b3 { right: 0; width: 95px; height: 125px; }
.ground { position: absolute; bottom: 0; width: 100%; height: 31px; background: #c2d5c5; }
.art-label { position: absolute; bottom: 16px; left: 22px; display: flex; align-items: center; gap: 12px; padding: 11px 15px; border-radius: 12px; background: #ffffffed; box-shadow: 0 8px 25px #193b3610; font-size: 11px; line-height: 1.5; }
.art-label > span { color: var(--brand); font-size: 22px; }

.login-card { padding: 43px 42px 38px; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 20px; background: #fff; box-shadow: 0 16px 40px #15392d0c; }
.card-eyebrow { margin-bottom: 12px; color: var(--brand); }
.login-card h2 { margin: 0 0 8px; font-size: 32px; font-weight: 800; line-height: 1.2; letter-spacing: -1px; }
.card-intro { margin: 0 0 30px; color: var(--muted); font-size: 15px; }
.login-error { margin: 0 0 22px; padding: 13px 15px; border-radius: 10px; background: #fff0ed; color: #943d2c; font-size: 14px; }
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.field input { display: block; width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #cedbd3; border-radius: 9px; background: #fff; color: var(--ink); font-size: 16px; }
.field input::placeholder { color: #83958c; }
.field input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #fff inset; -webkit-text-fill-color: var(--ink); }
.field input:focus { border-color: var(--brand); outline: 3px solid #f0000026; outline-offset: 1px; }
.password-field { position: relative; }
.password-field input { padding-right: 92px; }
.password-toggle { position: absolute; top: 50%; right: 7px; transform: translateY(-50%); min-height: 38px; padding: 4px 9px; border: 0; border-radius: 6px; background: transparent; color: var(--brand); font-size: 13px; font-weight: 700; }
.password-toggle:hover { background: #fff0ee; }
.submit-button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 51px; margin-top: 29px; padding: 12px 19px; border: 0; border-radius: 10px; background: var(--brand); color: #fff; font-size: 15px; font-weight: 700; }
.submit-button:hover { filter: brightness(.93); }
.submit-button span { font-size: 20px; line-height: 1; }
.action-link { text-decoration: none; }
.password-hint { margin: -6px 0 0; color: var(--muted); font-size: 13px; }
.forgot-link { display: block; width: fit-content; margin: 23px auto 0; color: var(--brand); font-size: 14px; font-weight: 700; text-decoration: none; }
.forgot-link:hover { text-decoration: underline; }
.login-footer { max-width: 1184px; margin: auto; padding: 0 28px 24px; color: var(--muted); font-size: 12px; }

.reset-dialog { width: min(460px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 32px; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 25px 70px #0b221c30; }
.reset-dialog::backdrop { background: #0b221c99; }
.reset-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.reset-heading .card-eyebrow { margin: 6px 0 0; }
.reset-close { width: 34px; height: 34px; border: 0; border-radius: 8px; background: #f1f5f0; color: var(--ink); font-size: 24px; line-height: 1; }
.reset-close:hover { background: #e4ebe4; }
.reset-dialog h2 { margin: 10px 0 10px; font-size: 29px; line-height: 1.2; letter-spacing: -1px; }
.reset-dialog p { margin: 0 0 23px; color: var(--muted); font-size: 15px; }
.reset-dialog .field { margin-bottom: 0; }
.reset-dialog .submit-button { margin-top: 24px; }
.reset-status { margin-bottom: 20px; padding: 13px 15px; border-radius: 10px; background: #eaf5ec; color: #286541; font-size: 14px; }
.reset-status.error { background: #fff0ed; color: #943d2c; }
.reset-finish { display: block; width: 100%; min-height: 48px; padding: 11px 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 700; }
.reset-finish:hover { background: var(--paper); }

@media (max-width: 900px) {
    .login-layout { gap: 35px; grid-template-columns: minmax(0, 1fr) minmax(350px, .95fr); }
    .welcome h1 { font-size: 42px; }
    .city-art { height: 210px; }
    .login-card { padding: 32px 28px; }
}
@media (max-width: 760px) {
    .top { padding: 18px 20px; }
    .login-layout { min-height: 0; padding: 36px 20px 50px; grid-template-columns: 1fr; gap: 28px; }
    .welcome h1 { max-width: 600px; margin-bottom: 15px; font-size: clamp(34px, 8vw, 44px); }
    .welcome p { font-size: 16px; }
    .city-art { display: none; }
    .login-card { max-width: 560px; width: 100%; }
    .login-footer { padding: 0 20px 22px; }
}
@media (max-width: 480px) {
    .top { flex-wrap: wrap; gap: 10px; }
    .identity img { width: 44px; height: 44px; }
    .identity strong { font-size: 16px; }
    .identity small { font-size: 9px; letter-spacing: 1px; }
    .back-link { margin-left: auto; font-size: 12px; }
    .login-card { padding: 27px 21px; }
    .login-card h2 { font-size: 28px; }
    .reset-dialog { padding: 25px 21px; }
    .reset-dialog h2 { font-size: 26px; }
}
