:root {
    color-scheme: dark;
    --red: #ff3038;
    --white: #f5f5f7;
    --muted: #929299;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100dvh;
    background: #030305;
    color: var(--white);
    font-family: -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Arial, sans-serif;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

#landscape {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.ambient-glow {
    position: fixed;
    inset: 0;
    background: radial-gradient(
        ellipse at 50% 70%,
        rgba(255, 20, 35, .09),
        transparent 65%
    );
    pointer-events: none;
}

.topbar {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 48px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 4px;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(145deg, #333338, #101012);
    border: 1px solid #ffffff25;
    color: var(--red);
    box-shadow: 0 0 25px #ff303820;
    letter-spacing: 0;
}

.red {
    color: var(--red);
}

.system-status {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--muted);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #777;
}

.status-dot.online {
    background: #35e68b;
    box-shadow: 0 0 14px #35e68b;
    animation: pulse 2s infinite;
}

.login-container {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

.hero {
    text-align: center;
    margin-bottom: 30px;
}

.eyebrow {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 5px;
    color: var(--red);
}

.hero h1 {
    margin: 14px 0;
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 750;
    letter-spacing: -2.5px;
    background: linear-gradient(180deg, #fff, #8e8e96);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    color: var(--muted);
    font-size: 14px;
    letter-spacing: 1px;
}

.login-card {
    position: relative;
    width: min(100%, 410px);
    padding: 32px;
    border-radius: 25px;
    border: 1px solid #ffffff24;
    background: linear-gradient(
        145deg,
        rgba(35, 35, 42, .78),
        rgba(8, 8, 12, .88)
    );
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 30px 100px #000b;
    overflow: hidden;
    animation: appear .8s ease both;
}

.card-accent {
    position: absolute;
    top: 0;
    left: -60%;
    width: 60%;
    height: 1px;
    background: linear-gradient(
        90deg, transparent, #ff4040, transparent
    );
    animation: scan 5s linear infinite;
}

.lock-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #ff303812;
    border: 1px solid #ff303830;
    color: var(--red);
    margin-bottom: 20px;
}

.login-card h2 {
    margin: 0 0 8px;
    font-size: 27px;
    letter-spacing: -1px;
}

.subtitle {
    color: var(--muted);
    font-size: 13px;
    margin: 0 0 26px;
}

label {
    display: block;
    margin: 16px 0 9px;
    color: #c5c5cb;
    font-size: 12px;
    font-weight: 500;
}

input {
    width: 100%;
    height: 48px;
    padding: 0 15px;
    border: 1px solid #ffffff20;
    border-radius: 10px;
    background: #08080bb0;
    color: white;
    outline: none;
    font-size: 13px;
    transition: .25s ease;
}

input:focus {
    border-color: var(--red);
    box-shadow: 0 0 18px #ff303820;
}

input::placeholder {
    color: #66666f;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 65px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0a0a8;
    font-size: 11px;
    cursor: pointer;
}

.login-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px 19px;
    margin-top: 20px;
    border: none;
    border-radius: 11px;
    background: linear-gradient(110deg, #bd101d, #ff353d);
    color: white;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 6px 28px #ff303830;
    transition: .25s ease;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 35px #ff303860;
}

.login-button:disabled {
    opacity: .6;
    cursor: wait;
}

.login-button::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 40%;
    background: linear-gradient(
        90deg, transparent, #ffffff35, transparent
    );
    transform: skewX(-20deg);
    animation: scan 5s infinite;
    pointer-events: none;
}

.arrow {
    font-size: 20px;
}

#login-message {
    color: #ff7777;
    font-size: 12px;
    line-height: 1.5;
}

#login-message:not(:empty) {
    margin-top: 14px;
}

.secure-label {
    text-align: center;
    color: #888891;
    font-size: 11px;
    margin-top: 22px;
}

.footer {
    position: relative;
    display: flex;
    justify-content: space-between;
    padding: 24px 48px;
    color: #777780;
    font-size: 9px;
    letter-spacing: 2px;
}

@keyframes scan {
    0% { left: -60%; }
    70%, 100% { left: 150%; }
}

@keyframes pulse {
    50% { opacity: .45; }
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .topbar {
        padding: 20px;
    }

    .brand {
        font-size: 16px;
        letter-spacing: 2px;
    }

    .system-status {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .login-card {
        padding: 25px;
    }

    .footer {
        padding: 20px;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .eyebrow {
        letter-spacing: 3px;
    }
}

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