:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  
  --critical: #dc2626;
  --critical-bg: #fef2f2;
  --critical-border: #f87171;
  
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fbbf24;
  
  --stable: #2563eb;
  --stable-bg: #eff6ff;
  --stable-border: #93c5fd;

  --success: #16a34a;
  --success-bg: #f0fdf4;
  --success-border: #86efac;

  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --border: #cbd5e1;
  --border-light: #e2e8f0;

  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

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

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.45;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* Header & Clinical App Bar */
.app-header {
  background: #0f172a;
  color: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #1e293b;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.82rem;
}

.user-badge {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.user-name {
  font-weight: 600;
  color: #f8fafc;
}

.user-meta {
  color: #94a3b8;
  font-size: 0.72rem;
}

.shift-pill {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
}

.shift-active {
  background: #065f46;
  color: #a7f3d0;
  border: 1px solid #10b981;
}

.shift-exempt {
  background: #1e3a8a;
  color: #bfdbfe;
  border: 1px solid #3b82f6;
}

/* Main Navigation */
.main-nav {
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

.nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
  padding: 0 1rem;
}

.nav-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.65rem 1rem;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.nav-btn:hover {
  color: #ffffff;
}

.nav-btn.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
}

.badge-count {
  display: inline-block;
  background: var(--critical);
  color: #ffffff;
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  margin-left: 0.35rem;
  font-weight: 700;
}

/* Layout Containers */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.25rem 1rem;
}

/* Clinical Status Badges */
.badge-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.status-Critical {
  background: var(--critical-bg);
  color: var(--critical);
  border: 1px solid var(--critical-border);
}

.status-Close-Monitoring {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}

.status-Stable {
  background: var(--stable-bg);
  color: var(--stable);
  border: 1px solid var(--stable-border);
}

.status-Discharged {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

/* Metric / Counter Cards */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-card.critical {
  border-left: 4px solid var(--critical);
}

.metric-card.warning {
  border-left: 4px solid var(--warning);
}

.metric-card.stable {
  border-left: 4px solid var(--stable);
}

.metric-card.primary {
  border-left: 4px solid var(--primary);
}

.metric-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 0.35rem;
}

/* Action Toolbar */
.toolbar {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  flex: 1;
  max-width: 480px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 0.88rem;
  font-family: inherit;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

select.filter-select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.65rem;
  background: var(--surface);
  font-size: 0.82rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-critical {
  background: var(--critical);
  color: #ffffff;
}

.btn-critical:hover {
  background: #b91c1c;
}

.btn-warning {
  background: var(--warning);
  color: #ffffff;
}

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

.btn-outline:hover {
  background: var(--surface-subtle);
}

.btn-sm {
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
}

/* Patient Card & Table Layouts */
.patient-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.patient-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  position: relative;
}

.patient-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #94a3b8;
}

.patient-card.border-critical {
  border-top: 4px solid var(--critical);
}

.patient-card.border-close-monitoring {
  border-top: 4px solid var(--warning);
}

.patient-card.border-stable {
  border-top: 4px solid var(--stable);
}

.card-header-flex {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.card-bed {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
}

.card-name {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.15rem;
}

.card-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 0.65rem;
}

.card-diagnosis {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  background: var(--surface-subtle);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.65rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border-light);
  padding-top: 0.6rem;
}

/* Patient Profile Workspace */
.profile-header {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.profile-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.patient-vital-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: var(--surface-subtle);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  font-size: 0.85rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
}

.stat-val {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
}

/* "What Changed?" Alert Banner */
.delta-banner {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-left: 4px solid var(--success);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.delta-banner.has-critical {
  background: #fef2f2;
  border-color: #fca5a5;
  border-left-color: var(--critical);
}

.delta-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

/* Tabs Navigation in Patient Profile */
.tabs-nav {
  display: flex;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 1.25rem;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  color: var(--text-dim);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Clinical Tables */
.table-responsive {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.clinical-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.82rem;
}

.clinical-table th {
  background: var(--surface-subtle);
  padding: 0.65rem 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}

.clinical-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.clinical-table tr:hover td {
  background: #f8fafc;
}

/* Timeline List */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.timeline-item {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  border-left: 4px solid #94a3b8;
}

.timeline-item.severity-Critical {
  border-left-color: var(--critical);
  background: #fffafa;
}

.timeline-item.severity-Urgent {
  border-left-color: var(--warning);
}

.timeline-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

.timeline-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.timeline-details {
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.4;
}

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(1px);
}

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

.modal-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
}

.modal-card.modal-lg {
  max-width: 820px;
}

.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-subtle);
}

.modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-dim);
  line-height: 1;
}

.modal-body {
  padding: 1.25rem;
}

.modal-footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  background: var(--surface-subtle);
}

