:root {
  --ink: #17212f;
  --muted: #667386;
  --line: #dbe3ea;
  --panel: #ffffff;
  --surface: #f5f8f7;
  --deep: #112836;
  --accent: #0d7c70;
  --accent-dark: #095d54;
  --warm: #d7a850;
  --danger: #9a3412;
  --success: #146c43;
  --shadow: 0 18px 42px rgba(17, 40, 54, 0.12);
  --sans: "Inter", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: #ffffff;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  margin-top: 8px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fbfcfd;
  font: 500 0.95rem var(--sans);
}

textarea {
  resize: vertical;
}

label {
  display: block;
  margin-bottom: 14px;
  color: var(--deep);
  font-weight: 800;
  font-size: 0.84rem;
}

.topbar,
.app-shell-header {
  min-height: 72px;
  padding: 0 clamp(18px, 4vw, 58px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar nav,
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--deep);
  color: #ffffff;
  font-weight: 900;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  font: 900 0.9rem var(--sans);
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(13, 124, 112, 0.2);
}

.button:hover {
  background: var(--accent-dark);
}

.button.secondary {
  background: #ffffff;
  color: var(--deep);
  border: 1px solid var(--line);
  box-shadow: none;
}

.hero {
  min-height: 720px;
  padding: clamp(48px, 8vw, 94px) clamp(18px, 6vw, 86px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: clamp(34px, 5vw, 72px);
  align-items: center;
  background:
    linear-gradient(90deg, rgba(17, 40, 54, 0.94), rgba(17, 40, 54, 0.78)),
    url("/static/images/healthcare-operations-hero.png") center/cover;
  color: #ffffff;
}

.hero-copy {
  max-width: 820px;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--warm);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 900;
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: 0.98;
  margin-bottom: 24px;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.12rem;
}

.hero-actions,
.oauth-row,
.domain-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-board {
  display: grid;
  gap: 14px;
}

.hero-board div {
  min-height: 106px;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.hero-board strong {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #ffffff;
  color: var(--deep);
}

.hero-board span {
  font-weight: 800;
}

.section {
  padding: 86px clamp(18px, 6vw, 86px);
}

.product-grid,
.auth-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  background: var(--surface);
}

.product-grid article,
.auth-card,
.panel,
.pricing,
.domain-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.product-grid article,
.auth-card,
.pricing > div {
  padding: 28px;
}

.product-grid h2,
.auth-card h2,
.panel h2,
.domain-row h2 {
  margin-bottom: 10px;
  color: var(--deep);
  font-size: 1.25rem;
}

.flow {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 46px;
  align-items: start;
}

.flow h2,
.pricing h2,
.dashboard-hero h1,
.preview-panel h2 {
  color: var(--deep);
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1.04;
  margin-bottom: 18px;
}

.flow ol {
  margin: 0;
  padding-left: 24px;
  color: var(--muted);
  font-weight: 650;
}

.flow li {
  margin-bottom: 14px;
}

.pricing {
  background: var(--deep);
  color: #ffffff;
}

.pricing h2 {
  color: #ffffff;
}

.pricing p {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.82);
}

.auth-section {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-card form {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.footer {
  min-height: 90px;
  padding: 0 clamp(18px, 6vw, 86px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #071b26;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.app-body {
  background: var(--surface);
}

.dashboard {
  width: min(1380px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.dashboard-hero.compact {
  margin-bottom: 22px;
}

.dashboard-hero p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 700;
}

.dashboard-flashes {
  margin: 18px 0;
}

.autosave-status {
  margin: 16px 0 0;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.9rem;
}

.setup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.panel {
  min-height: 300px;
  padding: 22px;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 14px 0 0;
}

.inline-link {
  display: inline-flex;
  margin-left: 10px;
  color: var(--accent);
  font-weight: 900;
}

.stacked-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.compact-form {
  display: grid;
  gap: 12px;
}

.compact-form label {
  margin-bottom: 0;
}

.record {
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--deep);
  font-weight: 900;
}

.facts {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px 14px;
}

.facts dt {
  color: var(--muted);
  font-weight: 800;
}

.facts dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.preview-panel {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.preview-panel iframe {
  width: 100%;
  min-height: 760px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.domain-table {
  display: grid;
  gap: 14px;
}

.search-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.search-form label {
  margin-bottom: 0;
}

.domain-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.domain-row p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 700;
}

.flash-stack {
  display: grid;
  gap: 10px;
}

.flash {
  margin: 0;
  padding: 12px 14px;
  border-radius: 6px;
  font-weight: 800;
}

.flash.success {
  color: var(--success);
  background: #e6f6ec;
}

.flash.error {
  color: var(--danger);
  background: #fff1e8;
}

@media (max-width: 1020px) {
  .hero,
  .flow,
  .setup-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .topbar nav,
  .header-actions {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .product-grid,
  .auth-section {
    grid-template-columns: 1fr;
  }

  .dashboard-hero,
  .domain-row,
  .search-form,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .facts {
    grid-template-columns: 1fr;
  }
}
