/* =====================================================================
   Mümken AI · Premium Light Glass Design System
   Realisiert von Mümken AI
   - Light "aurora" background so glassmorphism actually reads
   - One coherent glass card language, restrained palette, type scale
   - Override layer neutralises legacy inline dark/white backgrounds
   ===================================================================== */

:root {
    /* Surfaces */
    --bg-0: #f4efe4;
    --rail: rgba(253, 251, 246, 0.72);

    /* Text */
    --text-main: #272320;
    --text-muted: #5a5448;
    --text-soft: #4f4a3e;

    /* Accent */
    --accent: #0071e3;
    --accent-ink: #0071e3;
    --accent-soft: rgba(0, 113, 227, 0.12);
    --accent-glow: rgba(0, 113, 227, 0.25);
    
    /* Semantic */
    --danger: #ff3b30; --danger-ink: #d70015; --danger-soft: rgba(255, 59, 48, 0.12);
    --warning: #ff9500; --warning-ink: #b25000; --warning-soft: rgba(255, 149, 0, 0.12);
    --success: #34c759; --success-ink: #248a3d; --success-soft: rgba(52, 199, 89, 0.12);

    /* Glass — beige frost */
    --glass: rgba(253, 251, 246, 0.55);
    --glass-strong: rgba(253, 251, 246, 0.72);
    --glass-inner: rgba(253, 251, 246, 0.40);
    --card-border: rgba(255, 255, 255, 0.9);
    --card-ring: rgba(39, 35, 32, 0.04);
    --blur: blur(28px) saturate(200%);

    /* Depth */
    --shadow-card: 0 1px 1px rgba(113, 106, 91, 0.04), 0 14px 34px rgba(113, 106, 91, 0.12), 0 4px 12px rgba(113, 106, 91, 0.06);
    --shadow-lift: 0 30px 66px rgba(113, 106, 91, 0.20), 0 12px 26px rgba(113, 106, 91, 0.10);

    /* Geometry */
    --r: 22px;
    --r-sm: 14px;
    --r-pill: 999px;

    /* Legacy aliases */
    --bg-light: var(--bg-0);
    --panel-bg: var(--glass);
    --border-color: var(--card-ring);
    --danger-glow: var(--danger-soft);
    --success-glow: var(--success-soft);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-main);
    min-height: 100dvh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    background: #f4efe4;
    background-image: 
        radial-gradient(44rem 44rem at 30% 2%, rgba(205, 185, 143, 0.15), transparent 56%),
        radial-gradient(48rem 48rem at 100% -2%, rgba(232, 220, 198, 0.2), transparent 56%),
        radial-gradient(46rem 46rem at 88% 102%, rgba(205, 185, 143, 0.15), transparent 60%);
    background-attachment: fixed;
}

.app-layout { display: flex; height: 100dvh; width: 100%; }

/* ============================ SIDEBAR (dark glass rail) ============== */
.sidebar {
    width: 264px;
    background: var(--rail);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    z-index: 10;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.sidebar.collapsed { width: 76px; }
.sidebar.collapsed .nav-section,
.sidebar.collapsed .sidebar-footer,
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .badge.blue { display: none; opacity: 0; }
.sidebar.collapsed .brand { display: none; }
.sidebar.collapsed .sidebar-header { justify-content: center; padding-left: 0; padding-right: 0; }
.sidebar.collapsed #sidebar-toggle { margin-left: 0; }
.sidebar.collapsed .nav-item { justify-content: center; padding-left: 0; padding-right: 0; }
/* Expanded header: keep logo + toggle both fully visible inside the rail */
.sidebar-header { padding-left: 1.1rem; padding-right: 0.85rem; gap: 0.55rem; }
.sidebar-header .brand { flex: 0 1 auto; min-width: 0; }
.sidebar-header .brand-name { font-size: 15px; letter-spacing: 0.14em; }
#sidebar-toggle {
    flex-shrink: 0;
    margin-left: auto;
    background: transparent;
    border: none;
    color: #9aa6b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
#sidebar-toggle:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
}
#sidebar-toggle:active {
    transform: scale(0.97);
}

.sidebar-header {
    padding: 1.4rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}
.sidebar-header .logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--text-main);
    -webkit-background-clip: text;
    background-clip: text;
    
}

