:root {
  --ink: #0f172a;
  --muted: #5b6675;
  --surface: #ffffff;
  --surface-2: #f1f6fb;
  --outline: rgba(15, 23, 42, 0.12);
  --accent: #f6a425;
  --accent-2: #117ea5;
  --accent-3: #0d4c78;
  --card-radius: 18px;
  --shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #f3f7fb;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, .brand-title {
  font-family: "Sora", system-ui, -apple-system, sans-serif;
  letter-spacing: -0.02em;
}

.app-topbar {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.app-topbar-inner {
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-link {
  color: inherit;
  text-decoration: none;
}

.brand-link:hover {
  color: inherit;
}

.brand-mark {
  height: 60px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
}

.brand-title {
  font-weight: 700;
  font-size: 1.35rem;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.9rem;
}

.status-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.status-pill {
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.9rem;
  color: var(--muted);
}

.topbar-actions .btn-signup {
  background: linear-gradient(135deg, var(--accent) 0%, #ffb449 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  box-shadow: 0 10px 18px rgba(246, 164, 37, 0.28);
}

.app-hero {
  padding: 28px 0 8px;
}

.hero-panel {
  display: grid;
  gap: 24px;
  border-radius: 24px;
  padding: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(250, 247, 241, 0.95)),
    radial-gradient(circle at top left, rgba(29, 78, 216, 0.08), transparent 45%);
  border: 1px solid rgba(16, 20, 24, 0.08);
  box-shadow: var(--shadow);
}

.hero-panel h1 {
  font-size: clamp(1.8rem, 2.4vw, 2.5rem);
  margin-bottom: 12px;
}

.hero-panel p {
  color: var(--muted);
  margin-bottom: 0;
}

.eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent-2);
  font-weight: 600;
  margin-bottom: 12px;
}

.marketing-hero .eyebrow {
  color: #bfe5f2;
}

.hero-highlights {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.landing-page .app-topbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  background: #ffffff;
}

.marketing-hero {
  position: relative;
  padding: 48px 0 90px;
  background:
    radial-gradient(circle at top right, rgba(64, 193, 212, 0.35), transparent 55%),
    linear-gradient(120deg, #0e4c7b 0%, #137aa9 50%, #31b7c4 100%);
  color: #eef6fb;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 36px;
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.hero-copy h1 {
  font-size: clamp(2.1rem, 3.2vw, 3.2rem);
  margin-bottom: 16px;
}

.hero-copy p {
  color: rgba(238, 246, 251, 0.9);
  font-size: 1.05rem;
  max-width: 520px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.cta-secondary {
  border-radius: 12px;
  padding: 12px 18px;
  border: 1px solid rgba(238, 246, 251, 0.4);
  color: #eef6fb;
}

.hero-meta {
  margin-top: 14px;
  color: rgba(238, 246, 251, 0.75);
  font-size: 0.9rem;
}

.hero-visual {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
}

.mock-window {
  width: min(460px, 100%);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 45px rgba(8, 47, 73, 0.35);
  overflow: hidden;
}

.mock-header {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: #ecf2f7;
}

.mock-header span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c4d6e6;
}

.mock-body {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.mock-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #f7fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.mock-card.tall {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.mock-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3db4c2, #7bd4de);
}

.mock-lines {
  display: grid;
  gap: 6px;
}

.line {
  height: 8px;
  border-radius: 999px;
  background: #dfe7ef;
}

.line.short {
  width: 60%;
}

.mock-badges {
  display: grid;
  gap: 6px;
}

.badge-pill {
  width: 46px;
  height: 12px;
  border-radius: 999px;
  background: #4fc2d0;
}

.badge-pill.light {
  background: #f6b552;
}

.mock-metric {
  display: grid;
  gap: 6px;
  align-items: end;
  grid-auto-flow: column;
}

.mock-metric .bar {
  width: 12px;
  background: #3db4c2;
  border-radius: 6px 6px 0 0;
  height: 34px;
}

.mock-metric .bar:nth-child(2) {
  height: 46px;
  background: #79cfe1;
}

.mock-metric .bar:nth-child(3) {
  height: 28px;
  background: #f6b552;
}

.mock-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: #0e4c7b;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.hero-float {
  width: min(280px, 100%);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  padding: 14px 16px;
  box-shadow: 0 16px 30px rgba(8, 47, 73, 0.2);
  margin-top: -24px;
}

.float-title {
  font-weight: 600;
}

.float-body {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 70px;
  background: linear-gradient(180deg, rgba(243, 247, 251, 0) 0%, #f3f7fb 80%);
}

.feature-bar {
  background: #ffffff;
  margin-top: -32px;
  padding: 18px 0;
}

.feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
  padding: 18px 22px;
}

.feature {
  display: flex;
  gap: 12px;
  align-items: center;
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(17, 126, 165, 0.12);
  color: #117ea5;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.feature-title {
  font-weight: 600;
}

.feature-body {
  color: var(--muted);
  font-size: 0.9rem;
}

.how-it-works {
  padding: 48px 0 32px;
  text-align: center;
}

.how-it-works h2 {
  margin-bottom: 24px;
}

.steps-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.step-card {
  padding: 20px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
  position: relative;
}

.step-card::after {
  content: "";
  position: absolute;
  right: -16px;
  top: 50%;
  width: 32px;
  height: 2px;
  background: rgba(17, 126, 165, 0.4);
}

.step-card:last-child::after {
  display: none;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(17, 126, 165, 0.1);
  color: #117ea5;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
}

.step-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.step-body {
  color: var(--muted);
  font-size: 0.9rem;
}

.how-cta {
  margin-top: 24px;
}

.metrics-band {
  padding: 22px 0 36px;
}

.metrics-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  text-align: center;
}

