/**
 * ═══════════════════════════════════════════════════════════════════════════
 *  CARE CONNECT — CLINICAL OS 2.0 DESIGN SYSTEM
 *  Ultra-Modern Healthcare SaaS (Desktop) & Native Mobile App (APK / PWA)
 * ═══════════════════════════════════════════════════════════════════════════
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ── Core Brand Palette ── */
  --cc-primary: #0284C7;
  --cc-primary-hover: #0369A1;
  --cc-primary-light: #E0F2FE;
  --cc-primary-subtle: #F0F9FF;
  --cc-primary-glow: rgba(2, 132, 199, 0.25);

  --cc-orange: #F97316;
  --cc-orange-hover: #EA580C;
  --cc-orange-light: #FFEDD5;
  --cc-orange-glow: rgba(249, 115, 22, 0.25);

  --cc-indigo: #4F46E5;
  --cc-indigo-hover: #4338CA;
  --cc-indigo-light: #EEF2FF;

  /* ── Status System ── */
  --cc-success: #10B981;
  --cc-success-subtle: #ECFDF5;
  --cc-success-border: #A7F3D0;
  --cc-success-text: #065F46;

  --cc-warning: #F59E0B;
  --cc-warning-subtle: #FFFBEB;
  --cc-warning-border: #FDE68A;
  --cc-warning-text: #92400E;

  --cc-danger: #EF4444;
  --cc-danger-subtle: #FEF2F2;
  --cc-danger-border: #FECACA;
  --cc-danger-text: #991B1B;

  --cc-info: #0EA5E9;
  --cc-info-subtle: #F0F9FF;
  --cc-info-border: #BAE6FD;
  --cc-info-text: #0369A1;

  /* ── Neutral Canvas & Surfaces ── */
  --cc-canvas: #F8FAFC;
  --cc-card: #FFFFFF;
  --cc-surface: #FFFFFF;
  --cc-surface-subtle: #F1F5F9;
  --cc-surface-hover: #F8FAFC;

  --cc-text-main: #0F172A;
  --cc-text-muted: #64748B;
  --cc-text-light: #94A3B8;

  --cc-border: #E2E8F0;
  --cc-border-subtle: #F1F5F9;
  --cc-border-focus: #0284C7;

  /* ── Shadows & Radius ── */
  --cc-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --cc-shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.06);
  --cc-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --cc-shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.12);
  --cc-shadow-glow: 0 8px 20px rgba(249, 115, 22, 0.2);

  --cc-radius-sm: 8px;
  --cc-radius-md: 12px;
  --cc-radius-lg: 16px;
  --cc-radius-xl: 22px;
  --cc-radius-pill: 9999px;

  --cc-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --cc-font-mono: 'JetBrains Mono', monospace;
}

/* ── Dark Mode ── */
body.dark-theme,
[data-theme="dark"] {
  --cc-canvas: #090D16;
  --cc-card: #131B2E;
  --cc-surface: #131B2E;
  --cc-surface-subtle: #1E293B;
  --cc-surface-hover: #1E2B45;

  --cc-text-main: #F8FAFC;
  --cc-text-muted: #94A3B8;
  --cc-text-light: #64748B;

  --cc-border: #243049;
  --cc-border-subtle: #1A2338;
  --cc-border-focus: #38BDF8;

  --cc-shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
  --cc-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --cc-shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.6);

  --cc-primary-subtle: rgba(2, 132, 199, 0.15);
  --cc-orange-subtle: rgba(249, 115, 22, 0.15);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1. GLOBAL RESET & BASE STYLES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--cc-font);
  background-color: var(--cc-canvas);
  color: var(--cc-text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  min-height: 100vh;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   2. TOP APPLICATION BAR (WEB & MOBILE)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.cc-app-bar {
  position: sticky;
  top: 0;
  z-index: 1040;
  height: 64px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--cc-border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

body.dark-theme .cc-app-bar {
  background: rgba(19, 27, 46, 0.9);
  border-bottom-color: var(--cc-border);
}

.cc-app-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.cc-brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(249, 115, 22, 0.3));
  transition: transform 0.2s ease;
}
.cc-brand-logo:hover {
  transform: scale(1.03);
}

.cc-brand-desk-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 10px;
  border-radius: var(--cc-radius-pill);
  background: var(--cc-primary-subtle);
  color: var(--cc-primary);
  border: 1px solid var(--cc-border);
}

