/* ==========================================================================
   Signage Studio – CMS-Stylesheet
   Umsetzung des Prototyps «Signage Studio» (Signage Software Redesign/).
   Schriften: Manrope (Text) + IBM Plex Mono (Beschriftungen, Zahlen).
   ========================================================================== */

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/Manrope-VariableFont_wght.ttf') format('truetype');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IBM Plex Mono';
    src: url('../fonts/IBMPlexMono-Regular.woff2') format('woff2');
    font-weight: 400 500;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg:          #f7f7f5;
    --surface:     #ffffff;
    --surface-2:   #fbfbfa;
    --hover:       #f2f3f1;
    --line:        #e6e7e4;
    --line-2:      #dfe0dd;
    --line-3:      #ececea;
    --line-soft:   #f0f1ee;
    --dash:        #cdd0cb;

    --ink:         #17191b;
    --muted:       #6b7075;
    --muted-2:     #71767b;
    --faint:       #a4a8a4;
    --faint-2:     #a3a8a5;

    --accent:      #0e7a58;
    --accent-dark: #0b6247;
    --accent-soft: #eaf3ef;
    --accent-mist: #f4f8f6;
    --accent-bg:   #f1f6f3;

    --live:        #3fcf8e;
    --off:         #c9c5b8;
    --offline:     #e0664f;
    --danger:      #b04a35;
    --danger-soft: #fbeeeb;
    --warn:        #8a5a00;
    --warn-soft:   #fcf3de;
    --brand:       #d8253a;

    --stage:       #0b0c0b;
    --screen:      #111310;
    --stage-bar:   #0f1110;

    --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    text-wrap: pretty;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