.metric {
  border-radius: 16px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
}

.metric-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0e4c7b;
}

.metric-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.integrations-slider {
  overflow: hidden;
  position: relative;
}

.integration-track {
  display: flex;
  gap: 16px;
  transition: transform 600ms ease;
  will-change: transform;
}

.integration-card {
  flex: 0 0 calc((100% - 32px) / 3);
  border-radius: 16px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
  text-align: center;
}

@media (max-width: 900px) {
  .integration-card {
    flex-basis: 50%;
  }
}

@media (max-width: 640px) {
  .integration-card {
    flex-basis: 100%;
  }
}

.testimonial {
  padding: 20px 0 48px;
}

.quote-card {
  border-radius: 18px;
  background: #eaf3f8;
  padding: 28px;
  text-align: center;
  color: #0d3b58;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
}

.quote-mark {
  font-size: 2rem;
  font-weight: 700;
  color: #56b8d4;
  margin-bottom: 10px;
}

.quote-card p {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.quote-attrib {
  font-size: 0.9rem;
  color: rgba(13, 59, 88, 0.7);
}

.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding: 18px 0 26px;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

@media (max-width: 768px) {
  .step-card::after {
    display: none;
  }

  .hero-float {
    margin-top: 0;
  }
}

.auth-shell {
  padding: 40px 0 64px;
}

.auth-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}

.auth-card {
  border-radius: 20px;
}

.auth-divider {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-size: 0.7rem;
  margin: 10px 0;
}

.auth-alt {
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-aside {
  padding: 12px;
}

.auth-aside h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  margin-bottom: 16px;
}

.auth-aside ul {
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 10px;
}

.auth-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-2);
  font-weight: 600;
  margin-bottom: 10px;
}

.highlight-card {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(16, 20, 24, 0.08);
}

.highlight-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.highlight-body {
  color: var(--muted);
  font-size: 0.9rem;
}

.app-shell {
  padding: 28px 0 48px;
}

.card {
  border-radius: var(--card-radius);
  border: 1px solid rgba(16, 20, 24, 0.08);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.panel-title {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.panel-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.form-control {
  border-radius: 12px;
  border: 1px solid rgba(16, 20, 24, 0.12);
  padding: 12px 14px;
}

.form-control:focus {
  border-color: rgba(15, 118, 110, 0.6);
  box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.15);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #f6b552 100%);
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 24px rgba(246, 164, 37, 0.25);
}

.btn-primary:hover {
  filter: brightness(0.96);
}

.result-area {
  min-height: 240px;
}

.result-placeholder {
  padding: 28px;
  border-radius: 18px;
  border: 1px dashed rgba(16, 20, 24, 0.18);
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.6);
}

