/* ============================================================================
   STORNI.EU // SEAMLESS STANDALONE DIGITAL SIGNAGE SYSTEM
   Design: 100 % Edge-to-Edge Architectural Matrix · 0px Border-Radius Everywhere
   Strict Max 2 Rows Per Board · Zero Clipping · Viewport-Height (vh) Scaled
   ============================================================================ */

:root {
    --bg-base: #04060a;
    --bg-header: #080b12;
    --bg-cell: #0b1019;
    --bg-cell-alt: #0e1521;
    --bg-subcell: #06090f;

    --hairline: rgba(255, 255, 255, 0.11);
    --hairline-strong: rgba(255, 255, 255, 0.22);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #7c8ba1;

    --emerald: #10b981;
    --emerald-bg: rgba(16, 185, 129, 0.14);
    --cyan: #06b6d4;
    --cyan-bg: rgba(6, 182, 212, 0.14);
    --amber: #f59e0b;
    --amber-bg: rgba(245, 158, 11, 0.16);
    --orange: #f97316;
    --orange-bg: rgba(249, 115, 22, 0.18);
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.22);
    --slate: #64748b;
    --slate-bg: rgba(100, 116, 139, 0.16);

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-radius: 0 !important;
}

html, body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    user-select: none;
}

.hidden {
    display: none !important;
}

/* ============================================================================
   1. 3-STUFEN VOLLBILD-ALARM-RAHMEN & STROBE (FÜR TV AUS DER DISTANZ)
   ============================================================================ */
.alarm-frame {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9000;
    border: 0 solid transparent;
    transition: border-width 0.25s ease, box-shadow 0.25s ease;
}

.alarm-strobe {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 8999;
    opacity: 0;
}

body.alarm-level-1 .alarm-frame {
    border: 8px solid var(--amber);
    animation: pulseAmberFrame 2.2s infinite ease-in-out;
}

body.alarm-level-2 .alarm-frame {
    border: 14px solid var(--orange);
    animation: flashOrangeFrame 1.1s infinite ease-in-out;
}
body.alarm-level-2 .alarm-strobe {
    background: radial-gradient(circle at center, transparent 45%, rgba(249, 115, 22, 0.24) 100%);
    animation: strobeOverlay 1.1s infinite ease-in-out;
}

body.alarm-level-3 .alarm-frame {
    border: 20px solid var(--red);
    animation: flashRedFrame 0.55s infinite steps(2, jump-none);
}
body.alarm-level-3 .alarm-strobe {
    background: radial-gradient(circle at center, rgba(239, 68, 68, 0.14) 20%, rgba(239, 68, 68, 0.45) 100%);
    animation: strobeCritical 0.55s infinite ease-in-out;
}

@keyframes pulseAmberFrame {
    0%, 100% { box-shadow: inset 0 0 32px rgba(245, 158, 11, 0.4); opacity: 0.95; }
    50% { box-shadow: inset 0 0 70px rgba(245, 158, 11, 0.8); opacity: 0.45; }
}
@keyframes flashOrangeFrame {
    0%, 100% { box-shadow: inset 0 0 60px rgba(249, 115, 22, 0.85); opacity: 1; }
    50% { box-shadow: inset 0 0 18px rgba(249, 115, 22, 0.2); opacity: 0.25; }
}
@keyframes flashRedFrame {
    0%, 100% { box-shadow: inset 0 0 100px rgba(239, 68, 68, 0.95); border-color: #ff2a2a; }
    50% { box-shadow: inset 0 0 22px rgba(239, 68, 68, 0.25); border-color: rgba(239, 68, 68, 0.35); }
}
@keyframes strobeOverlay {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 0.1; }
}
@keyframes strobeCritical {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.15; }
}

/* ============================================================================
   2. SEAMLESS PIN-SPERRBILDSCHIRM (0PX RADIUS · ARCHITECTURAL VAULT)
   ============================================================================ */
.pin-overlay {
    position: fixed;
    inset: 0;
    z-index: 8000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-base);
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 64px 64px;
}

.pin-card {
    width: min(460px, 92vw);
    background: var(--bg-cell);
    border: 1px solid var(--hairline-strong);
    border-top: 4px solid var(--emerald);
    padding: clamp(20px, 3.2vh, 36px);
    text-align: center;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.85);
}

.pin-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: var(--emerald);
    background: var(--emerald-bg);
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 5px 12px;
    margin-bottom: 12px;
}

