:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --accent: #06b6d4;
  --accent-light: #ecfeff;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --priority-color: #e11d48;
  --priority-bg: #ffe4e6;
  --success: #10b981;
  --success-bg: #d1fae5;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.04);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

[data-theme="dark"] {
  --bg-main: #090d16;
  --bg-card: #131b2e;
  --bg-sidebar: #0f172a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #1e293b;
  --primary-light: rgba(2, 132, 199, 0.15);
  --accent-light: rgba(6, 182, 212, 0.15);
  --priority-bg: rgba(225, 29, 72, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========================================================
   NAVBAR & HEADER (CONTROLE E ADMIN)
======================================================== */
.navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo {
  height: 38px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.brand-icon-default {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.brand-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.clinic-selector-select {
  padding: 0.45rem 0.85rem;
  min-width: 150px;
  max-width: 260px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.clinic-selector-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-sidebar);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
}

.btn-tv {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25);
}

.btn-tv:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-danger {
  background: #ef4444;
  color: #ffffff;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-success {
  background: #059669;
  color: #ffffff;
}

.btn-success:hover {
  background: #047857;
}

/* ========================================================
   MAIN LAYOUT (RECEPTION & DOCTORS)
======================================================== */
.main-container {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 1.5rem;
  padding: 1.5rem;
  max-width: 1480px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

@media (max-width: 1080px) {
  .main-container {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.45rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 1.02rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input-lg {
  font-size: 1.35rem;
  font-weight: 600;
  padding: 0.9rem 1.2rem;
}

/* Room Grid Selection */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.room-btn {
  background: var(--bg-sidebar);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  user-select: none;
  min-height: 80px;
}

.room-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
}

.room-btn.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 2px var(--primary);
}

.room-icon-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--primary);
}

.room-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: none;
}

.room-category {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: none;
}

/* Priority Toggle */
.priority-toggle {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1.2rem;
  background: var(--bg-sidebar);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.priority-toggle.active {
  background: var(--priority-bg);
  border-color: var(--priority-color);
  color: var(--priority-color);
}

.priority-toggle input {
  display: none;
}

.priority-label {
  font-weight: 700;
  font-size: 0.95rem;
}

/* Big Call Button */
.btn-call-big {
  width: 100%;
  padding: 1.15rem;
  font-size: 1.3rem;
  font-weight: 800;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary), #0284c7);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  box-shadow: 0 10px 20px rgba(2, 132, 199, 0.25);
  transition: all 0.2s ease;
}

.btn-call-big:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 25px rgba(2, 132, 199, 0.35);
}

/* Doctor Pinned Room Banner */
.doctor-room-bar {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
}

.doctor-room-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.doctor-room-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: none;
}

.doctor-room-subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
  text-transform: none;
}

/* Queue List */
.queue-table {
  width: 100%;
  border-collapse: collapse;
}

.queue-table th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.75rem 0.85rem;
  border-bottom: 1.5px solid var(--border-color);
}

.queue-table td {
  padding: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.queue-row:hover {
  background: var(--bg-sidebar);
}

.badge-priority {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--priority-bg);
  color: var(--priority-color);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* History Sidebar */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 420px;
  overflow-y: auto;
}

.history-item {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.history-item:hover {
  border-color: var(--primary);
  background: var(--bg-card);
}

.history-item.priority {
  border-left: 4px solid var(--priority-color);
}

.history-patient {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
  text-transform: none;
}

.history-details {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  text-transform: none;
}

.history-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--border-color);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}

.btn-recall {
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
}

.btn-recall:hover {
  background: var(--primary);
  color: #fff;
}

/* ==========================================================================
   TV PANEL STYLES (TOTALMENTE RESPONSIVO E AUTO-ADAPTÁVEL A QUALQUER TELA)
   Suporte a 720p, 1080p, 1440p, 4K, 8K, Ultrawide e Totens Verticais
========================================================================== */
.tv-body {
  background: #090e1a;
  color: #f8fafc;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  user-select: none;
  position: relative;
  font-size: clamp(13px, 1vmin + 6px, 26px);
}

/* Header Auto-Adaptável */
.tv-header {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.1);
  padding: clamp(0.5rem, 1.2vh, 1.6rem) clamp(1rem, 2.5vw, 3.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  min-height: clamp(55px, 8.5vh, 110px);
  z-index: 10;
}

.tv-brand {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.5vw, 1.8rem);
  min-width: 0;
}

