/* ═══════════════════════════════════════════════════════════
   IGAL Queue Management — Premium Medical UI v2
   Design: Clinical depth with teal accent system
   Fonts: DM Sans (display) + JetBrains Mono (ticket numbers)
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&family=JetBrains+Mono:wght@600;700;800&display=swap');

/* ── Custom Properties ── */
:root {
  --iq-font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --iq-mono: 'JetBrains Mono', 'SF Mono', monospace;

  --iq-navy-900: #0a1628;
  --iq-navy-800: #111d35;
  --iq-navy-700: #1a2844;
  --iq-navy-600: #243454;
  --iq-slate-400: #7e8da4;
  --iq-slate-300: #a4b1c5;
  --iq-slate-200: #c8d1de;
  --iq-slate-100: #e8ecf2;
  --iq-slate-50: #f4f6f9;

  --iq-teal-500: #14b8a6;
  --iq-teal-400: #2dd4bf;
  --iq-teal-300: #5eead4;
  --iq-teal-glow: rgba(20, 184, 166, 0.25);

  --iq-green-glow: rgba(34, 197, 94, 0.15);
  --iq-red-500: #ef4444;
  --iq-red-glow: rgba(239, 68, 68, 0.15);

  --iq-border: rgba(20, 30, 55, 0.08);
  --iq-border-strong: rgba(20, 30, 55, 0.14);

  --iq-shadow-sm: 0 1px 3px rgba(10,22,40,.06), 0 1px 2px rgba(10,22,40,.04);
  --iq-shadow-md: 0 4px 16px rgba(10,22,40,.08), 0 2px 6px rgba(10,22,40,.04);
  --iq-shadow-lg: 0 12px 40px rgba(10,22,40,.1), 0 4px 12px rgba(10,22,40,.06);
  --iq-shadow-glow: 0 0 30px var(--iq-teal-glow), 0 4px 16px rgba(10,22,40,.08);

  --iq-radius-sm: 10px;
  --iq-radius-md: 14px;
  --iq-radius-lg: 20px;
  --iq-radius-xl: 28px;
  --iq-radius-full: 999px;

  --iq-ease: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --iq-ease-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --iq-ease-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ═══════════════ BASE ═══════════════ */

.iq {
  font-family: var(--iq-font);
  padding: 20px;
  color: var(--iq-navy-900);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.iq *, .iq *::before, .iq *::after { box-sizing: border-box; }

/* ═══════════════ CARD ═══════════════ */

.iq-card {
  max-width: 980px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--iq-radius-xl);
  box-shadow: var(--iq-shadow-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--iq-border);
  animation: iqFadeUp .5s cubic-bezier(.22,1,.36,1) both;
}
.iq-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--iq-teal-500), var(--iq-teal-300), #3b82f6);
}
@keyframes iqFadeUp {
  from { opacity:0; transform:translateY(16px) }
  to   { opacity:1; transform:translateY(0) }
}

/* ═══════════════ TYPOGRAPHY ═══════════════ */

.iq-title {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--iq-navy-900);
}
.iq-subtitle {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--iq-navy-700);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding-left: 14px;
  position: relative;
}
.iq-subtitle::before {
  content: '';
  position: absolute;
  left: 0; top: 2px; bottom: 2px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--iq-teal-500), var(--iq-teal-300));
}
.iq-muted {
  color: var(--iq-slate-400);
  font-size: 14px;
}
.iq-label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--iq-navy-600);
}

/* ═══════════════ FORMS ═══════════════ */

.iq-input, .iq-select {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--iq-radius-md);
  border: 1.5px solid var(--iq-slate-200);
  font-size: 15px;
  font-family: var(--iq-font);
  color: var(--iq-navy-900);
  background: var(--iq-slate-50);
  transition: border-color var(--iq-ease), box-shadow var(--iq-ease), background var(--iq-ease);
  outline: none;
  appearance: none; -webkit-appearance: none;
}
.iq-input:focus, .iq-select:focus {
  border-color: var(--iq-teal-500);
  background: #fff;
  box-shadow: 0 0 0 3px var(--iq-teal-glow);
}
.iq-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237e8da4' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* ═══════════════ BUTTONS ═══════════════ */

