/* Bistrița FM studio console. Dark room, one red lamp. */
:root {
  --ink: #1f1511;        /* room */
  --desk: #2b1d17;       /* panels (app "ink") */
  --desk-2: #3a2820;     /* inputs, rows */
  --line: #4a352b;
  --cream: #f4ede3;
  --soft: #bba99b;
  --red: #c4281d;
  --red-hot: #ff4a3a;
  --gold: #e8b04a;
  --ok: #7fc8a0;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ink); color: var(--cream); }
body { font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; margin: 0; line-height: 1.05; letter-spacing: -0.01em; }
h3 { font-size: 22px; }
h4 { font-size: 15px; font-family: var(--body); font-weight: 600; color: var(--soft); margin: 22px 0 8px; }
p { margin: 0; }
.muted { color: var(--soft); }
.small { font-size: 13px; }
.spacer { flex: 1; }
.error { color: #ff9a8f; font-size: 14px; min-height: 0; }
.error:empty { display: none; }

/* Controls */
label { display: grid; gap: 6px; font-size: 14px; color: var(--soft); position: relative; }
input, textarea, select {
  font: inherit; color: var(--cream); background: var(--desk-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
input[type=file] { padding: 8px; }
.check { display: flex; align-items: center; gap: 10px; color: var(--cream); }
.check input { width: 18px; height: 18px; accent-color: var(--red); }
.count { position: absolute; right: 10px; bottom: 8px; }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn {
  font: 600 15px var(--body); border: 0; border-radius: 999px; padding: 11px 20px;
  cursor: pointer; color: var(--cream); background: var(--desk-2);
}
.btn:focus-visible, .link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: progress; }
.btn-red { background: var(--red); }
.btn-red:hover:not(:disabled) { background: #d8352a; }
.btn-ink { background: var(--cream); color: var(--desk); }
.btn-ghost { background: transparent; border: 1px solid var(--line); }
.link { background: none; border: 0; color: var(--soft); font: inherit; cursor: pointer; text-decoration: none; padding: 4px; }
.link:hover { color: var(--cream); }

/* Login */
.login { max-width: 360px; margin: 12vh auto; padding: 0 20px; display: grid; gap: 14px; }
.login-logo { width: 220px; }
.login h1 { font-size: 44px; }

/* Header */
.top { display: flex; align-items: center; gap: 16px; padding: 18px 28px; border-bottom: 1px solid var(--line); }
.top-logo { height: 34px; }
.top-title { font: 800 20px var(--display); color: var(--soft); }

/* ON AIR row */
.onair-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; padding: 28px; }
.lamp-wrap { display: grid; gap: 22px; align-content: start; }

.lamp {
  display: inline-grid; place-items: center; justify-self: start;
  padding: 14px 34px; border-radius: 14px;
  background: #3b2a24; border: 2px solid #4d3a31;
  transition: background .5s, box-shadow .5s, border-color .5s;
}
.lamp-text { font: 800 44px/1 var(--display); letter-spacing: .06em; color: #6b564b; transition: color .5s, text-shadow .5s; }
.lamp.live { background: #8f1810; border-color: var(--red-hot); box-shadow: 0 0 40px rgba(255, 74, 58, .45), inset 0 0 24px rgba(255, 180, 160, .25); }
.lamp.live .lamp-text { color: #fff2ec; text-shadow: 0 0 18px rgba(255, 120, 100, .9); }

.now { display: flex; gap: 22px; align-items: center; }
.now-img { width: 132px; height: 132px; border-radius: 22px; object-fit: cover; flex: none; }
.now-time { color: var(--gold); font-weight: 600; }
.now-title { font-size: clamp(36px, 4.4vw, 64px); margin: 4px 0 6px; }
.now-hosts { font-size: 19px; color: var(--soft); }

.progress { height: 6px; border-radius: 6px; background: var(--desk-2); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--cream); transition: width 1s linear; }
.now-foot { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.left-big { font: 800 30px var(--display); font-variant-numeric: tabular-nums; }
.next { color: var(--soft); }

/* Panels */
.panel { background: var(--desk); border-radius: 22px; padding: 22px; }
.panel-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 14px; }
.push > .muted { margin: 4px 0 16px; }
.push-grid { display: grid; grid-template-columns: 1fr 210px; gap: 18px; align-items: start; }

.phone {
  background: linear-gradient(160deg, #46342b, #241812); border-radius: 26px; padding: 54px 10px 80px;
  border: 1px solid var(--line);
}
.phone-note {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: start;
  background: rgba(244, 237, 227, .92); color: #2b1d17; border-radius: 14px; padding: 10px; font-size: 12.5px; line-height: 1.3;
}
.phone-note img { width: 26px; height: 26px; border-radius: 6px; background: #2b1d17; object-fit: contain; padding: 2px; }
.phone-note strong { display: block; }
.phone-note span { display: block; word-break: break-word; }
.phone-note time { color: #7a655a; font-size: 11px; }

.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.history li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 12px; border-radius: 12px; background: var(--desk-2); }
.history .msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history .when { color: var(--soft); font-size: 13px; }
.history .state { grid-column: 1 / -1; font-size: 13px; }
.state.sent { color: var(--ok); }
.state.failed { color: #ff9a8f; }

/* Lower */
.lower { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 0 28px 40px; }
.events, .shows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.empty { color: var(--soft); padding: 18px; border: 1px dashed var(--line); border-radius: 14px; }

.event { display: grid; grid-template-columns: 58px 1fr auto; gap: 14px; align-items: center; padding: 10px; border-radius: 14px; background: var(--desk-2); }
.date { text-align: center; background: var(--red); border-radius: 12px; padding: 6px 0; }
.date b { display: block; font: 800 22px/1 var(--display); }
.date small { font-size: 11px; font-weight: 600; }
.event.draft .date { background: var(--line); }
.event h5 { font: 600 16px var(--body); margin: 0; }
.event p { color: var(--soft); font-size: 13.5px; }
.tag { font-size: 12px; color: var(--gold); }
.actions { display: flex; gap: 2px; }

.show { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 8px; border-radius: 14px; background: var(--desk-2); }
.show.is-live { outline: 2px solid var(--red-hot); }
.show.is-hidden { opacity: .55; }
.art {
  width: 72px; height: 72px; border-radius: 14px; border: 0; padding: 0; cursor: pointer; overflow: hidden;
  background: var(--line); color: var(--soft); font: 600 12px var(--body); display: grid; place-items: center;
}
.art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art:hover { outline: 2px solid var(--gold); }
.show h5 { font: 600 16px var(--body); margin: 0; }
.show p { color: var(--soft); font-size: 13px; }

.show .actions { flex-direction: column; align-items: end; }
.days { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 12px; margin: 0;
  display: flex; flex-wrap: wrap; gap: 8px 18px; }
.days legend { color: var(--soft); font-size: 14px; padding: 0 6px; }
#show-delete { color: #ff9a8f; border-color: #6b3a33; }

/* Dialog */
dialog {
  width: min(560px, calc(100vw - 32px)); border: 0; border-radius: 22px; padding: 24px;
  background: var(--desk); color: var(--cream);
}
dialog::backdrop { background: rgba(10, 6, 4, .7); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--cream); color: var(--desk); padding: 12px 20px; border-radius: 999px; font-weight: 600;
}

@media (max-width: 1240px) {
  .push-grid { grid-template-columns: 1fr; }
  .phone { display: none; }
}
@media (max-width: 1000px) {
  .onair-row, .lower { grid-template-columns: 1fr; padding-left: 16px; padding-right: 16px; }
  .top { padding: 14px 16px; flex-wrap: wrap; }
}
@media (max-width: 520px) {
  .now { flex-direction: column; align-items: start; }
  .two { grid-template-columns: 1fr; }
  .lamp-text { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
