/* NCS Interactive Demo V2 — Exact Theme Tokens & Layout Fidelity from NCS Production (theme-system.css, ncs-premium.css, app.css) */

@property --ncs-urgent-orbit-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes ncs-urgent-border-orbit {
  to { --ncs-urgent-orbit-angle: 360deg; }
}

@keyframes pulse-live {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.22); opacity: 0.65; }
}

:root,
html[data-theme="light"] {
  color-scheme: light;
  --ncs-navy: #001030;
  --ncs-sidebar-end: #09234B;
  --ncs-gold: #E9B526;
  --ncs-radius: 12px;
  --ncs-control: 38px;
  --ncs-gap: 12px;
  --sidebar: 262px;

  --theme-background: #F8FAFD;
  --theme-background-alt: #F5F7FA;
  --theme-surface: #FFFFFF;
  --theme-surface-soft: #F5F7FA;
  --theme-surface-raised: #FFFFFF;
  --theme-primary: #2269C6;
  --theme-primary-hover: #1855A8;
  --theme-primary-soft: #EFF2F6;
  --theme-secondary: #55708D;
  --theme-text: #001030;
  --theme-text-soft: #55708D;
  --theme-border: #DDE5F0;
  --theme-success: #168454;
  --theme-warning: #946E00;
  --theme-danger: #D95C5C;
  --theme-gold: var(--ncs-gold);
  --theme-info: #2269C6;
  --theme-shadow: 0 6px 20px rgb(0 16 48 / 6%);
  --theme-shadow-soft: 0 2px 9px rgb(0 16 48 / 5%);
  --theme-focus: 0 0 0 3px rgb(34 105 198 / 20%);

  --ncs-row: #FFFFFF;
  --ncs-row-alt: #F6F7F9;
  --ncs-hover: #E9EDF2;
  --ncs-hover-line: #8294AA;
  --ncs-queue-blue: linear-gradient(180deg, color-mix(in srgb, #2269C6 92%, #FFFFFF), #2269C6 25%, color-mix(in srgb, #2269C6 88%, #001030));
  --ncs-queue-polish: linear-gradient(180deg, color-mix(in srgb, var(--theme-primary) 90%, #F5F7FA) 0%, var(--theme-primary) 24%, color-mix(in srgb, var(--theme-primary) 86%, #001030) 100%);
  --ncs-queue-shadow: inset 0 1px 1px rgb(245 247 250 / 30%), inset 0 -1px 3px rgb(0 16 48 / 22%), 0 2px 6px color-mix(in srgb, var(--theme-primary) 22%, transparent);
  --ncs-urgent-bottom: var(--theme-surface-soft);
  --ncs-urgent-background: radial-gradient(ellipse 100px 42px at 0 0, rgb(233 181 38 / 22%), transparent 78%), radial-gradient(ellipse 100px 42px at 100% 0, rgb(233 181 38 / 22%), transparent 78%), linear-gradient(160deg, var(--theme-surface-soft), var(--ncs-urgent-bottom));
  --ncs-urgent-shadow: inset 0 1px rgb(240 215 154 / 48%), inset 0 0 14px rgb(233 181 38 / 7%), 0 0 12px rgb(233 181 38 / 20%), 0 3px 9px rgb(0 16 48 / 10%);

  --hc-field: #FFFFFF;
  --hc-heading: #F5F7FA;
  --bg: var(--theme-background);
  --surface: var(--theme-surface);
  --surface-2: var(--theme-surface-soft);
  --surface-soft: var(--theme-surface-soft);
  --primary: var(--theme-primary);
  --primary-dark: var(--theme-primary-hover);
  --primary-light: #8BA3C7;
  --soft: var(--theme-primary-soft);
  --accent: var(--theme-primary);
  --text: var(--theme-text);
  --muted: var(--theme-text-soft);
  --border: var(--theme-border);
  --success: var(--theme-success);
  --warning: var(--theme-warning);
  --danger: var(--theme-danger);
  --info: var(--theme-info);
  --shadow: var(--theme-shadow);
}

html.dark,
html[data-theme="dark"] {
  color-scheme: dark;
  --theme-background: #001030;
  --theme-background-alt: #031735;
  --theme-surface: #09234B;
  --theme-surface-soft: #061B3B;
  --theme-surface-raised: #0F274F;
  --theme-sidebar: var(--ncs-navy);
  --theme-table: #061B3B;
  --theme-primary: #1E5FB8;
  --theme-primary-hover: #164B95;
  --theme-primary-soft: #0F274F;
  --theme-secondary: #8BA3C7;
  --theme-text: #F5F7FA;
  --theme-text-soft: #8BA3C7;
  --theme-border: #0F274F;
  --theme-success: #16BB73;
  --theme-warning: var(--ncs-gold);
  --theme-danger: #F87171;
  --theme-info: #8BA3C7;
  --theme-shadow: 0 6px 18px rgb(0 0 0 / 16%);
  --theme-shadow-soft: 0 2px 9px rgb(0 0 0 / 12%);
  --theme-focus: 0 0 0 3px rgb(139 163 199 / 32%);

  --hc-field: #061B3B;
  --hc-heading: #061B3B;
  --ncs-row: #03152F;
  --ncs-row-alt: #061B3B;
  --ncs-hover: #102C4D;
  --ncs-hover-line: #55708D;
  --ncs-raised-navy: linear-gradient(180deg, color-mix(in srgb, #09234B 96%, #F5F7FA) 0%, #09234B 36%, color-mix(in srgb, #09234B 65%, #001030) 100%);
  --ncs-layer-line: color-mix(in srgb, #0F274F 78%, #8BA3C7);
  --ncs-top-line: color-mix(in srgb, #0F274F 64%, #8BA3C7);
  --ncs-raised-shadow: inset 0 1px 1px rgb(245 247 250 / 9%), 0 5px 11px rgb(0 0 0 / 23%);
  --ncs-queue-blue: linear-gradient(180deg, color-mix(in srgb, #1E5FB8 90%, #F5F7FA) 0%, #1E5FB8 24%, color-mix(in srgb, #1E5FB8 83%, #001030) 100%);
  --ncs-urgent-bottom: #001030;

  --bg: var(--theme-background);
  --surface: var(--theme-surface);
  --surface-2: var(--theme-surface-soft);
  --surface-soft: var(--theme-surface-soft);
  --primary: var(--theme-primary);
  --primary-dark: var(--theme-primary-hover);
  --primary-light: var(--theme-secondary);
  --soft: var(--theme-primary-soft);
  --accent: var(--theme-secondary);
  --text: var(--theme-text);
  --muted: var(--theme-text-soft);
  --border: var(--theme-border);
  --success: var(--theme-success);
  --warning: var(--theme-warning);
  --danger: var(--theme-danger);
  --info: var(--theme-info);
  --shadow: var(--theme-shadow);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Cairo', 'Segoe UI', Tahoma, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  background:
    radial-gradient(circle at 12% 6%, color-mix(in srgb, var(--theme-primary) 12%, transparent), transparent 32rem),
    var(--theme-background);
  color: var(--theme-text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

:is(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--theme-primary);
  outline-offset: 2px;
  box-shadow: var(--theme-focus);
}

.sidebar :is(a, button):focus-visible {
  outline-color: var(--ncs-gold);
}

/* App Shell & Fixed RTL Sidebar (matching resources/views/layouts/app.blade.php & ncs-premium.css) */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar);
  background: linear-gradient(165deg, var(--ncs-navy), #031A36 65%, #001027);
  border-left: 1px solid #0F274F;
  color: #F5F7FA;
  padding: 18px 14px 14px;
  display: flex;
  flex-direction: column;
  z-index: 45;
  box-shadow: 0 2px 14px rgb(0 16 48 / 18%);
}

html.dark .sidebar {
  background: linear-gradient(165deg, #09234B, #001030 28%, #001030 80%, #061B3B);
  border-color: var(--ncs-layer-line);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px 16px;
  border-bottom: 1px solid #0F274F;
}

.clinic-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clinic-logo-mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
}

.clinic-logo-copy strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #F5F7FA;
  line-height: 1.2;
}

.clinic-logo-copy small {
  display: block;
  font-size: 11px;
  color: #C3D2E7;
}

.sidebar-close {
  display: none;
}

.nav-list {
  padding-top: 10px;
  flex: 1;
  overflow-y: auto;
}

.nav-section {
  margin-block: 6px 10px;
}

.sidebar .nav-section-toggle {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #F5F7FA;
  font-size: 13.5px;
  font-weight: 800;
  background: linear-gradient(180deg, #09234B, #03152F);
  border: 1px solid #33496B;
  border-radius: 11px;
  box-shadow: inset 0 1px rgb(255 255 255 / 8%);
}

/* Luxury Gold — Sidebar Section Header from app.css & ncs-premium.css */
.sidebar .nav-section:first-child > .nav-section-toggle,
html.dark .sidebar .nav-section-toggle {
  color: #ffe6a5;
  background: linear-gradient(180deg, #283246 0%, #131d30 55%, #0b1626 100%);
  border: 1.5px solid #e8b456;
  border-radius: 13px;
  box-shadow:
    0 0 5px rgba(255, 206, 104, 0.45),
    0 0 12px rgba(230, 162, 54, 0.2),
    inset 0 1px 0 rgba(255, 239, 185, 0.28);
}

.nav-section-arrow {
  width: 8px;
  height: 8px;
  border-right: 2px solid #ffdb83;
  border-bottom: 2px solid #ffdb83;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.nav-section[data-expanded="false"] .nav-section-arrow {
  transform: rotate(135deg);
}

.nav-section-panel {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 160ms ease;
}

.nav-section[data-expanded="false"] .nav-section-panel {
  grid-template-rows: 0fr;
}

.nav-section-body {
  min-height: 0;
  overflow: hidden;
  display: grid;
  gap: 3px;
}

.nav-link {
  width: 100%;
  min-height: 41px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #D7E0EB;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 600;
  text-align: right;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.nav-link svg {
  color: #8BA3C7;
  flex-shrink: 0;
}

.nav-link:hover {
  background: linear-gradient(180deg, #102C4D, #09234B);
  border-color: #55708D;
  color: #FFFFFF;
}

.nav-link[aria-current="page"] {
  background: var(--ncs-queue-blue);
  color: #FFFFFF;
  border-color: #3983D9;
  font-weight: 800;
  box-shadow: inset 0 1px rgb(245 247 250 / 18%), 0 2px 6px rgb(0 0 0 / 20%);
}

.nav-link[aria-current="page"] svg {
  color: var(--ncs-gold);
}

.nav-link em {
  font-style: normal;
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  background: #193254;
  color: #F5F7FA;
  border: 1px solid #466183;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
}

.nav-link em.warning {
  background: #3D341E;
  color: #F0D79A;
  border-color: #8D7543;
}

.sidebar-shortcuts {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #0F274F;
  display: grid;
  gap: 5px;
}

.sidebar-shortcuts-title {
  font-size: 11px;
  font-weight: 700;
  color: #8BA3C7;
  padding: 0 6px;
}

.sidebar-shortcut {
  width: 100%;
  min-height: 34px;
  padding: 4px 10px;
  border-radius: 9px;
  border: 1px solid #193254;
  background: #061B3B;
  color: #D7E0EB;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
}

.sidebar-shortcut:hover {
  border-color: #55708D;
  background: #09234B;
}

.sidebar-shortcut kbd {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 5px;
  background: #001030;
  border: 1px solid #33496B;
  color: #ffe6a5;
}

.sidebar-cta-box {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #0F274F;
  display: grid;
  gap: 10px;
}

.request-cta {
  width: 100%;
  min-height: 42px;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 800;
  background: linear-gradient(135deg, #E9B526, #C99312) !important;
  color: #001030 !important;
  border: 1px solid #ffe6a5 !important;
  box-shadow: 0 4px 14px rgba(233, 181, 38, 0.28) !important;
}

.request-cta:hover {
  filter: brightness(1.06);
}

.sidebar-credit {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 10.5px;
  color: #8BA3C7;
  line-height: 1.4;
}

.ncs-sig-gold {
  color: #E9B526;
}

/* Main Area & Topbar */
.main-area {
  width: calc(100% - var(--sidebar));
  margin-right: var(--sidebar);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 68px;
  padding: 10px 24px;
  background: var(--theme-surface);
  border-bottom: 1px solid var(--theme-border);
  box-shadow: var(--theme-shadow-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 30;
  flex-wrap: wrap;
}

html.dark .topbar {
  background: linear-gradient(180deg, color-mix(in srgb, #09234B 68%, #001030), #001030);
  border-color: var(--ncs-layer-line);
  box-shadow: inset 0 1px rgb(139 163 199 / 10%), 0 3px 10px rgb(0 0 0 / 18%);
}

.topbar-start {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ncs-queue-blue);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  box-shadow: var(--ncs-queue-shadow);
}

.topbar-user strong {
  display: block;
  font-size: 13.5px;
  line-height: 1.3;
}

.topbar-user small {
  display: block;
  font-size: 11.5px;
  color: var(--theme-text-soft);
}

.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--theme-success) 45%, var(--theme-border));
  background: color-mix(in srgb, var(--theme-success) 10%, var(--theme-surface));
  color: var(--theme-success);
  font-size: 12px;
  font-weight: 700;
}

.connection-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--theme-success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-success) 20%, transparent);
  animation: pulse-live 2s infinite;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mobile-menu {
  display: none;
}

/* Buttons & Controls */
.btn {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--theme-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.btn-lg {
  min-height: 46px;
  padding: 0 22px;
  font-size: 14.5px;
  border-radius: 12px;
}

.btn-sm {
  min-height: 32px;
  padding: 0 11px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-primary,
.primary {
  background: var(--ncs-queue-polish);
  border-color: color-mix(in srgb, var(--theme-primary) 72%, #8BA3C7);
  color: #FFFFFF;
  box-shadow: var(--ncs-queue-shadow);
}

.btn-primary:hover:not(:disabled),
.primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn-secondary {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

html.dark .topbar .btn-secondary,
html.dark .topbar .icon-btn {
  background: linear-gradient(180deg, #193254, #09234B 38%, #03152F);
  color: #F5F7FA;
  border-color: #466183;
  border-top-color: #6C839F;
  box-shadow: inset 0 1px rgb(245 247 250 / 16%), 0 2px 5px rgb(0 0 0 / 24%);
}

.btn-secondary:hover:not(:disabled),
.icon-btn:hover:not(:disabled) {
  background: var(--ncs-hover);
  border-color: var(--ncs-hover-line);
}

.btn-gold {
  background: linear-gradient(135deg, #E9B526, #C89211);
  color: #001030;
  border-color: #ffe6a5;
  font-weight: 800;
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
  color: var(--theme-text);
  display: inline-grid;
  place-items: center;
}

/* Live Voice Announcement Callout Banner */
.callout-banner {
  margin: 14px 24px 0;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--ncs-gold);
  background: var(--ncs-urgent-background);
  box-shadow: var(--ncs-urgent-shadow);
}

.callout-banner-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.callout-wave {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(233, 181, 38, 0.2);
  border: 1px solid var(--ncs-gold);
  display: grid;
  place-items: center;
  font-size: 18px;
}

.callout-copy {
  flex: 1;
  min-width: 180px;
}

.callout-copy small {
  display: block;
  font-size: 11.5px;
  color: var(--theme-text-soft);
}

.callout-copy strong {
  display: block;
  font-size: 15.5px;
  color: var(--theme-text);
}

.callout-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-primary) 18%, var(--theme-surface));
  border: 1px solid var(--theme-primary);
  color: var(--theme-text);
}

/* Content Container */
.content {
  padding: 22px 24px 44px;
  max-width: 1480px;
  width: 100%;
  margin-inline: auto;
}

.sr-status {
  margin: 10px 0 0;
  min-height: 1.5em;
  font-size: 13px;
  font-weight: 700;
  color: var(--theme-primary);
}

html.dark .sr-status {
  color: var(--ncs-gold);
}

/* Welcome Hero */
.welcome-hero {
  max-width: 920px;
  margin: 12px auto;
  padding: clamp(24px, 4vw, 44px);
  border-radius: 18px;
  border: 1px solid var(--theme-border);
  background: linear-gradient(155deg, var(--theme-surface), var(--theme-surface-soft));
  box-shadow: var(--theme-shadow);
  text-align: center;
}

html.dark .welcome-hero {
  border-color: var(--ncs-layer-line);
  box-shadow: var(--ncs-raised-shadow);
}

.welcome-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--ncs-gold);
  background: rgba(233, 181, 38, 0.12);
  color: var(--theme-text);
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 16px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ncs-gold);
  animation: pulse-live 1.8s infinite;
}

.welcome-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  display: block;
  margin: 0 auto 14px;
}

.welcome-hero h1 {
  font-size: clamp(1.55rem, 3.2vw, 2.3rem);
  margin: 0 0 12px;
  line-height: 1.35;
}

.welcome-lead {
  max-width: 720px;
  margin: 0 auto 24px;
  color: var(--theme-text-soft);
  font-size: 15px;
}

.welcome-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
  text-align: right;
}

.welcome-feature {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface-soft);
}

html.dark .welcome-feature {
  background: var(--ncs-raised-navy);
  border-color: var(--ncs-layer-line);
}

.welcome-feature strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--theme-text);
}

.welcome-feature span {
  font-size: 12.5px;
  color: var(--theme-text-soft);
}

.welcome-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.welcome-privacy-note {
  font-size: 12px;
  color: var(--theme-text-soft);
  margin: 0;
}

/* Dashboard Header & Shortcut Cards (matching pages/dashboard.blade.php) */
.dashboard-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.dashboard-welcome h1 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 3px;
}

.dashboard-welcome p {
  margin: 0;
  font-size: 13px;
  color: var(--theme-text-soft);
}

.dashboard-heading-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

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

.shortcut-card {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 72px;
  padding: 12px 14px;
  border-radius: var(--ncs-radius);
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
  box-shadow: var(--theme-shadow-soft);
  text-align: right;
}

html.dark .shortcut-card {
  background: var(--ncs-raised-navy);
  border-color: var(--ncs-layer-line);
  border-top-color: var(--ncs-top-line);
  box-shadow: var(--ncs-raised-shadow);
}

.shortcut-card:hover {
  border-color: var(--ncs-hover-line);
}

.shortcut-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--theme-primary) 16%, var(--theme-surface));
  color: var(--theme-primary);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

html.dark .shortcut-icon {
  background: #193254;
  color: #ffe6a5;
}

.shortcut-card strong {
  display: block;
  font-size: 14px;
  color: var(--theme-text);
}

.shortcut-card small {
  display: block;
  font-size: 12px;
  color: var(--theme-text-soft);
}

/* Cards & Daily Work Center (matching partials/dashboard-queue-live.blade.php) */
.card {
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--ncs-radius);
  box-shadow: var(--theme-shadow-soft);
  margin-bottom: 16px;
}

html.dark .card {
  background: linear-gradient(160deg, var(--theme-surface), var(--theme-surface-soft));
  border-color: var(--ncs-layer-line);
}

.daily-work-center {
  padding: 12px;
}

html.dark .daily-work-center {
  background: linear-gradient(155deg, #061B3B, #001030);
  border-color: var(--ncs-layer-line);
  border-top-color: var(--ncs-top-line);
  box-shadow: inset 0 1px rgb(245 247 250 / 5%), 0 5px 14px rgb(0 0 0 / 18%);
}

.card-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--theme-border);
  background: var(--theme-surface-soft);
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.daily-work-center > .card-head {
  border-radius: 10px;
  margin-bottom: 10px;
}

html.dark .daily-work-center > .card-head {
  background: linear-gradient(120deg, color-mix(in srgb, #09234B 78%, #001030), #001030);
}

.card-head h2 {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
}

.card-head p {
  font-size: 12px;
  color: var(--theme-text-soft);
  margin: 2px 0 0;
}

.card-body {
  padding: 16px;
}

/* Live Examination Strip (.exam-role-current) */
.exam-role-current {
  padding: 10px 12px;
  border: 1px solid var(--theme-border);
  border-radius: 10px;
  background: var(--theme-surface-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

html.dark .exam-role-current {
  background: linear-gradient(180deg, #001030, #061B3B);
  border-color: var(--ncs-layer-line);
}

.ncs-exam-strip-main,
.ncs-exam-strip-next {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ncs-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--theme-success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-success) 24%, transparent);
  animation: pulse-live 1.8s infinite;
}

.next-patient-glow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 10px;
  background: var(--ncs-queue-polish);
  border: 1px solid color-mix(in srgb, var(--theme-primary) 72%, #8BA3C7);
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 800;
  box-shadow: var(--ncs-queue-shadow);
}

.ncs-next-queue-pill,
.ncs-wait-time-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 9px;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
  font-size: 12.5px;
}

.ncs-next-queue-pill b {
  color: var(--ncs-gold);
  font-weight: 800;
}

/* 10-Second Clinical Brief Card */
.ncs-clinical-brief-card {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--theme-primary) 40%, var(--theme-border));
  background: color-mix(in srgb, var(--theme-primary) 8%, var(--theme-surface));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12.5px;
}

.ncs-brief-core-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ncs-brief-core-pills span {
  padding: 3px 9px;
  border-radius: 7px;
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
}

/* Queue Table & Urgent Side Column (.exam-role-layout) */
.exam-role-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 270px);
  gap: 12px;
  margin-top: 10px;
}

