/* ==========================================================================
   MODERN SAAS DESIGN SYSTEM - EAZYQUEUE STAFF CONSOLE
   ========================================================================== */

:root {
  --primary-50: #ecfdf5;
  --primary-500: #10b981;
  --primary-600: #059669;
  --primary-700: #047857;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
}

body[data-page="staff"] {
  font-family: 'Plus Jakarta Sans', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f1f5f9;
  color: var(--slate-900);
  margin: 0;
  padding: 0 0 5rem 0;
  min-height: 100vh;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

/* 1. Header Bar */
.staff-header {
  background: var(--slate-900);
  color: #fff;
  border-bottom: 1px solid var(--slate-800);
  padding: 0.85rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

.brand-logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.brand-badge {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.status-container {
  display: flex;
  align-items: center;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.status.connected {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.status.connected::before {
  content: "";
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.status.disconnected {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status.disconnected::before {
  content: "";
  width: 7px;
  height: 7px;
  background: #f59e0b;
  border-radius: 50%;
}

.tv-launch-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: all 0.2s ease;
}

.tv-launch-link:hover {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.4);
  transform: translateY(-1px);
}

.workspace-header-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding-left: 1.1rem;
}

.toolbar-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.header-label {
  font-size: 0.78rem;
  color: var(--slate-400);
  font-weight: 600;
}

.header-select {
  background: var(--slate-800);
  color: #fff;
  border: 1px solid var(--slate-700);
  border-radius: 0.45rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  outline: none;
}

.btn-logout {
  background: transparent;
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 0.45rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
}

/* 2. Global Banners */
.offline-banner {
  background: #fffbeb;
  color: #b45309;
  border-bottom: 1px solid #fde68a;
  padding: 0.65rem 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.error-banner {
  margin: 1.25rem auto 0 auto;
  max-width: 72rem;
  padding: 0.8rem 1.25rem;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
}
.error-banner:empty {
  display: none;
}

/* 3. Main Container */
.staff-main-container {
  max-width: 78rem;
  margin: 1.8rem auto 0 auto;
  padding: 0 1.5rem;
}

/* 4. Login Card (Centered & Polished) */
.login-card {
  max-width: 440px;
  margin: 4.5rem auto;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 1.25rem;
  padding: 2.2rem;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(226, 232, 240, 0.6);
}

.login-header {
  text-align: center;
  margin-bottom: 1.8rem;
}

.login-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.85rem auto;
  background: var(--primary-50);
  color: var(--primary-600);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.login-header h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--slate-900);
}

.login-sub {
  margin: 0.4rem 0 0 0;
  font-size: 0.85rem;
  color: var(--slate-500);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-700);
}

.form-group input,
.form-group select,
.input-styled,
.select-styled {
  background: #ffffff;
  border: 1.5px solid var(--slate-200);
  border-radius: 0.65rem;
  padding: 0.75rem 0.95rem;
  font-size: 0.92rem;
  color: var(--slate-900);
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.input-styled:focus,
.select-styled:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.btn-primary-large {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  border-radius: 0.75rem;
  padding: 0.9rem 1.4rem;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px -4px rgba(16, 185, 129, 0.45);
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.btn-primary-large:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px -4px rgba(16, 185, 129, 0.55);
}

.demo-creds-hint {
  margin-top: 1.5rem;
  padding: 0.75rem 0.95rem;
  background: #f8fafc;
  border: 1px dashed var(--slate-300);
  border-radius: 0.65rem;
  font-size: 0.8rem;
  color: var(--slate-600);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hint-badge {
  font-weight: 800;
  color: #0284c7;
}

/* 5. KPI Stats Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.8rem;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 1rem;
  padding: 1.15rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  box-shadow: 0 4px 15px -3px rgba(15, 23, 42, 0.04);
}

.kpi-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.kpi-icon-box.blue { background: #eff6ff; color: #2563eb; }
.kpi-icon-box.green { background: #ecfdf5; color: #059669; }
.kpi-icon-box.purple { background: #f5f3ff; color: #7c3aed; }

.kpi-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

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

.kpi-value {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--slate-900);
  line-height: 1.1;
}

.token-highlight {
  color: var(--primary-600);
}

.text-status {
  font-size: 1.15rem;
  color: #0284c7;
  text-transform: capitalize;
}

/* 6. Operator Bento Layout */
.dashboard-bento-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.bento-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Common Dash Card */
.dash-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 1.15rem;
  padding: 1.45rem;
  box-shadow: 0 6px 20px -4px rgba(15, 23, 42, 0.04);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-icon {
  font-size: 1.2rem;
}

.card-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--slate-900);
}

.card-hint {
  margin: 0 0 1.15rem 0;
  font-size: 0.84rem;
  color: var(--slate-500);
  line-height: 1.4;
}

/* 7. Calling Station Card Specifics */
.counter-picker-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sub-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-600);
}

