:root {
  --color-primary: #0284c7;           /* Sky blue primary from Stitch */
  --color-primary-hover: #0369a1;
  --color-primary-contrast: #ffffff;
  --color-primary-container: #e0f2fe;
  --color-primary-fixed: #cce5ff;
  --color-on-primary-fixed: #001d31;
  --color-secondary: #0f172a;         /* High-contrast deep slate */
  --color-tertiary: #0d9488;          /* Medical clinical teal */
  --color-tertiary-container: #ccfbf1;
  --color-tertiary-fixed: #89f5e7;
  --color-on-tertiary-container: #115e59;
  --color-bg: #f8fafc;                /* Clinical low-fatigue grey canvas */
  --color-surface: #ffffff;           /* Crisp pure white cards */
  --color-surface-container: #f1f5f9; /* Subtle elevated container */
  --color-surface-container-low: #f8fafc;
  --color-text: #090d16;              /* Ultra-crisp high contrast ink */
  --color-text-muted: #0f172a;        /* Match primary form text; never use washed-out grey for readable copy. */
  --color-border: #cbd5e1;            /* Clear structural outline */
  --color-border-focus: #0284c7;
  --color-danger: #ef4444;
  --color-danger-hover: #dc2626;
  --color-warning: #f59e0b;
  --color-warning-bg: #fffbeb;
  --color-warning-border: #fde68a;
  --color-success: #10b981;
  --color-success-bg: #ecfdf5;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.08);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
  --font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --target-min: 44px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-primary-hover);
  text-decoration: none;
}

/* 1. Top Navigation Bar */
header.stitch-navbar {
  width: 100%;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-xs);
}

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

.stitch-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-icon-badge {
  width: 38px;
  height: 38px;
  background-color: var(--color-primary-container);
  color: var(--color-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-text-stack {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

nav.stitch-nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav.stitch-nav-links a {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

nav.stitch-nav-links a:hover {
  color: var(--color-secondary);
}

nav.stitch-nav-links a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

.nav-right-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-user-badge {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.35rem 0.85rem;
  background: var(--color-surface-container);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
}

.user-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-success);
}

/* 2. Main Content Canvas */
main.stitch-canvas {
  max-width: 1320px;
  width: 100%;
  margin: 1.75rem auto 3rem;
  padding: 0 1.5rem;
  flex: 1;
}

/* 3. Hero Clinical Context Banner */
.hero-context-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.hero-info h1 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--color-secondary);
  line-height: 1.2;
}

.hero-location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78125rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 4. Stitch 4-Across KPI Cards Grid */
.stitch-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dashboard-section-heading {
  margin: 0 0 0.75rem;
  color: var(--color-secondary);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.stitch-kpi-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.stitch-kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.kpi-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.kpi-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.kpi-badge-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-container);
  color: var(--color-primary);
  flex-shrink: 0;
}

.kpi-metric {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-secondary);
  line-height: 1.1;
  margin: 0.75rem 0 0.5rem;
}

.kpi-footer-note {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  border-top: 1px solid #f1f5f9;
  padding-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 5. Two-Column Live Workspace (8 cols table / 4 cols action panel) */
.workspace-split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .workspace-split {
    grid-template-columns: 1fr;
  }
}

/* Card Panels */
.stitch-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-xs);
  margin-bottom: 1.25rem;
}

.stitch-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.875rem;
}

.stitch-panel-header h2,
.stitch-panel-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin: 0;
}

/* Safety Alert Card (Stitch High-Visibility Warning) */
.safety-alert-card {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-xl);
  padding: 1.35rem;
  margin-bottom: 1.5rem;
}

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

.safety-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #991b1b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.safety-body {
  font-size: 0.875rem;
  color: #7f1d1d;
  line-height: 1.5;
}

/* Quick Action Stack */
.quick-action-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.quick-action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background: var(--color-surface-container);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-secondary);
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.15s ease;
}

.quick-action-item:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.action-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

button,
.btn,
.btn-stitch-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--color-primary);
  color: #ffffff;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: var(--target-min);
  text-decoration: none;
  transition: all 0.15s ease;
}

button:hover,
.btn:hover,
.btn-stitch-primary:hover {
  background-color: var(--color-primary-hover);
  color: #ffffff;
}

.btn-secondary,
.btn-stitch-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--color-surface);
  color: var(--color-secondary);
  border: 1px solid var(--color-border);
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  min-height: var(--target-min);
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-secondary:hover,
.btn-stitch-secondary:hover {
  background-color: var(--color-surface-container);
  color: var(--color-secondary);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-secondary);
}

.toolbar-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-xs);
}

.toolbar-form label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-secondary);
}

.btn-stitch-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-danger);
  color: #ffffff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 36px;
}

.btn-stitch-danger:hover {
  background-color: var(--color-danger-hover);
}

/* Inputs & Form Controls */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Tables */
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.table-responsive table {
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 768px) {
  table:not(.table-responsive table) {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

th, td {
  padding: 0.625rem 0.875rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
}

th {
  background: #f8fafc;
  font-weight: 600;
  color: var(--color-secondary);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: #f8fafc;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f1f5f9;
  color: #475569;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #e0f2fe; color: #075985; }
.badge-neutral { background: #f1f5f9; color: #475569; }

/* Messages Alerts */
.messages {
  list-style: none;
  margin-bottom: 1.25rem;
}

.messages li {
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: var(--shadow-xs);
}

.messages li.error {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.messages li .message-dismiss {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  color: currentColor;
  opacity: 0.65;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.messages li .message-dismiss:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.06);
}

.text-muted-empty {
  color: #8e8e93;
  font-weight: 400;
  font-size: 0.8125rem;
  opacity: 0.85;
}

/* Details grid */
dl.details-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.75rem 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-xs);
}

dl.details-grid dt {
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

dl.details-grid dd {
  color: var(--color-secondary);
  font-size: 0.9375rem;
}

.action-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  flex-wrap: wrap;
}

/* ==========================================================================
   Stitch Clinical Auth Split Screen (Vedant Hospital)
   ========================================================================== */

.auth-body {
  background-color: #f8fafc;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.stitch-auth-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Left Hero Panel */
.stitch-auth-hero {
  position: relative;
  flex: 0 0 46%;
  background: linear-gradient(135deg, #060d1a 0%, #09152b 50%, #0f2744 100%);
  color: #ffffff;
  padding: 3.5rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: 10px 0 35px rgba(0, 0, 0, 0.25);
}

.stitch-hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 25%, rgba(14, 165, 233, 0.22) 0%, rgba(13, 148, 136, 0.15) 40%, transparent 70%);
  pointer-events: none;
}

.stitch-hero-glow-blob1 {
  position: absolute;
  top: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: rgba(2, 132, 199, 0.22);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.stitch-hero-glow-blob2 {
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 450px;
  height: 450px;
  background: rgba(13, 148, 136, 0.18);
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.stitch-auth-hero-top {
  position: relative;
  z-index: 10;
}

.stitch-brand-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stitch-cross-emblem {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 50%, #0d9488 100%);
  box-shadow: 0 10px 25px rgba(14, 165, 233, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.stitch-ping-container {
  position: absolute;
  bottom: -3px;
  right: -3px;
  display: flex;
  width: 14px;
  height: 14px;
}

.stitch-ping-animate {
  position: absolute;
  display: inline-flex;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #34d399;
  opacity: 0.75;
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.stitch-ping-dot {
  position: relative;
  display: inline-flex;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  background-color: #10b981;
  border: 2px solid #09152b;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

.stitch-brand-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.stitch-brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.stitch-brand-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  background: rgba(14, 165, 233, 0.2);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
  letter-spacing: 0.05em;
}

.stitch-brand-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

/* Center Hero Copy */
.stitch-auth-hero-center {
  position: relative;
  z-index: 10;
  margin: 2.5rem 0;
  max-width: 520px;
}

.stitch-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.75rem;
  color: #bae6fd;
  margin-bottom: 1.5rem;
}

.dot-separator {
  color: #64748b;
}

.stitch-hero-heading {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 1rem;
}

.stitch-heading-gradient {
  background: linear-gradient(to right, #38bdf8, #67e8f9, #5eead4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stitch-hero-lead {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 2rem;
}

.stitch-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.875rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1.75rem;
}

.stitch-stat-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.875rem 1rem;
}

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

.stat-emerald {
  color: #34d399;
}

.stat-sky {
  color: #38bdf8;
}

.stat-label {
  font-size: 0.6875rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.stitch-location-badge {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.45;
}

.stitch-auth-hero-bottom {
  position: relative;
  z-index: 10;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.stitch-compliance-badges {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stitch-comp-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.comp-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  font-size: 0.6875rem;
  font-weight: 800;
}

.comp-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: rgba(14, 165, 233, 0.25);
  font-size: 0.6875rem;
}

.comp-name {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #e2e8f0;
}

.comp-desc {
  font-size: 0.5625rem;
  color: #94a3b8;
}

.emergency-code {
  font-size: 0.6875rem;
  color: #94a3b8;
}

.emergency-code span {
  color: #f87171;
  font-weight: 700;
  font-family: monospace;
}

/* Right Form Panel */
.stitch-auth-form-panel {
  flex: 1;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem 4.5rem;
  overflow-y: auto;
}

.stitch-form-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.stitch-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.stitch-back-link:hover {
  color: var(--color-primary);
}

.stitch-system-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: #f1f5f9;
  border: 1px solid var(--color-border);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.status-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px #d1fae5;
}

.stitch-form-card {
  width: 100%;
  max-width: 440px;
  margin: auto;
  padding: 1.5rem 0;
}

.stitch-user-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  margin-bottom: 1.25rem;
}

.stitch-form-title {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--color-secondary);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.stitch-form-subtitle {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

.stitch-error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

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

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

.stitch-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stitch-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #334155;
}

.required-star {
  color: #ef4444;
}

.stitch-forgot-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}

.stitch-forgot-link:hover {
  text-decoration: underline;
}

.stitch-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.stitch-input-icon {
  position: absolute;
  left: 1rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 2;
}

input.stitch-input,
select.stitch-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.85rem !important;
  font-size: 0.9375rem;
  font-weight: 500;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: all 0.15s ease;
}

.stitch-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
}

.stitch-input.input-has-error {
  border-color: #ef4444;
  background-color: #fffbfb;
}

.stitch-password-toggle {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  min-height: auto;
}

.stitch-password-toggle:hover {
  color: #475569;
  background: none;
}

.stitch-input-hint {
  font-size: 0.6875rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

.field-error-text {
  font-size: 0.75rem;
  color: #dc2626;
  font-weight: 500;
  margin-top: 0.2rem;
}

.stitch-btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
  margin-top: 0.75rem;
  transition: all 0.15s ease;
}

.stitch-btn-login:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
  transform: translateY(-1px);
}

.stitch-form-footer {
  padding-top: 1.5rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 2rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Fallback simple auth card for password resets */
.auth-wrapper {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-md);
}

.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}

.auth-card .auth-subtitle {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.75rem;
}

@media (max-width: 1024px) {
  .stitch-auth-container {
    flex-direction: column;
  }
  .stitch-auth-hero {
    flex: none;
    padding: 2.5rem 1.5rem;
  }
  .stitch-hero-heading {
    font-size: 2rem;
  }
  .stitch-auth-form-panel {
    padding: 2.5rem 1.5rem;
  }
}

/* ==========================================================================
   Stitch Patient Registration & Clinical Intake Styles (Vedant Hospital)
   ========================================================================== */

.intake-breadcrumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.breadcrumb-nav a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb-nav a:hover {
  text-decoration: underline;
}

.crumb-separator {
  color: #94a3b8;
}

.crumb-current {
  color: var(--color-secondary);
  font-weight: 600;
}

.intake-badges-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 0.75rem;
  color: var(--color-secondary);
}

.status-pill-emerald {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.status-dot-emerald {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px #d1fae5;
}

/* Layout Grid */
.intake-layout-grid {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.intake-form-wrapper {
  min-width: 0;
}

.intake-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.stitch-card-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
}

/* Stepper Card */
.intake-stepper-card {
  padding: 1.5rem;
}

.stepper-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.stepper-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.stepper-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: #e0f2fe;
  color: #0369a1;
}

.stepper-sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.intake-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.intake-step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.intake-step-item.step-active {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.step-num-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-active .step-num-icon {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
}

.step-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.step-desc {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  margin-top: 0.15rem;
}

/* Identifiers Preview Card */
.intake-id-preview-card {
  padding: 1.25rem;
  background: #f8fafc;
}

.id-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.id-card-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-secondary);
}

.mrn-display-box {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  text-align: center;
  margin-bottom: 1rem;
}

.mrn-code-text {
  font-family: monospace;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 0.6rem;
}

.barcode-graphic {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 38px;
  margin-bottom: 0.4rem;
}

.bar {
  background: #1e293b;
  height: 100%;
}

.bar-w1 { width: 2px; }
.bar-w2 { width: 4px; }
.bar-w3 { width: 6px; }

.barcode-subtext {
  font-size: 0.625rem;
  font-family: monospace;
  color: #94a3b8;
  letter-spacing: 0.1em;
}

.intake-meta-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #e2e8f0;
}