/* Form Controls */
.form-group {
  margin-bottom: 0.95rem;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  color: var(--text);
  background: var(--surface);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

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

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

/* Handover Card Specifics */
.handover-warning-box {
  background: var(--critical-bg);
  border: 1px solid var(--critical-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.handover-warning-title {
  font-weight: 800;
  color: var(--critical);
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

/* Shift Lockout Banner */
.lockout-card {
  max-width: 520px;
  margin: 4rem auto;
  background: var(--surface);
  border: 2px solid var(--critical-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.lockout-card h2 {
  color: var(--critical);
  margin-bottom: 1rem;
}

/* Responsiveness */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .header-user {
    justify-content: space-between;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .search-box {
    max-width: 100%;
  }
  .patient-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== LANDING PAGE STYLING ==================== */
.landing-wrapper {
  background: #f8fafc;
  min-height: 100vh;
}

.landing-nav-bar {
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  position: sticky;
  top: 0;
  z-index: 100;
}

.landing-nav-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.landing-brand h1 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.landing-brand .dept-tag {
  background: #1e293b;
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid #334155;
}

.landing-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.landing-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.landing-links a:hover {
  color: #ffffff;
}

.landing-hero {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  padding: 3.5rem 1.5rem 4rem 1.5rem;
  border-bottom: 1px solid #334155;
}

.landing-hero-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 992px) {
  .landing-hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.hero-headline {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 1.15rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 1.75rem;
  max-width: 640px;
}

.hero-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #334155;
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
}

.hero-stat-label {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Landing Portal Login Card */
.landing-portal-card {
  background: #ffffff;
  color: #0f172a;
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
}

.portal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.portal-title-row h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.quick-demo-accounts {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.demo-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.65rem;
}

.demo-pills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.demo-btn {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: #334155;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.demo-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.demo-btn.admin-pill {
  border-color: #38bdf8;
  background: #f0f9ff;
  color: #0369a1;
  font-weight: 700;
}

/* Landing Feature Sections */
.landing-section {
  max-width: 1320px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section-header-block {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem auto;
}

.section-tag {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.section-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.feature-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

.feature-pillar {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feature-pillar.accent-critical {
  border-left: 4px solid var(--critical);
}

.feature-pillar.accent-warning {
  border-left: 4px solid var(--warning);
}

.feature-pillar.accent-primary {
  border-left: 4px solid var(--primary);
}

.feature-pillar.accent-success {
  border-left: 4px solid var(--success);
}

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

.pillar-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

.pillar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.pillar-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1rem;
}

.pillar-spec {
  font-size: 0.75rem;
  color: var(--text-dim);
  background: var(--surface-subtle);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  line-height: 1.45;
}

/* Leadership & Governance Banner */
.leadership-banner {
  background: #0f172a;
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 2.25rem;
  margin-top: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  border: 1px solid #334155;
}

.leadership-info h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  color: #ffffff;
}

.leadership-role {
  color: #38bdf8;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.leadership-notes {
  font-size: 0.82rem;
  color: #94a3b8;
  max-width: 680px;
  line-height: 1.55;
}

.landing-footer {
  background: #0f172a;
  color: #64748b;
  border-top: 1px solid #1e293b;
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
}

/* ==========================================================================
   Pediatric Department Guidelines & Protocols
   ========================================================================== */
.guideline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.guideline-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.guideline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.guideline-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.category-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--primary-light);
  color: var(--primary);
}

.category-tag.emergency {
  background: #fee2e2;
  color: #dc2626;
}

.category-tag.neonatology {
  background: #fef3c7;
  color: #d97706;
}

.category-tag.respiratory {
  background: #e0e7ff;
  color: #4f46e5;
}

.category-tag.neurology {
  background: #f3e8ff;
  color: #9333ea;
}

.guideline-summary {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.dosage-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.dosage-chip {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-family: monospace;
  border-radius: var(--radius-sm);
  color: #0369a1;
  font-weight: 600;
}

.guideline-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 0.85rem;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.calculator-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.calc-input-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ==========================================================================
   Interactive Protocol Checklists
   ========================================================================== */
.protocol-step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 0.65rem;
  transition: background 0.15s ease;
}

.protocol-step:hover {
  background: var(--surface-subtle);
}

.protocol-step.completed {
  background: #f0fdf4;
  border-color: #86efac;
}

.step-num {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.protocol-step.completed .step-num {
  background: #16a34a;
}

/* ==========================================================================
   Roster & Safe Staffing Ratio Dashboard
   ========================================================================== */
.ratio-banner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ratio-metric-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.ratio-metric-card.safe {
  border-left: 4px solid var(--success);
}

.ratio-metric-card.warning {
  border-left: 4px solid var(--warning);
}

.ratio-metric-card.critical {
  border-left: 4px solid var(--critical);
}

.ratio-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin-top: 0.35rem;
}

.bleep-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #e0f2fe;
  color: #0369a1;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  border: 1px solid #bae6fd;
}

.bleep-pill:hover {
  background: #bae6fd;
}

/* ==========================================================================
   Excel Upload Dropzone & Preview Table
   ========================================================================== */
.excel-dropzone {
  border: 2px dashed #94a3b8;
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 1.25rem;
}

.excel-dropzone:hover, .excel-dropzone.dragover {
  border-color: #0284c7;
  background: #f0f9ff;
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-top: 1rem;
  max-height: 350px;
  overflow-y: auto;
  display: block;
}

.preview-table th {
  background: #f1f5f9;
  position: sticky;
  top: 0;
  text-align: left;
  padding: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.preview-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.preview-table tr.row-valid {
  background: #f0fdf4;
}

.preview-table tr.row-warning {
  background: #fffbeb;
}

.preview-table tr.row-error {
  background: #fef2f2;
}

.action-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  font-size: 0.85rem;
  border-radius: 4px;
  transition: background 0.1s ease;
}

.action-icon-btn:hover {
  background: var(--border-light);
}

