/**
 * VMHS UX — plain-language flows, large touch targets, guided forms
 * Loaded on public portal and staff dashboard.
 */

/* ─── Friendly system messages ─── */
.vmhs-messages-wrap {
  max-width: 48rem;
  margin: 0 auto 1rem;
  padding: 0 1rem;
}

/* Never reserve space when alerts did not render (defensive; template omits wrap when empty). */
.vmhs-messages-wrap:not(:has(.vmhs-alert-friendly)) {
  display: none;
  margin: 0;
  padding: 0;
}

.vmhs-app .vmhs-messages-wrap,
.vmhs-desktop-shell .vmhs-messages-wrap {
  max-width: none;
  margin-bottom: 0.75rem;
  padding: 0;
}

@media (min-width: 768px) {
  .vmhs-app .vmhs-messages-wrap,
  .vmhs-desktop-shell .vmhs-messages-wrap {
    margin-bottom: 1rem;
  }
}

.vmhs-public .main > .vmhs-messages-wrap {
  padding-top: 0.5rem;
  max-width: var(--app-max-w, 80rem);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.75rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .vmhs-public .main > .vmhs-messages-wrap {
    padding-top: 0.75rem;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.vmhs-messages-wrap--auth {
  max-width: none;
  margin: 0;
  padding: 0;
}

.vmhs-alert-friendly {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid transparent;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.vmhs-alert-friendly__icon {
  flex-shrink: 0;
  font-size: 1.25rem;
  margin-top: 0.1rem;
}

.vmhs-alert-friendly--success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.vmhs-alert-friendly--danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.vmhs-alert-friendly--warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.vmhs-alert-friendly--info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

/* ─── Form guidance ─── */
.vmhs-friendly-form .form-control,
.vmhs-friendly-form .form-select,
.vmhs-public .vmhs-friendly-form .form-control,
.vmhs-public .vmhs-friendly-form .form-select {
  min-height: 2.875rem;
  font-size: 0.9375rem;
  border-radius: 0.625rem;
  border-color: #d1dae3;
}

.vmhs-friendly-form .form-label,
.vmhs-field__label {
  font-weight: 600;
  font-size: 0.875rem;
  color: #0f1c2e;
  margin-bottom: 0.375rem;
}

.vmhs-required {
  font-weight: 500;
  font-size: 0.75rem;
  color: #b45309;
  margin-left: 0.35rem;
}

.vmhs-optional {
  font-weight: 400;
  font-size: 0.75rem;
  color: #64748b;
  margin-left: 0.35rem;
}

.vmhs-field__hint {
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: 0.35rem;
  line-height: 1.45;
}

.vmhs-field--error .form-control,
.vmhs-field--error .form-select {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.vmhs-field__error {
  color: #b91c1c;
  font-size: 0.8125rem;
  margin-top: 0.35rem;
}

.vmhs-form-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  margin-bottom: 1.25rem;
  color: #991b1b;
  font-size: 0.9375rem;
}

.vmhs-form-errors ul {
  margin: 0.5rem 0 0 1.1rem;
  padding: 0;
}

.vmhs-fieldset {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem 1.25rem 0.5rem;
  margin-bottom: 1.25rem;
  background: #fff;
}

.vmhs-fieldset__legend {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  padding: 0 0.35rem;
  margin-bottom: 0.75rem;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.vmhs-fieldset__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: #ccfbf1;
  color: var(--vmhs-primary-hover, #92400e);
  font-size: 0.8125rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ─── Help aside (what happens next) ─── */
.vmhs-help-panel {
  background: linear-gradient(165deg, #f0fdfa 0%, #fff 55%);
  border: 1px solid #99f6e4;
  border-radius: 1rem;
  padding: 1.25rem;
  position: sticky;
  top: 5.5rem;
}

.vmhs-help-panel__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--vmhs-primary-dark, #7a4f0a);
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.vmhs-help-panel__intro {
  font-size: 0.875rem;
  color: #475569;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.vmhs-help-panel__steps {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.vmhs-help-panel__steps li {
  display: flex;
  gap: 0.65rem;
  padding: 0.55rem 0;
  font-size: 0.875rem;
  color: #334155;
  border-bottom: 1px dashed #e2e8f0;
  line-height: 1.45;
}

.vmhs-help-panel__steps li:last-child {
  border-bottom: none;
}

.vmhs-help-panel__steps strong {
  display: block;
  color: #0f172a;
  font-size: 0.8125rem;
}

.vmhs-help-panel__step-num {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--vmhs-brand, #B7670F);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.vmhs-help-panel__contact {
  font-size: 0.8125rem;
  color: #64748b;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
  margin: 0;
  line-height: 1.5;
}

.vmhs-help-panel__contact a {
  color: var(--vmhs-brand, #B7670F);
  font-weight: 600;
  text-decoration: none;
}

/* ─── Path chooser (not sure?) ─── */
.vmhs-path-tip {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: #475569;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.vmhs-path-tip strong {
  color: #0f172a;
}

/* ─── Track ticket ─── */
.vmhs-track-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.vmhs-track-box .form-control {
  font-size: 1.0625rem;
  min-height: 3rem;
  letter-spacing: 0.02em;
}

.vmhs-track-hint {
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: 0.5rem;
}

.vmhs-empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: #f8fafc;
  border-radius: 1rem;
  border: 1px dashed #cbd5e1;
}

.vmhs-empty-state__icon {
  font-size: 2.5rem;
  color: #94a3b8;
  margin-bottom: 0.75rem;
}

.vmhs-empty-state__title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.vmhs-empty-state__text {
  font-size: 0.9375rem;
  color: #64748b;
  max-width: 28rem;
  margin: 0 auto 1rem;
  line-height: 1.5;
}

/* ─── Workflow steps (horizontal) ─── */
.vmhs-flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0;
  list-style: none;
}

.vmhs-flow-steps__item {
  flex: 1 1 8rem;
  min-width: 7rem;
  text-align: center;
  padding: 0.65rem 0.5rem;
  background: #f1f5f9;
  border-radius: 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.3;
}

.vmhs-flow-steps__item.is-active {
  background: #ccfbf1;
  color: var(--vmhs-primary-hover, #92400e);
  box-shadow: inset 0 0 0 2px var(--vmhs-brand, #B7670F);
}

.vmhs-flow-steps__item.is-done {
  background: #ecfdf5;
  color: #047857;
}

/* ─── Primary actions (larger, clearer) ─── */
.vmhs-btn-primary-lg {
  min-height: 3rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.625rem;
}

.vmhs-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
}

/* ─── Journey cards — clearer CTAs ─── */
.vmhs-public .guest-purpose-card .btn-primary,
.vmhs-public .guest-purpose-card .btn-outline-primary {
  min-height: 2.5rem;
  padding: 0.5rem 1.1rem;
  font-weight: 600;
}

.vmhs-public .app-journey-card__cta {
  font-weight: 600;
  font-size: 0.9375rem;
}

/* ─── List tables: visitor name column ─── */
.vmhs-list-visitor-name {
  font-weight: 600;
  color: #0f172a;
}

td .vmhs-list-visitor-name {
  display: block;
  max-width: 14rem;
}

/* ─── Staff desk guidance ─── */
.vmhs-staff-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.vmhs-staff-guide__card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.45;
}

.vmhs-staff-guide__card strong {
  display: block;
  color: #0f172a;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.vmhs-staff-guide__card i {
  color: var(--vmhs-brand, #B7670F);
  margin-right: 0.25rem;
}

.vmhs-app .vmhs-queue-hint {
  font-size: 0.9375rem;
  color: #475569;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

/* ─── Focus & accessibility ─── */
.vmhs-public a:focus-visible,
.vmhs-public button:focus-visible,
.vmhs-app a:focus-visible,
.vmhs-app button:focus-visible {
  outline: 3px solid rgba(183, 103, 15, 0.45);
  outline-offset: 2px;
}

@media (max-width: 991.98px) {
  .vmhs-help-panel {
    position: static;
    margin-top: 1rem;
  }
}

/* ─── Live chat (public + staff) ─── */
.vmhs-chat-card {
  overflow: hidden;
}
.vmhs-chat-log {
  min-height: 320px;
  max-height: 52vh;
  overflow-y: auto;
  padding: 1rem 1rem 0.5rem;
  background: linear-gradient(180deg, #e8f5f3 0%, #f1f5f9 100%);
  scroll-behavior: smooth;
}
.vmhs-staff-chat-log {
  max-height: 400px;
}
.vmhs-chat-bubble {
  margin-bottom: 0.65rem;
  max-width: 85%;
  clear: both;
}
.vmhs-chat-bubble--user {
  margin-left: auto;
  text-align: right;
  float: right;
}
.vmhs-chat-bubble--staff {
  margin-left: auto;
  text-align: right;
  float: right;
}
.vmhs-staff-chat-log .vmhs-chat-bubble--staff {
  float: right;
}
.vmhs-staff-chat-log .vmhs-chat-bubble--user {
  float: left;
  margin-left: 0;
  text-align: left;
}
.vmhs-chat-bubble--assistant {
  float: left;
  margin-right: auto;
  text-align: left;
}
.vmhs-chat-bubble--user .vmhs-chat-bubble__body {
  background: var(--vmhs-brand, #B7670F);
  color: #fff;
  border-radius: 1.1rem 1.1rem 0.2rem 1.1rem;
  padding: 0.6rem 0.85rem;
  display: inline-block;
  text-align: left;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.vmhs-chat-bubble--staff .vmhs-chat-bubble__body {
  background: #dcf8c6;
  color: #1e293b;
  border: 1px solid #bbf7d0;
  border-radius: 1.1rem 1.1rem 0.2rem 1.1rem;
  padding: 0.6rem 0.85rem;
  display: inline-block;
  text-align: left;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.vmhs-staff-chat-log .vmhs-chat-bubble--staff .vmhs-chat-bubble__body {
  background: var(--vmhs-brand, #B7670F);
  color: #fff;
  border-color: var(--vmhs-primary-hover, #92400e);
}
.vmhs-chat-bubble--assistant .vmhs-chat-bubble__body {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1.1rem 1.1rem 1.1rem 0.2rem;
  padding: 0.6rem 0.85rem;
  display: inline-block;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.vmhs-chat-bubble__meta {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.15rem;
  letter-spacing: 0.02em;
}
.vmhs-chat-compose .form-control:focus {
  border-color: var(--vmhs-brand, #B7670F);
  box-shadow: 0 0 0 0.2rem rgba(183, 103, 15, 0.15);
}
.vmhs-chat-status:empty {
  display: none;
}

/* ─── Quick stats (shared KPI tiles + status matrix) ─── */
.vmhs-quick-stats-bar {
  padding: 1rem 1.15rem 1.1rem;
  border: 1px solid var(--vmhs-card-border, #e2e8f0);
  border-radius: var(--vmhs-radius-md, 0.85rem);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  min-width: 0;
  max-width: 100%;
}

.vmhs-quick-stats-bar .row > [class*="col-"] {
  min-width: 0;
}

.vmhs-quick-stats-bar__header {
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.vmhs-quick-stats-bar__title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #334155;
}

.vmhs-quick-stats-bar__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
}

.vmhs-quick-stat {
  --vmhs-kpi-accent: var(--vmhs-brand);
  --vmhs-kpi-surface: rgba(183, 103, 15, 0.07);
  --vmhs-kpi-icon-bg: rgba(183, 103, 15, 0.14);
  --vmhs-kpi-icon-ring: rgba(183, 103, 15, 0.22);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1rem 1rem 1.1rem;
  min-height: 5.5rem;
  border: 1px solid var(--vmhs-card-border, #e2e8f0);
  border-radius: var(--vmhs-radius-md, 0.8rem);
  background:
    radial-gradient(circle at 100% 0%, var(--vmhs-kpi-surface) 0%, transparent 52%),
    linear-gradient(145deg, var(--bs-body-bg) 0%, #f8fafc 100%);
  height: 100%;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.vmhs-quick-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--vmhs-kpi-accent);
  border-radius: 4px 0 0 4px;
}

.vmhs-quick-stat--interactive:hover {
  border-color: color-mix(in srgb, var(--vmhs-kpi-accent) 40%, #e2e8f0);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
  color: inherit;
}

.vmhs-quick-stat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
  background: var(--vmhs-kpi-icon-bg);
  color: var(--vmhs-kpi-accent);
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-left: 0.2rem;
  box-shadow: inset 0 0 0 1px var(--vmhs-kpi-icon-ring);
}

.vmhs-quick-stat__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.1rem;
}

.vmhs-quick-stat__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.vmhs-quick-stat__value {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

.vmhs-quick-stat__hint {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vmhs-quick-stat__value-suffix {
  font-size: 0.55em;
  font-weight: 600;
  color: #94a3b8;
  margin-left: 0.15rem;
}

.vmhs-quick-stat__footnote {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
}

.vmhs-quick-stats-bar .vmhs-kpi-delta {
  display: block;
  margin-top: 0.1rem;
}

.vmhs-quick-stat__chevron {
  color: #cbd5e1;
  font-size: 1rem;
  transition: color 0.15s ease, transform 0.15s ease;
}

.vmhs-quick-stat--interactive:hover .vmhs-quick-stat__chevron {
  color: var(--vmhs-kpi-accent);
  transform: translateX(2px);
}

.vmhs-quick-stat--interactive:focus-visible {
  outline: 2px solid var(--vmhs-kpi-accent);
  outline-offset: 2px;
}

.vmhs-status-stat:focus-visible {
  outline: 2px solid var(--vmhs-stat-accent);
  outline-offset: 2px;
}

.vmhs-quick-stat--primary {
  --vmhs-kpi-accent: var(--vmhs-brand, #B7670F);
  --vmhs-kpi-surface: rgba(183, 103, 15, 0.08);
  --vmhs-kpi-icon-bg: rgba(183, 103, 15, 0.14);
  --vmhs-kpi-icon-ring: rgba(183, 103, 15, 0.24);
}

.vmhs-quick-stat--success {
  --vmhs-kpi-accent: #16a34a;
  --vmhs-kpi-surface: rgba(22, 163, 74, 0.08);
  --vmhs-kpi-icon-bg: rgba(22, 163, 74, 0.14);
  --vmhs-kpi-icon-ring: rgba(22, 163, 74, 0.24);
}

.vmhs-quick-stat--info {
  --vmhs-kpi-accent: #0284c7;
  --vmhs-kpi-surface: rgba(2, 132, 199, 0.08);
  --vmhs-kpi-icon-bg: rgba(2, 132, 199, 0.14);
  --vmhs-kpi-icon-ring: rgba(2, 132, 199, 0.24);
}

.vmhs-quick-stat--warning {
  --vmhs-kpi-accent: #d97706;
  --vmhs-kpi-surface: rgba(217, 119, 6, 0.1);
  --vmhs-kpi-icon-bg: rgba(217, 119, 6, 0.15);
  --vmhs-kpi-icon-ring: rgba(217, 119, 6, 0.26);
}

.vmhs-quick-stat--danger {
  --vmhs-kpi-accent: #dc2626;
  --vmhs-kpi-surface: rgba(220, 38, 38, 0.08);
  --vmhs-kpi-icon-bg: rgba(220, 38, 38, 0.12);
  --vmhs-kpi-icon-ring: rgba(220, 38, 38, 0.24);
}

.vmhs-quick-stat--secondary {
  --vmhs-kpi-accent: #64748b;
  --vmhs-kpi-surface: rgba(100, 116, 139, 0.08);
  --vmhs-kpi-icon-bg: rgba(100, 116, 139, 0.12);
  --vmhs-kpi-icon-ring: rgba(100, 116, 139, 0.22);
}

.vmhs-quick-stat--accent {
  --vmhs-kpi-accent: #7c3aed;
  --vmhs-kpi-surface: rgba(124, 58, 237, 0.08);
  --vmhs-kpi-icon-bg: rgba(124, 58, 237, 0.14);
  --vmhs-kpi-icon-ring: rgba(124, 58, 237, 0.24);
}

.vmhs-quick-stat--active {
  border-color: color-mix(in srgb, var(--vmhs-kpi-accent) 45%, #e2e8f0);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--vmhs-kpi-accent) 16%, transparent);
}

.vmhs-quick-stat--active .vmhs-quick-stat__chevron {
  color: var(--vmhs-kpi-accent);
}

/* Status quick stats panel */
.vmhs-status-panel {
  border: 1px solid var(--vmhs-card-border, #e2e8f0);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.vmhs-status-panel__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.vmhs-status-panel--strip .vmhs-status-panel__header {
  margin-bottom: 0.55rem;
  padding-bottom: 0.55rem;
}

.vmhs-status-panel--strip .vmhs-status-panel__title {
  font-size: 0.88rem;
}

.vmhs-status-panel--strip .vmhs-status-panel__subtitle {
  font-size: 0.74rem;
  margin-top: 0.1rem;
}

.vmhs-status-panel__title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.vmhs-status-panel__subtitle {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.2rem;
}

.vmhs-status-panel__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.vmhs-status-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 0.78rem;
  color: #475569;
}

.vmhs-status-summary-chip__value {
  font-weight: 700;
  color: #0f172a;
}

.vmhs-status-summary-chip--open {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.18);
  color: #1d4ed8;
}

.vmhs-status-summary-chip--open .vmhs-status-summary-chip__value {
  color: #1d4ed8;
}

.vmhs-status-grid {
  display: grid;
  gap: 0.75rem;
}

/* Single-row status strip (replaces tall matrix grid) */
.vmhs-status-grid--strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.5rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 0.15rem;
}

.vmhs-status-grid--strip .vmhs-status-stat {
  flex: 1 1 0;
  min-width: 6.35rem;
  max-width: none;
  min-height: 0;
  padding: 0.55rem 0.65rem 0.55rem 0.58rem;
  gap: 0.48rem;
  grid-template-columns: auto 1fr;
  border-radius: 0.55rem;
}

.vmhs-status-grid--strip .vmhs-status-stat::before {
  width: 3px;
}

.vmhs-status-grid--strip .vmhs-status-stat__icon {
  width: 1.85rem;
  height: 1.85rem;
  font-size: 0.92rem;
  border-radius: 0.5rem;
  margin-left: 0;
}

.vmhs-status-grid--strip .vmhs-status-stat__content {
  flex-direction: column;
  gap: 0;
  line-height: 1.2;
}

.vmhs-status-grid--strip .vmhs-status-stat__value {
  font-size: 1.18rem;
  font-weight: 800;
}

.vmhs-status-grid--strip .vmhs-status-stat__label {
  font-size: 0.72rem;
  margin-top: 0.08rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: normal;
}

.vmhs-status-grid--strip .vmhs-status-stat__chevron {
  display: none;
}

.vmhs-status-grid--strip .vmhs-status-stat:hover {
  transform: none;
}

/* Legacy alias — same as strip */
.vmhs-status-grid--matrix {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.5rem;
  overflow-x: auto;
}

.vmhs-status-stat {
  --vmhs-stat-accent: var(--vmhs-brand);
  --vmhs-stat-surface: rgba(183, 103, 15, 0.07);
  --vmhs-stat-icon-bg: rgba(183, 103, 15, 0.14);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  min-height: 5.25rem;
  border: 1px solid var(--vmhs-card-border, #e2e8f0);
  border-radius: var(--vmhs-radius-md, 0.75rem);
  background: linear-gradient(135deg, var(--bs-body-bg) 0%, var(--vmhs-stat-surface) 100%);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.vmhs-status-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--vmhs-stat-accent);
  border-radius: 4px 0 0 4px;
}

.vmhs-status-stat:hover {
  border-color: color-mix(in srgb, var(--vmhs-stat-accent) 45%, #e2e8f0);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
  color: inherit;
}

.vmhs-status-stat.is-active {
  border-color: var(--vmhs-stat-accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--vmhs-stat-accent) 35%, transparent),
    0 4px 12px color-mix(in srgb, var(--vmhs-stat-accent) 18%, transparent);
}

.vmhs-status-stat.is-empty {
  opacity: 0.82;
}

.vmhs-status-stat.is-empty .vmhs-status-stat__value {
  color: #94a3b8;
}

.vmhs-status-stat--open {
  --vmhs-stat-accent: #2563eb;
  --vmhs-stat-surface: rgba(37, 99, 235, 0.06);
  --vmhs-stat-icon-bg: rgba(37, 99, 235, 0.12);
}

.vmhs-status-stat--in-progress {
  --vmhs-stat-accent: #0891b2;
  --vmhs-stat-surface: rgba(8, 145, 178, 0.07);
  --vmhs-stat-icon-bg: rgba(8, 145, 178, 0.14);
}

.vmhs-status-stat--pending {
  --vmhs-stat-accent: #d97706;
  --vmhs-stat-surface: rgba(217, 119, 6, 0.08);
  --vmhs-stat-icon-bg: rgba(217, 119, 6, 0.14);
}

.vmhs-status-stat--approved {
  --vmhs-stat-accent: #059669;
  --vmhs-stat-surface: rgba(5, 150, 105, 0.07);
  --vmhs-stat-icon-bg: rgba(5, 150, 105, 0.14);
}

.vmhs-status-stat--resolved {
  --vmhs-stat-accent: #16a34a;
  --vmhs-stat-surface: rgba(22, 163, 74, 0.07);
  --vmhs-stat-icon-bg: rgba(22, 163, 74, 0.14);
}

.vmhs-status-stat--closed {
  --vmhs-stat-accent: #64748b;
  --vmhs-stat-surface: rgba(100, 116, 139, 0.08);
  --vmhs-stat-icon-bg: rgba(100, 116, 139, 0.14);
}

.vmhs-status-stat--merged {
  --vmhs-stat-accent: #475569;
  --vmhs-stat-surface: rgba(71, 85, 105, 0.08);
  --vmhs-stat-icon-bg: rgba(71, 85, 105, 0.14);
}

.vmhs-status-stat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.7rem;
  background: var(--vmhs-stat-icon-bg);
  color: var(--vmhs-stat-accent);
  font-size: 1.15rem;
  margin-left: 0.15rem;
}

.vmhs-status-stat__content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.vmhs-status-stat__value {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.vmhs-status-stat__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vmhs-status-stat__chevron {
  color: #cbd5e1;
  font-size: 0.95rem;
  transition: color 0.15s ease, transform 0.15s ease;
}

.vmhs-status-stat:hover .vmhs-status-stat__chevron {
  color: var(--vmhs-stat-accent);
  transform: translateX(2px);
}

.vmhs-status-badge {
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Channel status mini-panels */
.vmhs-channel-status-card {
  border: 1px solid var(--vmhs-card-border, #e2e8f0);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.vmhs-channel-status-card:hover {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.vmhs-channel-status-card .h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.vmhs-channel-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.vmhs-channel-status-pill {
  --vmhs-stat-accent: var(--vmhs-brand);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.55rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  text-decoration: none;
  color: inherit;
  font-size: 0.72rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.vmhs-channel-status-pill:hover {
  border-color: color-mix(in srgb, var(--vmhs-stat-accent) 40%, #e2e8f0);
  background: color-mix(in srgb, var(--vmhs-stat-accent) 8%, #fff);
  color: inherit;
}

.vmhs-channel-status-pill.is-empty .vmhs-channel-status-pill__count {
  color: #94a3b8;
}

.vmhs-channel-status-pill__label {
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vmhs-channel-status-pill__count {
  font-weight: 800;
  color: var(--vmhs-stat-accent);
  flex-shrink: 0;
}

.vmhs-channel-status-pill--open { --vmhs-stat-accent: #2563eb; }
.vmhs-channel-status-pill--in-progress { --vmhs-stat-accent: #0891b2; }
.vmhs-channel-status-pill--pending { --vmhs-stat-accent: #d97706; }
.vmhs-channel-status-pill--resolved { --vmhs-stat-accent: #16a34a; }
.vmhs-channel-status-pill--closed { --vmhs-stat-accent: #64748b; }
.vmhs-channel-status-pill--merged { --vmhs-stat-accent: #475569; }

@media (max-width: 1199.98px) {
  .vmhs-status-grid--compact .vmhs-status-stat {
    flex: 1 1 calc(33.333% - 0.35rem);
  }

  .vmhs-intake-form-card__meta {
    text-align: left;
  }
}

@media (max-width: 991.98px) {
  .vmhs-status-grid--compact .vmhs-status-stat {
    flex: 1 1 calc(33.333% - 0.35rem);
  }
}

@media (max-width: 767.98px) {
  .vmhs-intake-overview > [class*="col-"]:not(:last-child) {
    margin-bottom: 0.25rem;
  }

  .vmhs-status-grid--compact .vmhs-status-stat {
    flex: 1 1 calc(50% - 0.35rem);
  }
}

@media (max-width: 575.98px) {
  .vmhs-status-grid--compact .vmhs-status-stat {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 4rem;
  }
}

@media (max-width: 1199.98px) {
  .vmhs-channel-status-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .vmhs-status-grid--strip .vmhs-status-stat {
    min-width: 5.85rem;
    flex: 0 0 auto;
  }

  .vmhs-status-grid--matrix {
    flex-wrap: nowrap;
  }
}

@media (max-width: 575.98px) {
  .vmhs-status-grid--strip {
    gap: 0.42rem;
  }

  .vmhs-status-grid--strip .vmhs-status-stat {
    min-width: 5.35rem;
    padding: 0.48rem 0.52rem 0.48rem 0.48rem;
  }

  .vmhs-status-grid--strip .vmhs-status-stat__icon {
    width: 1.6rem;
    height: 1.6rem;
    font-size: 0.84rem;
  }

  .vmhs-status-grid--strip .vmhs-status-stat__value {
    font-size: 1.05rem;
  }

  .vmhs-status-grid--strip .vmhs-status-stat__label {
    font-size: 0.66rem;
  }

  .vmhs-status-grid--matrix {
    flex-wrap: nowrap;
  }

  .vmhs-status-stat {
    min-height: auto;
  }

  .vmhs-status-panel__header {
    flex-direction: column;
    align-items: stretch;
  }

  .vmhs-status-panel__summary {
    width: 100%;
  }

  .vmhs-status-panel__summary .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Quick stats — responsive scale */
@media (max-width: 991.98px) {
  .vmhs-quick-stats-bar {
    padding: 0.9rem 1rem 1rem;
  }

  .vmhs-quick-stat {
    min-height: 5rem;
    gap: 0.7rem;
    padding: 0.85rem 0.9rem 0.85rem 1rem;
  }

  .vmhs-quick-stat__value {
    font-size: clamp(1.45rem, 4.5vw, 1.75rem);
  }
}

@media (max-width: 575.98px) {
  .vmhs-quick-stats-bar {
    padding: 0.85rem 0.9rem 0.95rem;
    border-radius: var(--vmhs-radius-md, 0.75rem);
  }

  .vmhs-quick-stats-bar__header {
    margin-bottom: 0.7rem;
    padding-bottom: 0.65rem;
  }

  .vmhs-quick-stat {
    grid-template-columns: auto 1fr;
    min-height: auto;
    padding: 0.8rem 0.85rem 0.8rem 0.95rem;
  }

  .vmhs-quick-stat__icon {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 1.05rem;
  }

  .vmhs-quick-stat__value {
    font-size: clamp(1.35rem, 6vw, 1.6rem);
  }

  .vmhs-quick-stat__hint,
  .vmhs-quick-stat__footnote {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.35;
  }

  .vmhs-quick-stat__chevron {
    display: none;
  }

  .vmhs-quick-stat--interactive {
    min-height: 44px;
  }
}

@media (pointer: coarse) {
  .vmhs-quick-stat--interactive:hover,
  .vmhs-status-stat:hover,
  .vmhs-channel-status-card:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vmhs-quick-stat,
  .vmhs-quick-stat--interactive,
  .vmhs-status-stat,
  .vmhs-channel-status-card,
  .vmhs-channel-status-pill {
    transition: none;
  }

  .vmhs-quick-stat--interactive:hover,
  .vmhs-status-stat:hover {
    transform: none;
  }
}

/* ─── Intake desk (call centre, check-in, service request) ─── */
.vmhs-intake-page {
  --vmhs-intake-gap: 0.75rem;
}

.vmhs-intake-page .vmhs-intake-overview {
  margin-bottom: 0.75rem !important;
}

.vmhs-intake-page .vmhs-intake-layout {
  margin-bottom: 0;
}

.vmhs-intake-page .layout-section,
.vmhs-intake-page.vmhs-intake-layout {
  margin-bottom: 0;
}

/* Compact status matrix for intake overview band */
.vmhs-status-panel--compact .vmhs-status-panel__header {
  margin-bottom: 0.65rem;
  padding-bottom: 0.65rem;
  gap: 0.5rem 0.85rem;
}

.vmhs-status-panel--compact .vmhs-status-panel__title {
  font-size: 0.88rem;
}

.vmhs-status-panel--compact .vmhs-status-panel__subtitle {
  font-size: 0.74rem;
}

.vmhs-status-grid--compact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.vmhs-status-grid--compact .vmhs-status-stat {
  flex: 1 1 calc(25% - 0.35rem);
  min-width: 4.5rem;
  min-height: 0;
  padding: 0.4rem 0.45rem 0.4rem 0.42rem;
  gap: 0.35rem;
  grid-template-columns: auto 1fr;
}

.vmhs-status-grid--compact .vmhs-status-stat__chevron {
  display: none;
}

.vmhs-status-grid--compact .vmhs-status-stat__icon {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.8rem;
  margin-left: 0;
}

.vmhs-status-grid--compact .vmhs-status-stat__value {
  font-size: 1rem;
}

.vmhs-status-grid--compact .vmhs-status-stat__label {
  font-size: 0.62rem;
  margin-top: 0;
  line-height: 1.15;
  white-space: normal;
}

.vmhs-status-grid--compact .vmhs-status-stat::before {
  width: 3px;
}

.vmhs-status-grid--compact .vmhs-status-stat:hover {
  transform: none;
}

/* Intake form card */
.vmhs-intake-form-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding-top: 0.95rem;
  padding-bottom: 0.95rem;
}

.vmhs-intake-form-card__heading {
  flex: 1 1 16rem;
  min-width: 0;
}

.vmhs-intake-form-card__lede {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.45;
}

.vmhs-intake-form-card__meta {
  flex: 0 0 auto;
  text-align: right;
}

.vmhs-intake-form__section {
  border: 0;
  padding: 0 0 1rem;
  margin: 0 0 0.35rem;
  min-inline-size: 0;
  min-width: 0;
}

.vmhs-intake-form__section + .vmhs-intake-form__section {
  padding-top: 0.85rem;
  border-top: 1px solid rgba(226, 232, 240, 0.85);
}

.vmhs-intake-form__section:last-of-type {
  margin-bottom: 0.35rem;
  padding-bottom: 0.25rem;
}

/* Div-based section titles — avoid theme `legend { float; font-size: 1.5rem }` */
.vmhs-intake-form__legend,
.vmhs-intake-page .vmhs-intake-form__legend,
.vmhs-intake-page legend.vmhs-intake-form__legend {
  display: block !important;
  float: none !important;
  clear: none !important;
  width: 100% !important;
  max-width: none;
  padding: 0 !important;
  margin: 0 0 0.65rem !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em;
  line-height: 1.35 !important;
  text-transform: uppercase;
  color: #64748b;
}

.vmhs-intake-form__legend + *,
.vmhs-intake-page legend.vmhs-intake-form__legend + * {
  clear: none !important;
}

.vmhs-intake-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
}

/* Unified intake sidebar rail */
.vmhs-intake-rail {
  overflow: hidden;
  height: auto;
  min-height: 0;
}

.vmhs-intake-page .vmhs-intake-form-card,
.vmhs-desktop-shell .vmhs-intake-page .row.g-3 > [class*="col-"] > .card.vmhs-intake-form-card,
.vmhs-desktop-shell .vmhs-intake-page .row.g-3 > [class*="col-"] > .card.card-stretch.vmhs-intake-form-card {
  height: auto !important;
  min-height: 0;
  overflow: visible;
}

.vmhs-intake-page .vmhs-intake-form-card .card-body {
  flex-grow: 0;
}

.vmhs-intake-page--schedule .vmhs-intake-overview {
  margin-bottom: 0.75rem !important;
}

@media (min-width: 1200px) {
  .vmhs-intake-rail {
    position: sticky;
    top: 5.25rem;
    align-self: flex-start;
  }
}

.vmhs-intake-rail__section {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.55);
}

.vmhs-intake-rail__section--flush {
  padding-bottom: 0.65rem;
}

.vmhs-intake-rail__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.vmhs-intake-rail__section-head h6 {
  font-size: 0.82rem;
  font-weight: 700;
}

.vmhs-intake-rail__list .list-group-item {
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  background: transparent !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.55) !important;
}

.vmhs-intake-rail__list .list-group-item:last-child {
  border-bottom: none !important;
}

.vmhs-intake-rail__footer {
  padding-top: 0.55rem;
  text-align: center;
}

/* Slim intake context bar (desk forms) */
.vmhs-intake-context-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 0.65rem;
  background: #f8fafc;
}

.vmhs-intake-context-bar__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  min-width: 0;
}

.vmhs-intake-context-bar__stat {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: #64748b;
}

.vmhs-intake-context-bar__stat strong {
  color: #0f172a;
  font-weight: 700;
}

.vmhs-intake-context-bar__stat--urgent strong {
  color: #dc2626;
}

.vmhs-intake-context-bar__link {
  color: var(--vmhs-brand, #b7670f);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.vmhs-intake-context-bar__link:hover {
  text-decoration: underline;
}

.vmhs-intake-stats-details {
  border: 1px solid rgba(226, 232, 240, 0.75);
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.35rem 0.75rem 0.75rem;
}

.vmhs-intake-stats-details__summary {
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  padding: 0.35rem 0;
  list-style-position: outside;
}

.vmhs-intake-stats-details__summary:hover {
  color: #334155;
}

.vmhs-intake-stats-details__body .vmhs-status-panel {
  border: none;
  box-shadow: none;
  margin-bottom: 0;
}

.vmhs-intake-stats-details__body .card-body {
  padding: 0.5rem 0 0 !important;
}

/* Shared desk intake shell (service request, check-in, call centre) */
.vmhs-intake-page--service-request .vmhs-intake-form-card__header--compact,
.vmhs-intake-page--check-in .vmhs-intake-form-card__header--compact,
.vmhs-intake-page--call-center .vmhs-intake-form-card__header--compact {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.vmhs-intake-page--service-request .vmhs-intake-form-card__header--compact .vmhs-intake-form-card__lede,
.vmhs-intake-page--check-in .vmhs-intake-form-card__header--compact .vmhs-intake-form-card__lede,
.vmhs-intake-page--call-center .vmhs-intake-form-card__header--compact .vmhs-intake-form-card__lede {
  max-width: 42rem;
  font-size: 0.8125rem;
}

.vmhs-intake-page--service-request .vmhs-intake-form-card__lookup,
.vmhs-intake-page--check-in .vmhs-intake-form-card__lookup,
.vmhs-intake-page--call-center .vmhs-intake-form-card__lookup {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
}

.vmhs-intake-page--service-request .vmhs-intake-form-card__lookup .vmhs-visitor-quick-search--inline,
.vmhs-intake-page--check-in .vmhs-intake-form-card__lookup .vmhs-visitor-quick-search--inline,
.vmhs-intake-page--call-center .vmhs-intake-form-card__lookup .vmhs-visitor-quick-search--inline {
  min-width: 0;
}

/* Check-in pathway chips — keep section rhythm with the form below */
.vmhs-intake-page--check-in .vmhs-intake-form__section .vmhs-intake-path {
  width: 100%;
}

/* Call centre pathway — service vs visit */
.vmhs-call-pathway {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.vmhs-call-pathway__option {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.55rem 0.95rem;
  border: 1px solid rgba(183, 103, 15, 0.28);
  border-radius: 0.55rem;
  background: #fff;
  color: #4a5568;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.vmhs-call-pathway__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.vmhs-call-pathway__option span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.vmhs-call-pathway__option.is-active,
.vmhs-call-pathway__option:has(input:checked) {
  border-color: #B7670F;
  background: rgba(183, 103, 15, 0.08);
  color: #8a4d0c;
}

.vmhs-intake-page--call-center .vmhs-call-center-panel[hidden] {
  display: none !important;
}

/* Pathway sits above the POST form — still needs a section divider */
.vmhs-intake-page--check-in .card-body > .vmhs-intake-form__section {
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  margin-bottom: 0.85rem;
}

/* Intake form — unified field layout */
.vmhs-intake-form .vmhs-field.mb-3 {
  margin-bottom: 0.75rem !important;
}

.vmhs-intake-form .row.g-2 > [class*="col-"] > .vmhs-field.mb-3:last-child {
  margin-bottom: 0 !important;
}

.vmhs-intake-form__section-hint {
  margin-top: -0.25rem;
  line-height: 1.45;
}

.vmhs-intake-form .vmhs-residency-fieldset.vmhs-intake-form__section {
  padding-bottom: 0.15rem;
}

.vmhs-intake-form .vmhs-residency-resident,
.vmhs-intake-form .vmhs-residency-nonresident {
  margin-top: 0.15rem;
}

/* Arrival mode — horizontal radio chips */
.vmhs-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.vmhs-radio-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.45rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.vmhs-radio-chip:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.vmhs-radio-chip:has(.vmhs-radio-chip__input:checked) {
  border-color: var(--vmhs-brand, #b7670f);
  background: rgba(183, 103, 15, 0.08);
  color: #0f172a;
  box-shadow: 0 0 0 1px rgba(183, 103, 15, 0.15);
}

.vmhs-radio-chip__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.vmhs-radio-chip__text {
  line-height: 1.3;
}

.vmhs-field--radio .vmhs-field__label {
  margin-bottom: 0.4rem;
}

/* Legacy: old RadioSelect ul layout (if any remain) */
.vmhs-intake-form .vmhs-field ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.vmhs-intake-form .vmhs-field ul li {
  margin: 0;
}

.vmhs-intake-form .vmhs-field ul li label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.45rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.vmhs-intake-form .vmhs-field ul li label:has(input:checked) {
  border-color: var(--vmhs-brand, #b7670f);
  background: rgba(183, 103, 15, 0.08);
  color: #0f172a;
}

.vmhs-intake-form .vmhs-field ul li input[type="radio"] {
  margin: 0;
  flex-shrink: 0;
}

.vmhs-intake-form .vmhs-assign-staff-field {
  margin-bottom: 0;
}

.vmhs-intake-form .vmhs-routing-preview {
  margin-top: 0.65rem;
}

.vmhs-intake-rail--compact {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 0.75rem;
  background: #fff;
  overflow: hidden;
}

.vmhs-intake-rail--compact .vmhs-intake-rail__section:first-child {
  border-top: none;
}

.vmhs-intake-rail--compact .vmhs-intake-rail__section:last-child {
  border-bottom: none;
}

.vmhs-intake-rail__details {
  margin: 0;
}

.vmhs-intake-rail__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  list-style: none;
}

.vmhs-intake-rail__summary::-webkit-details-marker {
  display: none;
}

.vmhs-intake-rail__summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid #64748b;
  border-bottom: 1.5px solid #64748b;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.vmhs-intake-rail__details[open] > .vmhs-intake-rail__summary::after {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}

.vmhs-intake-rail__details .form-control {
  font-size: 0.875rem;
}

.vmhs-intake-rail__list--compact .list-group-item {
  padding-top: 0.55rem !important;
  padding-bottom: 0.55rem !important;
}

.vmhs-intake-rail__ticket-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.vmhs-intake-rail__ticket-link:hover .vmhs-intake-rail__ticket-title {
  color: var(--vmhs-brand, #b7670f);
}

.vmhs-intake-rail__ticket-title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}

.vmhs-intake-rail__ticket-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: #64748b;
}

.vmhs-intake-context-note {
  background: #f8fafc;
}

.vmhs-intake-listing .card-body {
  padding-top: 0.75rem;
}

.vmhs-intake-listing .vmhs-listing-filters {
  margin-bottom: 0 !important;
}

/* Dedicated browse/list pages (service requests, visit bookings) */
.vmhs-listing-page {
  margin-top: 0;
}

.vmhs-listing-page__lede {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.45;
}

.vmhs-listing-page .vmhs-listing-section {
  margin-bottom: 0;
}

.vmhs-app[data-page="service-requests"] .pc-content,
.vmhs-app[data-page="visit-bookings"] .pc-content,
body[data-vmhs-theme][data-page="service-requests"] .pc-content,
body[data-vmhs-theme][data-page="visit-bookings"] .pc-content {
  padding-top: 0.85rem;
}

.vmhs-intake-layout > [class*="col-"] {
  min-width: 0;
}

.vmhs-intake-path--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
}

.vmhs-intake-path--compact .vmhs-intake-path__item {
  padding: 0.65rem 0.75rem;
  font-size: 0.8125rem;
}

.vmhs-intake-page--check-in .vmhs-intake-path--compact {
  margin-bottom: 0.25rem;
}

@media (max-width: 991.98px) {
  .vmhs-intake-path--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .vmhs-intake-page--check-in .vmhs-intake-path--compact {
    grid-template-columns: 1fr;
  }
}

.vmhs-app[data-page="call-center"] .pc-content,
.vmhs-app[data-page="call-center-records"] .pc-content,
body[data-vmhs-theme][data-page="call-center"] .pc-content,
body[data-vmhs-theme][data-page="call-center-records"] .pc-content {
  padding-top: 0.85rem;
}

.vmhs-intake-path {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.vmhs-intake-path__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.8rem 1rem;
  min-height: 44px;
  border: 1px solid var(--vmhs-card-border, #e2e8f0);
  border-radius: var(--vmhs-radius-md, 0.75rem);
  text-decoration: none;
  color: inherit;
  font-size: 0.875rem;
  line-height: 1.35;
  background: var(--bs-body-bg);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.vmhs-intake-path__item:hover {
  border-color: var(--vmhs-brand);
  color: var(--vmhs-brand);
}

.vmhs-intake-path__item.is-active {
  border-color: var(--vmhs-brand);
  background: rgba(183, 103, 15, 0.06);
  font-weight: 600;
}

.vmhs-intake-path__item i {
  font-size: 1.2rem;
  line-height: 1;
  color: var(--vmhs-brand, #b7670f);
}

.vmhs-intake-path__item.is-active i {
  color: var(--vmhs-brand, #b7670f);
}

.vmhs-intake-path__item:focus-visible {
  outline: 2px solid var(--vmhs-brand);
  outline-offset: 2px;
}

.vmhs-intake-pathway-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--vmhs-card-border, #e2e8f0);
  border-radius: var(--vmhs-radius-md, 0.75rem);
  background: var(--vmhs-card-bg, #fff);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.vmhs-intake-pathway-card:hover {
  border-color: rgba(183, 103, 15, 0.35);
  box-shadow: var(--vmhs-shadow-sm, 0 4px 12px rgba(15, 23, 42, 0.08));
  transform: translateY(-1px);
  color: inherit;
}

.vmhs-intake-pathway-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  background: rgba(15, 23, 42, 0.04);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.vmhs-intake-pathway-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.vmhs-intake-pathway-card__action {
  color: #94a3b8;
  flex-shrink: 0;
  padding-top: 0.15rem;
}

.vmhs-intake-pathway-card.is-active {
  border-color: var(--vmhs-brand);
  background: var(--vmhs-primary-light, #fef3e8);
  box-shadow: 0 0 0 1px rgba(183, 103, 15, 0.2);
}

.vmhs-intake-pathway-card.is-active .vmhs-intake-pathway-card__action {
  color: var(--vmhs-brand);
}

.vmhs-cc-success,
.vmhs-checkin-success,
.vmhs-copy-banner {
  border-left: 4px solid var(--vmhs-brand);
}

.vmhs-copy-banner {
  border-left-color: var(--bs-info);
}

.vmhs-create-panel .list-group-item,
.vmhs-visit-panel .list-group-item {
  border-color: rgba(226, 232, 240, 0.9);
}

.vmhs-visit-success {
  border-left: 4px solid var(--vmhs-brand);
}

.vmhs-checkin-panel .list-group-item {
  border-color: rgba(226, 232, 240, 0.9);
}

.vmhs-checkin-panel .visitor-on-site-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 575.98px) {
  .vmhs-intake-path {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .vmhs-intake-path__item {
    padding: 0.7rem 0.8rem;
    font-size: 0.8125rem;
  }

  .vmhs-intake-path__item i {
    font-size: 1.1rem;
  }
}

@media (max-width: 374.98px) {
  .vmhs-intake-path {
    grid-template-columns: 1fr;
  }
}

/* ─── Ticket listing tables (channel pages) ─── */
.vmhs-listing-section {
  margin-top: 0.5rem;
}

/* In-table filter toolbar (staff data tables) */
.vmhs-app .card.vmhs-listing-table,
.vmhs-app .card.vmhs-data-table {
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: none;
}

.vmhs-table-toolbar {
  padding: 0.7rem 1rem;
  background: #fafbfc;
  border-bottom: 1px solid #eef2f6;
}

.vmhs-table-filters,
.vmhs-listing-filters {
  margin-bottom: 0 !important;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.vmhs-table-filters > [class*="col-"],
.vmhs-listing-filters > [class*="col-"] {
  min-width: 0;
}

.vmhs-table-filters__actions {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  min-height: calc(1.5rem + 1.9rem);
}

.vmhs-table-filters__clear {
  font-size: 0.8125rem;
  padding: 0;
  border: none;
  background: none;
  color: #64748b;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.vmhs-table-filters__clear:hover {
  color: var(--vmhs-brand, #b7670f);
}

.vmhs-listing-table .card-header,
.vmhs-data-table .card-header {
  border-bottom: 1px solid #eef2f6;
}

.vmhs-intake-listing .vmhs-listing-filters {
  margin-bottom: 0 !important;
}

.vmhs-listing-page .vmhs-listing-section {
  margin-bottom: 0;
}

@media (max-width: 767.98px) {
  .vmhs-table-filters > [class*="col-"],
  .vmhs-listing-filters > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .vmhs-table-toolbar {
    padding: 0.65rem 0.75rem;
  }
}

@media (max-width: 575.98px) {
  .vmhs-table-filters > [class*="col-"],
  .vmhs-listing-filters > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

.vmhs-listing-table .table-responsive {
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

.vmhs-listing-table .table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  white-space: nowrap;
}

.vmhs-listing-table .table tbody td {
  font-size: 0.875rem;
  vertical-align: middle;
}

@media (prefers-reduced-motion: reduce) {
  .vmhs-app .pc-content > *:first-child {
    animation: none !important;
  }
}

/* Executive private inbox */
.vmhs-inbox-hint {
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid #dbeafe;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  color: #334155;
  font-size: 0.875rem;
}

.vmhs-inbox-panel {
  border: 1px solid var(--vmhs-card-border, #e2e8f0);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.vmhs-inbox-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.vmhs-inbox-row--new {
  background: rgba(254, 243, 199, 0.35);
}

.vmhs-inbox-row--new:hover {
  background: rgba(254, 243, 199, 0.55);
}

.vmhs-inbox-type {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.vmhs-inbox-type--message {
  background: #dbeafe;
  color: #1d4ed8;
}

.vmhs-inbox-type--request {
  background: #ccfbf1;
  color: var(--vmhs-primary-hover, #92400e);
}

.vmhs-inbox-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.75rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1.35rem;
}

@media (max-width: 767.98px) {
  .vmhs-inbox-filters {
    width: 100%;
    justify-content: flex-start;
  }

  .vmhs-inbox-filters .btn-group {
    flex-wrap: wrap;
  }
}

/* ─── Global & module search ─── */
.vmhs-search-hit {
  color: inherit;
  border-radius: 0.5rem;
  padding: 0.35rem 0.25rem;
  transition: background 0.15s ease;
}

.vmhs-search-hit:hover {
  background: rgba(183, 103, 15, 0.06);
}

.vmhs-search-hit__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: #ecfdf5;
  color: var(--vmhs-brand, #B7670F);
  flex-shrink: 0;
}

.vmhs-search-hit__title {
  color: #0f172a;
}

.vmhs-public-search-results__item + .vmhs-public-search-results__item {
  border-top: 1px solid #e2e8f0;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

/* Staff ticket / visit detail — compact readable header */
.vmhs-app .vmhs-ticket-head__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

.vmhs-app .vmhs-ticket-head__ref {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--vmhs-brand, #b7670f);
  background: rgba(183, 103, 15, 0.08);
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
}

.vmhs-app .vmhs-ticket-head__title {
  margin: 0 0 0.85rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: #0f172a;
}

.vmhs-app .vmhs-ticket-head__person {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.65rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.vmhs-app .vmhs-ticket-head__person-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.55rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #e2e8f0;
}

.vmhs-app .vmhs-ticket-head__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.vmhs-app .vmhs-ticket-head__name {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

.vmhs-app .vmhs-ticket-head__facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 576px) {
  .vmhs-app .vmhs-ticket-head__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.vmhs-app .vmhs-ticket-head__facts li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1e293b;
  word-break: break-word;
}

.vmhs-app .vmhs-ticket-head__facts a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(183, 103, 15, 0.3);
  width: fit-content;
  max-width: 100%;
}

.vmhs-app .vmhs-ticket-head__facts a:hover {
  color: var(--vmhs-brand, #b7670f);
}

.vmhs-app .vmhs-ticket-head__facts code {
  font-size: 0.9rem;
  font-weight: 650;
}

.vmhs-app .vmhs-ticket-head__summary {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #334155;
}

.vmhs-app .vmhs-ticket-head__summary p:last-child {
  margin-bottom: 0;
}

/* Sidebar visitor registry panel — stacked rows that fit narrow column */
.vmhs-app .vmhs-visitor-panel__title {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
}

.vmhs-app .vmhs-visitor-panel__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

.vmhs-app .vmhs-visitor-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vmhs-app .vmhs-visitor-panel__list li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.45rem 0;
  border-top: 1px solid #e2e8f0;
  font-size: 0.9rem;
}

.vmhs-app .vmhs-visitor-panel__list li:first-child {
  border-top: 0;
  padding-top: 0.15rem;
}

.vmhs-app .vmhs-visitor-panel__list li > span:first-child {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.vmhs-app .vmhs-visitor-panel__list strong {
  font-weight: 650;
  color: #1e293b;
  word-break: break-word;
}

.vmhs-app .vmhs-visitor-panel__list a {
  color: inherit;
  text-decoration: none;
}

.vmhs-app .vmhs-visitor-panel__list a:hover {
  color: var(--vmhs-brand, #b7670f);
}

.vmhs-app .vmhs-visitor-panel__actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.vmhs-app .vmhs-visitor-panel__actions .btn {
  width: 100%;
}
