:root {
  --bg-start: #0a2a4a;
  --bg-end: #0f3d6e;
  --card-bg: #1b4f8a;
  --card-border: rgba(255, 255, 255, 0.15);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.7);
  --badge-green: #2ecc71;
  --badge-yellow: #f1c40f;
  --badge-gray: #95a5a6;
}

html, body {
  /* height: 100%; */
}

body {
  /* font-family: "Fjalla One", "Arial Narrow", Arial, sans-serif; */
  font-family: "Trebuchet MS", Tahoma, sans-serif;
  background: radial-gradient(circle at top left, #1b5fa1 0%, var(--bg-start) 45%),
    linear-gradient(135deg, var(--bg-start), var(--bg-end));
  color: var(--text);
}

.dashboard-container {
  min-height: 100vh;
  padding: 24px 32px 40px;
}

.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.header-title {
  font-size: 40px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.list-controls {
  display: flex;
  gap: 8px;
}

.sound-btn.sound-pending {
  background: #f1c40f;
  border-color: #f1c40f;
  color: #0b1f35;
  box-shadow: 0 0 0 0 rgba(241, 196, 15, 0.7);
  animation: soundPulse 1.4s ease-in-out infinite;
}

.sound-btn.sound-active {
  background: #2ecc71;
  border-color: #2ecc71;
  color: #0b1f35;
  box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.35);
}

@keyframes soundPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(241, 196, 15, 0.7);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(241, 196, 15, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(241, 196, 15, 0);
  }
}

.updated-at {
  font-size: 18px;
  color: var(--muted);
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-row.kpi-row-single {
  grid-template-columns: minmax(0, 1fr);
}

.kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 18px 20px;
  min-height: 110px;
}

.kpi-card.kpi-compact {
  min-height: auto;
  padding: 14px 16px;
}

.kpi-title {
  text-transform: uppercase;
  font-size: 16px;
  color: var(--muted);
  letter-spacing: 1px;
}

.kpi-value {
  font-size: 32px;
  margin-top: 8px;
}

.cards-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 16px;
}
#kpiAvg{
    font-size: 50px !important;
}
.card-panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 20px;
  min-height: 260px;
}

.card-status {
  order: 1;
}

.card-queue {
  order: 2;
}

.card-inservice {
  order: 3;
}

.status-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.status-title {
  margin-bottom: 12px;
  margin-top: 6px;
}

.badge-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #0b1f35;
}

.badge-green {
  background: var(--badge-green);
}

.badge-yellow {
  background: var(--badge-yellow);
}

.badge-gray {
  background: var(--badge-gray);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.status-box {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}

.status-label {
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.status-value {
  font-size: 34px;
  margin-top: 6px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.list-item:last-child {
  border-bottom: none;
}

.list-primary {
  font-size: 18px;
}

.list-count {
  font-size: 28px;
  font-weight: 700;
}

.list-secondary {
  font-size: 14px;
  color: var(--muted);
}

.nps-section {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.nps-title {
  margin-bottom: 12px;
  font-size: 18px;
}

.nps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.nps-item {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}

.nps-label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.nps-value {
  font-size: 30px;
  margin-top: 6px;
}

.nps-promoters .nps-value {
  color: #7bf57b;
}

.nps-neutrals .nps-value {
  color: #f1c40f;
}

.nps-detractors .nps-value {
  color: #ff6b6b;
}

.nps-total {
  font-size: 14px;
  color: var(--muted);
  text-align: right;
}

.status-online {
  color: #7bf57b;
}

.status-offline {
  color: #ff7373;
}

.status-away {
  color: #ffd600;
}

.queue-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.queue-item:last-child {
  border-bottom: none;
}

.queue-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 30, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.loading-overlay.active {
  display: flex;
}

.loading-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 24px 32px;
  font-size: 18px;
}

.error-banner {
  display: none;
  background: rgba(231, 76, 60, 0.2);
  border: 1px solid rgba(231, 76, 60, 0.5);
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.error-banner.active {
  display: block;
}
.tec-online{
  color:#7bf57b;
}
.tec-offline{
  color:#ff7373;
}
.tec-away{
  color:#ffd600;
}
.kpi-atendimento{
  color: #9fdef7;
}
.kpi-fila{
  
  color:#ffb733 ;
}
.kpi-espera{
  color: yellow;
}
.kpi-fila-t{
  display: inline;
  font-weight: bolder;
  color: #ffb733;
  font-size: 54px;
}
@media (max-width: 1200px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .kpi-row {
    grid-template-columns: 1fr;
  }

  .status-kpis {
    grid-template-columns: 1fr;
  }

  .nps-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-title {
    font-size: 28px;
  }

  .kpi-value {
    font-size: 24px;
  }

  .status-value {
    font-size: 26px;
  }
}
