:root {
  --bg: #f4f8fb;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: #ffffff;
  --text: #26313a;
  --muted: #62717b;
  --line: rgba(93, 121, 145, 0.18);
  --accent: #6f8faa;
  --accent-soft: #d9e5ef;
  --accent-deep: #53748f;
  --sage: #5d7a6f;
  --gold: #c6a46b;
  --shadow: 0 24px 48px rgba(83, 116, 143, 0.12);
  --border-weight: 2px;
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(111, 143, 170, 0.12), transparent 28%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.95), transparent 24%),
    linear-gradient(145deg, #f8fbfd 0%, #eff5f9 46%, #f8fbfd 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 28px 22px;
  border-right: var(--border-weight) solid var(--line);
  background: rgba(248, 251, 253, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  margin-bottom: 24px;
}

.brand-logo {
  width: 100%;
  max-width: 260px;
  display: block;
  margin-bottom: 14px;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 440px);
}

.invite-card {
  margin-top: 18px;
}

.login-card h1 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.03em;
}

.login-card .stacked {
  margin-top: 14px;
}

.auth-helper {
  margin: 10px 0 0;
  font-size: 0.92rem;
}

.password-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.password-input input {
  min-width: 0;
}

.password-toggle {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(111, 143, 170, 0.1);
  color: var(--accent-deep);
  border: var(--border-weight) solid rgba(93, 121, 145, 0.16);
}

.form-error {
  min-height: 1.3em;
  color: #9a3b2e;
}

.session-pill {
  align-self: center;
  border: var(--border-weight) solid rgba(93, 121, 145, 0.16);
  border-radius: var(--radius-md);
  color: var(--muted);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.7);
}

.tooltip {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-left: 6px;
  border: var(--border-weight) solid rgba(93, 121, 145, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  transform: none;
  cursor: help;
}

.tooltip.inline {
  width: 19px;
  height: 19px;
  font-size: 0.68rem;
  margin-left: 4px;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 20;
  width: min(280px, 80vw);
  padding: 10px 12px;
  border: var(--border-weight) solid rgba(93, 121, 145, 0.2);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 14px 30px rgba(83, 116, 143, 0.18);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, 6px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.tooltip::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  z-index: 21;
  width: 10px;
  height: 10px;
  border-right: var(--border-weight) solid rgba(93, 121, 145, 0.2);
  border-bottom: var(--border-weight) solid rgba(93, 121, 145, 0.2);
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px) rotate(45deg);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.tooltip:hover,
.tooltip:focus-visible {
  background: #ffffff;
  transform: none;
}

.tooltip:hover::after,
.tooltip:hover::before,
.tooltip:focus-visible::after,
.tooltip:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, 0) rotate(0deg);
}

.tooltip:hover::before,
.tooltip:focus-visible::before {
  transform: translate(-50%, 0) rotate(45deg);
}

.brand h1,
.hero h2,
.section-head h2,
.section-head h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.03em;
}

.brand h1 {
  font-size: 2.2rem;
  line-height: 1.02;
}

.subtle {
  color: var(--muted);
  line-height: 1.5;
}

.panel {
  background: var(--panel);
  border: var(--border-weight) solid rgba(93, 121, 145, 0.14);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 20px;
}

.sidebar .panel + .panel {
  margin-top: 18px;
}

.content {
  padding: 28px;
}

.app-switcher {
  position: sticky;
  top: 0;
  z-index: 30;
  display: inline-flex;
  gap: 8px;
  margin: -12px 0 18px;
  padding: 8px;
  border: var(--border-weight) solid rgba(93, 121, 145, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(248, 251, 253, 0.92);
  box-shadow: 0 16px 34px rgba(83, 116, 143, 0.12);
  backdrop-filter: blur(18px);
}

.app-switch-button {
  min-width: 132px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  color: var(--muted);
  background: transparent;
}

.app-switch-button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow: 0 12px 24px rgba(83, 116, 143, 0.22);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 24px;
}

.hero h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.98;
  max-width: 12ch;
  margin-bottom: 12px;
}

.hero p {
  max-width: 60ch;
  color: var(--muted);
}

.hero-actions,
.actions,
.chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  border: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.primary,
.secondary,
.ghost,
.chip {
  border-radius: var(--radius-md);
  padding: 12px 18px;
}

.compact {
  padding: 8px 11px;
  font-size: 0.82rem;
}

