:root {
  --bg: #102033;
  --card: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #d9e2ec;
  --primary: #0369a1;
  --primary-dark: #075985;
  --accent: #0f766e;
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, .16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: #f3f6fa;
  color: var(--text);
}

a {
  color: inherit;
}

label {
  display: block;
  margin: 0 0 6px;
  font-weight: 700;
  color: #344054;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  margin: 0 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font: inherit;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(3, 105, 161, .14);
  outline: 0;
}

input[type="checkbox"] {
  width: auto;
  min-height: 0;
  margin: 0;
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.btn:hover {
  background: var(--primary-dark);
}

button.secondary,
.btn.secondary {
  background: #475467;
}

button.secondary:hover,
.btn.secondary:hover {
  background: #344054;
}

button.danger,
.btn.danger {
  background: #b42318;
}

button.danger:hover,
.btn.danger:hover {
  background: #912018;
}

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

.alert {
  padding: 12px 14px;
  margin: 12px 0;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #ecfeff;
  color: #164e63;
}

.alert-danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .92), rgba(3, 105, 161, .88)),
    #102033;
}

.login-shell {
  width: min(960px, 100%);
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 44px;
  background:
    linear-gradient(160deg, rgba(16, 32, 51, .94), rgba(15, 118, 110, .86)),
    #102033;
  color: #fff;
}

.login-mark {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 14px;
  background: rgba(255, 255, 255, .12);
  font-weight: 800;
}

.login-hero h1 {
  max-width: 360px;
  margin: 0;
  font-size: 42px;
  line-height: 1.08;
}

.login-hero p,
.login-title p,
.login-help {
  margin: 10px 0 0;
  color: #d7eef2;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px;
}

.login-title {
  margin-bottom: 22px;
}

.login-title h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
}

.login-title p,
.login-help {
  color: var(--muted);
}

.login-form {
  margin-top: 6px;
}

.login-submit {
  width: 100%;
  margin-top: 4px;
}

.login-help {
  font-size: 14px;
}

.login-wave {
  display: flex;
  align-items: end;
  gap: 10px;
  height: 110px;
}

.login-wave span {
  display: block;
  width: 16%;
  min-width: 24px;
  border-radius: 999px 999px 8px 8px;
  background: rgba(255, 255, 255, .28);
}

.login-wave span:nth-child(1) { height: 38%; }
.login-wave span:nth-child(2) { height: 70%; background: rgba(245, 158, 11, .78); }
.login-wave span:nth-child(3) { height: 52%; }
.login-wave span:nth-child(4) { height: 92%; background: rgba(34, 197, 94, .72); }
.login-wave span:nth-child(5) { height: 46%; }

.side {
  position: fixed;
  inset: 0 auto 0 0;
  width: 245px;
  overflow: auto;
  padding: 20px;
  background: var(--bg);
  color: #e5edf5;
}

.side h2 {
  margin: 0 0 4px;
}

.side small {
  color: #a8b3c2;
}

.side nav {
  margin-top: 18px;
}

.side a {
  display: block;
  padding: 10px;
  margin: 4px 0;
  border-radius: 8px;
  color: #e5edf5;
  text-decoration: none;
}

.side a:hover {
  background: rgba(255, 255, 255, .1);
}

.main {
  margin-left: 245px;
  padding: 26px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.card {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}

.kpi {
  font-size: 30px;
  font-weight: 800;
}

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: middle;
}

.table th {
  background: #f8fafc;
  color: #344054;
}

.table audio {
  width: min(320px, 100%);
}

.table .check-cell {
  width: 58px;
  text-align: center;
}

.table .check-cell input {
  margin: 0;
}

.card audio {
  display: block;
  width: min(420px, 100%);
  margin: 4px 0 12px;
}

.inline-form {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-form button {
  width: auto;
  margin: 0;
}

.filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 12px;
}

.filter-form label {
  margin: 0;
}

.filter-form input,
.filter-form select {
  margin: 6px 0 0;
}

