/**
 * Vaccine Transportation dashboard — layout, empty states, toasts.
 * Cold chain intelligence look is primarily from `cold-storage.css`.
 */

/* —— Scroll & header clearance (only when Transportation page is mounted) —— */
.app-layout:has(#vtlPage) {
  overflow: visible;
  align-items: stretch;
}

.app-main:has(#vtlPage) {
  max-height: none;
  min-height: calc(100vh - 200px);
  padding-top: 12px;
  padding-bottom: max(56px, env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#vtlPage.vtl-dashboard.cci-page {
  animation: cci-fadein 0.35s ease both;
  padding-bottom: 0.5rem;
}

#vtlPage .cci-intel-row,
#vtlPage .cci-main-grid,
#vtlPage .vtl-analytics-row {
  margin-bottom: 1.15rem;
}

#vtlPage .cci-kpi-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

#vtlPage .cci-kpi-trend-icon {
  font-weight: 800;
}

#vtlPage .cci-insight-text {
  font-size: 0.8rem;
  line-height: 1.45;
  color: #3f6172;
}

/* Live route column: allow natural height, scroll if many cards */
#vtlPage .cci-equipment-section .cci-equipment-body {
  max-height: min(560px, 70vh);
  overflow-y: auto;
  padding-right: 4px;
}

/* Empty states */
.vtl-empty-panel {
  text-align: center;
  padding: 1.25rem 1rem;
  border: 1px dashed #bae6fd;
  border-radius: 12px;
  background: rgba(240, 249, 255, 0.65);
}

.vtl-empty-panel h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0b2230;
}

.vtl-empty-panel p {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  color: #3f6172;
  line-height: 1.5;
}

.vtl-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.vtl-empty-in-ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vtl-live-card {
  background: #f8fbff;
  border: 1px solid #e0f2fe;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.55rem;
}

.vtl-live-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.vtl-live-title {
  font-weight: 700;
  font-size: 0.84rem;
  color: #0b2230;
}

.vtl-live-meta {
  font-size: 0.76rem;
  color: #64748b;
  margin-bottom: 0.45rem;
}

.vtl-live-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.74rem;
  color: #334155;
  margin-top: 0.25rem;
}

.vtl-live-k {
  color: #64748b;
  font-weight: 600;
}

.vtl-chart-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: #64748b;
}

.vtl-chart-empty-title {
  font-weight: 700;
  color: #0b2230;
  margin: 0 0 0.35rem;
}

.vtl-chart-empty-desc {
  font-size: 0.82rem;
  margin: 0 0 1rem;
}

.vtl-registry-empty-cell {
  padding: 2rem 1rem !important;
  text-align: center;
  vertical-align: middle;
}

.vtl-registry-empty-inner strong {
  display: block;
  color: #0b2230;
  margin-bottom: 0.35rem;
}

.vtl-registry-empty-inner p {
  margin: 0;
  font-size: 0.84rem;
  color: #3f6172;
}

.vtl-page-info {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0.5rem 0 0;
}

.vtl-modal-table-wrap {
  max-height: min(52vh, 520px);
  overflow: auto;
}

.vtl-modal-pagination {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0 1.5rem 1.25rem;
}

.vtl-insight-warn {
  color: #dc2626 !important;
}

.vtl-toast-stack {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.vtl-toast-item {
  pointer-events: auto;
  background: #fff;
  border-left: 4px solid #06b6d4;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  box-shadow: 0 8px 28px rgba(11, 34, 48, 0.18);
  font-size: 0.84rem;
  color: #1e293b;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 320px;
}

.vtl-toast-item--show {
  opacity: 1;
  transform: translateY(0);
}

/**
 * Vaccine Transportation Intelligence — scoped under `.tx-page` only.
 * Avoids global `.container` / `.modal` clashes with other dashboards.
 */

.tx-page {
  --tx-bg0: #f4f8fc;
  --tx-bg1: #e8f4fb;
  --tx-glass: rgba(255, 255, 255, 0.72);
  --tx-glass-border: rgba(15, 76, 129, 0.12);
  --tx-navy: #0a3d62;
  --tx-navy2: #0c4a6e;
  --tx-cyan: #06b6d4;
  --tx-teal: #0d9488;
  --tx-green: #059669;
  --tx-amber: #d97706;
  --tx-red: #dc2626;
  --tx-violet: #6366f1;
  --tx-text: #0f172a;
  --tx-muted: #64748b;
  --tx-radius: 16px;
  --tx-radius-sm: 12px;
  --tx-shadow: 0 14px 40px rgba(10, 61, 98, 0.12);
  --tx-shadow-hover: 0 20px 50px rgba(10, 61, 98, 0.18);
  --tx-font: "Roboto", system-ui, -apple-system, sans-serif;

  font-family: var(--tx-font);
  color: var(--tx-text);
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 18px 48px;
  box-sizing: border-box;
  min-height: 0;
}

.tx-page *,
.tx-page *::before,
.tx-page *::after {
  box-sizing: border-box;
}

.tx-hero {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--tx-radius) + 4px);
  padding: 28px 26px 26px;
  margin: 12px 0 22px;
  background: linear-gradient(125deg, #0c4a6e 0%, #0e7490 38%, #0369a1 72%, #164e63 100%);
  color: #f8fafc;
  box-shadow: var(--tx-shadow);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.tx-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(900px 320px at 85% 0%, rgba(56, 189, 248, 0.35), transparent 55%),
    radial-gradient(600px 280px at 10% 100%, rgba(16, 185, 129, 0.22), transparent 50%);
  pointer-events: none;
}