.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(83, 116, 143, 0.24);
}

.secondary {
  background: #eaf1f6;
  color: var(--text);
}

.ghost {
  background: transparent;
  color: var(--muted);
  border: var(--border-weight) solid var(--line);
}

.chip {
  background: #f5f8fb;
  color: var(--muted);
  border: 1px solid transparent;
  padding: 10px 14px;
}

.chip.active {
  background: rgba(111, 143, 170, 0.16);
  color: var(--accent-deep);
  border-color: rgba(111, 143, 170, 0.28);
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  color: var(--accent);
}

.stacked {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stacked span {
  font-size: 0.92rem;
  color: var(--muted);
}

.section-copy {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 58ch;
  line-height: 1.45;
}

.option-group {
  margin: 0;
  padding: 14px;
  border: var(--border-weight) solid rgba(93, 121, 145, 0.16);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.84);
}

.option-group legend {
  padding: 0 6px;
  font-size: 0.92rem;
  color: var(--muted);
}

.check-option {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.check-option + .check-option {
  margin-top: 8px;
}

.check-option input {
  width: auto;
}

input,
select,
textarea {
  width: 100%;
  border: var(--border-weight) solid rgba(93, 121, 145, 0.16);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
}

textarea {
  resize: vertical;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.tab-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 24px;
}

.tab-button {
  padding: 11px 16px;
  border-radius: var(--radius-md);
  border: var(--border-weight) solid rgba(93, 121, 145, 0.14);
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
}

.tab-button.active {
  background: linear-gradient(135deg, rgba(111, 143, 170, 0.18), rgba(83, 116, 143, 0.14));
  color: var(--accent-deep);
  box-shadow: 0 10px 24px rgba(83, 116, 143, 0.12);
}

.tab-panel {
  margin-bottom: 24px;
}

.referral-guide-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.referral-guide-intro {
  min-height: calc(100vh - 170px);
  padding: 14px;
}

.referral-guide-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 18px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.referral-guide-frame {
  display: block;
  width: 100%;
  min-height: calc(100vh - 270px);
  height: 78vh;
  border: var(--border-weight) solid rgba(93, 121, 145, 0.16);
  border-radius: var(--radius-lg);
  background: #fff;
}

.operations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.snapshot-shell {
  display: grid;
  gap: 22px;
}

.snapshot-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  align-items: stretch;
  gap: 16px;
}

.snapshot-list .lead-card {
  min-height: 190px;
}

.snapshot-list .lead-name {
  font-size: 1.35rem;
}

.snapshot-list .lead-card-top,
.snapshot-list .lead-card-bottom {
  gap: 16px;
}

.snapshot-list .lead-meta,
.snapshot-list .lead-owner,
.snapshot-list .lead-reminder {
  font-size: 0.98rem;
  line-height: 1.35;
}

.snapshot-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.snapshot-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 14px;
  border-top: var(--border-weight) solid rgba(93, 121, 145, 0.12);
}

.snapshot-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(111, 143, 170, 0.08);
}

.snapshot-field.wide {
  grid-column: 1 / -1;
}

.snapshot-field span {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.snapshot-field strong {
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.snapshot-empty {
  margin: 0;
  color: var(--muted);
}

.bed-board-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(320px, 1fr);
  gap: 18px;
}

.bed-board-grid > .panel:last-child {
  grid-column: 1 / -1;
}

.finished-shell {
  display: grid;
  gap: 18px;
}

.finished-head {
  align-items: flex-start;
}

.finished-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: var(--border-weight) solid rgba(93, 121, 145, 0.12);
  border-radius: var(--radius-md);
  background: rgba(237, 245, 250, 0.72);
  margin-bottom: 18px;
}

.finished-toolbar .compact {
  min-width: min(320px, 100%);
  margin: 0;
}

.finished-month-groups {
  display: grid;
  gap: 22px;
}

.finished-month-section {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.finished-month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: var(--border-weight) solid rgba(93, 121, 145, 0.12);
}

.finished-month-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--text);
}

.bed-metric {
  display: grid;
  gap: 8px;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: var(--border-weight) solid rgba(93, 121, 145, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(237, 245, 250, 0.98));
  margin-bottom: 16px;
}

.bed-metric span {
  color: var(--muted);
}

.bed-metric strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 5.4rem);
  line-height: 0.9;
  color: var(--accent-deep);
}