.filter-form button,
.filter-form .btn {
  width: auto;
  margin: 0;
}

.report-filter {
  display: grid;
  grid-template-columns: minmax(160px, .8fr) minmax(160px, .8fr) minmax(180px, .9fr) minmax(360px, auto);
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}

.report-filter label,
.report-filter input,
.report-filter select,
.report-filter button,
.report-filter .btn {
  margin: 0;
}

.report-filter input,
.report-filter select {
  margin-top: 6px;
}

.report-filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.report-filter-actions button,
.report-filter-actions .btn {
  width: auto;
}

.bulk-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin: 12px 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}

.bulk-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.bulk-actions button {
  width: auto;
  margin: 0;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}

.metric-card {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-card strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 30px;
  line-height: 1.05;
}

.metric-card small {
  color: var(--muted);
}

.admin-section {
  margin: 0 0 18px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin: 0 0 12px;
}

.section-heading h2,
.section-heading p {
  margin: 0;
}

.section-heading h2 {
  color: var(--text);
}

.section-heading p {
  margin-top: 4px;
  color: var(--muted);
}

.tv-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  align-items: start;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table-wrap .table {
  margin-bottom: 0;
  min-width: 760px;
}

.playlist-admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(320px, 1.15fr);
  gap: 16px;
  align-items: start;
}

.playlist-add-form {
  display: grid;
  gap: 10px;
}

.playlist-add-form select[multiple] {
  min-height: 220px;
  padding: 8px;
}

.playlist-organizer {
  display: grid;
  gap: 16px;
}

.playlist-group {
  padding: 18px;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}

.playlist-group[open] {
  border-color: rgba(3, 105, 161, .28);
}

.playlist-group-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}

.playlist-group-summary::-webkit-details-marker {
  display: none;
}

.playlist-group-summary::marker {
  content: "";
}

.playlist-summary-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.playlist-summary-main h2,
.playlist-summary-main p {
  margin: 0;
}

.playlist-summary-main p,
.playlist-summary-main small {
  color: var(--muted);
}

.playlist-summary-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.playlist-toggle-label {
  min-width: 64px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.playlist-group[open] .playlist-toggle-label {
  color: var(--muted);
}

.playlist-group[open] .playlist-toggle-label::before {
  content: "Fechar";
}

.playlist-group[open] .playlist-toggle-label {
  font-size: 0;
}

.playlist-group[open] .playlist-toggle-label::before {
  font-size: 13px;
}

.playlist-group-content {
  display: grid;
  gap: 14px;
  padding-top: 16px;
}

.playlist-control-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.playlist-control-row p {
  margin: 4px 0 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 900;
}

.status-pill.is-on {
  background: #dcfce7;
  color: #166534;
}

.status-pill.is-off {
  background: #fee2e2;
  color: #991b1b;
}

.status-pill.is-live {
  background: #fef3c7;
  color: #92400e;
}

.playlist-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.playlist-group-header h2,
.playlist-group-header p {
  margin: 0;
}

.playlist-group-header p {
  color: var(--muted);
}

.playlist-badge {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 12px;
  font-weight: 900;
}

.playlist-track-list {
  display: grid;
  gap: 10px;
}

.playlist-track-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(150px, .85fr) minmax(180px, 1fr) 90px minmax(320px, auto);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  background: #f8fafc;
}

.playlist-track-row input,
.playlist-track-row select,
.playlist-track-row button {
  margin: 0;
}

.playlist-track-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.playlist-track-meta strong,
.playlist-track-meta span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.playlist-track-meta span {
  color: var(--muted);
  font-size: 13px;
}