.active-token-hero {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 182, 212, 0.06) 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.25);
  border-radius: 0.85rem;
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.1rem;
}

.hero-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.hero-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseDot 1.8s infinite;
}

.hero-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: #065f46;
  letter-spacing: 0.06em;
}

.hero-token-code {
  font-size: 1.45rem;
  font-weight: 900;
  color: #059669;
  letter-spacing: 0.04em;
}

.reason-container {
  margin-bottom: 1.25rem;
}

.reason-container input {
  width: 100%;
  box-sizing: border-box;
}

/* Primary Operator Buttons */
.primary-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.primary-actions-grid button {
  border: none;
  border-radius: 0.85rem;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
}

.primary-actions-grid button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.primary-actions-grid button:active:not(:disabled) {
  transform: translateY(0);
}

.primary-actions-grid button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.btn-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.btn-text strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.btn-text small {
  font-size: 0.72rem;
  opacity: 0.85;
  font-weight: 600;
  margin-top: 0.15rem;
}

/* Hero Button Themes */
.btn-call-next {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 8px 18px -4px rgba(16, 185, 129, 0.4);
}
.btn-call-next:hover:not(:disabled) {
  box-shadow: 0 12px 24px -4px rgba(16, 185, 129, 0.55);
}

.btn-start-service {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 8px 18px -4px rgba(59, 130, 246, 0.4);
}
.btn-start-service:hover:not(:disabled) {
  box-shadow: 0 12px 24px -4px rgba(59, 130, 246, 0.55);
}

.btn-complete {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 8px 18px -4px rgba(99, 102, 241, 0.4);
}
.btn-complete:hover:not(:disabled) {
  box-shadow: 0 12px 24px -4px rgba(99, 102, 241, 0.55);
}

.btn-recall {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  box-shadow: 0 8px 18px -4px rgba(245, 158, 11, 0.4);
}
.btn-recall:hover:not(:disabled) {
  box-shadow: 0 12px 24px -4px rgba(245, 158, 11, 0.55);
}

/* Secondary Actions */
.secondary-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-top: 1px solid var(--slate-100);
  padding-top: 1rem;
}

.sec-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate-400);
  text-transform: uppercase;
}