.exam-role-table {
  padding: 12px;
  border: 1px solid var(--theme-border);
  border-radius: 12px;
  background: var(--theme-surface);
}

html.dark .exam-role-table {
  border-color: var(--ncs-layer-line);
  background: linear-gradient(160deg, #061B3B, #03152F);
}

.ncs-queue-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.ncs-queue-table-head h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--theme-border);
  text-align: right;
  font-size: 13.5px;
  vertical-align: middle;
}

.data-table th {
  background: var(--theme-surface-soft);
  color: var(--theme-text);
  font-weight: 800;
  font-size: 12.5px;
}

html.dark .data-table th {
  background: #001030;
}

.data-table tbody tr {
  background: var(--ncs-row);
}

.data-table tbody tr:nth-child(even) {
  background: var(--ncs-row-alt);
}

.data-table tbody tr:hover {
  background: var(--ncs-hover);
}

.ncs-queue-num {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 26px;
  padding: 0 6px;
  border-radius: 7px;
  background: var(--theme-primary-soft);
  border: 1px solid var(--theme-border);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Badges & Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}

.status-pill.in-exam {
  background: color-mix(in srgb, var(--theme-primary) 18%, var(--theme-surface));
  color: var(--theme-primary);
  border: 1px solid var(--theme-primary);
}