.nav-links { list-style: none; padding: 1rem 0.75rem; flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.nav-item {
    padding: 0.72rem 0.9rem;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: #9aa6b8;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    font-weight: 500;
    font-size: 0.95rem;
}
.nav-item:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.06); transform: translateX(2px); }
.nav-item:active { transform: scale(0.97); }
.nav-item.active {
    color: var(--text-main);
    background: linear-gradient(90deg, rgba(0, 113, 227, 0.16), rgba(0, 113, 227, 0.03));
    box-shadow: inset 3px 0 0 var(--accent);
}
.nav-item.active svg { color: var(--accent); }
.nav-badge {
    background: var(--danger);
    color: var(--text-main);
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: var(--r-pill);
    margin-left: auto;
    font-weight: 700;
}
.sidebar-footer { padding: 1.25rem 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.07); flex-shrink: 0; }
.sidebar-footer .status-indicator { color: #cbd5e1; }

/* ============================ MAIN ================================== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: transparent;
}

.view-container {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    padding: 2rem 2.25rem 3rem;
    gap: 1.5rem;
}
.view-container.active { display: flex; animation: fadeIn 0.35s ease-out; }

.view-header { display: flex; justify-content: space-between; align-items: flex-start; }
.view-header h1 {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.7px;
}
.view-header p { color: var(--text-muted); font-size: 0.95rem; margin-top: 2px; }

/* legacy top header (unused) */
.header { display: none; }
.logo { display: flex; align-items: center; gap: 1rem; }
.logo-text { font-weight: 800; letter-spacing: -0.5px; }
.status-indicator { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 600; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; }
.status-dot.online { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: pulse 2.4s infinite; }

/* ============================ GLASS CARD LANGUAGE =================== */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(140px, auto);
    gap: 1.5rem;
}
.bento-large { grid-column: span 2; }
.bento-tall { grid-row: span 2; }

/* Apple-style dashboard sections */
.dash-section { margin-bottom: 3.25rem; }
.dash-section:last-child { margin-bottom: 0; }
.dash-section-head {
    margin: 0 0 1.35rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.dash-section-title {
    font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.7rem);
    font-weight: 700;
    letter-spacing: -0.7px;
    color: var(--text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.dash-section-title::before {
    content: "";
    width: 5px;
    height: 1.05em;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--accent), #5856d6);
    flex-shrink: 0;
}
.dash-section-meta { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; }
.bento-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.bento-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.bento-card,
.kpi-card,
.panel {
    background: linear-gradient(157deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0.42) 100%) !important;
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border: 1px solid var(--card-border) !important;
    border-radius: var(--r) !important;
    box-shadow: var(--shadow-card), 0 0 0 1px var(--card-ring) !important;
    color: var(--text-main) !important;
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s;
}
.bento-card { justify-content: space-between; }
/* top light edge */
.bento-card::before,
.kpi-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
    pointer-events: none;
}
.bento-card:hover,
.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift), 0 0 0 1px var(--card-ring) !important;
}

.bento-card h3,
.kpi-card h3 {
    font-size: 0.72rem;
    color: var(--text-soft);
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.kpi-value {
    font-size: clamp(1.5rem, 2.1vw, 1.95rem);
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Tables inside glass cards stay inside their (often narrow) card */
.bento-card table { width: 100%; font-size: 0.82rem; table-layout: fixed; line-height: 1.5; }
.bento-card table td,
.bento-card table th { padding: 6px 5px !important; overflow: hidden; text-overflow: ellipsis; }
.kpi-value.warning { color: var(--warning-ink); }
.kpi-value.text-success { color: var(--accent-ink); }
.kpi-trend { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-top: auto; }
.kpi-trend.positive { color: var(--accent-ink); }
.kpi-trend.negative { color: var(--danger-ink); }
.kpi-sparkline-wrap { position: relative; width: 100%; height: 52px; margin-top: 12px; }
.kpi-sparkline { position: absolute; inset: 0; }

/* Web Vitals floating overlay → light frosted glass (was dark, clashed) */
#perf-overlay {
    background: linear-gradient(157deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.52)) !important;
    -webkit-backdrop-filter: blur(26px) saturate(200%) !important;
    backdrop-filter: blur(26px) saturate(200%) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--card-border) !important;
    box-shadow: var(--shadow-card) !important;
    border-radius: 16px !important;
}
#perf-overlay strong { color: var(--text-muted) !important; }
#perf-overlay > div { border-color: rgba(16, 24, 40, 0.10) !important; }



/* ============================ BADGES (refined pills) =============== */
.badge {
    padding: 3px 10px;
    border-radius: var(--r-pill);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}
