/* ==========================================================================
   Synzel Clínica — estilos do app (mobile first).
   Extraído de base/Livro Caixa v3.dc.html: mesmos valores, agora em classes.
   ========================================================================== */

:root {
  --c-primary: #1d5fe0;
  --c-primary-dark: #1547b0;
  --c-primary-soft: #e8f0ff;
  --c-primary-ring: #9cbcf7;
  --c-page: #eef3fb;
  --c-bg: #f6f8fc;
  --c-surface: #fff;
  --c-text: #0f1b33;
  --c-text-2: #33415c;
  --c-muted: #5b6b88;
  --c-muted-2: #7a879e;
  --c-line: #e6ebf3;
  --c-line-2: #dbe3f0;
  --c-line-3: #eef2f8;
  --c-input: #f1f4fa;
  --c-ok: #0f8a4f;
  --c-ok-dark: #0b6b3d;
  --c-ok-soft: #e3f6ec;
  --c-danger: #d23a3a;
  --c-danger-text: #b42323;
  --c-danger-dark: #a82424;
  --c-danger-soft: #fde8e8;

  --shadow-card: 0 10px 30px rgba(15, 27, 51, .10);
  --shadow-float: 0 12px 40px rgba(15, 27, 51, .12);
  --shadow-primary: 0 8px 20px rgba(29, 95, 224, .3);
  --ring-1: 0 0 0 1px var(--c-line) inset;
  --ring-2: 0 0 0 1.5px var(--c-line-2) inset;
  --ring-focus: 0 0 0 2px var(--c-primary) inset;

  --nav-w: 480px;
}

/* — base — */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--c-page); color: var(--c-text);
  font-family: 'Manrope', system-ui, sans-serif; font-size: 18px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--c-primary); }
a:hover { color: var(--c-primary-dark); }
input, select, button, textarea { font-family: inherit; color: inherit; }
input:focus, select:focus, textarea:focus { outline: none; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--c-primary-ring); outline-offset: 2px; }
[hidden] { display: none !important; }

/* — casca do app — */
.app { min-height: 100vh; min-height: 100dvh; display: flex; justify-content: center; }
.app-shell {
  width: 100%; max-width: var(--nav-w); min-height: 100vh; min-height: 100dvh;
  background: var(--c-bg); position: relative; display: flex; flex-direction: column;
}
.app-main { flex: 1; display: flex; flex-direction: column; }
.app-main.has-nav { padding-bottom: 120px; }