.bed-discharge-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.bed-discharge-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  border-radius: var(--radius-md);
  border: var(--border-weight) solid rgba(93, 121, 145, 0.12);
  background: rgba(255, 255, 255, 0.76);
  padding: 14px;
}

.bed-discharge-item p {
  margin: 4px 0 0;
  color: var(--muted);
}

.ops-panel {
  min-height: 220px;
}

.calendar-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
  gap: 18px;
  margin-bottom: 24px;
}

.calendar-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.calendar-view-toggle {
  display: inline-flex;
  gap: 8px;
  padding: 4px;
  border-radius: var(--radius-md);
  background: rgba(111, 143, 170, 0.08);
}

.calendar-view-toggle .chip {
  padding: 8px 12px;
}

.calendar-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: var(--border-weight) solid rgba(93, 121, 145, 0.12);
  font-size: 0.8rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}

.legend-overdue {
  background: rgba(255, 242, 236, 0.9);
}

.legend-upcoming {
  background: rgba(237, 245, 250, 0.95);
}

.legend-today {
  background: rgba(231, 240, 247, 0.95);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.calendar-grid.week-view .calendar-day {
  min-height: 150px;
}

.calendar-weekday,
.calendar-day {
  border-radius: var(--radius-md);
  border: var(--border-weight) solid rgba(93, 121, 145, 0.12);
}

.calendar-weekday {
  padding: 10px 8px;
  background: rgba(111, 143, 170, 0.08);
  color: var(--muted);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.calendar-day {
  min-height: 110px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.84);
  text-align: left;
}

.calendar-day:hover {
  transform: none;
  background: rgba(244, 249, 252, 0.98);
}

.calendar-day.outside-month {
  opacity: 0.52;
}

.calendar-day.selected {
  border-color: rgba(111, 143, 170, 0.42);
  background: rgba(231, 240, 247, 0.92);
}

.calendar-day.today {
  box-shadow: inset 0 0 0 1px rgba(83, 116, 143, 0.2);
}

.calendar-day.has-followups {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(237, 245, 250, 0.98));
}

.calendar-day.overdue-day {
  background: linear-gradient(180deg, rgba(255, 247, 243, 0.96), rgba(255, 252, 249, 0.98));
}

.calendar-day-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 10px;
}

.calendar-day-number {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.calendar-day-count {
  font-size: 0.78rem;
  color: var(--accent-deep);
}

.calendar-day-list,
.agenda-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-day-item,
.agenda-item {
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: rgba(111, 143, 170, 0.08);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.35;
}

.task-list,
.report-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-card,
.report-row {
  border-radius: var(--radius-md);
  border: var(--border-weight) solid rgba(93, 121, 145, 0.12);
  background: rgba(255, 255, 255, 0.78);
  padding: 14px;
}

.task-card {
  text-align: left;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-card:hover {
  transform: none;
  background: rgba(244, 249, 252, 0.98);
}

.task-card.overdue {
  background: linear-gradient(180deg, rgba(255, 244, 240, 0.96), rgba(255, 251, 248, 0.98));
}

.task-card-head,
.report-row,
.report-stats {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  flex-wrap: wrap;
}

.task-card p,
.report-row span {
  margin: 0;
  color: var(--muted);
}

.task-badge {
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: rgba(111, 143, 170, 0.12);
  color: var(--accent-deep);
  font-size: 0.78rem;
  white-space: nowrap;
}

.report-row strong {
  display: block;
}

.report-row span {
  font-size: 0.85rem;
}

.calendar-day-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.calendar-day-item span {
  color: var(--muted);
  font-size: 0.74rem;
}

.agenda-item {
  border: var(--border-weight) solid rgba(93, 121, 145, 0.12);
  background: rgba(255, 255, 255, 0.76);
  text-align: left;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.agenda-item:hover {
  transform: none;
  background: rgba(244, 249, 252, 0.98);
}

.agenda-item strong {
  display: block;
  margin-bottom: 4px;
}

.metric-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 251, 0.94));
  border: var(--border-weight) solid rgba(93, 121, 145, 0.12);
  box-shadow: var(--shadow);
}

.metric-card strong {
  display: block;
  font-size: 2rem;
  font-family: Georgia, "Times New Roman", serif;
  margin: 8px 0 4px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 390px) 1fr;
  gap: 18px;
}