.tx-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.tx-hero-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.88;
  margin: 0 0 8px;
}

.tx-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 3.5vw, 2.05rem);
  font-weight: 800;
  line-height: 1.15;
}

.tx-hero p {
  margin: 0;
  max-width: 640px;
  font-size: 0.98rem;
  line-height: 1.55;
  color: rgba(248, 250, 252, 0.9);
}

.tx-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.tx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 11px 18px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  font-family: inherit;
  white-space: nowrap;
}

.tx-btn:active {
  transform: scale(0.98);
}

.tx-btn-primary {
  background: linear-gradient(135deg, #22d3ee, #0ea5e9);
  color: #042f2e;
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.45);
}

.tx-btn-primary:hover {
  box-shadow: 0 14px 36px rgba(14, 165, 233, 0.55);
}

.tx-btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.tx-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.tx-btn-dark {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #f8fafc;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.25);
}

.tx-btn-dark:hover {
  box-shadow: var(--tx-shadow-hover);
}

.tx-btn-outline {
  background: rgba(255, 255, 255, 0.92);
  color: var(--tx-navy2);
  border: 1px solid rgba(15, 76, 129, 0.15);
}

.tx-btn-outline:hover {
  border-color: rgba(6, 182, 212, 0.55);
  box-shadow: 0 8px 22px rgba(6, 182, 212, 0.2);
}

.tx-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tx-section {
  margin-bottom: 28px;
}

.tx-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.tx-section-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--tx-navy);
}

.tx-section-head p {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--tx-muted);
  max-width: 720px;
  line-height: 1.45;
}

.tx-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(6, 182, 212, 0.12);
  color: #0e7490;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.tx-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

@media (min-width: 1100px) {
  .tx-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tx-kpi {
  position: relative;
  border-radius: var(--tx-radius-sm);
  padding: 16px 16px 14px;
  background: var(--tx-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--tx-glass-border);
  box-shadow: 0 10px 28px rgba(15, 76, 129, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tx-kpi:hover {
  transform: translateY(-3px);
  box-shadow: var(--tx-shadow-hover);
}

.tx-kpi::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(180deg, var(--tx-accent, #0ea5e9), transparent);
}

.tx-kpi-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.tx-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(13, 148, 136, 0.12));
  color: var(--tx-navy2);
}

.tx-kpi-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tx-muted);
  margin: 0 0 4px;
  line-height: 1.3;
}

.tx-kpi-value {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--tx-navy);
}

.tx-kpi-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--tx-muted);
}

.tx-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 0.75rem;
}

.tx-trend-up {
  color: var(--tx-green);
}
.tx-trend-down {
  color: var(--tx-red);
}
.tx-trend-flat {
  color: var(--tx-muted);
}

.tx-spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
  margin-top: 8px;
}

.tx-spark span {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.55), rgba(14, 165, 233, 0.12));
  min-height: 4px;
  transition: height 0.25s ease;
}

.tx-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tx-badge-ok {
  background: rgba(5, 150, 105, 0.12);
  color: var(--tx-green);
  border: 1px solid rgba(5, 150, 105, 0.28);
}
.tx-badge-warn {
  background: rgba(217, 119, 6, 0.12);
  color: var(--tx-amber);
  border: 1px solid rgba(217, 119, 6, 0.28);
}
.tx-badge-risk {
  background: rgba(220, 38, 38, 0.1);
  color: var(--tx-red);
  border: 1px solid rgba(220, 38, 38, 0.25);
}
.tx-badge-info {
  background: rgba(99, 102, 241, 0.1);
  color: var(--tx-violet);
  border: 1px solid rgba(99, 102, 241, 0.22);
}
.tx-badge-neutral {
  background: rgba(100, 116, 139, 0.1);
  color: var(--tx-muted);
  border: 1px solid rgba(100, 116, 139, 0.2);
}