/* — botões — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; cursor: pointer; text-decoration: none; font-weight: 800;
  transition: transform .08s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--c-primary); color: #fff; box-shadow: var(--shadow-primary); }
.btn-primary:hover { color: #fff; background: var(--c-primary-dark); }
.btn-lg { min-height: 62px; padding: 0 24px; border-radius: 18px; font-size: 20px; box-shadow: 0 8px 20px rgba(29, 95, 224, .35); }
.btn-block { width: 100%; }
.btn-soft { background: var(--c-primary-soft); color: var(--c-primary); font-size: 16px; padding: 12px 18px; border-radius: 14px; }
.btn-danger-outline {
  background: #fff; color: var(--c-danger-text); font-size: 17px; padding: 16px;
  border-radius: 16px; box-shadow: var(--ring-2);
}
.btn-danger-outline:hover { color: var(--c-danger-text); background: #fff5f5; }
.btn-outline {
  background: #fff; color: var(--c-primary); font-size: 17px; padding: 16px;
  border-radius: 16px; box-shadow: var(--ring-2);
}
.btn-outline:hover { color: var(--c-primary-dark); }
.btn-back {
  flex: 0 0 48px; width: 48px; height: 48px; border-radius: 16px; border: 0; background: #fff;
  font-size: 22px; font-weight: 800; color: var(--c-text); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--ring-2);
}
.btn-back:hover { color: var(--c-text); }
.link-btn { color: var(--c-primary); font-size: 16px; font-weight: 700; padding: 8px; text-decoration: none; }

/* — formulários — */
.field { display: flex; flex-direction: column; gap: 8px; font-size: 16px; font-weight: 700; color: var(--c-text-2); }
.input {
  height: 60px; padding: 0 18px; border-radius: 16px; border: 0; width: 100%;
  background: var(--c-input); font-size: 19px; font-weight: 600;
}
.input:focus { box-shadow: var(--ring-focus); background: #fff; }
.input-group {
  display: flex; align-items: center; height: 60px; border-radius: 16px;
  background: var(--c-input); padding: 0 8px 0 18px;
}
.input-group:focus-within { box-shadow: var(--ring-focus); background: #fff; }
.input-group input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: transparent;
  font-size: 19px; font-weight: 600;
}
.input-addon {
  border: 0; background: transparent; color: var(--c-primary);
  font-size: 16px; font-weight: 700; padding: 10px; cursor: pointer;
}

/* — alertas — */
.alert { padding: 14px 16px; border-radius: 14px; font-size: 16px; font-weight: 600; }
.alert-danger { background: var(--c-danger-soft); color: var(--c-danger-text); }
.alert-ok { background: var(--c-ok-soft); color: var(--c-ok-dark); }
.alert-info { background: var(--c-primary-soft); color: var(--c-primary-dark); }

/* — login — */
.login {
  flex: 1; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--c-primary) 0%, var(--c-primary) 38%, var(--c-bg) 38%);
}
.login-brand { padding: 64px 28px 40px; color: #fff; display: flex; flex-direction: column; gap: 10px; }
.brand-mark {
  width: 56px; height: 56px; border-radius: 18px; background: rgba(255, 255, 255, .18);
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800;
}
.login-kicker { font-size: 16px; font-weight: 600; opacity: .9; margin-top: 14px; }
.login-title { font-size: 36px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.login-card {
  margin: 0 16px 32px; background: #fff; border-radius: 28px; padding: 28px 22px;
  display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow-float);
}
.login-heading { font-size: 24px; font-weight: 800; }

/* — topo azul (hero) — */
.hero {
  background: var(--c-primary); color: #fff; padding: 28px 20px 92px;
  border-radius: 0 0 32px 32px; display: flex; flex-direction: column; gap: 6px;
}
.hero-kicker { font-size: 16px; opacity: .85; font-weight: 600; }
.hero-title { font-size: 28px; font-weight: 800; letter-spacing: -.01em; }

.hero-compact { padding-bottom: 28px; }

/* — checklist (setup) — */
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.check { display: flex; align-items: flex-start; gap: 12px; }
.check-icon {
  flex: 0 0 28px; height: 28px; border-radius: 99px; font-size: 15px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.check.is-ok .check-icon { background: var(--c-ok-soft); color: var(--c-ok); }
.check.is-warn .check-icon { background: #fff4db; color: #9a6400; }
.check.is-fail .check-icon { background: var(--c-danger-soft); color: var(--c-danger-text); }
.check-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.check-text strong { font-size: 16px; font-weight: 800; }
.check-text span { font-size: 14px; color: var(--c-muted); font-weight: 600; overflow-wrap: anywhere; }
.mono-list { margin: 0; padding-left: 20px; font-family: ui-monospace, monospace; font-size: 14px; color: var(--c-text-2); }

/* — indicadores — */
.stats {
  margin: -68px 16px 0; background: #fff; border-radius: 24px; padding: 18px 8px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); box-shadow: var(--shadow-card);
}
.stat { padding: 0 10px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat + .stat { border-left: 1px solid var(--c-line); }
.stat-label { font-size: 14px; font-weight: 700; color: var(--c-muted); }
.stat-value { font-size: 30px; font-weight: 800; }
.stat-value.is-money { font-size: 19px; padding-top: 8px; color: var(--c-primary); overflow-wrap: anywhere; }

/* — ações rápidas — */
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 20px 16px 0; }
.quick-main, .quick-card { text-decoration: none; transition: transform .08s ease; }
.quick-main:active, .quick-card:active { transform: scale(.98); }
.quick-main {
  grid-column: 1 / -1; border-radius: 22px; background: var(--c-primary); color: #fff;
  padding: 20px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow-primary);
}
.quick-main:hover { color: #fff; }
.quick-main-icon {
  flex: 0 0 52px; height: 52px; border-radius: 16px; background: rgba(255, 255, 255, .2);
  display: flex; align-items: center; justify-content: center;
}
.quick-main-text { display: flex; flex-direction: column; gap: 2px; }
.quick-main-text strong { font-size: 21px; font-weight: 800; }
.quick-main-text span { font-size: 15px; opacity: .9; }
.quick-card {
  border-radius: 22px; background: #fff; color: var(--c-text); padding: 18px 16px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px; box-shadow: var(--ring-2);
}
.quick-card:hover { color: var(--c-text); }
.quick-card-icon {
  width: 44px; height: 44px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700;
}
.quick-card-icon.is-blue { background: var(--c-primary-soft); color: var(--c-primary); }
.quick-card-icon.is-green { background: var(--c-ok-soft); color: var(--c-ok); font-size: 22px; font-weight: 800; }
.quick-card-label { font-size: 18px; font-weight: 800; line-height: 1.2; }

/* — seções, páginas e cartões — */
.section { padding: 28px 16px 0; display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.section-title { font-size: 21px; font-weight: 800; }

.page { padding: 24px 16px 0; display: flex; flex-direction: column; gap: 18px; }
.page-head { display: flex; align-items: center; gap: 12px; }
.page-title { font-size: 28px; font-weight: 800; line-height: 1.15; }
.page-sub { font-size: 16px; color: var(--c-muted); font-weight: 600; }
.page-center { flex: 1; justify-content: center; align-items: center; text-align: center; padding-bottom: 48px; }
.error-code { font-size: 64px; font-weight: 800; color: var(--c-primary); line-height: 1; }

.empty {
  background: #fff; border-radius: 20px; padding: 28px 20px; text-align: center;
  color: var(--c-muted); font-size: 17px; font-weight: 600; box-shadow: var(--ring-1);
}
.card {
  background: #fff; border-radius: 22px; padding: 18px;
  display: flex; flex-direction: column; gap: 14px; box-shadow: var(--ring-1);
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-kicker { font-size: 14px; font-weight: 800; color: var(--c-primary); text-transform: uppercase; letter-spacing: .06em; }
.tag {
  font-size: 13px; font-weight: 800; color: var(--c-primary); background: var(--c-primary-soft);
  padding: 5px 10px; border-radius: 99px; white-space: nowrap;
}
.tag-danger { color: var(--c-danger-text); background: var(--c-danger-soft); }
.kv { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.kv div { display: flex; flex-direction: column; gap: 2px; }
.kv dt { font-size: 14px; font-weight: 700; color: var(--c-muted); }
.kv dd { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }

/* — navegação inferior — */
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 10;
  width: 100%; max-width: var(--nav-w);
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--c-line); display: flex; align-items: center;
  padding: 6px 8px calc(10px + env(safe-area-inset-bottom));
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 0; color: var(--c-muted-2); font-size: 13px; font-weight: 700; text-decoration: none;
}
.nav-item:hover { color: var(--c-text-2); }
.nav-item.is-active { color: var(--c-primary); }
.nav-fab {
  flex: 0 0 auto; width: 62px; height: 62px; margin: -26px 6px 0; border-radius: 22px; border: 0;
  background: var(--c-primary); color: #fff; font-size: 34px; font-weight: 600; cursor: pointer;
  box-shadow: 0 10px 24px rgba(29, 95, 224, .4);
}
.nav-fab:active { transform: scale(.96); }

/* — menu inferior (action sheet) — */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 40; background: rgba(15, 27, 51, .45);
  display: flex; justify-content: center; align-items: flex-end;
}
.sheet {
  width: 100%; max-width: var(--nav-w); background: #fff; border-radius: 28px 28px 0 0;
  padding: 14px 16px calc(28px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 10px; animation: sheet-up .18s ease-out;
}
.sheet-handle { align-self: center; width: 44px; height: 5px; border-radius: 99px; background: #d5dcea; margin-bottom: 8px; }
.sheet-btn {
  display: block; border-radius: 18px; padding: 18px; font-size: 19px; font-weight: 800;
  text-decoration: none; background: var(--c-input); color: var(--c-text);
}
.sheet-btn:hover { color: var(--c-text); }
.sheet-btn.is-primary, .sheet-btn.is-primary:hover { background: var(--c-primary); color: #fff; }
.sheet-btn.is-in, .sheet-btn.is-in:hover { background: var(--c-ok-soft); color: var(--c-ok-dark); }
.sheet-btn.is-out, .sheet-btn.is-out:hover { background: var(--c-danger-soft); color: var(--c-danger-dark); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* — toast — */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 112px; z-index: 30;
  width: calc(100% - 32px); max-width: 448px; background: var(--c-text); color: #fff;
  border-radius: 16px; padding: 16px 18px; font-size: 17px; font-weight: 700;
  display: flex; align-items: center; gap: 10px; box-shadow: 0 10px 30px rgba(15, 27, 51, .3);
  transition: opacity .25s ease;
}
.toast.is-hiding { opacity: 0; }
.toast-check {
  flex: 0 0 26px; height: 26px; border-radius: 99px; background: #34d399; color: var(--c-text);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}

/* ==========================================================================
   Pacientes, evoluções e admin — valores do protótipo (base/ v3)
   ========================================================================== */

.is-hidden { display: none !important; }
.pre { white-space: pre-wrap; }
.muted { color: var(--c-muted); font-size: 15px; font-weight: 600; }
.small { font-size: 14px; line-height: 1.4; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }

/* — layout — */
.page-tight { padding-top: 16px; gap: 16px; }
.form-stack { gap: 20px; }
.page-head.is-between { justify-content: space-between; }
.page-title-sm { font-size: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }
.link-center { align-self: center; }
.link-start { align-self: flex-start; padding: 4px 0; margin-top: -6px; border: 0; background: transparent; cursor: pointer; font-size: 15px; }
.results { display: flex; flex-direction: column; gap: 16px; }
.list-count { font-size: 15px; font-weight: 700; color: var(--c-muted); padding: 0 4px; }

/* — botões extras — */
.btn-sm { font-size: 16px; padding: 13px 18px; border-radius: 14px; box-shadow: 0 6px 14px rgba(29, 95, 224, .3); }
.btn-md { font-size: 17px; padding: 16px; border-radius: 16px; }
.btn-xl { padding: 18px; border-radius: 20px; font-size: 20px; gap: 12px; }
.btn-ghost { background: #fff; color: var(--c-text-2); font-size: 15px; font-weight: 700; padding: 10px 16px; border-radius: 12px; box-shadow: var(--ring-2); }
.btn-danger { background: var(--c-danger); color: #fff; font-size: 15px; font-weight: 700; padding: 10px 16px; border-radius: 12px; }
.btn-danger:hover { color: #fff; background: #b82f2f; }
.btn-chip { font-size: 15px; font-weight: 700; padding: 10px 16px; border-radius: 12px; }
.btn-chip-blue, .btn-chip-blue:hover { background: var(--c-primary-soft); color: var(--c-primary); }
.btn-chip-gray, .btn-chip-gray:hover { background: #f4f6fa; color: var(--c-muted); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* — campos extras — */
.input-outline { background: #fff; box-shadow: var(--ring-2); height: 58px; font-size: 18px; }
.input-outline:focus { box-shadow: var(--ring-focus); }
.input-md { height: 56px; font-size: 17px; padding: 0 14px; }
.textarea {
  width: 100%; padding: 14px 16px; border-radius: 16px; border: 0; background: #fff;
  font-size: 18px; line-height: 1.5; font-weight: 600; box-shadow: var(--ring-2); resize: vertical;
}
.textarea:focus { box-shadow: var(--ring-focus); }
.textarea-soft { background: #f4f6fa; box-shadow: none; font-size: 16px; font-weight: 500; }
.select {
  width: 100%; height: 56px; padding: 0 10px; border-radius: 16px; border: 0;
  background: var(--c-input); font-size: 16px; font-weight: 600;
}
.select:focus { box-shadow: var(--ring-focus); }
.field-sm { font-size: 15px; }
.fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.field-label { padding: 0; font-size: 16px; font-weight: 700; color: var(--c-text-2); }
.check-inline { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--c-muted); margin-top: -4px; }
.check-inline input { width: 20px; height: 20px; accent-color: var(--c-primary); }
.alert-muted { background: #f4f6fa; color: var(--c-muted); font-size: 15px; }
.alert-info { font-size: 17px; font-weight: 700; }

/* — chips (pílulas) — */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chip span {
  display: inline-block; padding: 12px 18px; border-radius: 999px; cursor: pointer; user-select: none;
  background: #fff; color: var(--c-text-2); font-size: 17px; font-weight: 700; box-shadow: var(--ring-2);
  transition: background .1s ease, color .1s ease;
}
.chip input:checked + span { background: var(--c-primary); color: #fff; box-shadow: 0 4px 12px rgba(29, 95, 224, .28); }
.chip input:focus-visible + span { outline: 3px solid var(--c-primary-ring); outline-offset: 2px; }
.chip span:active { transform: scale(.97); }

/* — controle segmentado (abas) — */
.seg { display: flex; gap: 4px; background: #e9eef6; border-radius: 18px; padding: 4px; }
.seg-opt {
  flex: 1; text-align: center; padding: 14px 8px; border-radius: 14px; text-decoration: none;
  color: var(--c-muted); font-size: 17px; font-weight: 700;
}
.seg-opt:hover { color: var(--c-text); }
.seg-opt.is-on { background: #fff; color: var(--c-text); box-shadow: 0 2px 8px rgba(15, 27, 51, .12); }

/* — lista de pacientes — */
.list { background: #fff; border-radius: 22px; overflow: hidden; box-shadow: var(--ring-1); }
.list-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none;
  color: var(--c-text); border-bottom: 1px solid var(--c-line-3);
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover { color: var(--c-text); background: #fafbfe; }
.list-row:active { background: var(--c-input); }
.list-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-row-title { font-size: 18px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row-sub { font-size: 15px; color: var(--c-muted); font-weight: 600; }
.avatar {
  flex: 0 0 50px; width: 50px; height: 50px; border-radius: 99px; background: var(--c-primary-soft); color: var(--c-primary);
  display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800;
}
.avatar-lg { flex-basis: 64px; width: 64px; height: 64px; font-size: 24px; }
.avatar-hero { background: rgba(255, 255, 255, .2); color: #fff; }

/* — topo do paciente — */
.pac-hero {
  background: var(--c-primary); color: #fff; padding: 16px 16px 28px; border-radius: 0 0 32px 32px;
  display: flex; flex-direction: column; gap: 18px;
}
.pac-hero-bar { display: flex; justify-content: space-between; align-items: center; }
.hero-btn {
  display: inline-flex; align-items: center; justify-content: center; border: 0; text-decoration: none;
  background: rgba(255, 255, 255, .16); color: #fff; font-size: 16px; font-weight: 700; padding: 12px 16px; border-radius: 14px;
}
.hero-btn:hover { color: #fff; background: rgba(255, 255, 255, .24); }
.hero-btn-icon { width: 48px; height: 48px; padding: 0; border-radius: 16px; font-size: 22px; font-weight: 800; }
.pac-hero-id { display: flex; align-items: center; gap: 16px; }
.pac-hero-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pac-hero-name h1 { font-size: 26px; font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.pac-hero-name div { font-size: 16px; opacity: .9; font-weight: 600; }
.pac-hero-actions { display: flex; gap: 10px; }
.pac-hero-actions .hero-btn { flex: 1; padding: 13px 8px; }

/* — avisos — */
.risk { background: #fff1f1; border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 0 0 1.5px #f4c4c4 inset; }
.risk-title { font-size: 14px; font-weight: 800; color: var(--c-danger-text); text-transform: uppercase; letter-spacing: .06em; }
.risk-text { font-size: 17px; font-weight: 700; color: #7a1d1d; }
.notice {
  background: #fff8e8; border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 0 0 1.5px #f3dca8 inset; font-size: 15px; font-weight: 600; color: #6b4b00;
}
.notice-title { font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.notice .btn { align-self: flex-start; }

/* — cartão de evolução — */
.ev-card { gap: 12px; }
.ev-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ev-when { font-size: 17px; font-weight: 800; }
.ev-by { font-size: 14px; font-weight: 600; color: var(--c-muted); }
.tag-lg { font-size: 14px; font-weight: 700; padding: 6px 12px; text-align: right; white-space: normal; }
.label-caps { font-size: 14px; font-weight: 800; color: var(--c-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: -6px; }
.ev-panel .label-caps { font-size: 13px; margin-bottom: 0; }
.ev-resumo { font-size: 18px; line-height: 1.5; color: var(--c-text); }
.pill-ok { font-size: 15px; font-weight: 700; color: var(--c-ok); background: var(--c-ok-soft); padding: 10px 14px; border-radius: 12px; }
.ev-more > summary { font-size: 15px; font-weight: 700; color: var(--c-muted); padding: 10px 4px; }
.ev-more[open] > summary { color: var(--c-primary); }
.ev-panel { background: #f4f6fa; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ev-panel audio { width: 100%; }
.ev-transcricao { font-size: 16px; line-height: 1.5; color: var(--c-text-2); }
.ev-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; }

/* — confirmação inline (details) — */
.confirm > summary { display: inline-flex; }
.confirm[open] > summary { display: none; }
.confirm-box {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 14px;
  background: #fff5f5; border-radius: 14px;
}
.confirm-text { flex: 1 1 140px; font-size: 15px; font-weight: 700; color: var(--c-danger-dark); }
.confirm-actions { display: flex; gap: 8px; }
.ev-actions .confirm[open] { flex-basis: 100%; }
.confirm-block > summary { display: flex; justify-content: center; }
.link-danger { color: var(--c-danger-text); font-size: 16px; font-weight: 700; padding: 14px; }

/* — gravador — */
.rec {
  background: #fff; border-radius: 26px; padding: 24px 18px; display: flex; flex-direction: column;
  align-items: center; gap: 14px; box-shadow: var(--ring-1); text-align: center;
}
.rec > .alert { width: 100%; }
.rec > .btn-md { padding: 13px 20px; border-radius: 14px; font-size: 16px; }
.rec-state { display: none; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.rec[data-state="idle"] .rec-idle, .rec[data-state="saved"] .rec-idle,
.rec[data-state="recording"] .rec-recording, .rec[data-state="recorded"] .rec-recorded { display: flex; }
.rec-only-saved { display: none; }
.rec[data-state="saved"] .rec-only-saved { display: block; }
.mic {
  width: 112px; height: 112px; border-radius: 99px; border: 0; cursor: pointer; color: #fff;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-primary); box-shadow: 0 10px 28px rgba(29, 95, 224, .4);
}
.mic:active { transform: scale(.96); }
.mic-stop { background: var(--c-danger); box-shadow: none; animation: pulse 1.4s infinite; }
.mic-square { width: 34px; height: 34px; border-radius: 8px; background: #fff; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(210, 58, 58, .5); } 100% { box-shadow: 0 0 0 26px rgba(210, 58, 58, 0); } }
.rec-title { font-size: 19px; font-weight: 800; }
.rec-time { font-size: 32px; font-weight: 800; color: var(--c-danger); }
.rec-hint { font-size: 16px; font-weight: 600; color: var(--c-muted); }
.rec-ok { font-size: 15px; font-weight: 600; color: var(--c-ok); }
.rec-ok-lg { font-size: 17px; font-weight: 800; }
.rec-recorded audio { width: 100%; }
.rec-file { font-size: 15px; font-weight: 700; color: var(--c-primary); cursor: pointer; padding: 6px; }

/* — últimos atendimentos (Início) — */
.recent {
  background: #fff; border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 8px;
  box-shadow: var(--ring-1); text-decoration: none; color: var(--c-text); transition: transform .08s ease;
}
.recent:hover { color: var(--c-text); }
.recent:active { transform: scale(.99); }
.recent-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.recent-name { font-size: 18px; font-weight: 800; }
.recent-when { font-size: 14px; color: var(--c-muted); font-weight: 600; white-space: nowrap; }
.recent-tag { align-self: flex-start; padding: 5px 11px; text-align: left; }
.recent-text {
  font-size: 16px; line-height: 1.45; color: var(--c-text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* — admin: interruptor — */
.ia-state { font-size: 16px; font-weight: 700; color: var(--c-muted); }
.ia-state.is-on { color: var(--c-ok); }
.switch { position: relative; display: inline-flex; cursor: pointer; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  width: 60px; height: 34px; border-radius: 99px; background: #cfd8e6; padding: 4px;
  display: flex; align-items: center; transition: background .15s ease;
}
.switch-thumb { width: 26px; height: 26px; border-radius: 99px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .15s ease; }
.switch input:checked + .switch-track { background: var(--c-ok); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(26px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--c-primary-ring); outline-offset: 2px; }

/* ==========================================================================
   "Outro", editor de categorias, calçado e lembretes de retorno
   ========================================================================== */

/* — título da categoria com botão discreto "Editar" — */
.legend-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 0; margin-bottom: 10px; }
.edit-cat {
  border: 0; background: transparent; color: var(--c-muted-2); cursor: pointer;
  font-size: 14px; font-weight: 700; padding: 6px 8px; border-radius: 10px;
}
.edit-cat:hover { color: var(--c-primary); background: var(--c-primary-soft); }

/* — "Outro": a caixa de texto aparece quando o chip é marcado (só CSS) — */
.chip-outro span { border-style: dashed; }
.outro-field { display: none; }
.fieldset:has(.chip-outro input:checked) .outro-field { display: block; }

.select-lg { height: 60px; font-size: 19px; padding: 0 14px; }
.field-hint { font-size: 14px; font-weight: 600; color: var(--c-muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags .tag-lg { text-align: left; }
.btn-chip-green, .btn-chip-green:hover { background: var(--c-ok-soft); color: var(--c-ok-dark); }

/* — editor de itens — */
.opc-form { display: flex; flex-direction: column; gap: 14px; }
.opc-head { display: flex; align-items: flex-start; gap: 12px; }
.opc-title { font-size: 21px; font-weight: 800; margin-bottom: 4px; }
.opc-list { display: flex; flex-direction: column; gap: 8px; }
.opc-row { display: flex; align-items: center; gap: 8px; }
.opc-nome { flex: 1; min-width: 0; height: 52px; }
.opc-risk {
  display: flex; align-items: center; gap: 6px; flex: 0 0 auto; cursor: pointer;
  font-size: 14px; font-weight: 700; color: var(--c-danger-text);
}
.opc-risk input { width: 18px; height: 18px; accent-color: var(--c-danger); }
.opc-del {
  flex: 0 0 44px; width: 44px; height: 44px; border: 0; border-radius: 12px; cursor: pointer;
  background: #f4f6fa; color: var(--c-muted); font-size: 22px; font-weight: 700;
}
.opc-del:hover { background: var(--c-danger-soft); color: var(--c-danger-text); }
.opc-resumo { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-row-go { color: var(--c-muted-2); font-size: 26px; font-weight: 700; }
.sheet-form { max-height: 88vh; max-height: 88dvh; overflow-y: auto; gap: 14px; }

/* — lembretes de retorno (Início) — */
.retorno {
  background: #fff; border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--ring-1); border-left: 5px solid var(--c-primary);
}
.retorno.is-late { border-left-color: var(--c-danger); }
.retorno-info { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--c-text); }
.retorno-info:hover { color: var(--c-text); }
.retorno-nome { font-size: 18px; font-weight: 800; }
.retorno-quando { font-size: 15px; font-weight: 600; color: var(--c-muted); }
.retorno-quando strong { color: var(--c-primary); }
.retorno.is-late .retorno-quando strong { color: var(--c-danger-text); }
.retorno-acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.retorno-ok { margin-left: auto; }

/* ==========================================================================
   Financeiro (livro caixa) — valores do protótipo (base/ v3)
   ========================================================================== */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* — painel — */
.fin-hero { padding-bottom: 96px; }
.fin-hero-label { font-size: 16px; font-weight: 600; opacity: .85; margin-top: 8px; }
.fin-hero-saldo { font-size: 44px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; overflow-wrap: anywhere; }
.fin-hero-saldo.is-neg { color: #ffd2d2; }
.fin-hero-count { font-size: 15px; opacity: .8; }
.stats.fin-bars { display: flex; flex-direction: column; gap: 16px; margin-top: -72px; padding: 20px; }
.fin-bar { display: flex; flex-direction: column; gap: 8px; }
.fin-bar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.fin-bar-label { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; color: var(--c-text-2); }
.fin-ico { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.fin-ico.is-in { background: var(--c-ok-soft); color: var(--c-ok); }
.fin-ico.is-out { background: var(--c-danger-soft); color: var(--c-danger); }
.fin-bar-valor { font-size: 22px; font-weight: 800; white-space: nowrap; }
.is-in { color: var(--c-ok); }
.is-out { color: var(--c-danger); }
svg.bar { display: block; width: 100%; height: 10px; }
.bar-bg { fill: var(--c-line-3); }
.bar-in { fill: #34d399; }
.bar-out { fill: #fca5a5; }
.quick-card-primary, .quick-card-primary:hover { background: var(--c-primary); color: #fff; box-shadow: var(--shadow-primary); }
.quick-card-icon.is-white { background: rgba(255, 255, 255, .2); color: #fff; font-size: 28px; }
.quick-wide {
  grid-column: 1 / -1; background: #fff; color: var(--c-primary); padding: 18px; border-radius: 18px;
  font-size: 18px; font-weight: 800; text-align: center; text-decoration: none; box-shadow: var(--ring-2);
}
.quick-wide:active { transform: scale(.98); }

/* — gráfico por dia — */
.chart-card { gap: 12px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.chart-title { font-size: 19px; font-weight: 800; }
.chart-legend { display: flex; gap: 14px; font-size: 14px; font-weight: 600; color: var(--c-muted); }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.lg-in { background: #34d399; }
.lg-out { background: #f87171; }
svg.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart-axis { stroke: var(--c-line-2); stroke-width: .6; }
.chart-hit { fill: transparent; }
.chart g:hover .chart-hit { fill: rgba(29, 95, 224, .07); }
.chart-in { fill: #34d399; }
.chart-out { fill: #f87171; }
.chart-label { font-size: 8px; font-weight: 700; fill: var(--c-muted); text-anchor: middle; font-family: 'Manrope', system-ui, sans-serif; }

/* — lançamentos agrupados por dia — */
.lanc-grupo { display: flex; flex-direction: column; gap: 8px; }
.lanc-dia { font-size: 15px; font-weight: 700; color: var(--c-muted); padding: 4px 4px 0; }
.lanc { border-bottom: 1px solid var(--c-line-3); }
.lanc:last-child { border-bottom: 0; }
.lanc-linha { display: flex; align-items: center; gap: 14px; padding: 16px; }
.lanc-icone { flex: 0 0 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; }
.lanc-icone.is-in { background: var(--c-ok-soft); }
.lanc-icone.is-out { background: var(--c-danger-soft); }
.lanc-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lanc-desc { font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.lanc-sub { font-size: 15px; color: var(--c-muted); }
.lanc-valor { font-size: 17px; font-weight: 800; white-space: nowrap; }
.lanc-acoes { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 14px 74px; }
.lanc-acoes .confirm[open] { flex-basis: 100%; }

/* — formulário de lançamento — */
.tipo-row { display: flex; gap: 12px; }
.tipo-btn { flex: 1; position: relative; display: flex; }
.tipo-btn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tipo-btn span {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center;
  padding: 18px 10px; border-radius: 18px; cursor: pointer; font-size: 19px; font-weight: 800;
  background: #fff; color: var(--c-muted); box-shadow: var(--ring-2);
}
.tipo-in input:checked + span { background: var(--c-ok); color: #fff; box-shadow: 0 6px 16px rgba(15, 138, 79, .3); }
.tipo-out input:checked + span { background: var(--c-danger); color: #fff; box-shadow: 0 6px 16px rgba(210, 58, 58, .3); }
.tipo-btn input:focus-visible + span { outline: 3px solid var(--c-primary-ring); outline-offset: 2px; }
.valor-card { padding: 18px 20px; gap: 6px; cursor: text; }
.valor-linha { display: flex; align-items: baseline; gap: 8px; }
.valor-rs { font-size: 26px; font-weight: 800; color: var(--c-muted-2); }
.valor-input {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 0;
  font-size: 44px; font-weight: 800; letter-spacing: -.02em; color: var(--c-ok);
}
.fin-form:has(#tipo-saida:checked) .valor-input { color: var(--c-danger); }
.so-saida { display: none; }
.fin-form:has(#tipo-saida:checked) .so-entrada { display: none; }
.fin-form:has(#tipo-saida:checked) .so-saida { display: inline; }
.select-outline { background: #fff; box-shadow: var(--ring-2); }

/* — consulta — */
.filtros { display: flex; flex-direction: column; gap: 14px; }
.chips-scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chips-scroll .chip { flex: 0 0 auto; }
.periodo-campo { display: none; }
.filtros:has(input[name="periodo"][value="dia"]:checked) .campo-dia,
.filtros:has(input[name="periodo"][value="mes"]:checked) .campo-mes { display: block; }
.filtros:has(input[name="periodo"][value="periodo"]:checked) .campo-periodo { display: grid; }
.seg-radio { position: relative; cursor: pointer; }
.seg-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-radio:has(input:checked) { background: #fff; color: var(--c-text); box-shadow: 0 2px 8px rgba(15, 27, 51, .12); }
.seg-radio:has(input:focus-visible) { outline: 3px solid var(--c-primary-ring); outline-offset: 2px; }
.resumo { gap: 14px; }
.resumo-label { font-size: 15px; font-weight: 700; color: var(--c-muted); }
.resumo-saldo { font-size: 30px; font-weight: 800; color: var(--c-text); overflow-wrap: anywhere; }
.resumo-saldo.is-neg { color: var(--c-danger); }
.resumo-box { border-radius: 16px; padding: 12px 14px; font-size: 14px; font-weight: 700; }
.resumo-box strong { display: block; font-size: 19px; font-weight: 800; overflow-wrap: anywhere; }
.resumo-box.is-in { background: var(--c-ok-soft); color: var(--c-ok-dark); }
.resumo-box.is-out { background: var(--c-danger-soft); color: var(--c-danger-dark); }
.formas { display: flex; flex-direction: column; gap: 2px; }
.formas + .formas { margin-top: 8px; }
.formas-titulo { font-size: 13px; font-weight: 800; color: var(--c-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.formas-linha { display: flex; justify-content: space-between; gap: 10px; font-size: 16px; font-weight: 600; padding: 7px 0; border-bottom: 1px solid var(--c-line-3); }
.formas-linha:last-child { border-bottom: 0; }
.formas-linha strong { white-space: nowrap; }

/* — integrações — */
.stat-link { text-decoration: none; color: inherit; }
.stat-link:hover { color: inherit; }
.stat-value.is-money.is-neg { color: var(--c-danger); }
.link-pagamento { margin-top: -6px; font-size: 15px; }

/* — recebimento no Desenvolvimento Clínico e Pendências — */
.finalizar { gap: 12px; display: flex; flex-direction: column; }
.finalizar-sem { order: 10; } /* 1º no HTML (padrão do Enter), exibido por último */
.valor-linha-sm { background: var(--c-input); border-radius: 16px; padding: 6px 16px; }
.valor-input-sm { font-size: 30px; color: var(--c-text); }
.receb-status { font-size: 15px; font-weight: 700; padding: 10px 14px; border-radius: 12px; }
.receb-status.is-pend { background: #fff4db; color: #8a5a00; }
.receb-status.is-ok { background: var(--c-ok-soft); color: var(--c-ok-dark); }
.receb-paciente { gap: 12px; }
.receb-linha { display: flex; align-items: center; gap: 14px; }
.pend-row { align-items: flex-start; }
.pend-valor { font-size: 17px; font-weight: 800; color: #8a5a00; white-space: nowrap; padding-top: 2px; }
.pend-valor.is-aberto { font-size: 14px; color: var(--c-muted); font-style: italic; }
.pend-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 8px;
  border-radius: 99px; background: #f59e0b; color: #fff; font-size: 14px; font-weight: 800;
}
.quick-wide.has-pend { background: #fff8e8; color: #8a5a00; box-shadow: 0 0 0 1.5px #f3dca8 inset; }
.pend-paciente {
  background: #fff8e8; border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 0 0 1.5px #f3dca8 inset;
}
.pend-paciente-titulo { font-size: 14px; font-weight: 800; color: #8a5a00; text-transform: uppercase; letter-spacing: .06em; }
.pend-paciente-linha { display: flex; align-items: center; gap: 10px; }
.pend-paciente-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pend-paciente-valor { font-size: 18px; font-weight: 800; color: var(--c-text); }
.pend-paciente .btn-chip-green { background: #fff; }
.pend-aviso {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; text-decoration: none;
  background: #fff8e8; color: #6b4b00; box-shadow: 0 0 0 1.5px #f3dca8 inset; font-size: 16px; font-weight: 700;
}
.pend-aviso:hover { color: #6b4b00; }
.pend-aviso-texto { flex: 1; }

/* — usuários e consultórios — */
.tag-neutral { color: var(--c-text-2); background: #eef1f6; }
.list-row.is-off { opacity: .6; }
.user-tags { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.perfis { display: flex; flex-direction: column; gap: 10px; }
.perfil { position: relative; display: flex; cursor: pointer; }
.perfil input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.perfil span {
  flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 16px;
  background: #fff; box-shadow: var(--ring-2);
}
.perfil strong { font-size: 17px; font-weight: 800; }
.perfil small { font-size: 14px; font-weight: 600; color: var(--c-muted); }
.perfil input:checked + span { box-shadow: 0 0 0 2px var(--c-primary) inset; background: var(--c-primary-soft); }
.perfil input:focus-visible + span { outline: 3px solid var(--c-primary-ring); outline-offset: 2px; }
.check-ativo { margin-top: 4px; color: var(--c-text-2); }
.senha-card { gap: 0; }
.senha-summary { display: flex; justify-content: space-between; align-items: center; }
.senha-card[open] .senha-summary { margin-bottom: 14px; }
.senha-form { gap: 14px; }
.card-super { box-shadow: 0 0 0 1.5px var(--c-primary) inset; }

/* ==========================================================================
   Alinhamento geral: ícones SVG, textos em uma linha, campo de data
   ========================================================================== */

/* Ícones SVG sempre centrados (substituem setas/símbolos de texto) */
.ico { display: block; flex-shrink: 0; }
.btn .ico, .hero-btn .ico, .sheet-btn .ico, .quick-wide .ico, .edit-cat .ico, .receb-status .ico,
.pend-paciente-titulo .ico, .rec-ok .ico { display: inline-block; }
.btn-back .ico, .hero-btn-icon .ico { margin-left: -2px; } /* compensação óptica do chevron */
.nav-fab { display: flex; align-items: center; justify-content: center; }
.list-row-go { display: flex; align-items: center; color: var(--c-muted-2); }
.sheet-btn { display: flex; align-items: center; gap: 12px; }
.quick-wide { display: flex; align-items: center; justify-content: center; gap: 8px; }
.edit-cat { display: inline-flex; align-items: center; gap: 5px; }
.receb-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pend-paciente-titulo { display: flex; align-items: center; gap: 6px; }
.rec-ok { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.rec-ok.rec-only-saved { display: none; }
.rec[data-state="saved"] .rec-ok.rec-only-saved { display: block; }
.retorno-acoes { flex-wrap: nowrap; }
.retorno-acoes .btn-chip { padding: 10px 14px; }
.toast-check .ico { stroke-width: 3; }
.senha-chevron { display: flex; color: var(--c-muted); transition: transform .15s ease; }
.senha-card[open] .senha-chevron { transform: rotate(180deg); }

/* Valores que encolhem para caber em uma linha (ajuste fino no app.js) */
[data-fit] { display: block; white-space: nowrap; overflow: hidden; text-overflow: clip; max-width: 100%; }
.stats-money { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr); }
.stat-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.stat { justify-content: space-between; }
.stat-value.is-money { font-size: 20px; padding-top: 0; line-height: 1.5; }
.stat-value { line-height: 1.2; }
.fin-bar-head { min-width: 0; }
.fin-bar-valor { min-width: 0; text-align: right; }

/* Chip "Outro": tracejado fino, mesmo tamanho dos demais */
.chip-outro span { box-shadow: none; border: 1.5px dashed #b9c5d8; padding: 10.5px 16.5px; }
.chip-outro input:checked + span { border-color: var(--c-primary); }

/* Filtros de período: quebram linha em vez de sair da tela */
.chips-scroll { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; gap: 8px; }
.chips-scroll .chip span { padding: 10px 15px; font-size: 16px; }

/* Entrou/Saiu dinheiro em uma linha */
.tipo-btn span { white-space: nowrap; font-size: 16px; gap: 6px; padding: 18px 6px; }

/* Lançamentos: uma linha por informação (texto longo termina em "…") */
.lanc-desc, .lanc-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lanc-desc { overflow-wrap: normal; }

.ev-more > summary { padding: 10px 0; }
.list-row .list-row-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row > .tag, .user-tags { flex-shrink: 0; }
.list-row > .tag { font-size: 12px; padding: 4px 8px; }

/* Botões do "Finalizar atendimento": mesma cor e mesmo tamanho, texto em uma linha */
.btn-finalizar { font-size: 16px; padding: 0 16px; }
.btn-finalizar [data-fit] { text-align: center; }

/* Campo de data: digitar dd/mm/aaaa ou abrir o calendário */
.date-field { position: relative; display: flex; align-items: center; gap: 6px; padding-right: 8px; }
.date-field:focus-within { box-shadow: var(--ring-focus); background: #fff; }
.date-text {
  flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0;
  font: inherit; font-weight: 600; color: inherit; letter-spacing: .01em;
}
.date-text::placeholder { color: var(--c-muted-2); font-weight: 500; }
.date-field.is-invalid { box-shadow: 0 0 0 2px var(--c-danger) inset; }
.date-btn {
  position: relative; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-primary-soft); color: var(--c-primary); overflow: hidden;
}
.date-native {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
  border: 0; padding: 0; margin: 0; font-size: 16px;
}
.date-native::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; opacity: 0; cursor: pointer; }
.date-field.periodo-campo { display: none; } /* filtros da consulta: só aparece no período escolhido */
.filtros:has(input[name="periodo"][value="dia"]:checked) .campo-dia { display: flex; }

/* — relatório (tela e impressão) — */
.print-page { background: #fff; }
.rel-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; max-width: 900px; margin: 0 auto; padding: 16px; }
.rel { max-width: 900px; margin: 0 auto; padding: 0 16px 32px; font-size: 14px; color: var(--c-text); }
.rel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 2px solid var(--c-text); padding-bottom: 12px; margin-bottom: 16px; }
.rel-clinica { font-size: 13px; font-weight: 800; color: var(--c-muted); text-transform: uppercase; letter-spacing: .06em; }
.rel-titulo { font-size: 26px; font-weight: 800; }
.rel-periodo { font-size: 15px; font-weight: 600; }
.rel-gerado { font-size: 12px; color: var(--c-muted); text-align: right; }
.rel-totais { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.rel-totais div { border: 1px solid var(--c-line-2); border-radius: 10px; padding: 10px 12px; }
.rel-totais span { display: block; font-size: 12px; font-weight: 700; color: var(--c-muted); text-transform: uppercase; }
.rel-totais strong { font-size: 18px; font-weight: 800; }
.rel-formas { display: flex; gap: 16px; flex-wrap: wrap; }
.rel-tabela { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.rel-tabela caption { text-align: left; font-size: 14px; font-weight: 800; padding: 6px 0; }
.rel-tabela th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); border-bottom: 2px solid var(--c-line-2); padding: 8px 6px; }
.rel-tabela td { padding: 7px 6px; border-bottom: 1px solid var(--c-line-3); vertical-align: top; }
.rel-tabela .num { text-align: right; white-space: nowrap; }
.rel-tabela-sm { width: auto; min-width: 260px; }
.rel-vazio { text-align: center; color: var(--c-muted); padding: 20px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  @page { size: A4; margin: 14mm; }
  [data-noprint] { display: none !important; }
  body { background: #fff; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rel { max-width: none; padding: 0; }
  .rel-tabela thead { display: table-header-group; }
  .rel-tabela tr { break-inside: avoid; }
}
