/* ==========================================================================
   1. GLOBALE RESETS & BASIS
   ========================================================================== */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body { 
    background-color: #000000; 
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    color: #ffffff;
    overflow: hidden; /* Verhindert Scrollen der gesamten Seite */
}

.app-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* ==========================================================================
   LOGIN PAGE STYLES (Wiederherstellung)
   ========================================================================== */
.login-page {
    background-color: #0f172a; /* Dunkler Hintergrund */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.login-card {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    color: white;
}

.login-card h2 {
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.login-card .subtitle {
    color: #888;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #efefef;
}

.input-group input {
    width: 100%;
    padding: 12px;
    background: #262626;
    border: 1px solid #444;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    box-sizing: border-box;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background-color: #f97316; /* Orange */
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.login-btn:hover {
    background-color: #ea580c;
}

/* ==========================================================================
   3. HEADER / TOP-BAR (Zentrale Navigation)
   ========================================================================== */
.top-bar {
    height: 60px;
    background-color: #000000;
    border-bottom: 1px solid #1f2937;
    display: flex;
    align-items: center;
    padding: 0 25px;
    z-index: 1000;
}

/* Linke Gruppe: Logo + Brand + Nav rücken ganz nach links */
.top-bar-left-content {
    display: flex;
    align-items: center;
    gap: 40px; /* Abstand zwischen Branding und Menü */
    flex: 1;   /* Schiebt Logout-Bereich nach rechts */
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-placeholder {
    width: 28px;
    height: 28px;
    background: #ffffff;
    border-radius: 6px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTIyIDE5YTIgMiAwIDAgMS0yIDJINGEyIDIgMCAwIDEtMi0yVjVhMiAyIDAgMCAxIDItMmgxNmEyIDIgMCAwIDEgMiAydjE0WiIvPjxwYXRoIGQ9Ik02IDhoMTJNNiAxMmgxMk02IDE2aDgiLz48L3N2Zz4=');
    background-size: 18px;
    background-repeat: no-repeat;
    background-position: center;
}

.brand-name {
    font-weight: 700;
    font-size: 1.15rem;
    color: #ffffff;
    white-space: nowrap;
}

/* Navigation Links */
.top-nav {
    display: flex;
    gap: 6px;
}

.nav-link {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    transition: 0.2s ease;
}

.nav-link:hover, 
.nav-link.active {
    background-color: #1f2937;
    color: #ffffff;
}

/* ==========================================================================
   4. DROPDOWNS
   ========================================================================== */
.nav-item {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: #0a0a0a;
    border: 1px solid #262626;
    border-radius: 10px;
    min-width: 180px;
    padding: 6px;
    margin-top: 5px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    visibility: hidden;
    opacity: 0;
    transition: all 0.2s ease;
}

.nav-item:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 12px;
    color: #a1a1aa;
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: 0.2s;
}

.dropdown-menu a:hover {
    background-color: #1a1a1a;
    color: #ffffff;
}

/* ==========================================================================
   5. RECHTE SEITE (USER & LOGOUT)
   ========================================================================== */
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.online-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px #22c55e;
}

.logout-btn {
    background-color: #ffffff;
    color: #000000;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
    transition: opacity 0.2s;
}

.logout-btn:hover {
    opacity: 0.8;
}

/* ==========================================================================
   6. INHALTSBEREICH (CANVAS)
   ========================================================================== */
.content-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.canvas {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000000;
    background-image: radial-gradient(#1e293b 1px, transparent 1px);
    background-size: 40px 40px; /* Dezentes Punkt-Raster */
}

.placeholder-text {
    color: #1e293b;
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 5px;
    text-transform: uppercase;
    user-select: none;
}

/* Hilfsklasse zum Aufräumen alter Reste */
.top-bar-side { display: none; }

/* ==========================================================================
   STATUS WIDGET
   ========================================================================== */
.status-box {
    width: 380px;
    background: linear-gradient(180deg, #0b1220, #08090b);
    border: 1px solid #1f2937;
    border-radius: 12px;
    padding: 14px;
    color: #e6eef8;
    box-shadow: 0 6px 20px rgba(0,0,0,0.6);
    position: fixed; /* oben rechts unter Header */
    top: 80px; /* etwas tiefer, damit keine Überschneidung mit Header */
    right: 20px;
    z-index: 1500;
    max-height: calc(100vh - 160px); /* oben+unten jeweils 80px */
    overflow: auto;
}

/* simplified: removed advanced per-process and dir styles to restore stable appearance */

/* basic bar styles are defined below (keep duplicated safe) */

.status-header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:10px;
    font-weight:700;
    color:#ffffff;
}

.status-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:10px;
}

.status-item{
    background: rgba(255,255,255,0.02);
    padding:10px;
    border-radius:8px;
}

.status-item .label{ font-size:0.85rem; color:#9ca3af; margin-bottom:6px }
.status-item .value{ font-size:1.05rem; font-weight:700 }

.bar{ background: rgba(255,255,255,0.06); height:10px; border-radius:6px; margin-top:8px; overflow:hidden; border:1px solid rgba(255,255,255,0.03); }
.bar-fill{ height:100%; background:linear-gradient(90deg,#06b6d4,#60a5fa); width:0%; box-shadow: inset 0 -2px 6px rgba(0,0,0,0.4); transition: width 300ms ease; }

@media (max-width:420px){ .status-box{ left:10px; right:10px; } .status-grid{ grid-template-columns:1fr 1fr } }
/* Removed 4-column layout to keep 2x2 arrangement for clarity on large screens */