.tx-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.tx-card {
  border-radius: var(--tx-radius-sm);
  padding: 16px;
  background: #fff;
  border: 1px solid rgba(15, 76, 129, 0.1);
  box-shadow: 0 8px 24px rgba(15, 76, 129, 0.06);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.tx-card:hover {
  box-shadow: var(--tx-shadow);
  border-color: rgba(6, 182, 212, 0.35);
}

.tx-card h3 {
  margin: 0 0 8px;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--tx-navy);
}

.tx-card dl {
  margin: 0;
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--tx-muted);
}

.tx-card dt {
  font-weight: 600;
  color: #475569;
}
.tx-card dd {
  margin: 0;
}

.tx-two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 960px) {
  .tx-two-col {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.tx-live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.tx-live-card {
  border-radius: var(--tx-radius-sm);
  padding: 16px;
  background: linear-gradient(145deg, #ffffff, #f0f9ff);
  border: 1px solid rgba(14, 165, 233, 0.2);
  box-shadow: 0 10px 28px rgba(14, 116, 144, 0.1);
}

.tx-progress {
  height: 8px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.25);
  overflow: hidden;
  margin: 10px 0;
}

.tx-progress > span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #0ea5e9, #14b8a6);
  transition: width 0.4s ease;
}

.tx-timeline {
  position: relative;
  padding-left: 18px;
  margin: 12px 0 0;
  border-left: 2px solid rgba(14, 165, 233, 0.35);
}

.tx-timeline-item {
  position: relative;
  padding-bottom: 14px;
  font-size: 0.82rem;
  color: var(--tx-muted);
}

.tx-timeline-item::before {
  content: "";
  position: absolute;
  left: -23px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
}

.tx-ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.tx-ai-card {
  border-radius: var(--tx-radius-sm);
  padding: 18px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #0c4a6e 100%);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.35);
  min-height: 120px;
}

.tx-ai-card h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #f8fafc;
}

.tx-ai-card p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.88);
}

.tx-ai-tag {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #22d3ee;
}

.tx-monitor {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.tx-metric {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 76, 129, 0.1);
}

.tx-metric strong {
  display: block;
  font-size: 1.1rem;
  color: var(--tx-navy);
}
.tx-metric span {
  font-size: 0.75rem;
  color: var(--tx-muted);
}

.tx-chart-wrap {
  position: relative;
  height: 220px;
  margin-top: 8px;
}

.tx-alerts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tx-alert {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--tx-radius-sm);
  background: #fff;
  border-left: 4px solid var(--tx-alert, #64748b);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.tx-alert-p1 {
  --tx-alert: var(--tx-red);
  background: linear-gradient(90deg, rgba(254, 226, 226, 0.5), #fff);
}
.tx-alert-p2 {
  --tx-alert: var(--tx-amber);
  background: linear-gradient(90deg, rgba(254, 243, 199, 0.45), #fff);
}
.tx-alert-p3 {
  --tx-alert: var(--tx-cyan);
}

.tx-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.tx-input,
.tx-select {
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 76, 129, 0.16);
  font-size: 0.88rem;
  font-family: inherit;
  background: #fff;
  color: var(--tx-text);
  min-width: 0;
}

.tx-input:focus,
.tx-select:focus {
  outline: none;
  border-color: rgba(6, 182, 212, 0.65);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.tx-search {
  flex: 1 1 200px;
  min-width: 160px;
}

.tx-table-scroll {
  overflow: auto;
  max-height: min(62vh, 640px);
  border-radius: var(--tx-radius-sm);
  border: 1px solid rgba(15, 76, 129, 0.12);
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 76, 129, 0.07);
}

.tx-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
}

.tx-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #f1f5f9, #e2e8f0);
  color: var(--tx-navy);
  font-weight: 700;
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(15, 76, 129, 0.12);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.tx-table thead th[data-sort]:hover {
  background: #e0f2fe;
}

.tx-table tbody td {
  padding: 11px 10px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  color: #334155;
  vertical-align: middle;
}

.tx-table tbody tr:hover td {
  background: rgba(224, 242, 254, 0.55);
}