.meta-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.meta-row strong {
  color: var(--color-secondary);
}

/* Hotkeys box */
.intake-hotkeys-box {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0.75rem;
  border-radius: var(--radius-lg);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

.hotkey-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.hotkey-item kbd {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  font-family: monospace;
  font-weight: 700;
  color: #334155;
}

/* Main Form Card */
.intake-main-card {
  padding: 2.25rem 2.5rem;
}

.form-hero-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.75rem;
}

.form-id-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 0.35rem;
}

.form-main-heading {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--color-secondary);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.form-main-sub {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  max-width: 600px;
  line-height: 1.5;
}

.unique-check-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #065f46;
}

/* Clinical Fieldsets */
.intake-fieldset {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  margin-bottom: 1.75rem;
  background: #ffffff;
}

.intake-legend {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.5rem;
  margin-bottom: 0.5rem;
}

.legend-copy { min-width: 0; }

.legend-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #e0f2fe;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.legend-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-secondary);
  line-height: 1.25;
  white-space: nowrap;
}

.legend-sub {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

.intake-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1.5rem;
  margin-top: 0.75rem;
}

.intake-field-col-full {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.intake-field-col-half {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #1e293b;
}

.clinical-input {
  width: 100%;
  padding: 0.75rem 1rem !important;
  font-size: 0.9375rem;
  font-weight: 500;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: all 0.15s ease;
}

.clinical-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
}

.intake-fieldset input:focus-visible,
.intake-fieldset select:focus-visible,
.intake-fieldset textarea:focus-visible,
.intake-fieldset button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.clinical-input.input-err {
  border-color: #ef4444;
  background: #fffafa;
}

.field-err-msg {
  font-size: 0.75rem;
  color: #dc2626;
  font-weight: 500;
}

.field-hint {
  font-size: 0.6875rem;
  color: #94a3b8;
}

/* Phone input with custom prefix */
.phone-input-group {
  display: flex;
  align-items: center;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  background: #ffffff;
  overflow: hidden;
  transition: all 0.15s ease;
}

.phone-input-group:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
}

.phone-prefix {
  padding: 0.75rem 0.85rem;
  background: #f1f5f9;
  border-right: 1px solid #cbd5e1;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.phone-input-field {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  flex: 1;
}

.phone-verified-tag {
  padding: 0.35rem 0.75rem;
  margin-right: 0.5rem;
  border-radius: 9999px;
  background: #ecfdf5;
  color: #059669;
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
}

.cohort-preview-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.85rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  min-height: 44px;
}

.field-label-note {
  margin-left: 0.35rem;
  color: var(--color-text-muted);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cohort-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
}

.cohort-text strong {
  color: var(--color-secondary);
  font-size: 0.875rem;
  line-height: 1.35;
}

.cohort-text span {
  color: var(--color-text-muted);
  font-size: 0.6875rem;
  line-height: 1.4;
}

/* Consent bar */
.consent-compliance-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

/* Toolbar Footer */
.intake-actions-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

@media (max-width: 1180px) {
  .intake-layout-grid {
    grid-template-columns: 1fr;
  }
  .intake-sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
  }
  .intake-main-card {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .intake-fields-grid {
    grid-template-columns: 1fr;
  }
  .intake-sidebar {
    grid-template-columns: 1fr;
  }
  .intake-main-card {
    padding: 1.25rem 1rem;
  }
  .form-main-heading {
    font-size: 1.35rem;
  }
}

/* Hospital Footer */
.stitch-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8125rem;
  color: var(--color-secondary);
  flex-wrap: wrap;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ===========================================================================
   Vedant Clinical UI — application shell and public access experience
   ========================================================================== */

:root {
  --color-primary: #087ea4;
  --color-primary-hover: #066986;
  --color-primary-container: #e6f5f8;
  --color-secondary: #0a1626;
  --color-tertiary: #0d705c;
  --color-bg: #f4f7f9;
  --color-surface-container: #f5f8fa;
  --color-text: #090d16;
  --color-text-muted: #0f172a;
  --color-border: #cbd5e1;
  --color-border-focus: #087ea4;
  --radius-sm: 7px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --shadow-xs: 0 1px 2px rgb(15 34 51 / 0.04);
  --shadow-sm: 0 2px 8px rgb(15 34 51 / 0.06);
  --shadow-md: 0 12px 28px rgb(15 34 51 / 0.08);
  --font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

input::placeholder,
textarea::placeholder {
  color: #334155;
  opacity: 1;
}

h1, h2, h3, h4, .brand-title, .kpi-metric {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
}

.app-body {
  display: block;
  background: var(--color-bg);
  overflow-x: hidden;
}

.app-shell {
  min-height: 100vh;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 80;
  width: 256px;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 16px;
  color: #dbe7ed;
  background:
    radial-gradient(circle at 15% 0%, rgb(18 126 153 / 0.22), transparent 28%),
    linear-gradient(180deg, #0e2738 0%, #0b2030 100%);
  border-right: 1px solid rgb(255 255 255 / 0.07);
}

.app-brand,
.public-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
}

.app-brand:hover,
.public-brand:hover {
  color: inherit;
}

.app-brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #fff;
  background: linear-gradient(145deg, #16a3bd, #087ea4);
  border-radius: 12px;
  box-shadow: 0 8px 18px rgb(1 113 143 / 0.22);
}

.app-brand-copy,
.public-brand > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-brand-copy strong,
.public-brand strong {
  overflow: hidden;
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-brand-copy small,
.public-brand small {
  color: #8fa8b7;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.sidebar-context {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 24px 2px 20px;
  padding: 12px 13px;
  background: rgb(255 255 255 / 0.045);
  border: 1px solid rgb(255 255 255 / 0.07);
  border-radius: 11px;
}

.sidebar-context-label,
.sidebar-section-label {
  color: #bae6fd;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-context-value {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
}

.status-indicator {
  width: 7px;
  height: 7px;
  display: inline-block;
  flex: 0 0 auto;
  background: #39c895;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgb(57 200 149 / 0.14);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sidebar-section-label {
  margin: 14px 12px 5px;
}

.sidebar-link {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  color: #e2e8f0;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
}

.sidebar-link svg {
  flex: 0 0 auto;
  opacity: 1;
}

.sidebar-link:hover {
  color: #ffffff;
  background: rgb(255 255 255 / 0.1);
}

.sidebar-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgb(12 139 168 / 0.34), rgb(10 111 141 / 0.18));
  border-color: rgb(70 186 207 / 0.18);
  box-shadow: inset 3px 0 #35b7cf;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgb(255 255 255 / 0.08);
}

.sidebar-profile {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  padding: 8px;
  color: #dbe7ed;
  border-radius: 10px;
}

.sidebar-profile:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.055);
}

.profile-avatar {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d9f6fb;
  background: #16455b;
  border: 1px solid rgb(91 197 216 / 0.24);
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
}

.profile-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.profile-copy strong {
  overflow: hidden;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy small {
  color: #8199a8;
  font-size: 0.66rem;
}

.sidebar-signout {
  width: 100%;
  min-height: 38px;
  justify-content: flex-start;
  padding: 0 10px;
  color: #93a9b6;
  background: transparent;
  border-color: transparent;
  font-size: 0.75rem;
}

.sidebar-signout:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.055);
}

.app-workspace {
  min-width: 0;
  min-height: 100vh;
  margin-left: 256px;
}

.app-topbar {
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: rgb(255 255 255 / 0.94);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(14px);
}

.topbar-left,
.topbar-right,
.topbar-date,
.secure-session {
  display: flex;
  align-items: center;
}

.topbar-left { gap: 12px; }
.topbar-right { gap: 20px; }
.topbar-left > div { display: flex; flex-direction: column; }

.topbar-eyebrow {
  color: var(--color-text-muted);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topbar-title {
  color: var(--color-secondary);
  font-family: var(--font-display);
  font-size: 0.93rem;
  font-weight: 800;
}

.topbar-date,
.secure-session {
  gap: 7px;
  color: var(--color-text-muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.secure-session {
  padding: 7px 10px;
  color: #376253;
  background: #f0f9f5;
  border: 1px solid #d8eee4;
  border-radius: 999px;
}

.sidebar-toggle {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--color-secondary);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
}
.sidebar-toggle:hover {
  background: var(--color-surface-container);
  color: var(--color-primary);
}

.app-sidebar {
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), padding 0.22s ease;
}
.app-workspace {
  transition: margin-left 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 1081px) {
  .app-shell.sidebar-collapsed .app-sidebar {
    width: 68px;
    padding: 20px 8px 16px;
    align-items: center;
  }
  .app-shell.sidebar-collapsed .app-workspace {
    margin-left: 68px;
  }
  .app-shell.sidebar-collapsed .app-brand-copy,
  .app-shell.sidebar-collapsed .sidebar-context,
  .app-shell.sidebar-collapsed .sidebar-section-label,
  .app-shell.sidebar-collapsed .sidebar-link span,
  .app-shell.sidebar-collapsed .sidebar-profile > div,
  .app-shell.sidebar-collapsed .sidebar-signout {
    display: none !important;
  }
  .app-shell.sidebar-collapsed .app-brand {
    justify-content: center;
    width: 100%;
  }
  .app-shell.sidebar-collapsed .sidebar-nav {
    width: 100%;
    align-items: center;
  }
  .app-shell.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: 10px 0;
    width: 44px;
    border-radius: 10px;
    margin: 0 auto 4px;
  }
  .app-shell.sidebar-collapsed .sidebar-footer {
    width: 100%;
    padding-top: 10px;
  }
  .app-shell.sidebar-collapsed .sidebar-profile {
    justify-content: center;
    padding: 8px 0;
    width: 44px;
    margin: 0 auto;
  }
}

.app-content {
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 18px 24px 36px;
}

.app-body {
  --color-primary: #c85a32;
  --color-primary-hover: #b94c24;
  --color-primary-contrast: #ffffff;
  --color-primary-container: #F5EFEB;
  --color-secondary: #53172a;
  --color-tertiary: #c85a32;
  --color-text: #271e20;
  --color-text-muted: #705058;
  --color-bg: #FAF6F0;
  --color-surface: #FFFDF9;
  --color-surface-container: #F5EFEB;
  --color-surface-container-low: #FAF6F0;
  --color-border: #E8D5C4;
  --color-border-focus: #c85a32;
  background-color: #FAF6F0 !important;
  color: #271e20;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.app-body .hero-context-panel {
  padding: 16px 20px;
  background: #FFFDF9 !important;
  border: 1px solid #E8D5C4 !important;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(39, 30, 32, 0.04);
}

.app-body .hero-info h1,
.app-body .page-header h1 {
  font-size: clamp(1.3rem, 1.8vw, 1.6rem);
  color: #53172a !important;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 800;
}

.app-body .hero-location {
  color: #705058 !important;
}

.app-body .stitch-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.app-body .stitch-kpi-card,
.app-body .stitch-panel,
.app-body table,
.app-body dl.details-grid,
.app-body .intake-main-card {
  box-shadow: 0 1px 3px rgba(39, 30, 32, 0.04);
}

.app-body .stitch-kpi-card {
  min-height: 110px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: #FFFDF9 !important;
  border: 1px solid #E8D5C4 !important;
}

.app-body .stitch-kpi-card:hover {
  transform: translateY(-1px);
  border-color: #c85a32 !important;
  box-shadow: 0 4px 12px rgba(83, 23, 42, 0.08);
}

.app-body .kpi-header .kpi-title {
  color: #705058 !important;
  font-weight: 700;
}

.app-body .kpi-badge-icon {
  background: #FAF6F0 !important;
  border: 1px solid #E8D5C4 !important;
  color: #c85a32 !important;
}

.app-body .kpi-metric {
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
  color: #53172a !important;
  font-weight: 800;
}

.app-body .kpi-footer-note {
  border-top: 1px solid #E8D5C4 !important;
  color: #705058 !important;
}

.app-body .stitch-panel {
  background: #FFFDF9 !important;
  border: 1px solid #E8D5C4 !important;
  border-radius: var(--radius-lg);
}

.app-body .stitch-panel-header {
  border-bottom-color: #E8D5C4 !important;
}

.app-body .stitch-panel-header h2,
.app-body .stitch-panel-header h3,
.app-body .dashboard-section-heading {
  color: #53172a !important;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 800;
}

.app-body .quick-action-item {
  background: #FFFDF9 !important;
  border: 1px solid #E8D5C4 !important;
  color: #53172a !important;
  border-radius: var(--radius-md);
  transition: all 0.15s ease-in-out;
}

.app-body .quick-action-item:hover {
  background: #FAF6F0 !important;
  border-color: #c85a32 !important;
  color: #c85a32 !important;
}

.app-body .quick-action-item .action-item-left svg {
  color: #c85a32 !important;
}

.app-body .safety-alert-card {
  background: #FFFDF9 !important;
  border: 1px solid #E8D5C4 !important;
  border-left: 4px solid #c85a32 !important;
  box-shadow: 0 1px 3px rgba(39, 30, 32, 0.04);
}

.app-body .safety-alert-card .safety-title {
  color: #53172a !important;
  font-weight: 800;
}

