/* RadioMonitor */
:root {
    --bg: #0a0a0a;
    --bg2: #1c1c1c;
    --card: #151515;
    --line: #2c2c2c;
    --text: #f2f2f2;
    --muted: #9a9a9a;
    --accent: #ff7a00;
    --accent2: #ffa040;
    --accent-dark: #d65f00;
    --grey: #3a3a3a;
    --red: #ff5a4f;
    --radius: 14px;
    --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: radial-gradient(1200px 500px at 50% -15%, rgba(255, 122, 0, .14) 0%, transparent 60%), var(--bg);
    background-attachment: fixed;
    min-height: 100vh;
}
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h2 { font-size: 1rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
h3 { font-size: 1rem; margin-top: 1.2em; }

.wrap { max-width: 980px; margin: 0 auto; padding: 24px 16px 40px; }
.wrap.wide { max-width: 1200px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.break { word-break: break-all; }

/* Kopf */
.head { text-align: center; margin-bottom: 22px; }
.head h1 { font-size: 2rem; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.head .head-icon { filter: drop-shadow(0 4px 12px rgba(255, 122, 0, .45)); }
.head .sub { margin: 4px 0 0; color: var(--accent2); font-size: 1.1rem; font-weight: 600; }

/* Auswahl */
.picker { margin-bottom: 16px; }
.picker h2 { font-size: .8rem; margin-bottom: .5em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px; border-radius: 999px;
    background: var(--bg2); border: 1px solid var(--line); color: var(--text);
    font-weight: 600; transition: background .15s, border-color .15s;
}
.chip:hover { text-decoration: none; border-color: var(--accent); }
.chip.on { background: linear-gradient(135deg, var(--accent2), var(--accent-dark)); border-color: transparent; color: #fff; }
.badge {
    min-width: 24px; padding: 1px 7px; border-radius: 999px; text-align: center;
    background: rgba(255, 255, 255, .1); font-size: .78rem; font-weight: 700;
}

/* Kennzahlen */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0; }
.tile {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px 12px; text-align: center;
}
.tile b { display: block; font-size: 2rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: .85rem; }
.tile.hl { background: linear-gradient(135deg, rgba(255, 122, 0, .2), rgba(255, 122, 0, .06)); border-color: rgba(255, 122, 0, .55); }
.tile.hl b { color: var(--accent2); }

/* Karten & Tabellen */
.card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px; margin-bottom: 16px; overflow-x: auto;
}
table.list { width: 100%; border-collapse: collapse; }
.list th {
    text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line);
}
.list td { padding: 10px; border-bottom: 1px solid rgba(42, 51, 82, .6); vertical-align: middle; }
.list tr:last-child td { border-bottom: 0; }
.list .c-lis { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; width: 70px; }
.list .c-name { font-weight: 600; }
.list .c-name a { color: var(--text); }
.list .c-song { color: #d0d0d0; }
.cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell .txt { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.cell .nm { display: inline-flex; align-items: center; }
.logo, .cover {
    position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    overflow: hidden; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); font-weight: 800;
}
.logo { width: 44px; height: 44px; border-radius: 10px; font-size: 1.1rem; }
.logo-lg { width: 96px; height: 96px; border-radius: 16px; font-size: 2rem; }
.cover { width: 48px; height: 48px; border-radius: 8px; font-size: 1.2rem; }
.logo img, .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--bg2); }
.logo img { object-fit: contain; background: #fff; }
.logo-edit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.list td.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.dot { display: inline-block; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #555; margin-right: 8px; }
tr.is-active .dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
tr.is-active .c-lis { color: var(--accent); }
tr.is-offline .dot { background: var(--red); }
tr.is-offline .c-name, tr.is-offline .c-lis { color: var(--muted); }
tr.is-inactive td { opacity: .55; }

.type {
    display: inline-block; font-size: .68rem; font-weight: 700; padding: 1px 7px; border-radius: 6px;
    vertical-align: middle; margin-left: 4px; letter-spacing: .02em;
}
.type { margin-left: 0; }
.type-icecast { background: #2a2a2a; color: #d6d6d6; }
.type-shoutcast { background: #333; color: #bdbdbd; }
.type-lautfm { background: rgba(255, 122, 0, .16); color: var(--accent2); }
.tag-off, .tag-on { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 6px; }
.tag-off { background: rgba(248, 113, 113, .15); color: var(--red); }
.tag-on { background: rgba(255, 122, 0, .16); color: var(--accent2); }

.foot { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 18px; }
.brandline { margin-top: 8px; font-size: .85rem; }
.brandline a { color: var(--accent); font-weight: 700; }

/* Admin */
.topbar { background: rgba(10, 10, 10, .92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); }
.topbar-in { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.brand { font-weight: 800; color: var(--text); font-size: 1.05rem; }
.brand small { color: var(--accent); font-weight: 700; margin-left: 4px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.nav a { color: var(--muted); padding: 6px 10px; border-radius: 8px; font-weight: 600; }
.nav a:hover { color: var(--text); background: var(--bg2); text-decoration: none; }
.nav a.on { color: #fff; background: var(--bg2); box-shadow: inset 0 -2px 0 var(--accent); }
.userbox { display: flex; align-items: center; gap: 12px; font-size: .88rem; }
.userbox form { margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; }
.linkbtn:hover { color: var(--text); }
.page-title { font-size: 1.5rem; margin: 6px 0 18px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar form { margin: 0; }
.grow { flex: 1; min-width: 180px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line);
    background: var(--bg2); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
    text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--accent2), var(--accent-dark)); border-color: transparent; color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-danger { color: var(--red); }
.btn-danger:hover { border-color: var(--red); }
.btn-sm { padding: 5px 10px; font-size: .82rem; border-radius: 8px; }
.c-act { white-space: nowrap; text-align: right; }
.c-act form { display: inline; margin: 0; }
.c-act .btn { margin: 2px 0; }

.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .9rem; }
.form label.check, .form label.radio { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.form input[type=text], .form input[type=password], .form input[type=number], .form input[type=search], .form select, input.copy, .toolbar input[type=search] {
    width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
    background: var(--bg); color: var(--text); font: inherit; font-weight: 400;
}
.toolbar input[type=search] { width: auto; }
.form input:focus, .form select:focus, input.copy:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.form fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0; }
.form legend { color: var(--muted); font-size: .85rem; padding: 0 6px; }
fieldset.types { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.hint { margin: -6px 0 0; color: var(--muted); font-size: .82rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 17px; height: 17px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.form label.check-item {
    flex-direction: row; align-items: center; gap: 8px; font-weight: 500;
    padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); cursor: pointer;
}
.check-item:has(input:checked) { border-color: var(--accent); background: rgba(255, 122, 0, .1); }
.check-item span:first-of-type { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daychecks { display: flex; flex-wrap: wrap; gap: 6px 18px; }

.alert { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 500; }
.alert-success { background: rgba(255, 122, 0, .1); border: 1px solid rgba(255, 122, 0, .45); color: #ffd2a8; }
.alert-error { background: rgba(248, 113, 113, .12); border: 1px solid rgba(248, 113, 113, .4); color: #fecaca; }

.steps { padding-left: 20px; margin: 0 0 10px; }
.steps li { margin-bottom: 6px; }
.steps li.done { color: var(--muted); }
.steps li.done::marker { color: var(--accent); }

body.login { display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-box { width: 100%; max-width: 400px; padding: 28px; overflow: visible; }
.login-box.wide-box { max-width: 620px; }
.login-box h1 { font-size: 1.4rem; margin-bottom: 2px; }
.checks { list-style: none; padding: 0; margin: 10px 0 16px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; }
.checks .ok { color: var(--accent2); }
.checks .fail { color: var(--red); font-weight: 700; }

@media (max-width: 600px) {
    .live thead { display: none; }
    .live tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; padding: 12px 4px; border-bottom: 1px solid rgba(44, 44, 44, .8); }
    .live tr:last-child { border-bottom: 0; }
    .live td, .list.live td { padding: 0; border: 0; }
    .live .c-name { grid-column: 1; grid-row: 1; }
    .live .c-lis { grid-column: 2; grid-row: 1; align-self: center; font-size: 1.25rem; width: auto; }
    .live .c-song { grid-column: 1 / -1; grid-row: 2; }
    .live td.empty { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .tiles { grid-template-columns: repeat(2, 1fr); }
    .tile b { font-size: 1.6rem; }
    .grid2, .row2 { grid-template-columns: 1fr; }
    .head h1 { font-size: 1.6rem; }
    .logo { width: 36px; height: 36px; }
    .cover { width: 38px; height: 38px; }
    .cell { gap: 8px; }
    .list .c-song { font-size: .88rem; }
    .list td, .list th { padding: 8px 6px; }
    .card { padding: 12px; }
    .c-act { white-space: normal; }
}