.badge.red { background: var(--danger-soft); color: var(--danger-ink); }
.badge.orange { background: var(--warning-soft); color: var(--warning-ink); }
.badge.green { background: var(--accent-soft); color: var(--accent-ink); }
.badge.blue { background: rgba(59, 130, 246, 0.12); color: #1d4ed8; }
.badge.purple { background: rgba(139, 92, 246, 0.13); color: #6d28d9; }
.badge.amazon { background: rgba(255, 153, 0, 0.16); color: #b45309; }
.badge.ebay { background: rgba(0, 100, 210, 0.13); color: #0058bb; }
.badge.kaufland { background: rgba(224, 0, 27, 0.12); color: #c20018; }
.badge.otto { background: rgba(208, 2, 27, 0.12); color: #b3071a; }
.badge.muster,
.badge.mustershop { background: rgba(15, 23, 42, 0.12); color: #0f172a; }
.badge-container { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.count-badge {
    background: rgba(15, 23, 42, 0.12);
    color: var(--text-main);
    font-size: 0.9rem;
    padding: 3px 11px;
    border-radius: var(--r-pill);
    font-weight: 700;
}

/* ============================ ALERT LISTS ========================== */
.alert-card { overflow: auto; }
.alert-card h3 { margin-bottom: 0.8rem; }

/* KI Support-Intelligenz (Enterprise) */
.support-intel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.25rem;
}
.support-intel-col {
    padding: 1.1rem;
    border-radius: var(--r-sm);
    background: var(--glass-inner);
    border: 1px solid var(--card-ring);
    display: flex;
    flex-direction: column;
}
.support-intel-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-main);
    margin-bottom: 4px;
}
@media screen and (max-width: 900px) {
    .support-intel-grid { grid-template-columns: 1fr; }
}

.kpi-card--sm { padding: 0.9rem 1rem !important; }
.kpi-card--sm .kpi-value { font-size: clamp(1.2rem, 1.6vw, 1.5rem) !important; }
.alert-list { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.alert-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.4rem 0.6rem;
    padding: 0.6rem 0.75rem;
    background: var(--glass-inner);
    border: 1px solid var(--card-ring);
    border-radius: var(--r-sm);
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: anywhere;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}
.alert-list li:hover { background: rgba(255, 255, 255, 0.9); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(113, 106, 91, 0.08); }
.alert-list li:active { transform: scale(0.99); }

/* ===== System & Compliance — refined Apple settings-list cards ===== */
.sc-card { gap: 0; justify-content: flex-start; }
.sc-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0.55rem;
}
.sc-head-row h3 { margin: 0; }
.sc-list { list-style: none; display: flex; flex-direction: column; margin: 0; padding: 0; }
.sc-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.72rem 0.1rem;
    border-top: 1px solid var(--card-ring);
}
.sc-row:first-child { border-top: 0; }
.sc-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--text-muted);
    box-shadow: 0 0 0 3px rgba(39, 35, 32, 0.04);
}
.sc-dot.is-ok { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.sc-dot.is-warn { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
.sc-dot.is-danger { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.sc-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.sc-title { font-size: 0.85rem; font-weight: 600; color: var(--text-main); letter-spacing: -0.1px; line-height: 1.3; overflow-wrap: anywhere; }
.sc-sub { font-size: 0.74rem; color: var(--text-muted); font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.sc-val { font-size: 0.82rem; font-weight: 700; color: var(--text-main); white-space: nowrap; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.sc-val.is-ok { color: var(--success-ink); }
.sc-val.is-danger { color: var(--danger-ink); }
.sc-check { color: var(--success-ink); flex-shrink: 0; display: inline-flex; }
.sc-row .badge { flex-shrink: 0; min-width: 42px; justify-content: center; }
/* Card 2 — hero stat + sentinel note */
.sc-hero { display: flex; flex-direction: column; gap: 2px; margin: 0.35rem 0 0; }
.sc-hero-val { font-size: clamp(1.6rem, 2.4vw, 2.05rem); font-weight: 800; color: var(--text-main); letter-spacing: -0.5px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sc-hero-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.sc-pill {
    align-self: flex-start;
    margin-top: 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 9px;
    border-radius: var(--r-pill);
    background: var(--success-soft);
    color: var(--success-ink);
    font-size: 0.76rem;
    font-weight: 700;
}
.sc-divider { height: 1px; background: var(--card-ring); margin: 1rem 0; border: 0; }
.sc-note { padding: 0.85rem 1rem; border-radius: var(--r-sm); background: var(--glass-inner); border: 1px solid var(--card-ring); }
.sc-note-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 6px; display: block; }
.sc-note p { font-size: 0.82rem; line-height: 1.55; color: var(--text-main); margin: 0; }
.sc-note .sc-action { color: var(--success-ink); font-weight: 700; }

/* ============================ BUTTONS ============================== */
.btn {
    padding: 0.7rem 1.4rem;
    border-radius: var(--r-pill);
    border: 1px solid transparent;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 6px 16px var(--accent-glow); }
.btn.primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 24px var(--accent-glow); }
.btn.primary:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover:not(:disabled) { background: #dc2626; transform: translateY(-2px); }
.btn:not(.primary):not(.danger) {
    background: var(--glass-strong);
    border-color: var(--card-ring);
    color: var(--text-main);
}
.btn:not(.primary):not(.danger):hover:not(:disabled) { background: rgba(255, 255, 255, 0.9); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(113, 106, 91, 0.08); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; filter: grayscale(0.6); }

/* ============================ LOGISTIK PANELS ===================== */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    flex: 1;
    overflow: visible;
}
#view-logistik .dashboard {
    grid-template-columns: repeat(3, 1fr);
    height: auto;
    min-height: calc(100dvh - 150px);
}
#view-logistik .dashboard .warehouse-panel {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    height: auto !important;
}
#view-logistik .dashboard .warehouse-panel .list-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    height: auto !important;
    max-height: 760px !important;
    overflow-y: auto !important;
}
#view-logistik { overflow: auto; }
.panel { padding: 0; height: 100%; gap: 0; }
.panel-header {
    padding: 1.1rem 1.3rem;
    border-bottom: 1px solid var(--card-ring);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.4);
}
.panel-header h2 { font-size: 1.02rem; font-weight: 700; color: var(--text-main); letter-spacing: -0.2px; }
.list-container { padding: 1.25rem; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 1rem; position: relative; }

.inbox-card {
    background: var(--glass-strong);
    border: 1px solid var(--card-ring);
    border-radius: var(--r-sm);
    padding: 1.1rem;
    box-shadow: var(--shadow-card);
    animation: conveyorEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    flex-shrink: 0;
}
.inbox-card.processing { border-color: var(--accent); }
.inbox-card.processing::after {
    content: '';
    position: absolute;
    top: -10px; left: 0; width: 100%; height: 2px;
    background: var(--accent);
    box-shadow: 0 0 15px 5px var(--accent-glow);
    animation: laserScan 1.5s ease-in-out infinite alternate;
}
.inbox-card.processed { border-color: var(--success); opacity: 0.62; }
.inbox-card pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: var(--text-main);
    background: rgba(15, 23, 42, 0.04);
    padding: 0.9rem;
    border-radius: var(--r-sm);
    white-space: pre-wrap;
    margin-top: 0.7rem;
    line-height: 1.45;
}
.inbox-card .card-title { font-weight: 700; font-size: 0.98rem; margin-bottom: 0.3rem; color: var(--text-main); }