.cc-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cc-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cc-text-muted);
  border-radius: var(--cc-radius-pill);
  text-decoration: none;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.cc-nav-link:hover {
  color: var(--cc-text-main);
  background: var(--cc-surface-subtle);
}
.cc-nav-link.active {
  color: #FFFFFF !important;
  background: #0F172A;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

body.dark-theme .cc-nav-link.active {
  background: #0284C7;
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

.cc-icon-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: var(--cc-radius-pill);
  border: 1px solid var(--cc-border);
  background: var(--cc-card);
  color: var(--cc-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none !important;
}
.cc-icon-btn:hover {
  color: var(--cc-primary);
  border-color: var(--cc-primary);
  background: var(--cc-primary-subtle);
  transform: translateY(-1px);
}
.cc-icon-btn.text-danger:hover {
  color: #DC2626 !important;
  border-color: #FECACA !important;
  background: #FEF2F2 !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   3. CLINICAL IDENTITY STRIP (ULTRA-SLIM MODERN SAAS HEADER)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.cc-clinic-identity-strip,
.cc-clinic-hero {
  background: var(--cc-card);
  border: 1px solid var(--cc-border);
  border-radius: 12px;
  padding: 6px 14px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  position: relative;
  border-left: 3.5px solid var(--cc-orange);
  transition: all 0.2s ease;
}

body.dark-theme .cc-clinic-identity-strip,
body.dark-theme .cc-clinic-hero {
  background: #1e293b;
  border-color: #334155;
  border-left-color: var(--cc-orange);
}

.cc-identity-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  flex-wrap: wrap;
}

.cc-identity-primary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.cc-identity-clinic-box {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.cc-identity-icon-box {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #EFF6FF;
  color: #0284C7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

body.dark-theme .cc-identity-icon-box {
  background: #0f172a;
  color: #38bdf8;
}

.cc-identity-clinic-name,
.cc-clinic-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--cc-text-main);
  letter-spacing: -0.2px;
  margin: 0;
  line-height: 1.2;
}

.cc-identity-divider {
  width: 1px;
  height: 16px;
  background: var(--cc-border);
  opacity: 0.8;
}

.cc-identity-doc-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12.5px;
}

.cc-identity-doc-name {
  font-weight: 700;
  color: var(--cc-text-main);
  font-size: 13px;
}

.cc-identity-doc-edu {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--cc-text-muted);
}

.cc-specialty-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1.5px 8px;
  border-radius: var(--cc-radius-pill);
  background: #EFF6FF;
  color: #0284C7;
  border: 1px solid #BAE6FD;
  display: inline-flex;
  align-items: center;
}

body.dark-theme .cc-specialty-pill {
  background: #0f172a;
  color: #38bdf8;
  border-color: #0369a1;
}

.cc-reg-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: var(--cc-radius-pill);
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #CBD5E1;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.2px;
}

body.dark-theme .cc-reg-pill {
  background: #0f172a;
  color: #94a3b8;
  border-color: #334155;
}

.cc-identity-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: var(--cc-text-muted);
}

.cc-identity-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cc-identity-live-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 1.5px 8px;
  border-radius: var(--cc-radius-pill);
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  display: inline-flex;
  align-items: center;
}

body.dark-theme .cc-identity-live-pill {
  background: #064e3b;
  color: #6ee7b7;
  border-color: #047857;
}

.cc-edit-profile-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--cc-radius-pill);
  color: var(--cc-text-muted);
  border: 1px solid var(--cc-border);
  background: var(--cc-surface-subtle);
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.cc-edit-profile-btn:hover {
  color: var(--cc-orange);
  border-color: #FED7AA;
  background: #FFF7ED;
  transform: translateY(-1px);
}

body.dark-theme .cc-edit-profile-btn:hover {
  background: #334155;
  color: #FDBA74;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   4. KPI METRIC SUMMARY CARDS (COMPACT ONE-LINER)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.cc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .cc-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 8px;
  }
}

.cc-kpi-card {
  background: var(--cc-card);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-pill);
  padding: 4px 10px 4px 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

body.dark-theme .cc-kpi-card {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.cc-kpi-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
  border-color: var(--cc-primary);
}

body.dark-theme .cc-kpi-card:hover {
  border-color: #38bdf8;
}

