:root {
  --bg-1: #0f1722;
  --bg-2: #17283a;
  --bg-3: #1f3448;
  --panel: rgba(6, 6, 8, 0.93);
  --panel-2: rgba(11, 11, 14, 0.96);
  --line: rgba(160, 189, 214, 0.18);
  --line-strong: rgba(255, 148, 31, 0.28);
  --text: #ffffff;
  --muted: #9fb5c8;
  --accent: #ff8f1f;
  --accent-2: #7ee081;
  --accent-3: #ffbf47;
  --shadow: 0 24px 60px rgba(4, 10, 18, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: #000000;
  font-family: "Segoe UI", Tahoma, sans-serif;
}

.login-body {
  display: grid;
  place-items: center;
  padding: 20px;
}

.console-shell,
.login-shell {
  width: min(1380px, calc(100vw - 24px));
  margin: 0 auto;
}

.console-shell {
  padding: 26px 0 42px;
}

.login-shell {
  max-width: 460px;
}

.console-topbar,
.login-panel,
.hero-panel,
.panel,
.session-strip {
  border: 1px solid var(--line);
  background: #050505;
  box-shadow: var(--shadow);
}

.console-topbar,
.panel,
.hero-panel,
.login-panel {
  border-radius: 22px;
}

.console-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, auto);
  gap: 20px;
  align-items: center;
  padding: 24px 26px;
  margin-bottom: 18px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
}

.topbar-copy {
  min-width: 0;
}

.topbar-side {
  display: flex;
  align-items: stretch;
  gap: 16px;
  justify-content: flex-end;
}

.topbar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 188px;
  min-width: 188px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #050505;
  box-shadow: var(--shadow);
}

.topbar-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.session-strip {
  min-width: 260px;
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.eyebrow,
.tiny-label {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--accent);
}

h1,
h2 {
  margin: 0;
  font-weight: 700;
}

h1 {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.02;
  max-width: 24ch;
  color: #ffffff;
  font-weight: 500;
}

h2 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--accent);
}

.console-topbar .eyebrow {
  font-size: clamp(1.7rem, 3.8vw, 3.6rem);
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 800;
  text-transform: none;
}

.lead,
.muted,
label,
button,
input,
select,
th,
td,
code,
pre,
a,
li {
  font-family: "Segoe UI", Tahoma, sans-serif;
}

.lead,
.muted {
  color: var(--muted);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.15fr 0.7fr;
  gap: 18px;
  margin-bottom: 18px;
}

.hero-panel,
.panel {
  padding: 20px;
}

.hero-panel-main {
  background: #050505;
}

.hero-panel-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-panel-head,
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.status-pill {
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.status-pill.live {
  color: #03141b;
  background: var(--accent-2);
}

.status-pill.standby {
  color: #101923;
  background: var(--accent-3);
}

.stream-link {
  display: inline-block;
  margin-bottom: 12px;
  color: #fff4e7;
  text-decoration: none;
  word-break: break-all;
}

.stream-link:hover {
  color: #ffffff;
}

.stream-player {
  display: none;
}

.player-shell {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 143, 31, 0.22);
  background: #000000;
}

.player-stage {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.player-disc {
  width: 96px;
  height: 96px;
  border: 0;
  border-radius: 999px;
  background: #ff8f1f;
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 0 0 6px rgba(255, 143, 31, 0.12);
}

.player-disc-icon {
  display: block;
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 30px solid #ffffff;
}

.player-disc.is-stopped .player-disc-icon {
  width: 26px;
  height: 26px;
  margin-left: 0;
  border: 0;
  background: #ffffff;
}

.player-stack {
  display: grid;
  gap: 12px;
}

.player-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 0;
}

.player-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(255, 143, 31, 0.6);
}

.player-dot.local {
  background: var(--accent-3);
  box-shadow: 0 0 14px rgba(255, 191, 71, 0.55);
}

.player-tag {
  margin-left: auto;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.74rem;
  color: #ffe0bf;
  background: rgba(255, 143, 31, 0.14);
}

.player-now {
  display: grid;
  gap: 4px;
}

.player-title {
  font-size: 1.04rem;
  color: #ffffff;
}

.player-subtitle {
  color: #c0c0c0;
  font-size: 0.88rem;
}

.volume-strip {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.volume-strip span {
  color: #ffffff;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.volume-strip input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: #ff8f1f;
}

.peak-meter-card {
  min-width: 230px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 143, 31, 0.16);
  background: #050505;
  box-shadow: var(--shadow);
}

.peak-meter-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 12px;
}

.meter-note {
  color: #ffd8b1;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
}

.peak-meter {
  display: flex;
  gap: 18px;
  align-items: end;
}

.peak-column {
  display: flex;
  gap: 8px;
  align-items: end;
}

.peak-label {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8rem;
  padding-bottom: 4px;
}

.peak-track {
  position: relative;
  width: 24px;
  height: 88px;
  border-radius: 999px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 180, 71, 0.24), rgba(255, 143, 31, 0.14) 35%, rgba(255, 255, 255, 0.04) 100%),
    #121212;
  border: 1px solid rgba(255, 143, 31, 0.22);
}

