/* =====================================================================
   VICE EMERGENCY – Theme (lila Neon / Vice-City-Stil)
   Wird NACH main.css und dashboard.css geladen und überschreibt
   nur Optik. Farben stecken in den Variablen in main.css (:root).
   ===================================================================== */

:root {
    --vice-grad:   linear-gradient(90deg, #A84DFF 0%, #FF4FD8 100%);
    --vice-grad-v: linear-gradient(180deg, #A84DFF 0%, #FF4FD8 100%);
    --radius:      10px;
}

::selection { background: rgba(255, 79, 216, 0.45); color: #fff; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: #6A3FB5 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #4b2a8a; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #A84DFF; background-clip: padding-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* =====================================================================
   BOOT / LADEANIMATION
   Ablauf: Sterne → Sonne geht auf → Skyline + Grid fahren ein →
           Logo flackert an → Abteilungen gehen online → Flash → Login
   ===================================================================== */
.boot-screen {
    position: fixed;
    inset: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(180deg,
            #070112 0%, #1a0845 34%, #5a1a96 52%, #c4309a 63%, #ff6a9a 68%, #ffa66b 69.5%,
            #12052b 69.6%, #0b0618 100%);
    transition: opacity 0.7s ease;
}

.vb-stars {
    position: absolute; inset: 0 0 36% 0;
    background-image:
        radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 27% 40%, #fff 50%, transparent 51%),
        radial-gradient(1.4px 1.4px at 41% 12%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 58% 30%, #fff 50%, transparent 51%),
        radial-gradient(1.3px 1.3px at 73% 15%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 86% 36%, #fff 50%, transparent 51%),
        radial-gradient(1.2px 1.2px at 93% 10%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 6% 44%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 66% 46%, #fff 50%, transparent 51%);
    opacity: 0;
    animation: vb-fade 1.2s ease forwards 0.1s, vb-twinkle 3s ease-in-out infinite 1.4s;
}

/* Sonne – steigt hinter dem Horizont auf, untere Hälfte mit Streifen */
.vb-sun {
    position: absolute;
    left: 50%;
    bottom: 31%;
    width: min(46vh, 80vw);
    aspect-ratio: 1;
    margin-left: calc(min(46vh, 80vw) / -2);
    transform: translateY(70%);
    opacity: 0;
    animation: vb-sunrise 1.9s cubic-bezier(.2,.8,.25,1) forwards 0.35s;
}
/* Glow (ohne Maske, damit keine Kanten sichtbar werden) */
.vb-sun::before {
    content: "";
    position: absolute;
    inset: -45%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 79, 216, 0.50) 0%, rgba(168, 77, 255, 0.28) 38%, rgba(168, 77, 255, 0) 68%);
}
/* Sonnenscheibe: untere Hälfte mit Streifen */
.vb-sun::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffe07a 0%, #ff8f6b 45%, #ff3f8e 100%);
    -webkit-mask-image: linear-gradient(#000, #000), repeating-linear-gradient(to bottom, #000 0 9px, transparent 9px 15px);
            mask-image: linear-gradient(#000, #000), repeating-linear-gradient(to bottom, #000 0 9px, transparent 9px 15px);
    -webkit-mask-size: 100% 48%, 100% 52%;
            mask-size: 100% 48%, 100% 52%;
    -webkit-mask-position: top, bottom;
            mask-position: top, bottom;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
}

.vb-skyline {
    position: absolute;
    left: 0; right: 0;
    bottom: 31%;
    height: 34vh;
    background: url('../img/boot-skyline.svg') center bottom / cover no-repeat;
    transform: translateY(40%);
    opacity: 0;
    animation: vb-rise 1.3s ease forwards 0.9s;
}

/* Boden mit Perspektiv-Grid */
.vb-floor {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 31%;
    overflow: hidden;
    background: linear-gradient(180deg, #2a0b5e 0%, #12052b 40%, #0b0618 100%);
    border-top: 2px solid #ff4fd8;
    box-shadow: 0 -2px 24px rgba(255, 79, 216, 0.7);
    perspective: 340px;
}
.vb-grid {
    position: absolute;
    left: -50%; right: -50%;
    top: 0; bottom: -100%;
    background-image:
        linear-gradient(rgba(199, 125, 255, 0.85) 1.5px, transparent 1.5px),
        linear-gradient(90deg, rgba(199, 125, 255, 0.85) 1.5px, transparent 1.5px);
    background-size: 64px 64px;
    transform: rotateX(62deg);
    transform-origin: top center;
    animation: vb-grid 1.1s linear infinite;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 35%);
            mask-image: linear-gradient(180deg, transparent 0%, #000 35%);
    opacity: 0;
    animation: vb-grid 1.1s linear infinite, vb-fade 1s ease forwards 0.6s;
}

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

.vb-flash {
    position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(circle at 50% 55%, rgba(255,255,255,0.95), rgba(255,79,216,0.7) 40%, transparent 75%);
    opacity: 0;
}
.vb-flash.go { animation: vb-flash 0.55s ease-out forwards; }

/* Inhalt */
.boot-content {
    position: relative;
    z-index: 5;
    width: min(620px, 92vw);
    margin-top: -12vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
    opacity: 0;
    animation: boot-fade-in 0.7s ease forwards 0.5s;
}

.vb-logo { text-align: center; line-height: 1; }
.vb-logo-script-unused {
    display: block;
    font-family: 'Pacifico', cursive;
    font-size: clamp(64px, 12vh, 112px);
    background: linear-gradient(180deg, #ffffff 0%, #ffb3f0 38%, #d56bff 70%, #8a3dff 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    filter: drop-shadow(0 0 10px rgba(255, 79, 216, 0.85)) drop-shadow(0 0 28px rgba(168, 77, 255, 0.8));
    transform: rotate(-4deg);
    animation: vb-flicker 1.5s steps(1, end) 0.9s both;
}
.vb-logo-img {
    display: block;
    width: min(560px, 76vw);
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 0 14px rgba(255, 79, 216, 0.55)) drop-shadow(0 0 34px rgba(168, 77, 255, 0.6));
    animation: vb-flicker 1.5s steps(1, end) 0.9s both;
}
.vb-logo-sub {
    display: block;
    margin-top: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.55em;
    padding-left: 0.55em;
    font-size: clamp(16px, 3vh, 26px);
    color: #f7e9ff;
    text-shadow: 0 0 8px #ff4fd8, 0 0 22px #a84dff;
    animation: vb-flicker 1.5s steps(1, end) 1.2s both;
}

/* Abteilungs-Chips */
.boot-systems {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    border: 0;
    padding: 0;
}
.boot-system {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(199, 125, 255, 0.3);
    background: rgba(18, 7, 40, 0.55);
    backdrop-filter: blur(4px);
    font-size: 12.5px;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    transition: border-color .3s ease, box-shadow .3s ease, color .3s ease, transform .3s ease;
}
.boot-system .boot-status { display: none; }
.boot-system-name { color: inherit; }
.boot-led {
    width: 8px; height: 8px; border-radius: 50%;
    background: #3a2262;
    transition: background .3s ease, box-shadow .3s ease;
}
.boot-system.online {
    color: #fff;
    border-color: #ff4fd8;
    box-shadow: 0 0 14px rgba(255, 79, 216, 0.55), inset 0 0 10px rgba(168, 77, 255, 0.35);
    transform: translateY(-2px);
}
.boot-system.online .boot-led { background: #2ee6f6; box-shadow: 0 0 10px #2ee6f6; }
.boot-system.online .boot-status { color: #2ee6f6; }

.boot-footer { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.boot-bar {
    width: min(420px, 90%);
    height: 6px;
    border-radius: 6px;
    background: rgba(168, 77, 255, 0.2);
    border: 1px solid rgba(199, 125, 255, 0.35);
    overflow: hidden;
}
.boot-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 6px;
    background: var(--vice-grad);
    box-shadow: 0 0 14px #ff4fd8;
    transition: width 0.5s ease;
}
#boot-footer-text {
    font-size: 12px;
    letter-spacing: 3px;
    color: #d9c3ff;
    text-shadow: 0 0 8px rgba(255, 79, 216, 0.7);
}

@keyframes vb-fade     { from { opacity: 0; } to { opacity: 1; } }
@keyframes vb-twinkle  { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.6); } }
@keyframes vb-sunrise  { from { transform: translateY(70%); opacity: 0; } 25% { opacity: 1; } to { transform: translateY(0); opacity: 1; } }
@keyframes vb-rise     { from { transform: translateY(40%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes vb-grid     { from { background-position: 0 0; } to { background-position: 0 64px; } }
@keyframes vb-flash    { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
@keyframes vb-flicker  {
    0%   { opacity: 0; }
    8%   { opacity: 1; }
    14%  { opacity: 0.15; }
    20%  { opacity: 1; }
    32%  { opacity: 0.3; }
    38%  { opacity: 1; }
    100% { opacity: 1; }
}

/* =====================================================================
   LOGIN
   ===================================================================== */
.login-screen {
    background:
        linear-gradient(rgba(11, 6, 24, 0.35), rgba(11, 6, 24, 0.7)),
        url('../img/login.jpg') center / cover no-repeat;
}
.login-panel {
    background: rgba(18, 8, 40, 0.72);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(199, 125, 255, 0.55);
    border-radius: 16px;
    box-shadow: 0 0 0 1px rgba(255, 79, 216, 0.15), 0 0 40px rgba(168, 77, 255, 0.35), 0 24px 60px rgba(0, 0, 0, 0.55);
}
.login-title {
    background: var(--vice-grad);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    filter: drop-shadow(0 0 8px rgba(255, 79, 216, 0.5));
}
.field input { border-radius: 8px; background: rgba(8, 3, 20, 0.7); }
.field input:focus { border-color: #ff4fd8; box-shadow: 0 0 0 3px rgba(255, 79, 216, 0.2), 0 0 14px rgba(168, 77, 255, 0.4); }
.login-error { border-radius: 8px; }

/* Haupt-Buttons: Neon-Verlauf, weiße Schrift */
.login-submit,
.record-add-btn,
.record-submit-btn,
.rank-save-btn {
    background: var(--vice-grad) !important;
    color: #fff !important;
    border-radius: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 16px rgba(255, 79, 216, 0.35);
    transition: box-shadow .15s ease, filter .15s ease, transform .1s ease;
}
.login-submit:hover,
.record-add-btn:hover,
.record-submit-btn:hover,
.rank-save-btn:hover { box-shadow: 0 0 26px rgba(255, 79, 216, 0.65); filter: brightness(1.08); }
.login-submit:active,
.record-add-btn:active,
.record-submit-btn:active,
.rank-save-btn:active { transform: translateY(1px); }

/* Logo-Kachel */
.brand-mark {
    border-radius: 10px;
    border: 0;
    background: transparent;
    overflow: visible;
}
.brand-mark img { object-fit: contain; filter: drop-shadow(0 0 8px rgba(168, 77, 255, 0.7)); }
.brand-mark-fallback { background: var(--vice-grad); color: #fff; }

/* =====================================================================
   DESKTOP
   ===================================================================== */
.desktop-screen {
    background-color: #0b0618;
    background-image:
        linear-gradient(180deg, #1a0845 0%, #5a1a96 55%, #c4309a 100%);
}

.desktop-topbar,
.dept-switcher {
    background: rgba(14, 6, 32, 0.72);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(90deg, rgba(168,77,255,0.1), #A84DFF, #FF4FD8, rgba(255,79,216,0.1)) 1;
    box-shadow: 0 6px 24px rgba(168, 77, 255, 0.18);
}
.desktop-brand-text {
    background: var(--vice-grad);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    filter: drop-shadow(0 0 6px rgba(255, 79, 216, 0.45));
}
.desktop-user { color: #d9c3ff; }

.dept-switch-btn { border-radius: 8px; background: rgba(18, 8, 40, 0.5); color: #d9c3ff; }
.dept-switch-btn:hover { border-color: #A84DFF; box-shadow: 0 0 10px rgba(168, 77, 255, 0.4); }
.dept-switch-btn.active { border-color: #FF4FD8; color: #fff; box-shadow: 0 0 14px rgba(255, 79, 216, 0.45); background: rgba(168, 77, 255, 0.25); }

/* App-Icons */
.app-icon-glyph {
    border-radius: 16px;
    background: rgba(20, 9, 44, 0.78);
    border: 1px solid rgba(199, 125, 255, 0.45);
    box-shadow: 0 0 12px rgba(168, 77, 255, 0.3);
    backdrop-filter: blur(4px);
}
.app-icon-glyph.has-image { background: none; border-color: transparent; box-shadow: none; backdrop-filter: none; }
.app-icon-img { border-radius: 14px; filter: drop-shadow(0 0 8px rgba(168, 77, 255, 0.55)); }
.app-icon:hover .app-icon-glyph { border-color: #FF4FD8; box-shadow: 0 0 20px rgba(255, 79, 216, 0.6); }
.app-icon:hover .app-icon-img { filter: drop-shadow(0 0 12px rgba(255, 79, 216, 0.8)); }
.app-icon-label { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 10px rgba(11, 6, 24, 0.9); }

/* Fenster */
.os-window {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(199, 125, 255, 0.35);
    background: rgba(18, 8, 38, 0.985);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 79, 216, 0.06);
}
.os-window.focused {
    border-color: #C77DFF;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), 0 0 26px rgba(168, 77, 255, 0.55), 0 0 2px #FF4FD8;
}
.os-window-titlebar {
    background: linear-gradient(90deg, rgba(88, 34, 160, 0.55), rgba(60, 14, 90, 0.35) 60%, rgba(11, 6, 24, 0.9));
    border-bottom: 1px solid rgba(199, 125, 255, 0.35);
}
.os-window-title { color: #fff; text-shadow: 0 0 10px rgba(255, 79, 216, 0.55); }
.os-window-btn { border-radius: 8px; }
.os-window-btn:hover { border-color: #C77DFF; color: #fff; background: rgba(168, 77, 255, 0.25); }
.os-window-close:hover { border-color: #FF4FD8; color: #fff; background: rgba(255, 79, 216, 0.3); }
.os-window-body h2 { text-shadow: 0 0 12px rgba(168, 77, 255, 0.45); }

/* Taskbar */
.taskbar {
    background: rgba(14, 6, 32, 0.78);
    backdrop-filter: blur(12px);
    border-top: 1px solid transparent;
    border-image: linear-gradient(90deg, rgba(168,77,255,0.1), #A84DFF, #FF4FD8, rgba(255,79,216,0.1)) 1;
    box-shadow: 0 -6px 24px rgba(168, 77, 255, 0.2);
}
.taskbar-item { border-radius: 10px; background: rgba(18, 8, 40, 0.6); }
.taskbar-item:hover { border-color: #A84DFF; }
.taskbar-item.active { border-color: #FF4FD8; color: #fff; box-shadow: 0 0 12px rgba(255, 79, 216, 0.45); }
.taskbar-item-icon { border-radius: 7px; }
.taskbar-logout { border-color: #FF4FD8; color: #FF4FD8; box-shadow: 0 0 10px rgba(255, 79, 216, 0.35); }
.taskbar-logout:hover { background: rgba(255, 79, 216, 0.18); }

/* Formularfelder & Buttons in den Apps */
input[type="text"], input[type="password"], input[type="number"], input[type="date"],
input[type="search"], input[type="email"], input[type="time"], select, textarea { border-radius: 8px; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px rgba(168, 77, 255, 0.22); }
.dsp-btn, .gb-btn, .entry-action-btn, .record-back-btn { border-radius: 8px; }
.dsp-btn:hover { border-color: #C77DFF; box-shadow: 0 0 10px rgba(168, 77, 255, 0.35); }

/* Karten/Kacheln etwas weicher */
.staff-card, .record-card, .rechner-tile, .dsp-card, .bg-tile { border-radius: 12px; }
.bg-tile.active { border-color: #FF4FD8; box-shadow: 0 0 14px rgba(255, 79, 216, 0.45); }

@media (prefers-reduced-motion: reduce) {
    .vb-stars, .vb-sun, .vb-skyline, .vb-grid, .vb-logo-img, .vb-logo-sub { animation: none !important; opacity: 1 !important; transform: none !important; }
}