button { font-family: inherit; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img, video { max-width: 100%; }
[hidden] { display: none !important; }
code { font-family: var(--mono); font-size: .9em; background: var(--hover); border-radius: 4px; padding: 1px 5px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d9dad6; border-radius: 99px; border: 3px solid var(--bg); }

@keyframes om-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .32; } }
@keyframes om-spin  { to { transform: rotate(360deg); } }
@keyframes om-rise  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes om-sweep { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.ico { display: block; flex: none; }

/* ==========================================================================
   Seitenrahmen
   ========================================================================== */
.app { display: flex; height: 100vh; min-height: 560px; overflow: hidden; background: var(--bg); }

.side {
    width: 258px; flex: none;
    display: flex; flex-direction: column; min-height: 0; overflow-y: auto;
    background: var(--surface); border-right: 1px solid var(--line);
}
.side-brand { padding: 22px 20px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.side-brand img { height: 30px; width: auto; display: block; }
.side-tag {
    font-family: var(--mono); font-size: 9px; letter-spacing: .14em; color: #b0b5b8;
    border: 1px solid var(--line-3); border-radius: 4px; padding: 3px 5px;
}
.side-group { padding: 16px 12px 0; display: flex; flex-direction: column; gap: 1px; }
.side-group.is-first { padding-top: 2px; gap: 2px; }
.side-group.is-tools { padding-top: 18px; }
.side-label {
    padding: 0 14px 7px;
    font-family: var(--mono); font-size: 9.5px; letter-spacing: .15em; color: var(--faint);
    text-transform: uppercase;
}
.nav {
    display: flex; align-items: center; gap: 10px;
    height: 32px; padding: 0 13px; border: none; border-radius: 999px;
    font-size: 12.5px; font-weight: 500; text-align: left; cursor: pointer;
    background: transparent; color: var(--muted); text-decoration: none;
}
.nav:hover { background: var(--hover); color: var(--muted); }
.nav.is-active, .nav.is-active:hover { background: var(--hover); color: var(--ink); font-weight: 600; }
.nav .ico { opacity: .62; }
.nav-main { height: 38px; gap: 11px; font-size: 13.5px; }
.nav-main .ico, .nav-foot .ico { opacity: 1; }
.nav-foot { height: 36px; gap: 11px; font-size: 13px; }
.nav-player { font-weight: 400; }
.nav-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; }
.side-bottom { margin-top: auto; padding: 16px 12px 18px; display: flex; flex-direction: column; gap: 2px; }
.side-bottom .side-label { padding-bottom: 8px; }
.nav-small {
    display: flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 9px;
    font-size: 12.5px; color: var(--muted-2); text-decoration: none; background: none; border: none; cursor: pointer;
}
.nav-small:hover { color: var(--ink); }
.nav-small.is-active { color: var(--ink); font-weight: 600; }

/* Status-Punkte */
.dot-live    { background: var(--live); }
.dot-off     { background: var(--off); }
.dot-offline { background: var(--offline); }
.ring-live    { box-shadow: 0 0 0 3px rgba(63, 207, 142, .20); }
.ring-offline { box-shadow: 0 0 0 3px rgba(224, 102, 79, .18); }
.pulse { animation: om-pulse 2.6s ease-in-out infinite; }

.main { flex: 1; min-width: 0; overflow-y: auto; overflow-x: auto; }

/* Kopfzeile */
.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    height: 61px; padding: 0 34px;
    background: rgba(247, 247, 245, .86);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line-3);
}
.crumb {
    display: flex; align-items: center; gap: 9px; min-width: 0;
    font-family: var(--mono); font-size: 10.5px; letter-spacing: .13em; color: var(--muted-2);
    text-transform: uppercase; white-space: nowrap;
}
.crumb a { color: var(--muted-2); }
.crumb a:hover { color: var(--ink); }
.crumb .sep { color: #cfd2ce; }
.crumb .here { color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 14px; }

.search { position: relative; }
.search-box {
    display: flex; align-items: center; gap: 7px;
    height: 32px; padding: 0 12px;
    border: 1px solid var(--line); border-radius: 99px; background: var(--surface);
    font-size: 12.5px; color: var(--muted-2); min-width: 172px;
}
.search-box input {
    border: none; background: transparent; outline: none; padding: 0;
    font-size: 12.5px; width: 130px; color: var(--ink);
}
.search-box input::placeholder { color: var(--muted-2); }
.search-box:focus-within { border-color: var(--ink); }
.search-pop {
    position: absolute; right: 0; top: 40px; width: 340px; max-height: 420px; overflow-y: auto;
    background: var(--surface); border: 1px solid var(--line); border-radius: 13px;
    box-shadow: 0 18px 48px rgba(16, 18, 17, .16); padding: 6px; z-index: 50;
    animation: om-rise .16s ease;
}
.search-grp { padding: 8px 10px 4px; font-family: var(--mono); font-size: 9px; letter-spacing: .15em; color: var(--faint); }
.search-hit {
    display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px;
    font-size: 13px; color: var(--ink);
}
.search-hit:hover, .search-hit.is-sel { background: var(--hover); color: var(--ink); }
.search-hit .ico { color: var(--muted); }
.search-hit small { margin-left: auto; font-size: 11px; color: var(--muted-2); white-space: nowrap; }
.search-empty { padding: 12px 10px; font-size: 12.5px; color: var(--muted); }

.user { position: relative; display: flex; align-items: center; gap: 9px; background: none; border: none; padding: 0; cursor: pointer; text-align: left; }
.avatar {
    width: 29px; height: 29px; border-radius: 50%; flex: none;
    background: var(--ink); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 600; letter-spacing: .02em;
}
.avatar.is-soft { background: #e9eae6; color: var(--muted); }
.user-name { font-size: 12.5px; font-weight: 500; line-height: 1.25; }
.user-sub { font-size: 10.5px; color: var(--muted-2); line-height: 1.25; }

/* ==========================================================================
   Seiteninhalt
   ========================================================================== */
.page { padding: 34px 34px 60px; max-width: 1360px; }
.page-player { padding: 30px 34px 64px; max-width: 1500px; }
.page-lib    { padding: 30px 34px 64px; max-width: 1440px; }
.page-detail { padding: 26px 34px 64px; max-width: 1240px; }
.page-mid    { padding: 30px 34px 64px; max-width: 1080px; }
.page-narrow { padding: 30px 34px 64px; max-width: 820px; }
.page-sub    { padding: 26px 34px 64px; max-width: 1080px; }

.h1 { margin: 0; font-size: 31px; font-weight: 300; letter-spacing: -0.025em; line-height: 1.15; }
.h1-sm { font-size: 29px; }
.lede { margin: 9px 0 0; font-size: 14px; color: var(--muted); max-width: 640px; }
.sub-line { margin: 8px 0 0; font-size: 13.5px; color: var(--muted); }
.h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.back {
    display: inline-flex; border: none; background: none; padding: 0;
    font-size: 13px; color: var(--muted); cursor: pointer; text-decoration: none;
}
.back:hover { color: var(--ink); }
.back + .h1 { margin-top: 14px; }

.head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.head-row.is-end { align-items: flex-end; }
.head-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.title-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.kicker {
    font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em;
    text-transform: uppercase; color: var(--muted-2);
}
.kicker-lg { font-size: 10px; }
.sec-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.sec-row .note { font-size: 12px; color: var(--muted-2); }
.sec-title { display: flex; align-items: baseline; gap: 10px; }
.count { font-family: var(--mono); font-size: 11px; color: var(--muted-2); }

.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 17px;
}
.card-pad { padding: 20px; }
.card-lg { border-radius: 16px; padding: 24px; }
.card + .card { margin-top: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.card-head.mb-lg { margin-bottom: 16px; }
.card-note { font-size: 12px; color: var(--muted); line-height: 1.55; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.card-desc { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 14px; }
.divider { height: 1px; background: var(--line-soft); margin: 18px 0; }
.card-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.card-dark .kicker { color: rgba(255, 255, 255, .55); }

.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-14 { margin-top: 14px; } .mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; } .mt-22 { margin-top: 22px; } .mt-26 { margin-top: 26px; } .mt-30 { margin-top: 30px; }

/* ==========================================================================
   Knöpfe
   ========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 36px; padding: 0 15px;
    border: 1px solid transparent; border-radius: 10px;
    font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap;
    cursor: pointer; text-decoration: none; background: var(--surface); color: var(--ink);
    transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-primary:hover { background: #000; color: #fff; }
.btn-secondary { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-outline { background: var(--surface); border-color: var(--ink); color: var(--ink); font-weight: 600; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-green { background: var(--accent); color: #fff; }
.btn-green:hover { background: var(--accent-dark); color: #fff; }
.btn-danger { background: var(--surface); border-color: #efd5ce; color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.btn-white { background: #fff; color: var(--ink); font-weight: 600; }
.btn-white:hover { background: #eceeea; color: var(--ink); }
.btn-ghost-dark { background: transparent; border-color: rgba(255, 255, 255, .14); color: #fff; }
.btn-ghost-dark:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.btn-sm { height: 32px; padding: 0 13px; border-radius: 8px; font-size: 12px; }
.btn-xs { height: 28px; padding: 0 11px; border-radius: 8px; font-size: 11.5px; }
.btn-lg { height: 40px; padding: 0 18px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-tile { height: 38px; padding: 0 15px; font-size: 13px; }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: default; pointer-events: none; }
.btn .plus { font-size: 15px; line-height: 1; }
.link-btn {
    border: none; background: none; padding: 0; cursor: pointer;
    font-size: 12px; color: var(--accent); font-weight: 500; text-decoration: none;
}
.link-btn:hover { color: var(--accent-dark); }
.link-btn.is-muted { color: var(--muted); font-weight: 400; }
.link-btn.is-muted:hover { color: var(--ink); }
.link-btn.is-danger { color: var(--danger); }
.icon-btn {
    width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); cursor: pointer; color: var(--ink);
}
.icon-btn:hover { border-color: var(--ink); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

/* Schalter (Bildschirm ein/aus) */
.switch-btn {
    display: inline-flex; align-items: center; gap: 9px;
    height: 38px; padding: 0 14px 0 12px;
    border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface);
    font-size: 13px; font-weight: 500; cursor: pointer;
}
.switch-btn:hover { border-color: var(--ink); }
.switch-btn[disabled] { opacity: .6; cursor: progress; }
.track { position: relative; width: 30px; height: 17px; border-radius: 99px; background: #d6d8d4; transition: background .18s; flex: none; }
.track::after {
    content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px;
    border-radius: 50%; background: #fff; transition: left .18s;
}
.is-on > .track, .track.is-on { background: var(--accent); }
.is-on > .track::after, .track.is-on::after { left: 15px; }

.toggle { position: relative; flex: none; width: 34px; height: 19px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.toggle span { position: absolute; inset: 0; border-radius: 99px; background: #e0e2de; transition: background .18s; pointer-events: none; }
.toggle span::after {
    content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 14px; height: 14px;
    border-radius: 50%; background: #fff; transition: left .18s;
}
.toggle input:checked + span { background: var(--accent); }
.toggle input:checked + span::after { left: 17.5px; }
.toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ==========================================================================
   Formularfelder
   ========================================================================== */
.field { display: block; }
.field > span, .field-label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.input {
    width: 100%; height: 36px; padding: 0 11px;
    border: 1px solid var(--line-2); border-radius: 9px;
    font-size: 13px; background: var(--surface);
}
.input-sm { height: 32px; font-size: 12.5px; border-radius: 8px; padding: 0 10px; }
.input-lg { height: 38px; }
textarea.input { height: auto; min-height: 74px; padding: 10px 11px; line-height: 1.55; resize: vertical; }
select.input {
    appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236b7075' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center;
}
input[type="time"].input, input[type="date"].input, input[type="number"].input { font-family: var(--mono); font-size: 12.5px; }
input[type="color"].color { width: 36px; height: 32px; padding: 2px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); cursor: pointer; }
.input-title {
    height: 36px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px;
    font-size: 15px; font-weight: 600; background: transparent; min-width: 120px;
}
.input-title:hover { border-color: var(--line-2); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.form-foot { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.hint { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.check-line { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.check-line input { width: 15px; height: 15px; accent-color: var(--ink); margin: 0; }

/* Segmentierte Auswahl (Tage, Filter) */
.seg { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border-radius: 9px; background: var(--hover); }
.seg button, .seg label {
    display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: none; border-radius: 7px;
    background: transparent; color: #7b807c; font-size: 12px; cursor: pointer;
}
.seg .is-on, .seg input:checked + span { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(16, 18, 17, .10); }
.days { display: flex; gap: 5px; flex-wrap: wrap; }
.day { position: relative; }
.day input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.day span {
    display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 32px;
    border: 1px solid var(--line-2); border-radius: 8px; font-family: var(--mono); font-size: 11px; color: var(--muted);
    background: var(--surface); cursor: pointer;
}
.day input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.day input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ==========================================================================
   Status, Chips, Etiketten
   ========================================================================== */
.pill {
    display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px;
    font-family: var(--mono); font-size: 9.5px; letter-spacing: .13em; white-space: nowrap;
}
.pill .d { width: 5px; height: 5px; border-radius: 50%; }
.pill-live    { background: var(--accent-soft); color: var(--accent); }
.pill-off     { background: var(--hover); color: var(--muted); }
.pill-offline { background: var(--danger-soft); color: var(--danger); }
.pill-plain   { background: var(--hover); color: var(--muted); }
.glass {
    display: flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px;
    background: rgba(12, 14, 13, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    font-family: var(--mono); font-size: 9px; letter-spacing: .14em; color: #fff; white-space: nowrap;
}
.glass .d { width: 5px; height: 5px; border-radius: 50%; }
.tag {
    display: inline-flex; align-items: center; gap: 5px; height: 18px; padding: 0 7px; border-radius: 5px;
    background: var(--accent-soft); color: var(--accent);
    font-family: var(--mono); font-size: 8.5px; letter-spacing: .06em; white-space: nowrap;
}
.tag-neutral { background: var(--hover); color: var(--muted); }
.tag-warn { background: var(--danger-soft); color: var(--danger); }
.tag-amber { background: var(--warn-soft); color: var(--warn); }
a.tag:hover { filter: brightness(.97); }
.tag-soft {
    display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 99px;
    font-size: 12px; font-weight: 500; background: var(--hover); color: var(--muted);
}
.tag-soft.is-ok { background: var(--accent-soft); color: var(--accent); }
.tag-soft.is-warn { background: var(--danger-soft); color: var(--danger); }
.cat { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted-2); white-space: nowrap; min-width: 0; }
.cat-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.fmt-chip {
    display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 5px;
    border: 1px solid var(--ink); background: var(--ink); color: #fff;
    font-family: var(--mono); font-size: 9px; letter-spacing: .04em; white-space: nowrap;
}
.fmt-chip.is-missing { background: transparent; color: var(--faint-2); border: 1px dashed var(--line-2); }
.glyph { display: inline-block; border: 1.3px solid currentColor; border-radius: 2px; flex: none; }
.glyph-box { flex: none; display: flex; align-items: center; justify-content: center; }
.glyph-lg { border-width: 1.5px; border-color: var(--ink); border-radius: 3px; }

/* Hilfsklassen, die includes/functions.php ausgibt */
.fmt-badge {
    display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 5px;
    font-family: var(--mono); font-size: 8.5px; letter-spacing: .05em; background: var(--hover); color: var(--muted);
}
.fmt-badge.ok { background: var(--accent-soft); color: var(--accent); }
.fmt-badge.warn { background: var(--warn-soft); color: var(--warn); }
.cat-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 99px; color: #fff; font-size: 11px; font-weight: 600; }
.chip-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.screen-rect {
    display: inline-flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--ink); border-radius: 3px; flex: none;
}
.screen-rect span { font-family: var(--mono); font-size: 9px; color: var(--ink); letter-spacing: .06em; }

/* ==========================================================================
   Übersicht
   ========================================================================== */
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 26px 0 34px; }
.quick-btn {
    display: flex; align-items: center; gap: 13px; padding: 15px 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 13px;
    cursor: pointer; text-align: left; color: var(--ink); text-decoration: none;
}
.quick-btn:hover { border-color: var(--ink); color: var(--ink); }
.quick-ico {
    width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--hover); color: var(--ink);
    display: flex; align-items: center; justify-content: center;
}
.quick-ico.is-green { background: var(--accent-soft); color: var(--accent); }
.quick-ico.is-red { background: var(--danger-soft); color: var(--danger); }
.quick-title { display: block; font-size: 13.5px; font-weight: 600; }
.quick-sub { display: block; font-size: 12px; color: var(--muted-2); margin-top: 2px; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile {
    display: block; width: 100%; padding: 0; text-align: left;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
    cursor: pointer; color: var(--ink); text-decoration: none;
}
.tile:hover { border-color: var(--ink); color: var(--ink); }
.tile-stage { position: relative; aspect-ratio: 16 / 9; background: var(--stage); display: flex; align-items: center; justify-content: center; }
.tile-stage .glass { position: absolute; left: 11px; top: 11px; }
.tile-fmt { position: absolute; right: 11px; top: 11px; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: rgba(255, 255, 255, .55); }
.tile-body { padding: 13px 15px 15px; }
.tile-name { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.tile-now { display: flex; align-items: center; gap: 7px; margin-top: 5px; font-size: 12px; color: var(--muted); }
.tile-now span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-meta { display: flex; align-items: center; gap: 8px; margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line-soft); font-size: 11.5px; color: var(--muted-2); }
.tile-meta .warn { color: var(--danger); }
.tile-meta .ok { color: var(--accent); }

/* Bildschirm-Fläche (gemeinsam für Kacheln und Livevorschau) */
.screen { position: relative; background: var(--screen); overflow: hidden; transition: opacity .3s; }
.screen.is-dim { opacity: .26; }
.screen .layer { position: absolute; inset: 0; opacity: 0; transition: opacity .85s ease; }
.screen .layer.is-on { opacity: 1; }
.screen .layer img, .screen .layer video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.screen-idle {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    color: rgba(255, 255, 255, .5); font-family: var(--mono); font-size: 9px; letter-spacing: .16em; text-align: center; padding: 10px;
}
.screen-idle::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--brand); }
.screen-ph {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: rgba(255, 255, 255, .5); background: repeating-linear-gradient(115deg, #25302b 0 10px, #2e3a34 10px 20px);
}

.stats-line { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.stats-line b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.stats-line a { color: var(--danger); }
.stats-line .est { color: var(--faint); }

/* ==========================================================================
   Player-Detail
   ========================================================================== */
.pd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 22px; margin-top: 24px; align-items: start; }
.stage-card { position: relative; border-radius: 15px; overflow: hidden; background: var(--stage); border: 1px solid var(--line); }
.stage-area { position: relative; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; }
.stage-area > .glass { position: absolute; left: 16px; top: 16px; height: 26px; padding: 0 11px; gap: 7px; font-size: 9.5px; letter-spacing: .16em; background: rgba(12, 14, 13, .6); backdrop-filter: blur(8px); }
.stage-area > .glass .d { width: 6px; height: 6px; }
.stage-over {
    position: absolute; inset: 0; background: rgba(8, 9, 9, .82);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 20px;
}
.stage-over .t { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; color: rgba(255, 255, 255, .5); }
.stage-over .n { font-size: 14px; color: rgba(255, 255, 255, .72); max-width: 420px; }
.stage-bar { display: flex; align-items: center; gap: 16px; padding: 13px 16px; background: var(--stage-bar); border-top: 1px solid rgba(255, 255, 255, .07); }
.stage-nav { display: flex; gap: 6px; }
.stage-nav button {
    width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .14);
    background: transparent; color: #fff; cursor: pointer; font-size: 12px;
}
.stage-nav button:hover { background: rgba(255, 255, 255, .09); }
.stage-info { flex: 1; min-width: 0; }
.stage-info-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 7px; }
.stage-now { font-size: 12.5px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-now b { font-weight: 600; }
.stage-pos { font-family: var(--mono); font-size: 10.5px; color: rgba(255, 255, 255, .45); white-space: nowrap; }
.stage-prog { height: 2px; border-radius: 99px; background: rgba(255, 255, 255, .13); overflow: hidden; }
.stage-prog > div { height: 100%; width: 0; background: #fff; transition: width .9s linear; }

.sec-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 30px 0 13px; flex-wrap: wrap; }

/* Reiter je Playlist */
.pl-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.pl-tab {
    display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px;
    border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface);
    color: var(--muted); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.pl-tab:hover { border-color: var(--ink); color: var(--ink); }
.pl-tab.is-on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.pl-tab small { font-family: var(--mono); font-size: 9.5px; opacity: .7; letter-spacing: .04em; }
.pl-tab .rule { font-family: var(--mono); font-size: 9px; letter-spacing: .08em; opacity: .75; }
.pl-context {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    margin-bottom: 12px; padding: 10px 13px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface-2);
    font-size: 12px; color: var(--muted);
}
.pl-context b { color: var(--ink); font-weight: 600; }
.pl-context > span:first-child { flex: 1 1 320px; min-width: 0; }
.pl-context .links { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

/* Inhalt hinzufügen */
.add-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; animation: om-rise .22s ease; }
.add-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.add-grid.is-5 { grid-template-columns: repeat(5, 1fr); }
.add-opt {
    display: flex; flex-direction: column; gap: 9px; padding: 15px 14px;
    border: 1px solid var(--line); border-radius: 11px; background: var(--surface);
    cursor: pointer; text-align: left; color: var(--ink); text-decoration: none;
}
.add-opt:hover { border-color: var(--ink); color: var(--ink); }
.add-opt.is-primary { border-color: var(--ink); }
.add-opt.is-primary:hover { background: var(--surface-2); }
.add-opt.is-drop { border: 1px dashed var(--dash); background: var(--surface-2); }
.add-opt.is-drop:hover { border-color: var(--accent); background: var(--accent-mist); }
.add-opt b { font-size: 13px; font-weight: 600; }
.add-opt span { font-size: 11.5px; color: var(--muted-2); line-height: 1.4; }
.add-opt .ico { color: var(--ink); }
.add-opt .ico.is-green { color: var(--accent); }

/* Elemente einer Playlist */
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 12px; }
.item {
    position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
    animation: om-rise .24s ease;
}
.item:hover { border-color: #cfd1cc; }
.item.dragging { opacity: .4; }
.item-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--screen); cursor: grab; }
.item-thumb:active { cursor: grabbing; }
.item-thumb > img, .item-thumb > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.item-kind, .item-dur {
    position: absolute; z-index: 1; display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 5px;
    background: rgba(12, 14, 13, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    font-family: var(--mono); font-size: 8.5px; letter-spacing: .12em; color: #fff; pointer-events: none;
}
.item-kind { left: 9px; top: 9px; }
.item-dur { right: 9px; bottom: 9px; letter-spacing: .04em; font-size: 9px; }
.item-pos { position: absolute; left: 9px; bottom: 9px; z-index: 1; font-family: var(--mono); font-size: 9px; color: rgba(255, 255, 255, .6); pointer-events: none; }
.item-more {
    position: absolute; right: 7px; top: 7px; z-index: 2; width: 26px; height: 26px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center; border: none; cursor: pointer;
    background: rgba(12, 14, 13, .55); color: #fff; opacity: 0; transition: opacity .15s;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.item:hover .item-more, .item-more:focus-visible { opacity: 1; }
.item-body { padding: 10px 11px 11px; }
.item-name { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; min-height: 18px; flex-wrap: wrap; }
.item-meta .cat { font-size: 11px; }
.item.is-inactive .item-thumb > img, .item.is-inactive .item-thumb > video { opacity: .3; }
.item.is-expired .item-thumb > img, .item.is-expired .item-thumb > video { opacity: .3; filter: grayscale(1); }
.item .only-inactive { display: none; }
.item.is-inactive .only-inactive { display: inline-flex; }
.item-drop {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 150px;
    border: 1px dashed var(--dash); border-radius: 12px; background: transparent; cursor: pointer; color: var(--muted-2);
    font-size: 12px; font-weight: 500; text-decoration: none;
}
.item-drop:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-mist); }
.item-drop .plus { font-size: 18px; line-height: 1; }
.empty {
    padding: 28px 22px; border: 1px dashed var(--dash); border-radius: 14px; background: var(--surface-2);
    text-align: center; color: var(--muted); font-size: 13px;
}
.empty b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.empty .btn-row { justify-content: center; margin-top: 14px; }