.peak-fill {
  position: absolute;
  inset: auto 0 0 0;
  display: block;
  height: 8%;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd75a 0%, #ff8f1f 62%, #ff5e00 100%);
  box-shadow: 0 0 18px rgba(255, 143, 31, 0.4);
  transition: height 90ms linear;
}

.shortcut-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 10px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 0.9fr;
  gap: 18px;
  margin-bottom: 18px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.bottom-space {
  grid-template-columns: 1fr;
}

.panel-dark {
  background: #050505;
}

.strong-line {
  margin-top: 4px;
}

.form {
  display: grid;
  gap: 12px;
}

.campaign-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.schedule-picker {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #050505;
}

.schedule-picker legend {
  padding: 0 10px;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 700;
}

.schedule-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.schedule-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.schedule-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.schedule-toggle {
  min-width: 92px;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.schedule-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.schedule-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.schedule-check {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.24);
  display: inline-block;
  position: relative;
}

.schedule-check::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: transparent;
}

.schedule-text {
  font-weight: 700;
  color: #ffffff;
}

.schedule-option input:checked + .schedule-check {
  border-color: var(--accent);
}

.schedule-option input:checked + .schedule-check::after {
  background: var(--accent);
}

.schedule-option input:checked ~ .schedule-text {
  color: #ffd4ab;
}

.schedule-option:has(input:checked) {
  border-color: rgba(255, 143, 31, 0.45);
  background: linear-gradient(180deg, rgba(255, 143, 31, 0.14), rgba(255, 143, 31, 0.04));
}

.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.stop-form {
  align-content: end;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
  color: #d9e6f3;
}

input,
select,
button {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  padding: 11px 13px;
  font-size: 0.98rem;
}

input,
select {
  color: var(--text);
  background: rgba(7, 15, 24, 0.88);
}

button {
  color: #1a0d00;
  background: linear-gradient(135deg, #ff7a00, #ffb347);
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  margin: 6px 0 16px;
  border-radius: 12px;
  background: #ff8f1f;
  color: #000000;
  text-decoration: none;
  font-weight: 700;
}

.download-button:hover {
  color: #000000;
  background: #ffab4d;
}

.transition-form {
  margin-bottom: 18px;
  padding-top: 6px;
}

.compact-table {
  margin-bottom: 18px;
  font-size: 0.84rem;
}

.code-block {
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  background: rgba(6, 12, 18, 0.9);
  color: #fff0df;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(160, 189, 214, 0.14);
}

th {
  color: #cae5fb;
  color: #ffb870;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.campaign-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 0.78rem;
}

.campaign-badge.active {
  color: #dbffe2;
  background: rgba(126, 224, 129, 0.16);
  border: 1px solid rgba(126, 224, 129, 0.32);
}

.campaign-badge.future {
  color: #ffe6b8;
  background: rgba(255, 191, 71, 0.14);
  border: 1px solid rgba(255, 191, 71, 0.28);
}

.campaign-badge.expired {
  color: #ffd2d2;
  background: rgba(255, 107, 107, 0.14);
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.flash {
  min-height: 1.2em;
  margin: 8px 0 0;
  color: #8df0ab;
}

.login-panel {
  padding: 28px;
}

@media (max-width: 1180px) {
  .console-topbar {
    grid-template-columns: 1fr;
  }

  .hero-grid,
  .workspace-grid,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .schedule-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topbar-side {
    width: 100%;
    justify-content: space-between;
  }

  .topbar-logo {
    width: 164px;
    min-width: 164px;
  }
}

@media (max-width: 820px) {
  .console-topbar,
  .session-strip,
  .split {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .console-shell {
    padding: 14px 0 26px;
  }

  .hero-panel,
  .panel,
  .console-topbar {
    padding: 16px;
  }

  .schedule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-side {
    flex-direction: column;
  }

  .topbar-brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-logo {
    width: 156px;
    min-width: 156px;
  }

  .player-stage {
    grid-template-columns: 1fr;
  }

  .player-disc {
    width: 84px;
    height: 84px;
  }

  .campaign-range {
    grid-template-columns: 1fr;
  }
}

.madrid-streams {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.madrid-stream-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 143, 31, 0.07);
  border: 1px solid var(--line-strong);
}

.madrid-stream-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.madrid-listener-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-2);
  white-space: nowrap;
}

.madrid-stream-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.madrid-stream-quality {
  font-weight: 400;
  color: var(--muted);
  text-transform: none;
  margin-left: 6px;
  letter-spacing: 0;
}

.madrid-stream-row .stream-link {
  font-size: 0.82rem;
  word-break: break-all;
}

.asset-actions {
  white-space: nowrap;
  vertical-align: middle;
}

.asset-action-form {
  display: inline-block;
  margin: 0 2px 4px 0;
}

.replace-file-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.replace-file-label input[type="file"] {
  width: auto;
  font-size: 0.78rem;
  color: var(--muted);
  background: transparent;
  border: none;
  padding: 0;
  max-width: 160px;
}

.btn-asset {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  width: auto;
  white-space: nowrap;
}

.btn-asset-danger {
  background: #c0392b;
  color: #fff;
}

.btn-asset-danger:hover {
  background: #e74c3c;
  color: #fff;
}

.btn-asset-secondary {
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-asset-secondary:hover {
  background: var(--accent);
  color: #1a0d00;
}