html.dark .status-pill.in-exam {
  color: #8ce0ff;
}

.status-pill.waiting {
  background: color-mix(in srgb, var(--theme-warning) 16%, var(--theme-surface));
  color: var(--theme-warning);
  border: 1px solid color-mix(in srgb, var(--theme-warning) 50%, var(--theme-border));
}

.status-pill.completed {
  background: color-mix(in srgb, var(--theme-success) 15%, var(--theme-surface));
  color: var(--theme-success);
  border: 1px solid color-mix(in srgb, var(--theme-success) 45%, var(--theme-border));
}

.status-pill.urgent {
  background: rgba(233, 181, 38, 0.2);
  color: var(--theme-warning);
  border: 1px solid var(--ncs-gold);
}

.ncs-qr-origin-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  background: color-mix(in srgb, var(--theme-info) 16%, var(--theme-surface));
  border: 1px solid var(--theme-info);
  color: var(--theme-text);
}

/* Urgent Column (.exam-role-urgent) */
.exam-role-urgent {
  position: relative;
  padding: 12px;
  border-radius: 12px;
  border: 1.5px solid #C79C35;
  background: var(--ncs-urgent-background);
  box-shadow: var(--ncs-urgent-shadow);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.exam-role-urgent h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--theme-warning);
  display: flex;
  align-items: center;
  gap: 6px;
}