.cc-kpi-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: var(--cc-radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  flex-shrink: 0;
}

.cc-kpi-val {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--cc-text-main);
  font-family: var(--cc-font-mono), var(--cc-font);
  line-height: 1;
  flex-shrink: 0;
  letter-spacing: -0.2px;
}

.cc-kpi-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--cc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   5. WORKSTATION DATA TABLE (DESKTOP)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.cc-table-wrapper {
  background: var(--cc-card);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-lg);
  box-shadow: var(--cc-shadow-sm);
  padding: 12px;
  margin-bottom: 20px;
  overflow: visible !important;
  position: relative;
}

.cc-action-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: var(--cc-radius-pill);
  border: 1px solid var(--cc-border);
  background: var(--cc-card);
  color: var(--cc-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.cc-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.1);
}
.cc-action-btn:active {
  transform: scale(0.94);
}

.cc-btn-lab:hover {
  background: #EFF6FF !important;
  border-color: #3B82F6 !important;
  color: #1D4ED8 !important;
}
.cc-btn-history:hover {
  background: #F5F3FF !important;
  border-color: #8B5CF6 !important;
  color: #6D28D9 !important;
}
.cc-btn-edit:hover {
  background: #F0FDF4 !important;
  border-color: #22C55E !important;
  color: #15803D !important;
}
.cc-btn-receipt:hover {
  background: #FFFBEB !important;
  border-color: #F59E0B !important;
  color: #B45309 !important;
}
.cc-btn-delete:hover {
  background: #FEF2F2 !important;
  border-color: #EF4444 !important;
  color: #B91C1C !important;
}

.dropdown-menu {
  z-index: 1060 !important;
}

.cc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
}

.cc-table th {
  background: var(--cc-surface-subtle);
  color: var(--cc-text-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 12px 16px;
  border: none;
  border-bottom: 1px solid var(--cc-border);
}
.cc-table th:first-child { border-top-left-radius: var(--cc-radius-md); border-bottom-left-radius: var(--cc-radius-md); }
.cc-table th:last-child { border-top-right-radius: var(--cc-radius-md); border-bottom-right-radius: var(--cc-radius-md); }

.cc-table td {
  padding: 14px 16px;
  vertical-align: middle;
  border: none;
  border-bottom: 1px solid var(--cc-border-subtle);
  color: var(--cc-text-main);
  font-size: 13.5px;
}

.cc-table tbody tr {
  transition: background-color 0.15s ease;
}
.cc-table tbody tr:hover {
  background-color: var(--cc-surface-hover);
}

.cc-table th:last-child,
.cc-table td:last-child {
  position: sticky;
  right: 0;
  background: var(--cc-card);
  z-index: 2;
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.03);
}
.cc-table tbody tr:hover td:last-child {
  background: var(--cc-surface-hover);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   5.5 MODERN CLINICAL STREAM CARDS (LINEAR 4-ZONE ALIGNED UI)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.cc-stream-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.cc-stream-card {
  background: var(--cc-card);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-lg);
  padding: 8px 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  display: grid;
  grid-template-columns: 32px 185px 1fr auto;
  align-items: center;
  column-gap: 12px;
  min-height: 56px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border-left: 4px solid #94a3b8;
}

body.dark-theme .cc-stream-card {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.cc-stream-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -2px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

body.dark-theme .cc-stream-card:hover {
  border-color: #475569;
}

/* Status Accents */
.cc-stream-card.status-pending {
  border-left-color: #F97316;
}
.cc-stream-card.status-completed {
  border-left-color: #10B981;
}
.cc-stream-card.status-cancelled {
  border-left-color: #EF4444;
}

/* 1. Token Badge (Grid Col 1) */
.cc-stream-token {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: var(--cc-radius-pill);
  background: var(--cc-surface-subtle);
  color: var(--cc-text-muted);
  font-family: var(--cc-font-mono);
  font-weight: 800;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--cc-border);
  justify-self: center;
  user-select: none;
}

.status-pending .cc-stream-token {
  background: #FFF7ED;
  color: #C2410C;
  border-color: #FED7AA;
}
.status-completed .cc-stream-token {
  background: #ECFDF5;
  color: #047857;
  border-color: #A7F3D0;
}
.status-cancelled .cc-stream-token {
  background: #FEF2F2;
  color: #DC2626;
  border-color: #FECACA;
}

