/* Dj Mitica: panou web. Aspectul "Jukebox" (C:\remix\DESIGN.md): negru, un singur verde, butoane-pastila.
   Detaliile aspectului sunt in jukebox.css, incarcat dupa acest fisier. --amber e accentul (verde). */

:root {
  --bg: #000000;
  --panel: #121212;
  --panel-2: #1F1F1F;
  --line: #333333;
  --text: #FFFFFF;
  --muted: #B3B3B3;
  --amber: #1ED760;
  --amber-ink: #000000;
  --mint: #1ED760;
  --coral: #F3727F;
  --warn: #FFA42B;
  --overlay: #282828;
  --chart-1: var(--amber);
  --chart-2: #509BF5; /* the blue of the promo gradient (DESIGN.md), second chart series */
  --shadow: none;
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, .5);
  --shadow-input: 0 1px 0 #121212, inset 0 0 0 1px #7C7C7C;
  --r-lg: 6px;
  --r-md: 6px;
  --r-sm: 4px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2, h3 { font-variation-settings: "wdth" 118; letter-spacing: -0.01em; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
a { color: inherit; }
img { display: block; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

/* ---------- controale ---------- */
.btn {
  font: inherit; font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  cursor: pointer; transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.btn-primary:hover { filter: brightness(1.07); border-color: var(--amber); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn-block { width: 100%; }
.danger { color: var(--coral); }
.icon-btn {
  width: 40px; height: 40px; padding: 0; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: transparent; border: 1px solid transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--panel-2); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm svg { width: 17px; height: 17px; }

input[type="text"], input[type="search"], input[type="password"], input[type="number"], input[type="url"], select {
  font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 9px 12px; min-width: 0;
}
input:focus, select:focus { border-color: var(--amber); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 25%, transparent); }

input[type="range"] { -webkit-appearance: none; appearance: none; background: transparent; width: 100%; height: 22px; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--amber) var(--fill, 0%), var(--line) var(--fill, 0%)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--amber); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border-radius: 50%; background: var(--text); border: 3px solid var(--amber); }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--text); border: 3px solid var(--amber); }

.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { accent-color: var(--amber); width: 16px; height: 16px; }

/* comutator */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.switch:first-child { border-top: 0; }
.switch .sw-text { display: grid; }
.switch .sw-text span:last-child { color: var(--muted); font-size: 13px; }
.toggle { position: relative; width: 44px; height: 24px; flex: none; }
.toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.toggle span { position: absolute; inset: 0; border-radius: 12px; background: var(--line); transition: background .15s; pointer-events: none; }
.toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform .15s; }
.toggle input:checked + span { background: var(--amber); }
.toggle input:checked + span::after { transform: translateX(20px); background: var(--amber-ink); }
.toggle input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(380px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px 28px; box-shadow: var(--shadow); display: grid; gap: 10px; }
.login-logo { width: 56px; height: 56px; margin-bottom: 4px; }
.login-card h1 { font-size: 30px; font-weight: 800; }
.login-card p { margin: 0 0 8px; }
.field-label { font-weight: 600; font-size: 14px; }
.form-error { color: var(--coral); min-height: 1.4em; margin: 0; font-size: 14px; }