.urgent-item {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--ncs-gold) 45%, var(--theme-border));
  background: color-mix(in srgb, var(--theme-surface) 88%, transparent);
  display: grid;
  gap: 6px;
}

.urgent-item strong {
  font-size: 13.5px;
}

.urgent-item small {
  font-size: 11.5px;
  color: var(--theme-text-soft);
}

.urgent-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--ncs-radius);
  padding: 14px 16px;
  box-shadow: var(--theme-shadow-soft);
}

html.dark .stat-card {
  background: linear-gradient(160deg, var(--theme-surface), var(--theme-surface-soft));
  border-color: var(--ncs-layer-line);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--theme-text-soft);
}

.stat-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 8px;
}

.stat-value strong {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
}

.stat-value span {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--theme-success);
}

/* Forms & Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

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

.form-group {
  display: grid;
  gap: 5px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 13px;
  font-weight: 700;
}

.form-control,
input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid var(--theme-border);
  background: var(--hc-field);
  color: var(--theme-text);
  font-size: 13.5px;
}

textarea.form-control {
  min-height: 76px;
  resize: vertical;
}

.urgent-toggle-box {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid color-mix(in srgb, var(--ncs-gold) 65%, var(--theme-border));
  background: var(--ncs-urgent-background);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.urgent-toggle-box input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #d99b16;
}

/* Waiting Room TV Display Screen */
.tv-display-board {
  padding: 24px;
  border-radius: 16px;
  border: 2px solid var(--ncs-gold);
  background: linear-gradient(155deg, #09234B, #001030);
  color: #F5F7FA;
  text-align: center;
  box-shadow: 0 14px 36px rgba(0, 16, 48, 0.28);
  margin-bottom: 16px;
}

.tv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #193254;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tv-cards {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.tv-now-card,
.tv-next-card {
  padding: 22px 18px;
  border-radius: 14px;
  border: 1.5px solid #3983D9;
  background: rgba(15, 39, 79, 0.75);
}

.tv-now-card {
  border-color: var(--ncs-gold);
  background: radial-gradient(circle at 50% 0%, rgba(233, 181, 38, 0.22), rgba(9, 35, 75, 0.92));
}

.tv-turn-number {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900;
  color: #ffe6a5;
  line-height: 1.1;
  margin: 6px 0;
}

.tv-patient-name {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 800;
  color: #FFFFFF;
}

.tv-callout-phrase {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(0, 16, 48, 0.7);
  border: 1px solid rgba(233, 181, 38, 0.45);
  color: #ffe6a5;
  font-size: 15px;
  font-weight: 800;
}

/* Patient Profile & Tabs */
.profile-hero {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.profile-hero-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--ncs-queue-blue);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
}