/* Programm (Standardprogramm, Zeitregeln, Wochenübersicht) */
.prog-list { display: flex; flex-direction: column; }
.prog-row {
    display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-top: 1px solid var(--line-soft);
    background: var(--surface);
}
.prog-row:first-child { border-top: none; }
.prog-row.dragging { opacity: .4; }
.prog-row .grip { cursor: grab; color: var(--faint); font-size: 14px; user-select: none; padding: 0 2px; }
.prog-row .pos { font-family: var(--mono); font-size: 11px; color: var(--muted-2); width: 16px; }
.prog-row .nm { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prog-row .nm a { color: var(--ink); }
.prog-row .nm a:hover { color: var(--accent); }
.prog-row .meta { font-size: 12px; color: var(--muted-2); white-space: nowrap; }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.night { font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; color: var(--muted); background: var(--hover); border-radius: 5px; padding: 2px 6px; }
.prog-add { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.prog-add .input { width: auto; min-width: 200px; flex: 1; }

.timeline { margin-top: 4px; }
.tl-row { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 10px; height: 22px; }
.tl-day { font-family: var(--mono); font-size: 9.5px; color: var(--muted-2); }
.tl-track { position: relative; height: 12px; border-radius: 4px; background: var(--hover); overflow: hidden; }
.tl-track.has-base { background: #dcdedb; }
.tl-seg { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.tl-scale { position: relative; height: 14px; }
.tl-scale span { position: absolute; transform: translateX(-50%); font-family: var(--mono); font-size: 9px; color: var(--faint); }
.tl-scale span:first-child { transform: none; }
.tl-scale span:last-child { transform: translateX(-100%); }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 11.5px; color: var(--muted); }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* Rechte Spalte */
.dev-state { display: flex; align-items: center; gap: 9px; }
.dev-state .d { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dev-state b { font-size: 14px; font-weight: 600; }
.dev-note { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-top: 7px; }
.dev-foot { display: flex; align-items: center; gap: 7px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 12px; font-weight: 500; }
.dev-foot.is-ok { color: var(--accent); }
.dev-foot.is-warn { color: var(--danger); }
.dev-foot a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.pw-val { font-size: 14px; font-weight: 600; }
.pw-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 14px; }
.week-bar { height: 34px; border-radius: 4px; background: var(--line-soft); position: relative; overflow: hidden; }
.week-bar i { position: absolute; left: 0; right: 0; background: var(--ink); border-radius: 3px; }
.week-day { text-align: center; font-family: var(--mono); font-size: 8.5px; color: var(--muted-2); margin-top: 5px; }
.week-day.is-today { color: var(--ink); font-weight: 500; }
.fmt-row { display: flex; align-items: center; gap: 13px; }
.fmt-row .glyph-box { width: 58px; height: 38px; }
.fmt-val { font-size: 14px; font-weight: 600; }
.fmt-res { font-family: var(--mono); font-size: 11px; color: var(--muted-2); margin-top: 3px; }
.collapse-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.collapse-head {
    display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px;
    padding: 15px 17px; border: none; background: transparent; cursor: pointer; text-align: left;
}
.collapse-head:hover { background: var(--surface-2); }
.collapse-head .lbl { font-size: 11px; color: var(--muted-2); flex: none; }
.collapse-body { padding: 0 17px 16px; display: flex; flex-direction: column; gap: 11px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.kv > span:first-child { color: var(--muted-2); flex: none; }
.kv > span:last-child { font-family: var(--mono); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.kv a { color: var(--ink); }
.kv a:hover { color: var(--accent); }
.url-field { display: flex; gap: 6px; }
.url-field .input { font-family: var(--mono); font-size: 11px; height: 32px; }
.tech-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 3px; }
.tech-actions .btn { width: 100%; }
.side-stack { display: flex; flex-direction: column; gap: 12px; }

/* Betriebszeiten-Tabelle (im Dialog) */
.power-table { width: 100%; border-collapse: collapse; }
.power-table th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 9.5px; letter-spacing: .14em; color: var(--faint); text-transform: uppercase; padding: 0 8px 8px; }
.power-table td { padding: 6px 8px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.power-table td:first-child { font-family: var(--mono); font-size: 11px; width: 36px; }
.power-table .input { height: 32px; width: 108px; }

/* ==========================================================================
   Bibliothek
   ========================================================================== */
.filters { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 24px 0 15px; flex-wrap: wrap; }
.filter-pills { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.fpill {
    display: inline-flex; align-items: center; gap: 7px;
    height: 32px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 99px;
    background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.fpill:hover { border-color: var(--ink); }
.fpill.is-on { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }
.fpill small { font-family: var(--mono); font-size: 10px; opacity: .7; }
.fpill-sm { height: 28px; padding: 0 11px; font-size: 12px; }
.filter-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -4px 0 16px; }
.filter-sub .lbl { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; color: var(--faint); margin-right: 4px; }
.filter-sub .gap { width: 14px; }

.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.lib-card {
    position: relative; display: block; width: 100%; padding: 0; text-align: left;
    background: var(--surface); border: 1px solid var(--line); border-radius: 13px; overflow: hidden;
    cursor: pointer; color: var(--ink); text-decoration: none;
}
.lib-card:hover { border-color: var(--ink); color: var(--ink); }
.lib-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--screen); overflow: hidden; }
.lib-thumb > img, .lib-thumb > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.lib-kind {
    position: absolute; left: 9px; top: 9px; z-index: 1; height: 18px; display: flex; align-items: center; padding: 0 7px; border-radius: 5px;
    background: rgba(12, 14, 13, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    font-family: var(--mono); font-size: 8.5px; letter-spacing: .14em; color: #fff;
}
.lib-warn { position: absolute; right: 9px; top: 9px; z-index: 1; }
.lib-body { padding: 11px 12px 12px; }
.lib-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-origin { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted-2); margin-top: 3px; overflow: hidden; white-space: nowrap; }
.lib-origin > span { overflow: hidden; text-overflow: ellipsis; }
.lib-chips { display: flex; align-items: center; gap: 5px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.lib-card.is-picked { border-color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink); }
.pick-tick {
    position: absolute; right: 9px; top: 9px; z-index: 2; width: 22px; height: 22px; border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .85); background: rgba(12, 14, 13, .35);
    display: flex; align-items: center; justify-content: center; color: #fff;
}
.lib-card.is-picked .pick-tick { background: var(--ink); border-color: #fff; }
.lib-card:not(.is-picked) .pick-tick .ico { opacity: 0; }

.pick-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px;
    padding: 14px 18px; border: 1px solid var(--ink); border-radius: 13px; background: var(--surface);
    font-size: 13.5px;
}
.pick-banner strong { font-weight: 600; }
.pick-banner small { display: block; font-size: 12px; color: var(--muted-2); margin-top: 3px; }
.pick-bar {
    position: sticky; bottom: 18px; z-index: 15; margin-top: 18px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px 14px 12px 18px; border-radius: 13px; background: var(--ink); color: #fff;
    box-shadow: 0 18px 40px rgba(16, 18, 17, .25);
}
.pick-bar span { font-size: 13px; }

.upload-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-top: 18px; animation: om-rise .22s ease; }
.lib-note { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding: 11px 14px; border: 1px solid var(--line-soft); border-radius: 11px; background: var(--surface-2); font-size: 12.5px; color: var(--muted); }

/* Motiv-Detail */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 396px; gap: 22px; margin-top: 22px; align-items: start; }
.fit-flow { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.fit-box { position: relative; border-radius: 9px; overflow: hidden; background: var(--screen); }
.fit-box > img, .fit-box > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.fit-box.is-src { opacity: .5; }
.fit-box.is-tgt { box-shadow: 0 0 0 1.5px var(--ink); }
.fit-box.is-cover > img, .fit-box.is-cover > video { object-fit: cover; }
.fit-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; color: var(--faint-2); margin-top: 9px; text-transform: uppercase; }
.fit-label.is-ink { color: var(--ink); }
.fit-arrow { flex: none; margin-bottom: 22px; color: #c2c6c1; }
.fit-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.fit-foot .left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fit-foot .note { font-size: 12px; color: var(--muted-2); }
.fit-sweep { position: absolute; inset: 0; background: rgba(10, 12, 11, .55); overflow: hidden; }
.fit-sweep::after { content: ""; position: absolute; top: 0; bottom: 0; width: 34%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent); animation: om-sweep 1.1s linear infinite; }
.fit-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .2); }
.fit-progress > div { height: 100%; width: 0; background: #fff; transition: width .2s; }
.plain-view { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; }
.fmt-rows { display: flex; flex-direction: column; gap: 8px; }
.fmt-item {
    display: flex; align-items: center; gap: 13px; padding: 11px 12px;
    border: 1px solid var(--line-2); border-radius: 11px; background: var(--surface);
    cursor: pointer; text-align: left; width: 100%;
}
.fmt-item.is-have { border-color: var(--line); }
.fmt-item:hover { border-color: #c9ccc7; }
.fmt-item.is-sel { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.fmt-item .glyph-box { width: 36px; height: 26px; }
.fmt-item .txt { flex: 1; min-width: 0; }
.fmt-item .t1 { font-size: 13px; font-weight: 600; color: var(--ink); }
.fmt-item.is-missing .t1 { font-weight: 500; color: var(--muted); }
.fmt-item .t1 span { color: var(--faint-2); font-weight: 400; }
.fmt-item .t2 { font-size: 11px; color: var(--faint-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmt-state { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--accent); font-weight: 500; white-space: nowrap; }
.fmt-state.is-warn { color: var(--danger); }
.fmt-state.is-muted { color: var(--muted-2); font-weight: 400; }
.fmt-drop.dragover { border-color: var(--accent); background: var(--accent-mist); }
.info-rows { display: flex; flex-direction: column; }
.info-rows .kv { padding: 8px 0; border-top: 1px solid var(--line-soft); }
.info-rows .kv:first-child { border-top: none; padding-top: 0; }
.use-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.use-list a {
    display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 99px;
    font-size: 12px; color: var(--ink);
}
.use-list a:hover { border-color: var(--ink); }

/* Upload-Feld (Drag & Drop) */
.dropzone {
    position: relative; border: 1px dashed var(--dash); border-radius: 12px; background: var(--surface-2);
    min-height: 150px; transition: border-color .15s, background .15s;
}
.dropzone.dragover { border-color: var(--accent); background: var(--accent-mist); }
.dz-idle {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    min-height: 150px; padding: 24px; text-align: center; cursor: pointer; color: var(--muted-2);
}
.dz-idle:hover { color: var(--accent); }
.dz-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.dz-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.dz-sub { font-size: 12px; color: var(--muted-2); }
.dz-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 12px; }
.dz-previews:empty { display: none; }
.dz-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.dz-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--screen); }
.dz-thumb img, .dz-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.dz-type { position: absolute; left: 7px; top: 7px; height: 17px; display: flex; align-items: center; padding: 0 6px; border-radius: 5px; background: rgba(12, 14, 13, .55); font-family: var(--mono); font-size: 8.5px; letter-spacing: .12em; color: #fff; }
.dz-badge { position: absolute; right: 7px; bottom: 7px; }
.dz-meta { padding: 8px 9px; }
.dz-name { font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-dims { font-family: var(--mono); font-size: 10px; color: var(--muted-2); margin-top: 2px; }
.dz-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 150px; padding: 24px; }
.dz-loading-text { font-size: 13px; color: var(--muted); }
.spinner { width: 20px; height: 20px; border: 2px solid var(--line-2); border-top-color: var(--ink); border-radius: 50%; animation: om-spin .8s linear infinite; }
.upload-progress { display: flex; align-items: center; gap: 12px; width: min(420px, 90%); }
.upload-progress .bar { flex: 1; height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.upload-progress .bar-fill { height: 100%; width: 0; background: var(--ink); transition: width .2s; }
.upload-progress .pct { font-family: var(--mono); font-size: 11px; color: var(--muted); min-width: 70px; text-align: right; }
.dz-actions { display: flex; align-items: center; gap: 9px; margin-top: 12px; flex-wrap: wrap; }
.dz-actions .input { width: auto; min-width: 190px; }
.dz-spacer { flex: 1; }
.upload-foot { margin-top: 12px; font-size: 11.5px; color: var(--muted-2); line-height: 1.55; }
.upload-foot strong { color: var(--ink); font-weight: 600; }
.upload-foot .warn { color: var(--warn); }
.msg { margin-top: 12px; padding: 11px 14px; border-radius: 10px; font-size: 12.5px; line-height: 1.5; background: var(--accent-bg); color: var(--ink); }
.msg.error { background: var(--danger-soft); color: var(--danger); }
.msg.warn { background: var(--warn-soft); color: var(--warn); }
.msg + .msg { margin-top: 8px; }

/* ==========================================================================
   Tabellen, Listen (Einstellungen, Protokoll, Bereiche)
   ========================================================================== */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
    text-align: left; font-family: var(--mono); font-weight: 400; font-size: 9.5px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--faint); padding: 0 12px 10px; white-space: nowrap;
}
.table td { padding: 11px 12px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.table tr.dragging { opacity: .4; }
.table .mono-cell { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.table .grip { cursor: grab; color: var(--faint); user-select: none; }
.lvl { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.lvl .d { width: 6px; height: 6px; border-radius: 50%; }
.lvl.info { color: var(--muted); } .lvl.info .d { background: var(--off); }
.lvl.warning { color: var(--warn); } .lvl.warning .d { background: #e0a526; }
.lvl.error { color: var(--danger); } .lvl.error .d { background: var(--offline); }

.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line-soft); }
.set-row:first-child { border-top: none; padding-top: 0; }
.set-row .t { font-size: 13px; font-weight: 500; }
.set-row .s { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; line-height: 1.45; }
.set-row .r { flex: none; display: flex; align-items: center; gap: 10px; }
.card .set-row:first-of-type { border-top: 1px solid var(--line-soft); padding-top: 13px; }
.card .set-row.is-first { border-top: none; padding-top: 0; }
.person { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.person .avatar { width: 30px; height: 30px; }
.person .nm { flex: 1; min-width: 0; }
.person .nm b { display: block; font-size: 13px; font-weight: 500; }
.person .nm span { font-size: 11.5px; color: var(--muted-2); }
.person .role { font-size: 11.5px; color: var(--muted); }
.link-card {
    display: flex; align-items: center; gap: 20px; width: 100%; text-align: left; margin-top: 14px; padding: 20px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; color: var(--ink); text-decoration: none;
}
.link-card:hover { background: var(--surface-2); border-color: #cfd1cc; color: var(--ink); }
.link-card.is-strong { border-color: var(--ink); }
.link-card .txt { flex: 1; min-width: 0; }
.link-card .t { font-size: 16px; font-weight: 600; }
.link-card .s { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-top: 5px; }
.link-card .chev { flex: none; font-size: 16px; color: var(--muted); }
.swatches { display: flex; align-items: center; gap: 7px; margin-top: 11px; flex-wrap: wrap; }
.swatches .sw { width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--line); }
.swatches small { font-size: 11.5px; color: var(--muted-2); margin-left: 5px; }
.screen-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.screen-chip {
    display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 8px;
    font-size: 12.5px; color: var(--ink); background: var(--surface);
}
.screen-chip:hover { border-color: var(--ink); color: var(--ink); }
.screen-chip .d { width: 6px; height: 6px; border-radius: 50%; }

.cat-row { display: flex; align-items: center; gap: 10px; }
.cat-row .input { max-width: 320px; }

/* Papierkorb */
.trash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.trash-card { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.trash-card .lib-thumb > img, .trash-card .lib-thumb > video { opacity: .55; }
.days-left { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.days-left.is-soon { color: var(--danger); }
.trash-actions { display: flex; gap: 6px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }

/* Playlisten-Übersicht */
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pl-card .lib-thumb { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 1px; background: #0b0c0b; }
.pl-card .lib-thumb.is-single { display: block; }
.pl-card .mosaic { position: relative; background: var(--screen); overflow: hidden; }
.pl-card .mosaic img, .pl-card .mosaic video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pl-card .lib-thumb .screen-ph { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; }
.pl-dur { position: absolute; right: 9px; bottom: 9px; z-index: 1; height: 18px; display: flex; align-items: center; padding: 0 7px; border-radius: 5px; background: rgba(12, 14, 13, .62); font-family: var(--mono); font-size: 9px; color: #fff; }
.group-row { display: flex; align-items: baseline; gap: 10px; margin: 30px 0 13px; }
.group-row:first-of-type { margin-top: 26px; }

/* Hilfe */
.help { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.help details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.help summary {
    list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px 20px; cursor: pointer; font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
}
.help summary::-webkit-details-marker { display: none; }
.help summary::after { content: "+"; font-size: 18px; font-weight: 300; color: var(--muted); }
.help details[open] summary::after { content: "–"; }
.help summary:hover { background: var(--surface-2); }
.help-body { padding: 0 20px 20px; font-size: 13.5px; line-height: 1.65; color: #33373a; }
.help-body > * + * { margin-top: 12px; }
.help-body ul, .help-body ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; }
.help-body strong { font-weight: 600; color: var(--ink); }
.help-sub { font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); margin-top: 18px !important; }
.help-warn { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--warn-soft); color: #5c4200; font-size: 13px; }
.help-prompt { padding: 11px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-soft); font-family: var(--mono); font-size: 12px; }
.help-cmd { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--ink); color: #eceeea; font-family: var(--mono); font-size: 12px; line-height: 1.6; overflow-x: auto; }
.help-cmd .cmt { color: #8d978f; }
.help-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.help-table th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); padding: 0 10px 8px; }
.help-table td { padding: 9px 10px; border-top: 1px solid var(--line-soft); vertical-align: top; }
.help-dl { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px 18px; margin: 0; }
.help-dl dt { font-weight: 600; color: var(--ink); }
.help-dl dd { margin: 0; }
.help-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.help-link:hover { border-color: var(--ink); color: var(--ink); }
.help-link .l { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; color: var(--muted-2); text-transform: uppercase; }
.help-link .u { flex: 1; font-size: 13px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-top: 14px; }
.step { padding: 15px; border: 1px solid var(--line-soft); border-radius: 11px; background: var(--surface-2); }
.step .n { font-family: var(--mono); font-size: 10px; color: var(--faint-2); }
.step b { display: block; font-size: 13.5px; font-weight: 600; margin-top: 8px; }
.step span { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 4px; }

/* ==========================================================================
   Dialoge, Menüs, Meldungen
   ========================================================================== */
.overlay {
    position: fixed; inset: 0; z-index: 60; background: rgba(16, 18, 17, .34);
    display: flex; align-items: center; justify-content: center; padding: 24px;
    animation: om-rise .15s ease;
}
.dialog {
    width: 100%; max-width: 452px; max-height: calc(100vh - 48px); display: flex; flex-direction: column;
    background: var(--surface); border-radius: 16px; box-shadow: 0 26px 70px rgba(16, 18, 17, .28); overflow: hidden;
}
.dialog-lg { max-width: 640px; }
.dialog-xl { max-width: 880px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 0; }
.dialog-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.dialog-sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.dialog-x {
    flex: none; width: 28px; height: 28px; border: none; border-radius: 8px; background: var(--hover); color: var(--muted);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.dialog-x:hover { background: #e8eae6; color: var(--ink); }
.dialog-body { padding: 18px 22px 22px; overflow-y: auto; }
.dialog-body > .field + .field, .dialog-body > .field + .grid-2, .dialog-body > .grid-2 + .field { margin-top: 12px; }
.dialog-foot { display: flex; align-items: center; gap: 9px; margin-top: 16px; }
.dialog-foot .btn-grow { flex: 1; }
.dialog-foot.is-end { justify-content: flex-end; }
body.has-overlay { overflow: hidden; }

.menu {
    position: fixed; z-index: 70; min-width: 210px; padding: 5px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
    box-shadow: 0 16px 40px rgba(16, 18, 17, .16); animation: om-rise .12s ease;
}
.menu button, .menu a {
    display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: none; border-radius: 7px;
    background: none; font-size: 12.5px; color: var(--ink); text-align: left; cursor: pointer;
}
.menu button:hover, .menu a:hover { background: var(--hover); color: var(--ink); }
.menu .is-danger { color: var(--danger); }
.menu .is-danger:hover { background: var(--danger-soft); color: var(--danger); }
.menu hr { border: none; border-top: 1px solid var(--line-soft); margin: 4px 2px; }
.menu .ico { color: var(--muted); }

.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 80; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast {
    display: flex; align-items: flex-start; gap: 11px; max-width: 420px; padding: 13px 15px;
    background: var(--ink); color: #fff; border-radius: 12px; box-shadow: 0 18px 44px rgba(16, 18, 17, .28);
    font-size: 13px; line-height: 1.5; pointer-events: auto; animation: om-rise .22s ease;
}
.toast .ic { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; margin-top: -1px; }
.toast.is-error .ic { background: var(--offline); }
.toast .x { flex: none; margin-left: 4px; background: none; border: none; color: rgba(255, 255, 255, .55); cursor: pointer; padding: 0; font-size: 15px; line-height: 1; }
.toast .x:hover { color: #fff; }
.toast .bar { position: absolute; }
.toast-progress { height: 2px; border-radius: 99px; background: rgba(255, 255, 255, .16); overflow: hidden; margin-top: 8px; }
.toast-progress > div { height: 100%; width: 0; background: #fff; }

.thumb-progress {
    position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 75;
    padding: 9px 16px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 12px;
    box-shadow: 0 12px 30px rgba(16, 18, 17, .22);
}
.thumb-progress.done { background: var(--accent); }

/* ==========================================================================
   Anmeldung
   ========================================================================== */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; background: var(--bg); }
.login {
    width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
    padding: 30px 28px 28px; box-shadow: 0 18px 48px rgba(16, 18, 17, .06);
}
.login-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.login-brand img { height: 30px; width: auto; }
.login .h1 { margin-top: 26px; }
.login form { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.login .input { height: 40px; }
.login .btn { height: 40px; }
.login-foot { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 11.5px; color: var(--muted-2); }
.login-foot::before { content: ""; width: 26px; height: 3px; border-radius: 2px; background: var(--ink); flex: none; }
.login.is-wide { max-width: 440px; }
.login-brand img { height: 22px; }
.login-tabs { display: flex; gap: 4px; margin-top: 24px; padding: 3px; background: var(--hover); border-radius: 10px; }
.login-tabs a { flex: 1; text-align: center; padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none; }
.login-tabs a.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 18, 17, .1); }
.login-tabs + .h1 { margin-top: 22px; }
.login .lede { margin-bottom: 0; }
.login .msg { margin: 0; }
.login .msg.ok { background: var(--accent-bg); color: var(--accent); border-color: #cfe5da; }
.login .grid-2 { gap: 10px; }
.login-links { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12.5px; }
.login-links a { color: var(--muted); }
.login-links a:hover { color: var(--ink); }
.login .form-foot .btn { width: 100%; }
.hp-field { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Hinweis «E-Mail bestätigen» unter der Kopfzeile */
.verify-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 34px 0; padding: 10px 14px; border: 1px solid #f1dfb4; background: #fbf1dc; color: #6f4d09; border-radius: 10px; font-size: 12.5px; }
.verify-bar form { margin-left: auto; }
.verify-bar .link-btn { color: #6f4d09; font-weight: 600; }

/* Team in den Einstellungen */
.team-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.team-row .nm { flex: 1; min-width: 0; }
.team-row .nm b { display: block; font-size: 13px; font-weight: 600; }
.team-row .nm span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tech-delete { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.side-brand img { height: 20px; }

/* ==========================================================================
   Einrichtung (install.php)
   ========================================================================== */
.inst-body { min-height: 100vh; background: var(--bg); }
.inst-top {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    height: 61px; padding: 0 34px;
    background: rgba(247, 247, 245, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line-3);
}
.inst-brand { display: flex; align-items: center; gap: 12px; }
.inst-brand img { height: 26px; width: auto; display: block; }
.inst-brand .crumb { margin-left: 6px; }
.inst { max-width: 1240px; margin: 0 auto; padding: 34px 34px 80px; }
.inst-narrow { max-width: 620px; padding-top: 60px; }
.inst-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; margin-top: 26px; align-items: start; }
.inst-steps { display: flex; flex-direction: column; gap: 14px; }
.inst-step { padding: 22px; }
.step-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.step-head .card-desc { margin: 4px 0 0; max-width: 640px; }
.step-no {
    flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--hover); color: var(--muted);
    display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px;
    transition: background .2s, color .2s;
}
.step-no.is-done { background: var(--accent); color: #fff; }
.step-no.is-err { background: var(--offline); color: #fff; }
.inst-side { position: sticky; top: 81px; display: flex; flex-direction: column; gap: 12px; }
.sum-row { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.sum-row:first-of-type { border-top: none; }
.sum-row .d { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--off); }
.sum-row.is-ok .d { background: var(--live); }
.sum-row.is-warn .d { background: #e0a526; }
.sum-row.is-err .d { background: var(--offline); }
.sum-row b { display: block; font-size: 13px; font-weight: 600; }
.sum-row .sum-v { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; overflow-wrap: anywhere; }

.report { margin-top: 16px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface-2); padding: 14px 16px; animation: om-rise .2s ease; }
.report.is-ok { border-color: #cfe5da; background: var(--accent-bg); }
.report.is-err { border-color: #f0d3cc; background: var(--danger-soft); }
.report.is-info { border-color: var(--line); background: var(--surface-2); }
.report-head { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; flex-wrap: wrap; }
.report-head .ic { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; flex: none; }
.report.is-err .report-head .ic { background: var(--offline); }
.report.is-info .report-head .ic { background: var(--ink); }
.report-srv { margin-left: auto; font-family: var(--mono); font-size: 10px; font-weight: 400; letter-spacing: .06em; color: var(--muted-2); }
.report-sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.55; }
.report.is-err .report-sub { color: var(--danger); }
.report-more { font-size: 11.5px; color: var(--muted-2); margin-top: 10px; line-height: 1.5; }
.counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.count-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.count-tile b { display: block; font-size: 21px; font-weight: 300; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.count-tile span { display: block; margin-top: 3px; font-family: var(--mono); font-size: 9px; letter-spacing: .12em; color: var(--muted-2); text-transform: uppercase; }
.count-tile.is-zero b { color: var(--faint); }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-box {
    display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 15px 16px;
    border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
.choice:hover .choice-box { border-color: #c9ccc7; }
.choice input:checked + .choice-box { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.choice input:focus-visible + .choice-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice-box b { font-size: 13.5px; font-weight: 600; }
.choice-box span { font-size: 12px; color: var(--muted); line-height: 1.5; }

.prow-head, .prow { display: grid; grid-template-columns: 44px minmax(150px, 1.2fr) minmax(210px, 1.5fr) minmax(150px, .9fr) 30px; gap: 10px; align-items: center; }
.prow-head { padding: 0 12px 6px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; color: var(--faint); text-transform: uppercase; }
.player-rows { display: flex; flex-direction: column; gap: 8px; }
.prow { padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.prow .glyph-box { width: 44px; height: 30px; }
.prow .input { width: 100%; }
.prow-x { width: 30px; height: 30px; font-size: 16px; color: var(--muted); }
.prow-meta { grid-column: 2 / -1; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted-2); }
.prow-meta .input { width: 86px; }
.prow-meta .sep { color: #cfd2ce; margin: 0 4px; }
.prow-meta .mono { font-size: 10.5px; color: var(--ink); }
.exist-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 16px; }
.exist-chip {
    display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 11px;
    border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); font-size: 12.5px;
}
.exist-chip b { font-weight: 600; }
.exist-chip small { font-family: var(--mono); font-size: 10px; color: var(--muted-2); }

.res-head { display: flex; align-items: center; gap: 12px; }
.res-head .ic { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.res-head b { display: block; font-size: 16px; font-weight: 600; }
.res-head span { display: block; font-size: 12.5px; color: var(--muted); }
.result-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.result-list li { display: flex; gap: 9px; font-size: 12.5px; line-height: 1.45; color: #33373a; }
.result-list .ic { flex: none; width: 17px; height: 17px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.result-list .is-warn .ic { background: #e0a526; }
.result-list .is-err .ic { background: var(--offline); }
.choice input:disabled + .choice-box { opacity: .55; cursor: not-allowed; }
.url-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.url-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.url-item > div { flex: 1; min-width: 0; }
.url-item b { display: block; font-size: 12.5px; font-weight: 600; }
.url-item .mono { display: block; font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Plattform: Kopf, Status, Kunden, Anleitung --- */
.inst-user { display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--muted); }
.inst-user b { color: var(--ink); font-weight: 600; }
.inst-reset summary, details.guide summary { cursor: pointer; font-size: 13px; font-weight: 600; list-style: none; }
.inst-reset summary::-webkit-details-marker, details.guide summary::-webkit-details-marker { display: none; }
.inst-reset summary::after, details.guide summary::after { content: "＋"; float: right; color: var(--muted-2); font-weight: 400; }
.inst-reset[open] summary::after, details.guide[open] summary::after { content: "−"; }
.inst-reset { padding: 16px 20px; }

.sec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.sec-head .card-desc { margin: 4px 0 0; max-width: 620px; }
.sec-head > .btn, .sec-head > .icon-btn { flex: none; }

.status-head { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line-soft); }
.status-head .st-text { flex: 1; min-width: 0; }
.status-head .st-text b { display: block; font-size: 20px; font-weight: 300; letter-spacing: -.02em; line-height: 1.2; }
.status-head .st-text span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.st-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--accent); }
.st-ic.is-warn { background: #e0a526; }
.st-ic.is-err { background: var(--offline); }
.chk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 26px; }
.chk { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.chk .d { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--off); }
.chk.is-ok .d { background: var(--live); }
.chk.is-warn .d { background: #e0a526; }
.chk.is-err .d { background: var(--offline); }
.chk.is-pending .d { animation: inst-pulse 1s ease-in-out infinite alternate; }
.chk > div { min-width: 0; }
.chk b { display: block; font-size: 12.5px; font-weight: 600; }
.chk span { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; overflow-wrap: anywhere; }
.chk small { display: block; font-size: 11.5px; color: var(--muted-2); margin-top: 4px; line-height: 1.45; }
.chk.is-err span { color: var(--danger); }
@keyframes inst-pulse { from { opacity: .35; } to { opacity: 1; } }

.inst-steps > .card { min-width: 0; }
.inst .info-rows .kv > span { min-width: 0; overflow-wrap: anywhere; }
.inst .info-rows .kv > span:last-child { text-align: right; }
.reg-switch { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.reg-switch b { display: block; font-size: 13px; font-weight: 600; }
.reg-switch small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.reg-switch .toggle { flex: none; margin-top: 2px; }
.team-add { padding: 12px; border: 1px dashed var(--line); border-radius: 10px; }
.tn-list { display: flex; flex-direction: column; gap: 8px; }
.tn-empty { padding: 26px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; }
.tn-empty b { display: block; font-size: 14px; font-weight: 600; }
.tn-empty span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.tn { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .15s; }
.tn.is-open { border-color: #c9ccc7; }
.tn-main { display: grid; grid-template-columns: 38px minmax(0, 1.7fr) repeat(3, minmax(70px, .55fr)) auto auto 30px; gap: 14px; align-items: center; padding: 12px 14px; }
.tn-av { width: 38px; height: 38px; border-radius: 10px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.tn-id { min-width: 0; }
.tn-id b { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.tn-id .mono { display: block; font-size: 10.5px; color: var(--muted-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-id .is-warn { color: #9a6a0c; }
.tn-tag { font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--hover); border-radius: 5px; padding: 2px 6px; }
.tn-stat b { display: block; font-size: 15px; font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tn-stat span { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); margin-top: 1px; }
.tn-stat small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.tn-toggle svg { transition: transform .2s; }
.tn.is-open .tn-toggle svg { transform: rotate(180deg); }
.st-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 11.5px; font-weight: 500; background: var(--hover); color: var(--muted); white-space: nowrap; }
.st-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-pill.is-ok { background: var(--accent-bg); color: var(--accent); }
.st-pill.is-warn { background: #fbf1dc; color: #9a6a0c; }
.st-pill.is-err { background: var(--danger-soft); color: var(--danger); }
.tn-panel { border-top: 1px solid var(--line-soft); padding: 18px 16px 20px; }
.tn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; }
.tn-sec { min-width: 0; }
.tn-sec.tn-wide { grid-column: 1 / -1; }
.tn-sec > .field-label { margin-bottom: 8px; }
.tn-note { font-size: 12.5px; color: #33373a; margin: 0 0 6px; }
.tn-log { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.url-item .dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--off); }
.url-item .dot.is-on { background: var(--live); }
.dom-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dom-chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 3px 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-family: var(--mono); font-size: 11px; }
.dom-chip button { border: 0; background: none; cursor: pointer; color: var(--muted); width: 22px; height: 22px; border-radius: 6px; font-size: 14px; line-height: 1; }
.dom-chip button:hover { background: var(--hover); color: var(--ink); }
.inline-row { display: flex; gap: 8px; align-items: center; }
.inline-row .input { flex: 1; min-width: 0; }
.danger-zone { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.danger-zone p { font-size: 12px; color: var(--muted); margin: 0 0 8px; line-height: 1.5; }
.tn-del { background: var(--danger-soft); color: var(--danger); border: 1px solid #f0d3cc; }
.tn-del:not(:disabled):hover { background: var(--danger); color: #fff; }
.tn-del:disabled { opacity: .5; cursor: not-allowed; }

.sub-sec { padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--line-soft); }
.sub-sec.is-first { padding-top: 0; margin-top: 0; border-top: 0; }
.sub-sec h3 { font-size: 14px; font-weight: 600; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.sub-sec h3 + .card-desc { margin: -4px 0 0; }
.sub-sec .opt { font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); }
.choice-grid.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice[hidden] { display: none; }
.nt-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); }

.struct-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.struct-list > div { padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface-2); }
.struct-list b { display: block; font-family: var(--mono); font-size: 11px; font-weight: 500; }
.struct-list span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }

.guide { padding: 20px; }
.guide-steps { list-style: none; margin: 14px 0 0; padding: 0; counter-reset: guide; }
.guide-steps li { position: relative; padding: 0 0 16px 38px; counter-increment: guide; }
.guide-steps li::before {
    content: counter(guide); position: absolute; left: 0; top: -2px; width: 24px; height: 24px; border-radius: 8px;
    background: var(--hover); color: var(--muted); font-family: var(--mono); font-size: 10.5px;
    display: flex; align-items: center; justify-content: center;
}
.guide-steps li::after { content: ""; position: absolute; left: 11.5px; top: 26px; bottom: 2px; width: 1px; background: var(--line); }
.guide-steps li:last-child { padding-bottom: 0; }
.guide-steps li:last-child::after { display: none; }
.guide-steps li.is-done::before { content: "✓"; background: var(--accent); color: #fff; font-family: inherit; font-size: 12px; }
.guide-steps li.is-current::before { background: var(--ink); color: #fff; }
.guide-steps b { display: block; font-size: 13px; font-weight: 600; }
.guide-steps span { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.guide-steps li.is-open b { color: var(--muted); }
.guide-steps li.is-done span { color: var(--muted-2); }
.db-map { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.db-map-db { padding: 9px 12px; background: var(--ink); color: #fff; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; }
.db-map-row { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line-soft); font-size: 11.5px; }
.db-map-row:first-of-type { border-top: 0; }
.db-map-row b { font-family: var(--mono); font-size: 11px; font-weight: 500; }
.db-map-row span { color: var(--muted); line-height: 1.45; }
.db-map-row.is-sys { background: var(--surface-2); }
.audit-list { list-style: none; margin: 10px 0 0; padding: 0; }
.audit-list li { padding: 8px 0; border-top: 1px solid var(--line-soft); }
.audit-list li:first-child { border-top: 0; }
.audit-list b { display: block; font-size: 12px; font-weight: 600; }
.audit-list span { display: block; font-size: 11px; color: var(--muted-2); margin-top: 1px; }

@media (max-width: 1280px) {
    .tn-main { grid-template-columns: 38px minmax(0, 1fr) repeat(2, minmax(64px, .5fr)) auto 30px; }
    .tn-main > .tn-stat:nth-of-type(4), .tn-main > .st-pill { display: none; }
}
@media (max-width: 1080px) {
    .inst-grid { grid-template-columns: 1fr; }
    .inst-side { position: static; }
}
@media (max-width: 820px) {
    .inst, .inst-top { padding-left: 18px; padding-right: 18px; }
    .prow-head { display: none; }
    .prow { grid-template-columns: 44px 1fr 30px; }
    .prow > select { grid-column: 2 / 3; }
    .choice-grid, .counts { grid-template-columns: 1fr 1fr; }
    .choice-grid.is-3, .chk-grid, .tn-grid, .struct-list { grid-template-columns: 1fr; }
    .tn-main { grid-template-columns: 38px minmax(0, 1fr) auto 30px; }
    .tn-main > .tn-stat { display: none; }
    .inst-user > span { display: none; }
}

/* ==========================================================================
   Kleinere Bildschirme
   ========================================================================== */
@media (max-width: 1280px) {
    .tiles { grid-template-columns: repeat(2, 1fr); }
    .pd-grid { grid-template-columns: minmax(0, 1fr) 300px; }
    .detail-grid { grid-template-columns: minmax(0, 1fr) 340px; }
    .add-grid.is-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1080px) {
    .side { width: 220px; }
    .pd-grid, .detail-grid { grid-template-columns: 1fr; }
    .quick { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .app { flex-direction: column; height: auto; overflow: visible; }
    .side { width: auto; border-right: none; border-bottom: 1px solid var(--line); overflow: visible; }
    .side-bottom { margin-top: 0; }
    .main { overflow: visible; }
    .topbar { padding: 0 18px; }
    .page, .page-player, .page-lib, .page-detail, .page-mid, .page-narrow, .page-sub { padding-left: 18px; padding-right: 18px; }
    .tiles { grid-template-columns: 1fr; }
    .grid-2, .grid-3, .add-grid { grid-template-columns: 1fr; }
    .search-box { min-width: 0; }
    .search-box input { width: 80px; }
    .user-name, .user-sub { display: none; }
}
