/* SecretarIA 4X — identidade derivada da Dr.4X: marsala bem escuro #6A0F1D (era #901B23), papel #F7F3F0, tinta #161616, Montserrat */
@font-face { font-family: "Montserrat"; src: url("fonts/Montserrat-Variable.ttf") format("truetype"); font-weight: 100 900; }
:root {
  --bg: #f7f3f0; --panel: #fff; --line: #e8dfda; --text: #161616; --muted: #8a7f7a; --ink: #100e0f;
  --wine: #6a0f1d; --wine-2: #b4323f; --wine-soft: #f4e4e6; --neon: #ff2e4d;
  --out: #f8e6e7; --ai: #f2ede8; --warn: #a35c00; --warn-soft: #fbf0df; --chat: #efe8e3;
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif; font-size: 13.5px; color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); height: 100vh; display: flex; flex-direction: column; }
button { font: inherit; cursor: pointer; border: 1px solid var(--wine); background: var(--wine); color: #fff; border-radius: 9px; padding: 8px 16px; font-weight: 600; }
button.ghost { background: transparent; color: var(--wine); }
button.icon { background: transparent; border: none; color: var(--muted); padding: 4px 8px; font-size: 16px; border-radius: 8px; }
button.icon:hover { background: var(--wine-soft); color: var(--wine); }
input, select, textarea { font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: #fff; color: var(--text); width: 100%; outline: none; }
input:focus, textarea:focus { border-color: var(--wine-2); }
textarea { resize: vertical; line-height: 1.5; }
.row { display: flex; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); font-size: 12px; line-height: 1.5; }
.pad { padding: 16px; }

/* topo */
.top { display: flex; align-items: center; gap: 18px; padding: 10px 18px; background: var(--ink); color: #fff; border-bottom: 3px solid var(--wine); }
.brand { display: flex; align-items: center; gap: 9px; }
.brand img { width: 34px; height: 34px; }
.brand .word { height: 30px; width: auto; }
.brand b { font-weight: 800; font-size: 17px; letter-spacing: .14em; }
.brand b span { color: var(--wine-2); margin-left: 3px; letter-spacing: .02em; }
.brand small { font-size: 8.5px; letter-spacing: .2em; text-transform: uppercase; color: #b9aea8; margin-top: 4px; font-weight: 600; }
#tabs { display: flex; gap: 4px; }
#tabs button { white-space: nowrap; background: transparent; border: none; color: #b9aea8; border-radius: 0; padding: 8px 10px; border-bottom: 2px solid transparent; font-weight: 500; }
#tabs button:hover { color: #fff; }
#tabs button.on { color: #fff; font-weight: 700; border-bottom-color: var(--wine-2); }
.top .right { margin-left: auto; display: flex; gap: 8px; }
.top select { width: auto; background: #221d1f; color: #fff; border-color: #3a3234; padding: 6px 10px; font-size: 12.5px; }
#clock { color: #b9aea8; }
#clock.shifted { color: #f2b45a; }

main { flex: 1; min-height: 0; overflow: auto; }

/* conversas */
.inbox { display: grid; grid-template-columns: 300px 1fr; height: 100%; }
.list { background: var(--panel); border-right: 1px solid var(--line); overflow: auto; }
.list-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.list-head .icon { font-size: 20px; color: var(--wine); }
.contact { padding: 12px 14px; border-bottom: 1px solid #f3eeea; cursor: pointer; }
.contact:hover { background: #fcfaf8; }
.contact.sel { background: var(--wine-soft); }
.contact .name { display: flex; justify-content: space-between; font-weight: 600; }
.contact .name small { color: var(--muted); font-weight: 400; font-size: 11px; }
.contact .last { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 3px 0 6px; }
.st { font-size: 10.5px; font-weight: 600; color: var(--wine); }
.st::before { content: "● "; }
.st.warn { color: var(--warn); }
.st.gray { color: var(--muted); }

.chat { display: flex; flex-direction: column; min-height: 0; background: var(--chat); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.who-is { flex: 1; display: flex; flex-direction: column; }
.who-is small { color: var(--muted); font-size: 11px; }
.seg { display: flex; background: #f1ebe7; border-radius: 10px; padding: 3px; }
.seg button { background: transparent; border: none; color: var(--muted); padding: 5px 14px; font-size: 12px; border-radius: 8px; }
.seg button.on { background: #fff; color: var(--wine); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.more { position: relative; }
.more .menu { position: absolute; right: 0; top: 110%; z-index: 9; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 6px; width: 230px; }
.more .menu button { display: block; width: 100%; text-align: left; background: transparent; border: none; color: var(--text); font-weight: 500; padding: 8px 10px; }
.more .menu button:hover { background: var(--wine-soft); }
.more .menu button.danger { color: #b3261e; }

.msgs { flex: 1; overflow: auto; padding: 18px 7%; display: flex; flex-direction: column; gap: 6px; }
.bubble { max-width: 70%; padding: 8px 11px 5px; border-radius: 12px; box-shadow: 0 1px 1px rgba(0,0,0,.06); white-space: pre-wrap; word-wrap: break-word; line-height: 1.45; }
.bubble.in { align-self: flex-start; background: #fff; border-top-left-radius: 4px; }
.bubble.out { align-self: flex-end; background: var(--out); border-top-right-radius: 4px; }
.bubble.out.ai { background: #fff8f4; border: 1px solid #ecd9cf; }
.bubble.template { border: 1px dashed var(--wine-2); }
.bubble .who { font-size: 10.5px; font-weight: 700; color: var(--wine); margin-bottom: 2px; }
.bubble .meta { font-size: 10px; color: var(--muted); text-align: right; margin-top: 2px; }
.bubble audio { width: 250px; height: 36px; display: block; }
.bubble img, .bubble video { max-width: 260px; border-radius: 8px; display: block; }
.bubble .transcript { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 3px; }
.bubble .buttons { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.bubble .buttons span { border: 1px solid #ecd9cf; border-radius: 8px; padding: 3px 9px; font-size: 12px; color: var(--wine); background: #fff; }
.sysnote { align-self: center; font-size: 11px; color: #7d716b; padding: 2px 10px; max-width: 85%; text-align: center; }
.sysnote.alert { background: var(--warn-soft); color: var(--warn); font-weight: 600; border-radius: 8px; padding: 4px 12px; }
.sysnote.skip { opacity: .7; }
.daysep { align-self: center; font-size: 10.5px; background: #e6ddd7; color: #6d5a52; padding: 2px 10px; border-radius: 8px; margin: 6px 0; }

.suggest { margin: 0 7% 8px; background: #fff; border: 1px solid var(--wine-2); border-radius: 14px; padding: 10px 12px; box-shadow: 0 4px 16px rgba(144,27,35,.08); }
.suggest-head { font-size: 12px; font-weight: 700; color: var(--wine); margin-bottom: 6px; }
.suggest-head small { font-weight: 400; color: var(--muted); }
.suggest textarea { margin-bottom: 8px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chips span { background: var(--wine-soft); color: var(--wine); font-size: 11.5px; padding: 3px 9px; border-radius: 99px; }

.composer { display: flex; gap: 6px; align-items: center; padding: 10px 14px; background: var(--panel); border-top: 1px solid var(--line); }
.composer.patient { background: #fbf8f6; }
.composer input { border-radius: 22px; }
.composer .send { border-radius: 50%; width: 40px; height: 40px; padding: 0; font-size: 15px; }
.composer .rec { background: #b3261e; color: #fff; }
.composer { position: relative; }
.emoji-pop { position: absolute; right: 60px; bottom: 58px; z-index: 30; width: min(320px, calc(100vw - 32px)); max-height: 230px; overflow: auto; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 28px rgba(0,0,0,.14); }
.emoji-pop button { background: transparent; border: none; font-size: 21px; padding: 4px 0; border-radius: 8px; }
.emoji-pop button:hover { background: var(--wine-soft); }
.who-is strong { cursor: pointer; }
.who-is strong .edit { font-size: 12px; color: var(--muted); margin-left: 4px; }
.profile-row { display: flex; gap: 8px; }

/* abertura */
.hero { margin: auto; text-align: center; padding: 34px 24px; max-width: 640px; }
.hero > img.hero-logo { width: min(340px, 86%); height: auto; margin-bottom: 4px; }
.hero-name { font-weight: 800; font-size: 34px; letter-spacing: .16em; margin-top: 10px; color: var(--ink); }
.hero-name span { color: var(--wine); letter-spacing: .02em; margin-left: 6px; }
.hero-tag { font-size: 26px; line-height: 1.25; color: var(--ink); font-weight: 800; letter-spacing: -.01em; text-transform: none; margin: 18px 0 10px; }
.hero-tag em { font-style: normal; color: var(--wine); }
.hero-sub { color: #5d524d; font-size: 14.5px; line-height: 1.6; max-width: 520px; margin: 0 auto 24px; }
.feats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; }
.feat { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.feat i { font-style: normal; font-size: 18px; width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 11px; background: var(--wine-soft); }
.feat b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.feat span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
@font-face { font-family: "Great Vibes"; src: url("fonts/GreatVibes-Regular.ttf") format("truetype"); font-display: swap; }
.hero-pitch { font-size: 16px; line-height: 1.5; color: var(--ink); max-width: 520px; margin: 26px auto 6px; }
.hero-pitch b { color: var(--wine); }
.feats-h { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--wine); text-align: left; margin: 22px 2px 10px; }
.hero-care { margin-top: 28px; padding: 30px 20px; border-radius: 16px; background: #141012; color: #fff;
  font-family: "Great Vibes", cursive; font-size: 34px; line-height: 1.25; }
@media (max-width: 600px) { .feats { grid-template-columns: 1fr; } .hero-tag { font-size: 21px; } .hero-care { font-size: 28px; } }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 6px; box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.stat b { display: block; font-size: 24px; font-weight: 800; color: var(--wine); }
.stat span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: left; }
.pillars div { background: rgba(255,255,255,.7); border-left: 3px solid var(--wine); border-radius: 0 10px 10px 0; padding: 9px 12px; font-size: 12.5px; font-weight: 500; }

/* páginas */
.page { max-width: 1000px; margin: 0 auto; padding: 28px 24px 60px; }
.page.narrow { max-width: 720px; }
h1 { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
h2 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--wine); margin: 30px 0 12px; }
.lead { color: var(--muted); margin: 0 0 18px; }
.notice { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 14px; font-size: 12.5px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: #5d524d; margin-bottom: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode { text-align: left; background: #fff; color: var(--text); border: 2px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 5px; font-weight: 400; }
.mode b { font-size: 14px; }
.mode span { font-size: 12px; color: var(--muted); line-height: 1.45; }
.mode.on { border-color: var(--wine); background: var(--wine-soft); }
.mode.on b { color: var(--wine); }

.switch-row { display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 6px 0 12px; }
.switch-row .days { width: 74px; text-align: center; padding: 6px; }
.switch { position: relative; width: 40px; height: 22px; margin: 0; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: #d9cfca; border-radius: 99px; transition: .2s; cursor: pointer; }
.switch i::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + i { background: var(--wine); }
.switch input:checked + i::after { transform: translateX(18px); }
details summary { cursor: pointer; color: var(--wine); font-size: 12.5px; font-weight: 600; margin-bottom: 8px; }

/* acervo */
.drop { border: 2px dashed #d9cbc4; border-radius: 16px; padding: 28px; text-align: center; color: var(--muted); margin-bottom: 18px; background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.drop b { color: var(--text); }
.drop.over { border-color: var(--wine); background: var(--wine-soft); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.media { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.media audio { width: 100%; }
.media img, .media video { width: 100%; max-height: 170px; object-fit: cover; border-radius: 10px; }
.media .title { border: none; font-weight: 700; padding: 4px 2px; }

.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 10px; font-size: 12.5px; z-index: 50; }

/* celular / tela estreita */
.chat-head .back { display: none; font-size: 24px; padding: 0 6px; }
@media (max-width: 760px) {
  .top { gap: 8px 12px; padding: 8px 12px; flex-wrap: wrap; }
  .brand small { display: none; }
  #tabs { order: 3; width: 100%; justify-content: space-around; }
  .top .right { margin-left: auto; }
  .top select { max-width: 130px; }
  .inbox { grid-template-columns: 1fr; }
  .inbox.has-chat .list { display: none; }
  .inbox:not(.has-chat) .chat { display: none; }
  .chat-head { padding: 8px 10px; gap: 8px; }
  .chat-head .back { display: block; }
  .who-is small { display: none; }
  .msgs { padding: 12px; }
  .bubble { max-width: 86%; }
  .suggest { margin: 0 10px 8px; }
  .two, .modes { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: 1fr; }
  .page { padding: 20px 16px 50px; }
}
@media (max-width: 760px) {
  .top .right { order: 2; width: 100%; margin-left: 0; }
  .top select { flex: 1; min-width: 0; max-width: none; }
  body { overflow-x: hidden; }
}
.chat, .composer input { min-width: 0; }
.bubble { overflow-wrap: anywhere; }
@media (max-width: 760px) { .inbox { grid-template-columns: minmax(0, 1fr); } .seg button { padding: 5px 10px; } }
.msgs { overflow-x: hidden; } .bubble audio, .bubble img, .bubble video { max-width: 100%; }

/* v3 */
.modes.three { grid-template-columns: repeat(3, 1fr); margin-bottom: 14px; }
.modes.three .mode { align-items: center; padding: 12px; }
.star { color: #c99a2e; font-weight: 700; }
.st.live, .who-is small.live { color: #2f8f5b; font-style: italic; }
.st.live::before { content: ""; }
.bubble.typing { display: flex; align-items: center; gap: 4px; padding: 10px 14px; font-size: 12px; color: var(--muted); background: #fff8f4; }
.bubble.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--wine-2); opacity: .4; animation: blink 1.2s infinite; }
.bubble.typing i:nth-child(2) { animation-delay: .2s; } .bubble.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: 1; } }
body.team #tabs, body.team .top .right { display: none; }
@media (max-width: 760px) { .modes.three { grid-template-columns: repeat(3, 1fr); } }

/* relatório */
.report { max-width: 920px; }
.rhead { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }
.rhead img { width: 46px; height: 46px; }
.rhead select { width: auto; }
.rhead .grow { flex: 1 1 220px; min-width: 200px; }
.rtitle { font-size: 22px; font-weight: 800; letter-spacing: .01em; }
.rsub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 30px; }
.kpi { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--wine); border-radius: 14px; padding: 18px 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi b { font-size: 30px; font-weight: 800; color: var(--wine); line-height: 1.1; }
.kpi span { font-weight: 700; font-size: 13px; }
.kpi small { color: var(--muted); font-size: 11.5px; }
.rcols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.rcols h2 { margin-top: 0; }
.rline { display: flex; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1ebe7; }
.rline b { min-width: 74px; font-size: 20px; font-weight: 800; color: var(--ink); text-align: right; }
.rline span { color: #5d524d; }
.rfoot { margin-top: 30px; color: var(--muted); font-size: 11px; text-align: center; }
@media (max-width: 760px) { .kpis { grid-template-columns: 1fr 1fr; } .rcols { grid-template-columns: 1fr; } }
@media print {
  .top, .noprint, .toast { display: none !important; }
  body { background: #fff; height: auto; display: block; }
  main { overflow: visible; }
  .page { padding: 10px 0; }
  .kpi, .rline { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 1000px) { .brand small { display: none; } #tabs button { padding: 8px 7px; } .top { gap: 12px; } }
.hours { display: flex; align-items: center; gap: 10px; }
.hours input[type=time] { width: 120px; }
.hours .check { display: flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; font-weight: 500; }
.hours .check input { width: auto; }

/* v4: login, secretária, destaque, ensinar, consultas */
body.auth .top { display: none; }
.login { max-width: 340px; margin: 12vh auto 0; display: flex; flex-direction: column; gap: 10px; text-align: center; padding: 0 16px; }
.login img.hero-logo { width: min(280px, 90%); height: auto; margin: 0 auto 6px; }
.login .hero-name { font-size: 28px; margin: 4px 0 2px; }
.login .err { color: #b3261e; font-size: 12.5px; min-height: 16px; margin: 0; }
body.secretary .admin-only { display: none; }
/* aba Ensine a secretarIA */
.teach-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 14px 0 26px; }
.teach-box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.teach-box h3 { margin: 0; font-size: 15px; }
.teach-box p { margin: 0; }
.teach-box button { align-self: flex-start; }
.lesson .tag { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; margin-bottom: 4px; background: var(--wine-soft); color: var(--wine); }
.lesson .tag.fix { background: var(--warn-soft); color: var(--warn); }
.viewas-btn { background: transparent; border-color: #5a4a4d; color: #fff; padding: 5px 11px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.viewas-btn:hover { border-color: var(--wine-2); }
body.viewas .viewas-btn { background: var(--wine); border-color: var(--wine); }

#who { color: #b9aea8; font-size: 12px; align-self: center; white-space: nowrap; }
.top .icon { color: #b9aea8; }
.top .icon:hover { background: #2b2426; color: #fff; }

.pin-label { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: var(--wine); padding: 6px 14px; }
.pin-label.calm { background: #f1ebe7; color: var(--muted); }
.contact.urgent { background: #fdf1f1; border-left: 4px solid var(--wine); padding-left: 10px; }
.contact.urgent.sel { background: var(--wine-soft); }
.pin-label.mine { background: #f6e7c9; color: #7a5410; }
.contact.mine { background: #fdf8ee; border-left: 4px solid #d9a441; padding-left: 10px; }
.contact.mine.sel { background: #f9eed6; }
.st.urgent { color: var(--wine); font-weight: 800; }
.appt { color: var(--muted); font-weight: 500; }

.modal-bg { position: fixed; inset: 0; background: rgba(16,14,15,.45); display: flex; align-items: center; justify-content: center; z-index: 40; padding: 16px; }
.modal { background: #fff; border-radius: 16px; padding: 20px; width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal h3 { margin: 0 0 4px; font-size: 16px; }
.modal .row.end { margin-top: 6px; }
.suggest.teach { border-color: #c99a2e; }

.sub { font-size: 12px; font-weight: 600; color: #5d524d; margin: 12px 0 6px; }
.chip { background: #fff; color: var(--text); border: 1px solid var(--line); font-weight: 500; padding: 7px 14px; border-radius: 99px; }
.chip.on { background: var(--wine); color: #fff; border-color: var(--wine); }
.hours { flex-wrap: wrap; }
details.qs { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; }
details.qs b { display: block; margin-top: 10px; font-size: 12.5px; }
details.qs ul { margin: 4px 0 0; padding-left: 18px; color: #5d524d; font-size: 12.5px; line-height: 1.6; }
details.qs .row { margin-top: 12px; }
.lessons { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.lesson { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.lesson b { display: block; font-size: 12.5px; }
.lesson div { font-size: 12.5px; }
.formbox { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--wine); border-radius: 12px; padding: 14px 16px; margin-bottom: 6px; }
.formbox p { margin: 0 0 10px; line-height: 1.5; }
.formbox .ok { color: #2f8f5b; font-weight: 600; font-size: 12.5px; }
.btnlink { display: inline-block; border: 1px solid var(--wine); color: var(--wine); border-radius: 9px; padding: 6px 12px; font-size: 12px; font-weight: 600; text-decoration: none; }

/* custo da I.A. (só admin) */
.costbox { margin-top: 26px; padding: 12px 16px; border: 1px dashed #d9c9c4; border-radius: 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #5d524d; }
.costbox b { color: var(--ink); }
.costbox table { border-collapse: collapse; font-size: 13px; }
.costbox th, .costbox td { padding: 4px 12px 4px 0; text-align: left; }
.costbox th { font-weight: 600; color: var(--muted); }
.costbox tr.me td { font-weight: 700; color: var(--ink); }
.days { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.days .chip { min-width: 52px; }
.week { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 10px; }
.wday { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wday .chip { min-width: 96px; }
.wday input[type=time] { width: 110px; }
.wday.off .muted { font-size: 13px; }
.linkbtn { align-self: flex-start; background: none; border: 0; padding: 4px 0; color: var(--wine, #6A0F1D); font-size: 13px; text-decoration: underline; cursor: pointer; }
.needcard { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; background: #fbeeee; border-top: 1px solid #ecd2d4; color: #7a1820; font-size: 13px; font-weight: 600; }
.needcard button { flex: none; }
.st.urgent.late { color: #fff; background: #6A0F1D; padding: 1px 6px; border-radius: 6px; }

/* listas de links (várias fichas do Google, vários Instagram) */
.links { margin: 10px 0 14px; display: grid; gap: 6px; }
.links > b { font-size: 14px; }
.linkrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: 6px; align-items: center; }
.links .linkbtn { justify-self: start; }
@media (max-width: 560px) { .linkrow { grid-template-columns: 1fr auto; } .linkrow input:nth-child(2) { grid-column: 1 / -1; grid-row: 2; } }

/* relatório: período personalizado (de / até) */
.rdates { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rdates label { display: flex; gap: 6px; align-items: center; font-size: 13px; margin: 0; }
.rdates input { width: auto; }

/* WhatsApp do cliente (QR Code) */
#waBar { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 8px 16px;
  background: #fdecea; color: #8a1c14; font-weight: 600; font-size: 14px; border-bottom: 1px solid #f3c3bd; }
#waBar[hidden] { display: none; }
#waBar button { padding: 6px 12px; }
.wabox { display: grid; gap: 10px; justify-items: start; margin-bottom: 8px; }
.wa-line { display: flex; gap: 8px; align-items: center; }
.wadot { width: 10px; height: 10px; border-radius: 50%; background: #b5b5b5; }
.wadot.connected { background: #1f9d55; } .wadot.reconnecting, .wadot.connecting, .wadot.qr { background: #e0a100; }
.wadot.removed { background: #c62828; }
.qrbox { display: grid; gap: 10px; justify-items: center; text-align: left; }
.qrbox img { width: 260px; max-width: 100%; height: auto; image-rendering: pixelated; border: 8px solid #fff; border-radius: 8px; }
.qrbox ol { margin: 0; padding-left: 20px; font-size: 14px; }
.qrbox .ok { font-weight: 700; color: #1f9d55; }
/* sininho de alertas */
.bell { position: relative; }
#bellN { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: #c62828; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
#bellN[hidden] { display: none; }
.alerts { display: grid; gap: 8px; max-height: 40vh; overflow: auto; margin-bottom: 12px; }
.alertrow { display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; background: rgba(0,0,0,.04); font-size: 14px; }
.alertrow.new { background: #fdecea; }
.alertfoot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.alertfoot button.small { padding: 4px 12px; font-size: 13px; }
.wabox.flash { box-shadow: 0 0 0 3px #c0392b; transition: box-shadow .3s; }

.login .linkbtn { justify-self: center; align-self: center; margin: 0 auto; display: block; }

/* modo de teste do WhatsApp */
.testmode { display: grid; gap: 8px; padding: 10px 12px; border: 1px dashed #c9c9c9; border-radius: 10px; width: 100%; }
.testmode.on { border-color: #e0a100; background: #fff8e6; }
.testmode label { display: grid; gap: 6px; }
.testmode .ghost { justify-self: start; }

/* Acervo: grupos de variações (a I.A. sorteia uma) */
.mg-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.mgroups { display: grid; gap: 14px; margin: 10px 0 18px; }
.mgroup { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid rgba(0,0,0,.1); border-radius: 12px; background: rgba(0,0,0,.02); }
.mg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.mg-name { font-weight: 700; font-size: 16px; border: 0; background: transparent; padding: 2px 0; min-width: 0; flex: 0 1 260px; }
.mg-name:focus { outline: 1px dashed currentColor; }
.mg-items { display: grid; gap: 6px; }
.mg-item { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.mg-item audio { width: 100%; height: 34px; }
.mg-item img, .mg-item video { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; }
.mgroup .linkbtn { justify-self: start; }
.media select.grp { width: 100%; }
@media (max-width: 560px) { .mg-item { grid-template-columns: 1fr auto auto; } .mg-item > :first-child { grid-column: 1 / -1; } }

/* Acervo enxuto: uma linha por grupo, abre com "Ver áudios" */
.mrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid rgba(0,0,0,.1); border-radius: 12px; }
.mrow .grow { display: grid; gap: 2px; min-width: 0; }
.mrow b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mgroups { gap: 10px; }
.mg-bar h1 { margin: 0; }
.mg-head { justify-content: space-between; }
.mrow b { white-space: normal; overflow: visible; }
.mg-foot { justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.linkbtn.danger { color: #c62828; }
.mg-name { flex: 1 1 auto; width: 100%; }

.costtotal { font-size: 15px; margin: 6px 0 10px; }
.costtotal strong { color: var(--wine); font-size: 18px; }
.top .right { flex-wrap: wrap; justify-content: flex-end; }
.top .right select { flex: 0 0 auto; min-width: 118px; }
#csearch { padding: 8px 12px; border-bottom: 1px solid var(--line); }
#csearch[hidden] { display: none; }
.list-head .row { gap: 2px; }
.list-head .icon { font-size: 17px; }
.filechip { display: inline-block; padding: 7px 11px; border-radius: 9px; background: rgba(0,0,0,.05); color: inherit; text-decoration: none; font-weight: 600; margin-bottom: 4px; word-break: break-all; }
/* cadastrar o aniversário do paciente: verde neon discreto, pulsando na frente do nome até a secretária preencher */
.who-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.bday-cta { padding: 3px 10px; font-size: 11px; font-weight: 700; line-height: 1.5; color: #06210a; background: #39ff14; border: 1px solid #2ee80d; border-radius: 99px; white-space: nowrap; animation: bday-pulse 1.4s ease-in-out infinite; }
.bday-cta:hover { background: #5cff3f; }
@keyframes bday-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(57,255,20,.8); } 50% { box-shadow: 0 0 0 7px rgba(57,255,20,0); } }
button.danger { background: #fff; color: #b3261e; border-color: #b3261e; }
button.danger:hover { background: #b3261e; color: #fff; }
.modal .modes.three .mode { align-items: center; text-align: center; padding: 12px 8px; }
button.danger.armed { background: #b3261e; color: #fff; }
.pick-list { display: grid; gap: 6px; max-height: 45vh; overflow: auto; margin: 6px 0 10px; }
.pick { text-align: left; background: #fff; color: var(--text); border: 1.5px solid var(--line); font-weight: 600; }
.pick.on { border-color: #b3261e; background: #fdecea; color: #b3261e; }
button:disabled { opacity: .45; cursor: not-allowed; }
/* disparos */
.camps { display: grid; gap: 12px; margin-top: 14px; }
.camp { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 8px; }
.camp.new { margin-top: 14px; }
.camp.live { border-color: var(--wine-2); }
.camp-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.camp-st { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: #eee; }
.camp-st.running { background: #e3f7e0; color: #1b6e12; }
.camp-st.paused { background: var(--warn-soft); color: var(--warn); }
.camp-st.done { background: var(--wine-soft); color: var(--wine); }
.camp-bar { height: 6px; background: #efe7e2; border-radius: 99px; overflow: hidden; }
.camp-bar i { display: block; height: 100%; background: var(--wine); }
.camp-warn { color: var(--warn); font-weight: 600; font-size: 12.5px; }
.camp-goal summary, .camp-rules summary { cursor: pointer; color: var(--wine); font-weight: 600; font-size: 12.5px; }
.camp-goal p { margin: 6px 0 0; white-space: pre-wrap; }
.camp-rules { margin: 4px 0 14px; } .camp-rules ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.6; font-size: 12.5px; color: #5d524d; }
.camp-prev { display: grid; gap: 6px; }
.camp-prev .bubble { max-width: 100%; }
.camp-err { color: #b3261e; font-weight: 600; margin: 0; }
.camp-err:empty { display: none; }
.camp-old-btn { margin-top: 14px; }
.camp-prev { gap: 14px; }
.camp-flow { display: flex; flex-direction: column; gap: 6px; background: #efe7e2; border-radius: 12px; padding: 12px; }
.camp-flow .bubble { max-width: 85%; }
.camp-flow-h { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* tela inicial compacta: tudo visível sem rolar */
.hero { max-width: 920px; padding: 18px 24px; }
.hero > img.hero-logo { width: min(250px, 70%); margin-bottom: 0; }
.hero-tag { font-size: 21px; margin: 10px 0 4px; }
.hero-pitch { font-size: 14px; margin: 0 auto 14px; max-width: 600px; }
.hero .stats { margin-bottom: 12px; gap: 8px; }
.hero .stat { padding: 8px 6px; border-radius: 12px; }
.hero .stat b { font-size: 20px; }
.gains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: left; }
.gain { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.gain h3 { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--wine); margin: 0 0 8px; }
.gain ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gain li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.35; color: var(--ink); }
.gain li i { font-style: normal; flex: 0 0 18px; text-align: center; }
.hero-care { margin-top: 12px; padding: 12px 16px; font-size: 26px; border-radius: 14px; }
@media (max-width: 900px) { .gains { grid-template-columns: 1fr; } .hero-care { font-size: 22px; } }
/* frase manuscrita integrada à tela, sem faixa escura (usuário, 2026-11-02) */
.hero-care { background: none; color: var(--wine); padding: 4px 0 0; margin-top: 10px; font-size: 32px; }