.iq-btn {
  border: 0;
  border-radius: var(--iq-radius-md);
  padding: 13px 22px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--iq-font);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--iq-ease);
  position: relative;
  overflow: hidden;
}
.iq-btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.12) 0%, transparent 100%);
  pointer-events: none;
}
.iq-btn:active { transform: scale(.97); }

.iq-btn-primary {
  background: linear-gradient(135deg, var(--iq-navy-800), var(--iq-navy-700));
  color: #fff;
  box-shadow: 0 2px 8px rgba(10,22,40,.25);
}
.iq-btn-primary:hover {
  background: linear-gradient(135deg, var(--iq-navy-700), var(--iq-navy-600));
  box-shadow: 0 4px 20px rgba(10,22,40,.3), 0 0 20px var(--iq-teal-glow);
  transform: translateY(-1px);
  color: #fff;
}
.iq-btn-secondary {
  background: var(--iq-slate-50);
  color: var(--iq-navy-800);
  border: 1.5px solid var(--iq-border-strong);
  box-shadow: var(--iq-shadow-sm);
}
.iq-btn-secondary:hover {
  background: var(--iq-slate-100);
  border-color: var(--iq-slate-300);
  box-shadow: var(--iq-shadow-md);
  transform: translateY(-1px);
}
.iq-btn-danger {
  background: linear-gradient(135deg, #dc2626, var(--iq-red-500));
  color: #fff;
  box-shadow: 0 2px 8px var(--iq-red-glow);
}
.iq-btn-danger:hover {
  box-shadow: 0 6px 24px var(--iq-red-glow);
  transform: translateY(-1px);
}
.iq-btn-disabled { opacity:.45; pointer-events:none; filter:grayscale(.3); }

.iq-actions { display:flex; gap:10px; margin-top:14px; flex-wrap:wrap; }

/* ═══════════════ ALERTS ═══════════════ */

.iq-alert {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--iq-radius-md);
  font-size: 14px;
  font-weight: 500;
  animation: iqSlideIn .3s cubic-bezier(.22,1,.36,1) both;
}
@keyframes iqSlideIn {
  from { opacity:0; transform:translateY(-6px) }
  to   { opacity:1; transform:translateY(0) }
}
.iq-alert-success {
  background: var(--iq-green-glow);
  color: #065f46;
  border: 1px solid rgba(34,197,94,.2);
}
.iq-alert-error {
  background: var(--iq-red-glow);
  color: #7f1d1d;
  border: 1px solid rgba(239,68,68,.2);
}
.iq-hide { display:none!important; }

/* ═══════════════ QR / KIOSK ═══════════════ */

.iq-qr-wrap { display:flex; justify-content:center; margin:24px 0; }
.iq-qr-img {
  border-radius: var(--iq-radius-lg);
  border: 2px solid var(--iq-slate-100);
  padding: 12px;
  background: #fff;
  box-shadow: var(--iq-shadow-md);
  transition: transform var(--iq-ease-spring), box-shadow var(--iq-ease);
}
.iq-qr-img:hover {
  transform: scale(1.03);
  box-shadow: var(--iq-shadow-glow);
}

.iq-kiosk .iq-card { text-align:center; max-width:480px; padding:40px 32px; }
.iq-kiosk .iq-title { font-size:28px; }
.iq-kiosk .iq-actions { justify-content:center; }
.iq-kiosk .iq-label, .iq-kiosk .iq-select { text-align:left; }

/* ═══════════════ TAKE TICKET ═══════════════ */

.iq-take .iq-card { max-width:440px; text-align:center; padding:40px 32px; }
.iq-take .iq-title { font-size:28px; }
.iq-take .iq-label, .iq-take .iq-select { text-align:left; }
.iq-take .iq-btn-primary {
  width:100%; padding:16px; font-size:17px;
  margin-top:18px; border-radius:var(--iq-radius-lg);
}

.iq-result { text-align:center; padding:16px; }
.iq-ticket-code {
  font-family: var(--iq-mono);
  font-size: 56px;
  font-weight: 800;
  margin-top: 12px;
  letter-spacing: 2px;
  color: #0a1628;
  animation: iqPopIn .5s var(--iq-ease-spring) both;
}
@keyframes iqPopIn {
  from { opacity:0; transform:scale(.8) }
  to   { opacity:1; transform:scale(1) }
}
.iq-note {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: var(--iq-radius-md);
  background: linear-gradient(135deg, rgba(20,184,166,.06), rgba(59,130,246,.04));
  border: 1px solid rgba(20,184,166,.12);
  color: var(--iq-navy-700);
  font-size: 14px;
  text-align: center;
}