.progress-shell {
  height: 10px;
  border-radius: 999px;
  background: rgba(16, 20, 24, 0.08);
  overflow: hidden;
}

.progress-animated {
  background: linear-gradient(90deg, var(--accent-2), #38bdf8, var(--accent));
  transition: width 0.6s ease;
}

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

.accordion-item {
  border-radius: 14px;
  border: 1px solid rgba(16, 20, 24, 0.08);
  margin-bottom: 10px;
  overflow: hidden;
}

.accordion-button {
  background: #fff;
  font-weight: 600;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(217, 119, 6, 0.12);
}

.accordion-button:not(.collapsed) {
  color: var(--ink);
  background: rgba(217, 119, 6, 0.08);
}

.evidence {
  border: 1px dashed rgba(16, 20, 24, 0.22);
  background: rgba(16, 20, 24, 0.02);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.9rem;
  color: #2d2f34;
}

.evidence-label {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(16, 20, 24, 0.55);
  margin-bottom: 6px;
  cursor: pointer;
}

.evidence summary {
  list-style: none;
}

.evidence summary::-webkit-details-marker {
  display: none;
}

.evidence-link {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.evidence-link:hover {
  color: var(--accent);
}

.kpi {
  border-radius: 16px;
  border: 1px solid rgba(16, 20, 24, 0.1);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 16px;
}

.decision-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-title {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.summary-sub {
  color: var(--muted);
  font-size: 0.9rem;
}

.summary-main {
  display: grid;
  gap: 6px;
}

.summary-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.risk-flag {
  color: #b91c1c;
  font-weight: 600;
}

.report-layout {
  align-items: flex-start;
}

.facility-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.facility-summary-card {
  border-radius: 14px;
  border: 1px solid rgba(16, 20, 24, 0.08);
  background: rgba(255, 255, 255, 0.9);
  padding: 14px;
}

.summary-count {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.summary-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

.facility-filter .form-select-sm {
  min-width: 200px;
}

.audit-grid {
  display: grid;
  gap: 10px;
}

.audit-row {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(16, 20, 24, 0.08);
  background: rgba(255, 255, 255, 0.7);
}

.audit-label {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.audit-value {
  font-weight: 600;
}

#decisionStatus {
  border-radius: 14px;
}

#pdfColumn {
  position: sticky;
  top: 92px;
  align-self: flex-start;
}

.pdf-panel {
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pdf-panel .card-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.pdf-canvas-wrap {
  position: relative;
  width: 100%;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid rgba(16, 20, 24, 0.12);
  overflow: auto;
  flex: 1 1 auto;
}

#pdfCanvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: auto;
}

.pdf-highlights {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pdf-highlight {
  position: absolute;
  border: 2px solid rgba(234, 179, 8, 0.9);
  background: rgba(234, 179, 8, 0.2);
  border-radius: 4px;
}

@media print {
  .app-topbar,
  .app-hero,
  .panel,
  #loading,
  .summary-actions {
    display: none !important;
  }
  body {
    background: #fff;
  }
}

.alert {
  border-radius: 14px;
}

.table {
  color: var(--ink);
}

.text-muted {
  color: var(--muted) !important;
}

@media (max-width: 991px) {
  .hero-panel {
    padding: 24px;
  }

  .app-topbar-inner {
    padding: 14px 0;
  }

  .landing-panel {
    padding: 22px;
  }
}

.integration-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.integration-admin-card {
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(16, 20, 24, 0.12);
  background: rgba(255, 255, 255, 0.85);
  display: grid;
  gap: 8px;
}

.integration-name {
  font-weight: 600;
}

.integration-desc {
  color: var(--muted);
  font-size: 0.92rem;
}

.integration-status {
  align-self: start;
  background: rgba(15, 118, 110, 0.12);
  color: #0f5f59;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 600;
}

.integration-note {
  color: var(--muted);
  font-size: 0.95rem;
}
  
