* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }

:root {
  --bg: #fbfbfa;
  --bg-soft: #eef6f2;
  --card: #ffffff;
  --ink: #12181a;
  --muted: #667070;
  --accent: #0b6b52;
  --accent-dark: #084f3d;
  --accent-ink: #f3fbf7;
  --line: #e6e9e6;
  --radius: 18px;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Unbounded', var(--sans);
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.pcontainer { max-width: 620px; margin: 0 auto; padding: 0 18px 60px; }
.pcontainer.wide { max-width: 1080px; }

a { color: inherit; }

/* ---------- nav ---------- */

.pnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  flex-wrap: wrap;
  gap: 12px;
}
.pbrand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.pnav-links { display: flex; gap: 4px; align-items: center; }
.pnav-links a {
  text-decoration: none;
  padding: 9px 16px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.pnav-links a:hover { color: var(--ink); background: var(--bg-soft); }
.pnav-links a.active { color: var(--ink); }

/* ---------- hero ---------- */

.hero { padding: 40px 0 56px; text-align: center; }
.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--bg-soft);
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.01em;
  max-width: 800px;
  margin: 0 auto;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub {
  max-width: 560px;
  margin: 22px auto 0;
  font-size: 17px;
  color: var(--muted);
}
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}
.hero-note { margin-top: 16px; font-size: 13px; color: var(--muted); }

.btn-hero {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 16px 26px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
}
.btn-hero:hover { background: var(--accent-dark); }
.btn-hero-ghost {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 16px 22px;
  color: var(--ink);
}

/* ---------- demo mock ---------- */

.pcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
}
.demo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  background: var(--bg-soft);
  border: none;
  margin-bottom: 70px;
}
.demo-frame {
  width: 230px;
  background: #fdfcf9;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px -20px rgba(11, 107, 82, 0.35);
}
.demo-frame-bar { display: flex; gap: 5px; padding: 10px 12px; background: #efe9dc; }
.demo-frame-bar span { width: 8px; height: 8px; border-radius: 50%; background: #d8cfb8; }
.demo-frame-body { padding: 16px; font-family: 'Manrope', sans-serif; }
.demo-mock-header { font-size: 10px; letter-spacing: 0.1em; color: #a89a78; text-transform: uppercase; text-align: center; margin-bottom: 6px; }
.demo-mock-title { font-family: 'Playfair Display', serif; font-size: 15px; text-align: center; margin-bottom: 14px; color: #23211e; }
.demo-mock-field { font-size: 9px; color: #8d8578; margin-bottom: 3px; }
.demo-mock-field + .demo-mock-field {
  font-size: 12px;
  color: #23211e;
  background: #f7f3ea;
  border: 1px solid #e5ddce;
  border-radius: 6px;
  padding: 7px 9px;
  margin-bottom: 12px;
  font-weight: normal;
}
.demo-sig-svg { width: 100%; height: 44px; color: #1a2a52; }
.demo-mock-sig { border: 1.5px dashed #b3a289; border-radius: 8px; margin-bottom: 12px; }
.demo-mock-btn {
  background: #23211e;
  color: #ece5d7;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 10px;
  border-radius: 7px;
  text-transform: uppercase;
}
.demo-arrow { font-size: 26px; color: var(--muted); }
.demo-tg {
  width: 230px;
  background: #17212b;
  border-radius: 20px;
  padding: 14px;
  color: #e4e9ee;
  font-size: 12px;
}
.demo-tg-msg { background: #202b36; border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.demo-tg-title { font-weight: 700; margin-bottom: 6px; }
.demo-tg-line { color: #a4b0bb; margin-bottom: 2px; font-size: 11px; }
.demo-tg-file { background: #202b36; border-radius: 10px; padding: 8px 12px; margin-bottom: 6px; font-size: 11px; }

/* ---------- sections ---------- */

.psection-title {
  font-family: var(--display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  text-align: center;
  margin-bottom: 36px;
  letter-spacing: -0.01em;
}

.phow { padding: 20px 0 70px; }
.phow-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.phow-step { text-align: left; }
.phow-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 14px;
  margin-bottom: 14px;
}
.phow-title { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.phow-text { font-size: 13.5px; color: var(--muted); }
.phow-text code { background: var(--bg-soft); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

.pindustries { padding: 20px 0 70px; }
.icard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.icard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.icard-icon { font-size: 26px; margin-bottom: 10px; }
.icard-title { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.icard-text { font-size: 13px; color: var(--muted); }

.pfeatures { padding: 20px 0 70px; }
.fcard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fcard { background: var(--bg-soft); border-radius: var(--radius); padding: 22px; }
.fcard-icon { font-size: 24px; margin-bottom: 10px; }
.fcard-title { font-weight: 700; font-size: 14.5px; margin-bottom: 6px; }
.fcard-text { font-size: 13px; color: var(--muted); }

.ppricing { padding: 10px 0 70px; }
.price-card {
  max-width: 380px;
  margin: 0 auto;
  background: var(--ink);
  color: #f3f5f4;
  border-radius: 28px;
  padding: 36px 32px;
  text-align: center;
}
.price-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 18px;
}
.price-amount { font-family: var(--display); font-size: 44px; font-weight: 700; }
.price-amount span { font-size: 16px; font-weight: 500; color: #a8b3af; }
.price-text { color: #a8b3af; font-size: 13.5px; margin: 10px 0 22px; }
.price-list { list-style: none; text-align: left; margin-bottom: 26px; }
.price-list li { padding: 8px 0 8px 26px; border-top: 1px solid #2a3532; font-size: 13.5px; position: relative; }
.price-list li:first-child { border-top: none; }
.price-list li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.price-card .btn-hero { width: 100%; }

.pfooter {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}
.pfooter-links a { text-decoration: none; color: var(--muted); }
.pfooter-links a:hover { color: var(--ink); }

/* ---------- register / login forms ---------- */

.preg { padding: 30px 0 60px; max-width: 480px; margin: 0 auto; }
.preg h1 { font-family: var(--display); font-size: 28px; font-weight: 600; }

.pcard-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.pcard-form label { display: block; margin-bottom: 16px; font-size: 14px; font-weight: 600; }
.pcard-form input, .pcard-form textarea {
  width: 100%;
  padding: 13px 14px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  font-family: var(--sans);
  font-weight: 400;
  background: #fbfbfa;
  color: var(--ink);
}
.pcard-form input:focus { outline: 1.5px solid var(--accent); border-color: var(--accent); }

.slug-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.slug-row input { margin-top: 0; }
.slug-suffix { font-size: 13px; color: var(--muted); white-space: nowrap; }
.slug-status { font-size: 12.5px; margin-top: 6px; min-height: 16px; }
.slug-status.ok { color: var(--accent); }
.slug-status.err { color: #b3372f; }

.pcard-form .check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  font-weight: 400;
  cursor: pointer;
  margin-bottom: 18px;
}
.pcard-form .check input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); margin-top: 1px; }

.preg-radio { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 4px; margin: 0 0 18px; }
.preg-radio legend { font-size: 13.5px; font-weight: 600; padding: 0 4px; }
.preg-radio .check { margin-bottom: 14px; }
.preg-radio .hint { margin: -6px 0 4px 30px; }

.preg-verify { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; margin: 18px 0; }
.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 18px;
  border-radius: 100px;
  cursor: pointer;
  width: 100%;
}
.btn-secondary:hover { background: var(--bg-soft); }
.btn-secondary:disabled { opacity: 0.5; cursor: default; }

.error { color: #b3372f; font-size: 14px; margin: 12px 0; }
.hint { color: var(--muted); font-size: 13px; }

/* ---------- login (platform /admin) ---------- */

.pcard-narrow { max-width: 380px; margin: 14vh auto 0; }

/* ---------- admin dashboard ---------- */

.admin-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.admin-nav-links { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.admin-nav-links a {
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.admin-nav-links a.active { color: #fff; background: var(--ink); }
.admin-nav-links a:not(.active):hover { background: var(--bg-soft); color: var(--ink); }

.badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.badge.ok { background: #e3f3ec; color: var(--accent-dark); }
.badge.pending { background: #fdefdc; color: #a9640f; }
.badge.refused { background: #fbe6e3; color: #a3352a; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat-tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}
.stat-value { font-family: var(--display); font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; }

.chart-card { margin-bottom: 20px; }
.chart-card h2 { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-bar { fill: var(--accent); }
.chart-bar.zero { fill: var(--line); }
.chart-label { fill: var(--muted); font-size: 8px; font-family: var(--sans); }
.chart-value { fill: var(--ink); font-size: 8px; font-family: var(--sans); font-weight: 700; }

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-title-row h2 { font-size: 16px; font-weight: 700; }

.clinic-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 12px;
}
.clinic-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.clinic-card-name { font-weight: 700; font-size: 15.5px; }
.clinic-card-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.clinic-card-badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.clinic-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.clinic-card-actions form { display: inline; }
.btn-chip {
  background: var(--bg-soft);
  border: none;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 100px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-chip:hover { background: var(--line); }
.btn-chip.danger { background: #fbe6e3; color: #a3352a; }
.btn-chip.primary { background: var(--ink); color: #fff; }

.settings-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; margin-bottom: 16px; }
.settings-card h2 { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.quick-actions-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.quick-actions-row input[type="date"] {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  font-family: var(--sans);
}

.settings-card label { display: block; margin-bottom: 14px; font-size: 13.5px; font-weight: 600; }
.settings-card input:not([type=checkbox]), .settings-card textarea, .settings-card select {
  width: 100%;
  padding: 12px 13px;
  margin-top: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14.5px;
  font-family: var(--sans);
  font-weight: 400;
  background: #fbfbfa;
  color: var(--ink);
}
.settings-card input:focus, .settings-card textarea:focus { outline: 1.5px solid var(--accent); border-color: var(--accent); }
.settings-card .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.settings-card .check input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); margin-top: 1px; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-form > button { grid-column: 1 / -1; }
@media (max-width: 640px) { .grid-form { grid-template-columns: 1fr; } }

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  font-weight: 700;
  font-size: 14px;
  padding: 13px 20px;
  border-radius: 100px;
  cursor: pointer;
  margin-top: 6px;
}
.btn-primary:hover { background: var(--accent-dark); }

.ok-banner { background: var(--bg-soft); border: 1px solid var(--accent); border-radius: 16px; padding: 16px 18px; margin-bottom: 16px; font-size: 13.5px; }
.ok-banner code { display: block; margin-top: 8px; font-size: 14px; word-break: break-all; }

@media (max-width: 700px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .phow-steps, .icard-grid, .fcard-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .phow-steps, .icard-grid, .fcard-grid { grid-template-columns: 1fr; }
  .demo-card { flex-direction: column; }
  .demo-arrow { transform: rotate(90deg); }
  .hero-cta { flex-direction: column; }
  .btn-hero, .btn-hero-ghost { width: 100%; text-align: center; }
}