.btn-subtle {
  background: var(--slate-100);
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
  border-radius: 0.55rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-subtle:hover:not(:disabled) {
  background: var(--slate-200);
  color: var(--slate-900);
}

.btn-danger-soft {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fecaca;
}
.btn-danger-soft:hover:not(:disabled) {
  background: #fee2e2;
  color: #dc2626;
}

/* 8. Counter Session Lifecycle */
.counter-lifecycle-controls {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}

.flex-1 { flex: 1; }

.lifecycle-buttons {
  display: flex;
  gap: 0.65rem;
}

.btn-accent {
  background: #0284c7;
  color: white;
  border: none;
  border-radius: 0.65rem;
  padding: 0.75rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}
.btn-accent:hover:not(:disabled) {
  background: #0369a1;
}

.btn-danger-outline {
  background: transparent;
  color: #ef4444;
  border: 1.5px solid #fca5a5;
  border-radius: 0.65rem;
  padding: 0.75rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-danger-outline:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #ef4444;
}

/* 9. Walk-in Token Generator */
.token-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-emerald-full {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 0.65rem;
  padding: 0.85rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-emerald-full:hover:not(:disabled) {
  filter: brightness(1.05);
}

.issued-token-toast {
  margin-top: 0.85rem;
  font-size: 0.92rem;
  font-weight: 800;
  color: #059669;
  padding: 0.65rem 0.95rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 0.55rem;
  text-align: center;
}
.issued-token-toast:empty {
  display: none;
}

/* 10. Smart TV Remote Card */
.tv-remote-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  border: 1px solid #334155;
}

.tv-remote-card .card-head h3 {
  color: #f8fafc;
}
.tv-remote-card .card-hint {
  color: #94a3b8;
}

.tv-remote-card label {
  color: #cbd5e1;
}

.badge-link {
  font-size: 0.75rem;
  font-weight: 700;
  color: #38bdf8;
  text-decoration: none;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.2rem 0.55rem;
  border-radius: 0.35rem;
}

.tv-remote-form {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.tv-remote-card input,
.tv-remote-card select {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid #475569;
  color: #f8fafc;
}

.btn-blue-full {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  border: none;
  border-radius: 0.65rem;
  padding: 0.85rem;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
}

.tv-status-msg {
  font-size: 0.82rem;
  color: #34d399;
  font-weight: 700;
  margin: 0.4rem 0 0 0;
  text-align: center;
}

/* 11. Supervisor & Recovery Panels */
.badge-audited {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.supervisor-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.85rem 0 1rem 0;
  color: var(--slate-700);
}

.btn-amber-full {
  background: #f59e0b;
  color: white;
  border: none;
  border-radius: 0.65rem;
  padding: 0.8rem;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
}

.w-full { width: 100%; }

/* Responsive adjustments */
@media (max-width: 900px) {
  .dashboard-bento-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .staff-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
  }
  .header-right {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .primary-actions-grid {
    grid-template-columns: 1fr;
  }
  .counter-lifecycle-controls {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================================================
   SMART TV OVERLAY DISPLAY STYLES (1080p / 4K / Widescreen Optimized)
   ========================================================================== */
body.tv-body {
  margin: 0;
  padding: 0;
  max-width: 100vw;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
  background: #06090e;
  color: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  user-select: none;
}

/* 1. Fullscreen Media / Video Layer */
.media-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
  background: #000;
}

.yt-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw; /* 16:9 aspect ratio */
  min-height: 100vh;
  min-width: 177.77vh;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.yt-wrapper iframe, #yt-player {
  width: 100%;
  height: 100%;
  border: none;
}

/* Fallback Ambient Background (when no video is loaded) */
.media-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 40%, #0f172a 0%, #020617 100%);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 6vw;
}

.ambient-glow {
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.04) 50%, transparent 70%);
  animation: floatAmbient 12s ease-in-out infinite alternate;
}

@keyframes floatAmbient {
  0% { transform: translate(-10%, -10%) scale(0.9); }
  100% { transform: translate(15%, 15%) scale(1.15); }
}

.ambient-content {
  position: relative;
  z-index: 2;
  max-width: 50vw;
}

.ambient-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #34d399;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

#ambient-title {
  font-size: clamp(2.5rem, 4.5vw, 4.5rem);
  font-weight: 900;
  margin: 0;
  line-height: 1.1;
  background: linear-gradient(135deg, #f8fafc, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ambient-sub {
  font-size: clamp(1.1rem, 1.6vw, 1.5rem);
  color: #64748b;
  margin-top: 1rem;
}

/* 2. Top-Left Broadcast Status Bar (LIVE Status + Digital Clock + Date) */
.tv-status-bar {
  position: absolute;
  top: 1.2rem;
  left: 1.8rem;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(11, 18, 33, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.live-pill .status {
  background: transparent;
  padding: 0;
  color: #34d399;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.live-pill .status.disconnected {
  color: #f59e0b;
}

.clock-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 0.75rem;
}

.live-clock {
  font-size: 0.95rem;
  font-weight: 800;
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.clock-divider {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.8rem;
}

.live-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
}

/* 3. Glassmorphism TV Overlay Panel (Compact 1/4 Screen) */
.tv-overlay {
  position: absolute;
  top: 1.2rem;
  right: 1.8rem;
  width: clamp(260px, 22vw, 320px); /* Compact 1/4 screen size! */
  max-height: calc(100vh - 5.2rem);
  z-index: 20;
  background: rgba(11, 18, 33, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-sizing: border-box;
}

/* Overlay Header with Branch Name */
.overlay-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.45rem;
  margin-bottom: 0;
}

.branch-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #cbd5e1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 4. Main "Now Serving" Showcase Card */
.serving-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(6, 95, 70, 0.22) 100%);
  border: 1.5px solid rgba(52, 211, 153, 0.35);
  border-radius: 1rem;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.serving-card.called-pulse {
  animation: cardCallPulse 1.2s ease-out;
}

