/* Broadora Online – Arbeitsumgebung (Look wie die App) */
:root { color-scheme: dark;
  --bg: #0d0f13; --panel: #151922; --panel2: #1b2029; --panel3: #222835; --line: #2a303b; --line2: #353c4a;
  --text: #e6e9ef; --muted: #8a93a3; --dim: #5d6573; --red: #e5383b; --red2: #c92a2d; --green: #22c55e; --amber: #f59e0b; --blue: #3b82f6;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 "Segoe UI", system-ui, sans-serif; overflow: hidden; }
a { color: #8ab4ff; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: var(--text); background: #0f1218; border: 1px solid var(--line2); border-radius: 7px; padding: 7px 10px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: #4b5563; box-shadow: 0 0 0 2px #e5383b33; }
input[type=checkbox] { accent-color: var(--red); }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .mono { font-family: Consolas, ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; } .ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn { background: var(--panel3); border: 1px solid var(--line2); border-radius: 7px; padding: 6px 12px; cursor: pointer; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text); }
.btn:hover { background: #2a3140; } .btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; } .btn.primary:hover { background: var(--red2); }
.btn.danger { color: #fca5a5; border-color: #7f1d1d; } .btn.danger:hover { background: #3a1416; }
.btn.sm { padding: 3px 9px; font-size: 12.5px; } .btn.icon { padding: 4px 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line2); color: var(--muted); white-space: nowrap; }
.chip.ok { color: #86efac; border-color: #14532d; background: #0f2a1a; } .chip.err { color: #fca5a5; border-color: #7f1d1d; background: #2a1012; }
.chip.warn { color: #fcd34d; border-color: #78350f; background: #2a1e0a; } .chip.info { color: #93c5fd; border-color: #1e3a8a; background: #0f1b33; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--dim); flex: none; }

/* Anmeldung */
body.auth { display: grid; place-items: center; overflow: auto; background: radial-gradient(1200px 600px at 50% -10%, #2a1416, var(--bg)); }
.auth-box { width: min(400px, 92vw); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.auth-box h1 { margin: 4px 0 0; font-size: 22px; } .auth-box p { margin: 0; } .auth-logo { height: 30px; align-self: flex-start; }
.auth-box label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 13px; }
.auth-box .btn { justify-content: center; padding: 10px; } .auth-err { background: #2a1012; border: 1px solid #7f1d1d; color: #fecaca; padding: 9px 12px; border-radius: 8px; }
.auth-links { font-size: 13px; text-align: center; }

/* Raster */
#app { height: 100vh; display: grid; grid-template-rows: auto 1fr; grid-template-columns: 210px minmax(0, 1fr) var(--libw, 380px); grid-template-areas: "top top top" "nav work lib"; }
#app.nolib { grid-template-columns: 210px minmax(0, 1fr) 0; }
#app.libclosed { --libw: 44px; }

/* Kopfzeile */
.top { grid-area: top; display: flex; align-items: center; gap: 14px; padding: 8px 14px; background: #0a0c10; border-bottom: 1px solid var(--line); min-width: 0; }
.brand { display: flex; align-items: center; gap: 8px; flex: none; } .brand img { height: 24px; } .brand b { font-size: 13px; color: var(--muted); letter-spacing: .5px; text-transform: uppercase; }
.onair { font-weight: 800; letter-spacing: 2px; font-size: 13px; padding: 7px 11px; border-radius: 8px; background: #1a1d24; color: #4b5260; border: 2px solid #2a2f39; flex: none; }
.onair.lit { background: var(--red); color: #fff; border-color: #ff8a8c; box-shadow: 0 0 16px #e5383b88; }
.now { flex: 1 1 380px; min-width: 200px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 6px 12px; }
.now .t { font-weight: 700; font-size: 15px; } .now .a { color: var(--muted); font-size: 12.5px; }
.now .r { grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 22px; font-weight: 700; }
.now .bar { grid-column: 1 / -1; height: 4px; background: #262b35; border-radius: 3px; overflow: hidden; } .now .bar i { display: block; height: 100%; background: var(--red); transition: width 1s linear; }
.top .next { flex: 0 1 230px; min-width: 0; font-size: 12.5px; color: var(--muted); } .top .next b { color: var(--text); font-weight: 600; }
.flags { display: flex; gap: 6px; flex-wrap: wrap; flex: none; max-width: 330px; }
.clock { font-size: 22px; font-weight: 700; flex: none; letter-spacing: 1px; }
.topright { display: flex; align-items: center; gap: 10px; flex: none; margin-left: auto; }
.conn { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.conn.on .dot { background: var(--green); box-shadow: 0 0 6px var(--green); } .conn.off .dot { background: var(--red); }
.station-sel { max-width: 200px; }
.usermenu { position: relative; } .usermenu > button { background: var(--panel3); border: 1px solid var(--line2); border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-weight: 700; }
.menu { position: absolute; right: 0; top: 38px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; padding: 6px; min-width: 220px; z-index: 30; box-shadow: 0 10px 30px #0008; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 7px; background: none; border: 0; color: var(--text); text-decoration: none; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--panel3); } .menu .who { padding: 8px 10px; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }

/* Seitenleiste */
.nav { grid-area: nav; background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.nav h6 { margin: 12px 10px 4px; font-size: 10.5px; letter-spacing: 1.4px; color: var(--dim); text-transform: uppercase; } .nav h6:first-child { margin-top: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #c5cbd6; text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--panel2); color: #fff; } .nav a.on { background: var(--panel3); color: #fff; box-shadow: inset 3px 0 0 var(--red); }
.nav a .ic { width: 18px; text-align: center; opacity: .9; } .nav a .badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 0 7px; }
.nav a.locked { color: var(--dim); } .nav a.locked::after { content: 'Pro'; margin-left: auto; font-size: 10px; border: 1px solid var(--line2); border-radius: 4px; padding: 0 4px; }
.nav .foot { margin-top: auto; padding: 10px; font-size: 11.5px; color: var(--dim); }

/* Arbeitsbereich */
.work { grid-area: work; overflow-y: auto; padding: 18px 20px 80px; min-width: 0; }
.work h1 { font-size: 20px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; } .work h1 .sp { flex: 1; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; min-width: 0; }
.card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; } .card h2 .sp { flex: 1; }
.cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.cols3 { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; align-items: start; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.empty { color: var(--muted); padding: 18px; text-align: center; border: 1px dashed var(--line2); border-radius: 10px; }
.big-now { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; align-items: center; }
.big-now .t { font-size: 26px; font-weight: 700; } .big-now .a { color: var(--muted); font-size: 16px; } .big-now .r { grid-row: 1 / 3; grid-column: 2; font-size: 40px; font-weight: 700; }
.big-now .bar { grid-column: 1 / -1; height: 6px; background: #262b35; border-radius: 4px; overflow: hidden; margin-top: 8px; } .big-now .bar i { display: block; height: 100%; background: var(--red); transition: width 1s linear; }
.offline-box { display: flex; gap: 14px; align-items: center; }

/* Listen / Tabellen */
.list { display: flex; flex-direction: column; }
.li { display: grid; grid-template-columns: 70px 22px minmax(0, 1fr) auto 64px auto; gap: 8px; align-items: center; padding: 6px 8px; border-bottom: 1px solid #1f242e; border-radius: 6px; }
.li:hover { background: var(--panel2); } .li .tt b { font-weight: 600; } .li .tt span { color: var(--muted); }
.li.stop { color: var(--muted); font-style: italic; } .li .acts { display: flex; gap: 4px; opacity: 0; } .li:hover .acts { opacity: 1; }
.li[draggable=true] { cursor: grab; }
.drop-line { height: 3px; background: var(--red); border-radius: 2px; margin: -1px 0; box-shadow: 0 0 6px var(--red); }
.dropzone { border: 2px dashed var(--line2); border-radius: 10px; padding: 12px; text-align: center; color: var(--muted); margin-top: 8px; }
.dropzone.over, .droptarget.over { border-color: var(--red); background: #2a101255; }
table.t { width: 100%; border-collapse: collapse; } table.t td, table.t th { padding: 7px 8px; border-bottom: 1px solid #1f242e; text-align: left; } table.t th { color: var(--muted); font-weight: 500; font-size: 12px; }
table.t tr:hover td { background: var(--panel2); } .r { text-align: right; }

/* Musik (rechts) */
.lib { grid-area: lib; background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.lib-head { padding: 10px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 7px; }
.lib-head .row input { flex: 1; min-width: 0; } .lib-title { display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.lib-title .sp { flex: 1; } .lib-toggle { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; }
.lib-target { font-size: 12px; color: #fcd34d; background: #2a1e0a; border: 1px solid #78350f; border-radius: 7px; padding: 5px 8px; }
.lib-list { flex: 1; overflow-y: auto; }
.tr { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 10px; border-bottom: 1px solid #1c2029; cursor: grab; user-select: none; }
.tr:hover { background: var(--panel2); } .tr .cat { width: 8px; height: 26px; border-radius: 3px; background: var(--dim); }
.tr .tt { min-width: 0; } .tr .tt b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tr .tt span { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr .side { display: flex; align-items: center; gap: 4px; } .tr .len { color: var(--muted); font-size: 12px; min-width: 38px; text-align: right; }
.tr .acts { display: none; gap: 3px; } .tr:hover .acts { display: flex; } .tr:hover .len { display: none; }
.tr.missing { opacity: .45; } .tr.sel { background: #2a3140; }
.lib-foot { padding: 7px 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
#app.libclosed .lib-head > :not(.lib-title), #app.libclosed .lib-list, #app.libclosed .lib-foot, #app.libclosed .lib-title span { display: none; }
#app.libclosed .lib-title { writing-mode: vertical-rl; padding-top: 6px; }

/* Nachrichten */
.chat { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding: 4px; }
.chat.full { height: calc(100vh - 240px); }
.msg { max-width: 82%; padding: 8px 11px; border-radius: 11px; background: #1d2a44; align-self: flex-end; }
.msg.in { background: var(--panel3); align-self: flex-start; } .msg.wish { background: #2e2410; border: 1px solid #78350f; align-self: flex-start; }
.msg.done { opacity: .5; } .msg .h { display: flex; gap: 10px; justify-content: space-between; font-size: 12px; color: var(--muted); } .msg .h b { color: var(--text); }
.msg .w { font-weight: 700; } .msg .f { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.linkbtn { background: none; border: 0; color: #8ab4ff; cursor: pointer; padding: 0; font-size: 12px; }
.composer { display: flex; gap: 8px; margin-top: 10px; } .composer input { flex: 1; }

/* Planung */
.ck-row { display: grid; grid-template-columns: 26px 46px 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 4px; background: var(--panel2); }
.ck-row .acts { display: flex; gap: 3px; }
.cat-dot { width: 10px; height: 10px; border-radius: 50%; }
.pie { width: 150px; height: 150px; border-radius: 50%; position: relative; flex: none; } .pie::after { content: ''; position: absolute; inset: 28px; border-radius: 50%; background: var(--panel); }
.pie span { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; font-weight: 700; text-align: center; font-size: 13px; }
.sidelist a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; cursor: pointer; }
.sidelist a:hover { background: var(--panel2); } .sidelist a.on { background: var(--panel3); }
.wk { display: grid; grid-template-columns: 34px repeat(24, minmax(16px, 1fr)); gap: 2px; user-select: none; touch-action: none; }
.wk .h { font-size: 10.5px; color: var(--muted); text-align: center; } .wk .d { font-weight: 600; align-self: center; font-size: 12.5px; }
.wk .c { height: 30px; border-radius: 4px; cursor: crosshair; border: 1px solid #ffffff10; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; margin-top: 10px; } .legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.days { display: flex; gap: 5px; flex-wrap: wrap; } .days label { display: flex; align-items: center; gap: 4px; padding: 4px 9px; border: 1px solid var(--line2); border-radius: 999px; cursor: pointer; }
.show-card { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border-bottom: 1px solid #1f242e; cursor: pointer; border-radius: 8px; }
.show-card:hover { background: var(--panel2); } .show-card.on { background: var(--panel3); }
.savebar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; display: flex; gap: 10px; align-items: center; background: #1f2633; border: 1px solid #3b4456; padding: 9px 12px; border-radius: 12px; box-shadow: 0 10px 30px #0009; z-index: 20; }
.savebar[hidden] { display: none; }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 70px; background: #1f2633; border: 1px solid #3b4456; padding: 10px 16px; border-radius: 10px; z-index: 40; box-shadow: 0 10px 30px #0009; max-width: min(560px, 92vw); }
#toast.err { background: #3a1416; border-color: #7f1d1d; } #toast[hidden] { display: none; }
.locked-box { max-width: 560px; }
@media (max-width: 1250px) { #app { grid-template-columns: 180px minmax(0, 1fr) var(--libw, 320px); } .top .next, .flags .chip:nth-child(n+3) { display: none; } .cols { grid-template-columns: 1fr; } }
@media (max-width: 900px) { body { overflow: auto; } #app { height: auto; grid-template-columns: 1fr; grid-template-areas: "top" "nav" "work" "lib"; } .nav { flex-direction: row; flex-wrap: wrap; } .nav h6 { display: none; } .lib { height: 70vh; } .top { flex-wrap: wrap; } }
.work h1 .btn { font-size: 13px; font-weight: 600; }
.card h2 a { text-transform: none; letter-spacing: 0; font-weight: 500; text-decoration: none; font-size: 12.5px; }