/* Inline token badge for mobile */
.cc-stream-token-inline {
  display: none;
  font-family: var(--cc-font-mono);
  font-weight: 800;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: var(--cc-radius-pill);
  background: #FFF7ED;
  color: #C2410C;
  border: 1px solid #FED7AA;
  margin-right: 4px;
}
.status-completed .cc-stream-token-inline {
  background: #ECFDF5;
  color: #047857;
  border-color: #A7F3D0;
}

/* 2. Patient Identity Section (Grid Col 2: Fixed 185px for Strict Linearity) */
.cc-stream-patient-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  width: 185px;
  min-width: 185px;
  max-width: 185px;
  overflow: hidden;
}

.cc-stream-patient-header {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow: hidden;
  white-space: nowrap;
}

.cc-stream-patient-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--cc-text-main);
  letter-spacing: -0.2px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 130px;
  cursor: pointer;
  transition: color 0.15s ease;
}
.cc-stream-patient-name:hover {
  color: var(--cc-orange, #F97316);
  text-decoration: underline;
}

.cc-stream-meta-line {
  font-size: 11px;
  color: var(--cc-text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 3. Clinical Info Section (Grid Col 3: Strict Compact Linearity) */
.cc-stream-clinical-info {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden;
}

.cc-complaint-badge {
  font-size: 11px;
  font-weight: 600;
  height: 26px;
  width: 95px;
  min-width: 95px;
  max-width: 95px;
  padding: 0 6px;
  border-radius: var(--cc-radius-pill);
  background: var(--cc-surface-subtle);
  color: var(--cc-text-main);
  border: 1px solid var(--cc-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex-shrink: 0;
  white-space: nowrap;
  text-align: center;
}
.cc-complaint-badge span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70px;
}

.cc-badge {
  font-size: 11px;
  font-weight: 700;
  height: 26px;
  width: 95px;
  min-width: 95px;
  max-width: 95px;
  padding: 0 6px;
  border-radius: var(--cc-radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap !important;
  flex-shrink: 0;
  text-align: center;
}

.cc-fee-badge {
  font-size: 10.5px;
  font-weight: 700;
  height: 26px;
  width: 98px;
  min-width: 98px;
  max-width: 98px;
  padding: 0 6px;
  border-radius: var(--cc-radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-shrink: 0;
  white-space: nowrap !important;
  text-align: center;
}
.cc-fee-badge.paid {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}
.cc-fee-badge.unpaid {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

.cc-inv-badge {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  height: 26px !important;
  width: 105px !important;
  min-width: 105px !important;
  max-width: 105px !important;
  padding: 0 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  text-align: center !important;
  border-radius: var(--cc-radius-pill) !important;
}

/* 4. Action Bar inside Card (Grid Col 4) */
.cc-stream-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  margin-left: auto;
  z-index: 2;
}


/* Mobile Responsive */
@media (max-width: 860px) {
  .cc-stream-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
    gap: 10px;
    min-height: auto;
  }
  .cc-stream-card > .cc-stream-token {
    display: none !important;
  }
  .cc-stream-token-inline {
    display: inline-flex !important;
  }
  .cc-stream-patient-info {
    width: 100%;
  }
  .cc-stream-patient-header {
    flex-wrap: wrap;
    white-space: normal;
  }
  .cc-stream-patient-name {
    max-width: 100%;
  }
  .cc-stream-meta-line {
    white-space: normal;
  }
  .cc-stream-clinical-info {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 7px 10px;
    background: var(--cc-surface-subtle);
    border-radius: var(--cc-radius-md);
    gap: 6px;
  }
  .cc-stream-actions {
    justify-content: space-between;
    width: 100%;
    padding-top: 4px;
    border-top: 1px solid var(--cc-border-subtle);
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   6. PATIENT & PRN IDENTITY COMPONENTS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.cc-patient-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--cc-radius-pill);
  background: linear-gradient(135deg, var(--cc-orange), var(--cc-indigo));
  color: #FFFFFF;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px var(--cc-orange-glow);
}

.cc-prn-pill {
  font-family: var(--cc-font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--cc-surface-subtle);
  color: var(--cc-text-muted);
  border: 1px solid var(--cc-border);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.cc-prn-pill:hover {
  background: #FFF7ED;
  color: var(--cc-orange);
  border-color: var(--cc-orange);
  box-shadow: 0 2px 6px var(--cc-orange-glow);
  transform: translateY(-1px);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   7. STATUS BADGES & ACTION BUTTONS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.cc-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--cc-radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cc-badge-pending {
  background: var(--cc-warning-subtle);
  color: var(--cc-warning-text);
  border: 1px solid var(--cc-warning-border);
}
.cc-badge-completed {
  background: var(--cc-success-subtle);
  color: var(--cc-success-text);
  border: 1px solid var(--cc-success-border);
}
.cc-badge-cancelled {
  background: var(--cc-danger-subtle);
  color: var(--cc-danger-text);
  border: 1px solid var(--cc-danger-border);
}

.btn-cc-primary {
  background: linear-gradient(135deg, var(--cc-orange), var(--cc-orange-hover));
  color: #FFFFFF !important;
  border: none;
  border-radius: var(--cc-radius-pill);
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 700;
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 6px var(--cc-orange-glow);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}
.btn-cc-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}
.btn-cc-primary:active {
  transform: scale(0.97);
}

.btn-cc-success {
  background: linear-gradient(135deg, #059669, #10B981);
  color: #FFFFFF !important;
  border: none;
  border-radius: var(--cc-radius-pill);
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 700;
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}
.btn-cc-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.45);
}

.btn-cc-subtle {
  background: var(--cc-card);
  color: var(--cc-text-muted) !important;
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-pill);
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn-cc-subtle:hover {
  color: var(--cc-primary) !important;
  border-color: var(--cc-primary);
  background: var(--cc-primary-subtle);
  transform: translateY(-1px);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   7.5 COMMAND WORKSTATION TOOLBAR (MODERN SAAS CONTROL BAR)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.cc-command-bar {
  background: var(--cc-card);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-md);
  padding: 5px 8px;
  margin-bottom: 8px;
  box-shadow: 0 2px 10px -2px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  transition: all 0.2s ease;
}

body.dark-theme .cc-command-bar {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* 1. Date Navigator Controls */
.cc-date-nav-group {
  display: inline-flex;
  align-items: center;
  background: var(--cc-surface-subtle);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-pill);
  padding: 2px 4px;
  gap: 2px;
  height: 30px;
}

body.dark-theme .cc-date-nav-group {
  background: #0f172a;
  border-color: #334155;
}

.cc-date-arrow-btn {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--cc-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cc-date-arrow-btn:hover {
  background: #ffffff;
  color: var(--cc-text-main);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
body.dark-theme .cc-date-arrow-btn:hover {
  background: #334155;
  color: #ffffff;
}

.cc-date-picker-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.cc-date-badge-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--cc-text-main);
  padding: 2px 6px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.cc-date-native-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  pointer-events: auto;
}

.cc-date-today-btn {
  border: none;
  background: transparent;
  color: var(--cc-orange);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--cc-radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}
.cc-date-today-btn:hover {
  background: var(--cc-orange-light);
}

/* 2. Modern Segmented Capsule Tabs (iOS/Linear Style) */
.cc-segmented-track {
  background: var(--cc-surface-subtle);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-pill);
  padding: 2px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 30px;
}

body.dark-theme .cc-segmented-track {
  background: #0f172a;
  border-color: #334155;
}

.cc-seg-btn {
  border: none;
  background: transparent;
  color: var(--cc-text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--cc-radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  height: 24px;
}

.cc-seg-btn:hover {
  color: var(--cc-text-main);
  background: rgba(255, 255, 255, 0.5);
}

body.dark-theme .cc-seg-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
}

.cc-seg-btn.active {
  background: #ffffff !important;
  color: var(--cc-text-main) !important;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

body.dark-theme .cc-seg-btn.active {
  background: #334155 !important;
  color: #f8fafc !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.cc-seg-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--cc-radius-pill);
  background: rgba(100, 116, 139, 0.12);
  color: var(--cc-text-muted);
  transition: all 0.15s ease;
}

.cc-seg-btn.active .cc-seg-badge {
  background: var(--cc-primary-subtle);
  color: var(--cc-primary);
}

/* 3. Search & Actions Group */
.cc-search-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 140px;
  flex: 1;
  max-width: 220px;
  height: 30px;
}

.cc-search-box input {
  width: 100%;
  height: 30px;
  padding: 0 24px 0 28px;
  border-radius: var(--cc-radius-pill);
  border: 1px solid var(--cc-border);
  background: var(--cc-surface-subtle);
  font-size: 11.5px;
  color: var(--cc-text-main);
  transition: all 0.2s ease;
}

.cc-search-box input:focus {
  outline: none;
  border-color: var(--cc-orange);
  background: #ffffff;
  box-shadow: 0 0 0 2px var(--cc-orange-light);
}

body.dark-theme .cc-search-box input {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}
body.dark-theme .cc-search-box input:focus {
  background: #1e293b;
}

.cc-search-icon {
  position: absolute;
  left: 9px;
  font-size: 11px;
  color: var(--cc-text-muted);
  pointer-events: none;
}

.cc-search-clear {
  position: absolute;
  right: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  background: #cbd5e1;
  color: #475569;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  cursor: pointer;
  padding: 0;
}
.cc-search-clear:hover {
  background: #94a3b8;
  color: #ffffff;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   8. MOBILE NATIVE APP (APK) LAYOUT & TOUCH CARDS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 768px) {
  /* 📱 Prevent browser auto-zoom when tapping inputs on iOS Safari & Chrome */
  input, select, textarea,
  .form-control, .form-select, .form-control-sm, .form-select-sm,
  input[type="text"], input[type="password"], input[type="email"],
  input[type="number"], input[type="tel"], input[type="date"],
  input[type="time"], input[type="search"] {
    font-size: 16px !important;
  }

  html, body {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-overflow-scrolling: touch;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  body {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
    background: #F1F5F9;
  }

  .cc-app-bar {
    padding: 0 14px;
    height: 56px;
  }

  .cc-nav-links {
    display: none; /* Replaced by bottom navigation */
  }

  .cc-table-wrapper {
    display: none; /* Replaced by native mobile touch cards */
  }

  .cc-mobile-cards {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .cc-patient-card {
    background: var(--cc-card);
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius-lg);
    padding: 16px;
    box-shadow: var(--cc-shadow-sm);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .cc-patient-card:active {
    transform: scale(0.985);
  }

  /* ── Sticky Mobile Bottom Navigation Bar (App Tab Bar) ── */
  .cc-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    height: calc(62px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--cc-border);
    display: flex !important;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    padding-left: max(4px, env(safe-area-inset-left, 0px));
    padding-right: max(4px, env(safe-area-inset-right, 0px));
  }

  body.dark-theme .cc-bottom-nav {
    background: rgba(19, 27, 46, 0.97);
    border-top-color: var(--cc-border);
  }

  .cc-bottom-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--cc-text-muted);
    font-size: 10.5px;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 0;
    transition: all 0.15s ease;
  }
  .cc-bottom-tab .tab-icon {
    font-size: 18px;
    line-height: 1;
  }
  .cc-bottom-tab.active {
    color: var(--cc-orange);
    font-weight: 700;
  }
  .cc-bottom-tab.active .tab-icon {
    transform: translateY(-2px);
  }

  /* ── Mobile Floating Action Button (FAB) ── */
  .cc-fab {
    position: fixed;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    right: 18px;
    z-index: 1045;
    width: 54px;
    height: 54px;
    border-radius: var(--cc-radius-pill);
    background: linear-gradient(135deg, var(--cc-orange), var(--cc-primary));
    color: #FFFFFF;
    border: none;
    box-shadow: 0 8px 24px var(--cc-orange-glow);
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .cc-fab:active {
    transform: scale(0.92);
  }

  /* Modal responsiveness on mobile */
  .modal-dialog {
    margin: 12px auto !important;
    max-width: calc(100vw - 24px) !important;
  }
  .modal-footer {
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }
}

@media (min-width: 769px) {
  .cc-bottom-nav,
  .cc-fab,
  .cc-mobile-cards {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
 *  CLINICAL OS 2.0 — MEDICAL MICRO-ANIMATIONS (STETHOSCOPE & ECG PULSE)
 * ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Stethoscope Floating & Breathing Animation ── */
@keyframes cc-steth-float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-4px) rotate(2deg);
  }
}

.cc-steth-float {
  display: inline-block;
  animation: cc-steth-float 3s ease-in-out infinite;
  transform-origin: center center;
}

/* ── 2. Cardiac ECG Rhythm Draw Animation ── */
@keyframes cc-ecg-draw {
  0% {
    stroke-dashoffset: 100;
  }
  50% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -100;
  }
}

.cc-ecg-line {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: cc-ecg-draw 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* ── 3. Live Heartbeat Beacon Pulse ── */
@keyframes cc-beacon-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.cc-live-beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  display: inline-block;
  animation: cc-beacon-pulse 2s infinite cubic-bezier(0.45, 0, 0.55, 1);
}

.cc-live-beacon.orange {
  background: #F97316;
  animation: cc-beacon-pulse-orange 2s infinite cubic-bezier(0.45, 0, 0.55, 1);
}

@keyframes cc-beacon-pulse-orange {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(249, 115, 22, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
  }
}

/* ── 4. Rhythmic Heartbeat Scale ── */
@keyframes cc-heartbeat {
  0%, 100% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.18);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.12);
  }
  70% {
    transform: scale(1);
  }
}