@keyframes cardCallPulse {
  0% { transform: scale(0.97); border-color: #38bdf8; box-shadow: 0 0 35px rgba(56, 189, 248, 0.6); }
  50% { transform: scale(1.02); border-color: #34d399; box-shadow: 0 0 50px rgba(52, 211, 153, 0.8); }
  100% { transform: scale(1); border-color: rgba(52, 211, 153, 0.35); }
}

.card-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.badge-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
}

.badge-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: #6ee7b7;
  text-transform: uppercase;
}

.token-showcase {
  text-align: center;
  padding: 0.2rem 0;
}

.token-caption {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #94a3b8;
  margin-bottom: 0.15rem;
}

.token-huge {
  font-size: clamp(2.8rem, 3.8vw, 3.8rem); /* Compact 1/4 screen size */
  font-weight: 900;
  line-height: 1;
  color: #34d399;
  letter-spacing: 0.03em;
  text-shadow: 0 0 30px rgba(52, 211, 153, 0.4);
}

.counter-highlight {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 0.55rem 0.75rem;
}

.counter-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.counter-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.counter-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #cbd5e1;
  text-transform: uppercase;
}

.counter-name {
  font-size: clamp(1.1rem, 1.4vw, 1.35rem);
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: -0.01em;
}

.service-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
}

.service-prefix {
  color: #94a3b8;
  font-weight: 600;
}

.service-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.72rem;
}

/* Generic Hidden Utility */
.hidden {
  display: none !important;
}

