:root {
    --orange-50: #fff7ed;
    --orange-100: #ffedd5;
    --orange-200: #fed7aa;
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --orange-700: #c2410c;
    --ink: #2d261f;
    --muted: #756a60;
    --border: #eadfd4;
    --panel: rgba(255, 255, 255, 0.96);
    --shadow: 0 30px 75px rgba(100, 54, 18, 0.18);
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 28px;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 7% 6%, rgba(249, 115, 22, 0.24), transparent 27%),
        radial-gradient(circle at 94% 92%, rgba(251, 146, 60, 0.20), transparent 28%),
        linear-gradient(145deg, #fffaf5 0%, #f9eee5 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(1px);
}

body::before {
    width: 220px;
    height: 220px;
    top: -100px;
    right: 12%;
    border: 38px solid rgba(249, 115, 22, 0.06);
}

body::after {
    width: 150px;
    height: 150px;
    left: 7%;
    bottom: -80px;
    background: rgba(249, 115, 22, 0.07);
}

button,
input { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }

.login-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 1080px);
    min-height: 620px;
    display: grid;
    grid-template-columns: 1.04fr 0.96fr;
    overflow: hidden;
    border: 1px solid rgba(234, 223, 212, 0.92);
    border-radius: 30px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.login-brand {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 48px 44px;
    color: #fff;
    background: linear-gradient(145deg, #ff8c28 0%, var(--orange-600) 55%, #b83c08 100%);
}

.login-brand::before,
.login-brand::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
}

.login-brand::before {
    width: 390px;
    height: 390px;
    right: -210px;
    top: -170px;
    border: 72px solid rgba(255, 255, 255, 0.08);
}

.login-brand::after {
    width: 270px;
    height: 270px;
    left: -145px;
    bottom: -130px;
    background: rgba(255, 255, 255, 0.06);
}

.brand-badge {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.11);
    box-shadow: 0 8px 30px rgba(106, 38, 5, 0.08);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.13);
}

.brand-copy { margin: 58px 0 auto; }

.brand-mark {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 23px;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: 0 18px 42px rgba(119, 41, 5, 0.18);
    font-size: 2.2rem;
    font-weight: 850;
    letter-spacing: -0.06em;
}

.login-brand h1 {
    max-width: 430px;
    margin: 0 0 16px;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.login-brand p {
    max-width: 450px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1rem;
    line-height: 1.7;
}

.brand-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 42px;
    padding: 15px 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    background: rgba(105, 35, 4, 0.14);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.84rem;
    line-height: 1.5;
}

.brand-note svg {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    fill: currentColor;
}

.login-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px 52px 26px;
    background: rgba(255, 255, 255, 0.98);
}

.login-panel { width: 100%; }

