:root {
    --bg-deep:      #0B0F14;
    --bg-panel:     #10161D;
    --line:         #1D2833;
    --text-main:    #DCE6EC;
    --text-dim:     #62727E;
    --amber:        #FFFFFF;
    --teal:         #3ED6C4;
    --red:          #E4573D;
    --green:        #4CD97B;
    --purple:       #B08CFF;

    --font-display: 'Rajdhani', sans-serif;
    --font-mono:    'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    background: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--font-mono);
    overflow: hidden;
}

.hidden { display: none !important; }

/* ============== BOOT SCREEN ============== */
.boot-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 50% 30%, #131B23 0%, #0B0F14 70%);
    transition: opacity 0.6s ease;
}

.boot-scanline {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.025) 0px,
        rgba(255,255,255,0.025) 1px,
        transparent 1px,
        transparent 3px
    );
    mix-blend-mode: overlay;
}

.boot-content {
    width: min(480px, 88vw);
    display: flex;
    flex-direction: column;
    gap: 36px;
    opacity: 0;
    animation: boot-fade-in 0.6s ease forwards 0.15s;
}

@keyframes boot-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.boot-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 40px;
    height: 40px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-panel);
    border: 1px solid var(--line);
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.brand-mark-fallback {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    background: var(--amber);
    color: var(--bg-deep);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 1px;
}

.boot-logo-text {
    font-family: var(--font-display);
    font-size: 23px;
    letter-spacing: 4px;
    color: var(--text-dim);
}
.boot-logo-text strong { color: var(--text-main); font-weight: 700; }

.boot-systems {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
}

.boot-system {
    display: grid;
    grid-template-columns: 14px 1fr auto;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    letter-spacing: 1px;
    color: var(--text-dim);
}

.boot-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2A3540;
    box-shadow: none;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.boot-system.online .boot-led {
    background: var(--teal);
    box-shadow: 0 0 8px var(--teal);
}

.boot-system.online .boot-status {
    color: var(--teal);
}

.boot-system-name { color: var(--text-main); }

.boot-status {
    font-size: 12.5px;
    color: var(--text-dim);
}

.boot-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.boot-bar {
    width: 100%;
    height: 3px;
    background: var(--line);
    overflow: hidden;
}

.boot-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--amber);
    transition: width 0.45s linear;
}

#boot-footer-text {
    font-size: 12.5px;
    letter-spacing: 2px;
    color: var(--text-dim);
}

/* ============== LOGIN SCREEN ============== */
.login-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 20%, #131B23 0%, #0B0F14 70%);
    opacity: 0;
    animation: boot-fade-in 0.5s ease forwards;
}

.login-panel {
    width: min(380px, 88vw);
    background: var(--bg-panel);
    border: 1px solid var(--line);
    padding: 32px 28px;
}

.login-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.login-title {
    font-family: var(--font-display);
    font-size: 18.5px;
    letter-spacing: 3px;
    font-weight: 700;
}

.login-subtitle {
    font-size: 12.5px;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12.5px;
    letter-spacing: 1px;
    color: var(--text-dim);
}

.field input {
    background: var(--bg-deep);
    border: 1px solid var(--line);
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 16px;
    padding: 10px 12px;
    outline: none;
}

.field input:focus {
    border-color: var(--amber);
}

.login-submit {
    margin-top: 6px;
    background: var(--amber);
    color: var(--bg-deep);
    border: none;
    padding: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 3px;
    font-size: 15px;
    cursor: pointer;
}

.login-submit:hover { filter: brightness(1.08); }
.login-submit:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.login-error {
    background: rgba(228, 87, 61, 0.12);
    border: 1px solid var(--red);
    color: var(--red);
    font-size: 14px;
    padding: 8px 10px;
}

.login-footer {
    margin-top: 22px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-dim);
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    .boot-content, .login-screen, .boot-led { animation: none !important; transition: none !important; }
    /* Ohne Animation muss der Endzustand (sichtbar) direkt gesetzt werden,
       sonst bleiben diese Elemente für immer bei opacity: 0 hängen. */
    .boot-content, .login-screen { opacity: 1 !important; transform: none !important; }
}