.cc-heartbeat {
  display: inline-block;
  animation: cc-heartbeat 1.6s ease-in-out infinite;
  transform-origin: center center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DOCTOR CABIN INTERCOM & RECEPTION LIVE STATUS MATRIX
   ═══════════════════════════════════════════════════════════════════════════ */

.cc-intercom-bar {
  background: #ffffff;
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-md);
  padding: 6px 10px;
  box-shadow: var(--cc-shadow-xs);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

body.dark-theme .cc-intercom-bar {
  background: var(--cc-card);
  border-color: var(--cc-border);
}

.cc-intercom-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.cc-intercom-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  height: 28px;
  border-radius: var(--cc-radius-pill);
  border: 1px solid var(--cc-border);
  background: var(--cc-surface-subtle);
  color: var(--cc-text-main);
  transition: all 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}

.cc-intercom-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--cc-shadow-sm);
  background: #ffffff;
}

.cc-intercom-btn:active {
  transform: scale(0.96);
}

.cc-intercom-btn-next {
  background: linear-gradient(135deg, #0284C7, #0369A1) !important;
  color: #ffffff !important;
  border-color: #0284C7 !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.cc-intercom-btn-next:hover {
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.45);
}

.cc-intercom-btn-recept {
  background: #FEF3C7 !important;
  color: #92400E !important;
  border-color: #FCD34D !important;
}