.app-body .safety-alert-card .safety-body {
  color: #705058 !important;
}

.app-body .badge-info {
  background: #F5EFEB !important;
  color: #53172a !important;
  border: 1px solid #E8D5C4 !important;
}

.app-body .badge-success {
  background: #ecfdf5 !important;
  color: #065f46 !important;
  border: 1px solid #a7f3d0 !important;
}

.app-body .badge-warning {
  background: #fffbeb !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
}

.app-body .badge-danger {
  background: #fef2f2 !important;
  color: #991b1b !important;
  border: 1px solid #fecaca !important;
}

.app-body .badge-neutral {
  background: #FAF6F0 !important;
  color: #705058 !important;
  border: 1px solid #E8D5C4 !important;
}

.app-body .btn-stitch-primary {
  background-color: #c85a32 !important;
  border-color: #c85a32 !important;
  color: #ffffff !important;
}

.app-body .btn-stitch-primary:hover {
  background-color: #b94c24 !important;
  border-color: #b94c24 !important;
}

.app-body .btn-stitch-secondary {
  background-color: #FFFDF9 !important;
  border: 1px solid #E8D5C4 !important;
  color: #53172a !important;
}

.app-body .btn-stitch-secondary:hover {
  background-color: #FAF6F0 !important;
  border-color: #c85a32 !important;
  color: #c85a32 !important;
}

.app-body table {
  background: #FFFDF9 !important;
  border: 1px solid #E8D5C4 !important;
  border-radius: var(--radius-lg);
}

.app-body th {
  color: #53172a !important;
  background: #F5EFEB !important;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #E8D5C4 !important;
  font-weight: 800;
}

.app-body td {
  color: #271e20 !important;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(232, 213, 196, 0.6) !important;
}

.app-body tr:hover td {
  background: #FAF6F0 !important;
}

.sidebar-backdrop { display: none; }

/* Public access page */
.public-body {
  display: flex;
  min-height: 100vh;
  background: #f7fafb;
}

.public-header {
  width: 100%;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 76px);
  background: rgb(255 255 255 / 0.92);
  border-bottom: 1px solid #e2e9ed;
  backdrop-filter: blur(14px);
}

.public-brand { color: var(--color-secondary); }
.public-brand strong { color: var(--color-secondary); font-size: 1rem; }
.public-brand small { color: #718295; }

.public-main {
  width: 100%;
  flex: 1;
}

.public-hero {
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(410px, 0.95fr);
  align-items: center;
  gap: clamp(48px, 7vw, 110px);
  padding: 78px clamp(28px, 7vw, 110px) 72px;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 15%, rgb(14 137 166 / 0.10), transparent 27%),
    linear-gradient(135deg, #f8fbfc 0%, #f1f7f8 100%);
  border-bottom: 1px solid #dfe9ed;
}

.public-hero-copy { max-width: 680px; }

.public-kicker {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  padding: 8px 12px;
  color: #356858;
  background: #edf8f3;
  border: 1px solid #d7eee4;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.public-hero h1 {
  margin: 0;
  color: #11253a;
  font-size: clamp(2.8rem, 5.3vw, 5.4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.065em;
}

.public-hero h1 span { color: #087e9f; }

.public-hero-copy > p {
  max-width: 620px;
  margin: 26px 0 0;
  color: #5e7184;
  font-size: clamp(1rem, 1.3vw, 1.13rem);
  line-height: 1.75;
}

.public-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 32px;
}

.public-primary-action {
  min-height: 50px;
  padding: 0 22px;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgb(8 126 164 / 0.18);
}

.public-access-note {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #6f8091;
  font-size: 0.78rem;
  font-weight: 600;
}

.public-trust-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 560px;
  margin-top: 50px;
  padding-top: 23px;
  border-top: 1px solid #dce7eb;
}

.public-trust-row > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 20px;
}

.public-trust-row > div + div {
  padding-left: 20px;
  border-left: 1px solid #dce7eb;
}

.public-trust-row strong {
  color: #233b50;
  font-family: var(--font-display);
  font-size: 0.82rem;
}

.public-trust-row span {
  color: #81909e;
  font-size: 0.68rem;
}

.public-visual {
  position: relative;
  padding: 32px 0;
}

.visual-orbit {
  position: absolute;
  border: 1px solid rgb(8 126 164 / 0.12);
  border-radius: 50%;
}

.visual-orbit-one { width: 440px; height: 440px; top: -15px; right: -100px; }
.visual-orbit-two { width: 310px; height: 310px; bottom: -25px; left: -80px; }

.public-visual-card {
  position: relative;
  z-index: 1;
  max-width: 500px;
  margin: 0 auto;
  padding: 26px;
  background: rgb(255 255 255 / 0.94);
  border: 1px solid #d8e5e9;
  border-radius: 22px;
  box-shadow: 0 28px 80px rgb(27 64 78 / 0.14);
}

.visual-card-header,
.visual-card-footer,
.visual-flow-item {
  display: flex;
  align-items: center;
}

.visual-card-header {
  justify-content: space-between;
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e3eaee;
}

