/* Letti — identidade baseada no site do Instituto Orletti:
   papel, creme, areia e sálvia; Playfair Display nos títulos, Heebo no texto. */
:root {
  --paper: #f7f5f1; --card: #fff; --cream: #efece2; --sand: #c6bb97; --gold: #968653; --bark: #4b4329;
  --ink: #252825; --sage: #6e776e; --sage2: #9ea59e; --mist: #ced2ce;
  --line: rgba(75, 67, 41, .14); --line2: rgba(75, 67, 41, .08);
  --good: #4a6a55; --good-bg: #e4ebe3; --warn: #a65c42; --warn-bg: #f4e4dc;
  --serif: 'Playfair Display', 'Didot', 'Bodoni 72', Georgia, serif;
  --sans: 'Heebo', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --script: 'Dancing Script', 'Snell Roundhand', cursive;
  --r: 14px; --tabs: 62px; --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
body.is-patient { background: var(--cream); }
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.warn { color: var(--warn); }

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; font-feature-settings: 'lnum' 1; }
.eyebrow { font: 500 10.5px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--sage); }
.muted { color: var(--sage); }
.small { font-size: 12.5px; }
.pad { padding: 20px 0; }
.center { text-align: center; }
.hint { font-size: 12.5px; color: var(--sage); margin: 10px 2px 0; }
.hint.right { text-align: right; margin: 0 2px 8px; }
.fine { font-size: 12px; color: var(--sage); text-align: center; margin-top: 28px; }
.link { font-size: 13px; color: var(--bark); border-bottom: 1px solid var(--sand); padding-bottom: 1px; }
.textbtn { color: var(--bark); border-bottom: 1px solid var(--sand); }
.count { font-size: 12.5px; color: var(--sage); }
.empty { padding: 28px 0; text-align: center; color: var(--sage); }

/* marca */
.wm { display: inline-block; font: 400 17px/1 var(--serif); letter-spacing: .34em; text-transform: uppercase; padding: 7px 0 0 .1em; border-top: 1px solid currentColor; margin-right: -.34em; }
.wm.xl { font-size: 30px; padding-top: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--cream); color: var(--bark); display: inline-grid; place-items: center; font: 500 13px/1 var(--sans); letter-spacing: .04em; flex: none; border: 1px solid var(--line); }
.avatar.dark { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.avatar.lg { width: 68px; height: 68px; font: 400 22px/1 var(--serif); letter-spacing: .02em; }

/* estrutura */
.phone { max-width: 500px; margin: 0 auto; min-height: 100dvh; background: var(--paper); position: relative; }
@media (min-width: 540px) { .phone { box-shadow: 0 0 0 1px var(--line); } }
.screen { padding: calc(18px + env(safe-area-inset-top, 0px)) 20px calc(var(--tabs) + var(--sab) + 28px); }
.screen.sub { padding-top: 0; }
.enter .screen, .enter.login { animation: enter .28s ease-out both; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .enter .screen, .enter.login { animation: none; } * { transition: none !important; } }

.tabs { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 500px; height: calc(var(--tabs) + var(--sab)); padding-bottom: var(--sab); display: flex; background: rgba(247, 245, 241, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); z-index: 20; }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--sage2); font-size: 10.5px; letter-spacing: .02em; position: relative; }
.tabs a.on { color: var(--ink); font-weight: 500; }
.tabs a.on::before { content: ''; position: absolute; top: -1px; width: 22px; height: 2px; background: var(--ink); }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; height: calc(56px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); margin: 0 -20px 6px; padding-left: 10px; padding-right: 10px; background: rgba(247, 245, 241, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line2); }
.top h1 { font: 400 17px/1 var(--serif); }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--ink); }
.icon-btn:active { background: var(--cream); }
.icon-btn.ghost { visibility: hidden; }