.list-panel,
.form-panel,
.split-panel {
  min-height: 200px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}

.section-head.minor {
  margin-top: 22px;
}

.pill {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(93, 122, 111, 0.12);
  color: var(--sage);
  white-space: nowrap;
}

.lead-list,
.timeline,
.invite-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lead-card {
  text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 241, 235, 0.98));
  border: var(--border-weight) solid rgba(93, 121, 145, 0.13);
  border-radius: var(--radius-lg);
  padding: 16px;
  width: 100%;
  box-shadow: 0 12px 28px rgba(76, 53, 34, 0.08);
}

.lead-card.selected {
  outline: 2px solid rgba(164, 77, 44, 0.24);
}

.lead-card.overdue {
  background: linear-gradient(180deg, rgba(255, 242, 236, 0.95), rgba(255, 248, 244, 0.98));
}

.lead-card-top,
.lead-card-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.lead-name {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.lead-meta,
.lead-owner,
.lead-reminder,
.timeline p {
  margin: 0;
  color: var(--muted);
}

.status-badge {
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  align-self: start;
  background: rgba(93, 122, 111, 0.12);
  color: var(--sage);
  font-size: 0.84rem;
}

.interest-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.interest-high {
  background: rgba(93, 122, 111, 0.16);
  color: #36584b;
}

.interest-medium {
  background: rgba(198, 164, 107, 0.2);
  color: #7f6027;
}

.interest-low {
  background: rgba(111, 143, 170, 0.18);
  color: #47627a;
}

.detail-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.wide {
  grid-column: 1 / -1;
}

.attachment-item,
.timeline-item,
.invite-item {
  border-radius: var(--radius-md);
  border: var(--border-weight) solid rgba(93, 121, 145, 0.12);
  background: rgba(255, 255, 255, 0.76);
  padding: 14px;
}

.timeline-delete {
  margin-top: 12px;
}

.invite-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.invite-item strong {
  display: block;
}

.invite-link {
  word-break: break-all;
  color: var(--accent-deep);
}

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

.agent-health-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: var(--border-weight) solid rgba(93, 121, 145, 0.12);
  background: rgba(255, 255, 255, 0.58);
}

.agent-health-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.agent-health-head h3 {
  margin: 0 0 4px;
}

.agent-health-summary,
.agent-health-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agent-health-card,
.agent-health-item {
  border-radius: var(--radius-md);
  border: var(--border-weight) solid rgba(93, 121, 145, 0.12);
  background: rgba(255, 255, 255, 0.82);
  padding: 14px;
}

.agent-health-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.agent-health-card.healthy {
  background: rgba(93, 122, 111, 0.1);
  border-color: rgba(93, 122, 111, 0.2);
}

.agent-health-card.warn {
  background: rgba(198, 164, 107, 0.12);
  border-color: rgba(198, 164, 107, 0.24);
}

.agent-health-card.stale {
  background: rgba(154, 59, 46, 0.08);
  border-color: rgba(154, 59, 46, 0.18);
}

.agent-health-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.agent-health-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.agent-health-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.agent-health-pill.healthy {
  background: rgba(93, 122, 111, 0.16);
  color: #36584b;
}

.agent-health-pill.stale {
  background: rgba(154, 59, 46, 0.12);
  color: #9a3b2e;
}

.invite-action {
  padding: 8px 12px;
}

.invite-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.split-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.subpanel {
  min-width: 0;
}

.touch-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.full {
  grid-column: 1 / -1;
}

.empty-state {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
  border: 1px dashed rgba(103, 74, 49, 0.14);
}

@media (max-width: 1160px) {
  .shell,
  .workspace,
  .split-panel,
  .calendar-shell,
  .bed-board-grid,
  .operations-grid {
    grid-template-columns: 1fr;
  }

  .bed-board-grid > .panel:last-child {
    grid-column: auto;
  }

  .dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sidebar {
    border-right: none;
    border-bottom: var(--border-weight) solid var(--line);
  }
}

@media (max-width: 720px) {
  .content,
  .sidebar {
    padding: 18px;
  }

  .dashboard-grid,
  .form-grid,
  .touch-form,
  .snapshot-list,
  .snapshot-details {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: start;
    flex-direction: column;
  }

  .calendar-nav {
    justify-content: flex-start;
  }

  .finished-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .finished-toolbar .secondary {
    width: 100%;
  }
}