/* Force light theme on Take Ticket / Kiosk pages — phones with system dark mode
   would otherwise make white cards unreadable. Force readable colors regardless. */
.iq-take, .iq-kiosk {
  color-scheme: light;
}
.iq-take .iq-card, .iq-kiosk .iq-card {
  background: #ffffff !important;
  color: #0a1628 !important;
}
.iq-take .iq-title, .iq-kiosk .iq-title { color: #0a1628 !important; }
.iq-take .iq-muted, .iq-kiosk .iq-muted { color: #7e8da4 !important; }
.iq-take .iq-ticket-code { color: #0a1628 !important; }
.iq-take .iq-ticket-doctor { color: #14b8a6 !important; font-weight: 600; }
.iq-take .iq-note { color: #1a2844 !important; }

/* ═══════════════ DOCTOR PANEL — TOPBAR ═══════════════ */

.iq-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.iq-badge {
  background: linear-gradient(135deg, var(--iq-teal-500), var(--iq-teal-400));
  color: #fff;
  padding: 7px 16px;
  border-radius: var(--iq-radius-full);
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 2px 8px var(--iq-teal-glow);
}
.iq-link {
  background: transparent;
  border: 0;
  color: var(--iq-slate-400);
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--iq-font);
  transition: color var(--iq-ease);
  padding: 4px 8px;
  border-radius: var(--iq-radius-sm);
}
.iq-link:hover { color:var(--iq-red-500); background:var(--iq-red-glow); }

/* ═══════════════ STATS ═══════════════ */

.iq-stats { display:flex; gap:14px; margin:18px 0; flex-wrap:wrap; }
.iq-stat {
  border: 1.5px solid var(--iq-border);
  border-radius: var(--iq-radius-lg);
  padding: 16px 20px;
  min-width: 200px;
  background: linear-gradient(160deg, var(--iq-slate-50), #fff);
  position: relative;
  overflow: hidden;
  transition: all var(--iq-ease);
}
.iq-stat::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 60px; height: 60px;
  background: radial-gradient(circle, var(--iq-teal-glow), transparent 70%);
  opacity: .5;
}
.iq-stat:hover { border-color:var(--iq-teal-500); box-shadow:var(--iq-shadow-md); }
.iq-stat-label {
  color: var(--iq-slate-400);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.iq-stat-value {
  font-family: var(--iq-mono);
  font-size: 32px;
  font-weight: 800;
  margin-top: 6px;
  color: var(--iq-navy-900);
}

/* ═══════════════ GRID (Current + Waiting) ═══════════════ */

.iq-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-top:18px; }
@media(max-width:860px){ .iq-grid{ grid-template-columns:1fr; } }
.iq-col { min-width:0; }

.iq-current {
  border: 2px solid var(--iq-border);
  border-radius: var(--iq-radius-lg);
  padding: 24px 20px;
  text-align: center;
  background: linear-gradient(160deg, #fafcff, var(--iq-slate-50));
  transition: all var(--iq-ease);
}
.iq-current:hover { border-color:var(--iq-teal-500); box-shadow:var(--iq-shadow-glow); }
.iq-current-code {
  font-family: var(--iq-mono);
  font-size: 52px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--iq-navy-900);
}
.iq-current-status {
  margin-top: 8px;
  color: var(--iq-slate-400);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ═══════════════ WAITING LIST ═══════════════ */

.iq-list {
  border: 1.5px solid var(--iq-border);
  border-radius: var(--iq-radius-lg);
  padding: 12px;
  min-height: 180px;
  background: var(--iq-slate-50);
  max-height: 400px;
  overflow-y: auto;
}
.iq-list::-webkit-scrollbar { width:6px; }
.iq-list::-webkit-scrollbar-track { background:transparent; }
.iq-list::-webkit-scrollbar-thumb { background:var(--iq-slate-200); border-radius:3px; }

.iq-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  border-radius: var(--iq-radius-sm);
  transition: all var(--iq-ease-fast);
  margin-bottom: 4px;
}
.iq-row:last-child { margin-bottom:0; }
.iq-row:nth-child(odd) { background:rgba(255,255,255,.7); }
.iq-row:hover { background:rgba(20,184,166,.06); transform:translateX(3px); }
.iq-row-code {
  font-family: var(--iq-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--iq-navy-800);
}
.iq-row-time { font-size:12px; color:var(--iq-slate-400); white-space:nowrap; }

/* ═══════════════ LOGIN ═══════════════ */

.iq-login {
  max-width: 360px;
  animation: iqFadeUp .4s cubic-bezier(.22,1,.36,1) .1s both;
}

/* ═══════════════ TV DISPLAY ═══════════════ */

.iq-display { padding:0; zoom: 0.85; }
.iq-display-card {
  max-width: 100%;
  border-radius: 0;
  padding: 20px 36px 16px;
  background: linear-gradient(160deg, var(--iq-navy-900) 0%, var(--iq-navy-800) 40%, #0f2138 100%);
  color: #fff;
  box-shadow: none;
  border: 0;
  position: relative;
  overflow: hidden;
}
.iq-display-card::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(20,184,166,.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(59,130,246,.06) 0%, transparent 50%),
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  pointer-events: none;
}
.iq-display .iq-title {
  color: rgba(255,255,255,.5);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

/* 75 / 25 layout — compact for TV */
.iq-display-layout {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}
.iq-display-main { flex: 1 1 auto; }
.iq-display-side { flex: 0 0 260px; }
.iq-display-ad {
  flex: 0 0 280px;
  border-radius: var(--iq-radius-md);
  overflow: hidden;
  align-self: stretch;
  min-height: 300px;
}
.iq-display-ad > * { width: 100%; height: 100%; }
@media(max-width:960px){
  .iq-display-layout{ flex-direction:column; }
  .iq-display-main,.iq-display-side,.iq-display-ad{ flex:1 1 auto; }
  .iq-display-card{ padding:16px; }
}

.iq-display-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.iq-display-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  border-radius: var(--iq-radius-md);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}

.iq-display-doctor {
  font-size: 26px;
  font-weight: 700;
  color: rgba(255,255,255,.7);
}
.iq-display-row.iq-row-accepting .iq-display-doctor {
  color: #4ade80;
}
.iq-display-code {
  font-family: var(--iq-mono);
  font-size: 56px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
}

/* Active row highlight */
.iq-display-row.iq-row-active {
  background: rgba(20,184,166,.1);
  border-color: rgba(20,184,166,.25);
}
.iq-display-row.iq-row-active .iq-display-code {
  color: var(--iq-teal-300);
}

.iq-display-footer {
  margin-top: 14px;
  text-align: center;
  color: rgba(255,255,255,.3);
  font-size: 16px;
  letter-spacing: .04em;
  position: relative;
  z-index: 1;
}

/* ═══════════════ SIDEBAR (TV) ═══════════════ */

.iq-side-box {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--iq-radius-md);
  padding: 14px;
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.iq-side-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
  letter-spacing: .12em;
}
.iq-side-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 400px;
  overflow: auto;
}
.iq-side-list::-webkit-scrollbar { width:4px; }
.iq-side-list::-webkit-scrollbar-track { background:transparent; }
.iq-side-list::-webkit-scrollbar-thumb { background:rgba(255,255,255,.12); border-radius:3px; }

.iq-side-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.04);
  transition: all var(--iq-ease-fast);
}
.iq-side-row:hover { background:rgba(255,255,255,.07); }
.iq-side-code {
  font-family: var(--iq-mono);
  font-weight: 700;
  font-size: 22px;
  color: rgba(255,255,255,.85);
}
.iq-side-time {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,.4);
  white-space: nowrap;
  font-family: var(--iq-mono);
}

