/* treinzi. — identidade visual (Pulso): Grafite #0E0F12 · Limão #C6F432 · Giz #F2F3F5 · Space Grotesk + Inter */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-latin-var.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("/fonts/space-grotesk-latin-var.woff2") format("woff2"); }
:root {
  color-scheme: light;
  --brand-deep: #0E0F12;   /* Grafite */
  --brand: #C6F432;        /* Limão */
  --brand-polar: #F3F6EB;  /* Giz */
  --bg: #f7f7f4;
  --surface: #ffffff;
  --surface-2: #f8f9f6;
  --surface-3: #f1f3ed;
  --border: #e4e5e7;
  --border-strong: #d2d3d7;
  --text: #111316;
  --text-2: #272931;
  --muted: #656975;
  --primary: #C6F432;          /* fundos: botões, destaques */
  --primary-text: #4d6b00;     /* textos e ícones na cor da marca (contraste no branco) */
  --primary-600: #b5e61f;
  --primary-ink: #0f1012;
  --primary-50: rgba(198,244,50, .10);
  --primary-100: rgba(198,244,50, .26);
  --sidebar: #070809;
  --sidebar-text: #b0b3bb;
  --danger: #d23f3f;
  --danger-50: #fdeeee;
  --amber: #a85d00; --amber-50: #fff4e0;
  --green: #3F6D12; --green-50: #f0f2e9;
  --blue: #1f5fbf; --blue-50: #eaf1ff;
  --red: #c4302f; --red-50: #fdecec;
  --teal: #4d6b00; --teal-50: #eff2e5;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(14,15,18,.05), 0 4px 14px rgba(14,15,18,.05);
  --shadow-lg: 0 24px 60px rgba(7,8,9,.28);
  --glow: 0 0 0 1px rgba(198,244,50,.35), 0 8px 22px rgba(198,244,50,.28);
  --grad: linear-gradient(135deg, #C6F432 0%, #0E0F12 100%);
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-display: "Space Grotesk", "Inter", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
}
/* áreas escuras da marca: menu lateral, topo no celular e arte da tela de entrada */
.sidebar, .topbar, .auth-art, .doc-viewer-bar {
  color-scheme: dark;
  --text: #f3f6eb; --text-2: #d7dbcb; --muted: #9296a1; --border: #1b1d22; --border-strong: #272A32;
  --surface: #0d0d10; --surface-2: #111215; --primary-text: #C6F432;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); color: var(--text); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  background: radial-gradient(900px 480px at 100% -10%, rgba(198,244,50,.10), transparent 60%), var(--bg);
  background-attachment: fixed;
}
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.015em; }
h1 { font-size: 23px; } h2 { font-size: 17px; } h3 { font-size: 15px; } h4 { font-size: 13px; }
a { color: var(--primary-text); text-decoration: none; }
button { font: inherit; cursor: pointer; }
small { color: var(--muted); }
::selection { background: rgba(198,244,50,.35); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cecfd4; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.hidden { display: none !important; }

/* ---------- Marca ---------- */
.treinzi-logo { display: inline-flex; flex-direction: column; color: #fff; max-width: 100%; }
.treinzi-logo img { display: block; max-width: 100%; height: auto; }
.treinzi-tag { display: block; margin-top: 4px; max-width: 190px; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: #b2c37a; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, #0d0d10 0%, var(--sidebar) 45%); border-right: 1px solid #121317; color: var(--sidebar-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 40; }
.brand { display: flex; gap: 10px; align-items: center; padding: 22px 20px 20px; color: #fff; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-deep); display: grid; place-items: center; color: var(--brand); flex: none; }
.brand-mark img { width: 24px; height: 24px; }
.brand b { display: block; font-size: 15px; }
.brand small { color: var(--muted); font-size: 11px; }
.nav { display: flex; flex-direction: column; gap: 3px; padding: 6px 12px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--sidebar-text); font-weight: 500; border: 1px solid transparent; transition: background .12s, color .12s; }
.nav a:hover { background: rgba(198,244,50,.06); color: #fff; }
.nav a.active { background: linear-gradient(90deg, rgba(198,244,50,.20), rgba(198,244,50,.06)); border-color: rgba(198,244,50,.25); color: #fff; }
.nav a.active svg { color: var(--brand); }
.nav .num { font-size: 11px; color: var(--muted); width: 14px; text-align: right; }
.side-foot { padding: 14px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-deep); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; border: 1px solid rgba(198,244,50,.3); }
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who small { color: var(--muted); font-size: 11px; }
.side-foot .icon-btn { color: var(--sidebar-text); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.content { padding: 28px 32px 60px; max-width: 1400px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.crumb { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: block; }

/* ---------- Componentes ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-body { padding: 18px; }
.card-body.flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi .kpi-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi .kpi-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary-text); border: 1px solid var(--primary-100); }
.kpi .kpi-val { font-size: 26px; font-weight: 700; letter-spacing: -.025em; color: var(--text); }
.kpi .kpi-sub { font-size: 12px; color: var(--muted); }
.kpi.warn .kpi-ic { background: var(--amber-50); color: var(--amber); border-color: rgba(251,191,71,.25); }
.kpi.good .kpi-ic { background: var(--green-50); color: var(--green); border-color: rgba(191,220,96,.25); }
.kpi.blue .kpi-ic { background: var(--blue-50); color: var(--blue); border-color: rgba(106,168,255,.25); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); padding: 8px 15px; border-radius: 10px; font-weight: 550; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: var(--surface-3); border-color: rgba(198,244,50,.55); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 650; box-shadow: 0 4px 14px rgba(198,244,50,.30); }
.btn.primary:hover { background: #c6e854; border-color: #c6e854; box-shadow: var(--glow); }
.btn.danger { background: #e5484d; border-color: #e5484d; color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(14,15,18,.06); }
.btn.sm { padding: 5px 11px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { background: transparent; border: 0; padding: 6px; border-radius: 8px; color: var(--muted); display: inline-grid; place-items: center; }
.icon-btn:hover { background: rgba(14,15,18,.07); color: var(--text); }
.sidebar .icon-btn:hover, .topbar .icon-btn:hover { background: rgba(255,255,255,.07); color: #fff; }
.btn-group { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; background: var(--surface); }
.btn-group button { border: 0; background: transparent; padding: 7px 13px; font-weight: 550; color: var(--muted); }
.btn-group button + button { border-left: 1px solid var(--border); }
.btn-group button.on { background: var(--primary-50); color: var(--primary-text); }

.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge.blue { background: var(--blue-50); color: var(--blue); border-color: rgba(106,168,255,.25); }
.badge.green { background: var(--green-50); color: var(--green); border-color: rgba(191,220,96,.25); }
.badge.amber { background: var(--amber-50); color: var(--amber); border-color: rgba(251,191,71,.25); }
.badge.red { background: var(--red-50); color: var(--red); border-color: rgba(255,122,122,.25); }
.badge.teal { background: var(--teal-50); color: var(--teal); border-color: rgba(199,234,82,.25); }
.badge.gray { background: #eff0f2; color: var(--muted); border-color: #e4e5e8; }
.badge.purple { background: #f3efff; color: #7c5cd6; border-color: rgba(124,92,214,.25); }

/* Tabelas */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: rgba(198,244,50,.05); }
.table td.actions { text-align: right; white-space: nowrap; }
.table tfoot td { font-weight: 700; background: var(--surface-2); }

/* Formulários */
.form-grid { display: grid; gap: 14px 16px; }
.form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.cols-1 { grid-template-columns: 1fr; }
.span-all { grid-column: 1 / -1; }
.form-section { grid-column: 1 / -1; margin-top: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); color: var(--primary-text); text-transform: uppercase; font-size: 12px; letter-spacing: .07em; font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.req { color: var(--danger); }
.help { font-size: 11.5px; }
.input { width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; color: var(--text); font: inherit; transition: border-color .12s, box-shadow .12s; }
.input::placeholder { color: #9da0a9; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(198,244,50,.18); }
select.input option { background: #fff; color: var(--text); }
textarea.input { resize: vertical; min-height: 64px; }
.input[readonly] { background: var(--surface-2); }
.input:disabled { opacity: .6; }
/* Indique e ganhe */
.aff-steps { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.aff-link .input { flex: 1; min-width: 220px; }
.aff-link { flex-wrap: wrap; }
/* Telefone com país (seletor +55 e máscara do país) */
.phone-field { position: relative; display: flex; gap: 6px; }
.phone-cc { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.phone-cc:hover { background: var(--surface-2); }
.phone-cc:focus-visible { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(198,244,50,.18); }
.phone-flag { font-size: 1.15em; line-height: 1; }
.phone-code { font-variant-numeric: tabular-nums; font-weight: 600; }
.phone-caret { font-size: .75em; opacity: .6; }
.phone-num { flex: 1; min-width: 0; }
.phone-menu { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: min(340px, 100%); padding: 8px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg); }
.phone-list { list-style: none; margin: 6px 0 0; padding: 0; max-height: 240px; overflow-y: auto; }
.phone-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.phone-opt:hover, .phone-opt.first { background: var(--surface-2); }
.phone-opt.sel { background: var(--surface-3); font-weight: 600; }
.phone-name { flex: 1; }
.phone-none { padding: 10px; color: var(--muted, #6d717d); }
.search { position: relative; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 34px; min-width: 240px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: transparent; font-size: 13px; cursor: pointer; user-select: none; color: var(--text-2); }
.check:has(input:checked) { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary-text); font-weight: 600; }
.check input { accent-color: var(--primary); margin: 0; }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); }
.scale { display: grid; grid-template-columns: auto 1fr 40px auto; gap: 12px; align-items: center; }
.scale small { font-size: 11px; }
.scale-out { font-weight: 700; font-size: 18px; text-align: center; }
.range { -webkit-appearance: none; appearance: none; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--tone, var(--primary)) var(--fill, 0%), #dfe0e4 var(--fill, 0%)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--tone, var(--primary)); cursor: pointer; }
.range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--tone, var(--primary)); cursor: pointer; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; scrollbar-width: thin; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 550; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--primary-text); border-bottom-color: var(--primary); }

/* Modal */
.overlay { position: fixed; inset: 0; background: rgba(7,8,9,.55); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .12s; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal.wide { width: min(980px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 18px 18px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }

/* Toasts */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { display: flex; gap: 9px; align-items: center; background: #0E0F12; border: 1px solid #0E0F12; color: #fff; padding: 11px 15px; border-radius: 12px; box-shadow: var(--shadow-lg); max-width: 380px; animation: up .2s; transition: opacity .3s, transform .3s; }
.toast.ok svg { color: var(--brand); }
.toast.error { background: #3a1214; border-color: #6b2226; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes up { from { opacity: 0; transform: translateY(10px); } }

.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty-icon { width: 54px; height: 54px; border-radius: 16px; background: var(--primary-50); border: 1px solid var(--primary-100); display: grid; place-items: center; margin: 0 auto 10px; color: var(--primary-text); }
.empty p { margin: 0 0 14px; }
.loading { display: grid; place-items: center; padding: 50px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--primary-100); border-top-color: var(--primary); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--amber-50); color: #7a4706; border: 1px solid #f6dfb5; align-items: flex-start; }
.notice.info { background: var(--primary-50); color: var(--text); border-color: var(--primary-100); }
.notice.info svg { color: var(--primary-text); }
.notice.ok { background: var(--green-50); color: #22242B; border-color: #dbdfcd; }
.notice svg { flex-shrink: 0; margin-top: 1px; }

/* Listas */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item.click { cursor: pointer; }
.list-item.click:hover { background: rgba(198,244,50,.05); }
.time-chip { min-width: 58px; text-align: center; padding: 6px 8px; border-radius: 10px; background: var(--primary-50); border: 1px solid var(--primary-100); color: var(--primary-text); font-weight: 700; font-size: 13px; line-height: 1.15; }
.time-chip small { display: block; color: var(--primary-text); font-weight: 500; font-size: 10.5px; }

/* Ficha */
.patient-head { display: flex; gap: 16px; align-items: center; padding: 18px; flex-wrap: wrap; }
.patient-head .avatar { width: 56px; height: 56px; font-size: 19px; }
.patient-head .meta { display: flex; gap: 6px 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 4px; }
.dl { display: grid; grid-template-columns: 180px 1fr; gap: 0; }
.dl dt, .dl dd { padding: 9px 0; border-bottom: 1px solid var(--border); margin: 0; }
.dl dt { color: var(--muted); font-size: 12.5px; font-weight: 600; padding-right: 12px; }
.dl dd { white-space: pre-wrap; word-break: break-word; }
.dl dt:last-of-type, .dl dd:last-of-type { border-bottom: 0; }
.view-section { color: var(--primary-text); text-transform: uppercase; font-size: 12px; letter-spacing: .07em; font-weight: 600; margin: 18px 0 4px; }
.view-section:first-child { margin-top: 0; }

.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; margin-bottom: 14px; }
.tl-item::before { content: ""; position: absolute; left: -22px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--primary-50), 0 0 12px rgba(198,244,50,.6); }
.tl-item .card-body { padding: 14px 16px; }
.tl-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.tl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin-top: 10px; }
.tl-grid div b { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.tl-grid div span { white-space: pre-wrap; }

.compare { display: grid; gap: 0; overflow-x: auto; }
.compare table { min-width: 600px; }
.compare td { vertical-align: top; white-space: pre-wrap; }
.compare th:first-child, .compare td:first-child { width: 190px; color: var(--muted); font-weight: 600; font-size: 12.5px; }

/* Agenda */
.cal-toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.cal-title { font-size: 17px; font-weight: 650; min-width: 220px; }
.week { display: grid; grid-template-columns: 54px repeat(7, minmax(110px, 1fr)); overflow-x: auto; }
.week.day-view { grid-template-columns: 54px 1fr; }
.wk-head { position: sticky; top: 0; background: var(--surface-2); border-bottom: 1px solid var(--border); padding: 8px; text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; z-index: 2; }
.wk-head b { display: block; font-size: 18px; color: var(--text); }
.wk-head.today b { color: var(--primary-ink); background: var(--primary); border-radius: 50%; width: 32px; height: 32px; line-height: 32px; margin: 2px auto 0; box-shadow: 0 0 14px rgba(198,244,50,.45); }
.wk-hours { border-right: 1px solid var(--border); }
.wk-hour { height: 56px; font-size: 11px; color: var(--muted); text-align: right; padding: 2px 6px 0 0; border-bottom: 1px solid transparent; }
.wk-col { position: relative; border-right: 1px solid var(--border); background-image: repeating-linear-gradient(to bottom, transparent 0 55px, var(--border) 55px 56px); cursor: copy; }
.wk-col.today { background-color: rgba(198,244,50,.035); }
.ev { position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 3px 6px; font-size: 11.5px; overflow: hidden; cursor: pointer; border-left: 3px solid; line-height: 1.25; }
.ev b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.agendado { background: #eaf1ff; border-color: #3b6ef0; color: #373b47; }
.ev.confirmado { background: #eef2e3; border-color: #C6F432; color: #21242a; }
.ev.realizado { background: #f0f2ea; border-color: #b1d539; color: #22242B; }
.ev.falta { background: #fdecec; border-color: #dc2626; color: #7f1d1d; }
.ev.cancelado { background: #f1f1f2; border-color: #9c9fa9; color: #5c606a; text-decoration: line-through; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month .m-head { padding: 8px; text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.m-cell { min-height: 108px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 6px; cursor: pointer; overflow: hidden; }
.m-cell:nth-child(7n) { border-right: 0; }
.m-cell.other { background: var(--surface-2); color: #a6a9b2; }
.m-cell .d { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.m-cell.today .d { color: var(--primary-ink); background: var(--primary); border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; }
.m-ev { font-size: 11px; padding: 2px 5px; border-radius: 5px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid; color: var(--text-2); }
.m-ev.agendado { background: #eaf1ff; border-color: #3b6ef0; } .m-ev.confirmado { background: #eef2e3; border-color: #C6F432; }
.m-ev.realizado { background: #f0f2ea; border-color: #b1d539; } .m-ev.falta { background: #fdecec; border-color: #dc2626; }
.m-ev.cancelado { background: #f1f1f2; border-color: #9c9fa9; text-decoration: line-through; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* Gráficos */
.chart svg { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--border); }
.chart text { font-size: 11px; fill: var(--muted); font-family: var(--font); }

/* Login */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; overflow: hidden; background: radial-gradient(900px 520px at 0% 0%, rgba(198,244,50,.35), transparent 55%), radial-gradient(700px 600px at 100% 100%, rgba(198,244,50,.22), transparent 60%), linear-gradient(160deg, #0E0F12 0%, #070709 70%); color: var(--text-2); padding: 56px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--border); }
.auth-art h1 { font-size: 36px; color: #fff; line-height: 1.15; max-width: 470px; margin-top: 40px; letter-spacing: -.03em; }
.auth-art h1 em { font-style: normal; color: var(--brand); }
.auth-art p { max-width: 440px; color: #b7bac1; font-size: 15px; }
.auth-art ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.auth-art li { display: flex; gap: 10px; align-items: center; }
.auth-art li svg { color: var(--brand); }
.auth-form { display: grid; place-items: center; padding: 30px; background: transparent; }
.auth-box { width: min(380px, 100%); }
.auth-box h2 { font-size: 23px; margin-bottom: 6px; }
.auth-box p { color: var(--muted); margin: 0 0 22px; }
.auth-box .btn { width: 100%; padding: 11px; margin-top: 6px; }
.auth-logo-sm { display: none; margin-bottom: 22px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .g-main, .g3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .app.menu-open .sidebar { transform: none; }
  .app.menu-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 30; }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(7,8,9,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; color: var(--text); }
  .topbar b { font-size: 15px; }
  .content { padding: 18px 16px 50px; }
  .g2 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-logo-sm { display: inline-flex; }
}
@media (max-width: 640px) {
  .form-grid.cols-2, .form-grid.cols-3 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px 14px; } .kpi .kpi-val { font-size: 20px; }
  .dl { grid-template-columns: 1fr; } .dl dt { border-bottom: 0; padding-bottom: 0; }
  .tl-grid { grid-template-columns: 1fr; }
  .search .input { min-width: 0; }
  .search { flex: 1; }
  .table th, .table td { padding: 9px 10px; }
  .hide-sm { display: none; }
  .modal-body { padding: 16px; }
  .scale { grid-template-columns: 1fr 40px; } .scale small { display: none; }
  h1 { font-size: 19px; }
}

/* ---------- Modo demonstração ---------- */
.demo-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 30px; background: var(--amber-50); color: #7c3f06; border-bottom: 1px solid #f6dfb5; font-size: 13px; }
.demo-login { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--text); }
.demo-login:hover { border-color: var(--primary); background: var(--primary-50); }
.demo-login small { font-size: 12px; }
.demo-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.demo-divider::before, .demo-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.doc-viewer { position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column; background: #0c0d10; padding-top: env(safe-area-inset-top, 0px); }
.doc-viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px max(16px, env(safe-area-inset-left, 0px)); background: var(--sidebar); color: var(--text-2); font-size: 13px; border-bottom: 1px solid var(--border); }
.doc-viewer iframe { flex: 1; width: 100%; border: 0; background: #e9edf0; }
@media (max-width: 900px) { .topbar { top: env(safe-area-inset-top, 0px); } .demo-banner { padding: 8px 16px; } }
.area-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--primary-50); border: 1px solid var(--primary-100); color: var(--primary-text); font-size: 12px; font-weight: 600; margin-bottom: 10px; }
@media (max-width: 640px) {
  .patient-head .row h1 { font-size: 18px; }
  .list-item { flex-wrap: wrap; }
  .page-head > .row, .cal-toolbar > .row { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .patient-head { align-items: flex-start; }
  .patient-head > .grow { flex: 1 1 calc(100% - 72px); }
  .patient-head > .row { width: 100%; }
}

/* ---------- SaaS: cadastro e assinatura ---------- */
.auth-box .auth-switch { margin: 14px 0 0; text-align: center; font-size: 13.5px; }
.auth-box .auth-switch a { font-weight: 600; }
.terms-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--muted); line-height: 1.4; cursor: pointer; }
.terms-check input { accent-color: var(--primary); margin: 2px 0 0; flex: none; }
.billing-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 32px; background: #f3f5ed; color: var(--text-2); border-bottom: 1px solid var(--border); font-size: 13px; }
.billing-banner svg { color: var(--primary-text); }
.billing-banner span { flex: 1; min-width: 200px; }
.billing-banner.warn { background: var(--amber-50); color: #7c3f06; border-bottom-color: #f6dfb5; }
.billing-banner.warn svg { color: var(--amber); }
.billing-banner .btn { margin-left: auto; }
@media (max-width: 900px) { .billing-banner { padding: 8px 16px; } }

/* ---------- Área administrativa da plataforma ---------- */
.admin-mode .brand small { color: var(--brand); }
.admin-banner { background: #f3f5ed; color: var(--text-2); border-bottom-color: var(--border); }

/* ---------- Aplicativo instalável (PWA) ---------- */
.side-install { padding: 0 12px 10px; }
.install-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; border: 1px dashed rgba(198,244,50,.3); background: transparent; color: var(--sidebar-text); font: inherit; font-weight: 500; cursor: pointer; }
.install-btn:hover { background: rgba(198,244,50,.06); color: #fff; }
.install-btn[hidden], .auth-install .btn[hidden] { display: none; }
.auth-install { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.lang-pick { width: auto; min-width: 130px; padding: 6px 30px 6px 10px; font-size: 13px; }
.lang-pick-inline { width: auto; min-width: 160px; }
.offline-banner { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200; display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 12px; background: #0E0F12; border: 1px solid #0E0F12; color: #fff; font-size: 13px; box-shadow: var(--shadow-lg); }
.offline-banner[hidden] { display: none; }
@media (display-mode: standalone) {
  .topbar { padding-top: env(safe-area-inset-top); }
  .sidebar { padding-top: env(safe-area-inset-top); }
}

/* ---------- Biblioteca de exercícios ---------- */
.ex-filters { gap: 8px; }
.ex-list .list-item { padding: 10px 14px; }
.ex-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary-text); flex: none; }
.ex-sub { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-steps { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.ex-num { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: 12.5px; flex: none; }
.form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
.ex-details { margin-top: 10px; }
.ex-details summary { cursor: pointer; color: var(--primary-text); font-weight: 600; font-size: 13px; }
@media (max-width: 900px) { .form-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* prévia dos modelos de e-mail (admin) — mostra o e-mail como o aluno vê (claro) */
.mail-preview { background: #f3f4f0; border: 1px solid var(--border); border-radius: 12px; padding: 14px; color: #111316; }
.mail-subject { margin-bottom: 10px; font-size: 13.5px; }
.mail-subject small { display: block; color: #555861; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.mail-card { background: #fff; border: 1px solid #dcdde0; border-radius: 12px; padding: 16px 18px; font-size: 14px; }
.mail-card p { margin: 0 0 10px; line-height: 1.5; }
.mail-brand { font-weight: 800; color: #0E0F12; margin-bottom: 10px; letter-spacing: -.03em; font-size: 18px; }
.mail-brand i { font-style: normal; color: #c1f70f; }
.mail-btn { display: inline-block; background: #C6F432; color: #0f1012; padding: 9px 16px; border-radius: 9px; font-weight: 700; margin-top: 4px; }
@media (max-width: 900px) { .tpl-edit { grid-template-columns: 1fr; } }
.switch-row { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.switch-row input { width: 16px; height: 16px; accent-color: var(--primary); }
.qr-box { display: flex; justify-content: center; }
.qr-box svg { width: 210px; height: 210px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.recovery-codes code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; text-align: center; font-size: 14px; letter-spacing: .05em; }
.progress { height: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--grad); transition: width .3s; }
.ev .ev-pay { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 6px; font-size: 10.5px; font-weight: 700; background: rgba(255,255,255,.85); }
.ev .ev-pay.green { color: #31353f; } .ev .ev-pay.amber { color: #b45309; } .ev .ev-pay.gray { color: #3A3E4A; } .ev .ev-pay.blue { color: #1d4ed8; }

/* WhatsApp conectado (Configurações → WhatsApp) */
.wa-connected { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid #dfe3d1; background: linear-gradient(135deg, #f7f8f3, #fff); border-radius: 14px; }
.wa-avatar { position: relative; width: 56px; height: 56px; flex: none; border-radius: 50%; background: #c2e25a; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(194,226,90,.35); }
.wa-check { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: #343842; border: 2px solid var(--surface); display: grid; place-items: center; }
.wa-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.wa-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #343842; font-size: 13px; }
.wa-dot { width: 8px; height: 8px; border-radius: 50%; background: #c2e25a; box-shadow: 0 0 0 3px rgba(194,226,90,.2); }
.wa-phone { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: .2px; }
.wa-disconnect { color: var(--danger) !important; margin-left: auto; }
.wa-sub { margin: 0; font-size: 15px; font-weight: 700; }
.wa-times { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-end; }
.wa-times .field { margin: 0; }
.wa-time-rule { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.wa-photo { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #fff; }
.wa-name { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; color: var(--text); }
.wa-rename { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 3px; border-radius: 6px; display: inline-grid; place-items: center; }
.wa-rename:hover { background: rgba(198,244,50,.12); color: var(--primary-text); }

/* Tutorial guiado do primeiro acesso */
.tour { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.tour-block { position: fixed; background: rgba(3, 3, 4, .74); pointer-events: auto; transition: all .2s ease; }
.tour-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 3px var(--brand), 0 0 26px rgba(198,244,50,.65); pointer-events: none; transition: all .2s ease; animation: tour-pulse 1.6s ease-in-out infinite; }
@keyframes tour-pulse { 50% { box-shadow: 0 0 0 5px var(--brand), 0 0 34px rgba(198,244,50,.85); } }
.tour-card { position: fixed; width: min(340px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); border-radius: 16px; padding: 18px 18px 14px; box-shadow: var(--shadow-lg); pointer-events: auto; display: flex; flex-direction: column; gap: 8px; transition: left .2s ease, top .2s ease; }
.tour-card.center { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(400px, calc(100vw - 24px)); text-align: center; align-items: center; padding: 26px 24px 18px; }
.tour-card h3 { margin: 0; font-size: 17px; color: var(--text); }
.tour-card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.tour-card .tour-tip { background: var(--primary-50); border: 1px solid var(--primary-100); color: var(--primary-text); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.tour-step { font-size: 12px; font-weight: 600; color: var(--primary-text); text-transform: uppercase; letter-spacing: .4px; }
.tour-icon { width: 50px; height: 50px; border-radius: 50%; background: var(--brand-deep); border: 1px solid rgba(198,244,50,.4); color: var(--brand); display: grid; place-items: center; box-shadow: 0 0 24px rgba(198,244,50,.3); }
.tour-icon img { width: 30px; height: 30px; }
.tour-dots { display: flex; gap: 5px; margin-top: 2px; }
.tour-dots span { width: 7px; height: 7px; border-radius: 50%; background: #d8dade; }
.tour-dots span.on { background: var(--primary); width: 18px; border-radius: 4px; }
.tour-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; width: 100%; justify-content: flex-end; }
.tour-card.center .tour-actions { justify-content: center; }

/* aviso de cookies do Pixel do Meta (LGPD) */
.cookie-bar { position: fixed; z-index: 9999; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin: 0 auto; display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  background: #0E0F12; color: #F3F6EB; border-radius: 14px; padding: 14px 16px; box-shadow: 0 12px 40px rgba(7, 8, 9, .35); font: 14px/1.45 Inter, system-ui, sans-serif; }
.cookie-bar p { margin: 0; flex: 1 1 260px; }
.cookie-bar a { color: #C6F432; }
.cookie-actions { display: flex; gap: 8px; margin-left: auto; }
.cookie-bar button { border: 0; border-radius: 10px; padding: 9px 16px; font: 600 14px Inter, system-ui, sans-serif; cursor: pointer; }
.cookie-no { background: transparent; color: #F3F6EB; box-shadow: inset 0 0 0 1px rgba(243, 246, 235, .35); }
.cookie-yes { background: #C6F432; color: #070809; }
@media print { .cookie-bar { display: none; } }

/* Chat de suporte (bolinha no canto inferior direito) */
.sup-root { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.sup-fab { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 18px 0 15px; border: 0; border-radius: 999px; background: var(--primary); color: #0c0d0f; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 10px 28px rgba(7,8,9,.28); transition: transform .15s, box-shadow .15s; }
.sup-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(7,8,9,.32); }
.sup-fab:focus-visible { outline: 3px solid rgba(198,244,50,.45); outline-offset: 3px; }
.sup-fab.on .sup-fab-label { display: none; }
.sup-fab.on { padding: 0 15px; }
.sup-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.sup-panel { width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100vh - 110px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: up .18s; }
.sup-panel[hidden], .sup-badge[hidden] { display: none; }
.sup-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 16px; background: #0E0F12; color: #fff; }
.sup-head .icon-btn { color: #fff; }
.sup-back { font-size: 26px; line-height: 1; width: 32px; height: 32px; }
.sup-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sup-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-title small { opacity: .75; font-size: 11.5px; }
.sup-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.sup-empty { padding: 24px; color: var(--muted); text-align: center; }
.sup-new { padding: 16px; overflow-y: auto; }
.sup-hello { margin: 0; color: var(--muted); }
.sup-list-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.sup-list-top p { margin: 0; font-size: 13px; color: var(--muted); }
.sup-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.sup-item { width: 100%; text-align: left; background: none; border: 0; border-radius: 12px; padding: 10px 12px; font: inherit; color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.sup-item:hover { background: var(--surface-2); }
.sup-item.unread b { color: var(--primary-text); }
.sup-item p { margin: 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-item-top { display: flex; justify-content: space-between; gap: 8px; }
.sup-item-top small { color: var(--muted); white-space: nowrap; }
.sup-item-sub { display: flex; gap: 8px; align-items: center; }
.sup-st { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--muted); }
.sup-st.aberto { background: var(--amber-50); color: #8a5a06; }
.sup-st.respondido { background: var(--primary-50); color: var(--primary-text); }
.sup-dot { font-size: 11px; font-weight: 700; color: #e5484d; }
.sup-status { padding: 8px 14px; font-size: 12px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.sup-status.resolvido { color: var(--green); }
.sup-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.sup-msg { display: flex; flex-direction: column; max-width: 82%; gap: 3px; }
.sup-msg.me { align-self: flex-end; align-items: flex-end; }
.sup-msg.them { align-self: flex-start; }
.sup-bubble { padding: 9px 13px; border-radius: 16px; white-space: pre-wrap; word-break: break-word; line-height: 1.4; font-size: 14px; }
.sup-msg.me .sup-bubble { background: var(--primary); color: #0c0d0f; border-bottom-right-radius: 5px; }
.sup-msg.them .sup-bubble { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.sup-who { font-size: 11px; color: var(--muted); font-weight: 600; }
.sup-time { font-size: 10.5px; color: var(--muted); }
.sup-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--border); background: var(--surface); }
.sup-compose .input { resize: none; max-height: 120px; }
.sup-send { height: 40px; width: 44px; padding: 0; justify-content: center; flex-shrink: 0; }
@media (max-width: 560px) {
  .sup-root { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .sup-fab-label { display: none; }
  .sup-fab { width: 52px; padding: 0; justify-content: center; }
  .sup-panel { position: fixed; inset: 0; width: 100%; height: 100%; border-radius: 0; }
  .sup-fab.on { display: none; }
}
@media print { .sup-root { display: none !important; } }

/* /admin → Suporte */
.nav-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.nav-badge[hidden] { display: none; }
.sp-wrap { display: grid; grid-template-columns: 310px minmax(0, 1fr); height: calc(100vh - 290px); min-height: 480px; overflow: hidden; padding: 0; }
.sp-side { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.sp-side-top { padding: 12px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.sp-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-tab { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.sp-tab.on { background: var(--primary); border-color: var(--primary); color: #0c0d0f; font-weight: 600; }
.sp-list { flex: 1; overflow-y: auto; }
.sp-list ul { list-style: none; margin: 0; padding: 6px; }
.sp-item { width: 100%; text-align: left; background: none; border: 0; border-radius: 12px; padding: 10px 12px; font: inherit; color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.sp-item:hover { background: var(--surface-2); }
.sp-item.on { background: var(--primary-50); box-shadow: inset 3px 0 0 var(--primary); }
.sp-item.unread b { color: var(--primary-text); }
.sp-item-top { display: flex; justify-content: space-between; gap: 8px; }
.sp-item-top small, .sp-item-who { color: var(--muted); font-size: 12px; }
.sp-item-sub { display: flex; gap: 8px; align-items: center; }
.sp-item p { margin: 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-convo { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.sp-convo-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.sp-convo-head h3 { margin: 0 0 6px; }
.sp-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.sp-meta span { display: inline-flex; align-items: center; gap: 5px; }
.sp-others { padding: 8px 16px; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sp-chip { border: 1px solid var(--border-strong); background: var(--surface-2); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12px; cursor: pointer; color: var(--text); }
.sp-msgs { flex: 1; }
.sp-msgs .sup-msg { max-width: 70%; }
.sp-reply { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.sp-reply .input { resize: vertical; }
.sp-placeholder { margin: auto; text-align: center; color: var(--muted); display: grid; justify-items: center; gap: 6px; padding: 30px; }
@media (max-width: 900px) {
  .sp-wrap { grid-template-columns: 1fr; height: auto; }
  .sp-side { border-right: 0; border-bottom: 1px solid var(--border); max-height: 360px; }
  .sp-convo { min-height: 520px; }
}

/* Opinião (botões dos e-mails da jornada) */
.opinion { max-width: 640px; }
.opinion-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.opinion-choices.nps .btn { min-width: 42px; justify-content: center; padding-left: 0; padding-right: 0; }

/* /admin → WhatsApp da Treinzi */
.wa-block { display: flex; flex-direction: column; gap: 6px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.wa-block textarea { resize: vertical; }

/* Admin: cargos com lista de funções */
.role-perms { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.check.role-perm { display: flex; align-items: flex-start; border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.check.role-perm input { margin-top: 3px; }
.check.role-perm span { display: flex; flex-direction: column; gap: 2px; }
.check.role-perm small { font-weight: 400; color: var(--muted); font-size: 12px; }
.role-tags { display: flex; flex-wrap: wrap; gap: 4px; }

/* Mapa muscular (js/musclemap.js) */
.mm-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mm { width: 100%; height: auto; display: block; }
.mm-md { max-width: 300px; }
.mm-sm { max-width: 170px; }
.mm-body { fill: #94a3b8; fill-opacity: .16; stroke: #64748b; stroke-opacity: .45; stroke-width: .6; }
.mm-m { fill: #94a3b8; fill-opacity: .22; stroke: #64748b; stroke-opacity: .35; stroke-width: .4; }
.mm-t { fill: #e5484d; fill-opacity: .88; stroke: #b4232a; stroke-opacity: .8; }
.mm-s { fill: #f59e0b; fill-opacity: .6; stroke: #c27803; stroke-opacity: .6; }
.mm-label { font-size: 8px; fill: #64748b; font-family: inherit; }
.mm-legend { display: flex; gap: 14px; font-size: 12px; color: #64748b; }
.mm-legend span { display: inline-flex; align-items: center; gap: 5px; }
.mm-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.mm-dot.mm-t { background: #e5484d; }
.mm-dot.mm-s { background: #f59e0b; }

/* Direção Pulso: títulos e números em Space Grotesk */
h1, h2, .kpi .kpi-val, .auth-art h1 { font-family: var(--font-display); }