.visual-card-header > div { display: flex; flex-direction: column; gap: 3px; }
.visual-eyebrow { color: #7a8b9b; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.visual-card-header strong { color: #1b3145; font-family: var(--font-display); font-size: 1.1rem; }
.visual-live { display: flex; align-items: center; gap: 7px; color: #39705e; font-size: 0.72rem; font-style: normal; font-weight: 700; }

.visual-flow-item {
  min-height: 74px;
  gap: 14px;
  padding: 12px 15px;
  background: #f7f9fa;
  border: 1px solid #e2eaed;
  border-radius: 12px;
}

.visual-flow-item.active {
  background: #eef8fa;
  border-color: #cce6eb;
}

.flow-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #087e9f;
  background: #fff;
  border: 1px solid #d8e7eb;
  border-radius: 10px;
}

.visual-flow-item > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; gap: 3px; }
.visual-flow-item strong { color: #243a4e; font-size: 0.81rem; }
.visual-flow-item small { color: #7d8c9b; font-size: 0.69rem; }
.visual-flow-item em { color: #9aa8b3; font-family: var(--font-display); font-size: 0.7rem; font-style: normal; }
.visual-connector { width: 1px; height: 14px; margin-left: 35px; background: #c9dce2; }

.visual-card-footer {
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 18px;
  color: #7b8b99;
  border-top: 1px solid #e3eaee;
  font-size: 0.66rem;
  font-weight: 600;
}

.visual-card-footer span { display: flex; align-items: center; gap: 6px; }

.public-capabilities {
  padding: 86px clamp(28px, 7vw, 110px) 96px;
  background: #fff;
}

.section-heading span {
  color: #087e9f;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin-top: 8px;
  color: #172c40;
  font-size: clamp(1.75rem, 3vw, 2.65rem);
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 42px;
  background: #dde6ea;
  border: 1px solid #dde6ea;
  border-radius: 16px;
  overflow: hidden;
}

.capability-grid article {
  min-height: 210px;
  padding: 30px;
  background: #fff;
}

.capability-grid article > span { color: #8aa0ae; font-family: var(--font-display); font-size: 0.72rem; font-weight: 800; }
.capability-grid h3 { margin: 36px 0 10px; color: #22384b; font-size: 1rem; }
.capability-grid p { color: #718190; font-size: 0.82rem; line-height: 1.7; }

.public-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 22px clamp(28px, 7vw, 110px);
  color: #7b8b98;
  background: #0f2636;
  font-size: 0.7rem;
}

.public-footer strong { color: #fff; }

@media (max-width: 1080px) {
  .app-sidebar { transform: translateX(-100%); transition: transform 0.2s ease; }
  .app-workspace { margin-left: 0; }
  .sidebar-toggle { display: inline-flex; }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgb(8 23 34 / 0.52);
    backdrop-filter: blur(2px);
  }
  .app-shell.sidebar-open .app-sidebar { transform: translateX(0); }
  .app-shell.sidebar-open .sidebar-backdrop { display: block; }
  .public-hero { grid-template-columns: 1fr; gap: 36px; }
  .public-hero-copy { max-width: 760px; }
  .public-visual-card { max-width: 600px; }
}

@media (max-width: 720px) {
  .app-topbar { height: 64px; padding: 0 16px; }
  .app-content { padding: 20px 16px 38px; }
  .topbar-right { display: none; }
  .topbar-eyebrow { display: none; }
  .app-body .hero-context-panel { padding: 18px; }
  .public-header { height: 70px; padding: 0 18px; }
  .public-header > .btn-stitch-primary { min-height: 40px; padding: 0 13px; font-size: 0.75rem; }
  .public-brand small { display: none; }
  .public-brand strong { font-size: 0.86rem; }
  .public-brand .app-brand-mark { width: 38px; height: 38px; }
  .public-hero { min-height: auto; padding: 58px 20px 54px; }
  .public-hero h1 { font-size: clamp(2.45rem, 13vw, 3.8rem); }
  .public-trust-row { grid-template-columns: 1fr; gap: 16px; }
  .public-trust-row > div + div { padding-left: 0; border-left: 0; }
  .public-visual { padding: 8px 0; }
  .public-visual-card { padding: 18px; border-radius: 16px; }
  .visual-card-footer { align-items: flex-start; flex-direction: column; }
  .public-capabilities { padding: 62px 20px 70px; }
  .capability-grid { grid-template-columns: 1fr; }
  .capability-grid article { min-height: 180px; }
  .public-footer { align-items: flex-start; flex-direction: column; padding: 22px 20px; }
}

/* Compact Flowbite-inspired top navigation for the small clinical workflow. */
@media (min-width: 1px) {
  .app-shell {
    display: flex;
    flex-direction: column;
  }

  .app-workspace {
    display: contents;
    margin-left: 0;
  }

  .app-topbar {
    display: none;
  }

  .app-sidebar {
    order: 0;
    position: sticky;
    inset: auto;
    width: 100%;
    min-height: 64px;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    padding: 10px 24px;
    color: #F5EFEB;
    background: linear-gradient(90deg, #2b0b15 0%, #3d0f1e 40%, #53172a 100%);
    border-right: 0;
    border-bottom: 1px solid rgba(232, 213, 196, 0.18);
    box-shadow: 0 4px 20px -2px rgba(43, 11, 21, 0.28);
  }

  .app-brand {
    flex: 0 0 auto;
    color: #FAF7F2;
  }

  .app-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #c85a32 0%, #a43d1a 100%);
    box-shadow: 0 4px 12px rgba(200, 90, 50, 0.35);
    color: #ffffff;
  }

  .app-brand-copy small,
  .sidebar-context,
  .sidebar-section-label {
    display: none;
  }

  .sidebar-nav {
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .sidebar-link {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    color: #E8D5C4;
    transition: all 0.15s ease-in-out;
  }

  .sidebar-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.09);
  }

  .sidebar-link.active {
    color: #ffffff;
    background: rgba(200, 90, 50, 0.2);
    box-shadow: inset 0 -3px #c85a32;
    border-color: rgba(200, 90, 50, 0.3);
  }

  .sidebar-footer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    border-top: 0;
  }

  .sidebar-profile {
    margin: 0;
    padding: 4px;
  }

  .sidebar-profile .profile-avatar {
    background: #53172a;
    color: #FAF7F2;
    border: 1px solid rgba(232, 213, 196, 0.35);
    box-shadow: 0 2px 6px rgba(43, 11, 21, 0.25);
  }

  .sidebar-profile .profile-copy,
  .sidebar-profile > svg,
  .sidebar-signout svg {
    display: none;
  }

  .sidebar-signout {
    width: auto;
    min-height: 36px;
    padding: 0 8px;
    font-size: 0;
    color: #E8D5C4;
    background: transparent;
    border: 1px solid rgba(232, 213, 196, 0.16);
    border-radius: 8px;
    transition: all 0.15s ease-in-out;
  }

  .sidebar-signout:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
  }

  .sidebar-signout svg {
    display: block;
  }

  .sidebar-toggle,
  .sidebar-backdrop {
    display: none !important;
  }

  .app-content {
    order: 1;
  }

  /* Ignore the old desktop sidebar-collapse preference after the rail is removed. */
  .app-shell.sidebar-collapsed .app-sidebar {
    width: 100%;
    padding: 10px 24px;
    align-items: center;
  }

  .app-shell.sidebar-collapsed .app-brand-copy,
  .app-shell.sidebar-collapsed .sidebar-link span,
  .app-shell.sidebar-collapsed .sidebar-profile > div,
  .app-shell.sidebar-collapsed .sidebar-signout {
    display: initial !important;
  }

  .app-shell.sidebar-collapsed .sidebar-context,
  .app-shell.sidebar-collapsed .sidebar-section-label {
    display: none !important;
  }

  .app-shell.sidebar-collapsed .sidebar-nav {
    width: auto;
    align-items: center;
  }

  .app-shell.sidebar-collapsed .sidebar-link {
    width: auto;
    margin: 0;
    padding: 0 12px;
  }

  .app-shell.sidebar-collapsed .sidebar-footer {
    width: auto;
    padding-top: 0;
  }
}

@media (max-width: 720px) {
  .app-sidebar {
    min-height: 58px;
    gap: 10px;
    padding: 8px 14px;
  }

  .app-brand-copy {
    display: none;
  }

  .sidebar-nav {
    gap: 2px;
  }

  .sidebar-link {
    padding: 0 10px;
  }

  .sidebar-link svg {
    display: none;
  }
}

/* Professional staff authentication */
.auth-body {
  display: block;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background-color: #FAF6F0;
  color: #271e20;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(360px, 0.95fr);
  background: #FAF6F0;
}

@media (min-width: 901px) {
  .login-shell {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
  }
}

.login-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(24px, 3.5vh, 40px) clamp(32px, 5vw, 64px);
  color: #F5EFEB;
  background:
    radial-gradient(circle at 18% 12%, rgba(200, 90, 50, 0.28), transparent 32%),
    radial-gradient(circle at 92% 88%, rgba(83, 23, 42, 0.45), transparent 42%),
    linear-gradient(145deg, #2b0b15 0%, #3d0f1e 48%, #53172a 100%);
  border-right: 1px solid rgba(232, 213, 196, 0.16);
}

.login-brand-panel::after {
  content: '';
  width: 480px;
  height: 480px;
  position: absolute;
  top: 15%;
  right: -220px;
  border: 1px solid rgba(232, 213, 196, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 60px rgba(232, 213, 196, 0.035), 0 0 0 130px rgba(232, 213, 196, 0.02);
  pointer-events: none;
}

.login-brand-top,
.login-brand-footer,
.login-brand-lockup,
.login-network-status,
.login-brand-footer span {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}

.login-brand-top {
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
}

.login-brand-lockup {
  gap: 12px;
  color: #FAF7F2;
  text-decoration: none;
}

.login-brand-lockup:hover {
  color: #FAF7F2;
}

.login-logo-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 3px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(43, 11, 21, 0.35);
}

.login-brand-lockup > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.login-brand-lockup strong {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #FAF7F2;
}

.login-brand-lockup small {
  color: #E8D5C4;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.login-network-status {
  gap: 8px;
  color: #E8D5C4;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 253, 249, 0.08);
  padding: 5px 11px;
  border-radius: 20px;
  border: 1px solid rgba(232, 213, 196, 0.18);
}

.login-network-status i {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.login-brand-content {
  position: relative;
  z-index: 1;
  max-width: 540px;
  margin: auto;
  padding: clamp(20px, 4vh, 48px) 0;
  flex: 0 1 auto;
}

.login-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #c85a32;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(200, 90, 50, 0.14);
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid rgba(200, 90, 50, 0.32);
}

.login-brand-content h1 {
  margin: 12px 0 10px;
  color: #FAF7F2;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.login-brand-content > p {
  max-width: 480px;
  color: #E8D5C4;
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}

.login-workflow {
  display: grid;
  gap: 8px;
  margin-top: clamp(16px, 2.5vh, 28px);
}

.login-workflow > div {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: rgba(255, 253, 249, 0.06);
  border: 1px solid rgba(232, 213, 196, 0.14);
  border-radius: 10px;
  backdrop-filter: blur(8px);
}

.login-workflow > div > span.workflow-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #c85a32 0%, #a43d1a 100%);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(200, 90, 50, 0.3);
  flex-shrink: 0;
}

.login-workflow-meta {
  display: flex;
  flex-direction: column;
}

.login-workflow strong {
  color: #FAF7F2;
  font-size: 0.88rem;
  font-weight: 700;
}

.login-workflow small {
  margin-top: 1px;
  color: #E8D5C4;
  font-size: 0.76rem;
}

.login-brand-footer {
  justify-content: space-between;
  gap: 14px;
  color: #E8D5C4;
  font-size: 0.78rem;
  padding-top: 14px;
  border-top: 1px solid rgba(232, 213, 196, 0.12);
  flex: 0 0 auto;
}

.login-brand-footer span {
  gap: 6px;
}

.login-brand-footer strong {
  color: #FAF7F2;
}

.login-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(20px, 3vh, 36px) clamp(24px, 4vw, 56px);
  background: #FAF6F0;
  position: relative;
  overflow-y: auto;
}

.login-form-wrap {
  width: 100%;
  max-width: 430px;
  margin: auto;
  background: #FFFDF9;
  border: 1px solid #E8D5C4;
  border-radius: 18px;
  padding: clamp(22px, 3vh, 32px) clamp(22px, 3vw, 34px);
  box-shadow: 0 8px 26px -4px rgba(43, 11, 21, 0.06), 0 2px 6px rgba(43, 11, 21, 0.04);
}

.login-heading {
  margin-bottom: 20px;
}

.login-heading h2 {
  margin: 0 0 4px;
  color: #53172a;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  letter-spacing: -0.025em;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.login-field label,
.login-label-row {
  color: #53172a;
  font-size: 0.8rem;
  font-weight: 700;
}

.login-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.login-label-row a {
  color: #c85a32;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.login-label-row a:hover {
  color: #b94c24;
  text-decoration: underline;
}

.login-input-wrap {
  position: relative;
}

.login-input-wrap > .input-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  z-index: 1;
  color: #705058;
  transform: translateY(-50%);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-input-wrap input {
  width: 100%;
  min-height: 44px;
  padding: 0 42px 0 40px;
  color: #271e20;
  background: #FAF6F0;
  border: 1.5px solid #E8D5C4;
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.15s ease-in-out;
}

.login-input-wrap input::placeholder {
  color: #8c7178;
}

.login-input-wrap input:focus {
  outline: none;
  background: #FFFDF9;
  border-color: #c85a32;
  box-shadow: 0 0 0 3px rgba(200, 90, 50, 0.18);
}

.login-input-wrap input.input-has-error {
  border-color: #dc2626;
  background: #fef2f2;
}

.field-error-text {
  color: #b91c1c;
  font-size: 0.76rem;
  font-weight: 700;
  margin-top: 3px;
}

.login-password-toggle {
  width: 36px;
  min-height: 36px;
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 0;
  color: #705058;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login-password-toggle:hover {
  color: #53172a;
  background: #E8D5C4;
}

.login-submit {
  min-height: 44px;
  margin-top: 4px;
  color: #ffffff;
  background: linear-gradient(135deg, #c85a32 0%, #a43d1a 100%);
  border: 0;
  border-radius: 9px;
  box-shadow: 0 3px 12px rgba(200, 90, 50, 0.32);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease-in-out;
}

.login-submit:hover {
  background: linear-gradient(135deg, #b94c24 0%, #903414 100%);
  box-shadow: 0 5px 16px rgba(200, 90, 50, 0.42);
  transform: translateY(-1px);
}

.login-help {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 12px;
  color: #705058;
  background: #FAF6F0;
  border: 1px solid #E8D5C4;
  border-radius: 9px;
  font-size: 0.76rem;
  line-height: 1.45;
}

.login-help .material-symbols-outlined,
.login-help svg {
  flex: 0 0 auto;
  color: #c85a32;
  font-size: 18px;
}

.login-help strong {
  display: inline;
  color: #53172a;
  font-weight: 700;
}

.login-form-footer {
  margin-top: 16px;
  color: #705058;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
}

.stitch-error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand-panel {
    min-height: auto;
    padding: 20px 24px;
  }
  .login-brand-content {
    margin: 12px 0 16px;
    padding: 0;
  }
  .login-brand-content h1 {
    font-size: 1.65rem;
    margin: 8px 0;
    line-height: 1.2;
  }
  .login-brand-content > p {
    font-size: 0.82rem;
    line-height: 1.4;
    display: none;
  }
  .login-workflow { display: none; }
  .login-brand-footer { display: none; }
  .login-form-panel {
    min-height: auto;
    padding: 28px 24px 24px;
  }
  .login-form-wrap { max-width: 480px; }
  .login-back-link { margin-bottom: 20px; }
  .login-heading { margin-bottom: 22px; }
  .login-heading h2 { font-size: 1.6rem; margin: 0 0 4px; }
  .login-security-icon { width: 36px; height: 36px; margin-bottom: 12px; }
  .login-help { margin-top: 18px; padding: 10px 12px; }
  .login-form-footer { margin-top: 24px; padding-top: 16px; }
}

@media (max-width: 560px) {
  .login-brand-panel { padding: 16px 18px; }
  .login-network-status { display: none; }
  .login-brand-content { margin: 8px 0 10px; }
  .login-brand-content h1 { font-size: 1.4rem; }
  .login-form-panel { padding: 22px 18px 20px; }
  .login-heading h2 { font-size: 1.45rem; }
}

/* Appointment booking workspace */
.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: #8a99a7;
  font-size: 0.72rem;
  font-weight: 600;
}

.page-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #64798a;
  font-size: inherit;
}

.page-breadcrumb a:hover { color: var(--color-primary); }
.page-breadcrumb > span:last-child { color: #32485b; }

.appointment-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

.page-kicker {
  color: #087e9f;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.appointment-page-header h1 {
  margin: 7px 0 7px;
  color: #152a3d;
  font-size: clamp(1.75rem, 2.5vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.045em;
}

.appointment-page-header p {
  max-width: 650px;
  color: #708191;
  font-size: 0.85rem;
  line-height: 1.6;
}

.appointment-header-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.appointment-header-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  color: #5f7383;
  background: #fff;
  border: 1px solid #dce5e9;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 650;
  white-space: nowrap;
}

.appointment-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: start;
}

.appointment-form-card,
.appointment-summary-card,
.appointment-readiness-card {
  background: #fff;
  border: 1px solid #dae4e8;
  border-radius: 16px;
  box-shadow: 0 2px 7px rgb(19 47 64 / 0.035);
}

.appointment-form-card {
  overflow: hidden;
  animation: ui-rise 0.42s cubic-bezier(.2,.8,.2,1) both;
}

.appointment-section {
  padding: 26px 28px 28px;
}

.appointment-section + .appointment-section {
  border-top: 1px solid #e5ebee;
}

.appointment-section-heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  margin-bottom: 22px;
}

.appointment-step {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #087e9f;
  background: #eaf6f8;
  border: 1px solid #d2eaee;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 800;
}