/* 4b. Multi-Counter Stack (Pattern 1 - 2 to 4 Counters) */
.multi-counters-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.counter-stack-card {
  background: rgba(15, 23, 42, 0.72);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.85rem;
  padding: 0.65rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.counter-stack-card.active-counter {
  border-color: rgba(52, 211, 153, 0.35);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.counter-stack-card.called-pulse {
  animation: cardCallPulse 1.2s ease-out;
}

.stack-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stack-counter-name {
  font-size: 0.84rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.02em;
}

.stack-status-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stack-status-badge.state-called {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
  animation: pulseDot 1.5s infinite;
}

.stack-status-badge.state-serving {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.stack-status-badge.state-ready {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.stack-card-body {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.stack-token-number {
  font-size: 1.55rem;
  font-weight: 900;
  color: #34d399;
  letter-spacing: 0.04em;
  line-height: 1;
}

.stack-token-number.empty {
  color: #64748b;
  font-size: 1.1rem;
}

.stack-service-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.07);
  padding: 0.15rem 0.5rem;
  border-radius: 0.35rem;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 5. Upcoming "Next in Line" Queue */
.upcoming-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.95rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.upcoming-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.upcoming-title {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #cbd5e1;
  text-transform: uppercase;
}

.waiting-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.next-tokens-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 2.2rem;
  align-items: center;
}

.next-chip {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fde68a;
  padding: 0.25rem 0.6rem;
  border-radius: 0.55rem;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  transition: all 0.25s ease;
}

.empty-hint {
  color: #64748b;
  font-size: 0.9rem;
  font-style: italic;
}

/* 5. TV Sound Activation Modal (Unmissable Center Prompt) */
.audio-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.audio-modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.audio-modal-card {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.95), rgba(15, 23, 42, 0.98));
  border: 2px solid #3b82f6;
  border-radius: 2rem;
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 650px;
  box-shadow: 0 0 90px rgba(59, 130, 246, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  animation: modalPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-pulse-icon {
  font-size: 3.5rem;
  line-height: 1;
  animation: ringBell 2s infinite ease-in-out;
}

@keyframes ringBell {
  0%, 100% { transform: rotate(0); }
  15%, 45% { transform: rotate(-15deg); }
  30%, 60% { transform: rotate(15deg); }
}

.audio-modal-card h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.tamil-prompt {
  font-size: 1.25rem;
  color: #93c5fd;
  margin: 0;
  line-height: 1.5;
}

.tamil-prompt strong {
  color: #fde047;
  font-weight: 900;
  font-size: 1.4rem;
}

.modal-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-size: 1.35rem;
  font-weight: 900;
  padding: 1.2rem 2.2rem;
  border-radius: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
  animation: btnGlow 1.8s infinite alternate;
  letter-spacing: 0.02em;
}

@keyframes btnGlow {
  0% { transform: scale(1); box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4); }
  100% { transform: scale(1.04); box-shadow: 0 15px 45px rgba(16, 185, 129, 0.7); }
}

/* 6. Bottom Captive Ad / TringoBiz Ticker */
.ad-ticker {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 3.4rem;
  background: rgba(8, 14, 28, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 30;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.ticker-badge {
  background: #e11d48;
  color: white;
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 4px 0 15px rgba(225, 29, 72, 0.4);
}

.ticker-marquee {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  position: relative;
}

.ticker-content {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 35s linear infinite;
  font-size: 1.15rem;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.02em;
}

@keyframes marquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

/* Responsive adjustments for 720p / Tablets */
@media (max-width: 900px) {
  .tv-overlay {
    width: 92vw;
    right: 4vw;
    top: 1rem;
    max-height: calc(100vh - 4.5rem);
  }
}

/* 7. Floating Entertainment Channel Switcher (Top Left) */
.tv-channel-bar {
  position: absolute;
  top: 1.2rem;
  left: 1.8rem;
  z-index: 25;
}

.tv-toast {
  position: fixed;
  bottom: 4.5rem;
  left: 2rem;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  z-index: 50;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transition: opacity 0.3s ease, transform 0.3s ease;
  animation: toastSlideUp 0.3s ease;
}

.tv-toast.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes toastSlideUp {
  0% { transform: translateY(15px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   7. Customer Turn Advance Intimation Alert Banner (2 Tokens Ahead)
   ========================================================================== */
.intimation-alert-card {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.4), rgba(15, 23, 42, 0.7));
  border: 1.5px solid #3b82f6;
  border-radius: 1.25rem;
  padding: 1rem 1.4rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2);
  animation: modalPop 0.35s ease;
}

.intimation-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 1rem;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.intimation-info {
  flex: 1;
}

.intimation-info strong {
  display: block;
  font-size: 1.05rem;
  color: #60a5fa;
  margin-bottom: 0.2rem;
}

.intimation-info p {
  margin: 0;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.intimation-action-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-wa-alert {
  background: #25D366;
  color: #ffffff;
  padding: 0.65rem 1.1rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-wa-alert:hover {
  background: #1ebd5a;
  transform: translateY(-1px);
}

.btn-dismiss-alert {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 0.5rem;
}

.btn-dismiss-alert:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* ==========================================================================
   8. Smart TV Mobile QR Token Kiosk Card & SVG Showcase
   ========================================================================== */
.qr-tv-showcase {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(6, 78, 59, 0.4) 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  border-radius: 1.25rem;
  padding: 1rem 1.1rem;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 20px rgba(16, 185, 129, 0.15);
}

.qr-tv-left {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.qr-tv-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  width: fit-content;
  margin-bottom: 0.35rem;
}

.qr-tv-title {
  font-size: 0.95rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin: 0 0 0.15rem 0;
}

.qr-tv-tamil {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0 0 0.4rem 0;
  line-height: 1.2;
}

.qr-tv-url {
  font-family: monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: #6ee7b7;
}

.qr-tv-code-box {
  width: 90px;
  height: 90px;
  background: #ffffff;
  border-radius: 0.75rem;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.qr-tv-svg {
  width: 100%;
  height: 100%;
  display: block;
}