.tv-logo {
  height: clamp(35px, 5.5vh, 75px);
  width: auto;
  max-width: clamp(140px, 18vw, 300px);
  object-fit: contain;
}

.tv-title {
  font-size: clamp(1.15rem, 2.2vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tv-clock-container {
  text-align: right;
  flex-shrink: 0;
}

.tv-clock {
  font-size: clamp(1.6rem, 2.8vw, 3.8rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #38bdf8;
  line-height: 1;
}

.tv-date {
  font-size: clamp(0.75rem, 1vw, 1.3rem);
  color: #94a3b8;
  margin-top: clamp(2px, 0.4vh, 6px);
  text-transform: none;
}

/* Grid Principal da TV (Auto-dimensionado em altura e largura) */
.tv-main-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr clamp(260px, 26vw, 480px);
  gap: clamp(0.8rem, 1.6vw, 2.5rem);
  padding: clamp(0.8rem, 1.6vw, 2.5rem);
  min-height: 0; /* Impede overflow vertical */
  height: calc(100vh - clamp(55px, 8.5vh, 110px));
  height: calc(100dvh - clamp(55px, 8.5vh, 110px));
  position: relative;
  overflow: hidden;
}

/* Mídia / Propaganda em Espera */
.tv-media-container {
  background: linear-gradient(145deg, #131d31, #0d1527);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: clamp(12px, 1.8vw, 28px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  height: 100%;
  width: 100%;
  min-height: 0;
}

.tv-media-content {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.tv-media-overlay-text {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  background: linear-gradient(to top, rgba(9, 14, 26, 0.96) 20%, transparent 100%);
  padding: clamp(1rem, 2.5vw, 3rem);
  text-align: left;
}

.tv-media-title {
  font-size: clamp(1.4rem, 2.4vw, 3.2rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: clamp(0.25rem, 0.5vh, 0.8rem);
  text-transform: none;
}

.tv-media-subtitle {
  font-size: clamp(0.95rem, 1.3vw, 1.8rem);
  color: #cbd5e1;
  max-width: 900px;
  text-transform: none;
  line-height: 1.35;
}

/* Barra Lateral da TV (Últimas Chamadas) */
.tv-sidebar {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: clamp(12px, 1.8vw, 28px);
  padding: clamp(0.8rem, 1.4vw, 2rem);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.tv-sidebar-title {
  font-size: clamp(0.95rem, 1.3vw, 1.7rem);
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-bottom: clamp(0.5rem, 1vh, 1rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: clamp(0.5rem, 1vh, 1rem);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.tv-history-list {
  display: flex;
  flex-direction: column;
  gap: clamp(0.45rem, 0.9vh, 0.85rem);
  overflow: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  flex: 1;
  min-height: 0;
  justify-content: flex-start;
}

.tv-history-list::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.tv-history-card {
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: clamp(8px, 1vw, 16px);
  padding: clamp(0.6rem, 1vh, 1.1rem) clamp(0.8rem, 1.2vw, 1.4rem);
  border-left: clamp(4px, 0.5vw, 8px) solid #38bdf8;
  flex-shrink: 0;
}

.tv-history-card.priority {
  border-left-color: #f43f5e;
}

.tv-history-name {
  font-size: clamp(1.05rem, 1.4vw, 1.8rem);
  font-weight: 700;
  color: #ffffff;
  text-transform: none;
}

.tv-history-room {
  font-size: clamp(0.85rem, 1.15vw, 1.4rem);
  color: #ffffff;
  font-weight: 600;
  margin-top: 0.25rem;
  text-transform: none;
}

/* ==========================================================================
   FULL-SCREEN CALL TAKEOVER AUTO-ADAPTÁVEL (TELA CHEIA DINÂMICA)
========================================================================== */
.tv-call-takeover {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, #1e293b, #090e1a);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vmin, 5rem);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

.tv-call-takeover.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.tv-takeover-badge {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.4rem, 0.8vw, 1rem);
  background: rgba(56, 189, 248, 0.18);
  color: #ffffff;
  border: clamp(1.5px, 0.25vw, 3px) solid rgba(56, 189, 248, 0.5);
  padding: clamp(0.4rem, 1vh, 1.1rem) clamp(1.2rem, 2.5vw, 3rem);
  border-radius: 9999px;
  font-size: clamp(0.9rem, 1.6vw, 2.2rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: clamp(1rem, 3vh, 3.5rem);
  flex-shrink: 0;
}

.tv-takeover-badge.priority {
  background: rgba(244, 63, 94, 0.25);
  color: #ffffff;
  border-color: #f43f5e;
}

.tv-takeover-patient {
  font-size: clamp(2.4rem, 6.5vw, 6.8rem);
  font-weight: 900;
  line-height: 1.12;
  color: #ffffff;
  margin-bottom: clamp(1rem, 3vh, 3.5rem);
  text-shadow: 0 10px 40px rgba(0,0,0,0.6);
  word-break: break-word;
  max-width: min(92vw, 1600px);
  text-transform: none;
  animation: pulse-takeover 2s infinite ease-in-out;
  flex-shrink: 1;
}

@keyframes pulse-takeover {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.tv-takeover-room-box {
  background: rgba(255, 255, 255, 0.06);
  border: clamp(2px, 0.35vw, 4px) solid #38bdf8;
  border-radius: clamp(12px, 2vw, 30px);
  padding: clamp(1rem, 2.2vh, 3rem) clamp(2rem, 4.5vw, 6rem);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.25rem, 0.6vh, 0.8rem);
  box-shadow: 0 0 clamp(30px, 5vw, 90px) rgba(56, 189, 248, 0.35);
  max-width: min(92vw, 1400px);
  flex-shrink: 0;
}

.tv-takeover-room-box.priority {
  border-color: #f43f5e;
  box-shadow: 0 0 clamp(30px, 5vw, 90px) rgba(244, 63, 94, 0.45);
}

.tv-takeover-room-name {
  font-size: clamp(1.8rem, 4.2vw, 5rem);
  font-weight: 900;
  color: #ffffff;
  text-transform: none;
}

.tv-takeover-room-box.priority .tv-takeover-room-name {
  color: #ffffff;
}

.tv-takeover-prof-name {
  font-size: clamp(0.95rem, 1.6vw, 2.2rem);
  color: #ffffff;
  text-transform: none;
}

/* ==========================================================================
   ADAPTAÇÃO AUTOMÁTICA PARA TELAS VERTICAIS / TOTENS (9:16 ou 3:4)
========================================================================== */
@media (max-aspect-ratio: 1/1) {
  .tv-main-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 52% 48%;
    gap: 1rem;
    padding: 1rem;
  }

  .tv-media-overlay-text {
    padding: 1.25rem;
  }

  .tv-takeover-patient {
    font-size: clamp(2.2rem, 8vw, 5.5rem);
  }

  .tv-takeover-room-name {
    font-size: clamp(1.6rem, 6vw, 4rem);
  }
}

/* Audio Unlock Overlay & Universal Modals */
.audio-unlock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  text-align: center;
  padding: 2rem;
}

.audio-unlock-overlay[style*="display: none"],
.audio-unlock-overlay[style*="display:none"],
.audio-unlock-overlay.hidden {
  display: none !important;
  pointer-events: none !important;
}

.audio-unlock-btn {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  color: #ffffff;
  border: none;
  font-size: clamp(1.1rem, 1.8vw, 1.8rem);
  font-weight: 800;
  padding: clamp(0.8rem, 1.5vh, 1.5rem) clamp(1.8rem, 3vw, 3.5rem);
  border-radius: var(--radius-xl);
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.4);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.audio-unlock-btn:hover {
  transform: scale(1.05);
}

/* ========================================================
   ADMIN & CUSTOMIZATION PANEL
======================================================== */
.admin-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  max-width: 1440px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
  width: 100%;
}

@media (max-width: 860px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

.admin-nav {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: fit-content;
}

.admin-nav-item {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.15s;
}

.admin-nav-item:hover {
  background: var(--bg-sidebar);
  color: var(--text-main);
}

.admin-nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
}

.color-picker-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.color-input {
  width: 50px;
  height: 45px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  cursor: pointer;
  padding: 2px;
}

/* Rodapé Discreto VoxScreen */
.app-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  width: 100%;
  margin-top: auto;
  user-select: none;
}

.app-footer a {
  color: #94a3b8;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.app-footer a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Selo VoxScreen no canto inferior direito da TV */
.tv-watermark {
  position: fixed;
  bottom: clamp(0.75rem, 1.8vh, 1.5rem);
  right: clamp(1rem, 2vw, 2rem);
  font-size: clamp(0.85rem, 1.1vw, 1.15rem);
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: 0.6px;
  z-index: 99999 !important;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(15, 23, 42, 0.85);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  user-select: none;
}

.tv-watermark .tv-bolt {
  color: #38bdf8;
  font-size: 1.25em;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.75));
}

