/* AnotaEnf — protótipo PWA
   Paleta da marca: azul-marinho clínico + verde-azulado. Modo noturno para plantões. */

:root {
  --navy: #17346b;
  --navy-700: #112852;
  --teal: #1a8c9c;
  --teal-600: #137382;
  --teal-50: #e6f4f6;
  --green: #23935f;
  --green-50: #e5f5ec;
  --amber: #b7790b;
  --amber-50: #fdf3dc;
  --red: #c93a3a;
  --red-50: #fdeaea;
  --violet: #6b4fbb;
  --violet-50: #efebfb;

  --bg: #f2f5f8;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --text: #0f2240;
  --text-2: #4c5d74;
  --text-3: #7a889b;
  --border: #dbe2ea;
  --border-strong: #c3ceda;
  --primary: var(--teal);
  --primary-strong: var(--teal-600);
  --primary-soft: var(--teal-50);
  --on-primary: #ffffff;
  --brand-ink: var(--navy);
  --header-bg: var(--navy);
  --header-text: #ffffff;
  --shadow-1: 0 1px 2px rgba(15, 34, 64, .06), 0 1px 3px rgba(15, 34, 64, .06);
  --shadow-2: 0 6px 24px rgba(15, 34, 64, .12);
  --shadow-3: 0 18px 48px rgba(15, 34, 64, .22);
  --focus: 0 0 0 3px rgba(26, 140, 156, .45);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --gutter: 16px;

  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0a1322;
  --surface: #111d33;
  --surface-2: #0e182b;
  --text: #e4ebf5;
  --text-2: #a9b7ca;
  --text-3: #7d8ca2;
  --border: #22314c;
  --border-strong: #2f4163;
  --primary: #3db3c3;
  --primary-strong: #5cc6d4;
  --primary-soft: #12303a;
  --on-primary: #06131c;
  --brand-ink: #e4ebf5;
  --header-bg: #0d1a30;
  --green: #45c08a;
  --green-50: #10302a;
  --amber: #e2ad45;
  --amber-50: #33290f;
  --red: #f07b7b;
  --red-50: #3a1a1f;
  --violet: #a996ec;
  --violet-50: #241d40;
  --teal-50: #12303a;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 6px 24px rgba(0, 0, 0, .45);
  --shadow-3: 0 18px 48px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 16px; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary-strong); }
img, svg { display: block; }
:focus-visible { outline: none; box-shadow: var(--focus); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Shell ---------- */
#app { min-height: 100%; }
.shell { min-height: 100dvh; display: flex; flex-direction: column; }
.shell-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.page { flex: 1; padding: 16px var(--gutter) calc(var(--nav-h) + var(--safe-b) + 24px); width: 100%; }
.page.no-nav { padding-bottom: calc(24px + var(--safe-b)); }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-t)) var(--gutter) 10px;
  background: var(--header-bg); color: var(--header-text);
  min-height: 60px;
}
.topbar h1 { font-size: 1.15rem; margin: 0; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .sub { display: block; font-size: .78rem; font-weight: 500; opacity: .75; }
.topbar.light { background: var(--surface); color: var(--text); border-bottom: 1px solid var(--border); }
.icon-btn {
  width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: inherit;
  display: inline-grid; place-items: center; flex: none;
}
.icon-btn:hover { background: rgba(127, 140, 160, .14); }
.icon-btn .ico { width: 24px; height: 24px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; font-size: 1.25rem; }
.brand .w1 { color: #fff; }
.brand .w2 { color: #6fd0dc; }
.brand-lg { font-size: 2.3rem; }
.brand-lg .w1 { color: var(--brand-ink); }
.brand-lg .w2 { color: var(--primary); }

/* Bottom nav (mobile) */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; background: var(--surface); border-top: 1px solid var(--border);
  padding-bottom: var(--safe-b);
  box-shadow: 0 -4px 18px rgba(15, 34, 64, .06);
}
.nav a {
  flex: 1; min-height: var(--nav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-3); text-decoration: none; font-size: .74rem; font-weight: 600; position: relative;
}
.nav a .ico { width: 24px; height: 24px; }
.nav a.active { color: var(--primary-strong); }
.nav a.active::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--primary); }
.nav .badge { position: absolute; top: 9px; left: calc(50% + 6px); }
.nav .nav-brand, .nav .nav-foot { display: none; }