/* ---------- cadru ---------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 20px;
  padding: 10px 24px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; font-variation-settings: "wdth" 118; }
.brand img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.live-dot.on { background: var(--mint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mint) 25%, transparent); }
.tabs { display: flex; gap: 4px; margin-left: 12px; }
.tab { font: inherit; font-weight: 600; color: var(--muted); background: none; border: 0; padding: 8px 14px; border-radius: var(--r-md); cursor: pointer; }
.tab:hover { color: var(--text); }
.tab[hidden] { display: none !important; }
.tab[aria-selected="true"] { color: var(--text); background: var(--panel-2); }
#logout { margin-left: auto; }
.bottombar { display: none; }

.view { width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px; }
.view-player { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.view-settings { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; align-items: start; max-width: 1040px; }
.settings-nav { position: sticky; top: 76px; display: grid; gap: 2px; }
.settings-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; padding: 7px 12px; border-radius: var(--r-md); }
.settings-nav a:hover { color: var(--text); background: var(--panel-2); }
.settings-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }
.settings-body > .panel, #global-settings > .panel { scroll-margin-top: 80px; }
#global-settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.sec-desc { margin: 4px 0 8px; }
.setting { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 300px); gap: 8px 24px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.setting .sw-text { display: grid; gap: 2px; }
.setting .sw-text span:last-child:not(:first-child) { color: var(--muted); font-size: 13px; }
.setting-ctl { display: flex; justify-content: flex-end; }
.setting-ctl > input[type="text"], .setting-ctl > input[type="password"], .setting-ctl > select, .setting-ctl > textarea { width: 100%; }
.setting-ctl > input.short { width: 110px; }
.setting-ctl textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 12px; resize: vertical; }
.setting-ctl textarea:focus { border-color: var(--amber); outline: none; }
.slider-field { display: grid; grid-template-columns: 1fr 76px; gap: 10px; align-items: center; width: 100%; }
.slider-field output { text-align: right; color: var(--amber); font-weight: 700; font-size: 14px; }
.color-field { display: flex; align-items: center; gap: 10px; }
.color-field input { width: 44px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: none; cursor: pointer; }
.tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--amber); border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent); vertical-align: 1px; }
.danger-solid { background: transparent; color: var(--coral); border-color: color-mix(in srgb, var(--coral) 50%, transparent); }
.danger-solid.btn-primary { background: var(--coral); border-color: var(--coral); color: #fff; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
.view-status { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); }
.panel-title { font-size: 17px; font-weight: 700; }
.panel-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-actions { margin-left: auto; display: flex; gap: 6px; }
.panel-actions .btn { white-space: nowrap; }
.panel > p { margin: 6px 0 14px; }
.main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }
.row-end { display: flex; justify-content: flex-end; margin-top: 14px; }

/* ---------- rail ---------- */
.rail { position: sticky; top: 76px; display: grid; gap: 14px; }
.rail-title { font-size: 13px; color: var(--muted); font-weight: 600; font-variation-settings: "wdth" 100; }
.guild { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; }
.guild-head { display: flex; align-items: center; gap: 10px; font-weight: 700; padding: 2px 4px; width: 100%; background: none; border: 0; color: inherit; font: inherit; font-weight: 700; text-align: left; cursor: pointer; border-radius: var(--r-md); }
.rail, .rail > * { min-width: 0; }
.guild-head { min-width: 0; max-width: 100%; overflow: hidden; }
.guild-head:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.guild.open .guild-head { padding-bottom: 10px; }
.guild-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guild-meta { display: flex; align-items: center; gap: 8px; flex: none; font-size: 13px; font-weight: 600; }
.g-people { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-variant-numeric: tabular-nums; }
.g-people.zero { color: var(--muted); font-weight: 500; }
.g-people svg { width: 13px; height: 13px; }
.g-live { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 25%, transparent); }
.g-live.paused { background: var(--muted); box-shadow: none; }
.g-chev { display: inline-flex; color: var(--muted); transition: transform .15s; }
.g-chev svg { width: 14px; height: 14px; }
.guild.open .g-chev { transform: rotate(180deg); }
.guild:not(.open) { padding-top: 10px; padding-bottom: 10px; }
#g-filter { width: 100%; }
#guilds { display: grid; gap: 8px; min-width: 0; }
#guilds > * { min-width: 0; }
#g-filter[hidden] { display: none; }
.guild-icon { width: 28px; height: 28px; border-radius: 8px; background: var(--panel-2); display: grid; place-items: center; font-size: 13px; overflow: hidden; flex: none; }
.guild-icon img { width: 100%; height: 100%; object-fit: cover; }
.vc { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 4px 8px; padding: 8px; border-radius: var(--r-md); }
.vc + .vc { margin-top: 2px; }
.vc.active { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--amber); }
.vc-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 500; cursor: default; }
.vc.has-player .vc-name { cursor: pointer; }
.vc-name svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.vc-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc .people { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; padding-left: 24px; }
.avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-size: 11px; font-weight: 700; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.badge { font-size: 12px; font-weight: 600; color: var(--amber); }

