/* TeleClinic design system, aligned with the IremboGov look: blue gradient header, yellow notice bar,
   Nunito Sans, 5px corners, light bordered cards. Mobile first; no framework, small enough for slow links. */
@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;600;700;800&display=swap");

:root {
  --brand: #0063cf;
  --brand-deep: #0052ad;
  --brand-bright: #1f8bf0;
  --accent: #439aff;
  --tint: #e0edf9;
  --tint-2: #eef5fc;
  --yellow: #ffc726;
  --ink: #212529;
  --slate: #34495e;
  --muted: #7c91a1;
  --line: #e7edf3;
  --surface: #f3f5f6;
  --white: #fff;
  --success: #0f996d;
  --success-tint: #e3f5ee;
  --warning: #ffa500;
  --urgent: #e8590c;
  --danger: #dc3545;
  --danger-tint: #fdecee;
  --radius: 5px;
  --radius-lg: 10px;
  --shadow: 0 2px 12px rgba(16, 42, 84, .08);
  --shadow-lift: 0 8px 28px rgba(16, 42, 84, .14);
  --font: "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--white); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 800; color: var(--slate); margin: 0 0 .4em; line-height: 1.25; }
h1 { font-size: 30px; } h2 { font-size: 22px; } h3 { font-size: 17px; } h4 { font-size: 15px; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.svgi { width: 1.1em; height: 1.1em; vertical-align: -.18em; flex: none; }

/* Notice bar (yellow, as on IremboGov) */
.notice { background: var(--yellow); color: var(--ink); font-size: 13.5px; text-align: center; padding: 9px 16px; }
.notice b { font-weight: 800; }
.notice .svgi { margin-right: 6px; }

/* Header */
.topbar { position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(115deg, var(--brand-deep) 0%, var(--brand) 45%, var(--brand-bright) 100%); }
.topbar::before, .topbar::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  border: 46px solid rgba(255, 255, 255, .07); }
.topbar::before { width: 420px; height: 420px; right: -90px; top: -150px; }
.topbar::after { width: 260px; height: 260px; right: 220px; bottom: -190px; border-width: 34px; }
.nav { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; height: 68px; }
.wordmark { display: flex; align-items: baseline; gap: 0; color: #fff; font-size: 26px; letter-spacing: -.5px; }
.wordmark:hover { text-decoration: none; }
.wordmark b { font-weight: 800; }
.wordmark span { font-weight: 300; }
.wordmark small { margin-left: 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(255, 255, 255, .18); padding: 2px 7px; border-radius: 10px; align-self: center; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a, .nav-links button { display: inline-flex; align-items: center; gap: 7px; color: #fff; font: 600 14px var(--font);
  background: none; border: 0; padding: 8px 12px; border-radius: var(--radius); cursor: pointer; }
.nav-links a:hover, .nav-links button:hover { background: rgba(255, 255, 255, .12); text-decoration: none; }
.nav-links .cta { background: var(--accent); }
.nav-links .cta:hover { background: #5aa8ff; }
.lang { display: inline-flex; align-items: center; gap: 6px; color: #fff; }
.lang select { appearance: none; background: transparent; color: #fff; border: 0; font: 600 14px var(--font); cursor: pointer; padding-right: 4px; }
.lang select option { color: var(--ink); }
.hero { position: relative; z-index: 1; text-align: center; padding: 26px 0 54px; }
.hero h1 { color: #fff; font-size: 34px; margin-bottom: 8px; }
.hero p { color: rgba(255, 255, 255, .9); font-size: 16px; margin: 0 auto 22px; max-width: 560px; }
.hero.compact { padding: 10px 0 30px; text-align: left; }
.hero.compact h1 { font-size: 26px; }
.hero.compact p { margin: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 15px var(--font);
  padding: 11px 20px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; transition: .15s; }
.btn:hover { text-decoration: none; }
.btn-primary { color: #fff; background: linear-gradient(100deg, var(--brand-bright), var(--brand)); box-shadow: 0 2px 8px rgba(0, 99, 207, .25); }
.btn-primary:hover { box-shadow: 0 6px 16px rgba(0, 99, 207, .35); transform: translateY(-1px); }
.btn-white { color: var(--brand); background: #fff; }
.btn-white:hover { box-shadow: var(--shadow-lift); }
.btn-light { color: var(--brand); background: var(--tint); }
.btn-light:hover { background: #d2e5f7; }
.btn-ghost { color: var(--slate); background: #fff; border-color: var(--line); }
.btn-ghost:hover { border-color: #c9d6e2; }
.btn-success { color: #fff; background: var(--success); }
.btn-danger { color: #fff; background: var(--danger); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* Search box (hero) */
.search { display: flex; align-items: center; gap: 10px; max-width: 560px; margin: 0 auto; background: #fff;
  border-radius: var(--radius); padding: 12px 14px; box-shadow: 0 6px 20px rgba(0, 40, 90, .2); color: var(--muted); }

/* Info panel (pale blue, as on IremboGov) */
.panel-info { display: flex; align-items: center; gap: 18px; background: var(--tint-2); border: 1px solid var(--tint);
  border-radius: var(--radius-lg); padding: 18px 22px; }
.panel-info .ring { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  color: var(--brand); background: #fff; box-shadow: 0 0 0 6px var(--tint); font-size: 22px; }
.panel-info h3 { margin: 0 0 2px; color: var(--ink); }
.panel-info p { margin: 0; color: var(--slate); font-size: 14px; }
.panel-info .grow { flex: 1; }

/* Cards and sections */
.section { padding: 34px 0; }
.section-title { font-size: 20px; color: var(--slate); margin-bottom: 14px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.card.raised { border-color: transparent; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tile { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: #fff; cursor: pointer; text-align: left; font: inherit; color: inherit; transition: .15s; width: 100%; }
.tile:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.tile.selected { border-color: var(--brand); box-shadow: 0 0 0 3px var(--tint); }
.tile .ico { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 20px;
  background: var(--tint); color: var(--brand); }
.tile h4 { margin: 0 0 2px; color: var(--ink); }
.tile p { margin: 0; font-size: 13.5px; color: var(--muted); }
.list-rule { border-left: 2px solid var(--line); padding-left: 14px; }
.list-rule li { list-style: none; padding: 6px 0; }
.avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--brand)); }
.avatar.child { background: linear-gradient(135deg, #34c08f, var(--success)); }

/* Form controls */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 14px; color: var(--slate); margin-bottom: 6px; }
.input, select.input, textarea.input { width: 100%; font: 15px var(--font); color: var(--ink); padding: 11px 12px;
  border: 1px solid #cfdae5; border-radius: var(--radius); background: #fff; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 99, 207, .15); }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.check b { display: block; color: var(--ink); }
.check span { font-size: 13.5px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 22px; border: 1px solid #cfdae5;
  background: #fff; font: 600 14px var(--font); color: var(--slate); cursor: pointer; transition: .12s; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip.danger.on { background: var(--danger); border-color: var(--danger); }
.seg { display: inline-flex; border: 1px solid #cfdae5; border-radius: var(--radius); overflow: hidden; }
.seg button { font: 600 14px var(--font); padding: 9px 14px; border: 0; background: #fff; color: var(--slate); cursor: pointer; border-right: 1px solid #cfdae5; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--brand); color: #fff; }

/* Status, urgency, stepper */
.badge { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; letter-spacing: .02em;
  padding: 3px 10px; border-radius: 12px; background: var(--surface); color: var(--slate); text-transform: uppercase; }
.badge.EMERGENCY { background: var(--danger); color: #fff; }
.badge.URGENT { background: var(--urgent); color: #fff; }
.badge.SEMI_URGENT { background: var(--warning); color: #3a2600; }
.badge.ROUTINE { background: var(--success); color: #fff; }
.badge.ai { background: #efe7fc; color: #6d3fc0; }
.badge.ok { background: var(--success-tint); color: var(--success); }
.advice { display: flex; gap: 16px; padding: 20px; border-radius: var(--radius-lg); border: 1px solid; }
.advice .ico { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: #fff; }
.advice h3 { margin: 0 0 4px; color: inherit; }
.advice p { margin: 0; font-size: 16px; }
.advice.EMERGENCY { background: var(--danger-tint); border-color: #f5c2c7; color: #842029; } .advice.EMERGENCY .ico { background: var(--danger); }
.advice.URGENT { background: #fff1e6; border-color: #ffd0ad; color: #7a2e04; } .advice.URGENT .ico { background: var(--urgent); }
.advice.SEMI_URGENT { background: #fff8e6; border-color: #ffe2a6; color: #5c3d00; } .advice.SEMI_URGENT .ico { background: var(--warning); }
.advice.ROUTINE { background: var(--success-tint); border-color: #b9e6d4; color: #0b5c42; } .advice.ROUTINE .ico { background: var(--success); }
.stepper { display: flex; gap: 0; margin: 6px 0 4px; }
.stepper .s { flex: 1; text-align: center; position: relative; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stepper .s::before { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.stepper .s:first-child::before { display: none; }
.stepper .dot { position: relative; z-index: 1; width: 32px; height: 32px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 3px solid var(--line); color: var(--muted); font-size: 14px; }
.stepper .s.done { color: var(--slate); } .stepper .s.done .dot { background: var(--success); border-color: var(--success); color: #fff; }
.stepper .s.done::before, .stepper .s.now::before { background: var(--success); }
.stepper .s.now { color: var(--brand); } .stepper .s.now .dot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 5px var(--tint); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 700; }
.amount { font-size: 34px; font-weight: 800; color: var(--ink); letter-spacing: -.5px; }
.amount small { font-size: 16px; color: var(--muted); font-weight: 700; }
.strike { text-decoration: line-through; color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px;
  border-radius: var(--radius); box-shadow: var(--shadow-lift); font-weight: 600; z-index: 50; }
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 22px 0 30px; color: var(--muted); font-size: 13px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.spinner { width: 20px; height: 20px; border: 3px solid var(--tint); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

@media (max-width: 720px) {
  h1 { font-size: 24px; } .hero h1 { font-size: 26px; }
  .nav-links .label { display: none; }
  .nav-links { gap: 0; }
  .nav-links a, .nav-links button { padding: 8px 7px; }
  .nav-links .opt-mobile { display: none; }
  .wordmark small { display: none; }
  .panel-info { flex-direction: column; align-items: flex-start; }
  .stepper .s span { display: none; }
  .wordmark { font-size: 21px; }
}