.tabs-bar {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 12px;
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  margin-bottom: 14px;
  overflow-x: auto;
}

.tab-btn {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--theme-text-soft);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.tab-btn.active {
  background: var(--ncs-queue-polish);
  color: #FFFFFF;
  border-color: var(--theme-primary);
}

/* LAN & QR Network Architecture Diagram */
.lan-nodes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.lan-node {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface-soft);
  display: grid;
  gap: 6px;
}

html.dark .lan-node {
  background: var(--ncs-raised-navy);
  border-color: var(--ncs-layer-line);
}

.qr-preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px;
  border-radius: 12px;
  border: 1px dashed var(--ncs-gold);
  background: var(--theme-surface-soft);
  text-align: center;
}

.qr-svg-wrap {
  padding: 10px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid #DDE5F0;
  display: inline-grid;
  place-items: center;
}

/* Modal & Print Preview */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 17, 31, 0.72);
  backdrop-filter: blur(3px);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: min(740px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 16px;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
  color: var(--theme-text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.modal-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--theme-border);
  background: var(--theme-surface-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: sticky;
  top: 0;
}

.modal-head h2 {
  font-size: 16px;
  margin: 0;
}

.modal-head p {
  font-size: 12px;
  color: var(--theme-text-soft);
  margin: 2px 0 0;
}

.modal-body {
  padding: 18px;
}

.rx-print-sheet {
  background: #FFFFFF;
  color: #001030;
  border: 2px solid #1E5FB8;
  border-radius: 12px;
  padding: 20px;
}

.rx-print-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #1E5FB8;
  padding-bottom: 12px;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}

