:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    background: #18150f;
    color: #fff8e6;
}
* { box-sizing: border-box; }
.login-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: clamp(12px, 4vw, 48px);
    background: radial-gradient(ellipse at 20% 0%, #332819, transparent 60%), #18150f;
}
.login-shell {
    display: grid;
    grid-template-columns: 1.08fr 1fr;
    width: min(100%, 982px);
    align-items: center;
}
.login-scene {
    position: relative;
    min-height: 540px;
    isolation: isolate;
    background: radial-gradient(ellipse at 50% 72%, #3a2c1780, transparent 65%);
}
.login-logo {
    position: absolute;
    z-index: 1;
    top: 28px;
    left: 30px;
    width: 144px;
    height: auto;
    filter: brightness(0) invert(1);
}
.lamp {
    position: absolute;
    width: 330px;
    height: 325px;
    left: 50%;
    top: 54%;
    translate: -50% -50%;
}
.lamp > div, .lamp-switch { position: absolute; }
.lamp-beam {
    inset: 74px 9px 31px;
    clip-path: polygon(35% 0, 65% 0, 100% 100%, 0 100%);
    background: radial-gradient(ellipse at 50% 0%, #fff0aea3, transparent 65%),
        linear-gradient(#ffcf6288, #eab34438 57%, transparent);
    filter: blur(3px);
}
.lamp-floor {
    bottom: 21px;
    left: 3%;
    width: 94%;
    height: 83px;
    background: radial-gradient(ellipse at center, #ffd77798 0%, #d8a34440 38%, transparent 72%);
}
.lamp-stem {
    top: 66px;
    bottom: 49px;
    left: calc(50% - 4px);
    width: 8px;
    background: linear-gradient(90deg, #211a14, #887552 44%, #403224 75%, #17120d);
}
.lamp-base {
    bottom: 30px;
    left: calc(50% - 57px);
    width: 114px;
    height: 29px;
    border-radius: 50%;
    background: linear-gradient(#84745b, #3d3324 46%, #1c160f 63%);
    box-shadow: 0 10px 12px #100b07c0;
}
.lamp-shade {
    top: 27px;
    left: calc(50% - 68px);
    width: 136px;
    height: 54px;
    border-radius: 70px 70px 12px 12px;
    background: radial-gradient(ellipse at 53% -36%, #91816a, transparent 75%),
        linear-gradient(#534536, #251d15 80%);
    box-shadow: inset 0 1px 2px #c5aa807a;
}
.lamp-shade::after {
    content: '';
    position: absolute;
    inset: auto 6px -3px;
    height: 9px;
    border-radius: 50%;
    background: #ffe9a3;
    box-shadow: 0 4px 20px #ffd570c9;
}
.lamp-switch {
    z-index: 1;
    top: 76px;
    left: calc(50% + 25px);
    width: 48px;
    height: 92px;
    border: 0;
    border-radius: 12px;
    padding: 0;
    background: transparent;
    cursor: pointer;
    touch-action: none;
}
.lamp-switch span {
    display: block;
    position: absolute;
    top: 0;
    left: calc(50% - 1px);
    width: 2px;
    height: calc(62px + var(--cord-pull, 0px));
    background: #bdab87;
    transition: height 190ms cubic-bezier(.2,.8,.35,1);
}
.lamp-switch span::after {
    content: '';
    position: absolute;
    top: 100%;
    left: calc(50% - 5px);
    width: 10px;
    height: 15px;
    border-radius: 7px;
    background: linear-gradient(90deg, #79643f, #fbe3a9 54%, #765e36);
    box-shadow: 0 2px 5px #1d140c;
}
.lamp-switch.is-pulling { cursor: grabbing; }
.lamp-switch.is-pulling span { transition: none; }
.lamp-beam, .lamp-floor, .lamp-shade::after { transition: opacity 300ms ease; }
.lamp-off .lamp-beam, .lamp-off .lamp-floor { opacity: 0; }
.lamp-off .lamp-shade::after { opacity: .06; }
.lamp-off .login-scene { background: transparent; }
.lamp-off .login-content { visibility: hidden; opacity: 0; }
.login-panel {
    display: grid;
    align-items: center;
    padding: clamp(25px, 5vw, 65px);
}
.login-content { width: 100%; transition: opacity 300ms ease; }
.login-brand {
    margin: 0 0 9px;
    color: #efc672;
    font-weight: 650;
    letter-spacing: .02em;
}
.login-content h1 {
    margin: 0 0 30px;
    font-size: clamp(32px, 5vw, 46px);
    letter-spacing: -.045em;
    line-height: 1.08;
}
.login-content form { display: grid; gap: 17px; }
.login-field { display: grid; gap: 7px; }
.login-field label { font-size: 16px; color: #f0e4ce; }
.login-field input {
    width: 100%;
    min-height: 50px;
    padding: 10px 14px;
    border: 1px solid #827257;
    border-radius: 10px;
    background: #19150f;
    color: #fff8e6;
    font: inherit;
    font-size: 16px;
}
.login-submit {
    min-height: 50px;
    margin-top: 6px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(110deg, #ffda65, #f9b815);
    color: #2a1a02;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}
.login-submit:hover { background: #ffe497; }
.login-recovery {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 8px;
    color: #efd18e;
    font-size: 16px;
    text-underline-offset: 4px;
}
.login-error {
    margin: 0 0 15px;
    padding: 11px 13px;
    border: 1px solid #956b64;
    border-radius: 10px;
    background: #382823;
    color: #ffdcd4;
    font-size: 16px;
}
.login-page :focus-visible { outline: 2px solid #ffe19b; outline-offset: 3px; }
@media (max-width: 700px) {
    .login-page { align-items: start; padding: 12px clamp(16px, 5vw, 26px) 20px; }
    .login-shell { width: min(100%, 460px); grid-template-columns: minmax(0, 1fr); }
    .login-scene { min-height: 224px; overflow: clip; }
    .login-logo { width: 92px; top: 12px; left: 15px; }
    .lamp { top: 53%; left: 53%; scale: .72; }
    .lamp-switch { width: 70px; height: 118px; left: calc(50% + 15px); }
    .login-panel { padding: 4px 0 14px; }
    .login-content h1 { margin-bottom: 21px; }
    .login-content form { gap: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .lamp-switch span, .lamp-beam, .lamp-floor, .lamp-shade::after, .login-content { transition: none; }
}