/* ---------- puntea (acum canta) ---------- */
.deck {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px; box-shadow: var(--shadow);
}
.deck-art { position: relative; width: 200px; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; background: var(--panel-2); }
.deck-art img { position: relative; width: 100%; height: 100%; object-fit: cover; } /* positioned, so it paints over the .ph placeholder */
.deck-art .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.deck-art .ph svg { width: 56px; height: 56px; }
.deck-body { display: grid; gap: 14px; min-width: 0; }
.deck-where { color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.deck-where svg { width: 16px; height: 16px; flex: none; }
.deck-title { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; line-height: 1.15; font-variation-settings: "wdth" 112; overflow-wrap: anywhere; }
.deck-title a { text-decoration: none; }
.deck-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.deck-artist { color: var(--muted); font-size: 16px; margin-top: 2px; }
.progress { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.transport { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.transport .play { width: 52px; height: 52px; background: var(--amber); color: var(--amber-ink); }
.transport .play:hover { background: var(--amber); filter: brightness(1.07); }
.transport .play svg { width: 26px; height: 26px; }
.vol { display: flex; align-items: center; gap: 10px; margin-left: auto; min-width: 200px; }
.vol svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.vol output { width: 44px; text-align: right; font-size: 13px; color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.chip[aria-pressed="true"] { color: var(--amber-ink); background: var(--amber); border-color: var(--amber); }
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"]:hover { color: var(--amber-ink); }

/* VU: 12 leduri care urmeaza muzica (decorativ, sincron cu redarea) */
.vu { display: flex; gap: 3px; align-items: flex-end; height: 18px; }
.vu i { width: 4px; border-radius: 1px; background: var(--line); height: 100%; transition: background .08s; }
.vu i.on { background: var(--mint); }
.vu i.on.hot { background: var(--amber); }
.vu i.on.peak { background: var(--coral); }
.paused .vu i { background: var(--line) !important; }

.empty { text-align: center; padding: 40px 20px; display: grid; gap: 8px; justify-items: center; }
.empty svg { width: 44px; height: 44px; color: var(--muted); }
.empty h2 { font-size: 20px; }
.empty p { margin: 0; color: var(--muted); max-width: 46ch; }

/* ---------- cautare ---------- */
.search-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin-top: 12px; }
.results { display: grid; gap: 4px; margin-top: 12px; }
.results:empty { display: none; }
.result { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border-radius: var(--r-md); }
.result:hover { background: var(--panel-2); }
.thumb { width: 48px; height: 48px; border-radius: var(--r-sm); object-fit: cover; background: var(--panel-2); }
.t-main { min-width: 0; }
.t-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-sub { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-actions { display: flex; gap: 4px; }

/* ---------- coada ---------- */
.queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: q; }
.q-item { display: grid; grid-template-columns: 28px 40px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 6px 8px; border-radius: var(--r-md); }
.q-item:hover, .q-item:focus-within { background: var(--panel-2); }
.q-item.dragging { opacity: .4; }
.q-item.drop-before { box-shadow: inset 0 2px 0 var(--amber); }
.q-item.drop-after { box-shadow: inset 0 -2px 0 var(--amber); }
.q-pos { color: var(--muted); font-size: 13px; text-align: right; cursor: grab; }
.q-item .thumb { width: 40px; height: 40px; }
.q-dur { color: var(--muted); font-size: 13px; }
.q-actions { display: flex; gap: 0; opacity: .55; }
.q-item:hover .q-actions, .q-item:focus-within .q-actions { opacity: 1; }
.queue-empty { color: var(--muted); padding: 14px 8px; }
.q-more { color: var(--muted); padding: 10px 8px; font-size: 13px; }

/* ---------- setari ---------- */
.fader { display: grid; grid-template-columns: 170px 1fr 56px; gap: 14px; align-items: center; padding: 10px 0; }
.fader label { font-weight: 600; }
.fader output { text-align: right; font-variant-numeric: tabular-nums; color: var(--amber); font-weight: 700; }
.num-field { display: flex; align-items: center; gap: 8px; }
.num-field input { width: 90px; }

/* ---------- status ---------- */
.strips { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.strip { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); display: grid; gap: 10px; align-content: start; }
.strip-head { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; font-variation-settings: "wdth" 112; }
.led { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.led.ok { background: var(--mint); box-shadow: 0 0 10px color-mix(in srgb, var(--mint) 70%, transparent); }
.led.bad { background: var(--coral); box-shadow: 0 0 10px color-mix(in srgb, var(--coral) 70%, transparent); }
.led.off { background: var(--line); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* resources of the bot's container (CPU / RAM / network), last hour */
.res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.res-now { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; min-height: 30px; }
.res-val { font-size: 24px; font-weight: 700; line-height: 1.2; }
.res-leg { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.res-leg b { color: var(--text); font-size: 16px; font-weight: 700; }
.res-key { display: inline-block; width: 12px; height: 2px; border-radius: 1px; background: var(--chart-1); flex: none; }
.res-key.s2 { background: var(--chart-2); }
.res-chart { position: relative; height: 72px; margin-top: 6px; cursor: crosshair; touch-action: pan-y; outline-offset: 6px; }
.res-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.res-chart svg * { vector-effect: non-scaling-stroke; }
.res-gridline { stroke: var(--line); stroke-width: 1; }
.res-line { fill: none; stroke: var(--chart-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.res-line.s2 { stroke: var(--chart-2); }
.res-area { fill: var(--chart-1); fill-opacity: .1; stroke: none; }
.res-ymax { position: absolute; top: 3px; left: 0; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; text-shadow: 0 0 3px var(--panel), 0 0 3px var(--panel); pointer-events: none; }
.res-wait { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.res-dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--chart-1); box-shadow: 0 0 0 2px var(--panel); pointer-events: none; }
.res-dot.s2 { background: var(--chart-2); }
.res-cross { position: absolute; top: 0; bottom: 0; width: 1px; margin-left: -.5px; background: var(--muted); pointer-events: none; }
.res-tip {
  position: absolute; bottom: calc(100% + 8px); z-index: 5; transform: translateX(-50%); display: grid; gap: 2px;
  background: var(--overlay); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 6px 10px;
  font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none;
}
.res-tip.l { transform: none; }
.res-tip.r { transform: translateX(-100%); }
.res-tip-time { color: var(--muted); }
.res-tip-row { display: flex; align-items: center; gap: 6px; }
.res-tip-row b { color: var(--text); font-weight: 700; }
.res-tip-row span { color: var(--muted); }
.res-axis { display: flex; justify-content: space-between; margin-top: -4px; font-size: 11px; color: var(--muted); }

.log-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.log-tools input[type="search"] { width: 180px; }
.log {
  margin: 0; height: 52vh; min-height: 280px; overflow: auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px 14px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; line-height: 1.55;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.log .l-warn { color: var(--amber); }
.log .l-error { color: var(--coral); }
.log .l-t { color: var(--muted); margin-right: 8px; }

/* ---------- notificari ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 50; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--mint); border-radius: var(--r-md); padding: 10px 14px; box-shadow: var(--shadow); font-size: 14px; animation: toast-in .18s ease-out; }
.toast.err { border-left-color: var(--coral); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- responsive ----------
   >= 1500px  large desktop: wider content, "Add music" and the queue side by side
   901-1100px small laptop / tablet landscape: Feedback and Donate in the top bar become icons
   <= 900px   tablet portrait and phones: one column, the sections move to a bottom bar
   <= 640px   phones; <= 380px small phones; (pointer: coarse) bigger touch targets */
.bottombar .tab svg, #logout svg { display: none; }
/* line the top bar up with the content instead of the screen edges */
@media (min-width: 1281px) {
  .topbar { padding-left: calc((100% - 1280px) / 2 + 24px); padding-right: calc((100% - 1280px) / 2 + 24px); }
}
@media (min-width: 1500px) {
  .view-player, .view-status { max-width: 1560px; }
  .view-player { grid-template-columns: 320px minmax(0, 1fr); gap: 28px; }
  .view-player .main { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .view-player .main > #deck-area { grid-column: 1 / -1; }
  .topbar { padding-left: max(24px, calc((100% - 1560px) / 2 + 24px)); padding-right: max(24px, calc((100% - 1560px) / 2 + 24px)); }
  .deck { grid-template-columns: 240px minmax(0, 1fr); }
  .deck-art { width: 240px; }
}
@media (min-width: 2200px) {
  .view-player, .view-status { max-width: 1840px; }
  .topbar { padding-left: calc((100% - 1840px) / 2 + 24px); padding-right: calc((100% - 1840px) / 2 + 24px); }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .fb-top span[data-i18n], .donate-btn [data-i18n] { display: none; }
  .who-name { max-width: 120px; }
}
@media (max-width: 900px) {
  .view-player { grid-template-columns: minmax(0, 1fr); }
  .view-settings { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; order: 2; }
  .no-player .rail { order: 0; }
  .deck { grid-template-columns: clamp(110px, 24vw, 180px) minmax(0, 1fr); gap: 16px; padding: 16px; }
  .deck-art { width: 100%; }
  .vol { margin-left: 0; width: 100%; }
  /* the sections leave the top bar for a bottom bar, in thumb reach on phones and tablets */
  .topbar { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .topbar .tabs { display: none; }
  .view { padding: 16px max(16px, env(safe-area-inset-right)) calc(88px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .bottombar {
    display: flex; gap: 2px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--panel); border-top: 1px solid var(--line);
    padding: 4px max(6px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  }
  .bottombar .tab { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 6px; font-size: 11px; line-height: 1.2; text-align: center; }
  .bottombar .tab[hidden] { display: none !important; }
  .bottombar .tab svg { display: block; width: 24px; height: 24px; flex: none; }
  .bottombar .tab span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .toasts { right: 16px; left: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); }
  /* settings: the section links become one row of chips that scrolls sideways and stays under the top bar */
  .settings-nav {
    position: sticky; top: 56px; z-index: 9; display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto;
    margin: -16px -16px 0; padding: 12px 16px; background: var(--bg); scrollbar-width: none;
  }
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-nav a { flex: none; white-space: nowrap; }
  .settings-body > .panel, #global-settings > .panel { scroll-margin-top: 124px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .who-name { display: none; }
  #logout svg { display: block; width: 18px; height: 18px; }
  #logout span[data-i18n] { display: none; }
  .deck { grid-template-columns: minmax(0, 1fr); }
  .deck-art { max-width: 260px; justify-self: center; }
  .search-row { grid-template-columns: 1fr auto; }
  .search-row input { grid-column: 1 / -1; }
  .q-item { grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; padding: 6px 4px; }
  .q-item .q-dur, .q-item .thumb { display: none; }
  .q-item .icon-btn.sm { width: 30px; height: 30px; }
  .fader { grid-template-columns: 1fr 56px; }
  .setting { grid-template-columns: minmax(0, 1fr); }
  .setting-ctl { justify-content: flex-start; }
  /* an on/off switch stays on the right of its text, like on a phone's own settings */
  .setting:has(.setting-ctl > .toggle) { grid-template-columns: minmax(0, 1fr) auto; }
  .fader label { grid-column: 1 / -1; }
  .log-tools { margin-left: 0; width: 100%; }
  .log-tools input[type="search"] { flex: 1; width: auto; }
}
@media (max-width: 380px) {
  .topbar { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .view { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .settings-nav { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
  .panel, .deck { padding: 16px 14px; }
  .toasts { right: 12px; left: 12px; }
}
/* phone held sideways: little height, so the bottom bar keeps only its icons */
@media (max-width: 900px) and (max-height: 500px) {
  .bottombar .tab { padding: 6px 2px; }
  .bottombar .tab span { display: none; }
  .view { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}
/* touch screens: no hover to reveal the queue buttons, and fingers need bigger targets */
@media (hover: none) {
  .q-actions { opacity: 1; }
}
@media (pointer: coarse) {
  .icon-btn.sm { width: 40px; height: 40px; }
  .q-item .icon-btn.sm { width: 36px; height: 36px; }
  .btn-sm { padding-top: 8px; padding-bottom: 8px; }
  .chip { padding: 9px 14px; }
  .vc-count { padding: 6px 10px; }
  .settings-nav a { padding: 9px 14px; }
  .toggle { width: 52px; height: 30px; }
  .toggle span { border-radius: 15px; }
  .toggle span::after { width: 24px; height: 24px; }
  .toggle input:checked + span::after { transform: translateX(22px); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* invite link buttons */
.invite-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.invite-row a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

/* Fluxer login + roles */
#login-oauth, #login-pass-box { display: grid; gap: 10px; }
#login-oauth[hidden], #login-pass-box[hidden], .login-sep[hidden], .login-inst[hidden] { display: none; }
.login-inst { display: grid; gap: 8px; }
.login-sh-btn[hidden], #login-oauth-intro[hidden] { display: none; }
.login-sh-btn { border-color: color-mix(in srgb, var(--green, #5FD3A3) 55%, var(--line)); }
.login-inst p { margin: 0; }
.login-inst-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.login-inst-row input { min-width: 0; }
.login-shcode { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; }
.login-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.login-code-row code { font-size: 17px; font-weight: 700; letter-spacing: .04em; padding: 9px 12px; border-radius: var(--r-md); background: var(--bg); border: 1px dashed var(--amber); color: var(--text); text-align: center; overflow-wrap: anywhere; }
#login-sh-back { justify-self: start; }
.inst-badge { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--panel-2); color: var(--muted); font-size: 12px; margin-left: 6px; vertical-align: middle; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.login-sep { display: flex; align-items: center; gap: 10px; margin: 8px 0 2px; color: var(--muted); font-size: 13px; }
.login-sep::before, .login-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.who { display: flex; align-items: center; gap: 10px; margin-left: auto; min-width: 0; }
.who-name { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.not-owner .owner-only, .not-owner [data-owner] { display: none !important; }

/* donate */
.donate-btn { color: var(--coral); border-color: color-mix(in srgb, var(--coral) 45%, var(--line)); }
.donate-btn span[aria-hidden] { margin-right: 2px; }
.login-donate { text-align: center; margin-top: 4px; }
.login-donate a { color: var(--coral); }
@media (max-width: 640px) { .donate-btn [data-i18n] { display: none; } }

/* history */
.view-history { max-width: 1100px; margin: 0 auto; }
.history-panel .panel-head { flex-wrap: wrap; }
.history-panel #history-filter { width: 180px; }
.history .t-title a { color: inherit; text-decoration: none; }
.history .t-title a:hover { text-decoration: underline; }
.history .result:hover { background: color-mix(in srgb, var(--line) 30%, transparent); }
@media (max-width: 720px) {
  .history .result { grid-template-columns: 40px minmax(0, 1fr); }
  .history .thumb { width: 40px; height: 40px; }
  .history .result-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .history-panel #history-filter { width: 100%; }
}

/* playlists */
.view-playlists { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; }
.pl-panel .panel-head { flex-wrap: wrap; }
.warn-text { color: var(--amber); }
.pl-list { display: grid; gap: 4px; }
.pl-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border-radius: var(--r-md); }
.pl-item:hover { background: color-mix(in srgb, var(--line) 30%, transparent); }
.pl-cover { width: 48px; height: 48px; border-radius: var(--r-sm, 8px); display: grid; place-items: center; font-weight: 800; font-size: 18px; color: var(--bg); background: var(--amber); }
.pl-cover.yt { background: #E8655F; } .pl-cover.sp { background: #5FD3A3; } .pl-cover.sc { background: #F4A340; } .pl-cover.dz { background: #A98BF5; }
.pl-item .t-title { font-weight: 600; }
.pl-item .t-sub a { color: inherit; }
.pl-actions { display: flex; gap: 6px; align-items: center; }
.pl-actions .btn svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 4px; }
.pl-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 10px; }
@media (max-width: 720px) {
  .pl-item { grid-template-columns: 40px minmax(0, 1fr); }
  .pl-cover { width: 40px; height: 40px; font-size: 16px; }
  .pl-actions { grid-column: 1 / -1; justify-content: flex-end; flex-wrap: wrap; }
  .pl-form { grid-template-columns: 1fr; }
}

/* ---------- instanțe self-hosted (tab Status) ---------- */
.sh-table-wrap { overflow-x: auto; }
.sh-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sh-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sh-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sh-table tr:last-child td { border-bottom: 0; }
.sh-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.sh-table .led { display: inline-block; vertical-align: middle; margin-right: 4px; }
.sh-table a { color: var(--text); }
.sh-err { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-actions { white-space: nowrap; text-align: right; }

/* ---------- ascultători pe canal (dropdown) ---------- */
.vc-count {
  font: inherit; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 7px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer;
}
.vc-count svg { width: 13px; height: 13px; flex: none; }
.vc-count svg:last-child:not(:first-child) { width: 12px; height: 12px; color: var(--muted); transition: transform .15s; }
.vc-count[aria-expanded="true"] { border-color: var(--amber); }
.vc-count[aria-expanded="true"] svg:last-child:not(:first-child) { transform: rotate(180deg); }
.vc-count:hover:not(:disabled) { border-color: var(--muted); }
.vc-count.zero { color: var(--muted); cursor: default; border-color: transparent; }
.vc-people { grid-column: 1 / -1; list-style: none; margin: 4px 0 2px; padding: 6px; border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--line); display: grid; gap: 2px; max-height: 240px; overflow: auto; }
.vc-people li { display: flex; align-items: center; gap: 8px; padding: 3px 4px; font-size: 13px; min-width: 0; }
.vc-person { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- comutatoare (oficial / self-hosted, sub-tab-uri status) ---------- */
.seg { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); }
.seg button {
  flex: 1; font: inherit; font-size: 13px; font-weight: 600; padding: 7px 10px; border-radius: var(--r-sm);
  border: 0; background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button[aria-selected="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--amber); }
.seg-count:empty { display: none; }
.seg-count { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--line); color: var(--text); }
.seg-wide { justify-self: start; min-width: min(460px, 100%); }
@media (max-width: 640px) {
  .seg-wide { justify-self: stretch; min-width: 0; max-width: 100%; overflow-x: auto; }
  .seg-wide button { padding: 7px 8px; font-size: 12px; }
}
.sh-pick { display: grid; gap: 6px; }
.sh-pick select { width: 100%; }
.sh-pick p { margin: 0; }
/* minmax(0, 1fr): a wide child (the instances table) scrolls inside its card instead of widening the page */
.sub-view { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }

/* ---------- mesaj către ascultători ---------- */
.ann-panel { display: grid; gap: 10px; }
.ann-panel .sec-desc { margin: 0; }
.ann-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.ann-panel textarea { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; resize: vertical; min-height: 76px; }
.ann-panel textarea:focus { border-color: var(--amber); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 25%, transparent); }
.ann-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.ann-actions #ann-count { margin-right: auto; order: -1; }

/* ---------- feedback (owner) ---------- */
.fb-top span[aria-hidden] { font-size: 13px; }
.tab-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--coral); color: #fff; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.fb-list { display: grid; gap: 10px; }
.fb-item { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; background: var(--panel-2); display: grid; gap: 8px; }
.fb-item.unread { border-color: color-mix(in srgb, var(--amber) 55%, var(--line)); box-shadow: inset 3px 0 0 var(--amber); }
.fb-meta-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fb-type { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--line); }
.fb-type.t-bug { background: color-mix(in srgb, var(--coral) 25%, transparent); }
.fb-type.t-idea { background: color-mix(in srgb, var(--amber) 25%, transparent); }
.fb-from { overflow-wrap: anywhere; }
.fb-msg { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.fb-actions { display: flex; gap: 6px; justify-content: flex-end; }
@media (max-width: 640px) { .fb-top span[data-i18n] { display: none; } }

/* ---------- top melodii / artiști (Istoric) ---------- */
.hist-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.seg-inline { display: inline-flex; }
.seg-inline button { flex: none; }
.rank { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); font-variant-numeric: tabular-nums; }
.rank.r1 { background: #F4B740; color: #2A1D00; border-color: transparent; }
.rank.r2 { background: #C9CED8; color: #1C2333; border-color: transparent; }
.rank.r3 { background: #D08A55; color: #2A1300; border-color: transparent; }
@media (max-width: 640px) { .seg-inline { display: flex; width: 100%; } .seg-inline button { flex: 1; padding: 7px 6px; font-size: 12px; } }
.result .rank { justify-self: center; }

/* Panel access (server settings) */
.pa { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.pa-title { font-size: 15px; margin: 0 0 4px; }
.pa-list { list-style: none; margin: 12px 0 8px; padding: 0; display: grid; gap: 6px; }
.pa-row { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; }
.pa-row img, .pa-av, .pa-sugg img { width: 28px; height: 28px; border-radius: 50%; flex: none; object-fit: cover; }
.pa-av { background: var(--line); display: inline-block; }
.pa-name { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pa-name b, .pa-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa-row .badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); opacity: .8; }
.pa-del { flex: none; font-size: 18px; line-height: 1; }
.pa-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 10px; }
.pa-input { position: relative; min-width: 0; }
.pa-input input { width: 100%; }
.pa-sugg { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); list-style: none; margin: 0; padding: 4px; background: var(--panel, var(--bg)); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.35); max-height: 260px; overflow: auto; }
.pa-sugg button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; background: none; border: 0; border-radius: 8px; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pa-sugg button .pa-sn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa-sugg button:hover:not(:disabled), .pa-sugg button:focus-visible { background: var(--line); }
.pa-sugg button:disabled { opacity: .55; cursor: default; }
@media (max-width: 560px) { .pa-form { grid-template-columns: 1fr; } }