.rx-print-header strong {
  font-size: 17px;
  color: #001030;
  display: block;
}

.rx-print-header small {
  color: #55708D;
  font-size: 12px;
}

.rx-print-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 12px;
  background: #F5F7FA;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}

.rx-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
}

.rx-table th,
.rx-table td {
  border: 1px solid #DDE5F0;
  padding: 8px 10px;
  text-align: right;
  font-size: 13px;
  color: #001030;
}

.rx-table th {
  background: #EFF2F6;
}

.rx-print-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed #8BA3C7;
  padding-top: 12px;
  font-size: 12px;
  color: #55708D;
}

.sidebar-backdrop {
  display: none;
}

/* Responsive Breakpoints (Tablet & Mobile <= 730px) */
@media (max-width: 1080px) {
  .dashboard-shortcuts,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .exam-role-layout,
  .tv-cards,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .sidebar {
    transform: translateX(105%);
    transition: transform 220ms ease;
    width: min(285px, calc(100vw - 40px));
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-close {
    display: inline-grid;
  }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 17, 31, 0.58);
    z-index: 40;
  }
  .sidebar-backdrop.show {
    display: block;
  }
  .main-area {
    width: 100%;
    margin-right: 0;
  }
  .mobile-menu {
    display: inline-grid;
  }
  .topbar {
    padding: 10px 14px;
  }
  .content {
    padding: 16px 14px 36px;
  }
  .callout-banner {
    margin: 10px 14px 0;
  }
}

@media (max-width: 730px) {
  .dashboard-shortcuts,
  .stats-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .topbar-center {
    display: none;
  }
  .data-table thead {
    display: none;
  }
  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }
  .data-table tbody tr {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid var(--theme-border);
    border-radius: 10px;
  }
  .data-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 4px;
    border-bottom: 1px dashed var(--theme-border);
  }
  .data-table td:last-child {
    border-bottom: 0;
  }
  .data-table td::before {
    content: attr(data-label);
    font-weight: 800;
    font-size: 12px;
    color: var(--theme-text-soft);
  }
}