@media (min-width: 900px) {
  .shell { flex-direction: row; }
  .nav {
    position: sticky; top: 0; height: 100dvh; width: 248px; flex: none; flex-direction: column;
    border-top: 0; border-right: 1px solid var(--border); padding: 16px 12px; gap: 4px; box-shadow: none;
    background: var(--header-bg);
  }
  .nav .nav-brand { display: flex; padding: 6px 10px 20px; }
  .nav a { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 12px; font-size: .95rem; color: rgba(255,255,255,.72); }
  .nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
  .nav a.active { background: rgba(111, 208, 220, .16); color: #fff; }
  .nav a.active::before { top: 12px; bottom: 12px; left: 0; right: auto; width: 3px; height: auto; border-radius: 0 3px 3px 0; background: #6fd0dc; }
  .nav .badge { position: static; margin-left: auto; }
  .nav .nav-foot { display: block; margin-top: auto; color: rgba(255,255,255,.7); font-size: .82rem; padding: 12px 10px; border-top: 1px solid rgba(255,255,255,.1); }
  .page { padding: 24px 28px 40px; }
  .topbar { padding-left: 28px; padding-right: 28px; }
  .topbar.app-top { background: var(--surface); color: var(--text); border-bottom: 1px solid var(--border); }
  .topbar.app-top .brand { display: none; }
  .topbar.app-top .conn { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
  .fab { display: none !important; }
}

/* ---------- Typography helpers ---------- */
.h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 4px; letter-spacing: -.02em; font-weight: 800; }
.h2 { font-size: 1.12rem; margin: 0; font-weight: 700; letter-spacing: -.01em; }
.h3 { font-size: 1rem; margin: 0; font-weight: 700; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: .86rem; }
.xs { font-size: .76rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.strong { font-weight: 700; }
.upper { text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; font-weight: 700; color: var(--text-3); }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 10px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.center { text-align: center; }
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-sm { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.grid-kpi { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.span-all { grid-column: 1 / -1; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow-1); }
.card.flat { box-shadow: none; }
.card.tight { padding: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-link { display: block; text-decoration: none; color: inherit; transition: transform .12s, box-shadow .12s, border-color .12s; }
.card-link:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2); }
.card-link:active { transform: scale(.99); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 700; font-size: 1rem; text-decoration: none; white-space: nowrap;
  transition: background .15s, transform .08s, box-shadow .15s;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .ico { width: 22px; height: 22px; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 4px 14px rgba(26, 140, 156, .3); }
.btn-primary:hover { background: var(--primary-strong); }
.btn-navy { background: var(--navy); color: #fff; }
html[data-theme="dark"] .btn-navy { background: #23427f; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-soft { background: var(--primary-soft); color: var(--primary-strong); }
.btn-ghost { background: transparent; color: var(--primary-strong); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--red); }
.btn-lg { min-height: 58px; font-size: 1.06rem; border-radius: 16px; padding: 0 22px; }
.btn-xl { min-height: 72px; font-size: 1.1rem; border-radius: 20px; }
.btn-sm { min-height: 38px; padding: 0 12px; font-size: .88rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-col { flex-direction: column; gap: 6px; white-space: normal; text-align: center; line-height: 1.2; }
.btn-col .ico { width: 30px; height: 30px; }

.fab {
  position: fixed; right: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 25;
  width: 64px; height: 64px; border-radius: 22px; border: 0; background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center; box-shadow: 0 10px 28px rgba(26, 140, 156, .45);
}
.fab .ico { width: 30px; height: 30px; }

/* ---------- Chips, pills, tags ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); font-weight: 600; font-size: .9rem; color: var(--text-2);
}
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
html[data-theme="dark"] .chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.chip .count { background: rgba(127,140,160,.2); border-radius: 999px; padding: 0 7px; font-size: .78rem; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.pill .ico { width: 14px; height: 14px; stroke-width: 2.5; }
.pill-green { background: var(--green-50); color: var(--green); }
.pill-amber { background: var(--amber-50); color: var(--amber); }
.pill-red { background: var(--red-50); color: var(--red); }
.pill-teal { background: var(--teal-50); color: var(--primary-strong); }
.pill-gray { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.pill-violet { background: var(--violet-50); color: var(--violet); }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: .75rem; font-weight: 700; }
.tag .ico { width: 13px; height: 13px; stroke-width: 2.5; }
.tag-allergy { background: var(--red-50); color: var(--red); }
.tag-risk { background: var(--amber-50); color: var(--amber); }
.tag-iso { background: var(--violet-50); color: var(--violet); }
.tag-info { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }

.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: .72rem; font-weight: 800; display: inline-grid; place-items: center; }
.badge.amber { background: var(--amber); }

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.dot-green { background: var(--green); }
.dot-amber { background: var(--amber); }
.dot-red { background: var(--red); }
.dot-gray { background: var(--text-3); }

.conn {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
}
.conn .ico { width: 15px; height: 15px; }
.conn.off { background: var(--amber); color: #2b1d00; border-color: transparent; }

/* ---------- Banners / alerts ---------- */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid; font-size: .92rem; }
.banner .ico { width: 22px; height: 22px; margin-top: 1px; }
.banner-info { background: var(--teal-50); border-color: rgba(26,140,156,.25); color: var(--text); }
.banner-info .ico { color: var(--primary-strong); }
.banner-warn { background: var(--amber-50); border-color: rgba(183,121,11,.3); }
.banner-warn .ico { color: var(--amber); }
.banner-danger { background: var(--red-50); border-color: rgba(201,58,58,.35); }
.banner-danger .ico { color: var(--red); }
.banner-ok { background: var(--green-50); border-color: rgba(35,147,95,.3); }
.banner-ok .ico { color: var(--green); }
.offline-bar {
  display: flex; align-items: center; gap: 10px; justify-content: center; padding: 8px 14px;
  background: var(--amber); color: #2b1d00; font-weight: 700; font-size: .86rem; text-align: center;
}
.offline-bar .ico { width: 18px; height: 18px; }

/* ---------- Lists ---------- */
.list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 60px;
  text-decoration: none; color: inherit; border: 0; background: transparent; width: 100%; text-align: left;
}
.list-item + .list-item { border-top: 1px solid var(--border); }
a.list-item:hover, button.list-item:hover { background: var(--surface-2); }
.list-item .chev { color: var(--text-3); }
.list-title { font-weight: 700; }
.list-sub { font-size: .86rem; color: var(--text-2); }
.list-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-strong); flex: none; }
.list-ico .ico { width: 22px; height: 22px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 26px 2px 10px; }
.section-title:first-child { margin-top: 4px; }

/* ---------- Avatar ---------- */
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; font-size: .95rem; letter-spacing: .02em; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar.sm { width: 32px; height: 32px; font-size: .74rem; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-weight: 700; font-size: .9rem; }
.input, .textarea, .select {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--border-strong);
  background: var(--surface); font-size: 1rem;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
.search { position: relative; }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 22px; height: 22px; }
.search .input { padding-left: 46px; min-height: 54px; border-radius: 16px; font-size: 1.05rem; }

.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); gap: 4px; flex-wrap: wrap; }
.seg button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; font-weight: 700; color: var(--text-2); font-size: .9rem; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
html[data-theme="dark"] .seg button[aria-pressed="true"] { background: var(--border-strong); }
.seg.block { display: flex; }
.seg.block button { flex: 1; }