/* Terminal stays dark — intentional console accent */
.analysis-panel { position: relative; }
.terminal-container {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.86rem;
    background: #0b1220;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    scroll-behavior: smooth;
}
.terminal-line {
    animation: fadeIn 0.2s ease-out;
    line-height: 1.5;
    padding: 0.4rem 0.7rem;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid transparent;
}
.terminal-line.system { border-left-color: #64748b; color: #94a3b8; }
.terminal-line.agent { border-left-color: var(--accent); color: #5eead4; }
.terminal-line.action { border-left-color: var(--success); color: #34d399; font-weight: 700; background: rgba(16, 185, 129, 0.12); }
.terminal-line.alert { border-left-color: var(--warning); color: #fbbf24; font-weight: 700; }
.terminal-line.danger { border-left-color: var(--danger); color: #f87171; font-weight: 700; background: rgba(239, 68, 68, 0.12); }
.decoding-text { font-family: 'JetBrains Mono', monospace; }

/* Success overlay */
.success-overlay {
    position: absolute; inset: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(6px);
    display: flex; justify-content: center; align-items: center;
    z-index: 10;
    animation: fadeIn 0.2s ease;
}
.success-overlay.hidden { display: none; }
.checkmark-circle { width: 100px; height: 100px; position: relative; }
.checkmark { width: 100px; height: 100px; border-radius: 50%; display: block; stroke-width: 4; stroke: var(--success); stroke-miterlimit: 10; animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both; }
.checkmark-circle-bg { stroke-dasharray: 166; stroke-dashoffset: 166; stroke-width: 4; stroke-miterlimit: 10; stroke: var(--success); animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards; }
.checkmark-check { transform-origin: 50% 50%; stroke-dasharray: 48; stroke-dashoffset: 48; animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards; }

/* Print queue label cards */
.label-card {
    background: var(--glass-strong);
    border: 1px solid var(--card-ring);
    border-radius: var(--r-sm);
    box-shadow: var(--shadow-card);
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}
.label-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(113, 106, 91, 0.08); }
.label-card:not(.has-approval):active { transform: scale(0.99); }
.label-card.has-approval:active { transform: none !important; }
.label-card::before { content: ''; position: absolute; top: 0; left: 0; width: 5px; height: 100%; background: var(--text-soft); }
.label-card.express { border-color: var(--danger); z-index: 5; animation: expressOvertake 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.label-card.express::before { background: var(--danger); }
.label-card.customs { border-color: var(--warning); }
.label-card.customs::before { background: var(--warning); }
.label-summary { padding: 1rem 1.2rem; cursor: pointer; list-style: none; position: relative; display: flex; flex-direction: column; gap: 0.4rem; }
.label-summary::-webkit-details-marker { display: none; }
.label-summary:hover { background: rgba(255, 255, 255, 0.5); }
.summary-header { display: flex; justify-content: space-between; align-items: center; }
.summary-title { font-weight: 700; font-size: 1.02rem; color: var(--text-main); }
.summary-title .ref-id, .ref-id { color: var(--text-muted); font-weight: 500; font-size: 0.85rem; }
.summary-name { font-size: 0.92rem; color: var(--text-muted); font-weight: 500; padding-right: 24px; white-space: normal; }
.expand-icon { position: absolute; right: 1.2rem; bottom: 1rem; color: var(--text-soft); transition: transform 0.3s ease; }
.label-card[open] .expand-icon { transform: rotate(180deg); }
.label-details { padding: 0 1.2rem 4rem; animation: slideDown 0.3s ease-out; height: auto !important; }
.label-address {
    font-size: 0.92rem; font-weight: 600; color: var(--text-main);
    background: rgba(15, 23, 42, 0.04);
    padding: 0.8rem; border: 1px solid var(--card-ring); border-radius: var(--r-sm);
    margin-bottom: 0.8rem; white-space: pre-wrap; line-height: 1.45;
}
.label-meta { font-size: 0.83rem; color: var(--text-muted); font-weight: 500; background: var(--accent-soft); padding: 0.6rem 0.8rem; border-radius: 8px; border-left: 3px solid var(--accent); line-height: 1.45; }

/* ============================ SUPPORT ============================== */
.support-layout { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 1.25rem; flex: 1; overflow: hidden; }
.ticket-list .list-container { padding: 1rem; gap: 0.6rem; }
.ticket-item {
    padding: 0.95rem 1.05rem;
    background: var(--glass-strong);
    border: 1px solid var(--card-ring);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.ticket-item:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(113, 106, 91, 0.08); }
.ticket-item:active { transform: scale(0.98); }
.ticket-item.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.ticket-meta { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.45rem; }
.ticket-subject { font-weight: 700; font-size: 0.92rem; margin-bottom: 0.35rem; }
.chat-container { padding: 1.5rem; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 1rem; }
.message { max-width: 85%; padding: 0.9rem 1.05rem; border-radius: var(--r-sm); font-size: 0.92rem; line-height: 1.5; }
.message.customer { background: rgba(15, 23, 42, 0.05); align-self: flex-start; border-bottom-left-radius: 4px; }
.message.agent { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.draft-container { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; flex: 1; background: rgba(255, 255, 255, 0.35); }
.ai-status { font-size: 0.88rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }
.ai-status.thinking { color: var(--accent-ink); animation: pulse 1.5s infinite; }
.ai-status.warning { color: var(--danger-ink); }
.ai-status.ready { color: var(--accent-ink); }
.draft-textarea {
    flex: 1; width: 100%; resize: none;
    border: 1px solid var(--card-ring); border-radius: var(--r-sm);
    padding: 1rem; font-family: inherit; font-size: 0.92rem; line-height: 1.5;
    background: var(--glass-strong); color: var(--text-main);
}
.draft-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.empty-state { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-soft); font-weight: 500; text-align: center; }
.pdf-attachment-draft { color: var(--text-main); }

/* ===================== GLOBE RADAR (Apple night-Earth optic) ======= */
.radar-container { position: relative; width: 150px; height: 150px; margin: 16px auto 6px; border-radius: 50%; box-shadow: 0 0 36px rgba(45, 212, 191, 0.28); }
.globe { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; display: block; }
.globe-graticule { stroke: #3fd0c4; stroke-width: 0.4; fill: none; opacity: 0.16; }
.globe-land { fill: #12424c; stroke: rgba(110, 240, 220, 0.45); stroke-width: 0.4; stroke-linejoin: round; }
.globe-rim { fill: none; stroke: rgba(120, 240, 224, 0.85); stroke-width: 1.1; }
.city { fill: #ffe3a6; }
.city-twinkle { animation: city-twinkle 3s ease-in-out infinite; }
.city-twinkle.d1 { animation-delay: 0.7s; }
.city-twinkle.d2 { animation-delay: 1.5s; }
.city-twinkle.d3 { animation-delay: 2.2s; }
@keyframes city-twinkle { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
.city-home { fill: #bdf7ff; }
.home-ring { fill: none; stroke: #bdf7ff; stroke-width: 1; }
.sat-beam { stroke: #7df0e0; stroke-width: 1; stroke-dasharray: 2 3; stroke-linecap: round; animation: sat-beam 1.5s ease-in-out infinite; }
@keyframes sat-beam { 0%, 100% { opacity: 0.2; } 50% { opacity: 0.95; } }
.sat-body { fill: #ecfeff; }
.radar-ping { position: absolute; width: 6px; height: 6px; background: #34c759; border-radius: 50%; box-shadow: 0 0 10px 2px rgba(52, 199, 89, 0.9); animation: ping-fade 2s ease-out forwards; }
@keyframes ping-fade { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(3); } }
#radar-pings { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
    .sat-orbit > *, .city-twinkle { animation: none !important; }
    .sat-beam { animation: none; opacity: 0.7; }
}

/* ============================ SCROLLBAR =========================== */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.16); border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.28); background-clip: content-box; }

/* ============================ KEYFRAMES =========================== */
@keyframes pulse { 0% { transform: scale(0.96); opacity: 0.85; } 50% { transform: scale(1.04); opacity: 1; } 100% { transform: scale(0.96); opacity: 0.85; } }
@keyframes conveyorEntrance { 0% { transform: translateX(-150%); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
@keyframes laserScan { 0% { top: 0; opacity: 0.8; } 100% { top: 100%; opacity: 0.2; } }
@keyframes stroke { 100% { stroke-dashoffset: 0; } }
@keyframes scale { 0%, 100% { transform: none; } 50% { transform: scale3d(1.1, 1.1, 1); } }
@keyframes fill { 100% { box-shadow: inset 0 0 0 50px transparent; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { 0% { opacity: 0; transform: scale(0.85) translateY(16px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.label-card.printing { position: relative; pointer-events: none; }
.label-card.printing::after { content: ''; position: absolute; bottom: 0; left: 0; height: 5px; width: 0%; background: var(--accent); animation: printProgress var(--print-time, 5s) linear forwards; z-index: 15; border-bottom-left-radius: var(--r-sm); border-bottom-right-radius: var(--r-sm); }
@keyframes printProgress { 0% { width: 0%; } 100% { width: 100%; opacity: 0; } }
@keyframes expressOvertake {
    0% { opacity: 0; transform: translateY(100px) scale(0.8); }
    40% { opacity: 1; transform: translateY(-10px) scale(1.03); box-shadow: 0 15px 30px var(--danger-glow); }
    100% { opacity: 1; transform: translateY(0) scale(1); box-shadow: var(--shadow-card); }
}

/* ============================ MOBILE ============================== */
.mobile-header { display: none; }

@media screen and (max-width: 768px) {
    .sidebar {
        position: fixed; left: 0; top: 0; bottom: 0; z-index: 9999;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        width: 280px;
        box-shadow: 24px 0 60px rgba(39, 35, 32, 0.15);
        background: rgba(253, 251, 246, 0.96);
        backdrop-filter: blur(20px);
    }
    .sidebar.open { transform: translateX(0); }

    .main-content { width: 100%; padding: 0; overflow-x: hidden; background: transparent; }

    .view-container { padding: 5.25rem 16px 6rem; }
    .view-container.active { display: flex; animation: none; }

    .mobile-header {
        display: flex !important;
        position: fixed; top: 0; left: 0; right: 0; height: 60px;
        align-items: center; justify-content: space-between; padding: 0 16px;
        background: rgba(255, 255, 255, 0.65);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        border-bottom: 1px solid rgba(255, 255, 255, 0.6);
        z-index: 100;
        box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    }
    .mobile-logo-text { font-size: 1.12rem; font-weight: 800; letter-spacing: -0.3px; color: var(--text-main); }
    .mobile-menu-btn {
        background: rgba(15, 23, 42, 0.05); border: 1px solid var(--card-ring); color: var(--text-main);
        cursor: pointer; padding: 8px; display: flex; align-items: center; justify-content: center;
        border-radius: 11px; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .mobile-menu-btn:active { transform: scale(0.92); background: rgba(15, 23, 42, 0.1); }

    #view-logistik .dashboard, .dashboard, .support-layout, .bento-grid {
        display: flex !important; flex-direction: column !important;
        width: 100% !important; min-width: 0 !important; height: auto !important; gap: 16px !important;
    }
    .bento-large, .bento-tall { grid-column: auto; grid-row: auto; }

    .panel, .kpi-card, .label-card, .bento-card { margin-bottom: 0; }
    .panel:active, .label-card:not(.has-approval):active, .bento-card:active { transform: scale(0.985); transition: transform 0.1s ease; }
    .panel-header { padding: 1.1rem 1.25rem 0.5rem; border-bottom: none; }
    .list-container { padding: 0 1.25rem 1.25rem; gap: 12px; max-height: 420px; }

    .kpi-value { font-size: 2rem; font-weight: 800; }
    .view-header { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
    .view-header h1 { font-size: 1.6rem; }
    .terminal-container { font-size: 0.78rem; max-height: 340px; }

    /* MOBILE: ganzes Dashboard als normal scrollendes Dokument — kein 100vh-Panel-Trap.
       body{overflow:hidden} + 100vh-Flex + innere overflow:hidden klemmten den Scroll fest. */
    body { overflow: visible !important; height: auto; }
    #pitch-banner { display: none !important; } /* Marketing-Strip raus auf Mobil (lag als Sliver hinterm Header) */
    .app-layout { display: block; height: auto; min-height: 100dvh; }
    .main-content { overflow: visible; }
    .view-container { overflow: visible; height: auto; min-height: 0; }
    .support-layout, .dashboard, #view-logistik .dashboard {
        overflow: visible !important; flex: none !important; height: auto !important; min-height: 0 !important;
    }
    .panel, .bento-card, .alert-card, .kpi-card, .label-card {
        overflow: visible !important; flex: none !important; height: auto !important; min-height: 0 !important;
    }
    .chat-container, .list-container {
        overflow: visible !important; flex: none !important; height: auto !important; max-height: none !important;
    }
}
/* force redeploy */
/* Logistics Collapsed Clean State */
#logistics-grid.logistics-collapsed-clean {
    min-height: 0 !important;
    height: auto !important;
    align-items: start;
    opacity: 1; /* Not greyed out */
}
#logistics-grid.logistics-collapsed-clean .list-container,
#logistics-grid.logistics-collapsed-clean .terminal-container {
    display: none !important;
}
#logistics-grid.logistics-collapsed-clean .panel {
    min-height: 0 !important;
    height: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 1px dashed var(--card-ring) !important;
}
#logistics-grid.logistics-collapsed-clean .panel-header {
    border-bottom: none;
    padding-bottom: 1.25rem;
    background: transparent;
    opacity: 0.6;
}
#logistics-grid.logistics-collapsed-clean::before {
    content: ""; display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.1rem;
    color: #64748b;
    font-weight: 500;
}
#logistics-grid.logistics-collapsed-clean {
    position: relative;
    padding-bottom: 4rem;
}
/* FAQ Section */
.faq-page-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-top: 0.5rem;
}
.faq-header-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--accent-soft);
    padding: 0.3rem 0.8rem;
    border-radius: var(--r-pill);
    margin-bottom: 0.875rem;
}
.faq-main-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}
.faq-main-subtitle {
    font-size: 0.96rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.65;
}
.faq-container {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}
.faq-category {
    display: flex;
    flex-direction: column;
}
.faq-section-header {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    margin-bottom: 1rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--card-ring);
}
.faq-section-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.faq-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 0.2rem;
}
.faq-section-desc {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.45;
}
.faq-item {
    background: var(--glass);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: var(--r-sm);
    margin-bottom: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.faq-item:hover {
    box-shadow: var(--shadow-card);
    border-color: rgba(0, 113, 227, 0.18);
}
.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.125rem 1.375rem;
    background: transparent;
    border: none;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: color 0.2s ease;
    font-family: inherit;
    min-height: 44px;
}
.faq-question:hover {
    color: var(--accent);
}
.faq-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-muted);
}
.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--accent);
}
.faq-item.active {
    border-color: rgba(0, 113, 227, 0.2);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 4px 20px rgba(0, 113, 227, 0.06);
}
.faq-answer {
    height: 0;
    overflow: hidden;
    transition: height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.faq-answer-inner {
    padding: 0.875rem 1.375rem 1.25rem;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.65;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}
.faq-answer-inner p {
    margin-bottom: 0.625rem;
}
.faq-answer-inner p:last-child {
    margin-bottom: 0;
}
.faq-answer-inner ul {
    margin-top: 0.4rem;
    padding-left: 1.125rem;
    list-style-type: disc;
}
.faq-answer-inner li {
    margin-bottom: 0.3rem;
}
.faq-takeaway {
    max-width: 760px;
    margin: 2rem auto 0;
    background: linear-gradient(135deg, var(--accent-soft) 0%, rgba(255, 255, 255, 0.55) 100%);
    border: 1px solid rgba(0, 113, 227, 0.14);
    border-radius: var(--r);
    padding: 1.5rem 1.75rem;
}
.faq-takeaway-title {
    font-size: 0.73rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.875rem;
}
.faq-takeaway-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.faq-takeaway-list li {
    position: relative;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    color: #334155;
    line-height: 1.5;
}
.faq-takeaway-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}