.appointment-section-heading h2 {
  margin: 0 0 3px;
  color: #203548;
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.appointment-section-heading p {
  color: #81909d;
  font-size: 0.7rem;
  line-height: 1.45;
}

.section-state {
  margin-top: 5px;
  padding: 4px 8px;
  color: #8a98a4;
  background: #f6f8f9;
  border: 1px solid #e5ebee;
  border-radius: 999px;
  font-size: 0.59rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.section-state.complete {
  color: #287059;
  background: #edf8f3;
  border-color: #d5ece2;
}

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

.appointment-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.appointment-field-full { width: 100%; }

.appointment-field label {
  color: #34495b;
  font-size: 0.72rem;
  font-weight: 700;
}

.appointment-field label span { color: #d95c65; }

.appointment-input-shell {
  min-width: 0;
  position: relative;
}

.appointment-input-shell > svg {
  position: absolute;
  top: 50%;
  left: 15px;
  z-index: 2;
  color: #7d909e;
  transform: translateY(-50%);
  pointer-events: none;
}

.appointment-control {
  width: 100% !important;
  min-height: 48px;
  padding: 0 42px 0 44px !important;
  color: #263c4e;
  background-color: #fbfcfd !important;
  border: 1px solid #d6e0e5 !important;
  border-radius: 10px !important;
  font-size: 0.8rem !important;
  font-weight: 550;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

select.appointment-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236a7d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.appointment-control:hover { border-color: #bdccd3 !important; }

.appointment-control:focus {
  background-color: #fff !important;
  border-color: #168eaa !important;
  box-shadow: 0 0 0 3px rgb(22 142 170 / 0.12) !important;
}

.appointment-field-help {
  color: #8a98a4;
  font-size: 0.64rem;
  line-height: 1.4;
}

.appointment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 28px;
  background: #f8fafb;
  border-top: 1px solid #dfe7eb;
}

.appointment-actions > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.appointment-save-note {
  color: #7f8f9c;
  font-size: 0.65rem;
}

.appointment-save-note svg { color: #648696; }
.appointment-submit { min-width: 190px; }

.appointment-summary-column {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.appointment-summary-card {
  padding: 20px;
  animation: ui-rise 0.42s 0.06s cubic-bezier(.2,.8,.2,1) both;
}

.appointment-summary-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 17px;
  border-bottom: 1px solid #e4ebee;
}

.appointment-summary-header > div { display: flex; flex-direction: column; gap: 3px; }

.appointment-summary-header > div > span {
  color: #8a9aa7;
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.appointment-summary-header h2 {
  color: #22384a;
  font-size: 0.92rem;
  font-weight: 800;
}

.summary-status {
  padding: 4px 8px;
  color: #946a20;
  background: #fff8e7;
  border: 1px solid #f3e2b5;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-status.complete {
  color: #287059;
  background: #edf8f3;
  border-color: #d5ece2;
}

.appointment-summary-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 9px 10px;
  background: #f8fafb;
  border: 1px solid #e6ecef;
  border-radius: 10px;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.summary-row.complete {
  background: #f4faf8;
  border-color: #daeae4;
}

.summary-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #708593;
  background: #fff;
  border: 1px solid #dfe7ea;
  border-radius: 9px;
}

.summary-row.complete .summary-icon { color: #16836c; }
.summary-row > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.summary-row small { color: #8a98a4; font-size: 0.59rem; }
.summary-row strong { overflow: hidden; color: #3a4f60; font-size: 0.7rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

.summary-row.summary-updated {
  animation: summary-pulse 0.38s ease;
}

.appointment-readiness-card {
  padding: 19px 20px;
  animation: ui-rise 0.42s 0.1s cubic-bezier(.2,.8,.2,1) both;
}

.appointment-readiness-card h3 { color: #2d4355; font-size: 0.78rem; font-weight: 800; }
.appointment-readiness-card > p { margin-top: 3px; color: #8a98a4; font-size: 0.63rem; }
.appointment-readiness-card ul { display: flex; flex-direction: column; gap: 9px; margin-top: 15px; list-style: none; }

.appointment-readiness-card li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #85939f;
  font-size: 0.66rem;
  font-weight: 600;
  transition: color 0.18s ease;
}

.appointment-readiness-card li > span {
  width: 16px;
  height: 16px;
  position: relative;
  background: #f2f5f6;
  border: 1px solid #dbe4e8;
  border-radius: 50%;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.appointment-readiness-card li.complete { color: #376a59; }
.appointment-readiness-card li.complete > span { background: #299374; border-color: #299374; }
.appointment-readiness-card li.complete > span::after {
  content: '';
  width: 6px;
  height: 3px;
  position: absolute;
  top: 4px;
  left: 4px;
  border: solid #fff;
  border-width: 0 0 1.5px 1.5px;
  transform: rotate(-45deg);
}

.appointment-assurance {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 15px;
  color: #5a7382;
  background: #eef7f9;
  border: 1px solid #d8e9ed;
  border-radius: 12px;
  animation: ui-rise 0.42s 0.14s cubic-bezier(.2,.8,.2,1) both;
}

.appointment-assurance > svg { flex: 0 0 auto; margin-top: 1px; color: #17839d; }
.appointment-assurance p { display: flex; flex-direction: column; gap: 3px; }
.appointment-assurance strong { color: #315264; font-size: 0.68rem; }
.appointment-assurance span { color: #6f8490; font-size: 0.61rem; line-height: 1.45; }

@keyframes ui-rise {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes summary-pulse {
  0%, 100% { transform: translateX(0); }
  45% { transform: translateX(3px); }
}

@media (max-width: 900px) {
  .appointment-page-header { align-items: flex-start; flex-direction: column; gap: 16px; }
  .appointment-header-meta { justify-content: flex-start; }
  .appointment-workspace { grid-template-columns: 1fr; }
  .appointment-summary-column { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .appointment-summary-card { grid-row: span 2; }
}

@media (min-width: 901px) and (max-width: 1120px) {
  .appointment-fields-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .appointment-fields-grid { grid-template-columns: 1fr; }
  .appointment-section { padding: 22px 18px 24px; }
  .appointment-section-heading { grid-template-columns: 32px minmax(0, 1fr); }
  .section-state { display: none; }
  .appointment-actions { align-items: stretch; flex-direction: column; padding: 16px 18px; }
  .appointment-actions > div { justify-content: flex-end; }
  .appointment-save-note { display: none !important; }
  .appointment-submit { min-width: 0; flex: 1; }
  .appointment-summary-column { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Appointment operations schedule */
.sr-only {
  width: 1px !important;
  height: 1px !important;
  position: absolute !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ==========================================================================
   Compact Clinical Schedule View (Fold-First Data Density)
   ========================================================================== */

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

.schedule-header-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.schedule-header-left h1 {
  margin: 0;
  color: #090d16;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.schedule-header-left .page-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #087ea4;
  margin: 0;
}

.schedule-header-subtitle {
  color: #1e293b;
  font-size: 0.85rem;
  font-weight: 500;
}

.schedule-primary-action {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Compact Combined Toolbar: Date Controls + Quick Metric Filter Ribbon */
.schedule-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  flex-wrap: wrap;
}

/* Date Navigator */
.schedule-date-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.schedule-icon-button {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  transition: all 0.15s ease;
}

.schedule-icon-button:hover {
  color: #087ea4;
  background: #e0f2fe;
  border-color: #7dd3fc;
}

.schedule-date-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.schedule-date-form input {
  height: 32px;
  min-height: 32px;
  padding: 0 8px;
  color: #090d16;
  font-size: 0.85rem;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
}

.schedule-date-form .btn-today {
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.schedule-date-form .btn-today:hover {
  background: #e2e8f0;
}

.schedule-date-display {
  font-size: 0.88rem;
  font-weight: 700;
  color: #090d16;
  margin-left: 4px;
}

/* Inline Metric Filter Ribbon */
.schedule-metrics-ribbon {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.schedule-metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid transparent;
  background: #f8fafc;
  color: #0f172a;
  transition: all 0.15s ease;
}

.schedule-metric-chip strong {
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
  font-weight: 800;
  color: #090d16;
}

.metric-chip-total { background: #f1f5f9; border-color: #cbd5e1; color: #090d16; }
.metric-chip-scheduled { background: #e0f2fe; border-color: #bae6fd; color: #0369a1; }
.metric-chip-waiting { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.metric-chip-completed { background: #dcfce7; border-color: #bbf7d0; color: #166534; }

/* Workspace Split: Main Table & Live Queue */
.schedule-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
  align-items: start;
}

.schedule-table-card,
.queue-card {
  min-width: 0;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.schedule-card-header,
.queue-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-container);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.schedule-card-header h2,
.queue-card-header h2 {
  margin: 0;
  color: var(--color-secondary);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.schedule-count {
  padding: 2px 7px;
  color: var(--color-secondary);
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

/* Scrollable Container with Sticky Table Header */
.schedule-table-scroll {
  max-height: calc(100vh - 180px);
  min-height: 380px;
  overflow-y: auto;
  overflow-x: auto;
  position: relative;
}

.schedule-table {
  width: 100%;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  border-collapse: collapse;
}

.schedule-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.schedule-table th {
  height: 38px;
  padding: 0 12px;
  color: #090d16;
  background: #f1f5f9;
  border-bottom: 2px solid #cbd5e1;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.schedule-actions-heading { text-align: right; }

.schedule-table td {
  height: 52px;
  padding: 8px 12px;
  vertical-align: middle;
  border-bottom: 1px solid #e2e8f0;
  color: #090d16;
}

.schedule-table tbody tr:last-child td { border-bottom: 0; }
.schedule-table tr:hover td { background: #f8fafc; }

.schedule-time-cell strong {
  display: block;
  color: #090d16;
  font-size: 0.95rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.schedule-time-cell span {
  color: #1e293b;
  font-size: 0.72rem;
  font-weight: 700;
}

.schedule-patient {
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
}

.schedule-patient:hover strong { color: #0284c7; }

.schedule-avatar {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.schedule-patient > span:last-child,
.schedule-care { min-width: 0; display: flex; flex-direction: column; gap: 1px; }

.schedule-patient strong,
.schedule-care strong {
  overflow: hidden;
  color: #090d16;
  font-size: 0.88rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-patient small,
.schedule-care span {
  color: #1e293b;
  font-size: 0.74rem;
  font-weight: 600;
}

.clinical-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  color: #090d16;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.clinical-status i { width: 6px; height: 6px; background: #475569; border-radius: 50%; }
.clinical-status.status-scheduled { color: #0369a1; background: #e0f2fe; border-color: #bae6fd; }
.clinical-status.status-scheduled i { background: #0284c7; }
.clinical-status.status-checked_in { color: #92400e; background: #fef3c7; border-color: #fde68a; }
.clinical-status.status-checked_in i { background: #d97706; }
.clinical-status.status-in_progress { color: #0e7490; background: #cffafe; border-color: #a5f3fc; }
.clinical-status.status-in_progress i { background: #0891b2; box-shadow: 0 0 0 2px rgba(8, 145, 178, 0.2); }
.clinical-status.status-completed { color: #166534; background: #dcfce7; border-color: #bbf7d0; }
.clinical-status.status-completed i { background: #16a34a; }
.clinical-status.status-cancelled,
.clinical-status.status-no_show { color: #991b1b; background: #fee2e2; border-color: #fecaca; }
.clinical-status.status-cancelled i,
.clinical-status.status-no_show i { background: #dc2626; }

.schedule-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.schedule-actions form { display: inline-flex; margin: 0; }

.row-action-primary,
.row-action-secondary,
.row-action-success {
  min-height: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.row-action-primary { color: #ffffff; background: #0284c7; border: 1px solid #0284c7; }
.row-action-primary:hover { background: #0369a1; }
.row-action-secondary { color: #090d16; background: #ffffff; border: 1px solid #cbd5e1; }
.row-action-secondary:hover { background: #f1f5f9; color: #0284c7; }
.row-action-success { color: #ffffff; background: #16a34a; border: 1px solid #16a34a; }
.row-action-success:hover { background: #15803d; }

.row-more-menu summary {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  list-style: none;
}
.row-more-menu summary::-webkit-details-marker { display: none; }
.row-more-menu[open] summary { color: #0284c7; background: #e0f2fe; border-color: #7dd3fc; }
.row-more-menu > div {
  min-width: 150px;
  position: absolute;
  right: 0;
  z-index: 30;
  padding: 4px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
}
.row-more-menu form { width: 100%; display: flex; flex-direction: column; }
.row-more-menu button {
  min-height: 30px;
  justify-content: flex-start;
  padding: 0 8px;
  color: #090d16;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.row-more-menu button:hover { background: #f1f5f9; }
.row-more-menu button.danger { color: #dc2626; }
.row-more-menu button.danger:hover { background: #fee2e2; }

/* Empty State */
.schedule-empty-state {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 20px;
}
.schedule-empty-state strong { color: #090d16; font-size: 0.92rem; font-weight: 800; }
.schedule-empty-state p { margin: 4px 0 12px; color: #1e293b; font-size: 0.82rem; font-weight: 600; }

/* Live Queue Sidebar */
.queue-card {
  position: sticky;
  top: 70px;
  max-height: calc(100vh - 210px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.queue-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #166534;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.queue-live i {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: queue-pulse 2s ease-out infinite;
}

.queue-count {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 7px;
  font-size: 0.85rem;
  font-weight: 800;
}

.queue-list {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  overflow-y: auto;
  max-height: 480px;
}

.queue-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.queue-position {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
}

.queue-list strong { overflow: hidden; color: #090d16; font-size: 0.85rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.queue-list small { overflow: hidden; color: #1e293b; font-size: 0.74rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.queue-list time { color: #0369a1; font-size: 0.72rem; font-weight: 700; }
.queue-list li > div > span { width: max-content; margin-top: 2px; padding: 2px 6px; color: #090d16; background: #e2e8f0; border-radius: 4px; font-size: 0.7rem; font-weight: 700; }

.queue-list li.queue-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
}
.queue-empty > span {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #16a34a;
  flex: 0 0 auto;
}
.queue-empty > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.queue-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  color: #1e293b;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.72rem;
  font-weight: 700;
}

@media (max-width: 1080px) {
  .schedule-workspace { grid-template-columns: 1fr; }
  .queue-card { position: static; max-height: none; }
  .queue-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .schedule-control-bar { flex-direction: column; align-items: stretch; }
  .schedule-date-controls { flex-wrap: wrap; }
  .schedule-table-scroll { max-height: 500px; }
  .queue-list { grid-template-columns: 1fr; }
}

/* Patient directory */
.patient-directory-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.patient-directory-header h1 {
  margin: 7px 0 6px;
  color: #152a3d;
  font-size: clamp(1.8rem, 2.7vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.045em;
}

.patient-directory-header p {
  color: #718291;
  font-size: 0.84rem;
  line-height: 1.55;
}

.patient-register-action { min-width: 158px; }

.patient-search-card,
.patient-directory-card {
  background: #fff;
  border: 1px solid #d9e4e8;
  border-radius: 15px;
  box-shadow: 0 2px 8px rgb(20 46 62 / 0.035);
  animation: ui-rise 0.4s cubic-bezier(.2,.8,.2,1) both;
}

.patient-search-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px 20px;
}

.patient-search-heading,
.patient-search-form,
.patient-search-input,
.patient-identity-link,
.patient-open-record {
  display: flex;
  align-items: center;
}

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

.patient-search-heading { gap: 12px; }
.patient-search-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #087e9f;
  background: #eaf6f8;
  border-radius: 11px;
}
.patient-search-heading h2 { color: #23394b; font-size: 0.86rem; font-weight: 800; }
.patient-search-heading p { margin-top: 3px; color: #8897a2; font-size: 0.65rem; }

.patient-search-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.patient-search-main-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.patient-search-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.patient-filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.patient-filter-toggle-btn.has-active {
  background: #eaf6f8;
  border-color: #168da8;
  color: #087e9f;
  font-weight: 700;
}
.filter-count-badge {
  color: #087e9f;
  font-size: 0.65rem;
  line-height: 1;
}

.patient-filters-drawer {
  display: none;
  background: #f8fafb;
  border: 1px solid #e2eaed;
  border-radius: 12px;
  padding: 14px 18px;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 20px;
  font-size: 0.8125rem;
  color: #5f7584;
}
.patient-filters-drawer.is-open {
  display: flex;
}

.patient-filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.patient-filter-item label {
  font-weight: 700;
  color: #607887;
  font-size: 0.8125rem;
}
.patient-filter-item select,
.patient-filter-item input[type="date"] {
  min-height: 38px;
  padding: 0 10px;
  color: #304658;
  background: #fff;
  border: 1px solid #d8e3e7;
  border-radius: 8px;
  font: inherit;
}
.patient-filter-item select {
  min-width: 160px;
}
.date-input-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.date-input-group .btn-stitch-secondary {
  min-height: 38px;
  padding: 0 12px;
}
.patient-filter-actions {
  margin-left: auto;
}
.patient-filter-actions .btn-stitch-secondary {
  min-height: 38px;
}

.patient-search-input { min-width: 0; position: relative; flex: 1; color: #82929e; }
.patient-search-input svg { position: absolute; left: 13px; pointer-events: none; }
.patient-search-input input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px 0 40px;
  color: #304658;
  background: #f8fafb;
  border: 1px solid #d8e3e7;
  border-radius: 10px;
  font-size: 0.875rem;
}
.patient-search-input input:focus { background: #fff; border-color: #168da8; box-shadow: 0 0 0 3px rgb(8 126 164 / 0.1); outline: 0; }
.patient-search-input.is-loading svg { animation: patientSearchSpin 0.75s linear infinite; color: #087e9f; }
@keyframes patientSearchSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.patient-directory-card.is-loading .patient-table-scroll { opacity: 0.55; pointer-events: none; transition: opacity 0.15s ease; }
.patient-search-toolbar .btn-stitch-primary,
.patient-search-toolbar .btn-stitch-secondary { min-height: 44px; }

/* Table Sort Links */
.table-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  font-weight: inherit;
}
.table-sort-link:hover { color: #087e9f; }
.table-sort-link.is-sorted { color: #087e9f; font-weight: 800; }
.sort-icon { font-size: 0.8rem; opacity: 0.7; }

/* Kebab Actions Menu */
.patient-kebab-menu {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
}
.patient-kebab-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  color: #738794;
  cursor: pointer;
  transition: all 0.15s ease;
}
.patient-kebab-btn:hover,
.patient-kebab-btn.is-active {
  background: #eef4f6;
  color: #087e9f;
  border-color: #d8e6eb;
}
.patient-dropdown-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 1000;
  min-width: 175px;
  background: #FFFDF9;
  border: 1px solid #E8D5C4;
  border-radius: 10px;
  box-shadow: 0 10px 25px -4px rgba(43, 11, 21, 0.16), 0 3px 8px -1px rgba(43, 11, 21, 0.08);
  padding: 6px;
  display: none;
  text-align: left;
}
.patient-dropdown-popover.is-open {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.patient-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #53172a;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.12s ease;
  white-space: nowrap;
}
.patient-menu-item:hover {
  background: #FAF6F0;
  color: #c85a32;
}
.patient-menu-item.item-dossier {
  color: #c85a32;
}
.patient-menu-item.item-dossier:hover {
  background: #FAF6F0;
  color: #b94c24;
}

/* Pagination Bar */
.patient-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-top: 1px solid #e2eaed;
  background: #fff;
  flex-wrap: wrap;
}
.pagination-info {
  font-size: 0.8125rem;
  color: #607887;
}
.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-pagination {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #304658;
  background: #fff;
  border: 1px solid #d8e3e7;
  border-radius: 7px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.btn-pagination:hover:not(.is-disabled) {
  background: #f4f8fa;
  border-color: #087e9f;
  color: #087e9f;
}
.btn-pagination.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.pagination-pages {
  display: flex;
  align-items: center;
  gap: 4px;
}
.page-pill {
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #607887;
  border-radius: 7px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.page-pill:hover:not(.is-active) {
  background: #f1f5f7;
  color: #213749;
}
.page-pill.is-active {
  background: #087e9f;
  color: #fff;
}

.patient-directory-card { overflow: hidden; animation-delay: 0.05s; }
.patient-directory-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 17px;
  border-bottom: 1px solid #e2eaed;
}
.patient-directory-card-header h2 { margin-top: 4px; color: #213749; font-size: 1rem; font-weight: 800; }
.patient-result-count {
  padding: 6px 10px;
  color: #5f7584;
  background: #f4f7f8;
  border: 1px solid #e2e9ec;
  border-radius: 999px;
  font-size: 0.63rem;
  font-weight: 750;
}
.patient-table-scroll { overflow-x: auto; }
.patient-directory-table { width: 100%; min-width: 820px; table-layout: fixed; margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.patient-directory-table th:nth-child(1),
.patient-directory-table td:nth-child(1) { width: 26%; }
.patient-directory-table th:nth-child(2),
.patient-directory-table td:nth-child(2) { width: 16%; }
.patient-directory-table th:nth-child(3),
.patient-directory-table td:nth-child(3) { width: 22%; }
.patient-directory-table th:nth-child(4),
.patient-directory-table td:nth-child(4) { width: 18%; }
.patient-directory-table th:nth-child(5),
.patient-directory-table td:nth-child(5) { width: 18%; }
.patient-directory-table th { height: 44px; padding: 0 20px; color: #7c8d99; background: #f8fafb; border-bottom: 1px solid #e2eaed; font-size: 0.75rem; letter-spacing: 0.07em; }
.patient-directory-table td { height: 76px; padding: 12px 20px; vertical-align: middle; border-bottom-color: #e8edef; }
.patient-directory-table tbody tr:last-child td { border-bottom: 0; }
.patient-directory-table tbody tr:hover td { background: #fbfcfd; }
.patient-identity-link { gap: 11px; color: inherit; }
.patient-directory-avatar {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #397083;
  background: #eaf4f6;
  border: 1px solid #d8e9ed;
  border-radius: 11px;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 800;
}
.patient-identity-link > span:last-child,
.patient-cell-stack { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.patient-identity-link strong,
.patient-cell-stack strong { color: #304658; font-size: 0.875rem; font-weight: 750; }
.patient-identity-link small,
.patient-cell-stack small { color: #8b99a3; font-size: 0.75rem; }
.patient-identity-link:hover strong { color: #087e9f; }
.patient-mrn { color: #137b98; font-family: var(--font-display); font-size: 0.8125rem; font-weight: 800; white-space: nowrap; }
.patient-action-heading { text-align: right; }
.patient-action-cell { text-align: right; white-space: nowrap; }
.patient-open-record { justify-content: flex-end; gap: 5px; color: #087e9f; font-size: 0.8125rem; font-weight: 800; }
.patient-open-record:hover { color: #065f78; }
.patient-empty-state { min-height: 280px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.patient-empty-state > span { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 13px; color: #77909e; background: #eef5f7; border: 1px solid #dbe9ed; border-radius: 13px; }
.patient-empty-state strong { color: #354b5c; font-size: 0.8rem; }
.patient-empty-state p { margin: 5px 0 16px; color: #8b98a2; font-size: 0.66rem; }

@media (max-width: 980px) {
  .patient-search-main-row { flex-wrap: wrap; }
  .patient-search-input { min-width: 100%; }
  .patient-search-actions { width: 100%; justify-content: flex-end; }
  .patient-filters-drawer { flex-direction: column; align-items: stretch; gap: 12px; }
  .patient-filter-item { flex-direction: column; align-items: stretch; }
  .patient-filter-actions { margin-left: 0; }
}

@media (max-width: 680px) {
  .patient-directory-header { align-items: flex-start; flex-direction: column; gap: 16px; }
  .patient-search-heading { align-items: flex-start; }
  .patient-search-actions { flex-wrap: wrap; }
  .patient-search-actions button,
  .patient-search-actions a { flex: 1; min-height: 40px; justify-content: center; }
  .patient-directory-table { min-width: 0; table-layout: fixed; }
  .patient-directory-table th,
  .patient-directory-table td { padding-left: 8px; padding-right: 8px; overflow-wrap: anywhere; }
  .patient-directory-table th:nth-child(3),
  .patient-directory-table td:nth-child(3) { display: none; }
  .patient-directory-table th { font-size: 0.6875rem; }
  .patient-identity-link strong,
  .patient-cell-stack strong { font-size: 0.8125rem; }
  .patient-identity-link small,
  .patient-cell-stack small { font-size: 0.6875rem; }
  .patient-pagination-bar { flex-direction: column; align-items: center; text-align: center; gap: 12px; }
  .pagination-controls { flex-wrap: wrap; justify-content: center; }
}

/* Address Locality Autocomplete & Catchment Chips */
.address-autocomplete-wrapper {
  position: relative;
  width: 100%;
}

.address-quick-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.address-chip-label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

.address-chip-btn {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #334d5f;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.address-chip-btn:hover {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}

.address-suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  margin-top: 4px;
  background: #ffffff;
  border: 1px solid #d8e3e7;
  border-radius: 10px;
  box-shadow: 0 10px 25px -4px rgb(16 38 52 / 0.15), 0 2px 6px -1px rgb(16 38 52 / 0.08);
  max-height: 260px;
  overflow-y: auto;
  display: none;
}

.address-suggestions-dropdown.is-open {
  display: block;
}

.address-suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.1s ease;
}

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

.address-suggestion-item:hover,
.address-suggestion-item.is-selected {
  background: #f0f9ff;
}

.suggestion-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.suggestion-main-text {
  font-size: 0.8125rem;
  font-weight: 650;
  color: #213749;
}

.suggestion-sub-text {
  font-size: 0.72rem;
  color: #64748b;
}

.suggestion-badge {
  flex-shrink: 0;
  padding: 2px 6px;
  font-size: 0.65rem;
  font-weight: 750;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.suggestion-badge-local {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.suggestion-badge-map {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.suggestion-loading-state {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 0.75rem;
  color: #64748b;
  border-top: 1px solid #f1f5f9;
  background: #fafcfc;
}

/* Professional public hospital experience */
.public-body { background: #f5f8f7; }
.public-header { height: 84px; padding: 0 clamp(24px, 5vw, 80px); background: rgba(250, 252, 251, 0.96); border-bottom-color: #dce6e2; backdrop-filter: blur(18px); }
.public-brand .app-brand-mark { width: 44px; height: 44px; border-radius: 13px; background: #0b5f55; color: #fff; box-shadow: 0 7px 18px rgba(11, 95, 85, 0.18); }
.public-brand strong { font-family: 'Manrope', var(--font-sans); font-size: 1.03rem; letter-spacing: -0.02em; }
.public-brand small { color: #6c7f79; letter-spacing: 0.055em; }
.public-header-actions { display: flex; align-items: center; gap: 24px; }
.public-emergency-link { display: flex; flex-direction: column; padding-right: 24px; border-right: 1px solid #dce6e2; line-height: 1.2; }
.public-emergency-link small { color: #758680; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.public-emergency-link strong { color: #a43b35; font-family: 'Manrope', var(--font-sans); font-size: 0.92rem; }
.public-header .btn-stitch-primary, .hospital-hero .btn-stitch-primary { background: #0b5f55; border-radius: 10px; box-shadow: 0 8px 20px rgba(11, 95, 85, 0.14); }
.public-header .btn-stitch-primary:hover, .hospital-hero .btn-stitch-primary:hover { background: #084c44; }
.public-main { max-width: none; padding: 0; }

.hospital-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(420px, 0.94fr); gap: clamp(48px, 7vw, 112px); align-items: center; min-height: 680px; padding: 88px clamp(24px, 7vw, 112px) 96px; overflow: hidden; background: radial-gradient(circle at 86% 20%, rgba(178, 215, 203, 0.42), transparent 27%), linear-gradient(135deg, #f9fbfa 0%, #eef5f2 100%); }
.hospital-hero::before { content: ''; position: absolute; inset: 0; opacity: 0.28; pointer-events: none; background-image: linear-gradient(rgba(11, 95, 85, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(11, 95, 85, 0.08) 1px, transparent 1px); background-size: 56px 56px; mask-image: linear-gradient(90deg, transparent 0%, #000 70%); }
.hospital-hero-copy, .hospital-hero-art { position: relative; z-index: 1; }
.hospital-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; color: #0b5f55; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.hospital-eyebrow::before { content: ''; width: 30px; height: 2px; background: #d39a53; }
.hospital-hero h1 { max-width: 760px; color: #102c2a; font-family: 'Manrope', var(--font-sans); font-size: clamp(3rem, 5.6vw, 5.25rem); font-weight: 700; line-height: 1.04; letter-spacing: -0.055em; }
.hospital-hero h1 span { color: #0b5f55; }
.hospital-hero-lead { max-width: 650px; margin: 28px 0 0; color: #546a64; font-size: clamp(1rem, 1.4vw, 1.16rem); line-height: 1.75; }
.hospital-hero .public-actions { margin: 32px 0 0; }
.hospital-hero .public-primary-action { min-height: 52px; padding: 0 22px; }
.hospital-hero .public-access-note { color: #536b65; }
.hospital-assurance-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 700px; margin-top: 44px; padding-top: 28px; border-top: 1px solid #d5e1dd; }
.hospital-assurance-row > div { display: flex; align-items: center; gap: 11px; }
.hospital-assurance-row svg, .care-service-grid svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; flex: 0 0 auto; }
.hospital-assurance-row svg { color: #0b5f55; }
.hospital-assurance-row span { display: flex; flex-direction: column; }
.hospital-assurance-row strong { color: #173b37; font-size: 0.79rem; }
.hospital-assurance-row small { color: #778983; font-size: 0.68rem; }

.hospital-hero-art { min-height: 500px; display: flex; align-items: center; justify-content: center; }
.hospital-hero-art::before { content: ''; position: absolute; width: min(38vw, 530px); aspect-ratio: 1; border-radius: 50%; background: #dcebe6; border: 1px solid rgba(11, 95, 85, 0.1); }
.hospital-hero-art::after { content: ''; position: absolute; width: min(31vw, 430px); aspect-ratio: 1; border: 1px dashed rgba(11, 95, 85, 0.22); border-radius: 50%; }
.care-card { position: relative; z-index: 2; border: 1px solid rgba(255, 255, 255, 0.7); box-shadow: 0 28px 65px rgba(30, 68, 61, 0.16); }
.care-card-main { width: min(100%, 430px); padding: 34px; border-radius: 24px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(18px); }
.care-card-label { display: flex; align-items: center; gap: 8px; color: #697c76; font-size: 0.69rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.care-card-label span { width: 8px; height: 8px; border-radius: 50%; background: #43a28f; box-shadow: 0 0 0 4px #e0f0ec; }
.care-card-main h2 { margin: 20px 0 30px; color: #143a35; font-family: 'Manrope', var(--font-sans); font-size: clamp(1.65rem, 2.5vw, 2.25rem); line-height: 1.18; letter-spacing: -0.035em; }
.care-pathway { display: grid; gap: 2px; }
.care-pathway > div { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid #e7eeeb; }
.care-pathway > div > span { color: #b08349; font: 700 0.7rem/1 'Manrope', sans-serif; }
.care-pathway p { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.care-pathway strong { color: #173b37; font-size: 0.9rem; }
.care-pathway small { color: #7a8d87; font-size: 0.72rem; }
.care-card-emergency { position: absolute; right: -22px; bottom: 32px; display: flex; flex-direction: column; min-width: 190px; padding: 18px 20px; border-radius: 16px; background: #153e39; color: #fff; }
.care-card-emergency small { color: #b9cec8; font-size: 0.7rem; }
.care-card-emergency strong { margin: 3px 0; font: 700 1.4rem/1.2 'Manrope', sans-serif; }
.care-card-emergency span { color: #d7e5e1; font-size: 0.66rem; }
.care-pulse { position: absolute; left: 0; top: 62px; z-index: 3; display: flex; align-items: center; width: 125px; height: 46px; padding: 0 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 16px 34px rgba(30, 68, 61, 0.12); }
.care-pulse span { width: 26px; height: 1px; background: #b8cac5; }
.care-pulse i { width: 37px; height: 20px; margin: 0 3px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 22'%3E%3Cpath d='M0 12h9l4-9 6 17 5-12 3 4h13' fill='none' stroke='%230b5f55' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat; }

.care-services { padding: 96px clamp(24px, 7vw, 112px) 104px; background: #fff; }
.professional-heading { max-width: 720px; margin: 0 0 44px; text-align: left; }
.professional-heading > span { color: #b07b3c; }
.professional-heading h2 { color: #143a35; font: 700 clamp(2rem, 4vw, 3.3rem)/1.15 'Manrope', sans-serif; letter-spacing: -0.04em; }
.professional-heading p { margin-top: 16px; color: #647771; font-size: 1rem; line-height: 1.7; }
.care-service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.care-service-grid article { position: relative; min-height: 300px; padding: 30px; border: 1px solid #dce6e2; border-radius: 18px; background: #fbfcfc; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.care-service-grid article:hover { transform: translateY(-4px); border-color: #b8d0c8; box-shadow: 0 18px 38px rgba(23, 59, 55, 0.08); }
.service-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 13px; background: #e6f1ed; color: #0b5f55; }
.care-service-grid h3 { margin: 50px 0 12px; color: #173b37; font: 700 1.15rem/1.3 'Manrope', sans-serif; }
.care-service-grid p { color: #657a74; font-size: 0.88rem; line-height: 1.7; }
.care-service-grid article > small { position: absolute; left: 30px; bottom: 26px; color: #9b6e38; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }

.professional-trust-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 0 clamp(24px, 7vw, 112px); background: #123b36; color: #fff; }
.professional-trust-band > div { display: grid; grid-template-columns: 38px 1fr; gap: 15px; padding: 38px 32px; border-left: 1px solid rgba(255,255,255,0.12); }
.professional-trust-band > div:last-child { border-right: 1px solid rgba(255,255,255,0.12); }
.trust-index { color: #d4a467; font: 700 0.7rem/1.6 'Manrope', sans-serif; }
.professional-trust-band p { display: flex; flex-direction: column; }
.professional-trust-band strong { font: 700 0.9rem/1.5 'Manrope', sans-serif; }
.professional-trust-band small { color: #aec5bf; font-size: 0.75rem; line-height: 1.5; }
.public-footer { display: flex; justify-content: space-between; align-items: center; padding: 32px clamp(24px, 7vw, 112px); background: #0c2926; border-top: 1px solid rgba(255,255,255,0.08); }
.public-footer > div { display: flex; flex-direction: column; gap: 4px; }
.public-footer > div:last-child { text-align: right; }
.public-footer strong { font-family: 'Manrope', var(--font-sans); }
.public-footer span { color: #9eb6b0; font-size: 0.73rem; }

.hospital-hero-photo { position: relative; z-index: 1; min-width: 0; margin: 0; }
.hospital-hero-photo::before { content: ''; position: absolute; inset: -18px 22px 22px -18px; z-index: -1; border: 1px solid rgba(11, 95, 85, 0.2); border-radius: 30px; }
.hospital-hero-photo::after { content: ''; position: absolute; inset: 0; border-radius: 26px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45); pointer-events: none; }
.hospital-hero-photo > img { display: block; width: 100%; min-height: 560px; object-fit: cover; object-position: 56% center; border-radius: 26px; box-shadow: 0 34px 70px rgba(24, 60, 54, 0.2); }
.hospital-hero-photo figcaption { position: absolute; left: -34px; bottom: 30px; display: flex; align-items: center; gap: 12px; min-width: 245px; padding: 16px 18px; border: 1px solid rgba(255,255,255,0.7); border-radius: 15px; background: rgba(255,255,255,0.92); box-shadow: 0 16px 36px rgba(23,59,55,0.15); backdrop-filter: blur(16px); }
.photo-caption-mark { display: inline-flex; align-items: center; justify-content: center; width: 39px; height: 39px; color: #fff; background: #0b5f55; border-radius: 11px; }
.hospital-hero-photo figcaption > span:last-child { display: flex; flex-direction: column; }
.hospital-hero-photo figcaption strong { color: #173b37; font: 700 0.85rem/1.35 'Manrope', sans-serif; }
.hospital-hero-photo figcaption small { color: #71847e; font-size: 0.68rem; }
.photo-emergency { position: absolute; top: 25px; right: -22px; display: flex; flex-direction: column; padding: 14px 18px; color: #fff; background: #153e39; border: 1px solid rgba(255,255,255,0.18); border-radius: 13px; box-shadow: 0 14px 34px rgba(21,62,57,0.22); }
.photo-emergency small { color: #b9cec8; font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.08em; }
.photo-emergency strong { font: 700 1.1rem/1.4 'Manrope', sans-serif; }

@media (max-width: 1024px) {
  .hospital-hero { grid-template-columns: 1fr; padding-top: 70px; }
  .hospital-hero-photo { width: min(100%, 720px); margin: 0 auto; }
  .care-service-grid { grid-template-columns: 1fr; }
  .care-service-grid article { min-height: 245px; }
  .care-service-grid h3 { margin-top: 32px; }
  .professional-trust-band { grid-template-columns: 1fr; padding-top: 14px; padding-bottom: 14px; }
  .professional-trust-band > div, .professional-trust-band > div:last-child { border: 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
}

@media (max-width: 640px) {
  .public-header { height: 72px; padding: 0 18px; }
  .public-emergency-link { display: none; }
  .public-header-actions { gap: 10px; }
  .hospital-hero { min-height: auto; padding: 60px 20px 70px; gap: 44px; }
  .hospital-hero h1 { font-size: clamp(2.5rem, 12vw, 3.4rem); }
  .hospital-hero .public-actions { align-items: flex-start; flex-direction: column; }
  .hospital-assurance-row { grid-template-columns: 1fr; }
  .hospital-hero-photo > img { min-height: 460px; object-position: 62% center; }
  .hospital-hero-photo figcaption { left: 12px; right: 12px; bottom: 16px; min-width: 0; }
  .photo-emergency { top: 14px; right: 12px; }
  .care-services { padding: 70px 20px 76px; }
  .public-footer, .public-footer > div:last-child { align-items: flex-start; flex-direction: column; text-align: left; }
}

/* Stitch-generated public homepage implementation */
.public-body { --stitch-forest: #143628; --stitch-forest-dark: #0d241b; --stitch-ink: #1c2520; --stitch-muted: #4a5850; --stitch-linen: #faf8f5; --stitch-paper: #f4efea; --stitch-rule: #dcd3c7; --stitch-brass: #c2a676; --stitch-terracotta: #9e4b33; background: var(--stitch-linen); color: var(--stitch-ink); font-family: 'Plus Jakarta Sans', sans-serif; }
.stitch-utility-bar { display: flex; align-items: center; justify-content: space-between; min-height: 34px; padding: 6px clamp(24px, 5vw, 72px); color: #e9f3eb; background: var(--stitch-forest-dark); font-size: 0.68rem; letter-spacing: 0.025em; }
.stitch-utility-bar > div { display: flex; align-items: center; gap: 12px; }
.stitch-utility-bar strong { color: #ffb5a0; }
.utility-divider { width: 1px; height: 13px; background: rgba(255,255,255,.24); }
.public-header { position: sticky; top: 0; z-index: 20; height: 82px; padding: 0 clamp(24px, 5vw, 72px); background: rgba(250,248,245,.97); border-bottom: 1px solid var(--stitch-rule); backdrop-filter: blur(12px); }
.public-brand .app-brand-mark { width: 42px; height: 42px; color: var(--stitch-forest); background: var(--stitch-paper); border: 1px solid #b7b0a7; border-radius: 2px; box-shadow: none; }
.public-brand strong { color: var(--stitch-forest); font: 500 1.38rem/1 'Newsreader', serif; letter-spacing: -.025em; }
.public-brand small { margin-top: 5px; color: #71766f; font-size: .55rem; letter-spacing: .08em; text-transform: uppercase; }
.public-nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 34px); }
.public-nav a { color: var(--stitch-muted); font-size: .74rem; font-weight: 500; }
.public-nav a:hover { color: var(--stitch-forest); }
.public-header-actions { gap: 18px; }
.public-emergency-link { display: none; }
.public-header .btn-stitch-primary { min-height: 42px; padding: 0 18px; color: #fff; background: var(--stitch-forest); border-radius: 2px; box-shadow: none; }

.stitch-home-hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(390px, 5fr); gap: clamp(42px, 6vw, 86px); align-items: center; max-width: 1420px; margin: 0 auto; padding: clamp(70px, 8vw, 116px) clamp(24px, 5vw, 72px); }
.stitch-kicker, .stitch-section-label { display: inline-flex; padding: 6px 10px; color: var(--stitch-muted); background: #fff; border: 1px solid var(--stitch-rule); font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.stitch-home-copy h1 { max-width: 780px; margin: 24px 0 20px; color: var(--stitch-forest); font: 400 clamp(3.35rem, 5.7vw, 5.75rem)/.99 'Newsreader', serif; letter-spacing: -.045em; }
.stitch-home-copy > p { max-width: 690px; color: var(--stitch-muted); font-size: clamp(.98rem, 1.25vw, 1.16rem); line-height: 1.75; }
.stitch-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.stitch-action-primary, .stitch-action-emergency, .stitch-action-light { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 2px; font-size: .79rem; font-weight: 650; }
.stitch-action-primary { color: #fff; background: var(--stitch-forest); border: 1px solid var(--stitch-forest); }
.stitch-action-primary:hover { color: #fff; background: var(--stitch-forest-dark); }
.stitch-action-emergency { color: var(--stitch-terracotta); background: transparent; border: 1px solid var(--stitch-terracotta); }
.stitch-action-emergency:hover { color: #fff; background: var(--stitch-terracotta); }
.stitch-hero-note { display: flex; gap: 24px; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--stitch-rule); color: #6c756f; font-size: .68rem; }
.stitch-hero-note span { position: relative; padding-left: 13px; }
.stitch-hero-note span::before { content: ''; position: absolute; left: 0; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--stitch-brass); }
.stitch-hero-figure { margin: 0; padding: 10px; background: #fff; border: 1px solid var(--stitch-rule); }
.stitch-hero-figure img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.stitch-hero-figure figcaption { padding: 16px 8px 7px; }
.stitch-hero-figure figcaption strong { display: block; color: var(--stitch-forest); font: 500 1.12rem/1.35 'Newsreader', serif; }
.stitch-hero-figure figcaption span { color: #6b756f; font-size: .67rem; }

.stitch-credibility { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1420px; margin: 0 auto; border: solid var(--stitch-rule); border-width: 1px 0; }
.stitch-credibility article { display: grid; grid-template-columns: 24px 1fr; gap: 8px 13px; padding: 30px 26px; border-left: 1px solid var(--stitch-rule); }
.stitch-credibility article:last-child { border-right: 1px solid var(--stitch-rule); }
.stitch-credibility article > span { grid-row: 1/3; color: #927649; font-size: .62rem; font-weight: 700; }
.stitch-credibility strong { color: var(--stitch-forest); font: 500 1rem/1.2 'Newsreader', serif; }
.stitch-credibility small { color: #6b756f; font-size: .65rem; line-height: 1.5; }

.stitch-specialities { max-width: 1420px; margin: 0 auto; padding: 110px clamp(24px, 5vw, 72px); }
.stitch-specialities > header { display: grid; grid-template-columns: 170px minmax(280px, 1fr) minmax(260px, .85fr); gap: 32px; align-items: end; margin-bottom: 48px; }
.stitch-specialities > header > span { color: #927649; font-size: .68rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.stitch-specialities h2, .stitch-pathway h2, .stitch-portal-cta h2 { color: var(--stitch-forest); font: 400 clamp(2.4rem, 4vw, 4.25rem)/1.04 'Newsreader', serif; letter-spacing: -.035em; }
.stitch-specialities header p { color: var(--stitch-muted); font-size: .84rem; line-height: 1.7; }
.stitch-speciality-directory { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--stitch-brass); border-left: 1px solid var(--stitch-rule); }
.stitch-speciality-directory article { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 18px; min-height: 240px; padding: 28px; border-right: 1px solid var(--stitch-rule); border-bottom: 1px solid var(--stitch-rule); background: rgba(255,255,255,.28); }
.stitch-speciality-directory article > span { color: #927649; font-size: .63rem; font-weight: 700; }
.stitch-speciality-directory h3 { margin-bottom: 12px; color: var(--stitch-forest); font: 500 1.25rem/1.25 'Newsreader', serif; }
.stitch-speciality-directory p { color: var(--stitch-muted); font-size: .76rem; line-height: 1.65; }
.stitch-speciality-directory article > strong { position: absolute; right: 24px; bottom: 22px; color: #8b918d; font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; }

.stitch-pathway { display: grid; grid-template-columns: minmax(360px, 5fr) minmax(0, 7fr); gap: clamp(48px, 7vw, 100px); align-items: center; padding: 96px clamp(24px, 7vw, 110px); background: var(--stitch-paper); border: solid var(--stitch-rule); border-width: 1px 0; }
.stitch-pathway figure { margin: 0; padding: 9px; background: var(--stitch-linen); border: 1px solid var(--stitch-rule); }
.stitch-pathway img { display: block; width: 100%; min-height: 470px; object-fit: cover; }
.stitch-pathway h2 { margin: 24px 0 34px; }
.stitch-pathway ol { list-style: none; border-top: 1px solid var(--stitch-rule); }
.stitch-pathway li { display: grid; grid-template-columns: 42px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--stitch-rule); }
.stitch-pathway li > span { color: #927649; font-size: .65rem; font-weight: 700; }
.stitch-pathway li p { display: flex; justify-content: space-between; gap: 20px; }
.stitch-pathway li strong { color: var(--stitch-forest); font: 500 1.08rem/1.3 'Newsreader', serif; }
.stitch-pathway li small { max-width: 270px; color: var(--stitch-muted); font-size: .7rem; line-height: 1.55; }

.stitch-portal-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 60px; align-items: end; padding: 82px clamp(24px, 7vw, 110px); color: #fff; background: var(--stitch-forest-dark); }
.stitch-portal-cta > div > span { color: #d9c49e; font-size: .67rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.stitch-portal-cta h2 { max-width: 930px; margin: 18px 0; color: #fff; }
.stitch-portal-cta p { max-width: 750px; color: #b9c8c0; font-size: .84rem; line-height: 1.7; }
.stitch-action-light { color: var(--stitch-forest-dark); background: var(--stitch-linen); border: 1px solid var(--stitch-linen); white-space: nowrap; }
.stitch-action-light:hover { color: var(--stitch-forest-dark); background: #e9dfd2; }

.public-footer { padding: 34px clamp(24px, 5vw, 72px); background: #091c16; }

/* shadcn-inspired patient intake surface: quiet borders, clear focus, no new runtime dependency. */
.intake-layout-grid { align-items: start; }
.intake-sidebar,
.intake-main-card,
.intake-stepper-card,
.intake-id-preview-card { min-width: 0; }
.intake-stepper-card,
.intake-id-preview-card,
.intake-main-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}
.intake-stepper-card { padding: 1.25rem; }
.stepper-header { align-items: center; }
.stepper-badge {
  padding: .25rem .55rem;
  color: var(--color-text-muted);
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: .6875rem;
  font-weight: 700;
}
.intake-step-item { min-height: 64px; }
.intake-step-item:hover { background: #f8fafc !important; border-color: #cbd5e1 !important; }
.intake-step-item:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.intake-main-card { overflow: hidden; }
.form-hero-header { padding-bottom: 1.5rem; border-bottom: 1px solid var(--color-border); }
.form-main-heading { letter-spacing: -.025em; }
.intake-fieldset { background: var(--color-surface); }
.intake-legend { max-width: 100%; }
.age-mode-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: .6875rem;
  font-weight: 700;
}
.age-mode-toggle button:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.cohort-preview-box { min-height: 74px; }
.consent-compliance-bar { border: 1px solid #bbf7d0; border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.intake-actions-toolbar { flex-wrap: wrap; }

/* Keep the supporting cards together above a full-width registration form. */
.intake-layout-grid { grid-template-columns: minmax(0, 1fr); }
.intake-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.intake-main-card { width: 100%; }

@media (max-width: 680px) {
  .intake-legend { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .legend-title { white-space: normal; }
  .intake-fieldset { padding: 1.25rem; }
  .intake-actions-toolbar > div { width: 100%; justify-content: space-between; }
  .intake-actions-toolbar > div:last-child { justify-content: flex-end; }
}

@media (max-width: 768px) {
  .intake-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .public-nav { display: none; }
  .stitch-home-hero { grid-template-columns: 1fr; }
  .stitch-hero-figure { max-width: 760px; }
  .stitch-credibility { grid-template-columns: repeat(2, 1fr); }
  .stitch-specialities > header { grid-template-columns: 1fr; }
  .stitch-speciality-directory { grid-template-columns: repeat(2, 1fr); }
  .stitch-pathway { grid-template-columns: 1fr; }
  .stitch-pathway figure { max-width: 760px; }
  .stitch-portal-cta { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 650px) {
  .stitch-utility-bar { justify-content: center; }
  .stitch-utility-bar > div:last-child { display: none; }
  .public-header-actions .btn-stitch-primary { padding: 0 12px; font-size: .68rem; }
  .stitch-home-hero { padding-top: 60px; }
  .stitch-home-copy h1 { font-size: clamp(3rem, 14vw, 4.2rem); }
  .stitch-hero-actions { align-items: stretch; flex-direction: column; }
  .stitch-hero-note { align-items: flex-start; flex-direction: column; gap: 9px; }
  .stitch-credibility { grid-template-columns: 1fr; margin: 0 20px; }
  .stitch-credibility article, .stitch-credibility article:last-child { border-right: 1px solid var(--stitch-rule); }
  .stitch-specialities { padding-top: 76px; padding-bottom: 76px; }
  .stitch-speciality-directory { grid-template-columns: 1fr; }
  .stitch-pathway { padding-top: 70px; padding-bottom: 70px; }
  .stitch-pathway img { min-height: 330px; }
  .stitch-pathway li p { flex-direction: column; gap: 5px; }
  .stitch-portal-cta { gap: 32px; }
}

/* ==========================================================================
   Universal Voice Dictation & Audio Entry Styles
   ========================================================================== */
.voice-input-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.voice-input-wrapper input,
.voice-input-wrapper textarea {
  padding-right: 2.5rem !important;
}

.voice-dictation-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  min-height: 28px !important;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none !important;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  z-index: 5;
  transition: all 0.15s ease;
}

.voice-input-wrapper textarea ~ .voice-dictation-btn {
  top: 0.85rem;
  transform: none;
}

.voice-dictation-btn:hover {
  color: var(--color-primary);
  background-color: #f0f9ff;
}

.voice-dictation-btn.listening {
  color: #ffffff !important;
  background-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
  animation: voice-pulse 1.4s infinite ease-in-out;
}

.voice-input-active {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18) !important;
}

@keyframes voice-pulse {
  0% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.12); }
  100% { transform: translateY(-50%) scale(1); }
}

.voice-input-wrapper textarea ~ .voice-dictation-btn.listening {
  animation: voice-pulse-textarea 1.4s infinite ease-in-out;
}

@keyframes voice-pulse-textarea {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* Floating Voice Status Bar */
.voice-status-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 99999;
  background: #0f172a;
  color: #ffffff;
  padding: 0.65rem 1rem;
  border-radius: 9999px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
  font-family: var(--font-sans);
}

.voice-status-banner.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.voice-status-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
}

.voice-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.35);
  animation: dot-pulse 1s infinite alternate;
}

@keyframes dot-pulse {
  from { opacity: 0.5; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.25); }
}

.voice-lang-switch {
  display: flex;
  align-items: center;
  background: #1e293b;
  border-radius: 9999px;
  padding: 2px;
  margin-left: 0.5rem;
}

.voice-lang-btn {
  background: transparent;
  border: none !important;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem !important;
  min-height: 22px !important;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.voice-lang-btn.active {
  background: var(--color-primary);
  color: #ffffff;
}

.voice-status-stop {
  background: #334155;
  border: none !important;
  color: #f1f5f9;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem !important;
  min-height: 24px !important;
  border-radius: 9999px;
  cursor: pointer;
  margin-left: 0.35rem;
  transition: background 0.15s ease;
}

.voice-status-stop:hover {
  background: #ef4444;
}

/* Password management uses the authenticated shell and a compact Flowbite-style form card. */
.password-page {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 52px) 0;
}

.password-intro { margin-bottom: 22px; }
.password-eyebrow {
  color: #087e9f;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.password-intro h1,
.password-success-card h1 {
  margin: 7px 0 8px;
  color: #172b3d;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.1;
}
.password-intro p,
.password-success-card p { margin: 0; color: #647789; font-size: .94rem; }
.password-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; align-items: start; }
.password-card,
.password-note,
.password-success-card {
  padding: clamp(20px, 3vw, 30px);
  background: #fff;
  border: 1px solid #d9e3ea;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgb(23 43 61 / 0.06);
}
.password-field { margin-bottom: 18px; }
.password-field label { display: block; margin-bottom: 7px; color: #263d50; font-size: .82rem; font-weight: 800; }
.password-input-wrap { position: relative; }
.password-input-wrap input {
  width: 100%;
  min-height: 44px;
  padding: 0 62px 0 13px;
  color: #172b3d;
  background: #f8fafc;
  border: 1px solid #cbd8e1;
  border-radius: 8px;
  font: inherit;
}
.password-input-wrap input:focus { outline: 3px solid rgb(14 165 233 / .18); border-color: #0284c7; background: #fff; }
.password-toggle { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); padding: 5px; color: #087e9f; background: transparent; border: 0; font-size: .75rem; font-weight: 800; cursor: pointer; }
.password-help { margin-top: 6px; color: #718294; font-size: .74rem; line-height: 1.5; }
.password-help ul { margin: 6px 0 0 16px; padding: 0; }
.password-error { margin-top: 6px; color: #b42318; font-size: .76rem; font-weight: 700; }
.password-actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 24px; }
.password-cancel { color: #647789; font-size: .82rem; font-weight: 700; }
.password-submit { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 18px; color: #fff; background: #2563eb; border: 0; border-radius: 8px; font-size: .82rem; font-weight: 800; text-decoration: none; cursor: pointer; box-shadow: 0 5px 12px rgb(37 99 235 / .2); }
.password-submit:hover { background: #1d4ed8; color: #fff; }
.password-note { display: flex; gap: 11px; color: #2d5360; background: #effbfa; border-color: #bde8e0; }
.password-note-icon,
.password-success-icon { width: 26px; height: 26px; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; color: #087e6d; background: #c9f2e9; border-radius: 50%; font-weight: 900; }
.password-note strong { display: block; color: #164e63; font-size: .86rem; }
.password-note p { margin: 7px 0 0; color: #52717b; font-size: .77rem; line-height: 1.55; }
.password-success-card { max-width: 560px; margin: 30px auto; text-align: center; }
.password-success-icon { margin-bottom: 18px; }
.password-success-card .password-submit { margin-top: 22px; }
@media (max-width: 720px) { .password-layout { grid-template-columns: 1fr; } .password-actions { justify-content: stretch; } .password-submit { flex: 1; } }