.sec-h { display: flex; align-items: center; min-height: 22px; justify-content: space-between; gap: 12px; margin: 30px 2px 10px; }
.title { margin: 8px 0 20px; }
.title h1 { font-size: 32px; line-height: 1.15; }
.title p { margin-top: 4px; font-size: 14px; }
.title .eyebrow { display: block; margin-bottom: 8px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.stack { display: grid; gap: 10px; margin-top: 18px; }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 10px; font-weight: 500; font-size: 14.5px; white-space: nowrap; transition: background .15s, transform .1s; }
.btn:active { transform: scale(.985); }
.btn .ic { width: 18px; height: 18px; }
.btn.dark { background: var(--ink); color: var(--paper); }
.btn.dark:hover { background: #000; }
.btn.line { border: 1px solid var(--line); background: var(--card); }
.btn.line:hover { border-color: var(--sand); }
.btn.sm { min-height: 40px; font-size: 13.5px; padding: 0 14px; }
.btn.lg { min-height: 54px; font-size: 15.5px; }
.btn.block { display: flex; width: 100%; }

/* variações e etiquetas */
.delta { font-weight: 500; font-size: 13px; font-feature-settings: 'tnum' 1; white-space: nowrap; }
.delta.good { color: var(--good); } .delta.warn { color: var(--warn); } .delta.flat { color: var(--sage); font-weight: 400; }
.tag { display: inline-block; font: 500 10px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; font-style: normal; padding: 5px 8px; border-radius: 4px; white-space: nowrap; }
.tag.ok { background: var(--good-bg); color: var(--good); } .tag.high { background: var(--warn-bg); color: var(--warn); }
.tag.low { background: var(--cream); color: var(--bark); } .tag.now { background: var(--ink); color: var(--paper); } .tag.plain { box-shadow: inset 0 0 0 1px var(--line); color: var(--sage); }
.spark { display: block; overflow: visible; }
.spark polyline { fill: none; stroke: var(--sage); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark circle { fill: var(--ink); }

/* acesso */
.login { min-height: 100dvh; max-width: 460px; margin: 0 auto; padding: calc(44px + env(safe-area-inset-top, 0px)) 28px calc(28px + var(--sab)); display: flex; flex-direction: column; }
.login-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.login-brand > span:last-child { font-size: 12.5px; color: var(--sage); letter-spacing: .04em; }
.login-copy { margin: auto 0; padding: 48px 0; }
.login-copy h1 { font-size: clamp(38px, 11vw, 48px); line-height: 1.08; }
.login-copy em { color: var(--gold); }
.login-copy p { margin-top: 18px; color: var(--sage); font-size: 16px; font-weight: 300; max-width: 28ch; }
.login-act { display: grid; gap: 10px; }
.login-act .eyebrow { margin-bottom: 4px; }
.access { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 14px 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .15s, transform .1s; }
.access:hover { border-color: var(--sand); } .access:active { transform: scale(.99); }
.access span:not(.avatar) { flex: 1; display: flex; flex-direction: column; }
.access b { font: 400 19px/1.25 var(--serif); } .access small { font-size: 13px; color: var(--sage); }
.access .ic { color: var(--sage2); }
.login .fine { margin-top: 14px; }

/* início */
.hello { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.hello h1 { font-size: 28px; line-height: 1.2; margin-top: 4px; }
.hero { display: block; background: var(--ink); color: var(--cream); border-radius: 18px; padding: 22px 20px 18px; }
.hero .eyebrow { color: var(--sand); }
.hero-n { display: flex; align-items: flex-end; gap: 12px; margin: 10px 0 14px; }
.hero-n b { font: 400 62px/.95 var(--serif); letter-spacing: -.02em; font-feature-settings: 'lnum' 1; }
.hero-n span { font-size: 14px; line-height: 1.3; color: var(--mist); padding-bottom: 6px; font-weight: 300; }
.hero .spark { width: 100%; height: 54px; }
.hero .spark polyline { stroke: var(--sand); stroke-width: 1.6; } .hero .spark circle { fill: var(--cream); }
.hero-s { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(239, 236, 226, .16); }
.hero-s div + div { border-left: 1px solid rgba(239, 236, 226, .16); padding-left: 14px; }
.hero-s b { display: block; font: 400 17px/1.3 var(--serif); font-feature-settings: 'lnum' 1; white-space: nowrap; }
.hero-s span { font-size: 11.5px; color: var(--sage2); }

.appt { display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; align-items: center; }
.appt time { width: 58px; height: 64px; border-radius: 10px; background: var(--cream); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.appt time span { font: 500 10px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.appt time b { font: 400 28px/1.1 var(--serif); font-feature-settings: 'lnum' 1; }
.appt-m { display: flex; flex-direction: column; min-width: 0; }
.appt-m b { font: 400 18px/1.3 var(--serif); } .appt-m b::first-letter { text-transform: uppercase; }
.appt-m span { font-size: 13.5px; color: var(--sage); }
.with-ic { display: flex; align-items: center; gap: 4px; } .with-ic .ic { width: 14px; height: 14px; }
.appt-a { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.proto { padding: 0; overflow: hidden; }
.progress { height: 3px; background: var(--cream); } .progress i { display: block; height: 100%; background: var(--good); transition: width .3s; }
.proto-g { padding: 14px 16px 4px; } .proto-g + .proto-g { border-top: 1px solid var(--line2); }
.proto-g h3, .rxcur-g h3 { font: 500 10.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.todo { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 0; min-height: 52px; }
.box { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--mist); display: grid; place-items: center; flex: none; transition: all .18s; }
.box .ic { width: 15px; height: 15px; stroke-width: 2; opacity: 0; color: #fff; }
.todo.done .box { background: var(--good); border-color: var(--good); } .todo.done .box .ic { opacity: 1; }
.todo-t { display: flex; flex-direction: column; min-width: 0; }
.todo-t b { font-weight: 500; } .todo-t small { font-size: 12.5px; color: var(--sage); }
.todo.done .todo-t b { color: var(--sage); text-decoration: line-through; text-decoration-color: var(--mist); }
.more { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 13px; border-top: 1px solid var(--line2); font-size: 13.5px; color: var(--bark); }
.more .ic { width: 15px; height: 15px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.tile > span:first-child { font-size: 12.5px; color: var(--sage); }
.tile b { font: 400 28px/1.15 var(--serif); font-feature-settings: 'lnum' 1; }
.tile b small { font: 400 13px var(--sans); color: var(--sage); margin-left: 4px; }

.note { background: var(--cream); border-radius: var(--r); padding: 20px 20px 16px; }
.note p { font: italic 400 16.5px/1.55 var(--serif); color: var(--bark); }
.sign { display: block; font: 500 24px/1 var(--script); color: var(--bark); margin-top: 14px; }
.agree li { position: relative; padding: 11px 0 11px 22px; border-bottom: 1px solid var(--line2); }
.agree li::before { content: ''; position: absolute; left: 4px; top: 20px; width: 6px; height: 6px; border-radius: 50%; background: var(--sand); }

/* evolução */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px 14px; padding: 2px 20px; scrollbar-width: none; scroll-behavior: smooth; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 38px; padding: 0 15px; border-radius: 19px; border: 1px solid var(--line); background: var(--card); font-size: 13.5px; color: var(--bark); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chart-card { padding: 18px 12px 12px; }
.readout { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 6px 8px; gap: 12px; }
.big { font: 400 46px/1.05 var(--serif); font-feature-settings: 'lnum' 1; margin-top: 4px; }
.big small { font: 400 15px var(--sans); color: var(--sage); margin-left: 6px; }
.readout .muted { font-size: 13px; }
.ro-side { text-align: right; display: flex; flex-direction: column; padding-bottom: 2px; }
.ro-side .delta { font-size: 16px; } .ro-side small { font-size: 12px; color: var(--sage); }
.chart { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.lchart { display: block; width: 100%; height: auto; cursor: crosshair; }
.lchart .band { fill: rgba(198, 187, 151, .24); } .lchart .band-t { font: 8.5px var(--sans); fill: var(--gold); letter-spacing: .08em; text-transform: uppercase; }
.lchart .grid { stroke: var(--line2); stroke-width: 1; } .lchart .ax { font: 9px var(--sans); fill: var(--sage2); }
.lchart .area { fill: rgba(110, 119, 110, .07); }
.lchart .line { fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.lchart .pt { fill: var(--card); stroke: var(--ink); stroke-width: 1.2; }
.lchart .cursor { stroke: var(--sand); stroke-width: 1; stroke-dasharray: 2 3; }
.lchart .knob { fill: var(--ink); stroke: var(--card); stroke-width: 2.5; }
.lchart .xl { font: 9px var(--sans); fill: var(--sage2); } .lchart .xl.on { fill: var(--ink); font-weight: 500; }
.chart-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 4px 0; }
.legend { font-size: 12px; color: var(--sage); display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 9px; background: rgba(198, 187, 151, .5); border-radius: 2px; }
.segctl { display: inline-flex; background: var(--cream); border-radius: 9px; padding: 3px; }
.segctl button { text-align: center; height: 32px; padding: 0 12px; border-radius: 7px; font-size: 12.5px; color: var(--sage); white-space: nowrap; }
.segctl button.on { background: var(--card); color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(37, 40, 37, .1); }
.segctl.sm button { height: 28px; padding: 0 10px; font-size: 12px; }
.segctl.tabsctl { display: flex; margin: 22px 0 16px; } .segctl.tabsctl button { flex: 1; height: 38px; font-size: 13.5px; padding: 0 6px; }

.cmp-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.cmp-pick label span, .fld > span { display: block; font-size: 12px; color: var(--sage); margin-bottom: 5px; }
select, .fld input, .fld textarea, .search input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 16px; appearance: none; -webkit-appearance: none; }
select { background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e776e' stroke-width='1.600'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") right 8px center / 20px no-repeat; padding-right: 32px; font-size: 15px; }
select:focus, .fld input:focus, .fld textarea:focus, .search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(150, 134, 83, .14); }
table.cmp { width: 100%; border-collapse: collapse; font-feature-settings: 'tnum' 1; }
.cmp th, .cmp td { padding: 11px 4px; text-align: right; border-top: 1px solid var(--line2); font-size: 14px; font-weight: 400; }
.cmp thead th { border: 0; font-size: 11.5px; color: var(--sage); padding-bottom: 6px; }
.cmp tbody th { text-align: left; color: var(--bark); }
.miles li { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 12px 0; position: relative; }
.miles li + li { border-top: 1px solid var(--line2); }
.miles time { font: 400 15px/1.2 var(--serif); color: var(--gold); } .miles time small { display: block; font: 11px var(--sans); color: var(--sage2); }
.miles b { display: block; font-weight: 500; } .miles span { font-size: 13px; color: var(--sage); }

/* listas */
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.list + .list, .card + .list, .list + .card { margin-top: 12px; }
.row, .crow, .linkrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; min-height: 60px; }
.list > * + .row, .list > * + .crow { border-top: 1px solid var(--line2); }
.row:hover, .crow:hover { background: #fdfcfa; }
.row > .ic:last-child, .crow > .ic:last-child, .linkrow > .ic:last-child { color: var(--mist); width: 18px; height: 18px; }
.row > .ic:first-child, .linkrow > .ic:first-child { color: var(--gold); }
.row-m { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-m b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-m b i, .row-m span i { font-style: normal; color: var(--mist); }
.row-m span { font-size: 12.5px; color: var(--sage); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.year { font: 400 13px var(--serif); color: var(--gold); padding: 12px 14px 4px; letter-spacing: .08em; }
.crow time { width: 40px; text-align: center; flex: none; }
.crow time b { display: block; font: 400 22px/1 var(--serif); font-feature-settings: 'lnum' 1; } .crow time span { font-size: 11px; color: var(--sage); text-transform: uppercase; letter-spacing: .1em; }
.score { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--sand); display: grid; place-items: center; font: 400 13px var(--serif); font-feature-settings: 'lnum' 1; flex: none; }
.linkrow { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-top: 24px; }
.linkrow div { flex: 1; display: flex; flex-direction: column; } .linkrow span { font-size: 12.5px; color: var(--sage); } .linkrow b { font-weight: 500; }

/* relatório */
.rep-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 4px; }
.rep-head h2 { font-size: 25px; line-height: 1.2; margin: 4px 0; } .rep-head p { font-size: 13px; }
.ring { flex: none; } .ring-bg { fill: none; stroke: var(--cream); stroke-width: 5; }
.ring-fg { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: round; }
.ring-n { font: 400 30px var(--serif); fill: var(--ink); font-feature-settings: 'lnum' 1; } .ring-s { font: 8.5px var(--sans); fill: var(--sage); letter-spacing: .08em; text-transform: uppercase; }
.since { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 12px 8px; }
.since div { display: flex; flex-direction: column; gap: 2px; } .since span:first-child { font-size: 12px; color: var(--sage); }
.since .delta { font: 400 19px/1.2 var(--serif); font-feature-settings: 'lnum' 1; } .since .delta.flat { font-size: 15px; }
.since .pv { font: 400 21px/1.2 var(--serif); font-feature-settings: 'lnum' 1; } .since .pv + .delta { font: 500 12.5px var(--sans); }
.rows { padding: 2px 16px; }
.rrow { padding: 15px 0 13px; } .rrow + .rrow { border-top: 1px solid var(--line2); }
.rrow-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 11px; }
.rrow-h b { display: block; font-weight: 500; line-height: 1.3; } .rrow-h span { font-size: 12px; color: var(--sage); }
.rrow-v { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.rrow-v strong { font: 400 22px/1 var(--serif); font-feature-settings: 'lnum' 1; } .rrow-v small { font-size: 12px; color: var(--sage); margin-right: 6px; }
.rrow-v .tag { position: relative; top: -3px; }
.rrow-f { font-size: 11.5px; color: var(--sage2); margin-top: 7px; }
.rbar { position: relative; height: 6px; border-radius: 3px; background: var(--cream); }
.rbar .zone { position: absolute; top: 0; bottom: 0; background: var(--sand); opacity: .6; border-radius: 3px; }
.rbar b { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2.5px solid var(--card); box-shadow: 0 0 0 1px var(--line); background: var(--good); }
.rbar.high b { background: var(--warn); } .rbar.low b { background: var(--gold); }
.kvs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; } .kvs.one { grid-template-columns: 1fr; gap: 0; padding: 4px 16px; }
.kv { display: flex; flex-direction: column; } .kv span { font-size: 12px; color: var(--sage); } .kv b { font: 400 19px/1.3 var(--serif); font-feature-settings: 'lnum' 1; }
.kvs.one .kv { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; } .kvs.one .kv + .kv { border-top: 1px solid var(--line2); }
.kvs.one .kv span { font-size: 13.5px; flex: none; } .kvs.one .kv b { font: 400 14.5px var(--sans); text-align: right; }
.body { width: 100%; max-width: 340px; height: auto; margin: 4px auto 8px; display: block; }
rect.seg, circle.seg { fill: #dde1da; } circle.head { fill: var(--cream); }
rect.seg.high { fill: #e6c6b8; } rect.seg.plus { fill: #b7c6b6; } rect.seg.low { fill: #e9e1c9; }
.sg-name { font: 500 8.5px var(--sans); fill: var(--sage); letter-spacing: .12em; text-transform: uppercase; }
.sg-v { font: 400 15px var(--serif); fill: var(--ink); font-feature-settings: 'lnum' 1; }
.sg-st { font: 500 9.5px var(--sans); fill: var(--good); } text.seg.high { fill: var(--warn); } text.seg.low { fill: var(--gold); }
.sg-tr { font: 400 17px var(--serif); fill: var(--ink); font-feature-settings: 'lnum' 1; } .sg-trs { font: 8.5px var(--sans); fill: var(--sage); }

/* receitas */
.rxcur { padding: 4px 16px 16px; }
.rxcur-g { padding: 14px 0 10px; } .rxcur-g + .rxcur-g { border-top: 1px solid var(--line2); }
.rxcur-i { padding: 6px 0; display: flex; flex-direction: column; } .rxcur-i b { font-weight: 500; } .rxcur-i span { font-size: 13px; color: var(--sage); }
.rxcur .btn { margin-top: 10px; }
.paper { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 26px 22px 22px; margin-top: 14px; box-shadow: 0 1px 0 var(--line2), 0 14px 30px -22px rgba(75, 67, 41, .5); }
.paper-h { display: flex; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.orletti { font: 400 13px/1 var(--serif); letter-spacing: .3em; text-transform: uppercase; color: var(--sage); border-top: 1px solid var(--sage2); padding-top: 6px; }
.paper-h div { display: flex; flex-direction: column; font-size: 12px; color: var(--sage); line-height: 1.45; } .paper-h b { color: var(--ink); font-weight: 500; font-size: 13.5px; }
.paper h2 { font: 500 15px var(--sans); letter-spacing: .28em; text-transform: uppercase; text-align: center; margin: 24px 0 20px; }
.paper-p { font-size: 14px; } .paper-p span, .poso span { color: var(--sage); }
.rx-g { margin-top: 22px; } .rx-g h3 { font: 400 italic 17px var(--serif); color: var(--bark); padding-bottom: 6px; border-bottom: 1px solid var(--line2); }
.rx-i { padding: 13px 0 4px; } .rx-i + .rx-i { border-top: 1px dashed var(--line); }
.rx-i-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; } .rx-i-h b { font-weight: 500; } .rx-i-h em { font: 11.5px var(--sans); color: var(--sage); white-space: nowrap; }
.rx-i p { font-size: 13.5px; line-height: 1.5; margin-top: 4px; color: var(--bark); } .rx-i .poso { color: var(--ink); }
.paper-note { margin-top: 20px; padding: 12px 14px; background: var(--paper); border-radius: 8px; font-size: 13.5px; color: var(--bark); }
.paper-f { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.paper-f > div:first-child { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--sage); }
.signature { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 11px; color: var(--sage); line-height: 1.4; }
.signature .sign { font-size: 27px; margin: 0 0 -2px; white-space: nowrap; } .signature span { white-space: nowrap; } .signature i { width: 130px; height: 1px; background: var(--sage2); margin-bottom: 5px; }
.signature b { font-weight: 500; color: var(--ink); font-size: 12px; } .signature small { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; margin-top: 4px; color: var(--gold); }

/* perfil */
.profile { text-align: center; padding: 14px 0 4px; } .profile h1 { font-size: 26px; margin-top: 12px; } .profile p { font-size: 13.5px; }
.doc { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; } .doc div { display: flex; flex-direction: column; font-size: 12.5px; color: var(--sage); } .doc b { font: 400 17px var(--serif); color: var(--ink); }
button.row { text-align: left; }

/* painel da médica */
.admin-bar { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 6px 20px; }
.side { display: none; }
.screen.wide { max-width: 1080px; margin: 0 auto; padding-top: 8px; }
.screen.narrow { max-width: 640px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; }
.stat { padding: 16px; display: flex; flex-direction: column; border-top: 1px solid var(--line2); border-left: 1px solid var(--line2); margin: -1px 0 0 -1px; }
.stat b { font: 400 30px/1.15 var(--serif); font-feature-settings: 'lnum' 1; } .stat span { font-size: 13px; color: var(--bark); line-height: 1.35; } .stat small { font-size: 11.5px; color: var(--sage2); margin-top: 2px; }
.row.ag time { font: 400 15px var(--serif); font-feature-settings: 'lnum' 1; width: 44px; flex: none; color: var(--bark); }
.row.ag .avatar { width: 34px; height: 34px; font-size: 11.5px; }
.prow-x { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); margin-left: 7px; vertical-align: middle; }
.search { position: relative; display: block; margin-bottom: 12px; } .search .ic { position: absolute; left: 13px; top: 12px; color: var(--sage2); } .search input { padding-left: 44px; }
.phead { display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; align-items: center; padding: 10px 0 18px; }
.phead-m { min-width: 0; display: flex; flex-direction: column; gap: 2px; } .phead-m h2 { font-size: 25px; line-height: 1.2; } .phead-m p { font-size: 13.5px; } .phead-m .tag { align-self: flex-start; margin-top: 6px; }
.phead-a { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; } .phead-a .btn { flex: 1 1 auto; }
.phead.slim { padding: 4px 0 16px; } .phead.slim b { font-weight: 500; } .phead.slim span { font-size: 13px; }
.scan { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px dashed var(--sand); border-radius: var(--r); background: #fbfaf6; cursor: pointer; margin-bottom: 20px; }
.scan > .ic { width: 28px; height: 28px; color: var(--gold); } .scan div { display: flex; flex-direction: column; } .scan b { font-weight: 500; } .scan span { font-size: 12.5px; color: var(--sage); }
.scan.busy { pointer-events: none; } .scan.busy > .ic { animation: pulse 1s ease-in-out infinite; } @keyframes pulse { 50% { opacity: .3; } }
.form { display: grid; gap: 14px; } .form .sec-h { margin: 14px 2px -4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fld > span i { font-style: normal; color: var(--sage2); }
.fld textarea { resize: vertical; line-height: 1.5; min-height: 0; }
.fld input[type=date], .fld input[type=time] { min-width: 0; }
.rxedit { display: grid; gap: 10px; padding: 12px 14px 14px; }
.rxedit-h { display: flex; align-items: center; gap: 6px; margin-right: -8px; }
.in-title { flex: 1; min-width: 0; border: 0; border-bottom: 1px solid var(--line); background: none; font: 400 18px var(--serif); padding: 8px 0; border-radius: 0; }
.in-title:focus { outline: none; border-color: var(--gold); }
.rxedit .icon-btn { color: var(--sage); }
.btn.add { justify-self: start; }

@media (min-width: 720px) {
  .is-admin .tiles.four { grid-template-columns: repeat(4, 1fr); }
  .is-admin .stats { grid-template-columns: repeat(4, 1fr); }
  .is-admin .phead { grid-template-columns: auto 1fr auto; } .is-admin .phead-a { grid-column: auto; } .is-admin .phead.slim { grid-template-columns: auto 1fr; }
}
@media (min-width: 980px) {
  .admin { display: grid; grid-template-columns: 248px 1fr; min-height: 100dvh; }
  .side { display: flex; flex-direction: column; align-items: flex-start; position: sticky; top: 0; height: 100dvh; padding: 34px 22px 22px 28px; border-right: 1px solid var(--line); background: var(--cream); }
  .side-sub { font-size: 12px; color: var(--sage); margin: 10px 0 34px; }
  .side nav { display: grid; gap: 2px; width: 100%; }
  .side nav a { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; margin-left: -12px; border-radius: 9px; color: var(--bark); }
  .side nav a.on { background: var(--paper); color: var(--ink); font-weight: 500; box-shadow: inset 0 0 0 1px var(--line); }
  .side-doc { margin-top: auto; display: flex; align-items: center; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); width: 100%; }
  .side-doc div { display: flex; flex-direction: column; font-size: 11.5px; color: var(--sage); } .side-doc b { font-size: 13px; color: var(--ink); font-weight: 500; }
  .side-out { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--sage); } .side-out .ic { width: 18px; height: 18px; }
  .admin-bar, .admin-tabs { display: none; }
  .is-admin .screen { padding: 36px 44px 60px; } .is-admin .screen.sub { padding-top: 12px; }
  .is-admin .top { position: static; background: none; border: 0; backdrop-filter: none; margin: 0 -10px 4px; padding: 0; justify-content: flex-start; gap: 4px; }
  .is-admin .top h1 { font: 500 10.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--sage); }
  .cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 36px; align-items: start; }
  .is-admin .title h1 { font-size: 38px; }
  .is-admin .chips { margin-left: 0; margin-right: 0; padding-left: 0; flex-wrap: wrap; }
}

.toast { position: fixed; left: 50%; bottom: calc(var(--tabs) + var(--sab) + 16px); transform: translate(-50%, 16px); max-width: min(420px, calc(100vw - 32px)); width: max-content; background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: 10px; font-size: 13.5px; line-height: 1.4; opacity: 0; pointer-events: none; transition: all .25s; z-index: 50; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media print {
  body, .phone { background: #fff !important; box-shadow: none !important; }
  .tabs, .top, .side, .admin-bar, .noprint, .toast { display: none !important; }
  .screen { padding: 0 !important; } .paper { border: 0; box-shadow: none; margin: 0; }
  .admin { display: block; }
}