.tx-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--tx-muted);
}

.tx-pagination-btns {
  display: flex;
  gap: 8px;
}

.tx-empty {
  text-align: center;
  padding: 48px 20px;
  border-radius: var(--tx-radius);
  background: linear-gradient(160deg, rgba(224, 242, 254, 0.65), #fff);
  border: 1px dashed rgba(14, 165, 233, 0.35);
}

.tx-empty h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  color: var(--tx-navy);
}

.tx-empty p {
  margin: 0 auto 20px;
  max-width: 520px;
  color: var(--tx-muted);
  line-height: 1.55;
}

.tx-empty-steps {
  text-align: left;
  max-width: 420px;
  margin: 0 auto 22px;
  padding: 0;
  list-style: decimal;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.6;
}

.tx-empty-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* —— Modals (scoped) —— */
.tx-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 24px 16px;
  overflow-y: auto;
  align-items: flex-start;
  justify-content: center;
}

.tx-modal-overlay.tx-open {
  display: flex;
}

.tx-modal {
  width: 100%;
  max-width: 720px;
  margin: auto;
  border-radius: calc(var(--tx-radius) + 2px);
  background: #fff;
  border: 1px solid rgba(15, 76, 129, 0.12);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.35);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
}

.tx-modal-wide {
  max-width: 920px;
}

.tx-modal-head {
  padding: 20px 22px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tx-modal-head h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--tx-navy);
}

.tx-modal-head p {
  margin: 6px 0 0;
  font-size: 0.86rem;
  color: var(--tx-muted);
}

.tx-modal-close {
  border: none;
  background: rgba(241, 245, 249, 0.9);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  color: #64748b;
  flex-shrink: 0;
}

.tx-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.tx-modal-body {
  padding: 18px 22px 22px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.tx-form-section {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.tx-form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.tx-form-section h3 {
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
}

.tx-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 640px) {
  .tx-form-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.tx-page .tx-form-group {
  margin-bottom: 0;
}

.tx-page .tx-form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 6px;
  color: #334155;
}

.tx-page .tx-form-group input,
.tx-page .tx-form-group select,
.tx-page .tx-form-group textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 76, 129, 0.16);
  font-size: 0.9rem;
  font-family: inherit;
  background: #fff;
  color: var(--tx-text);
}

.tx-page .tx-form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.tx-page .tx-form-group input:focus,
.tx-page .tx-form-group select:focus,
.tx-page .tx-form-group textarea:focus {
  outline: none;
  border-color: rgba(6, 182, 212, 0.65);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18);
}

.tx-page .tx-form-group input[readonly] {
  background: #f8fafc;
  color: #64748b;
}

.tx-modal-footer {
  padding: 16px 22px 20px;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.tx-page .submit-button {
  width: 100%;
  margin-top: 6px;
}

.tx-row-actions {
  position: relative;
}

.tx-row-actions summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.78rem;
  color: #0ea5e9;
}

.tx-row-actions summary::-webkit-details-marker {
  display: none;
}

.tx-row-actions-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  min-width: 160px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.15);
  padding: 6px;
  z-index: 5;
}

.tx-row-actions-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: 8px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 8px;
  font-family: inherit;
}

.tx-row-actions-menu button:hover {
  background: #f1f5f9;
}

.tx-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 6000;
  padding: 14px 18px;
  border-radius: 12px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.88rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.tx-toast.tx-toast-show {
  opacity: 1;
  transform: translateY(0);
}

.tx-footnote {
  font-size: 0.75rem;
  color: var(--tx-muted);
  margin-top: 8px;
  line-height: 1.45;
}

.tx-vaccine-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tx-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.1);
  color: #0369a1;
  border: 1px solid rgba(14, 165, 233, 0.22);
}

.tx-emergency-banner {
  display: none;
  padding: 10px 14px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(254, 226, 226, 0.9), rgba(254, 249, 195, 0.5));
  border: 1px solid rgba(220, 38, 38, 0.25);
  font-size: 0.82rem;
  font-weight: 600;
  color: #991b1b;
  margin-bottom: 14px;
}

.tx-emergency-banner.tx-show {
  display: block;
}

  .tx-hero {
    padding: 20px 16px;
  }
  .tx-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tx-modal {
    max-height: 96vh;
  }
  .tx-table-scroll {
    max-height: 55vh;
  }
}

@media (max-width: 480px) {
  .tx-kpi-grid {
    grid-template-columns: 1fr;
  }
  .tx-hero-actions .tx-btn {
    width: 100%;
  }
}