.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { box-shadow: var(--focus); }

/* ---------- Progress ---------- */
.progress { height: 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--green)); border-radius: inherit; }

/* ---------- Bottom sheet / dialog ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(6, 16, 32, .5); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease-out; }
.sheet {
  width: 100%; max-height: 92dvh; overflow: auto; background: var(--surface); border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(20px + var(--safe-b)); box-shadow: var(--shadow-3); animation: rise .24s cubic-bezier(.2,.8,.2,1);
}
.sheet::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 99px; background: var(--border-strong); margin: 0 auto 14px; }
@media (min-width: 700px) {
  .overlay { align-items: center; padding: 24px; }
  .sheet { width: min(560px, 100%); border-radius: 24px; padding: 24px; }
  .sheet::before { display: none; }
}
@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.toast-wrap { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; background: #13233d; color: #fff; padding: 12px 14px 12px 16px; border-radius: 14px; box-shadow: var(--shadow-3); font-weight: 600; font-size: .94rem; max-width: 520px; width: 100%; animation: rise .2s ease-out; }
html[data-theme="dark"] .toast { background: #e4ebf5; color: #0a1322; }
.toast .ico { width: 22px; height: 22px; }
.toast .ok { color: #59d39c; }
html[data-theme="dark"] .toast .ok { color: var(--green-50); color: #1a7a4e; }
.toast button { margin-left: auto; background: transparent; border: 0; color: #6fd0dc; font-weight: 800; padding: 6px 4px; }

/* ---------- Patient UI ---------- */
.bed { min-width: 64px; height: 56px; padding: 0 8px; border-radius: 14px; background: var(--navy); color: #fff; display: grid; place-items: center; text-align: center; flex: none; line-height: 1.05; }
html[data-theme="dark"] .bed { background: #23427f; }
.bed b { font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; }
.bed small { font-size: .62rem; font-weight: 700; opacity: .75; letter-spacing: .06em; text-transform: uppercase; }
.bed.lg { min-width: 84px; height: 76px; border-radius: 18px; }
.bed.lg b { font-size: 1.5rem; }
.pt-card { display: flex; gap: 14px; align-items: flex-start; }
.pt-name { font-weight: 800; font-size: 1.05rem; line-height: 1.25; }
.pt-meta { font-size: .86rem; color: var(--text-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pt-status { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--text-2); margin-top: 8px; }
.quick-mic { width: 52px; height: 52px; border-radius: 16px; border: 0; background: var(--primary-soft); color: var(--primary-strong); display: grid; place-items: center; flex: none; }
.quick-mic .ico { width: 26px; height: 26px; }
.quick-mic:hover { background: var(--primary); color: var(--on-primary); }

.id-card { border-radius: var(--r-lg); background: linear-gradient(135deg, var(--navy), #1d4f86 60%, var(--teal)); color: #fff; padding: 18px; position: relative; overflow: hidden; }
.id-card .pt-meta { color: rgba(255,255,255,.8); }
.id-card .tag-allergy { background: #ffe1e1; color: #a12525; }
.id-card .tag-risk { background: #ffefc7; color: #8a5a00; }
.id-card .tag-iso { background: #e9e2ff; color: #4b33a0; }
.id-card .tag-info { background: rgba(255,255,255,.14); color: #fff; border-color: transparent; }
.id-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.06); }
.id-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px 16px; margin-top: 14px; }
.id-grid dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; opacity: .7; font-weight: 700; }
.id-grid dd { margin: 2px 0 0; font-weight: 700; }

/* Timeline */
.timeline { position: relative; }
.tl-item { display: flex; gap: 12px; padding: 12px 0; text-decoration: none; color: inherit; }
.tl-item + .tl-item { border-top: 1px dashed var(--border); }
.tl-time { width: 54px; flex: none; text-align: right; font-weight: 800; font-size: .92rem; }
.tl-time small { display: block; font-weight: 600; color: var(--text-3); font-size: .72rem; }
.tl-body { flex: 1; min-width: 0; }
.tl-text { font-size: .92rem; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }

/* Vitals */
.vitals { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.vital { border: 1.5px solid var(--border); border-radius: 14px; padding: 10px 12px; background: var(--surface); position: relative; }
.vital .v-label { display: flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 800; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.vital .v-label .ico { width: 15px; height: 15px; }
.vital .v-value { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.vital .v-unit { font-size: .78rem; font-weight: 600; color: var(--text-3); margin-left: 3px; }
.vital input { width: 100%; border: 0; background: transparent; font-size: 1.35rem; font-weight: 800; padding: 2px 0 0; letter-spacing: -.02em; color: inherit; }
.vital input:focus { outline: none; }
.vital:focus-within { border-color: var(--primary); box-shadow: var(--focus); }
.vital.hi, .vital.lo { border-color: var(--red); background: var(--red-50); }
.vital.hi .v-label, .vital.lo .v-label { color: var(--red); }
.vital.v-empty { border-style: dashed; }
.vital .flag { position: absolute; top: 8px; right: 8px; font-size: .68rem; font-weight: 800; color: var(--red); }

/* ---------- Auth ---------- */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1fr; background: var(--bg); }
.auth-hero { display: none; }
.auth-main { display: flex; flex-direction: column; padding: calc(28px + var(--safe-t)) 20px calc(24px + var(--safe-b)); gap: 18px; justify-content: center; }
.auth-main > * { width: 100%; max-width: 520px; margin-left: auto; margin-right: auto; }
@media (min-width: 900px) {
  .auth { grid-template-columns: minmax(380px, 1fr) minmax(460px, 1fr); }
  .auth-hero {
    display: flex; flex-direction: column; justify-content: space-between; padding: 48px; color: #fff;
    background: radial-gradient(circle at 80% 10%, rgba(111,208,220,.35), transparent 45%), linear-gradient(160deg, var(--navy) 0%, #143f73 55%, var(--teal) 130%);
  }
  .auth-hero h2 { font-size: 2.4rem; line-height: 1.12; letter-spacing: -.03em; margin: 0 0 14px; max-width: 520px; }
  .auth-hero p { font-size: 1.08rem; opacity: .85; max-width: 480px; margin: 0; }
  .auth-hero .brand .w2 { color: #8fe0ea; }
  .hero-points { display: grid; gap: 14px; margin-top: 32px; }
  .hero-points div { display: flex; gap: 12px; align-items: center; font-weight: 600; }
  .hero-points .ico { width: 36px; height: 36px; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.12); }
}
.user-tile { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; border: 1.5px solid var(--border); background: var(--surface); width: 100%; text-align: left; min-height: 76px; }
.user-tile:hover { border-color: var(--primary); }
.pin-dots { display: flex; justify-content: center; gap: 16px; margin: 6px 0; }
.pin-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); transition: background .12s, transform .12s; }
.pin-dots i.on { background: var(--primary); border-color: var(--primary); transform: scale(1.08); }
.pin-dots.error i { border-color: var(--red); }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 360px; margin: 0 auto; }
.keypad button { height: 68px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); font-size: 1.6rem; font-weight: 700; display: grid; place-items: center; box-shadow: var(--shadow-1); }
.keypad button:active { background: var(--primary-soft); }
.keypad button.k-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--primary-strong); }
.keypad button .ico { width: 28px; height: 28px; }

.onb { min-height: 100dvh; display: flex; flex-direction: column; background: var(--surface); }
.onb-art { flex: 1; display: grid; place-items: center; padding: calc(24px + var(--safe-t)) 24px 0; background: linear-gradient(180deg, var(--primary-soft), var(--surface)); }
.onb-body { padding: 20px 24px calc(24px + var(--safe-b)); display: flex; flex-direction: column; gap: 16px; max-width: 620px; width: 100%; margin: 0 auto; }
.onb-dots { display: flex; gap: 8px; justify-content: center; }
.onb-dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--border-strong); transition: width .2s; }
.onb-dots i.on { width: 26px; background: var(--primary); }
.onb-illus { width: min(300px, 76vw); aspect-ratio: 1; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-2); display: grid; place-items: center; position: relative; }
.onb-illus .ico { width: 42%; height: 42%; color: var(--primary); stroke-width: 1.6; }
.onb-illus .orb { position: absolute; width: 64px; height: 64px; border-radius: 20px; background: var(--navy); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-2); }
.onb-illus .orb .ico { width: 30px; height: 30px; color: #fff; stroke-width: 2; }

/* ---------- Scanner ---------- */
.scan { position: fixed; inset: 0; z-index: 40; background: #050b14; color: #fff; display: flex; flex-direction: column; }
.scan video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan .scan-fake { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, #2a3a4f 0%, #0b1424 70%); }
.scan-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; padding: calc(10px + var(--safe-t)) 12px 10px; background: linear-gradient(180deg, rgba(0,0,0,.6), transparent); }
.scan-top h1 { flex: 1; font-size: 1.05rem; margin: 0; }
.scan-mid { position: relative; z-index: 2; flex: 1; display: grid; place-items: center; }
.scan-frame { width: min(72vw, 300px); aspect-ratio: 1; position: relative; border-radius: 24px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
.scan-frame i { position: absolute; width: 44px; height: 44px; border: 5px solid #6fd0dc; }
.scan-frame i:nth-child(1) { top: -3px; left: -3px; border-right: 0; border-bottom: 0; border-top-left-radius: 24px; }
.scan-frame i:nth-child(2) { top: -3px; right: -3px; border-left: 0; border-bottom: 0; border-top-right-radius: 24px; }
.scan-frame i:nth-child(3) { bottom: -3px; left: -3px; border-right: 0; border-top: 0; border-bottom-left-radius: 24px; }
.scan-frame i:nth-child(4) { bottom: -3px; right: -3px; border-left: 0; border-top: 0; border-bottom-right-radius: 24px; }
.scan-laser { position: absolute; left: 10%; right: 10%; height: 3px; border-radius: 3px; background: #ff5a5a; box-shadow: 0 0 12px #ff5a5a; top: 50%; animation: laser 2s ease-in-out infinite; }
@keyframes laser { 0%, 100% { top: 15%; } 50% { top: 85%; } }
.scan-bottom { position: relative; z-index: 2; padding: 16px 16px calc(18px + var(--safe-b)); background: linear-gradient(0deg, rgba(0,0,0,.75), transparent); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.scan-hint { background: rgba(0,0,0,.55); padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .92rem; text-align: center; }
.scan-demo { display: flex; gap: 8px; overflow-x: auto; max-width: 100%; padding: 2px; scrollbar-width: none; }
.scan-demo button { flex: none; min-height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff; padding: 0 12px; font-weight: 600; font-size: .86rem; }
.scan .btn-secondary { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.3); }

/* ---------- Recording ---------- */
.focus { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.focus-head { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--border); padding: calc(8px + var(--safe-t)) 10px 8px; display: flex; align-items: center; gap: 8px; }
.focus-body { flex: 1; padding: 16px var(--gutter); display: flex; flex-direction: column; gap: 14px; width: 100%; }
.focus-foot { position: sticky; bottom: 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--border); padding: 12px var(--gutter) calc(12px + var(--safe-b)); display: flex; gap: 10px; }
.focus-foot .btn { flex: 1; }
.pt-chip { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.pt-chip .bed { min-width: 50px; height: 44px; border-radius: 12px; }
.pt-chip .bed b { font-size: .95rem; }

.rec-layout { display: grid; gap: 16px; grid-template-columns: 1fr; flex: 1; }
@media (min-width: 980px) {
  .rec-layout { grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); align-items: start; }
  .rec-side { position: sticky; top: 84px; }
}
.guide { display: flex; flex-wrap: wrap; gap: 8px; }
.guide span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1.5px dashed var(--border-strong); font-size: .86rem; font-weight: 700; color: var(--text-3); transition: all .25s; }
.guide span .ico { width: 16px; height: 16px; }
.guide span.hit { border-style: solid; border-color: var(--green); background: var(--green-50); color: var(--green); }
.transcript { min-height: 180px; flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; font-size: 1.12rem; line-height: 1.6; overflow-wrap: anywhere; }
.transcript .interim { color: var(--text-3); }
.transcript .placeholder { color: var(--text-3); font-size: 1rem; }
.transcript .placeholder b { color: var(--text-2); }
.transcript textarea { width: 100%; min-height: 220px; border: 0; background: transparent; resize: vertical; font-size: 1.1rem; line-height: 1.6; }
.transcript textarea:focus { outline: none; }

.mic-zone { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 0 4px; user-select: none; -webkit-user-select: none; }
.mic-wrap { position: relative; width: 168px; height: 168px; display: grid; place-items: center; }
.mic-ring { position: absolute; inset: 0; border-radius: 50%; background: var(--primary); opacity: .12; transform: scale(var(--lvl, .62)); transition: transform .08s linear; }
.mic-ring.r2 { opacity: .08; transform: scale(calc(var(--lvl, .62) * 1.0 + .1)); }
.mic-btn {
  position: relative; width: 112px; height: 112px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--teal), var(--teal-600)); color: #fff; box-shadow: 0 12px 30px rgba(26, 140, 156, .45), inset 0 -4px 0 rgba(0,0,0,.12);
  touch-action: none; transition: transform .12s, background .2s;
}
.mic-btn .ico { width: 46px; height: 46px; stroke-width: 2.2; }
.mic-btn.live { background: linear-gradient(160deg, #e04848, #b52d2d); box-shadow: 0 12px 30px rgba(201, 58, 58, .45); transform: scale(1.06); }
.mic-wrap.live .mic-ring { background: #e04848; }
.mic-label { font-weight: 800; font-size: 1.05rem; text-align: center; }
.mic-sub { font-size: .86rem; color: var(--text-2); text-align: center; min-height: 1.2em; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: .95rem; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.timer.live { background: var(--red-50); color: var(--red); border-color: transparent; }
.timer.live::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 6px; animation: blink 1s infinite; vertical-align: 1px; }
@keyframes blink { 50% { opacity: .2; } }
.wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 40px; }
.wave i { width: 4px; border-radius: 4px; background: var(--primary); height: 6px; transition: height .08s; opacity: .8; }
.wave.live i { background: var(--red); }

/* Processing */
.proc { flex: 1; display: grid; place-items: center; padding: 32px 20px; }
.proc-box { width: min(460px, 100%); display: flex; flex-direction: column; gap: 22px; align-items: center; text-align: center; }
.spinner-ai { width: 96px; height: 96px; border-radius: 30px; background: linear-gradient(135deg, var(--navy), var(--teal)); display: grid; place-items: center; color: #fff; animation: pulse 1.6s ease-in-out infinite; box-shadow: 0 12px 32px rgba(26,140,156,.4); }
.spinner-ai .ico { width: 44px; height: 44px; }
@keyframes pulse { 50% { transform: scale(1.06); box-shadow: 0 16px 42px rgba(26,140,156,.55); } }
.steps { width: 100%; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.step { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text-3); font-weight: 600; transition: all .3s; }
.step .st-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border-strong); flex: none; }
.step .st-ico .ico { width: 16px; height: 16px; stroke-width: 3; }
.step.doing { color: var(--text); border-color: var(--primary); }
.step.doing .st-ico { border-color: var(--primary); border-top-color: transparent; animation: spin .8s linear infinite; }
.step.done { color: var(--text); }
.step.done .st-ico { background: var(--green); border-color: var(--green); color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Review */
.rv-sec { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px; }
.rv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rv-head .list-ico { width: 34px; height: 34px; border-radius: 10px; }
.rv-head .list-ico .ico { width: 18px; height: 18px; }
.rv-head h3 { flex: 1; margin: 0; font-size: 1rem; }
.rv-text { font-size: 1.02rem; line-height: 1.55; white-space: pre-wrap; }
.rv-text.empty { color: var(--text-3); font-style: italic; }
.rv-text mark { background: var(--teal-50); color: var(--primary-strong); border-radius: 4px; padding: 0 3px; font-weight: 700; }
.alerts { display: flex; flex-direction: column; gap: 8px; }
.final-text { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86rem; line-height: 1.6; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px; white-space: pre-wrap; color: var(--text); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; line-height: 1.5; background: #0b1424; color: #cfe3f5; border-radius: 14px; padding: 14px; overflow: auto; max-height: 420px; white-space: pre; }
details.disclose summary { cursor: pointer; font-weight: 700; color: var(--primary-strong); list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; }
details.disclose summary::-webkit-details-marker { display: none; }
details.disclose[open] summary .ico { transform: rotate(180deg); }

/* Success */
.done-hero { text-align: center; padding: 28px 8px 8px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.done-check { width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; box-shadow: 0 0 0 14px var(--green-50); animation: pop .45s cubic-bezier(.2,1.4,.4,1); }
.done-check.amber { background: var(--amber); box-shadow: 0 0 0 14px var(--amber-50); }
.done-check .ico { width: 54px; height: 54px; stroke-width: 3; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.sync-line { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.sync-steps { display: flex; flex-direction: column; gap: 0; }
.sync-steps div { display: flex; gap: 12px; align-items: center; padding: 8px 0; font-weight: 600; color: var(--text-3); }
.sync-steps div.ok { color: var(--text); }
.sync-steps div .ico { width: 20px; height: 20px; }
.sync-steps div.ok .ico { color: var(--green); }
.sync-steps div.wait .ico { color: var(--amber); }

/* KPI */
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px; }
.kpi .k-val { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.kpi .k-lab { font-size: .84rem; color: var(--text-2); font-weight: 600; }
.kpi .k-foot { font-size: .78rem; color: var(--text-3); margin-top: 4px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars i { width: 100%; max-width: 36px; border-radius: 6px 6px 3px 3px; background: var(--primary); min-height: 3px; }
.bars i.now { background: var(--navy); }
html[data-theme="dark"] .bars i.now { background: #6fd0dc; }
.bars span { font-size: .7rem; color: var(--text-3); font-weight: 700; }
.bars b { font-size: .72rem; color: var(--text-2); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; min-width: 560px; }
.tbl th, .tbl td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: .92rem; }
.tbl th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); background: var(--surface-2); }
.tbl tr:last-child td { border-bottom: 0; }

/* Hero (home) */
.hello { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cta-card { border-radius: var(--r-xl); padding: 20px; color: #fff; background: radial-gradient(circle at 100% 0%, rgba(111,208,220,.35), transparent 50%), linear-gradient(140deg, var(--navy), #1b4b80 70%, var(--teal-600)); box-shadow: var(--shadow-2); }
.cta-card .h2 { color: #fff; font-size: 1.3rem; }
.cta-card p { margin: 4px 0 16px; opacity: .85; }
.cta-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cta-actions .btn { min-height: 84px; }
.cta-actions .btn-scan { background: #fff; color: var(--navy); }
.cta-actions .btn-find { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.28); }
.draft-card { border: 2px solid var(--amber); background: var(--amber-50); }

.empty { text-align: center; padding: 36px 16px; color: var(--text-2); }
.empty .ico { width: 44px; height: 44px; margin: 0 auto 10px; color: var(--text-3); stroke-width: 1.6; }

.settings-group { margin-top: 22px; }
.set-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 64px; }
.set-row + .set-row { border-top: 1px solid var(--border); }
.set-row .grow .list-sub { margin-top: 2px; }

.install-card { background: var(--primary-soft); border: 1px solid rgba(26,140,156,.3); }

@media (max-width: 420px) {
  .h1 { font-size: 1.4rem; }
  .cta-actions .btn { min-height: 92px; }
  .mic-wrap { width: 150px; height: 150px; }
  .mic-btn { width: 104px; height: 104px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@media (max-width: 520px) { .hide-sm { display: none; } }
@media (max-width: 380px) { .hide-xs { display: none; } }
@media (min-width: 900px) { .hide-desktop { display: none !important; } }
.topbar a { text-decoration: none; color: inherit; }
.brand.ink .w1 { color: var(--brand-ink); }
.brand.ink .w2 { color: var(--primary); }
.seg.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); width: 100%; }
.seg.grid2 button { min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; line-height: 1.15; }
.seg.grid2 button small { font-weight: 600; color: var(--text-3); font-size: .8rem; }
.scan-top, .scan-bottom { z-index: 3; }
.sheet .btn, .focus-foot .btn { white-space: normal; text-align: center; line-height: 1.2; }
.btn.grow { min-width: 0; }
.btn-fit { flex: 0 0 auto !important; }

/* Tela de gravação: microfone sempre visível, ao alcance do polegar */
.rec-screen { height: 100dvh; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }
.rec-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rec-main { flex: 1; min-height: 0; overflow-y: auto; padding: 14px var(--gutter); display: flex; flex-direction: column; gap: 12px; }
.rec-main .transcript { flex: 1 0 auto; min-height: 120px; }
.rec-dock { flex: none; background: var(--surface); border-top: 1px solid var(--border); padding: 10px var(--gutter) calc(12px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 -8px 24px rgba(15,34,64,.06); }
.rec-dock .seg button { min-height: 34px; font-size: .82rem; padding: 0 10px; }
.rec-dock .wave { height: 26px; }
.mic-row { display: flex; align-items: center; justify-content: center; gap: 18px; width: 100%; }
.rec-dock .mic-wrap { width: 132px; height: 132px; }
.rec-dock .mic-btn { width: 96px; height: 96px; }
.side-btn { width: 72px; min-height: 64px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: .76rem; font-weight: 700; }
.side-btn .ico { width: 22px; height: 22px; }
.side-btn:hover { color: var(--primary-strong); border-color: var(--primary); }
.rec-dock .mic-label { font-size: 1rem; }
.rec-dock .mic-sub { margin-bottom: 6px; }
.tag { white-space: nowrap; }
.pt-chip .tags { flex-wrap: nowrap; overflow: hidden; }
@media (min-width: 980px) {
  .rec-wrap { flex-direction: row; }
  .rec-main { padding: 24px 28px; }
  .rec-dock { width: 400px; border-top: 0; border-left: 1px solid var(--border); justify-content: center; padding: 24px; gap: 8px; box-shadow: none; }
  .rec-dock .mic-wrap { width: 176px; height: 176px; }
  .rec-dock .mic-btn { width: 120px; height: 120px; }
  .rec-dock .wave { height: 44px; }
}
@media (max-height: 700px) and (max-width: 979px) {
  .rec-dock .mic-wrap { width: 108px; height: 108px; }
  .rec-dock .mic-btn { width: 80px; height: 80px; }
  .rec-dock .wave { display: none; }
}
@media (max-width: 979px) { .rec-main .guide { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); } .rec-main .guide::-webkit-scrollbar { display: none; } .rec-main .guide span { flex: none; } }
.rec-layout > *, .grid > *, .rec-main > * { min-width: 0; }
.alert-items { margin: 6px 0 6px; padding-left: 18px; font-weight: 700; font-size: .92rem; }
.alert-items li + li { margin-top: 2px; }
.vital { display: flex; flex-direction: column; justify-content: flex-start; min-width: 0; }
.vital .v-row { display: flex; align-items: baseline; gap: 4px; }
.vital .v-row input { flex: 1; min-width: 0; }
.vital .v-row .v-unit { flex: none; }
.vital .flag.inl { position: static; margin-left: auto; background: var(--red); color: #fff; border-radius: 6px; padding: 1px 6px; font-size: .64rem; letter-spacing: .04em; }
.vitals { align-items: start; }
.btn.is-blocked { opacity: .55; box-shadow: none; }
.vitals { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
.vital[data-vital="pa"] { grid-column: span 2; }
@media (min-width: 900px) { .focus-body { padding: 24px 28px; } .focus-foot { padding-left: 28px; padding-right: 28px; } }
.keypad { width: 100%; }
.chip { white-space: nowrap; flex: none; }
.topbar .avatar, .nav-foot .avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.4); }