.iq-display .iq-muted { color:rgba(255,255,255,.3); }

/* ═══════════════ PRINT — Thermal 72x100mm ═══════════════ */

@page {
  size: 72mm 100mm;
  margin: 0;
}

@media print {
  /* Hide everything */
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 72mm !important;
    height: 100mm !important;
    background: #fff !important;
  }
  body * {
    visibility: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Show only the print ticket */
  #iq-kiosk-print,
  #iq-kiosk-print *,
  #iq-kiosk-print .iq-print-inner,
  #iq-kiosk-print .iq-print-inner * {
    visibility: visible !important;
  }

  #iq-kiosk-print {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 72mm !important;
    height: 100mm !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    z-index: 999999 !important;
  }

  .iq-card {
    box-shadow: none !important;
    border: 0 !important;
    background: #fff !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }

  /* No page breaks inside the ticket */
  #iq-kiosk-print,
  #iq-kiosk-print .iq-print-inner {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    page-break-before: avoid !important;
    page-break-after: avoid !important;
  }
}

.iq-print-inner {
  width: 62mm;
  margin: 0 auto;
  text-align: center;
  padding: 4mm 2mm;
}
.iq-print-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 2mm;
  color: #000;
}
.iq-print-big {
  font-family: var(--iq-mono);
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 2px;
  margin: 3mm 0;
  color: #000;
}
.iq-print-doctor {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 2mm;
}
.iq-print-small {
  font-size: 11px;
  margin-top: 2mm;
  color: #333;
}

