:root {
  --navy: #0B2A5B;
  --navy-2: #12397A;
  --blue: #1E5EFF;
  --blue-600: #174BD6;
  --blue-50: #EEF3FF;
  --blue-100: #DCE7FF;
  --bg: #F4F7FD;
  --card: #FFFFFF;
  --ink: #0F1E3A;
  --muted: #64738F;
  --line: #E2E9F5;
  --green: #12A150;
  --green-50: #E7F7EE;
  --red: #E0364F;
  --red-50: #FDECEF;
  --amber: #D98A00;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(11, 42, 91, .04), 0 8px 28px rgba(11, 42, 91, .07);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 380px at 10% -120px, #DCE7FF 0%, transparent 70%),
    radial-gradient(900px 300px at 100% -80px, #E6EEFF 0%, transparent 70%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
.eyebrow { margin: 0 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }

/* ───────── topo ───────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 3vw, 36px);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { border-radius: 10px; box-shadow: 0 6px 16px rgba(30, 94, 255, .28); }
.brand strong { display: block; font-size: 19px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.brand span { display: block; font-size: 12.5px; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.wa-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-size: 13.5px; font-weight: 600; transition: .15s;
}
.wa-pill:hover { border-color: var(--blue-100); background: var(--blue-50); }
.wa-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(217, 138, 0, .15); }
.wa-pill.ok .dot { background: var(--green); box-shadow: 0 0 0 4px rgba(18, 161, 80, .15); }
.wa-pill.off .dot { background: var(--red); box-shadow: 0 0 0 4px rgba(224, 54, 79, .15); }
.user { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 14px; text-transform: uppercase;
}

/* ───────── botões ───────── */
.btn-primary, .btn-ghost, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 12px; font-weight: 700; font-size: 14.5px; border: 1px solid transparent; transition: .15s;
}
.btn-primary { background: linear-gradient(180deg, #2C6BFF, var(--blue-600)); color: #fff; box-shadow: 0 6px 16px rgba(30, 94, 255, .28); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .6; transform: none; cursor: progress; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--navy); }
.btn-ghost:hover { background: var(--blue-50); border-color: var(--blue-100); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { filter: brightness(1.06); }
.sm { padding: 7px 13px; font-size: 13px; border-radius: 10px; }
.btn-link { border: 0; background: none; color: var(--blue); font-weight: 600; padding: 0; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; font-size: 20px; line-height: 1; color: var(--navy); transition: .15s;
}
.icon-btn:hover { background: var(--blue-50); border-color: var(--blue-100); }
.icon-btn.sm { width: 30px; height: 30px; font-size: 13px; border-radius: 9px; }
:focus-visible { outline: 3px solid rgba(30, 94, 255, .35); outline-offset: 2px; }

/* ───────── layout ───────── */
.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px;
  padding: 26px clamp(16px, 3vw, 36px) 48px; max-width: 1480px; margin: 0 auto;
}
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ───────── calendário ───────── */
.calendar-card { padding: 22px 22px 16px; }
.cal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.cal-head h1 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; color: var(--navy); text-transform: capitalize; }
.cal-nav { display: flex; gap: 8px; }
.weekdays, .grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekdays span { padding: 0 10px 10px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.grid { gap: 6px; }
.day {
  position: relative; min-height: 118px; padding: 9px 9px 8px; text-align: left;
  border: 1px solid var(--line); border-radius: 14px; background: #fff;
  display: flex; flex-direction: column; gap: 4px; transition: .15s; overflow: hidden;
}
.day:hover { border-color: #B9CCFF; box-shadow: 0 6px 18px rgba(30, 94, 255, .10); transform: translateY(-1px); }
.day.other { background: #FAFBFE; }
.day.other .num { color: #A9B4C8; }
.day.past:not(.other) { background: #FBFCFF; }
.day.past .num { color: #8F9BB3; }
.day .num { font-size: 14px; font-weight: 700; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; }
.day.today .num { background: var(--blue); color: #fff; box-shadow: 0 4px 10px rgba(30, 94, 255, .35); }
.day .add {
  position: absolute; top: 9px; right: 9px; width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center; background: var(--blue-50); color: var(--blue); font-weight: 700; opacity: 0; transition: .15s;
}
.day:hover .add { opacity: 1; }
.ev {
  display: flex; align-items: center; gap: 6px; padding: 4px 7px; border-radius: 7px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden;
  background: var(--blue-50); color: var(--navy-2);
}
.ev b { font-weight: 800; color: var(--blue); flex: none; }
.ev span { overflow: hidden; text-overflow: ellipsis; }
.ev.enviada { background: var(--green-50); color: #0D6B37; }
.ev.enviada b { color: var(--green); }
.ev.erro { background: var(--red-50); color: #A1202F; }
.ev.erro b { color: var(--red); }
.more { font-size: 11.5px; font-weight: 700; color: var(--muted); padding-left: 4px; }
.dots { display: none; gap: 3px; }
.legend { display: flex; gap: 18px; padding: 14px 4px 2px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.st { width: 9px; height: 9px; border-radius: 3px; display: inline-block; background: var(--blue); }
.st.enviada { background: var(--green); } .st.erro { background: var(--red); }

/* ───────── lateral ───────── */
.side { display: flex; flex-direction: column; gap: 16px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat {
  border-radius: 16px; padding: 14px 12px; color: #fff;
  background: linear-gradient(150deg, #2C6BFF, var(--navy)); box-shadow: 0 10px 24px rgba(11, 42, 91, .20);
}
.stat:nth-child(2) { background: linear-gradient(150deg, #3D7BFF, #1B4AB8); }
.stat.danger { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat.danger span { color: var(--red); }
.stat span { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.stat small { font-size: 11.5px; opacity: .85; font-weight: 600; line-height: 1.25; display: block; }
.upcoming { padding: 18px; }
.upcoming-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.upcoming-head h2 { font-size: 17px; color: var(--navy); }
.upcoming-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.up-item {
  display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center;
  padding: 10px 8px; border-radius: 12px; cursor: pointer; transition: .12s;
}
.up-item + .up-item { border-top: 1px solid var(--line); }
.up-item:hover { background: var(--blue-50); }
.up-date { text-align: center; background: var(--blue-50); border-radius: 12px; padding: 6px 0; color: var(--blue); line-height: 1.05; }
.up-date strong { display: block; font-size: 19px; font-weight: 800; }
.up-date small { font-size: 10.5px; font-weight: 700; text-transform: uppercase; }
.up-item.erro .up-date { background: var(--red-50); color: var(--red); }
.up-main { min-width: 0; }
.up-main strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-main small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; font-size: 14px; }
.empty b { display: block; color: var(--navy); font-size: 15px; margin-bottom: 4px; }

/* ───────── overlays ───────── */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(11, 42, 91, .32);
  backdrop-filter: blur(3px); display: flex; justify-content: flex-end; animation: fade .18s ease;
}
.overlay.center { justify-content: center; align-items: center; padding: 16px; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.drawer {
  width: min(980px, 100%); height: 100%; background: var(--bg); display: flex; flex-direction: column;
  box-shadow: -20px 0 60px rgba(11, 42, 91, .2); animation: slide .22s ease;
}
.drawer-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 20px 26px; background: #fff; border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-size: 22px; color: var(--navy); }
.drawer-body { padding: 22px 26px 30px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 18px; }
.modal {
  width: min(480px, 100%); background: #fff; border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(11, 42, 91, .3); animation: pop .18s ease;
}
.modal.small { padding: 24px; }
.modal.small p { color: var(--muted); margin: 8px 0 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ───────── lista do dia ───────── */
.day-list { display: flex; flex-direction: column; gap: 10px; }
.msg {
  display: grid; grid-template-columns: 70px 1fr auto; gap: 16px; align-items: start;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
}
.msg.editing { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30, 94, 255, .14); }
.msg-time { font-size: 20px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.badge { display: inline-block; margin-top: 4px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--blue-50); color: var(--blue); }
.badge.enviada { background: var(--green-50); color: var(--green); }
.badge.erro { background: var(--red-50); color: var(--red); }
.badge.enviando { background: #FFF6E5; color: var(--amber); }
.msg-target { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.msg-target .tag { font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--blue-50); color: var(--blue); }
.msg-body { color: #33415F; font-size: 14px; margin-top: 4px; white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.msg-file { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--blue); text-decoration: none; background: var(--blue-50); padding: 4px 9px; border-radius: 8px; }
.msg-err { color: var(--red); font-size: 12.5px; margin-top: 6px; }
.msg-actions { display: flex; gap: 6px; }
.msg-actions button { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 6px 10px; font-size: 12.5px; font-weight: 600; color: var(--navy); }
.msg-actions button:hover { background: var(--blue-50); }
.msg-actions button.del:hover { background: var(--red-50); color: var(--red); border-color: #F7C6CE; }
.day-empty { background: #fff; border: 1px dashed #C9D6EE; border-radius: 16px; padding: 18px; color: var(--muted); text-align: center; font-size: 14px; }

/* ───────── formulário ───────── */
.msg-form { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); }
.form-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.form-title h3 { font-size: 18px; color: var(--navy); }
.form-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
.form-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span, .field-label-row { font-size: 13px; font-weight: 700; color: var(--navy); }
.field-label-row { display: flex; justify-content: space-between; align-items: center; }
.field input[type=text], .field input[type=date], .field input[type=time], .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #FBFCFF;
  font-size: 15px; transition: .15s; outline: none;
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.5; }
.field input:focus, .field textarea:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(30, 94, 255, .12); }
.hint { color: var(--muted); font-size: 12px; }
.fmt { display: flex; gap: 4px; }
.fmt button { width: 28px; height: 26px; border-radius: 7px; border: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--navy); }
.fmt button:hover { background: var(--blue-50); }

.combo { position: relative; }
.combo input { padding-right: 40px !important; }
.combo.has-value input { background: var(--blue-50) !important; border-color: var(--blue-100) !important; font-weight: 700; color: var(--navy); }
.chip-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: #fff; width: 26px; height: 26px; border-radius: 8px; color: var(--muted); }
.combo-list {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); max-height: 280px; overflow-y: auto;
  list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(11, 42, 91, .16);
}
.combo-list li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.combo-list li:hover, .combo-list li.active { background: var(--blue-50); }
.combo-list .ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: var(--blue-100); color: var(--blue-600); flex: none; }
.combo-list .ic.group { background: var(--navy); color: #fff; }
.combo-list strong { display: block; font-size: 14px; }
.combo-list small { display: block; color: var(--muted); font-size: 12px; }
.combo-list .none { color: var(--muted); font-size: 13px; cursor: default; }
.combo-list .none:hover { background: none; }

.drop {
  display: block; border: 1.5px dashed #BFD0F2; border-radius: 14px; background: #FAFCFF; padding: 16px; cursor: pointer; transition: .15s;
}
.drop:hover, .drop.over { border-color: var(--blue); background: var(--blue-50); }
.drop-empty { display: flex; align-items: center; gap: 14px; color: var(--blue); }
.drop-empty strong { display: block; color: var(--navy); font-size: 14px; }
.drop-empty small { color: var(--muted); font-size: 12px; }
.drop-file { display: flex; align-items: center; gap: 12px; }
.thumb { width: 54px; height: 54px; border-radius: 10px; background: var(--blue-50) center/cover; display: grid; place-items: center; color: var(--red); font-weight: 800; font-size: 12px; flex: none; border: 1px solid var(--line); }
.file-meta { min-width: 0; flex: 1; }
.file-meta strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta small { color: var(--muted); font-size: 12px; }

/* pré-visualização estilo WhatsApp */
.preview { display: flex; flex-direction: column; gap: 8px; }
.preview-label { font-size: 13px; font-weight: 700; color: var(--navy); }
.phone { border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); position: sticky; top: 0; }
.phone-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--navy); color: #fff; font-weight: 700; font-size: 14px; }
.phone-head span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-avatar { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: grid; place-items: center; font-size: 13px; flex: none; }
.phone-chat {
  min-height: 330px; padding: 16px 12px; display: flex; flex-direction: column; justify-content: flex-end;
  background:
    radial-gradient(circle at 20% 20%, rgba(30, 94, 255, .06) 0 2px, transparent 3px) 0 0/22px 22px,
    #EEF3FB;
}
.bubble {
  align-self: flex-end; max-width: 92%; background: #DCE8FF; border-radius: 12px 12px 4px 12px; padding: 6px 8px 4px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .06); font-size: 13.5px; line-height: 1.45;
}
.bubble-media img { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 8px; margin-bottom: 4px; }
.bubble-media .pdf { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .7); border-radius: 8px; padding: 8px; margin-bottom: 4px; font-size: 12.5px; font-weight: 600; }
.bubble-media .pdf b { background: var(--red); color: #fff; font-size: 10px; padding: 3px 5px; border-radius: 4px; }
.bubble-text { white-space: pre-wrap; word-break: break-word; padding: 0 2px; }
.bubble-text em { color: var(--muted); }
.bubble-time { text-align: right; font-size: 10.5px; color: #5C6E91; margin-top: 2px; }

.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-error { margin: 0 auto 0 0; color: var(--red); font-weight: 600; font-size: 14px; }

/* ───────── conexão ───────── */
.wa-body { padding: 24px 26px 28px; }
.qr-wrap { display: grid; place-items: center; padding: 18px; border-radius: 18px; background: var(--blue-50); margin: 0 auto 18px; width: fit-content; }
.qr-wrap img, .qr-wrap canvas { border-radius: 8px; background: #fff; padding: 10px; }
.steps { margin: 0; padding-left: 20px; color: #33415F; font-size: 14px; line-height: 1.7; }
.wa-ok { text-align: center; }
.wa-ok .big { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; background: var(--green-50); color: var(--green); font-size: 30px; }
.wa-ok p { color: var(--muted); margin: 6px 0 20px; }
.wa-ok .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--blue-100); border-top-color: var(--blue); animation: spin 1s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────── vários destinatários ───────── */
.counter { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--blue-50); padding: 2px 8px; border-radius: 999px; }
.counter.full { color: var(--red); background: var(--red-50); }
.recipients {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 7px 8px; min-height: 50px; border: 1.5px solid var(--line); border-radius: 12px; background: #FBFCFF; transition: .15s; cursor: text;
}
.recipients:focus-within { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(30, 94, 255, .12); }
.field .recipients input[type=text] {
  flex: 1; width: auto; min-width: 180px; border: 0; outline: 0; background: transparent; box-shadow: none;
  padding: 5px 6px !important; font-size: 15px;
}
.rchip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 4px 4px 4px 6px; border-radius: 999px; background: var(--blue-50); border: 1px solid var(--blue-100);
  font-size: 13px; font-weight: 600; color: var(--navy);
}
.rchip .mini { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 800; background: var(--blue-100); color: var(--blue-600); flex: none; }
.rchip.group .mini { background: var(--navy); color: #fff; }
.rchip span.n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.rchip button { border: 0; background: #fff; width: 20px; height: 20px; border-radius: 50%; font-size: 10px; color: var(--muted); display: grid; place-items: center; }
.rchip button:hover { background: var(--red-50); color: var(--red); }
.combo-list li .check { margin-left: auto; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 12px; color: transparent; flex: none; }
.combo-list li.sel .check { background: var(--blue); border-color: var(--blue); color: #fff; }
.combo-list li > div { min-width: 0; }
.combo-list li strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-foot { position: sticky; bottom: -6px; background: #fff; padding: 8px 10px 4px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); cursor: default !important; }
.combo-foot:hover { background: #fff !important; }

.ev.parcial { background: #FFF6E5; color: #8A5800; }
.ev.parcial b { color: var(--amber); }
.st.parcial { background: var(--amber); }
.dots i.parcial { background: var(--amber); }
.badge.parcial { background: #FFF6E5; color: var(--amber); }
.up-item.parcial .up-date { background: #FFF6E5; color: var(--amber); }

.msg-targets { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.tchip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--blue-50); color: var(--navy-2); }
.tchip.enviada { background: var(--green-50); color: #0D6B37; }
.tchip.erro { background: var(--red-50); color: #A1202F; }
.tchip.more { background: #fff; border: 1px dashed #C9D6EE; color: var(--muted); cursor: pointer; }
.progress { margin-top: 8px; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.bar { flex: 1; max-width: 220px; height: 6px; border-radius: 99px; background: var(--blue-50); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; background: var(--green); }
.bar i.e { background: var(--red); }
.details { margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.details div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 12px; font-size: 13px; }
.details div + div { border-top: 1px solid var(--line); }
.details small { color: var(--muted); text-align: right; }
.details .erro small { color: var(--red); }
.details .enviada small { color: var(--green); }
.pv-group { font-size: 11px; font-weight: 600; opacity: .75; display: block; }
.wa-intro { background: var(--blue-50); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; color: var(--navy-2); margin-bottom: 18px; line-height: 1.5; }
.wa-start { text-align: center; padding: 8px 0 4px; }
.wa-start .big { margin: 0 auto 6px; }
.wa-start p { color: var(--muted); margin: 6px 0 18px; font-size: 14px; }

/* ───────── toasts ───────── */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: 0 12px 30px rgba(11, 42, 91, .3); animation: pop .18s ease; }
.toast.err { background: var(--red); }

/* ───────── login ───────── */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 16px; background: linear-gradient(160deg, #0B2A5B 0%, #12397A 45%, #1E5EFF 100%); }
.login-card { width: min(400px, 100%); background: #fff; border-radius: 24px; padding: 34px 30px; box-shadow: 0 40px 90px rgba(0, 0, 0, .3); }
.login-card .brand { margin-bottom: 26px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.login-card .btn-primary { margin-top: 6px; padding: 13px; }

/* ───────── responsivo ───────── */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .side { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (max-width: 860px) {
  .form-cols { grid-template-columns: 1fr; }
  .phone-chat { min-height: 180px; }
  .side { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .brand span, .user .btn-ghost { display: none; }
  .wa-pill { padding: 7px 11px; font-size: 12.5px; }
  .calendar-card { padding: 16px 10px 12px; }
  .cal-head { padding: 0 6px; }
  .weekdays span { padding: 0 0 8px; text-align: center; font-size: 10.5px; }
  .grid { gap: 4px; }
  .day { min-height: 62px; padding: 5px; align-items: center; border-radius: 10px; }
  .day .num { width: 26px; height: 26px; font-size: 13px; }
  .day .ev, .day .more, .day .add { display: none; }
  .day .dots { display: flex; }
  .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
  .dots i.enviada { background: var(--green); } .dots i.erro { background: var(--red); }
  .drawer-head, .drawer-body { padding-left: 16px; padding-right: 16px; }
  .msg-form { padding: 16px; }
  .msg { grid-template-columns: 1fr; gap: 6px; }
  .msg-time { font-size: 17px; }
  .row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stats .stat span { font-size: 22px; }
}