.eyebrow {
    display: inline-flex;
    margin-bottom: 17px;
    padding: 7px 11px;
    border: 1px solid var(--orange-200);
    border-radius: 999px;
    background: var(--orange-50);
    color: var(--orange-700);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.login-panel h2 {
    margin: 0 0 8px;
    font-size: 2rem;
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.copy {
    margin: 0 0 28px;
    color: var(--muted);
    line-height: 1.55;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: -8px 0 22px;
    padding: 13px 14px;
    border: 1px solid #fecaca;
    border-radius: 14px;
    background: #fff1f2;
    color: #9f1239;
    font-size: 0.87rem;
    line-height: 1.42;
    outline: none;
}

.alert-warning {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.alert strong { display: block; margin-bottom: 2px; }

.alert-icon {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: currentColor;
    color: #fff;
    font-weight: 900;
}

.field-group { margin-bottom: 19px; }

.field-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #3e342b;
    font-size: 0.88rem;
    font-weight: 750;
}

.label-icon {
    width: 19px;
    height: 19px;
    display: inline-flex;
    color: var(--orange-600);
}

.label-icon svg { width: 100%; height: 100%; fill: currentColor; }

.field {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    border: 1px solid var(--border);
    border-radius: 13px;
    outline: none;
    background: #fffdfb;
    color: var(--ink);
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.field::placeholder { color: #aa9f95; }

.field:hover { border-color: #ddc9b7; }

.field:focus {
    border-color: var(--orange-500);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.password-wrap { position: relative; }

.password-wrap .field { padding-right: 52px; }

.toggle-password {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #8c7d70;
    cursor: pointer;
}

.toggle-password:hover,
.toggle-password:focus-visible {
    outline: none;
    background: var(--orange-50);
    color: var(--orange-600);
}

.toggle-password svg { width: 21px; height: 21px; fill: currentColor; }

.login-button {
    width: 100%;
    min-height: 51px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 6px;
    padding: 13px 18px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(180deg, var(--orange-500) 0%, var(--orange-600) 100%);
    color: #fff;
    box-shadow: 0 13px 27px rgba(234, 88, 12, 0.24);
    cursor: pointer;
    font-weight: 800;
    transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 17px 32px rgba(234, 88, 12, 0.30);
    filter: saturate(1.06);
}

.login-button:active { transform: translateY(0); }

.login-button:focus-visible {
    outline: 3px solid rgba(249, 115, 22, 0.28);
    outline-offset: 3px;
}

.login-button svg { width: 19px; height: 19px; fill: currentColor; }

.forgot-button {
    display: block;
    margin: 20px auto 0;
    padding: 4px;
    border: 0;
    background: transparent;
    color: var(--orange-700);
    cursor: pointer;
    font-size: 0.89rem;
    font-weight: 650;
}

.forgot-button:hover { text-decoration: underline; }

.forgot-button:focus-visible { outline: 2px solid var(--orange-500); outline-offset: 3px; border-radius: 4px; }

.login-footer {
    margin: auto 0 0;
    padding-top: 34px;
    color: #9c9085;
    text-align: center;
    font-size: 0.76rem;
}

.modal-backdrop {
    position: fixed;
    z-index: 50;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(45, 29, 17, 0.55);
    backdrop-filter: blur(5px);
}

.modal-backdrop[hidden] { display: none; }

.modal {
    width: min(100%, 470px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 30px 75px rgba(38, 22, 10, 0.30);
    animation: modal-in 180ms ease-out;
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 19px 21px;
    color: #fff;
    background: linear-gradient(145deg, #fb8a2b, var(--orange-600));
}

.modal-head span { display: block; margin-bottom: 3px; opacity: 0.78; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.modal-head h3 { margin: 0; font-size: 1.14rem; }

.modal-close {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
}

.modal-close:hover { background: rgba(255, 255, 255, 0.2); }

.modal-body { padding: 25px; text-align: center; }

.modal-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto 15px;
    border-radius: 18px;
    background: var(--orange-100);
    color: var(--orange-700);
}

.modal-icon svg { width: 29px; height: 29px; fill: currentColor; }
.modal-body p { margin: 0; color: var(--muted); line-height: 1.65; }

.modal-action {
    margin-top: 21px;
    padding: 11px 24px;
    border: 0;
    border-radius: 11px;
    background: var(--orange-600);
    color: #fff;
    cursor: pointer;
    font-weight: 750;
}

body.modal-open { overflow: hidden; }

@media (max-width: 820px) {
    body { padding: 16px; align-items: start; }

    .login-shell {
        min-height: 0;
        grid-template-columns: 1fr;
        border-radius: 24px;
    }

    .login-brand { padding: 24px; }
    .brand-copy { margin: 25px 0 0; }
    .brand-mark { width: 55px; height: 55px; margin-bottom: 18px; border-radius: 18px; font-size: 1.7rem; }
    .login-brand h1 { font-size: 1.75rem; }
    .login-brand p { font-size: 0.91rem; line-height: 1.55; }
    .brand-note { display: none; }
    .login-card { padding: 30px 24px 22px; }
    .login-footer { padding-top: 26px; }
}

@media (max-width: 420px) {
    body { padding: 0; background: #fff; }
    .login-shell { min-height: 100svh; border: 0; border-radius: 0; box-shadow: none; }
    .login-brand { padding: 19px 20px 22px; }
    .brand-badge { padding: 7px 11px; font-size: 0.75rem; }
    .brand-copy { margin-top: 18px; }
    .brand-mark { display: none; }
    .login-brand h1 { margin-bottom: 7px; font-size: 1.42rem; }
    .login-brand p { font-size: 0.83rem; }
    .login-card { justify-content: flex-start; padding: 27px 20px 18px; }
    .login-panel h2 { font-size: 1.7rem; }
    .copy { margin-bottom: 23px; }
}

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