/* Clínica Dra. Carolina Segura Simões · identidade visual
   Paleta: marfim, champanhe e mocha. Tipografia: Cormorant Garamond (títulos) e Manrope (interface). */

:root {
  --bg: #F6F1EB;
  --bg-2: #EEE6DC;
  --surface: #FFFFFF;
  --surface-2: #FBF8F4;
  --surface-3: #F4EEE7;
  --line: #E8DED3;
  --line-2: #D8CABB;
  --ink: #2A211D;
  --ink-2: #5A4D46;
  --muted: #8D7E74;
  --gold: #B08968;
  --gold-2: #8F6A4B;
  --gold-3: #D9BC9C;
  --gold-soft: #F4EADF;
  --mocha: #231B18;
  --mocha-2: #34281F;
  --red: #C8372D;
  --red-2: #A52A22;
  --red-soft: #FBE8E5;
  --green: #3D7A57;
  --green-soft: #E4F1E8;
  --amber: #A86F14;
  --amber-soft: #FAF0DC;
  --blue: #4A6A85;
  --blue-soft: #E7EEF5;
  --wa: #1E9E57;
  --wa-soft: #E2F4EA;
  --shadow-sm: 0 1px 2px rgba(42, 33, 29, .06), 0 1px 3px rgba(42, 33, 29, .05);
  --shadow: 0 10px 28px -12px rgba(42, 33, 29, .22), 0 2px 6px rgba(42, 33, 29, .05);
  --shadow-lg: 0 30px 70px -24px rgba(35, 27, 24, .45);
  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 22px;
  --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --sidebar-w: 268px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14100E; --bg-2: #1B1613; --surface: #201A17; --surface-2: #262019; --surface-3: #2C251F;
    --line: #362C25; --line-2: #4A3D33; --ink: #F3EAE2; --ink-2: #CFC0B4; --muted: #9C8B7F;
    --gold: #D0A882; --gold-2: #E4C2A0; --gold-3: #8A6A50; --gold-soft: #33271E;
    --red: #E5574C; --red-2: #F07A70; --red-soft: #3A1D1A; --green: #6CB78A; --green-soft: #1B2E23;
    --amber: #E0A54A; --amber-soft: #352A18; --blue: #8DB0CC; --blue-soft: #1C2731; --wa: #3CC57A; --wa-soft: #17301F;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 12px 30px -12px rgba(0,0,0,.6); --shadow-lg: 0 30px 70px -20px rgba(0,0,0,.75);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14100E; --bg-2: #1B1613; --surface: #201A17; --surface-2: #262019; --surface-3: #2C251F;
  --line: #362C25; --line-2: #4A3D33; --ink: #F3EAE2; --ink-2: #CFC0B4; --muted: #9C8B7F;
  --gold: #D0A882; --gold-2: #E4C2A0; --gold-3: #8A6A50; --gold-soft: #33271E;
  --red: #E5574C; --red-2: #F07A70; --red-soft: #3A1D1A; --green: #6CB78A; --green-soft: #1B2E23;
  --amber: #E0A54A; --amber-soft: #352A18; --blue: #8DB0CC; --blue-soft: #1C2731; --wa: #3CC57A; --wa-soft: #17301F;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 12px 30px -12px rgba(0,0,0,.6); --shadow-lg: 0 30px 70px -20px rgba(0,0,0,.75);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body, #app { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button, a, label, input, select { touch-action: manipulation; }
button { cursor: pointer; }
a { color: var(--gold-2); }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.ic { width: 18px; height: 18px; flex: none; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: var(--gold-3); color: var(--mocha); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 9px; border: 2px solid transparent; background-clip: padding-box; }

.boot { height: 100%; display: grid; place-items: center; background: var(--mocha); }
.boot-mark { font-family: var(--serif); font-size: 42px; color: var(--gold-3); letter-spacing: 4px; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }

/* ---------- monograma ---------- */
.mono {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: 0;
  color: #F0DCC4;
  background: radial-gradient(circle at 30% 25%, #4A3A30, #1D1613 70%);
  box-shadow: inset 0 0 0 1.5px rgba(217, 188, 156, .65), 0 6px 16px -6px rgba(0,0,0,.6);
}
.mono.lg { width: 88px; height: 88px; font-size: 44px; letter-spacing: 0; }

/* ---------- login ---------- */
.login { display: grid; grid-template-columns: 1.05fr 1fr; height: 100%; overflow: auto; }
.login-hero {
  position: relative; overflow: hidden; color: #F3E6D8;
  background:
    radial-gradient(1200px 600px at 110% -10%, rgba(214, 178, 140, .28), transparent 60%),
    radial-gradient(800px 500px at -20% 110%, rgba(176, 137, 104, .25), transparent 60%),
    linear-gradient(160deg, #2C221D 0%, #191311 100%);
  display: flex; align-items: center; padding: 64px;
}
.login-hero::after {
  content: ''; position: absolute; inset: 28px; border: 1px solid rgba(217, 188, 156, .18); border-radius: 28px; pointer-events: none;
}
.hero-inner { position: relative; max-width: 520px; z-index: 1; }
.hero-inner h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 4.2vw, 56px); line-height: 1.04; margin: 18px 0 18px; letter-spacing: -.5px; }
.hero-inner h1 em { font-style: italic; color: #E2C3A0; }
.hero-copy { color: #CDBCAC; font-size: 16px; max-width: 440px; }
.hero-points { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 14px; }
.hero-points li { display: flex; gap: 12px; align-items: center; color: #E6D6C6; font-size: 14.5px; }
.hero-points li::before { content: ''; width: 22px; height: 1px; background: linear-gradient(90deg, #D9BC9C, transparent); }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: 11px; font-weight: 700; color: var(--gold); }
.eyebrow.light { color: #D9BC9C; margin-top: 30px; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg); }
.login-card { width: 100%; max-width: 460px; }
.login-card h2 { font-family: var(--serif); font-size: 34px; font-weight: 600; }
.login-card > .muted { margin: 4px 0 26px; }
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.user-pick {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding: 18px 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.user-pick:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.user-pick.selected { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft), var(--shadow); }
.user-pick strong { font-size: 14px; }
.user-pick small { color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.pin-form { margin-top: 22px; display: grid; gap: 14px; }
.pin-form input { font-size: 16px; }
.form-error { color: var(--red); font-size: 13px; min-height: 18px; text-align: center; }
.demo-note { margin-top: 14px; font-size: 12.5px; color: var(--muted); text-align: center; padding: 10px 14px; border-radius: 12px; background: var(--surface-3); }

/* ---------- avatar ---------- */
.av {
  --c: var(--gold);
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  color: #fff; background: var(--c);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.18);
}
.av.xs { width: 20px; height: 20px; font-size: 9px; }
.av.sm { width: 26px; height: 26px; font-size: 10px; }
.av.lg { width: 54px; height: 54px; font-size: 18px; }
.av.doctor { background: linear-gradient(135deg, #CFA77F, #8F6A4B); font-family: var(--serif); font-size: 13px; letter-spacing: .06em; }
.av.lg.doctor { font-size: 22px; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100%; }
.sidebar {
  background: linear-gradient(180deg, #2A201B 0%, #1A1411 100%);
  color: #E9DACB; display: flex; flex-direction: column; padding: 22px 16px 16px; min-height: 0;
  border-right: 1px solid rgba(217, 188, 156, .08);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; border-bottom: 1px solid rgba(217, 188, 156, .12); }
.brand-name { font-family: var(--serif); font-size: 19px; font-weight: 600; line-height: 1.1; color: #F6E9DB; }
.brand-sub { font-size: 11px; color: #B49C88; letter-spacing: .04em; margin-top: 2px; }
.nav { display: grid; gap: 3px; margin-top: 18px; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em; color: #8E7766; padding: 14px 12px 6px; font-weight: 700; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  background: transparent; border: 0; color: #CDB9A7; text-align: left; font-weight: 600; font-size: 14px;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, .05); color: #F6E9DB; }
.nav-item.active { background: linear-gradient(90deg, rgba(217, 188, 156, .2), rgba(217, 188, 156, .05)); color: #FFF3E6; }
.nav-item.active::before { content: ''; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: #D9BC9C; }
.nav-item .ic { opacity: .9; }
.nav-badge, .count-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: none; place-items: center;
  box-shadow: 0 0 0 2px rgba(0,0,0,.15);
}
.nav-badge.on, .count-badge.on { display: inline-grid; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(217, 188, 156, .12); display: grid; gap: 10px; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.me-card strong { display: block; font-size: 13.5px; color: #F6E9DB; }
.me-card small { color: #A8907C; font-size: 11.5px; }
.me-card .icon-btn { margin-left: auto; color: #CDB9A7; }
.me-card .icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-meta { font-size: 11px; color: #8E7766; padding: 0 8px; display: flex; align-items: center; gap: 8px; }

.main-wrap { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 14px 28px; min-height: 68px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); position: relative; z-index: 20;
}
.topbar .m-brand { display: none; }
.search { position: relative; flex: 1; max-width: 520px; }
.search input {
  width: 100%; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  padding: 0 16px 0 42px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.search input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.search > .ic { position: absolute; left: 15px; top: 12px; color: var(--muted); }
.search kbd { position: absolute; right: 12px; top: 10px; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; background: var(--surface-2); font-family: var(--sans); }
.search-results {
  position: absolute; top: 50px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 70vh; overflow: auto; padding: 8px; display: none;
}
.search-results.open { display: block; }
.sr-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); padding: 10px 10px 4px; font-weight: 700; }
.sr-item { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border-radius: 10px; border: 0; background: none; text-align: left; }
.sr-item:hover, .sr-item:focus { background: var(--surface-3); outline: none; }
.sr-item small { display: block; color: var(--muted); font-size: 12px; }
.sr-item .pill { margin-left: auto; }
.sr-empty { padding: 18px; text-align: center; color: var(--muted); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.live.on i { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); animation: pulse-dot 2s infinite; }
.live.on { color: var(--green); }
@keyframes pulse-dot { 50% { box-shadow: 0 0 0 7px transparent; } }
.demo-chip { font-size: 11.5px; font-weight: 700; color: var(--amber); background: var(--amber-soft); padding: 6px 12px; border-radius: 999px; }
.top-btn { position: relative; }
.top-btn .count-badge { position: absolute; top: -4px; right: -4px; margin: 0; }

.view { flex: 1; overflow: auto; padding: 28px 28px 40px; min-height: 0; }
.view.no-pad { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.view-head h1 { font-family: var(--serif); font-size: 38px; font-weight: 600; letter-spacing: -.3px; line-height: 1.05; margin-top: 4px; }
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 700; font-size: 13.5px; text-decoration: none; color: inherit;
  transition: transform .12s, box-shadow .15s, background .15s, border-color .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--gold-3); box-shadow: var(--shadow-sm); }
.btn:active { filter: brightness(.94); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, #3A2C24, #231B18); color: #F6E6D3; border-color: #231B18; box-shadow: 0 8px 18px -10px rgba(35,27,24,.8); }
.btn-primary:hover { border-color: #231B18; box-shadow: 0 10px 22px -10px rgba(35,27,24,.9); }
:root[data-theme="dark"] .btn-primary { background: linear-gradient(180deg, #D7B18C, #B08968); color: #1D1512; border-color: #B08968; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { background: linear-gradient(180deg, #D7B18C, #B08968); color: #1D1512; border-color: #B08968; } }
.btn-gold { background: linear-gradient(180deg, #C9A07A, #A27A59); color: #fff; border-color: #9A7353; box-shadow: 0 10px 22px -12px rgba(150, 110, 75, .9); }
.btn-gold:hover { border-color: #8F6A4B; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); box-shadow: none; border-color: transparent; }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: var(--red-2); border-color: var(--red-2); }
.btn-danger-ghost { background: transparent; color: var(--red); border-color: transparent; }
.btn-danger-ghost:hover { background: var(--red-soft); border-color: transparent; box-shadow: none; }
.btn-wa { background: var(--wa-soft); color: var(--wa); border-color: transparent; }
.btn-wa:hover { border-color: var(--wa); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.btn-block { width: 100%; height: 48px; font-size: 15px; }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 11px; border: 0;
  background: transparent; color: var(--ink-2); transition: background .15s, color .15s; flex: none;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 9px; }
.icon-btn.sm .ic { width: 16px; height: 16px; }
.icon-btn.boxed { background: var(--surface); border: 1px solid var(--line); }
.icon-btn.on { color: var(--green); background: var(--green-soft); }

.field { display: grid; gap: 6px; }
.field > span { font-size: 12px; font-weight: 700; color: var(--ink-2); letter-spacing: .02em; }
.field small.hint { color: var(--muted); font-size: 11.5px; }
.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea, select.input {
  width: 100%; min-height: 42px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface);
  padding: 10px 13px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stack { display: grid; gap: 16px; }
.toggles { display: flex; flex-wrap: wrap; gap: 10px; }
.toggle {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface); font-weight: 600; font-size: 13px; cursor: pointer; user-select: none;
}
.toggle input { accent-color: var(--gold-2); width: 16px; height: 16px; }
.toggle:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.toggle.t-urgent:has(input:checked) { border-color: var(--red); background: var(--red-soft); color: var(--red); }

.switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13px; color: var(--ink-2); cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch span { width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .2s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.switch input:checked + span { background: var(--gold); }
.switch input:checked + span::after { transform: translateX(16px); }

.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--line); gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 13px; border-radius: 9px; font-weight: 700; font-size: 12.5px; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--green-soft); color: var(--green); }
.pill.warn { background: var(--amber-soft); color: var(--amber); }
.pill.bad { background: var(--red-soft); color: var(--red); }
.pill.gold { background: var(--gold-soft); color: var(--gold-2); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }

/* ---------- indicadores ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.stat::after { content: ''; position: absolute; right: -24px; top: -24px; width: 90px; height: 90px; border-radius: 50%; background: var(--tone, var(--gold-soft)); opacity: .7; }
.stat small { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); position: relative; z-index: 1; }
.stat strong { display: block; font-family: var(--serif); font-size: 36px; line-height: 1.1; margin-top: 4px; position: relative; z-index: 1; }
.stat span { font-size: 12.5px; color: var(--ink-2); position: relative; z-index: 1; }
.stat.red { --tone: var(--red-soft); } .stat.red strong { color: var(--red); }
.stat.amber { --tone: var(--amber-soft); }
.stat.green { --tone: var(--green-soft); }

/* ---------- Kanban ---------- */
.board { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; scroll-snap-type: x proximity; min-height: 420px; }
.column {
  flex: 0 0 292px; width: 292px; min-width: 0; display: flex; flex-direction: column; max-height: calc(100vh - 290px); min-height: 220px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); scroll-snap-align: start;
  transition: box-shadow .15s, transform .15s, opacity .15s;
}
.column.is-dragging-col { opacity: .45; }
.column.col-drop { box-shadow: 0 0 0 2px var(--gold), var(--shadow); }
.col-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 12px 12px 16px; border-bottom: 1px solid var(--line); cursor: grab; user-select: none;
}
.col-head:active { cursor: grabbing; }
.col-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); flex: none; }
.col-title { min-width: 0; flex: 1; overflow: hidden; }
.col-title h3 { font-size: 14.5px; font-weight: 800; }
.col-title small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-count { margin-left: 4px; font-size: 12px; font-weight: 800; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; }
.col-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; flex: 1; min-height: 80px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); transition: background .15s; }
.col-body.card-drag-hover { background: var(--gold-soft); }
.col-empty { text-align: center; color: var(--muted); font-size: 12.5px; padding: 26px 10px; border: 1.5px dashed var(--line-2); border-radius: 14px; }
.col-empty .ic { display: block; margin: 0 auto 6px; opacity: .6; }
.card-placeholder { height: 64px; border-radius: 14px; border: 2px dashed var(--gold); background: color-mix(in srgb, var(--gold-soft) 60%, transparent); flex: none; }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 13px 10px;
  box-shadow: var(--shadow-sm); cursor: grab; transition: box-shadow .16s, transform .16s, border-color .16s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-1px); border-color: var(--line-2); }
.card.is-dragging-card { opacity: .4; transform: rotate(1.5deg); }
.card.is-pinned { border-color: var(--gold-3); background: linear-gradient(180deg, var(--gold-soft), var(--surface) 42%); }
.card.is-urgent { border-color: color-mix(in srgb, var(--red) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--red) 35%, transparent), 0 8px 22px -10px color-mix(in srgb, var(--red) 60%, transparent); animation: urgent-glow 1.8s ease-in-out infinite; }
.card.is-urgent::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
@keyframes urgent-glow {
  0%, 100% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--red) 35%, transparent), 0 8px 22px -10px color-mix(in srgb, var(--red) 60%, transparent); }
  50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 18%, transparent), 0 10px 28px -8px color-mix(in srgb, var(--red) 70%, transparent); }
}
.card.is-overdue { animation: overdue-shake 3.2s ease-in-out infinite; border-color: var(--amber); }
.card.is-overdue.is-urgent { animation: overdue-shake 3.2s ease-in-out infinite, urgent-glow 1.8s ease-in-out infinite; }
@keyframes overdue-shake {
  0%, 82%, 100% { transform: translateX(0); }
  84% { transform: translateX(-3px) rotate(-.4deg); } 86% { transform: translateX(3px) rotate(.4deg); }
  88% { transform: translateX(-3px) rotate(-.4deg); } 90% { transform: translateX(3px) rotate(.4deg); } 92% { transform: translateX(0); }
}
.card.is-done { opacity: .62; }
.card.is-done .card-title { text-decoration: line-through; text-decoration-color: var(--muted); }
.card-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.card-badges:empty { display: none; }
.badge { font-size: 10.5px; font-weight: 800; letter-spacing: .03em; padding: 3px 8px; border-radius: 7px; background: var(--surface-3); color: var(--ink-2); }
.badge-urgent { background: var(--red); color: #fff; }
.badge-pin { background: var(--gold-soft); color: var(--gold-2); }
.badge-late { background: var(--amber-soft); color: var(--amber); }
.badge-pos { background: var(--blue-soft); color: var(--blue); }
.badge-auto { background: var(--green-soft); color: var(--green); }
.card-title { font-size: 14px; font-weight: 700; line-height: 1.35; }
.card-desc { font-size: 12.8px; color: var(--ink-2); margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.checklist { list-style: none; margin: 10px 0 2px; padding: 0; display: grid; gap: 5px; }
.checklist li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.8px; }
.checklist li.done span { color: var(--muted); text-decoration: line-through; }
.chk { appearance: none; -webkit-appearance: none; width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid var(--line-2); background: var(--surface); flex: none; margin: 1px 0 0; cursor: pointer; display: grid; place-items: center; transition: background .15s, border-color .15s; }
.chk:checked { background: var(--green); border-color: var(--green); }
.chk:checked::after { content: ''; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.progress { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--green)); border-radius: 4px; transition: width .3s; }
.card-foot { display: flex; align-items: center; flex-wrap: wrap; row-gap: 6px; gap: 4px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.card-foot .who { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); font-weight: 600; min-width: 0; }
.card-foot .spacer { flex: 1; }
.due { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: var(--surface-3); color: var(--ink-2); margin-left: 6px; white-space: nowrap; }
.due.today { background: var(--gold-soft); color: var(--gold-2); }
.due.late { background: var(--amber-soft); color: var(--amber); }
.wa-btn { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 9px; background: var(--wa-soft); color: var(--wa); font-size: 12px; font-weight: 800; text-decoration: none; transition: filter .15s; }
.wa-btn:hover { filter: brightness(.95); }
.wa-btn .ic { width: 15px; height: 15px; }
.att-count { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); padding: 0 4px; }
.att-count .ic { width: 14px; height: 14px; }

/* ---------- fichas ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ficha-list { display: grid; gap: 12px; }
.ficha {
  display: grid; grid-template-columns: 86px 1fr auto; gap: 18px; align-items: center; padding: 16px 20px 16px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  cursor: pointer; transition: box-shadow .16s, transform .16s, border-color .16s; text-align: left; width: 100%;
}
.ficha:hover { box-shadow: var(--shadow); transform: translateY(-1px); border-color: var(--line-2); }
.ficha-time { text-align: center; padding: 10px 6px; border-radius: 13px; background: var(--surface-3); }
.ficha-time strong { display: block; font-family: var(--serif); font-size: 26px; line-height: 1; }
.ficha-time span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.ficha.is-taxed .ficha-time { background: var(--green-soft); color: var(--green); }
.ficha-main h3 { font-family: var(--serif); font-size: 23px; font-weight: 600; line-height: 1.15; }
.ficha-main p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.ficha-side { display: grid; justify-items: end; gap: 8px; }
.ficha-side .total { font-family: var(--serif); font-size: 21px; font-weight: 600; }
.ficha-icons { display: flex; gap: 6px; color: var(--muted); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius-lg); }
.empty h3 { font-family: var(--serif); font-size: 26px; color: var(--ink); margin-bottom: 6px; }

.detail-head { display: flex; gap: 16px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.detail-head h3 { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.1; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.kv { background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; padding: 11px 13px; }
.kv small { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.kv strong { font-size: 14.5px; }
.section { margin-bottom: 18px; }
.section h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--gold-2); font-weight: 800; margin-bottom: 8px; }
.prose { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px; font-size: 14px; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; font-size: 13.5px; }
.table th { background: var(--surface-3); text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); padding: 10px 13px; font-weight: 800; }
.table td { padding: 10px 13px; border-top: 1px solid var(--line); vertical-align: top; }
.table tfoot td { font-weight: 800; background: var(--surface-2); }
.table .num { text-align: right; white-space: nowrap; }
.taxed-stamp {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(90deg, var(--green-soft), transparent); border: 1px solid color-mix(in srgb, var(--green) 30%, transparent);
}
.taxed-stamp .seal { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; flex: none; }
.taxed-stamp strong { display: block; color: var(--green); }

.proc-picker { display: grid; gap: 8px; }
.proc-row { display: grid; grid-template-columns: auto 1fr 130px; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.proc-row:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.proc-row .proc-name { font-weight: 600; font-size: 13.5px; }
.proc-row .proc-name small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.proc-row input[type=number] { min-height: 36px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); text-align: right; width: 100%; }
.proc-total { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--surface-3); font-weight: 700; }
.proc-total strong { font-family: var(--serif); font-size: 22px; }

.recorder { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.recorder audio { flex: 1; min-width: 200px; height: 38px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: blink 1s infinite; flex: none; }
@keyframes blink { 50% { opacity: .2; } }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 15px; }

.attach-list { display: flex; flex-wrap: wrap; gap: 10px; }
.attach {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); max-width: 260px; font-size: 12.5px; text-decoration: none; color: var(--ink);
}
.attach img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.attach .file-ic { width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.attach span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach .x { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: 12px; }
.attach-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.check-editor { display: grid; gap: 6px; }
.check-editor .row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.check-editor .row input[type=text] { flex: 1; border: 0; background: transparent; outline: none; min-height: 28px; }
.check-add { display: flex; gap: 8px; }
.check-add input { flex: 1; }

.history { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.history li { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--ink-2); }
.history li::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; }
details.more summary { cursor: pointer; font-weight: 700; font-size: 12.5px; color: var(--ink-2); list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: '›'; display: inline-block; margin-right: 8px; transition: transform .2s; }
details.more[open] summary::before { transform: rotate(90deg); }
details.more > div { margin-top: 10px; }

/* ---------- chat ---------- */
.chat { display: grid; grid-template-columns: 290px 1fr; height: 100%; min-height: 0; }
.chat-channels { border-right: 1px solid var(--line); background: var(--surface-2); overflow-y: auto; padding: 22px 14px; }
.chat-channels h2 { font-family: var(--serif); font-size: 30px; padding: 0 8px 14px; }
.channel { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px; border-radius: 13px; border: 0; background: none; text-align: left; transition: background .15s; }
.channel:hover { background: var(--surface-3); }
.channel.on { background: var(--surface); box-shadow: var(--shadow-sm); }
.channel strong { display: block; font-size: 13.5px; }
.channel small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.channel .count-badge { margin-left: auto; }
.ch-all { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--mocha); color: var(--gold-3); flex: none; }
.chat-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.chat-head .title { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.chat-head strong { font-size: 15.5px; }
.chat-head small { display: block; color: var(--muted); font-size: 12px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 8px; min-height: 0;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--line-2) 55%, transparent) 1px, transparent 0); background-size: 22px 22px; }
.day-sep { align-self: center; font-size: 11.5px; font-weight: 800; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 3px 12px; border-radius: 999px; margin: 8px 0; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: min(640px, 82%); position: relative; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 5px; padding: 8px 12px 6px; box-shadow: var(--shadow-sm); min-width: 90px; }
.msg.mine .bubble { background: linear-gradient(180deg, #3A2C24, #2A201B); color: #F6E9DB; border-color: transparent; border-radius: 16px 16px 5px 16px; }
.msg.mine .bubble a { color: #E8C9A6; }
.msg-author { font-size: 11.5px; font-weight: 800; margin-bottom: 2px; }
.msg-text { white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.msg-meta { font-size: 10.5px; opacity: .6; text-align: right; margin-top: 3px; }
.bubble audio { display: block; width: 260px; max-width: 100%; height: 38px; margin: 4px 0; }
.bubble .attach-list { margin: 6px 0 2px; }
.bubble img.photo { display: block; max-width: 280px; max-height: 280px; border-radius: 11px; margin: 4px 0; cursor: zoom-in; }
.msg-del { opacity: 0; border: 0; background: var(--surface); border-radius: 8px; width: 28px; height: 28px; display: grid; place-items: center; color: var(--red); box-shadow: var(--shadow-sm); transition: opacity .15s; }
.msg:hover .msg-del { opacity: 1; }
.chat-empty { margin: auto; text-align: center; color: var(--muted); }
.chat-empty .mono { margin: 0 auto 12px; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.composer textarea { flex: 1; resize: none; max-height: 140px; min-height: 42px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-2); padding: 10px 14px; outline: none; line-height: 1.45; }
.composer textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.composer .send { width: 42px; height: 42px; border-radius: 13px; padding: 0; }
.rec-bar { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--red-soft); }
.rec-bar[hidden] { display: none; }
.rec-bar .grow { flex: 1; font-weight: 600; color: var(--red); font-size: 13px; }
.drop-overlay { position: absolute; inset: 10px; border: 2.5px dashed var(--gold); border-radius: 22px; background: color-mix(in srgb, var(--gold-soft) 88%, transparent); display: none; place-items: center; z-index: 5; font-family: var(--serif); font-size: 28px; color: var(--gold-2); pointer-events: none; }
.chat-main.dragging .drop-overlay { display: grid; }

/* ---------- rotinas ---------- */
.rotina-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.ring-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; text-align: center; box-shadow: var(--shadow-sm); position: sticky; top: 0; }
.ring { width: 170px; height: 170px; margin: 0 auto 12px; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .txt { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; }
.ring .txt strong { font-family: var(--serif); font-size: 44px; line-height: 1; }
.ring .txt small { color: var(--muted); font-size: 12px; font-weight: 700; }
.rotina-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rotina { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-sm); transition: background .2s; }
.rotina.done { background: var(--surface-2); }
.rotina.done strong { color: var(--muted); text-decoration: line-through; }
.rotina > div { flex: 1; min-width: 0; }
.rotina strong { display: block; font-size: 14.5px; }
.rotina small { color: var(--muted); font-size: 12px; }
.rotina.done small { color: var(--green); font-weight: 600; }
.big-chk { width: 26px; height: 26px; border-radius: 8px; }
.big-chk:checked::after { width: 12px; height: 6px; }

/* ---------- biblioteca ---------- */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.lib-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; }
.lib-card h3 { font-family: var(--serif); font-size: 22px; line-height: 1.15; }
.lib-card .price { font-weight: 800; color: var(--gold-2); }
.lib-card .row { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.lib-card audio { width: 100%; height: 38px; }
.lib-card .quote { font-size: 13px; color: var(--ink-2); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; border-left: 3px solid var(--gold); max-height: 120px; overflow: auto; white-space: pre-wrap; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 30px 0 14px; }
.section-title h2 { font-family: var(--serif); font-size: 28px; }

/* ---------- auditoria ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--gold); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: auto; }
.panel .table { border: 0; border-radius: 0; }
.panel-pad { padding: 20px; }
.admin-note { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 14px; background: var(--gold-soft); color: var(--gold-2); font-size: 13px; font-weight: 600; margin-bottom: 16px; }

/* ---------- modais ---------- */
#modal-root { position: relative; z-index: 100; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(20, 14, 12, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity .18s; }
.modal-backdrop.open { opacity: 1; }
.modal-backdrop.closing { opacity: 0; }
.modal { width: 100%; max-width: 620px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg); transform: translateY(10px) scale(.985); transition: transform .2s; border: 1px solid var(--line); }
.modal-backdrop.open .modal { transform: none; }
.modal.sm { max-width: 480px; }
.modal.lg { max-width: 820px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px 24px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-family: var(--serif); font-size: 26px; font-weight: 600; flex: 1; line-height: 1.15; }
.modal-body { padding: 20px 24px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; gap: 10px; padding: 14px 20px 16px 24px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 22px 22px; flex-wrap: wrap; }
.modal-foot .grow { flex: 1; }

.delete-banner { padding: 16px 18px; border-radius: 14px; background: var(--red-soft); border: 1px solid color-mix(in srgb, var(--red) 40%, transparent); color: var(--red); margin-bottom: 16px; }
.delete-banner strong { display: block; font-size: 13.5px; letter-spacing: .02em; margin-bottom: 6px; }
.delete-banner em { display: block; font-size: 13px; line-height: 1.55; color: color-mix(in srgb, var(--red) 82%, var(--ink)); }

.camera { position: relative; background: #000; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.camera video { width: 100%; height: 100%; object-fit: contain; }
.cam-res { position: absolute; top: 10px; left: 10px; font-size: 11.5px; font-weight: 800; color: #fff; background: rgba(0,0,0,.5); padding: 3px 9px; border-radius: 999px; }
.lightbox { max-width: 100%; max-height: 75vh; display: block; margin: 0 auto; border-radius: 12px; }

/* ---------- alertas e toasts ---------- */
#alert-root { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 10px; width: min(680px, calc(100vw - 24px)); }
.upstairs {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px 14px 18px; border-radius: 18px; color: #fff;
  background: linear-gradient(110deg, #B42318, #D93A2B 55%, #B42318); background-size: 200% 100%;
  box-shadow: 0 18px 40px -14px rgba(180, 35, 24, .75); animation: alert-in .35s cubic-bezier(.2,.9,.3,1.2), alert-shine 2.4s linear infinite;
}
.upstairs .bell { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; flex: none; animation: ring 1.2s ease-in-out infinite; }
.upstairs strong { display: block; font-size: 15px; }
.upstairs small { opacity: .9; font-size: 12.5px; }
.upstairs .grow { flex: 1; }
.upstairs button { background: rgba(255,255,255,.18); border: 0; color: #fff; border-radius: 10px; height: 34px; padding: 0 12px; font-weight: 700; }
@keyframes alert-in { from { transform: translateY(-30px); opacity: 0; } }
@keyframes alert-shine { to { background-position: -200% 0; } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-14deg); } 20%, 40% { transform: rotate(14deg); } 50% { transform: rotate(0); } }
#toast-root { position: fixed; bottom: 22px; right: 22px; z-index: 300; display: grid; gap: 10px; justify-items: end; }
.toast { display: flex; align-items: center; gap: 12px; background: var(--mocha); color: #F3E6D8; padding: 12px 14px 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 13.5px; font-weight: 600; max-width: 380px; animation: toast-in .25s ease-out; }
.toast.bad { background: var(--red); color: #fff; }
.toast button { background: rgba(255,255,255,.14); border: 0; color: inherit; border-radius: 9px; height: 30px; padding: 0 10px; font-weight: 800; }
@keyframes toast-in { from { transform: translateY(14px); opacity: 0; } }

.menu { position: absolute; top: 52px; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 220px; display: none; z-index: 40; }
.menu.open { display: block; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 10px 12px; border-radius: 10px; text-align: left; font-weight: 600; }
.menu button:hover { background: var(--surface-3); }
.rel { position: relative; }

.bottom-nav { display: none; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .rotina-wrap { grid-template-columns: 1fr; }
  .ring-card { position: static; display: flex; align-items: center; gap: 20px; text-align: left; }
  .ring { width: 110px; height: 110px; margin: 0; }
  .ring .txt strong { font-size: 30px; }
}
@media (max-width: 860px) {
  body { font-size: 15px; }
  .login { grid-template-columns: 1fr; }
  .login-hero { padding: 40px 28px 34px; }
  .login-hero::after { inset: 12px; }
  .hero-points { display: none; }
  .hero-inner h1 { font-size: 34px; margin: 10px 0; }
  .eyebrow.light { margin-top: 18px; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); gap: 10px; min-height: 60px; }
  .topbar .m-brand { display: flex; }
  .topbar .m-brand .mono { width: 36px; height: 36px; font-size: 15px; }
  .search kbd, .live span, .demo-chip { display: none; }
  .live { padding: 9px; }
  .view { padding: 18px 14px calc(96px + env(safe-area-inset-bottom)); }
  .view.no-pad { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .view-head h1 { font-size: 31px; }
  .stats { gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat strong { font-size: 26px; }
  .stat span { display: none; }
  .stat small { font-size: 10px; }
  .head-actions { width: 100%; justify-content: space-between; }
  .board { margin: 0 -14px; padding: 0 14px 14px; scroll-snap-type: x mandatory; gap: 12px; }
  .column { flex-basis: 86vw; width: 86vw; max-height: calc(100dvh - 330px); }
  .ficha { grid-template-columns: 70px 1fr; gap: 12px; padding: 14px; }
  .ficha-side { grid-column: 1 / -1; grid-template-columns: auto 1fr auto; justify-items: start; align-items: center; }
  .ficha-side .total { justify-self: end; }
  .grid-2, .grid-3, .detail-grid { grid-template-columns: 1fr; }
  .proc-row { grid-template-columns: auto 1fr; }
  .proc-row input[type=number] { grid-column: 2; }
  .chat { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .chat-channels { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .chat-channels h2 { display: none; }
  .channel { flex: none; width: auto; padding: 6px 12px 6px 6px; border-radius: 999px; }
  .channel small { display: none; }
  .chat-head { padding: 10px 14px; }
  .chat-messages { padding: 14px 12px; }
  .msg { max-width: 92%; }
  .msg-del { opacity: 1; }
  .composer { padding: 8px 10px; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal, .modal.lg, .modal.sm { max-width: 100%; max-height: 94dvh; border-radius: 22px 22px 0 0; }
  .modal-foot { border-radius: 0; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: color-mix(in srgb, #1E1714 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    padding: 6px 6px max(6px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(217, 188, 156, .14);
  }
  .bnav-item { position: relative; display: grid; justify-items: center; gap: 3px; padding: 7px 0; border: 0; background: none; color: #A8907C; font-size: 10.5px; font-weight: 700; border-radius: 12px; }
  .bnav-item.active { color: #F6E3CC; background: rgba(217, 188, 156, .12); }
  .bnav-item .ic { width: 21px; height: 21px; }
  .bnav-item .nav-badge { position: absolute; top: 2px; right: calc(50% - 20px); margin: 0; }
  #toast-root { left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); justify-items: stretch; }
  .toast { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- versão 2: destino, colunas, buscas, check-list, notas, pós ---------- */
.stat[data-view], .stat[data-act] { cursor: pointer; transition: box-shadow .16s, transform .16s; }
.stat[data-view]:hover, .stat[data-act]:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lead { max-width: 720px; margin: -8px 0 20px; }
.list-count { font-size: 12.5px; margin-bottom: 10px; }

.dest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 2px; border-radius: 14px; transition: box-shadow .2s; }
.dest-grid.need { box-shadow: 0 0 0 2px var(--red); }
.dest { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 700; font-size: 13px; text-align: left; transition: border-color .15s, background .15s; }
.dest:hover { border-color: var(--gold-3); }
.dest.on { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 3px var(--gold-soft); }
.dest .col-dot { margin: 0 8px 0 4px; }

.add-col { flex: 0 0 220px; min-height: 140px; border: 1.5px dashed var(--line-2); border-radius: var(--radius-lg); background: transparent; color: var(--muted); display: grid; place-items: center; align-content: center; gap: 6px; font-weight: 700; transition: border-color .15s, color .15s, background .15s; }
.add-col:hover { border-color: var(--gold); color: var(--gold-2); background: var(--gold-soft); }
.add-col .ic { width: 22px; height: 22px; }

.ck-link { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--red) 35%, transparent); background: var(--red-soft); color: var(--red); font-weight: 700; font-size: 12.5px; text-align: left; }
.ck-link b { margin-left: auto; }
.ck-link.ok { background: var(--green-soft); color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.ck-link .ic { width: 16px; height: 16px; }

.toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-inline, .date-inline { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--muted); }
.search-inline:focus-within, .date-inline:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.search-inline input, .date-inline input { border: 0; outline: none; background: transparent; color: var(--ink); min-width: 0; height: 100%; }
.search-inline input { width: 240px; }
.seg-lg button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; font-size: 13px; }
.seg-lg .ic { width: 16px; height: 16px; }
.seg-count { background: var(--red); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 11px; }

.ck-list { display: grid; gap: 12px; }
.ck-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.ck-card:not(.done) { border-left: 4px solid var(--red); }
.ck-card.done { border-left: 4px solid var(--green); }
.ck-head { display: grid; grid-template-columns: 76px 1fr auto auto; gap: 16px; align-items: center; padding: 14px 16px; cursor: pointer; user-select: none; }
.ck-head:hover { background: var(--surface-2); }
.ck-title { min-width: 0; }
.ck-title h3 { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.15; }
.ck-title p { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-prog { display: grid; justify-items: end; gap: 5px; min-width: 150px; }
.ck-prog small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ck-prog .progress { width: 140px; margin: 0; }
.chev { color: var(--muted); }
.ck-body { border-top: 1px solid var(--line); padding: 6px 16px 14px; }
.ck-row { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.ck-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--surface-3); color: var(--ink-2); }
.ck-row.answered .ck-num { background: var(--green); color: #fff; }
.ck-row.said-no .ck-num { background: var(--amber); }
.ck-row.missing .ck-num { box-shadow: 0 0 0 2px var(--red-soft); color: var(--red); }
.ck-q strong { display: block; font-size: 14px; font-weight: 700; }
.ck-q small { font-size: 11.5px; color: var(--muted); }
.yn { display: inline-flex; gap: 6px; }
.yn button { min-width: 64px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 800; font-size: 13px; color: var(--ink-2); transition: background .12s, border-color .12s, color .12s; }
.yn button:hover { border-color: var(--gold-3); }
.yn button.on.yes { background: var(--green); border-color: var(--green); color: #fff; }
.yn button.on.no { background: var(--amber); border-color: var(--amber); color: #fff; }
.yn button.on.neutral { background: var(--ink-2); border-color: var(--ink-2); color: var(--surface); }
.nota-box { grid-column: 2 / -1; display: grid; grid-template-columns: auto 1fr 1fr; gap: 12px; align-items: end; padding: 12px; border-radius: 12px; background: var(--gold-soft); }
.nota-box .pill { align-self: center; }
.ck-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 12px; }
.ck-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 13px; background: var(--red-soft); border: 1px solid color-mix(in srgb, var(--red) 30%, transparent); }
.ck-summary strong { display: block; color: var(--red); }
.ck-summary.ok { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.ck-summary.ok strong { color: var(--green); }
.ck-summary .muted { font-size: 12.5px; }

.nota-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px 18px; margin-bottom: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.nota-summary > div:first-child { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.nota-summary strong { font-size: 28px; font-weight: 600; }
.link-btn { border: 0; background: none; padding: 0; color: var(--red); font-weight: 700; text-decoration: underline; font-size: 13px; }
.panel .table td, .panel .table th { white-space: normal; }
.panel .chk { margin: 0; }

.pos-list { display: grid; gap: 12px; }
.pos-card { display: grid; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: center; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.pos-card.late { border-color: var(--amber); }
.pos-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.pos-main { min-width: 0; display: grid; gap: 4px; justify-items: start; }
.pos-main h3 { font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.1; }
.pos-main p { font-size: 12.5px; }
.pos-q { color: var(--ink-2); font-size: 13.5px !important; }
.pos-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.pill.rep { font-weight: 600; }
.pill .ic, .pill.rep .ic { width: 13px; height: 13px; }
.wd { display: flex; gap: 6px; flex-wrap: wrap; }
.wd button { min-width: 50px; height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 800; font-size: 13px; color: var(--ink-2); }
.wd button.on { background: var(--gold); border-color: var(--gold); color: #fff; }

@media (max-width: 860px) {
  .stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .toolbar-right, .search-inline { width: 100%; }
  .search-inline input { width: 100%; flex: 1; }
  .ck-head { grid-template-columns: 62px 1fr; gap: 10px; padding: 12px; }
  .ck-prog { grid-column: 1 / -1; justify-items: start; grid-template-columns: auto auto 1fr; align-items: center; min-width: 0; }
  .ck-prog .progress { width: 100%; }
  .chev { display: none; }
  .ck-body { padding: 4px 12px 12px; }
  .ck-row { grid-template-columns: 26px 1fr; }
  .yn { grid-column: 2; }
  .yn button { flex: 1; }
  .nota-box { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .pos-card { grid-template-columns: 40px 1fr; padding: 14px; }
  .pos-ic { width: 40px; height: 40px; }
  .pos-actions { grid-column: 1 / -1; justify-content: stretch; }
  .pos-actions .btn { flex: 1; }
  .add-col { flex-basis: 60vw; }
  .bnav-item { font-size: 10px; }
  .panel { overflow-x: auto; }
}

/* ---------- versão 3: layout compacto, notificações, segurança ---------- */
.view-head { margin-bottom: 16px; }
.view-head h1 { font-size: 32px; }
.stats { gap: 12px; margin-bottom: 16px; }
.stat { padding: 11px 14px; border-radius: 14px; }
.stat::after { width: 64px; height: 64px; right: -18px; top: -18px; }
.stat small { font-size: 10.5px; }
.stat strong { font-size: 26px; margin-top: 1px; }
.stat span { font-size: 12px; }
.column { flex-basis: 270px; width: 270px; }
.col-head { padding: 10px 10px 9px 13px; gap: 8px; }
.col-title h3 { font-size: 13.5px; }
.col-title small { font-size: 11px; }
.col-body { padding: 9px; gap: 8px; }
.card { padding: 10px 11px 8px; border-radius: 12px; }
.card-title { font-size: 13.3px; }
.card-desc { font-size: 12.3px; -webkit-line-clamp: 2; }
.checklist li { font-size: 12.3px; }
.card-foot { margin-top: 8px; padding-top: 7px; }
.add-col { flex-basis: 190px; min-height: 110px; }

.ficha-list { gap: 6px; }
.ficha { grid-template-columns: 58px minmax(0, 1fr) auto; gap: 14px; padding: 8px 14px 8px 8px; border-radius: 12px; }
.ficha-time { padding: 6px 4px; border-radius: 10px; }
.ficha-time strong { font-size: 18px; }
.ficha-time span { font-size: 10.5px; }
.ficha-main { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; min-width: 0; }
.ficha-main h3 { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ficha-main p { margin: 0; }
.ficha-main .chips { margin: 0; }
.ficha-main .pill { font-size: 11px; padding: 3px 8px; }
.ficha-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ficha-side .total { font-size: 17px; min-width: 76px; text-align: right; }
.ficha-side .pill { font-size: 11px; padding: 3px 9px; }
.ck-head .ficha-time strong { font-size: 18px; }

.notif-menu { width: 330px; padding: 8px; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.notif-menu button { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 600; font-size: 13.5px; }
.notif-menu button b { min-width: 26px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--surface-3); color: var(--muted); display: inline-grid; place-items: center; font-size: 12px; }
.notif-menu button b.on { background: var(--red); color: #fff; }
.notif-menu button.zero span { color: var(--muted); }

.seen { opacity: .85; }
.seen.on { color: #8FD3AE; font-weight: 700; opacity: 1; }
.msg:not(.mine) .seen.on { color: var(--green); }
.nopass { font-size: 11px; font-style: normal; font-weight: 700; color: var(--amber); }

.ck-row.extra .ck-num { border: 1.5px dashed var(--gold); }
.ck-extra-actions { display: flex; align-items: center; gap: 6px; }
.ck-add { display: flex; gap: 8px; align-items: center; padding: 12px 0 4px; flex-wrap: wrap; }
.ck-add .input { flex: 1; min-width: 200px; min-height: 38px; }
.ck-add .toggle { padding: 7px 11px; }
.ck-note { margin-top: 8px; }
.ck-note textarea { min-height: 60px !important; }
.ck-embed { margin-top: 10px; padding: 4px 14px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }

.team-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.act-controls { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.act-controls .field select { min-width: 280px; }
.act-search { flex: 1; min-width: 220px; }
.act-search input { width: 100%; }
.conv-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.conv-row .btn { gap: 6px; }
.conv-log { display: grid; gap: 8px; }
.conv-line { display: grid; grid-template-columns: 140px 110px 1fr; gap: 10px; align-items: start; font-size: 13.5px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.conv-line audio { height: 34px; vertical-align: middle; }
pre.diff { font-size: 11.5px; max-height: 50vh; overflow: auto; white-space: pre-wrap; word-break: break-word; }

@media (max-width: 860px) {
  .ficha { grid-template-columns: 54px minmax(0, 1fr); }
  .ficha-side { grid-column: 1 / -1; justify-content: flex-start; }
  .ficha-side .total { margin-left: auto; }
  .column { width: 84vw; }
  .notif-menu { position: fixed; top: 64px; left: 12px; right: 12px; width: auto; }
  .act-controls .field select { min-width: 0; width: 100%; }
  .act-controls .field { width: 100%; }
  .conv-line { grid-template-columns: 1fr; gap: 2px; }
}

.brand-name { font-size: 18px; white-space: nowrap; }

/* ---------- versão 4: colunas minimizadas e pessoais, som, Santé, check-list recolhido ---------- */
.board-hint { font-size: 12px; margin: -6px 0 10px; }
.column.collapsed { flex: 0 0 52px; width: 52px; min-height: 260px; background: var(--surface-3); border-style: dashed; }
.col-mini { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; height: 100%; min-height: 250px; padding: 12px 0; border: 0; background: transparent; color: var(--ink-2); border-radius: var(--radius-lg); }
.col-mini:hover { background: var(--gold-soft); color: var(--ink); }
.col-vert { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 800; font-size: 13px; letter-spacing: .02em; white-space: nowrap; }
.col-mini .ic { margin-top: auto; opacity: .7; }
.column.collapsed.col-drop { box-shadow: 0 0 0 2px var(--gold), var(--shadow); }
.col-lock { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--gold-soft); color: var(--gold-2); flex: none; }
.col-lock .ic { width: 14px; height: 14px; }
.column.personal { border-color: var(--gold-3); background: linear-gradient(180deg, var(--gold-soft), var(--surface-2) 90px); }
.dest.personal { border-style: dashed; }
.add-col small { font-size: 11px; font-weight: 600; opacity: .8; }

.btn-sante { background: var(--blue-soft); color: var(--blue); border-color: transparent; text-decoration: none; }
.btn-sante:hover { border-color: var(--blue); }
.sound-pill { background: var(--amber-soft); color: var(--amber); border-color: transparent; animation: pulse-soft 1.6s ease-in-out infinite; }
@keyframes pulse-soft { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--amber) 18%, transparent); } }
a.nav-item { text-decoration: none; }
.inline-link { color: var(--blue); font-weight: 700; }

.ck-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.ck-fold > summary::-webkit-details-marker { display: none; }
.ck-fold > summary .ck-summary-wrap { flex: 1; }
.fold-hint { font-size: 12.5px; font-weight: 800; color: var(--gold-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.fold-hint::after { content: '›'; font-size: 18px; transition: transform .2s; }
.ck-fold[open] .fold-hint::after { transform: rotate(90deg); }
.ck-fold .when-open { display: none; }
.ck-fold[open] .when-open { display: inline; }
.ck-fold[open] .when-closed { display: none; }

@media (max-width: 860px) {
  .btn-sante span { display: none; }
  .btn-sante { padding: 0 10px; }
  .sound-pill { padding: 0 10px; font-size: 0; gap: 0; }
  .column.collapsed { flex-basis: 48px; width: 48px; }
}
.col-title h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- versão 5: rodapé discreto, pagamento, modelo, caixa, dinheiro ---------- */
.card-foot .who { font-size: 10.5px; font-weight: 500; opacity: .7; gap: 4px; }
.card-foot .who .av.xs { width: 15px; height: 15px; font-size: 7px; box-shadow: none; }
.due { font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 5px; margin-left: 4px; }
.due.today { background: transparent; color: var(--muted); padding: 1px 2px; }
.due .ic { width: 11px; height: 11px; vertical-align: -1px; }

.pay-box { grid-column: 2 / -1; display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.pay-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pay-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); font-size: 12.5px; }
.pay-chip.flat { padding: 3px 9px; }
.pay-chip .ic { width: 15px; height: 15px; }
.pay-chip small { color: var(--muted); font-size: 11px; }
.pay-chip button { border: 0; background: transparent; color: var(--muted); font-size: 16px; line-height: 1; width: 22px; height: 22px; border-radius: 6px; }
.pay-chip button:hover { background: var(--red-soft); color: var(--red); }
.pay-chip.m-cartao { border-color: color-mix(in srgb, var(--blue) 40%, transparent); color: var(--blue); }
.pay-chip.m-dinheiro { border-color: color-mix(in srgb, var(--green) 40%, transparent); color: var(--green); }
.pay-chip.m-pix { border-color: color-mix(in srgb, var(--gold) 50%, transparent); color: var(--gold-2); }
.pay-chip b { color: var(--ink); font-weight: 700; }
.pay-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.money-in { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); }
.money-in span { font-weight: 800; color: var(--muted); font-size: 13px; }
.money-in input { border: 0; outline: none; background: transparent; width: 110px; font-weight: 700; font-variant-numeric: tabular-nums; min-height: 0 !important; padding: 0 !important; box-shadow: none !important; }
.money-in:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.pay-methods button { display: inline-flex; align-items: center; gap: 5px; }
.pay-methods .ic { width: 14px; height: 14px; }

.tpl-list { display: grid; gap: 8px; }
.tpl-row { display: grid; grid-template-columns: 28px 1fr auto auto auto auto; gap: 8px; align-items: center; }
.tpl-row .input { min-height: 38px; }
.tpl-row .toggle { padding: 7px 10px; font-size: 12.5px; }
.tpl-row .toggle.locked { opacity: .6; }

.warn-note { background: var(--amber-soft); color: var(--amber); }
.link-btn.plain { color: var(--ink); text-decoration: none; font-weight: 700; }
.caixa-close { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-top: 18px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.caixa-close > div { flex: 1; display: grid; gap: 2px; }
.caixa-close strong { font-size: 15px; color: var(--green); }

.dn-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 14px 16px; margin-bottom: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.dn-form .seg-lg { align-self: flex-end; }
.dn-desc { flex: 1; min-width: 220px; }
.dn-val .money-in { height: 42px; }
.dn-who select { min-width: 150px; }
td.neg { color: var(--red); font-weight: 700; }
td.pos { color: var(--green); font-weight: 700; }

@media (max-width: 860px) {
  .tpl-row { grid-template-columns: 24px 1fr auto auto; }
  .tpl-row .toggle { grid-column: 2; justify-self: start; }
  .pay-box { grid-column: 1 / -1; }
  .pay-methods { flex-wrap: wrap; }
  .dn-form > * { width: 100%; }
  .money-in input { width: 100%; }
}
.money-in input { border: 0 !important; background: transparent !important; }
.dn-desc { min-width: 180px; }

/* ---------- versão 6: concluir check-list, PIX PF/PJ, verba da recepção ---------- */
.ck-foot-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-locked { background: var(--surface-3); color: var(--muted); border-color: var(--line-2); }
.btn-locked:hover { border-color: var(--amber); color: var(--amber); }
.ck-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ck-inline .ck-summary-wrap { flex: 1; min-width: 240px; }
.ck-inline-note { font-size: 12px; margin-top: 6px; }
.stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.big-money { font-size: 30px; color: var(--green); }
.hand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 14px; }
.hand-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.hand-card > div { flex: 1; min-width: 0; display: grid; }
.hand-card strong { font-size: 13.5px; }
.hand-card .muted { font-size: 11.5px; }
.hand-card b { font-family: var(--serif); font-size: 21px; color: var(--green); }
.hand-card.neg b { color: var(--red); }
.small-note { font-size: 12px; margin-top: -4px; }
.pay-chip.m-pixpf, .pay-chip.m-pixpj { border-color: color-mix(in srgb, var(--gold) 50%, transparent); color: var(--gold-2); }
@media (max-width: 1100px) { .stats-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .stats-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- versão 7: aba Dinheiro com duas partes ---------- */
.money-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.money-tab { display: flex; align-items: center; gap: 14px; padding: 16px 18px; text-align: left; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, background .15s; }
.money-tab:hover { border-color: var(--gold-3); }
.money-tab.on { border-color: var(--gold); background: linear-gradient(180deg, var(--gold-soft), var(--surface) 70%); box-shadow: 0 0 0 3px var(--gold-soft), var(--shadow); }
.money-tab > .ic { width: 26px; height: 26px; color: var(--gold-2); flex: none; }
.money-tab > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.money-tab strong { font-size: 15px; }
.money-tab span { font-size: 12.5px; color: var(--muted); }
.money-tab b { font-family: var(--serif); font-size: 24px; text-align: right; display: grid; line-height: 1.1; white-space: nowrap; }
.money-tab b small { font-family: var(--sans); font-size: 11px; color: var(--muted); font-weight: 600; }
.tab-intro { color: var(--ink-2); margin-bottom: 14px; }
.muted-strong { color: var(--ink-2) !important; }
@media (max-width: 860px) { .money-tabs { grid-template-columns: 1fr; } }

/* ---------- versão 8: arrastar abas e colunas ---------- */
.nav-item[draggable="true"] { cursor: grab; }
.nav-item.nav-dragging { opacity: .4; }
.nav-item.nav-drop-before { box-shadow: inset 0 3px 0 #D9BC9C; }
.nav-item.nav-drop-after { box-shadow: inset 0 -3px 0 #D9BC9C; }
.bnav-item.nav-drop-before { box-shadow: inset 3px 0 0 #D9BC9C; }
.bnav-item.nav-drop-after { box-shadow: inset -3px 0 0 #D9BC9C; }
.col-grip { color: var(--muted); opacity: .45; display: inline-grid; margin: 0 -4px 0 -6px; cursor: grab; }
.col-grip .ic { width: 14px; height: 14px; }
.col-head:hover .col-grip { opacity: .9; }

/* ---------- versão 8: arrastar abas e colunas ---------- */
.nav-item[draggable="true"] { cursor: grab; }
.nav-item.nav-dragging, .bnav-item.nav-dragging { opacity: .4; }
.nav-item.nav-drop-before { box-shadow: inset 0 3px 0 #D9BC9C; }
.nav-item.nav-drop-after { box-shadow: inset 0 -3px 0 #D9BC9C; }
.bnav-item.nav-drop-before { box-shadow: inset 3px 0 0 #D9BC9C; }
.bnav-item.nav-drop-after { box-shadow: inset -3px 0 0 #D9BC9C; }
.col-grip { color: var(--muted); opacity: .45; display: inline-grid; place-items: center; margin: 0 -2px 0 -6px; cursor: grab; flex: none; }
.col-grip .ic, .col-grip svg { width: 14px; height: 14px; }
.col-head:hover .col-grip { opacity: .9; }

/* ---------- versão 9: lixeira e limpar histórico ---------- */
.lx-seg { margin-bottom: 14px; }
.lx-seg button { display: inline-flex; align-items: center; gap: 6px; }
.lx-seg .ic, .lx-seg svg { width: 14px; height: 14px; }
.hist-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hist-bar .tab-intro { flex: 1; min-width: 240px; margin: 0 0 14px; }
.table td.num .btn + .btn { margin-left: 6px; }

/* ---------- versão 10: ordem pessoal das listas e rotinas fixadas ---------- */
.ficha, .ck-head { position: relative; }
.ficha { padding-left: 22px; }
.ck-head { padding-left: 26px; }
.sort-grip { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); color: var(--muted); opacity: .35; display: grid; place-items: center; cursor: grab; pointer-events: none; }
.ck-head .sort-grip { left: 6px; }
.sort-grip svg { width: 14px; height: 14px; }
.ficha:hover .sort-grip, .ck-head:hover .sort-grip, .rotina:hover .sort-grip { opacity: .85; }
.rotina { position: relative; }
.rotina .sort-grip { position: static; transform: none; margin: 0 -8px 0 -6px; pointer-events: none; }
.rotina[draggable="true"] { cursor: grab; }
.sort-dragging { opacity: .45; }
.sort-before { box-shadow: 0 -3px 0 #C9A07A, var(--shadow-sm) !important; }
.sort-after { box-shadow: 0 3px 0 #C9A07A, var(--shadow-sm) !important; }
.rotina.pinned { border-color: #D9BC9C; background: linear-gradient(0deg, var(--surface), var(--surface)) padding-box; box-shadow: inset 3px 0 0 #C9A07A, var(--shadow-sm); }
.rotina.pinned.done { box-shadow: inset 3px 0 0 #D9BC9C; }
.pin-btn { color: var(--muted); }
.pin-btn.on { color: #A9825F; background: #F3E7DA; }
html[data-theme="dark"] .pin-btn.on { background: rgba(201,160,122,.18); }

/* ---------- bolha de acessos rápidos ---------- */
.qbubble { position: fixed; z-index: 80; width: 58px; height: 58px; }
.qb-btn { width: 58px; height: 58px; border-radius: 50%; border: 1px solid rgba(217,188,156,.55); cursor: grab; touch-action: none; position: relative;
  background: radial-gradient(120% 120% at 30% 20%, #4A3A33 0%, #231B18 70%); color: #F3E7DA; box-shadow: 0 10px 28px rgba(35,27,24,.35), inset 0 1px 0 rgba(255,255,255,.08);
  display: grid; place-items: center; transition: transform .18s ease, box-shadow .18s ease; }
.qb-btn:hover { transform: scale(1.05); box-shadow: 0 14px 34px rgba(35,27,24,.42); }
.qb-mark { font-family: 'Cormorant Garamond', serif; font-weight: 700; font-size: 21px; letter-spacing: .5px; color: #E9D3BB; pointer-events: none; }
.qb-count { position: absolute; top: -3px; right: -3px; }
.qbubble.qb-dragging .qb-btn { cursor: grabbing; transform: scale(1.08); }
.qbubble.qb-drop .qb-btn { box-shadow: 0 0 0 6px rgba(201,160,122,.45), 0 14px 34px rgba(35,27,24,.42); transform: scale(1.12); }
.qb-menu { position: absolute; bottom: 68px; right: 0; width: 236px; padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg, 0 18px 48px rgba(35,27,24,.22)); opacity: 0; transform: translateY(8px) scale(.98); pointer-events: none; transition: opacity .16s ease, transform .16s ease; }
.qbubble.qb-left .qb-menu { right: auto; left: 0; }
.qbubble.qb-top .qb-menu { bottom: auto; top: 68px; transform: translateY(-8px) scale(.98); }
.qbubble.open .qb-menu { opacity: 1; transform: none; pointer-events: auto; }
.qb-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 10px; font-weight: 600; font-size: 13.5px; color: var(--ink); text-align: left; cursor: pointer; }
.qb-item svg { width: 17px; height: 17px; color: #A9825F; flex: none; }
.qb-item:hover { background: var(--surface-3); }
.qb-item.qb-muted { color: var(--muted); font-weight: 500; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; }
.qb-item.qb-muted svg { color: var(--muted); }
.qb-hint { font-size: 11.5px; color: var(--muted); padding: 6px 12px 4px; line-height: 1.4; }
@media print { .qbubble { display: none; } }
@media (min-width: 861px) { .view { padding-bottom: 96px; } }
@media (max-width: 860px) { .view { padding-bottom: calc(150px + env(safe-area-inset-bottom)); } }
.proc-empty { padding: 10px 12px; font-size: 13px; }
body.qb-corner #toast-root { right: 96px; }
@media (max-width: 860px) { body.qb-corner #toast-root { right: 82px; } }

/* ---------- anotações individuais ---------- */
.notes-people { margin-bottom: 14px; flex-wrap: wrap; }
.notes-wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.notes-side { display: grid; gap: 10px; position: sticky; top: 0; }
.notes-side .search-inline { width: 100%; }
.notes-list { display: grid; gap: 6px; max-height: calc(100vh - 330px); overflow: auto; padding-right: 2px; }
.note-item { display: grid; gap: 3px; text-align: left; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; box-shadow: var(--shadow-sm); }
.note-item:hover { border-color: #D9BC9C; }
.note-item.on { border-color: #C9A07A; box-shadow: inset 3px 0 0 #C9A07A, var(--shadow-sm); }
.note-item .t { font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-item .x { font-size: 12.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note-item small { font-size: 11px; color: var(--muted); }
.note-none { padding: 10px 4px; font-size: 13px; }
.note-editor { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); padding: 20px 22px; display: grid; gap: 10px; min-height: 460px; grid-template-rows: auto 1fr auto; }
.note-title { border: 0; outline: 0; background: none; font-family: 'Cormorant Garamond', serif; font-size: 28px; font-weight: 700; color: var(--ink); padding: 0; width: 100%; }
.note-text { border: 0; outline: 0; background: none; resize: vertical; min-height: 360px; font: inherit; font-size: 15px; line-height: 1.65; color: var(--ink); padding: 0; width: 100%;
  background-image: linear-gradient(transparent calc(1.65em - 1px), var(--line) 1px); background-size: 100% 1.65em; background-attachment: local; }
.note-foot { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 12.5px; }
.note-ro-title { font-family: 'Cormorant Garamond', serif; font-size: 28px; }
.note-ro { white-space: pre-wrap; font-size: 15px; line-height: 1.65; color: var(--ink); }
.note-empty { grid-row: 1 / -1; align-self: center; border: 0; box-shadow: none; }
@media (max-width: 860px) {
  .notes-wrap { grid-template-columns: 1fr; }
  .notes-side { position: static; }
  .notes-list { max-height: 220px; }
  .note-editor { padding: 16px; min-height: 360px; }
  .note-text { min-height: 280px; }
}
.note-foot .grow { flex: 1; }

/* ---------- minimizar cards do painel (individual) ---------- */
.card { position: relative; }
.card-min { position: absolute; top: 7px; right: 7px; width: 24px; height: 24px; border-radius: 7px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; opacity: .55; z-index: 1; }
.card-min svg { width: 15px; height: 15px; }
.card:hover .card-min, .card-min:focus-visible { opacity: 1; background: var(--surface-3); }
.card .card-title { padding-right: 22px; }
.card.is-collapsed { padding-top: 9px; padding-bottom: 9px; }
.card.is-collapsed .card-desc, .card.is-collapsed .checklist, .card.is-collapsed .progress, .card.is-collapsed .ck-link,
.card.is-collapsed .card-foot .who, .card.is-collapsed .card-foot .wa-btn, .card.is-collapsed .card-foot .att-count { display: none; }
.card.is-collapsed .card-badges:empty { display: none; }
.card.is-collapsed .card-badges { margin-bottom: 4px; }
.card.is-collapsed .card-title { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.card.is-collapsed .card-foot { margin-top: 6px; padding-top: 6px; }
.card.is-collapsed .card-min { opacity: .9; }
.card .card-badges { padding-right: 24px; }
.card.is-collapsed { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; row-gap: 4px; padding-right: 34px; }
.card.is-collapsed .card-badges { width: 100%; margin: 0; padding-right: 0; }
.card.is-collapsed .card-title { flex: 1 1 0; min-width: 0; padding-right: 0; }
.card.is-collapsed .card-foot { margin: 0; padding: 0; border: 0; flex: none; gap: 2px; }
.card.is-collapsed .card-foot .spacer { display: none; }
.card.is-collapsed .card-foot .icon-btn { width: 26px; height: 26px; }
.card.is-collapsed .card-min { top: auto; bottom: 8px; }
.install-help ol { padding-left: 20px; display: grid; gap: 6px; }
.install-help p { line-height: 1.5; }

/* ---------- unidades (Dra. Carolina e Juliana) ---------- */
.unit-switch { margin: -6px 18px 14px; display: grid; gap: 6px; }
.unit-switch > span { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(233, 211, 187, .6); font-weight: 700; }
.unit-switch .seg { background: rgba(255, 255, 255, .06); border-color: rgba(217, 188, 156, .2); width: 100%; }
.unit-switch .seg button { flex: 1; color: rgba(243, 230, 216, .75); font-size: 12px; padding: 6px 8px; }
.unit-switch .seg button.on { background: rgba(217, 188, 156, .22); color: #F3E6D8; box-shadow: none; }
.ch-all.ch-urgent { background: #F6E3C8; color: #9A5B1E; }
html[data-theme="dark"] .ch-all.ch-urgent { background: rgba(232, 168, 92, .18); color: #F0C38E; }
.shared-pill { background: #E8EEF6; color: #3F5F86; }
html[data-theme="dark"] .shared-pill { background: rgba(95, 127, 150, .25); color: #B8CCE0; }
.shared-toggle { margin-top: 4px; font-size: 13.5px; }

/* ---------- tela de entrada no celular ---------- */
@media (max-width: 860px) {
  .login { display: flex; flex-direction: column; height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .login-hero { flex: none; justify-content: center; padding: 26px 20px; }
  .login-hero::after { inset: 10px; border-radius: 20px; }
  .login-hero .hero-inner { display: flex; align-items: center; justify-content: center; gap: 14px; max-width: none; width: 100%; }
  .login-hero .hero-copy { display: none; }
  .login-hero .mono.lg { width: 46px; height: 46px; font-size: 23px; }
  .login-hero .hero-inner h1 { font-size: clamp(21px, 6.6vw, 30px); margin: 0; line-height: 1; white-space: nowrap; padding-bottom: 2px; }
  .login-panel { flex: none; align-items: flex-start; padding: 26px 18px max(40px, env(safe-area-inset-bottom)); }
  .login-card h2 { font-size: 28px; }
  .user-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
.rot-sections { display: grid; gap: 10px; align-content: start; }
.rot-sec { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .02em; color: var(--ink-2); margin: 6px 2px 0; }
.rot-sec svg { width: 15px; height: 15px; color: #A9825F; }
.rot-sec small { font-weight: 500; color: var(--muted); font-size: 12px; }
.rot-scope { flex-wrap: wrap; }
.rot-scope button { display: inline-flex; align-items: center; gap: 6px; }
.rot-scope svg { width: 14px; height: 14px; }
.rot-scope-bar { margin: -6px 0 16px; flex-wrap: wrap; }
.rot-scope-bar button { display: inline-flex; align-items: center; gap: 7px; }
.rot-scope-bar svg { width: 15px; height: 15px; }
.inactive-card { opacity: .72; }
.replace-notes { padding-left: 18px; display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
.ru-notes { flex-wrap: wrap; }

.owner-pill { display: inline-flex; align-items: center; gap: 4px; margin: 3px 6px 0 0; font-size: 11.5px; padding: 2px 8px; background: #F1E6DA; color: #7A5636; vertical-align: middle; }
.owner-pill svg { width: 11px; height: 11px; }
html[data-theme="dark"] .owner-pill { background: rgba(217, 188, 156, .16); color: #E2C3A0; }

/* aplicativo instalado no iPhone: o topo fica abaixo da barra de status */
@media (max-width: 860px) and (display-mode: standalone) {
  .login-hero { padding-top: calc(env(safe-area-inset-top, 0px) + 26px); }
  .login-hero::after { top: calc(env(safe-area-inset-top, 0px) + 10px); }
}

/* ---------- Financeiro da ficha ---------- */
.fin-embed { margin-top: 10px; }
.fin-rows .ck-row:last-child { border-bottom: 0; }
.fin-rows .ck-num svg { width: 14px; height: 14px; }
.fin-prose { margin-bottom: 4px; }
.fin-section { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.fin-section h4 { margin: 0 0 10px; }
.yn button[disabled] { opacity: .4; cursor: not-allowed; }
@media (max-width: 860px) { .yn-3 { grid-column: 1 / -1; flex-wrap: wrap; } }
.nota-month { max-width: 340px; margin: 0 0 14px; }
.nota-month select { width: 100%; }

.login-card-sm { max-width: 420px; width: 100%; }
.login-card-sm .pin-form { margin-top: 18px; display: grid; gap: 14px; }

.msg.mine .msg-author { color: #E8C9A6; text-align: right; }
.fin-free textarea { width: 100%; }

/* verificação em duas etapas */
.qr-box { display: grid; place-items: center; padding: 12px; background: #fff; border-radius: 14px; border: 1px solid var(--line); }
.qr-box svg { width: 200px; height: 200px; }
.secret-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; letter-spacing: .5px; word-break: break-all; }
.code-input { font-size: 22px; letter-spacing: 6px; text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; }
.rc-list { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; line-height: 1.7; padding: 12px 16px; background: var(--surface-2); border-radius: 12px; border: 1px solid var(--line); column-count: 2; }

/* visualização de arquivos */
.fv-wrap { display: grid; place-items: center; }
.fv-frame { width: 100%; height: min(72vh, 900px); border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.fv-media { width: 100%; max-height: 72vh; border-radius: 12px; background: #000; }
.fv-audio { display: flex; align-items: center; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; }
.fv-audio audio { flex: 1; }
.fv-text { max-height: 65vh; overflow: auto; white-space: pre-wrap; padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; font-size: 13px; }
.fv-other svg { width: 42px; height: 42px; color: var(--muted); }