/* ============================ BRAND LOGO ============================ */
.brand { display: flex; align-items: center; gap: 10px; color: var(--text-main); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-name { font-family: 'Montserrat', var(--font, sans-serif); font-size: 20px; font-weight: 700; letter-spacing: 0.28em; text-transform: uppercase; color: var(--text-main); margin-left: 0.1em; }
.brand-name .ai { color: var(--accent); }

.voice-wave { display: flex; align-items: center; gap: 3px; height: 20px; }
.voice-wave span { 
    display: block; width: 3px; border-radius: 3px; background: var(--accent);
    height: 100%; transform: scaleY(0.2); transform-origin: center;
    animation: voicebeat 1.6s cubic-bezier(0.28, 0.11, 0.32, 1) infinite; 
}
.voice-wave span:nth-child(1) { animation-delay: 0s; }
.voice-wave span:nth-child(2) { animation-delay: 0.12s; }
.voice-wave span:nth-child(3) { animation-delay: 0.24s; }
.voice-wave span:nth-child(4) { animation-delay: 0.36s; }
.voice-wave span:nth-child(5) { animation-delay: 0.24s; }
.voice-wave span:nth-child(6) { animation-delay: 0.12s; }
.voice-wave span:nth-child(7) { animation-delay: 0s; }

@keyframes voicebeat {
    0%, 100% { transform: scaleY(0.18); opacity: 0.5; }
    25% { transform: scaleY(0.95); opacity: 1; }
    50% { transform: scaleY(0.35); opacity: 0.8; }
    62% { transform: scaleY(0.70); opacity: 1; }
    75% { transform: scaleY(0.30); opacity: 0.7; }
}

@media(prefers-reduced-motion: reduce) { 
    .voice-wave span { animation: none; transform: scaleY(0.5); } 
}

/* =========================================
   MATRIX BACKEND MODAL
   ========================================= */
.matrix-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #050505;
    z-index: 10000;
    color: #00ff41;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.matrix-modal:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.matrix-modal.hidden {
    display: none;
}