/* Doctor name on QR take-ticket page */
.iq-ticket-doctor {
  font-size: 15px;
  font-weight: 600;
  color: var(--iq-muted, #64748b);
  margin-top: 6px;
  margin-bottom: 2px;
}

/* ═══════════════ RESPONSIVE ═══════════════ */

@media(max-width:600px){
  .iq-card{ padding:24px 18px; }
  .iq-kiosk .iq-card, .iq-take .iq-card{ padding:28px 20px; }
  .iq-title{ font-size:22px; }
  .iq-current-code{ font-size:40px; }
  .iq-ticket-code{ font-size:44px; }
  .iq-stat{ min-width:160px; }
  .iq-display-code{ font-size:28px; }
  .iq-display-doctor{ font-size:15px; }
  .iq-display-row{ padding:12px 16px; }
}

/* Site Logo */
.iq-site-logo {
  text-align: center;
  margin-bottom: 20px;
}
.iq-site-logo img {
  max-height: 80px;
  max-width: 100%;
  width: auto;
  display: inline-block;
}

/* Accepting toggle button */
.iq-btn-accepting {
  width: 100%;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  border: 2px solid var(--iq-success, #22c55e);
  background: rgba(34,197,94,0.12);
  color: var(--iq-success, #22c55e);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}
.iq-btn-accepting.iq-not-accepting {
  border-color: var(--iq-danger, #ef4444);
  background: rgba(239,68,68,0.12);
  color: var(--iq-danger, #ef4444);
}
.iq-btn-accepting:hover {
  opacity: 0.85;
}

/* Accepting toggle */
.iq-accepting-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: #e8f5e9;
  border-radius: 10px;
  border: 1.5px solid #a5d6a7;
  transition: background 0.3s, border-color 0.3s;
}
.iq-accepting-wrap.iq-accepting-off {
  background: #fce4ec;
  border-color: #f48fb1;
}
.iq-accepting-label {
  font-size: 15px;
  font-weight: 600;
  color: #1b5e20;
  flex: 1;
}
.iq-accepting-off .iq-accepting-label {
  color: #880e4f;
}
.iq-toggle {
  position: relative;
  width: 52px;
  height: 28px;
  background: #43a047;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.3s;
  padding: 0;
  flex-shrink: 0;
}
.iq-toggle.iq-toggle-off {
  background: #e53935;
}
.iq-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.25s;
  pointer-events: none;
}
.iq-toggle.iq-toggle-off .iq-toggle-knob {
  left: 27px;
}

/* Doctor name on ticket (print) */
.iq-print-doctor {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  text-align: center;
  margin: 2px 0 6px;
  letter-spacing: 0.02em;
}

/* Doctor name on QR take-ticket result */
.iq-ticket-doctor {
  font-size: 15px;
  font-weight: 600;
  color: #1a3a5c;
  text-align: center;
  margin: 4px 0 8px;
}

/* Takeover — other doctor patients */
.iq-row-other {
  opacity: 0.65;
  border-color: rgba(255,255,255,.06);
}
.iq-row-other:hover {
  opacity: 1;
}
.iq-btn-takeover {
  flex-shrink: 0;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--iq-sans);
  background: transparent;
  color: var(--iq-teal-400, #2dd4bf);
  border: 1.5px solid var(--iq-teal-400, #2dd4bf);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.iq-btn-takeover:hover {
  background: var(--iq-teal-400, #2dd4bf);
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   LIVE DASHBOARD — Manager View
   ═══════════════════════════════════════════════════════════ */
.iq-dashboard { max-width: 960px; margin: 0 auto; padding: 24px 20px; }
.iq-dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.iq-dash-title { font-family: var(--iq-font); font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: var(--iq-navy-900); margin: 0; }
.iq-dash-clock { font-family: var(--iq-mono); font-size: 20px; font-weight: 700; color: var(--iq-slate-400); letter-spacing: 0.05em; }
.iq-dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 28px; }
.iq-dash-stat { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 16px; background: #fff; border: 1px solid var(--iq-border); border-radius: var(--iq-radius-lg); box-shadow: var(--iq-shadow-sm); transition: all 0.3s ease; }
.iq-dash-stat-primary { background: linear-gradient(135deg, var(--iq-navy-800), var(--iq-navy-700)); border: none; color: #fff; }
.iq-dash-stat-primary .iq-dash-stat-label { color: rgba(255,255,255,.5); }
.iq-dash-stat-primary .iq-dash-stat-icon { background: rgba(255,255,255,.1); color: var(--iq-teal-400); }
.iq-dash-stat-warning { border-color: rgba(245,158,11,.3) !important; background: rgba(245,158,11,.04) !important; }
.iq-dash-stat-danger { border-color: rgba(239,68,68,.3) !important; background: rgba(239,68,68,.04) !important; }
.iq-dash-stat-icon { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--iq-teal-glow); color: var(--iq-teal-500); margin-bottom: 12px; }
.iq-dash-icon-blue { background: rgba(59,130,246,.1); color: #3b82f6; }
.iq-dash-icon-green { background: rgba(34,197,94,.1); color: #22c55e; }
.iq-dash-icon-amber { background: rgba(245,158,11,.1); color: #f59e0b; }
.iq-dash-stat-value { font-family: var(--iq-mono); font-size: 32px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.iq-dash-stat-value small { font-size: 14px; font-weight: 500; opacity: .5; }
.iq-dash-stat-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--iq-slate-400); margin-top: 6px; }
.iq-dash-doctors { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 24px; }
.iq-dash-doc { padding: 20px; background: #fff; border: 1px solid var(--iq-border); border-radius: var(--iq-radius-lg); box-shadow: var(--iq-shadow-sm); transition: all 0.3s ease; }
.iq-dash-doc:hover { box-shadow: var(--iq-shadow-md); }
.iq-dash-doc-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.iq-dash-doc-status { width: 12px; height: 12px; border-radius: 50%; background: var(--iq-slate-300); flex-shrink: 0; transition: all 0.3s ease; }
.iq-dash-doc-active .iq-dash-doc-status { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,.4); }
.iq-dash-doc-paused .iq-dash-doc-status { background: #f59e0b; box-shadow: 0 0 8px rgba(245,158,11,.3); }
.iq-dash-doc-offline .iq-dash-doc-status { background: var(--iq-slate-300); }
.iq-dash-doc-offline { opacity: .5; }
.iq-dash-doc-name { font-size: 15px; font-weight: 700; color: var(--iq-navy-900); }
.iq-dash-doc-current { font-family: var(--iq-mono); font-size: 28px; font-weight: 800; color: var(--iq-navy-800); text-align: center; padding: 12px 0; margin-bottom: 12px; background: var(--iq-slate-50); border-radius: var(--iq-radius-sm); letter-spacing: 0.02em; }
.iq-dash-doc-active .iq-dash-doc-current { background: linear-gradient(135deg, rgba(20,184,166,.08), rgba(34,197,94,.06)); color: var(--iq-teal-500); }
.iq-dash-doc-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.iq-dash-doc-tag { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 8px; background: var(--iq-slate-50); color: var(--iq-slate-400); letter-spacing: 0.02em; }
.iq-dash-doc-tag-done { background: rgba(34,197,94,.08); color: #16a34a; }
.iq-dash-doc-tag-time { background: rgba(59,130,246,.08); color: #3b82f6; }
.iq-dash-footer { text-align: center; padding: 16px; font-size: 14px; color: var(--iq-slate-400); }
.iq-dash-footer strong { font-family: var(--iq-mono); font-weight: 800; color: var(--iq-navy-900); font-size: 18px; }
@media (max-width: 600px) { .iq-dash-stats { grid-template-columns: repeat(2, 1fr); } .iq-dash-doctors { grid-template-columns: 1fr; } .iq-dash-stat-value { font-size: 24px; } }