.cc-intercom-btn-recept:hover {
  background: #FDE68A !important;
}

.cc-intercom-btn-break {
  background: #FFEDD5 !important;
  color: #9A3412 !important;
  border-color: #FDBA74 !important;
}

.cc-intercom-btn-proc {
  background: #EDE9FE !important;
  color: #5B21B6 !important;
  border-color: #DDD6FE !important;
}

.cc-intercom-btn-avail {
  background: #D1FAE5 !important;
  color: #065F46 !important;
  border-color: #A7F3D0 !important;
}

/* Reception Live Cabin Matrix */
.cc-cabin-matrix-deck {
  background: #ffffff;
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-md);
  padding: 8px 12px;
  box-shadow: var(--cc-shadow-xs);
  margin-bottom: 8px;
}

body.dark-theme .cc-cabin-matrix-deck {
  background: var(--cc-card);
  border-color: var(--cc-border);
}

.cc-cabin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 6px;
  margin-top: 4px;
}

.cc-cabin-card {
  background: var(--cc-surface-subtle);
  border: 1px solid var(--cc-border);
  border-radius: 8px;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.cc-cabin-card.status-calling-next {
  border-color: #38BDF8;
  background: #F0F9FF;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.cc-cabin-card.status-calling-reception {
  border-color: #F59E0B;
  background: #FFFBEB;
  animation: cc-buzz-pulse 1.2s infinite ease-in-out;
}

.cc-cabin-card.status-emergency {
  border-color: #EF4444;
  background: #FEF2F2;
  animation: cc-buzz-pulse 0.8s infinite ease-in-out;
}

@keyframes cc-buzz-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0);
  }
}

.cc-cabin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.cc-cabin-doctor {
  font-size: 12px;
  font-weight: 700;
  color: var(--cc-text-main);
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

.cc-cabin-specialty {
  font-size: 10px;
  color: var(--cc-text-muted);
  font-weight: 500;
  line-height: 1.1;
}

.cc-cabin-status-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--cc-radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.cc-cabin-detail {
  font-size: 11px;
  color: var(--cc-text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}