.playlist-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.playlist-actions button {
  width: auto;
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.player-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 20px;
  background: radial-gradient(circle at top, #155e75, #102033 60%, #07111f);
  color: white;
  text-align: left;
}

.player-shell {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 18px;
  align-items: stretch;
}

.player-main-panel,
.player-side-panel {
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  background: rgba(255, 255, 255, .1);
  box-shadow: 0 22px 48px rgba(2, 8, 23, .28);
  backdrop-filter: blur(10px);
}

.player-main-panel {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px;
}

.player-side-panel {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 14px;
  padding: 18px;
}

.player-topline {
  position: absolute;
  top: 24px;
  right: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.player-main-panel {
  position: relative;
}

.player-clock {
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
}

.player-kicker,
.player-label {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.player-brand {
  margin: 0 0 30px;
  font-size: 28px;
  line-height: 1.15;
  color: rgba(255, 255, 255, .84);
}

.player-title {
  margin: 0;
  font-size: 54px;
  line-height: 1.05;
}

.player-subtitle {
  min-height: 28px;
  margin: 14px 0 24px;
  color: rgba(255, 255, 255, .78);
  font-size: 20px;
}

.player-info-block {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  background: rgba(2, 8, 23, .18);
}

.next-block h3 {
  margin: 12px 0 6px;
  font-size: 24px;
  line-height: 1.15;
}

.next-block p {
  margin: 0;
  color: rgba(255, 255, 255, .72);
}

.player-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, .92);
  color: #111827;
  font-size: 12px;
  font-weight: 900;
}

.player-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.player-meta-row:last-child {
  border-bottom: 0;
}

.player-meta-row span {
  color: rgba(255, 255, 255, .66);
}

.ads-list {
  display: grid;
  gap: 9px;
}

.ad-history-item {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.ad-history-item:last-child {
  border-bottom: 0;
}

.ad-history-item span,
.empty-list {
  margin: 0;
  color: rgba(255, 255, 255, .68);
  font-size: 13px;
}

.player-card {
  width: min(760px, 94vw);
  padding: 35px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 18px;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(10px);
}

.player-card audio {
  width: 100%;
}

.player-main-panel audio {
  width: 100%;
}

.player-start {
  width: auto;
  margin: 8px auto 18px;
  background: #f59e0b;
  color: #111827;
}

.player-start:hover {
  background: #fbbf24;
}

.big {
  font-size: 42px;
}

.status {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ok);
  color: #052e16;
  font-weight: 800;
}

.status.off {
  background: var(--danger);
  color: white;
}

.tv-status-live {
  display: grid;
  gap: 14px;
}

.tv-status-live > strong {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(34, 197, 94, .16);
  color: #bbf7d0;
}

.tv-status-live.is-offline > strong {
  background: rgba(239, 68, 68, .16);
  color: #fecaca;
}

.tv-status-live dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.tv-status-live div {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.tv-status-live dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.tv-status-live dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.tv-preview {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.tv-preview > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tv-preview-screen {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  background: #05070b;
  color: #f8fafc;
  text-align: center;
}

.tv-preview-screen img,
.tv-preview-screen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tv-preview-screen strong {
  font-size: clamp(18px, 3vw, 30px);
  line-height: 1.1;
}

.tv-preview-screen p,
.tv-preview-screen small {
  max-width: 100%;
  color: #cbd5e1;
  overflow-wrap: anywhere;
}

.tv {
  overflow: hidden;
  min-height: 100vh;
  background: #070a0f;
  color: white;
}

.tv-wrap {
  height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
}

.tv.tv-ticker-hidden .tv-wrap {
  height: 100vh;
}

.tv.tv-side-hidden .tv-wrap {
  grid-template-columns: minmax(0, 1fr);
}

.tv.tv-side-hidden .tv-side {
  display: none;
}

.tv.tv-youtube-fullscreen .tv-wrap {
  height: 100vh;
  grid-template-columns: minmax(0, 1fr);
}

.tv.tv-youtube-fullscreen .tv-side,
.tv.tv-youtube-fullscreen .tv-ticker {
  display: none;
}

.tv-main {
  display: grid;
  place-items: center;
  position: relative;
  min-width: 0;
  background: #090d14;
  overflow: hidden;
}

.tv-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.tv-audio-unlock {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 5;
  width: auto;
  min-height: 52px;
  padding: 13px 20px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 8px;
  background: rgba(245, 158, 11, .95);
  color: #111827;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .36);
}

.tv-audio-unlock:hover {
  background: #fbbf24;
}

.tv-media,
.tv-frame {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: #05070b;
}

.tv-empty,
.tv-text-slide {
  width: min(1100px, 86vw);
  padding: 54px;
  text-align: center;
}

.tv-empty span,
.tv-text-slide span,
.tv-kicker,
.tv-now span,
.tv-next span {
  display: inline-block;
  margin-bottom: 12px;
  color: #22d3ee;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tv-empty h1,
.tv-text-slide h1 {
  margin: 0;
  font-size: clamp(48px, 6vw, 98px);
  line-height: 1.02;
}

.tv-empty p,
.tv-text-slide p {
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 24px;
}

.tv-youtube-fallback {
  width: min(920px, 84vw);
  padding: 48px;
  text-align: center;
}

.tv-youtube-fallback span {
  display: inline-block;
  margin-bottom: 12px;
  color: #f87171;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tv-youtube-fallback h1 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(38px, 5vw, 74px);
  line-height: 1.04;
}

.tv-youtube-fallback p {
  margin: 18px auto 0;
  max-width: 760px;
  color: #cbd5e1;
  font-size: 23px;
  line-height: 1.35;
}

.tv-youtube-fallback small {
  display: block;
  margin-top: 22px;
  color: #94a3b8;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.tv-youtube-direct {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 28px;
  padding: 13px 22px;
  border-radius: 8px;
  background: #dc2626;
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

.tv-youtube-direct:hover {
  background: #ef4444;
  color: #fff;
}

.tv-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-left: 1px solid rgba(255, 255, 255, .12);
  background: #111827;
}

.tv-info-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: 34px;
}

.tv-side[hidden],
.tv-info-panel[hidden],
.tv-ticker[hidden],
.tv-banner-panel[hidden] {
  display: none;
}

.tv-banner-panel {
  position: relative;
  min-height: 0;
  height: 100%;
  display: grid;
  overflow: hidden;
  background: #05070b;
}

.tv-banner-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tv-banner-copy {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 26px;
  background: linear-gradient(180deg, rgba(5, 7, 11, 0), rgba(5, 7, 11, .92));
}

.tv-banner-copy h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
}

.tv-banner-copy p {
  margin: 10px 0 0;
  color: #e2e8f0;
  font-size: 17px;
  line-height: 1.35;
}

.tv-side h1,
.tv-side h2,
.tv-side h3,
.tv-side p {
  margin: 0;
}

.tv-brand h1 {
  font-size: 34px;
  line-height: 1.08;
}

.tv-brand p,
.tv-now p,
.tv-next p,
.tv-time p {
  margin-top: 10px;
  color: #cbd5e1;
}

.tv-now,
.tv-next,
.tv-time {
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.tv-now h2 {
  font-size: 28px;
  line-height: 1.15;
}

.tv-next h3 {
  font-size: 22px;
  line-height: 1.2;
}

.clock {
  font-size: 62px;
  font-weight: 900;
  line-height: 1;
}

.tv-ticker {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  height: 76px;
  overflow: hidden;
  display: flex;
  align-items: center;
  border-top: 4px solid #22d3ee;
  background: #f59e0b;
  color: #111827;
  font-size: 28px;
  font-weight: 900;
  white-space: nowrap;
}

.tv-ticker span {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 18s linear infinite;
}

.tv-ticker-media {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

@keyframes marquee {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}

@media (max-width: 760px) {
  .login-page {
    padding: 14px;
    place-items: start center;
  }

  .login-shell {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .login-hero {
    padding: 28px;
  }

  .login-hero h1 {
    font-size: 32px;
  }

  .login-wave {
    height: 74px;
  }

  .login-panel {
    padding: 28px;
  }

  .side {
    position: static;
    width: auto;
  }

  .main {
    margin-left: 0;
    padding: 18px;
  }

  .player-page {
    padding: 14px;
    place-items: stretch;
  }

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

  .player-main-panel {
    min-height: 430px;
    padding: 76px 22px 24px;
  }

  .player-topline {
    top: 18px;
    right: 18px;
    left: 18px;
  }

  .player-title {
    font-size: 38px;
  }

  .playlist-admin-grid,
  .playlist-track-row,
  .playlist-control-row,
  .tv-admin-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .playlist-group-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .playlist-summary-meta {
    justify-content: flex-start;
  }

  .filter-form,
  .report-filter {
    grid-template-columns: 1fr;
  }

  .filter-form button,
  .filter-form .btn,
  .report-filter-actions button,
  .report-filter-actions .btn {
    width: 100%;
  }

  .report-filter-actions {
    justify-content: stretch;
  }

  .playlist-actions {
    justify-content: stretch;
  }

  .playlist-actions .inline-form,
  .playlist-actions .btn {
    width: 100%;
  }

  .playlist-actions button,
  .playlist-track-row button {
    width: 100%;
  }

  .table {
    display: block;
    overflow-x: auto;
  }

  .tv-wrap {
    height: calc(100vh - 70px);
    grid-template-columns: 1fr;
  }

  .tv-side {
    display: none;
  }

  .tv-empty,
  .tv-text-slide {
    width: 100%;
    padding: 28px;
  }

  .tv-empty h1,
  .tv-text-slide h1 {
    font-size: 42px;
  }

  .tv-ticker {
    height: 70px;
    font-size: 22px;
  }
}

.player-dashboard {
  display: grid;
  place-items: start center;
  min-height: 100vh;
  padding: 24px;
  background: #eef3f7;
  color: #101828;
  text-align: left;
}

.player-console {
  width: min(1240px, 100%);
  display: grid;
  gap: 18px;
}

.player-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .08);
}

.player-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.player-logo {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 10px;
  background: #0f766e;
  color: #fff;
  font-weight: 900;
}

.player-identity p,
.player-kicker,
.section-heading span {
  margin: 0;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.player-identity h1 {
  margin: 3px 0 0;
  color: #101828;
  font-size: 24px;
  line-height: 1.15;
}

.player-header-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.player-dashboard .status,
.clock-chip,
.section-heading b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #dcfce7;
  color: #14532d;
  font-size: 13px;
  font-weight: 900;
}

.player-dashboard .status.off {
  background: #fee2e2;
  color: #991b1b;
}

.clock-chip {
  background: #eff6ff;
  color: #1e3a8a;
  gap: 6px;
}

.install-app {
  width: auto;
  min-height: 34px;
  padding: 7px 12px;
  margin: 0;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.install-app:hover {
  background: #115e59;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr);
  gap: 18px;
  align-items: stretch;
}

.now-panel,
.rail-card,
.ads-panel {
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .08);
}

.now-panel {
  min-height: 430px;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: 30px;
  background: #102033;
  color: #fff;
}

.now-visual {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(15, 118, 110, .35), rgba(245, 158, 11, .16));
}

.level-bars {
  height: 108px;
  width: 142px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 10px;
}

.level-bars span {
  width: 14px;
  border-radius: 8px 8px 3px 3px;
  background: #f59e0b;
  animation: levelPulse 1.2s ease-in-out infinite;
}

.level-bars span:nth-child(1) { height: 38%; animation-delay: 0s; background: #14b8a6; }
.level-bars span:nth-child(2) { height: 74%; animation-delay: .12s; }
.level-bars span:nth-child(3) { height: 54%; animation-delay: .24s; background: #38bdf8; }
.level-bars span:nth-child(4) { height: 92%; animation-delay: .36s; }
.level-bars span:nth-child(5) { height: 48%; animation-delay: .48s; background: #22c55e; }
.level-bars span:nth-child(6) { height: 66%; animation-delay: .6s; }

@keyframes levelPulse {
  0%, 100% { transform: scaleY(.72); opacity: .74; }
  50% { transform: scaleY(1); opacity: 1; }
}

.now-content {
  min-width: 0;
}

.now-panel .player-kicker {
  color: rgba(255, 255, 255, .7);
}

.player-title {
  margin: 10px 0 0;
  color: inherit;
  font-size: 46px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.player-subtitle {
  min-height: 28px;
  margin: 14px 0 28px;
  color: rgba(255, 255, 255, .74);
  font-size: 18px;
  line-height: 1.45;
}

.player-controls {
  display: grid;
  gap: 14px;
}

.player-controls audio {
  width: 100%;
}

.player-dashboard .player-start {
  width: max-content;
  margin: 0;
  background: #f59e0b;
  color: #111827;
}

.player-rail {
  display: grid;
  gap: 18px;
  align-content: start;
}

.rail-card,
.ads-panel {
  padding: 18px;
  background: #fff;
}

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

.section-heading b {
  min-height: 28px;
  padding: 5px 10px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
}

.next-card h3 {
  margin: 0 0 8px;
  color: #101828;
  font-size: 26px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.next-card p {
  margin: 0;
  color: #667085;
  line-height: 1.45;
}

.player-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid #edf2f7;
}

.player-meta-row:last-child {
  border-bottom: 0;
}

.player-meta-row span {
  color: #667085;
}

.player-meta-row b {
  color: #101828;
}

.ads-panel {
  display: grid;
  gap: 4px;
}

.ads-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.ad-history-item {
  display: grid;
  gap: 5px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: #f8fafc;
}

.ad-history-item strong {
  color: #101828;
  overflow-wrap: anywhere;
}

.ad-history-item span,
.empty-list {
  margin: 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 920px) {
  .player-dashboard {
    padding: 14px;
  }

  .player-header,
  .player-layout,
  .now-panel {
    grid-template-columns: 1fr;
  }

  .player-header {
    align-items: flex-start;
  }

  .player-header-status {
    justify-content: flex-start;
  }

  .now-panel {
    min-height: auto;
    padding: 22px;
  }

  .now-visual {
    max-width: 180px;
  }

  .player-title {
    font-size: 34px;
  }
}

/* ==========================================================
   RADIO MALL UI/UX PREMIUM - Shopping Carpina
   Camada visual moderna aplicada sem alterar a regra de negócio PHP
   ========================================================== */
:root {
  --bg: #070b14;
  --bg-2: #0b1020;
  --surface: rgba(17,24,39,.88);
  --card: rgba(17,24,39,.82);
  --card-hover: rgba(31,41,55,.96);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148,163,184,.18);
  --primary: #00d4ff;
  --primary-dark: #0284c7;
  --secondary: #7c3aed;
  --accent: #22c55e;
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 24px 70px rgba(0,0,0,.32);
  --radius: 22px;
}

html { background: var(--bg); }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 18% -10%, rgba(0,212,255,.20), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(124,58,237,.22), transparent 34%),
    linear-gradient(135deg, #070b14 0%, #0b1020 54%, #090d18 100%);
  color: var(--text);
}

.admin-shell:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), transparent 80%);
}

.side {
  width: 286px;
  padding: 22px 16px;
  background: rgba(5, 8, 16, .84);
  border-right: 1px solid rgba(255,255,255,.08);
  box-shadow: 18px 0 60px rgba(0,0,0,.28);
  backdrop-filter: blur(18px);
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #001018;
  font-weight: 950;
  letter-spacing: -.05em;
  background: linear-gradient(135deg, var(--primary), #a78bfa 55%, var(--accent));
  box-shadow: 0 16px 35px rgba(0,212,255,.22);
}

.side h2 { margin: 0; color: #fff; letter-spacing: -.04em; }
.side small { display:block; color: var(--muted); }

.user-chip {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 16px 6px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
}
.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0,212,255,.12);
  color: var(--primary);
  font-weight: 900;
}
.user-chip strong { display:block; font-size: 14px; }

.side nav { margin-top: 10px; }
.side a {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 3px 0;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 15px;
  color: #dbeafe;
  font-weight: 750;
  font-size: 14px;
  transition: .18s ease;
}
.side a span { width: 22px; text-align:center; }
.side a:hover {
  transform: translateX(3px);
  background: rgba(0,212,255,.10);
  border-color: rgba(0,212,255,.18);
  color: #fff;
}

.main {
  margin-left: 286px;
  padding: 26px;
  position: relative;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(17,24,39,.78), rgba(15,23,42,.52));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.topbar h1 { margin: 2px 0 0; font-size: clamp(28px, 4vw, 44px); letter-spacing: -.055em; }
.page-kicker {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.topbar-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; justify-content:flex-end; }
.live-dot {
  display:inline-flex; align-items:center; gap:8px;
  padding: 10px 13px; border-radius:999px;
  background: rgba(34,197,94,.10); color:#bbf7d0; border:1px solid rgba(34,197,94,.22); font-weight:800; font-size:13px;
}
.live-dot i { width:9px; height:9px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 6px rgba(34,197,94,.13); }

.grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.card,
.metric-card,
.playlist-group,
.playlist-control-row,
.report-filter,
.bulk-actions,
.table {
  border: 1px solid rgba(255,255,255,.09) !important;
  border-radius: var(--radius) !important;
  background: linear-gradient(145deg, rgba(17,24,39,.90), rgba(15,23,42,.70)) !important;
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0,0,0,.22) !important;
  backdrop-filter: blur(14px);
}
.card { padding: 22px; overflow: hidden; }
.card:hover,
.metric-card:hover,
.playlist-group[open] { border-color: rgba(0,212,255,.20) !important; }
.card h2 { margin-top: 0; letter-spacing: -.025em; }
.metric-card strong,
.section-heading h2,
.playlist-summary-main h2,
.playlist-control-row strong { color: #fff; }
.metric-card span,
.metric-card small,
.section-heading p,
.playlist-summary-main p,
.playlist-summary-main small,
.playlist-control-row p,
.muted,
.playlist-track-meta span { color: var(--muted) !important; }
.kpi {
  margin: 4px 0 8px;
  color: #fff;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -.06em;
  line-height: 1;
}
.card .kpi + b { color: #e0f2fe; }

button, .btn, .login-submit {
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 14px 30px rgba(0,212,255,.16);
  transition: .18s ease;
}
button:hover, .btn:hover, .login-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}
button.secondary, .btn.secondary { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.10); }
button.danger, .btn.danger { background: linear-gradient(135deg, #ef4444, #b91c1c); }

label { color: #cbd5e1; }
input, select, textarea {
  border: 1px solid rgba(148,163,184,.25);
  border-radius: 14px;
  background: rgba(2,6,23,.48);
  color: #f8fafc;
}
input::placeholder, textarea::placeholder { color: #64748b; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(0,212,255,.70);
  box-shadow: 0 0 0 4px rgba(0,212,255,.13);
}

.table { overflow: hidden; border-collapse: separate; border-spacing: 0; }
.table th, .table td { border-bottom: 1px solid rgba(148,163,184,.13); }
.table th { background: rgba(255,255,255,.05); color: #cbd5e1; text-transform: uppercase; font-size: 12px; letter-spacing: .08em; }
.table tr:hover td { background: rgba(255,255,255,.035); }

.alert {
  border-radius: 16px;
  background: rgba(0,212,255,.10);
  border-color: rgba(0,212,255,.28);
  color: #cffafe;
}
.alert-danger { background: rgba(239,68,68,.10); color:#fecaca; border-color: rgba(239,68,68,.30); }

.inline-form { gap: 10px; }
.filter-form, .report-filter, .row { gap: 14px; }
.playlist-control-row,
.playlist-track-row { background: rgba(255,255,255,.045); border-color: rgba(255,255,255,.08); border-radius: 18px; }
.playlist-badge { background: rgba(0,212,255,.12); color: #67e8f9; }

/* Login premium */
.login-page {
  background:
    radial-gradient(circle at 12% 10%, rgba(0,212,255,.26), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(124,58,237,.28), transparent 30%),
    linear-gradient(135deg, #050816, #0b1020 55%, #050816);
}
.login-shell {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 30px;
  background: rgba(15,23,42,.78);
  box-shadow: 0 34px 90px rgba(0,0,0,.45);
  backdrop-filter: blur(18px);
}
.login-hero {
  background:
    linear-gradient(160deg, rgba(0,212,255,.18), rgba(124,58,237,.20)),
    rgba(2,6,23,.66);
}
.login-mark { border-radius: 18px; background: linear-gradient(135deg,var(--primary),#a78bfa,var(--accent)); color:#021018; border:0; }
.login-hero h1 { font-size: clamp(42px, 6vw, 72px); letter-spacing: -.07em; }
.login-panel { background: rgba(255,255,255,.04); }
.login-title h2 { color: #fff; letter-spacing: -.04em; }
.login-wave span { background: linear-gradient(to top, var(--primary), rgba(255,255,255,.26)); animation: equalizer 1.4s ease-in-out infinite alternate; }
.login-wave span:nth-child(2) { animation-delay:.15s; }
.login-wave span:nth-child(3) { animation-delay:.3s; }
.login-wave span:nth-child(4) { animation-delay:.45s; }
.login-wave span:nth-child(5) { animation-delay:.6s; }
@keyframes equalizer { from { transform: scaleY(.62); opacity:.65 } to { transform: scaleY(1.05); opacity:1 } }

/* Player rádio premium */
.player-page {
  background:
    radial-gradient(circle at top left, rgba(0,212,255,.26), transparent 30%),
    radial-gradient(circle at bottom right, rgba(124,58,237,.28), transparent 32%),
    #050816;
}
.player-main-panel, .player-side-panel, .player-card {
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(17,24,39,.78), rgba(2,6,23,.55));
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 34px 90px rgba(0,0,0,.42);
}
.player-title { font-size: clamp(44px, 6vw, 86px); letter-spacing: -.075em; }
.player-pill { background: linear-gradient(135deg, var(--primary), var(--accent)); color:#001018; }
.player-info-block { border-radius: 22px; background: rgba(255,255,255,.06); }
.status { background: linear-gradient(135deg, var(--accent), #86efac); }

/* TV Indoor premium */
.tv {
  background:
    radial-gradient(circle at 15% 10%, rgba(0,212,255,.16), transparent 26%),
    radial-gradient(circle at 85% 15%, rgba(124,58,237,.22), transparent 32%),
    #030712;
}
.tv-side, .tv-info-panel, .tv-banner-panel {
  background: rgba(5,8,16,.72);
  border-left: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(16px);
}
.tv-stage, .tv-now, .tv-next, .tv-time, .tv-banner-panel {
  border-radius: 24px;
}
.tv-ticker { background: linear-gradient(90deg, rgba(0,212,255,.95), rgba(124,58,237,.95)); color: #fff; }

@media (max-width: 900px) {
  .side { position: relative; width: auto; inset: auto; }
  .main { margin-left: 0; padding: 18px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar-actions { justify-content: flex-start; }
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { min-height: 260px; }
}

@media print {
  body {
    background: #fff !important;
    color: #111827 !important;
  }

  .side,
  .topbar,
  .report-filter,
  .btn,
  button {
    display: none !important;
  }

  .main {
    margin: 0 !important;
    padding: 0 !important;
  }

  .card,
  .metric-card,
  .table,
  .admin-section {
    break-inside: avoid;
    box-shadow: none !important;
    background: #fff !important;
    color: #111827 !important;
  }

  .table th,
  .table td {
    color: #111827 !important;
    border-color: #d1d5db !important;
  }
}