.matrix-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid #1a1a1a;
    background: #000;
}

.matrix-title {
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 0 0 5px #00ff41;
}

.matrix-close {
    background: none;
    border: none;
    color: #00ff41;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}

.matrix-close:hover {
    color: #fff;
    text-shadow: 0 0 10px #fff;
}

.matrix-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    flex: 1;
    gap: 2px;
    background: #1a1a1a;
    padding: 2px;
    overflow: hidden;
}

@media(max-width: 768px) {
    .matrix-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
    }
}

.matrix-pane {
    background: #050505;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.matrix-pane::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

.pane-title {
    background: #0f0f0f;
    border-bottom: 1px solid #1a1a1a;
    padding: 4px 8px;
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pane-content {
    flex: 1;
    padding: 8px;
    overflow-y: hidden;
    font-size: 0.8rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-all;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.pane-content.canvas-container {
    padding: 0;
    justify-content: center;
    align-items: center;
}

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 24px;
    align-content: center;
}

.metric-box {
    border: 1px solid #1a1a1a;
    padding: 12px;
    text-align: center;
}

.metric-label {
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 4px;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 0 8px #00ff41;
}

/* Animations & Colors for Logs */
.log-row {
    margin-bottom: 2px;
}

.log-time { color: #888; margin-right: 8px; }
.log-info { color: #00ff41; }
.log-warn { color: #ffb86c; }
.log-err { color: #ff5555; }
.log-cyan { color: #8be9fd; }
.log-purple { color: #bd93f9; }
