:root {
    --background: #050511;
    --surface: rgba(15, 13, 38, .78);
    --line: rgba(153, 137, 255, .18);
    --muted: #8d8aa8;
    --text: #f6f4ff;
    --purple: #8b5cf6;
    --blue: #377dff;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--background); }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 15% 20%, rgba(91, 33, 182, .22), transparent 30%),
        radial-gradient(circle at 85% 80%, rgba(37, 99, 235, .17), transparent 28%),
        linear-gradient(135deg, #060510 0%, #080719 52%, #050615 100%);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .26;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.wave-background {
    position: fixed;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, transparent 5%, black 24%, black 82%, transparent 100%);
}

.wave {
    position: absolute;
    inset: -3%;
    background: url("../images/cyber-wave-hq.png") center / cover no-repeat;
    mix-blend-mode: screen;
    will-change: transform, opacity, filter;
}

.wave-one {
    opacity: .38;
    filter: saturate(1.08) contrast(1.08) drop-shadow(0 0 18px rgba(55, 125, 255, .18));
    animation: wave-drift 20s ease-in-out infinite alternate;
}

.wave-two {
    opacity: .07;
    transform: scaleX(-1);
    filter: hue-rotate(36deg) saturate(1.15) contrast(1.08);
    animation: wave-drift-reverse 28s ease-in-out infinite alternate;
}

@keyframes wave-drift {
    0% { transform: translate3d(-1%, .5%, 0) scale(1.01); opacity: .34; }
    50% { transform: translate3d(1%, -1%, 0) scale(1.025); opacity: .42; }
    100% { transform: translate3d(-.5%, .8%, 0) scale(1.015); opacity: .37; }
}

@keyframes wave-drift-reverse {
    0% { transform: translate3d(1%, .5%, 0) scaleX(-1) scale(1.015); }
    50% { transform: translate3d(-1%, -.7%, 0) scaleX(-1) scale(1.025); }
    100% { transform: translate3d(.5%, 1%, 0) scaleX(-1) scale(1.01); }
}

.login-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 48px));
    min-height: 100vh;
    margin: auto;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 96px;
    padding: 64px 0;
}

.intro { position: relative; z-index: 1; }

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .22em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(167, 139, 250, .5);
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(145deg, rgba(139, 92, 246, .35), rgba(55, 125, 255, .15));
    box-shadow: 0 0 28px rgba(139, 92, 246, .2);
}

.eyebrow {
    margin: 112px 0 22px;
    color: #aaa4d0;
    text-transform: uppercase;
    letter-spacing: .2em;
    font-size: 11px;
    font-weight: 700;
}

.eyebrow span {
    display: inline-block;
    width: 28px;
    height: 1px;
    margin: 0 12px 3px 0;
    background: var(--purple);
    box-shadow: 0 0 12px var(--purple);
}

h1 {
    max-width: 700px;
    margin: 0;
    font-size: clamp(54px, 7vw, 92px);
    line-height: .98;
    letter-spacing: -.065em;
    font-weight: 680;
}

h1 em {
    font-style: normal;
    color: transparent;
    background: linear-gradient(90deg, #a47cff, #5b8dff);
    background-clip: text;
    -webkit-background-clip: text;
}

.intro-copy {
    max-width: 520px;
    margin: 30px 0 68px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.system-status {
    width: min(480px, 100%);
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    color: #76728f;
    border-top: 1px solid var(--line);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.system-status div { display: flex; align-items: center; gap: 10px; }
.system-status strong { color: #bcb7d3; font-weight: 600; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #5ee69a; box-shadow: 0 0 12px #5ee69a; }

.login-panel {
    position: relative;
    isolation: isolate;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 40px 100px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.04);
    backdrop-filter: blur(24px);
    overflow: hidden;
}

.panel-glow {
    position: absolute;
    z-index: -1;
    width: 260px;
    height: 260px;
    top: -120px;
    right: -100px;
    border-radius: 50%;
    background: rgba(110, 70, 230, .22);
    filter: blur(50px);
}

.panel-content { padding: 44px; }
.panel-number { color: #777293; font: 600 10px/1 monospace; letter-spacing: .14em; }

h2 { margin: 54px 0 8px; font-size: 34px; letter-spacing: -.035em; }
.panel-content > p { margin: 0 0 36px; color: var(--muted); font-size: 14px; }

.notice {
    margin: -14px 0 22px;
    padding: 12px 14px;
    border: 1px solid rgba(139, 92, 246, .26);
    border-radius: 10px;
    color: #c9baff;
    background: rgba(139, 92, 246, .09);
    font-size: 12px;
    line-height: 1.5;
}

label { display: block; margin-bottom: 9px; color: #b9b5ca; font-size: 12px; font-weight: 600; }
.password-label { display: flex; justify-content: space-between; margin-top: 21px; }
.password-label label { margin: 0; }
.text-button { padding: 0; border: 0; color: #716d88; background: none; font-size: 11px; }

.field { position: relative; }
.field input {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    border: 1px solid rgba(160, 149, 207, .17);
    border-radius: 11px;
    outline: none;
    color: var(--text);
    background: rgba(5, 5, 17, .55);
    font-size: 14px;
    transition: border .2s, box-shadow .2s;
}
.field input::placeholder { color: #555168; }
.field input:focus { border-color: rgba(139, 92, 246, .72); box-shadow: 0 0 0 3px rgba(139, 92, 246, .1); }
.password-field input { padding-right: 76px; }

.reveal {
    position: absolute;
    right: 14px;
    top: 50%;
    translate: 0 -50%;
    padding: 5px;
    border: 0;
    color: #8b84a5;
    background: transparent;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .1em;
    cursor: pointer;
}

.remember { display: flex; align-items: center; gap: 10px; width: max-content; margin: 20px 0 28px; color: #8d89a0; font-weight: 400; cursor: pointer; }
.remember input { appearance: none; position: relative; width: 38px; height: 21px; margin: 0; border: 1px solid rgba(139,92,246,.28); border-radius: 20px; background: #25213d; cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.remember input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #aaa5b9; transition: left .2s ease, background .2s ease; }
.remember input:checked { border-color: #8b5cf6; background: #6844cd; }
.remember input:checked::after { left: 19px; background: #fff; }

.submit {
    width: 100%;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border: 0;
    border-radius: 11px;
    color: white;
    background: linear-gradient(100deg, #7042db, #416ff0);
    box-shadow: 0 18px 36px rgba(73, 63, 202, .24);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}
.submit:hover { transform: translateY(-2px); box-shadow: 0 22px 44px rgba(73, 63, 202, .34); }
.submit:active { transform: translateY(0); }
.submit b { font-size: 20px; font-weight: 400; }

footer { display: flex; justify-content: space-between; margin-top: 44px; color: #565269; font: 600 9px/1 monospace; letter-spacing: .1em; text-transform: uppercase; }

@media (max-width: 850px) {
    .login-shell { width: min(520px, calc(100% - 32px)); grid-template-columns: 1fr; gap: 52px; padding: 40px 0; }
    .eyebrow { margin-top: 72px; }
    .intro-copy { margin-bottom: 40px; }
}

@media (max-width: 520px) {
    .login-shell { width: min(100% - 24px, 460px); }
    h1 { font-size: 50px; }
    .panel-content { padding: 32px 24px; }
    h2 { margin-top: 42px; }
    .system-status { align-items: flex-start; gap: 18px; }
}

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