.pin-title {
    font-size: clamp(1.7rem, 3.2vh, 2.3rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.pin-subtitle {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 20px;
}

.pin-dots {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1px;
    background: var(--hairline);
    border: 1px solid var(--hairline-strong);
    margin: 0 auto 14px;
    max-width: 300px;
}

.pin-dot {
    height: 18px;
    background: var(--bg-header);
    transition: background 0.15s ease;
}

.pin-dot.filled {
    background: var(--emerald);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.7);
}

.pin-error {
    min-height: 22px;
    font-size: 0.85rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--red);
    margin-bottom: 10px;
}

.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--hairline);
    border: 1px solid var(--hairline);
    margin-bottom: 18px;
}

.pin-key {
    height: clamp(50px, 7vh, 66px);
    border: none;
    background: var(--bg-cell-alt);
    color: var(--text-primary);
    font-size: clamp(1.25rem, 2.4vh, 1.55rem);
    font-weight: 900;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.pin-key:hover,
.pin-key.tv-focus {
    background: #172234;
    color: var(--emerald);
    outline: 2px solid var(--emerald);
    outline-offset: -2px;
}

.pin-key-action {
    color: var(--amber);
    font-size: 1.05rem;
}

.pin-key-submit {
    background: var(--emerald);
    color: #03140e;
    font-size: 1.15rem;
}

.pin-key-submit:hover,
.pin-key-submit.tv-focus {
    background: #34d399;
    color: #03140e;
}

.pin-footer {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 0.74rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

/* ============================================================================
   3. SEAMLESS HAUPT-SHELL (100VW x 100VH · FLEX COLUMN · ZERO OVERFLOW)
   ============================================================================ */
.app-shell {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-base);
    overflow: hidden;
}

/* KOPFZEILE (KOMPAKTER SEAMLESS STRIP · KEIN HORIZONTALES ABSCHNEIDEN) */
.topbar {
    position: relative;
    flex-shrink: 0;
    height: clamp(46px, 5.6vh, 58px);
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    background: var(--bg-header);
    border-bottom: 1px solid var(--hairline);
    z-index: 100;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 clamp(10px, 1.2vw, 18px);
    border-right: 1px solid var(--hairline);
    flex-shrink: 0;
    max-width: 245px;
}

.brand-text-wrap {
    min-width: 0;
}

.status-beacon {
    width: 8px;
    height: clamp(22px, 3.2vh, 30px);
    background: var(--emerald);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
    flex-shrink: 0;
}
.status-beacon.warning { background: var(--amber); box-shadow: 0 0 14px var(--amber); }
.status-beacon.major { background: var(--orange); box-shadow: 0 0 16px var(--orange); }
.status-beacon.critical { background: var(--red); box-shadow: 0 0 20px var(--red); }

.brand-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: clamp(0.84rem, 1vw, 1.05rem);
    font-weight: 900;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.readonly-pill {
    font-size: 0.58rem;
    font-family: var(--font-mono);
    font-weight: 800;
    padding: 2px 5px;
    background: rgba(255, 255, 255, 0.09);
    color: var(--text-secondary);
    letter-spacing: 0.06em;
}

.brand-sub {
    font-size: 0.64rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 10 TAFEL-REITER (SEAMLESS FLUSH TABS) */
.slide-nav {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 1px;
    background: var(--hairline);
}

.slide-pill {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0 clamp(6px, 0.65vw, 11px);
    border: none;
    border-top: 3px solid transparent;
    background: var(--bg-header);
    color: var(--text-muted);
    font-family: var(--font-sans);
    cursor: pointer;
    overflow: hidden;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.slide-pill:hover {
    background: var(--bg-cell-alt);
    color: var(--text-primary);
}

.slide-pill .slide-num {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    line-height: 1.1;
}

.slide-pill .slide-name {
    width: 100%;
    font-size: clamp(0.64rem, 0.72vw, 0.8rem);
    font-weight: 900;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.slide-pill.active {
    background: var(--bg-cell-alt);
    color: var(--text-primary);
    border-top-color: var(--emerald);
}

.slide-pill.active .slide-num {
    color: var(--emerald);
}

/* RECHTE STEUERLEISTE & UHR (KOMPAKT & FLUSH) */
.topbar-controls {
    display: flex;
    align-items: stretch;
    border-left: 1px solid var(--hairline);
    flex-shrink: 0;
}

.ctrl-btn {
    padding: 0 clamp(8px, 0.75vw, 12px);
    border: none;
    border-right: 1px solid var(--hairline);
    background: var(--bg-header);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: clamp(0.62rem, 0.7vw, 0.74rem);
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.ctrl-btn:hover {
    background: var(--bg-cell-alt);
    color: var(--text-primary);
}

.ctrl-btn.active {
    background: var(--emerald-bg);
    color: #34d399;
    border-top: 3px solid var(--emerald);
}

.clock-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: right;
    padding: 0 clamp(10px, 1vw, 16px);
    background: var(--bg-header);
}

.clock-time {
    font-family: var(--font-mono);
    font-size: clamp(0.9rem, 1.1vw, 1.2rem);
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.05;
    white-space: nowrap;
}

.clock-meta {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: var(--emerald);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* FORTSCHRITTSLINIE FÜR DEN AUTOMATISCHEN TAFEL-WECHSEL */
.rotation-progress-track {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.rotation-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--emerald), var(--cyan));
    transition: width 0.12s linear;
}

/* ============================================================================
   4. AKTIVES ALARM-BANNER (FLUSH FULL-WIDTH STRIP)
   ============================================================================ */
.active-alarm-banner {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: clamp(6px, 1vh, 10px) clamp(16px, 1.8vw, 26px);
    border-bottom: 2px solid var(--amber);
    background: var(--amber-bg);
    animation: slideDownBanner 0.35s var(--ease-out-expo);
}

.active-alarm-banner.level-2 {
    border-bottom-color: var(--orange);
    background: var(--orange-bg);
}

.active-alarm-banner.level-3 {
    border-bottom-color: var(--red);
    background: var(--red-bg);
}

.alarm-banner-title {
    font-size: clamp(0.92rem, 1.6vh, 1.2rem);
    font-weight: 900;
}

.alarm-banner-detail {
    font-size: clamp(0.76rem, 1.3vh, 0.96rem);
    color: var(--text-secondary);
}

@keyframes slideDownBanner {
    from { opacity: 0; transform: translateY(-100%); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   5. SEAMLESS SIGNAGE STAGE & CHOREOGRAPHIERTE TAFEL-ÜBERGÄNGE
   ============================================================================ */
.signage-stage {
    position: relative;
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    background: var(--bg-base);
}

.signage-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(56px, 0, 0);
    transition:
        opacity 0.52s var(--ease-out-expo),
        transform 0.52s var(--ease-out-expo),
        visibility 0.52s;
}

.signage-slide.exit-left {
    opacity: 0;
    visibility: hidden;
    transform: translate3d(-56px, 0, 0);
}

.signage-slide.exit-right {
    opacity: 0;
    visibility: hidden;
    transform: translate3d(56px, 0, 0);
}

.signage-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
}

/* Gestaffelte Sektor-Einblendung beim Tafel-Wechsel */
.signage-slide.just-entered .signage-card,
.signage-slide.just-entered .compass-item {
    animation: cellReveal 0.55s var(--ease-out-expo) backwards;
    animation-delay: calc(var(--i, 0) * 38ms);
}

@keyframes cellReveal {
    0% {
        opacity: 0;
        transform: translate3d(0, 14px, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* KOMPAKTE EINZEILIGE TAFEL-KOPFZEILE (SPART ~35PX VERTIKALE HÖHE) */
.board-header {
    flex-shrink: 0;
    height: clamp(38px, 4.8vh, 50px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 clamp(16px, 1.8vw, 26px);
    background: #06090f;
    border-bottom: 1px solid var(--hairline);
}

.board-header-left {
    display: flex;
    align-items: baseline;
    gap: 14px;
    min-width: 0;
    overflow: hidden;
}

.board-eyebrow {
    font-family: var(--font-mono);
    font-size: clamp(0.68rem, 1.25vh, 0.86rem);
    font-weight: 800;
    color: var(--emerald);
    letter-spacing: 0.1em;
    white-space: nowrap;
    flex-shrink: 0;
}

.board-title {
    font-size: clamp(0.95rem, min(1.35vw, 2.1vh), 1.45rem);
    font-weight: 900;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.board-highlight {
    font-family: var(--font-mono);
    font-size: clamp(0.72rem, min(0.9vw, 1.5vh), 0.98rem);
    font-weight: 900;
    padding: clamp(4px, 0.6vh, 7px) clamp(10px, 1vw, 16px);
    background: var(--emerald-bg);
    border-left: 3px solid var(--emerald);
    color: #34d399;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================================================
   6. SEAMLESS 1PX HAIRLINE MATRIX GRIDS (STRENG MAXIMAL 2 ZEILEN PRO TAFEL!)
   ============================================================================ */
.signage-grid {
    flex: 1;
    min-height: 0;
    min-width: 0;
    display: grid;
    gap: 1px;
    background: var(--hairline);
}

.grid-3x2 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.grid-4x2 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.grid-5x2 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.grid-3x1 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
}

.grid-4x1 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
}

.grid-5x1 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
}

/* 2-ZEILEN SPLIT-CONTAINER FÜR TAFEL 02 (VMs + STORAGE) & TAFEL 08 (STROM) */
.two-row-board-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-rows: 1.15fr 1fr;
    gap: 1px;
    background: var(--hairline);
}

/* ============================================================================
   7. SEAMLESS SIGNAGE SEKTOREN (VH-SKALIERT · NIEMALS ABGESCHNITTEN)
   ============================================================================ */
.signage-card {
    position: relative;
    background: var(--bg-cell);
    border-top: 3px solid var(--emerald);
    padding: clamp(10px, 1.8vh, 22px) clamp(12px, 1.4vw, 24px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    transition: background-color 0.25s ease;
}

.signage-card:nth-child(even) {
    background: var(--bg-cell-alt);
}

.signage-card.card-cyan { border-top-color: var(--cyan); }
.signage-card.card-amber { border-top-color: var(--amber); }
.signage-card.card-orange { border-top-color: var(--orange); }
.signage-card.card-red {
    border-top-color: var(--red);
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.16) 0%, var(--bg-cell) 100%);
}
.signage-card.card-standby { border-top-color: var(--slate); }

.sc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    flex-shrink: 0;
}

.sc-tag {
    flex: 1;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: clamp(0.62rem, min(0.76vw, 1.35vh), 0.84rem);
    font-weight: 800;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-pill {
    font-family: var(--font-mono);
    font-size: clamp(0.6rem, min(0.72vw, 1.25vh), 0.8rem);
    font-weight: 900;
    padding: clamp(2px, 0.4vh, 4px) clamp(6px, 0.6vw, 10px);
    background: var(--emerald-bg);
    border-left: 3px solid var(--emerald);
    color: #34d399;
    white-space: nowrap;
    flex-shrink: 0;
}

.sc-pill-cyan { background: var(--cyan-bg); border-left-color: var(--cyan); color: #22d3ee; }
.sc-pill-amber { background: var(--amber-bg); border-left-color: var(--amber); color: #fbbf24; }
.sc-pill-red { background: var(--red-bg); border-left-color: var(--red); color: #f87171; }
.sc-pill-standby { background: var(--slate-bg); border-left-color: var(--slate); color: #94a3b8; }

.sc-title {
    font-size: clamp(0.95rem, min(1.35vw, 2.35vh), 1.62rem);
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin-top: clamp(2px, 0.5vh, 6px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-subtitle {
    font-size: clamp(0.72rem, min(0.86vw, 1.5vh), 0.98rem);
    color: var(--text-secondary);
    line-height: 1.25;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* RIESIGE HERO-ZAHLEN (PROPORTIONAL ZUR BILDSCHIRMHÖHE SKALIERT) */
.sc-giant-val {
    font-family: var(--font-mono);
    font-size: clamp(1.45rem, min(2.6vw, 4.4vh), 3.3rem);
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1;
    margin: clamp(2px, 0.5vh, 6px) 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-giant-val small {
    font-size: 0.44em;
    font-weight: 700;
    color: var(--text-secondary);
}

/* SCHARFKANTIGE FORTSCHRITTSBALKEN (CPU / RAM / DISK) */
.sc-bars {
    display: flex;
    flex-direction: column;
    gap: clamp(5px, 1vh, 10px);
    margin: clamp(2px, 0.5vh, 6px) 0;
}

.sc-bar-row {
    display: flex;
    flex-direction: column;
    gap: clamp(2px, 0.4vh, 4px);
}

.sc-bar-labels {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: clamp(0.68rem, min(0.82vw, 1.4vh), 0.92rem);
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
}

.sc-bar-track {
    width: 100%;
    height: clamp(4px, 0.7vh, 6px);
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.sc-bar-fill {
    height: 100%;
    background: var(--emerald);
    transition: width 0.65s var(--ease-out-expo), background-color 0.3s ease;
}

.sc-bar-fill.fill-cyan { background: var(--cyan); }
.sc-bar-fill.fill-amber { background: var(--amber); }
.sc-bar-fill.fill-red { background: var(--red); }

/* FUSSZEILE EINES SEKTORS MIT PREIS-/WATT-TAG */
.sc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: clamp(6px, 1.1vh, 12px);
    border-top: 1px solid var(--hairline);
    font-family: var(--font-mono);
    font-size: clamp(0.68rem, min(0.82vw, 1.4vh), 0.94rem);
    color: var(--text-secondary);
    min-width: 0;
    flex-shrink: 0;
}

.sc-footer > span:first-child {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-price-tag {
    font-family: var(--font-mono);
    font-size: clamp(0.74rem, min(0.95vw, 1.6vh), 1.12rem);
    font-weight: 900;
    padding: clamp(3px, 0.5vh, 5px) clamp(8px, 0.8vw, 12px);
    background: var(--amber-bg);
    border-left: 3px solid var(--amber);
    color: #fbbf24;
    white-space: nowrap;
    flex-shrink: 0;
}

.sc-price-tag.tag-emerald {
    background: var(--emerald-bg);
    border-left-color: var(--emerald);
    color: #34d399;
}

.sc-price-tag.tag-slate {
    background: var(--slate-bg);
    border-left-color: var(--slate);
    color: #cbd5e1;
}

/* ============================================================================
   8. SPEZIAL-MATRIZEN FÜR MINECRAFT (4x2), FINANZEN & DOMAINS (5x2)
   ============================================================================ */
.mc-metrics-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--hairline);
    border: 1px solid var(--hairline);
    margin: clamp(3px, 0.6vh, 8px) 0;
}

.mc-metric-box {
    background: var(--bg-subcell);
    padding: clamp(5px, 0.9vh, 10px) clamp(8px, 0.9vw, 14px);
    min-width: 0;
}

.mc-metric-label {
    font-family: var(--font-mono);
    font-size: clamp(0.58rem, min(0.68vw, 1.15vh), 0.72rem);
    color: var(--text-muted);
    display: block;
    white-space: nowrap;
}

.mc-metric-val {
    font-family: var(--font-mono);
    font-size: clamp(0.86rem, min(1.1vw, 1.9vh), 1.3rem);
    font-weight: 900;
    color: var(--text-primary);
    white-space: nowrap;
}

/* TAFEL 08: STROM & FINANZEN UNTERE ZEILE */
.finance-bottom-split {
    min-height: 0;
    min-width: 0;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 1px;
    background: var(--hairline);
}

.power-svg-container {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 4px;
}

.power-svg-container svg {
    width: 100%;
    height: 100%;
    max-height: 100%;
    overflow: visible;
}

/* 3x2 KUNDEN-KONTEN RASTER (NUR 2 ZEILEN STATT 3!) */
.customers-mini-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--hairline);
    border: 1px solid var(--hairline);
    margin-top: clamp(6px, 1vh, 12px);
}

.cust-tile {
    background: var(--bg-subcell);
    padding: clamp(6px, 1vh, 12px) clamp(8px, 0.9vw, 14px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.cust-name {
    font-size: clamp(0.8rem, min(0.95vw, 1.65vh), 1.08rem);
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cust-meta {
    font-family: var(--font-mono);
    font-size: clamp(0.62rem, min(0.72vw, 1.25vh), 0.78rem);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* TAFEL 09 & 10: JE 10 DOMAINS IM 5x2 RASTER (NUR 2 ZEILEN!) + KOMPASS-BAR */
.domains-signage-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 1px;
    background: var(--hairline);
}

.domain-tile .sc-title {
    font-family: var(--font-mono);
    font-size: clamp(0.88rem, min(1.12vw, 2vh), 1.32rem);
}

.architecture-compass-bar {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: var(--hairline);
}

.compass-item {
    background: var(--bg-subcell);
    padding: clamp(8px, 1.3vh, 14px) clamp(12px, 1.3vw, 20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.compass-item > div {
    min-width: 0;
    flex: 1;
}

.compass-label {
    font-family: var(--font-mono);
    font-size: clamp(0.6rem, min(0.7vw, 1.2vh), 0.74rem);
    color: var(--text-muted);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compass-val {
    font-family: var(--font-mono);
    font-size: clamp(0.76rem, min(0.92vw, 1.55vh), 1.06rem);
    font-weight: 800;
    color: var(--text-primary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================================
   9. UNTERE STATUSLEISTE (FLUSH SEAMLESS FOOTER)
   ============================================================================ */
.bottombar {
    flex-shrink: 0;
    height: clamp(26px, 3.2vh, 34px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 clamp(14px, 1.5vw, 24px);
    background: var(--bg-header);
    border-top: 1px solid var(--hairline);
    font-family: var(--font-mono);
    font-size: clamp(0.62rem, min(0.74vw, 1.25vh), 0.76rem);
    color: var(--text-muted);
}

.bottom-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bottom-dot {
    width: 7px;
    height: 7px;
    background: var(--emerald);
    box-shadow: 0 0 8px var(--emerald);
    flex-shrink: 0;
}

.bottom-right {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.bottom-right strong {
    color: var(--text-secondary);
}
