/* Vendalo CRM — design system (identidade "O Ponto Verde") */
:root {
  --ink: #0E1525;
  --ink-2: #3A4356;
  --muted: #8A93A6;
  --bg: #F7F8FB;
  --card: #FFFFFF;
  --border: #E8ECF3;
  --accent: #2453FF;
  --accent-soft: #EDF1FF;
  --green: #0FA968;
  --green-soft: #E7F7F0;
  --amber: #E8A23D;
  --amber-soft: #FDF4E4;
  --red: #E5484D;
  --red-soft: #FDECEC;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(14,21,37,.05);
  --shadow-lg: 0 12px 40px rgba(14,21,37,.14);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body { font-family: 'Inter', -apple-system, sans-serif; background: var(--bg); color: var(--ink); font-size: 14px; -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: var(--accent); text-decoration: none; cursor: pointer; }

/* ---------- login ---------- */
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #FBFCFE 40%, #EDF1FF 100%); }
.login-card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 48px; width: 400px; box-shadow: var(--shadow-lg); }
.login-logo { font-size: 30px; font-weight: 800; letter-spacing: -.045em; display: flex; align-items: center; gap: 9px; }
.login-logo span, .logo span { color: var(--green); }
.vmark { width: 1.1em; height: 1.1em; flex-shrink: 0; }
.login-sub { color: var(--muted); margin: 8px 0 32px; }
.login-card label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 16px 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.login-card input { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; outline: none; transition: border .15s; }
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-error { background: var(--red-soft); color: var(--red); padding: 10px 14px; border-radius: 10px; margin-top: 16px; font-size: 13px; }
.btn-block { width: 100%; margin-top: 24px; padding: 13px !important; font-size: 15px !important; }

/* ---------- shell ---------- */
.app { display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: 224px; background: var(--card); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.logo { font-size: 21px; font-weight: 800; letter-spacing: -.045em; padding: 24px 24px 28px; display: flex; align-items: center; gap: 7px; }
.sidebar nav { flex: 1; padding: 0 12px; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; color: var(--ink-2); font-weight: 500; margin-bottom: 2px; transition: all .12s; }
.sidebar nav a svg { width: 17px; height: 17px; fill: currentColor; opacity: .75; }
.sidebar nav a:hover { background: var(--bg); }
.sidebar nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sidebar-footer { padding: 16px; border-top: 1px solid var(--border); }
.view-toggle { display: block; width: 100%; padding: 7px 10px; margin-bottom: 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--ink-2); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s; text-align: center; }
.view-toggle:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.user-info { font-size: 13px; font-weight: 600; line-height: 1.3; }
.user-info a { font-size: 11px; color: var(--muted); font-weight: 500; }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; background: var(--card); border-bottom: 1px solid var(--border); }
.company-tabs { display: flex; gap: 6px; }
.company-tab { padding: 8px 16px; border-radius: 100px; border: 1px solid var(--border); background: var(--card); font-weight: 600; font-size: 13px; color: var(--ink-2); transition: all .12s; display: flex; align-items: center; gap: 8px; }
.company-tab .dot { width: 8px; height: 8px; border-radius: 50%; }
.company-tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary { background: var(--accent); color: #fff; border: none; padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 13.5px; transition: all .12s; }
.btn-primary:hover { background: #1B41D8; }
.btn-ghost { background: var(--card); border: 1px solid var(--border); color: var(--ink-2); padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: 13px; }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: var(--red-soft); color: var(--red); border: none; padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: 13px; }
.btn-success { background: var(--green); color: #fff; border: none; padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: 13px; }

main#view { flex: 1; overflow: auto; padding: 28px; }

.page-title { font-size: 21px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 4px; }
.page-sub { color: var(--muted); margin-bottom: 24px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.page-head .page-sub { margin-bottom: 0; }

/* ---------- dashboard ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.kpi .label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kpi .value { font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin-top: 6px; }
.kpi .delta { font-size: 12px; margin-top: 4px; color: var(--muted); }
.kpi.hero .value { color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-bottom: 14px; }
.grid-2b { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.chart-wrap { position: relative; height: 260px; }

/* heatmap */
.heatmap { display: grid; grid-template-columns: 34px repeat(24, 1fr); gap: 3px; font-size: 10px; color: var(--muted); }
.heatmap .hm-cell { aspect-ratio: 1; border-radius: 3px; background: var(--bg); }
.heatmap .hm-label { display: flex; align-items: center; font-weight: 600; }
.heatmap .hm-hour { text-align: center; }

/* ---------- kanban ---------- */
.kanban-wrap { height: 100%; display: flex; flex-direction: column; }
.kanban-filters { display: flex; gap: 10px; margin-bottom: 18px; align-items: center; }
.kanban { display: flex; gap: 14px; overflow-x: auto; flex: 1; padding-bottom: 12px; align-items: flex-start; }
.kcol { min-width: 292px; width: 292px; background: #F1F3F8; border-radius: 14px; padding: 10px; flex-shrink: 0; max-height: 100%; display: flex; flex-direction: column; }
.kcol-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px 12px; }
.kcol-head .kname { font-weight: 700; font-size: 13.5px; }
.kcol-head .kcount { background: var(--muted); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; min-width: 20px; text-align: center; }
.kcol-head .kmeta { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-left: auto; }
.kcol-cards { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 60px; flex: 1; border-radius: 10px; }
.kcol-cards.dragover { outline: 2px dashed var(--accent); outline-offset: -2px; background: var(--accent-soft); transition: background .15s; }
.kcard { background: var(--card); border: 1px solid var(--border); border-radius: 11px; padding: 13px 14px; cursor: grab; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s, opacity .15s; }
.kcard:hover { box-shadow: 0 4px 14px rgba(14,21,37,.1); transform: translateY(-1px); }
.kcard.dragging { opacity: .4; transform: rotate(-2deg) scale(.95); box-shadow: 0 8px 24px rgba(14,21,37,.18); cursor: grabbing; }
.kcard .ktitle { font-weight: 600; font-size: 13.5px; line-height: 1.35; margin-bottom: 4px; }
.kcard .kcontact { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.kcard .kfoot { display: flex; align-items: center; justify-content: space-between; }
.kcard .kvalue { font-weight: 700; font-size: 13px; }
.kcard .kright { display: flex; align-items: center; gap: 7px; }
.kcard .avatar { width: 22px; height: 22px; font-size: 9.5px; }
.chip { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 100px; background: var(--accent-soft); color: var(--accent); }
/* tags no card do kanban */
.ktags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.ktag { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--bg); color: var(--ink-2); }
.ktag-add { cursor: pointer; background: none; color: var(--muted); font-size: 13px; font-weight: 800; padding: 0 6px; opacity: .35; transition: opacity .15s; line-height: 18px; }
.kcard:hover .ktag-add { opacity: .8; }
.ktag-add:hover { opacity: 1 !important; color: var(--accent); }
.ktag-popup { position: absolute; top: 100%; left: 0; right: 0; z-index: 50; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px; box-shadow: 0 8px 32px rgba(14,21,37,.18); margin-top: 6px; }
.ktag-popup-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 10px; }
.ktag-popup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ktag-opt { font-size: 11.5px; font-weight: 600; padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--border); cursor: pointer; transition: all .15s; user-select: none; background: var(--card); color: var(--ink-2); text-align: left; font-family: inherit; }
.ktag-opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.ktag-opt.on { border-color: transparent; font-weight: 700; }
/* tags pré-definidas no drawer */
.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip { font-size: 11.5px; font-weight: 600; padding: 5px 12px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--card); color: var(--ink-2); cursor: pointer; transition: all .15s; user-select: none; }
.tag-chip:hover { border-color: var(--accent); color: var(--accent); }
.tag-chip.on { border-color: transparent; font-weight: 700; }
.sla-dot { width: 8px; height: 8px; border-radius: 50%; }
.sla-ok { background: var(--green); } .sla-warn { background: var(--amber); } .sla-late { background: var(--red); }

/* direcionamento */
.dir-kpis { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.dir-kpi { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 20px; min-width: 130px; }
.dir-kpi .n { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.dir-kpi .l { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.dir-kpi.bad .n { color: var(--red); } .dir-kpi.warn .n { color: var(--amber); } .dir-kpi.ok .n { color: var(--green); }
.dir-papo { display: flex; gap: 14px; background: var(--ink); color: #fff; border-radius: 16px; padding: 20px 22px; margin-bottom: 14px; font-size: 15px; line-height: 1.6; font-weight: 500; }
.dir-papo-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--green)); display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.dir-papo-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #9DB0FF; margin-bottom: 5px; }
.dir-prog { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-size: 12px; font-weight: 700; color: var(--muted); }
.dir-prog-bar { flex: 1; height: 7px; background: var(--bg); border-radius: 100px; overflow: hidden; }
.dir-prog-bar i { display: block; height: 100%; background: var(--green); border-radius: 100px; transition: width .3s ease; }
.dir-acao { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: 13px; margin-bottom: 10px; transition: all .15s; }
.dir-acao:hover { box-shadow: var(--shadow); }
.dir-acao.done { opacity: .5; }
.dir-acao.done .dir-txt .t { text-decoration: line-through; }
.dir-check input { width: 18px; height: 18px; accent-color: var(--green); margin-top: 4px; cursor: pointer; }
.dir-num { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.dir-acao.done .dir-num { background: var(--green-soft); color: var(--green); }
.dir-txt { flex: 1; min-width: 0; }
.dir-txt .t { font-weight: 700; font-size: 14.5px; line-height: 1.35; }
.dir-txt .m { font-size: 13px; color: var(--ink-2); margin-top: 3px; line-height: 1.45; }
.dir-txt .d { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.dir-btns { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.dir-foco { margin-top: 16px; padding: 13px 16px; background: var(--green-soft); color: var(--green); border-radius: 11px; font-weight: 700; font-size: 13.5px; }

/* whatsapp */
.btn-wa { display: inline-flex; align-items: center; gap: 7px; background: var(--green); color: #fff; border: none; padding: 8px 15px; border-radius: 10px; font-weight: 700; font-size: 12.5px; margin-top: 10px; transition: background .12s; }
.btn-wa:hover { background: #0C8A55; }

/* ---------- drawer ---------- */
.drawer-overlay, .modal-overlay { position: fixed; inset: 0; background: rgba(14,21,37,.4); z-index: 40; backdrop-filter: blur(2px); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 460px; background: var(--card); z-index: 50; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slideIn .18s ease; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 24px 26px 18px; border-bottom: 1px solid var(--border); }
.drawer-head .d-title { font-size: 17px; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 2px; }
.drawer-head .d-sub { color: var(--muted); font-size: 13px; }
.drawer-close { position: absolute; top: 18px; right: 20px; background: none; border: none; font-size: 22px; color: var(--muted); line-height: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 26px; }
.drawer-actions { display: flex; gap: 8px; padding: 16px 26px; border-top: 1px solid var(--border); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 22px; }
.field label { display: block; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.field .fval { font-weight: 600; font-size: 13.5px; }
.field input, .field select { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; outline: none; }
.timeline { margin-top: 6px; }
.timeline h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 12px; }
.tl-item { display: flex; gap: 12px; padding-bottom: 16px; position: relative; }
.tl-item::before { content: ''; position: absolute; left: 5px; top: 18px; bottom: 0; width: 1.5px; background: var(--border); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent-soft); border: 2.5px solid var(--accent); flex-shrink: 0; margin-top: 3px; }
.tl-item.sys .tl-dot { border-color: var(--muted); background: var(--bg); }
.tl-content { flex: 1; }
.tl-content .tl-text { font-size: 13px; line-height: 1.45; white-space: pre-wrap; }
.tl-content .tl-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.note-box { display: flex; gap: 8px; margin-bottom: 20px; }
.note-box textarea { flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; resize: none; height: 42px; outline: none; }
.note-box textarea:focus { border-color: var(--accent); }

/* ---------- modal ---------- */
.modal-overlay { display: flex; align-items: center; justify-content: center; z-index: 60; }
.modal { background: var(--card); border-radius: 18px; width: 480px; max-width: 92vw; padding: 30px; box-shadow: var(--shadow-lg); max-height: 88vh; overflow-y: auto; }
.modal h2 { font-size: 18px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 20px; }
.modal .field { margin-bottom: 14px; }
.modal .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 24px; }

/* ---------- tables ---------- */
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 12px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--bg); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* funil de conversão */
.fbar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.fbar-label { width: 140px; font-size: 12.5px; font-weight: 600; text-align: right; color: var(--ink-2); }
.fbar-track { flex: 1; }
.fbar { height: 30px; background: linear-gradient(90deg, var(--accent), #5B7FFF); border-radius: 7px; display: flex; align-items: center; padding: 0 12px; color: #fff; font-weight: 700; font-size: 12.5px; min-width: 44px; transition: width .4s ease; }
.fbar-conv { width: 70px; font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* filtros */
.filters { display: flex; gap: 10px; margin-bottom: 22px; align-items: center; flex-wrap: wrap; }
.filters select, .filters input { padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); outline: none; font-weight: 500; }
.search-input { min-width: 260px; }

/* ---------- IA ---------- */
.ai-hero { background: linear-gradient(135deg, var(--ink) 0%, #1B2A4E 100%); border-radius: 18px; padding: 36px; color: #fff; margin-bottom: 20px; }
.ai-hero h2 { font-size: 22px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 6px; }
.ai-hero p { color: rgba(255,255,255,.65); margin-bottom: 22px; max-width: 560px; line-height: 1.5; }
.ai-hero .ai-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.ai-hero input { flex: 1; min-width: 280px; padding: 12px 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; outline: none; }
.ai-hero input::placeholder { color: rgba(255,255,255,.4); }
.ai-result { line-height: 1.65; font-size: 14.5px; }
.ai-result h1, .ai-result h2, .ai-result h3 { margin: 20px 0 10px; letter-spacing: -.02em; }
.ai-result h2 { font-size: 17px; } .ai-result h3 { font-size: 15px; }
.ai-result ul, .ai-result ol { padding-left: 22px; margin: 8px 0; }
.ai-result li { margin-bottom: 5px; }
.ai-result strong { color: var(--accent); }
.ai-result table { border-collapse: collapse; margin: 12px 0; }
.ai-result th, .ai-result td { border: 1px solid var(--border); padding: 7px 12px; font-size: 13px; }
.ai-loading { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 30px 0; justify-content: center; }
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* config */
.code-block { background: var(--ink); color: #A9C1FF; padding: 16px 18px; border-radius: 10px; font-family: 'SF Mono', Menlo, monospace; font-size: 12px; overflow-x: auto; white-space: pre; line-height: 1.6; margin-top: 10px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; }
.pill.on { background: var(--green-soft); color: var(--green); }
.pill.off { background: var(--red-soft); color: var(--red); }

/* drawer tabs */
.dtabs { display: flex; gap: 2px; padding: 0 26px; border-bottom: 1px solid var(--border); background: var(--card); }
.dtab { background: none; border: none; padding: 11px 14px; font-weight: 600; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.dtab.active { color: var(--accent); border-bottom-color: var(--accent); }
.dtab .cnt { background: var(--bg); border-radius: 100px; padding: 1px 7px; font-size: 10.5px; margin-left: 4px; color: var(--ink-2); }

/* temperatura */
.temp-group { display: flex; gap: 6px; }
.temp-btn { flex: 1; padding: 7px 0; border-radius: 8px; border: 1px solid var(--border); background: var(--card); font-weight: 600; font-size: 12px; color: var(--muted); }
.temp-btn.active[data-t="frio"] { background: #EDF4FD; color: #2176C7; border-color: #B9D9F5; }
.temp-btn.active[data-t="morno"] { background: var(--amber-soft); color: #B77B1E; border-color: #F2D9AC; }
.temp-btn.active[data-t="quente"] { background: var(--red-soft); color: var(--red); border-color: #F5BDBF; }

/* arquivos */
.file-drop { border: 1.5px dashed var(--border); border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); font-size: 13px; cursor: pointer; transition: all .15s; margin-bottom: 14px; }
.file-drop:hover, .file-drop.dragover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.file-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; }
.file-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; flex-shrink: 0; text-transform: uppercase; }
.file-info { flex: 1; min-width: 0; }
.file-info .fname { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-info .fmeta { font-size: 11px; color: var(--muted); }
.file-actions { display: flex; gap: 4px; }
.icon-btn { background: none; border: none; color: var(--muted); font-size: 15px; padding: 5px 7px; border-radius: 7px; }
.icon-btn:hover { background: var(--bg); color: var(--ink); }

/* tarefas */
.task-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; }
.task-item.overdue { border-color: #F5BDBF; background: #FFFAFA; }
.task-item.done-task { opacity: .5; }
.task-item.done-task .task-text { text-decoration: line-through; }
.task-check { width: 18px; height: 18px; accent-color: var(--green); margin-top: 1px; cursor: pointer; }
.task-text { font-size: 13px; font-weight: 500; flex: 1; }
.task-due { font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.task-item.overdue .task-due { color: var(--red); }
.task-add { display: flex; gap: 8px; margin-bottom: 14px; }
.task-add input[type=text] { flex: 1; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; outline: none; }
.task-add input[type=date] { padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px; outline: none; }

.field textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; outline: none; resize: vertical; min-height: 64px; font-size: 13px; }
.link-row { color: var(--accent); font-weight: 600; font-size: 12.5px; cursor: pointer; }
.tag-chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 100px; background: var(--bg); color: var(--ink-2); border: 1px solid var(--border); margin: 0 4px 4px 0; }
.tbl tr.clickable { cursor: pointer; }

/* radios (modal de perda etc) */
label.radio-row, .field label.radio-row { display: flex; align-items: center; justify-content: flex-start; gap: 10px; text-align: left;
  font-size: 13.5px; font-weight: 500; color: var(--ink); text-transform: none; letter-spacing: 0;
  margin: 8px 0; cursor: pointer; padding: 10px 13px; border: 1px solid var(--border); border-radius: 10px; transition: all .12s; }
label.radio-row:hover { border-color: var(--accent); background: var(--accent-soft); }
label.radio-row input { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; margin: 0; }

/* toast */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 100px; font-weight: 600; font-size: 13.5px; z-index: 100; box-shadow: var(--shadow-lg); animation: slideUp .2s ease; }
@keyframes slideUp { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #D3D9E4; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Inbox — SDR IA WhatsApp ---------- */
.nav-badge { margin-left: auto; background: var(--green); color: #fff; font-size: 10.5px; font-weight: 800; border-radius: 999px; padding: 2px 7px; min-width: 18px; text-align: center; }
.inbox-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 14px; height: calc(100vh - 170px); min-height: 420px; }
.inbox-list { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow-y: auto; box-shadow: var(--shadow); }
.ib-item { padding: 11px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.ib-item:hover { background: var(--bg); }
.ib-item.active { background: var(--accent-soft); }
.ib-item-top { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; }
.ib-unread { background: var(--green); color: #fff; font-size: 10.5px; font-weight: 800; border-radius: 999px; padding: 2px 7px; }
.ib-wa-btn { text-decoration: none; font-size: 14px; padding: 2px 5px; border-radius: 6px; opacity: .5; transition: opacity .15s; }
.ib-wa-btn:hover { opacity: 1; background: var(--accent-soft); }
.ib-item-prev { font-size: 12px; color: var(--muted); margin: 3px 0 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-item-meta { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--muted); }
.ib-badge { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; border-radius: 6px; padding: 2px 7px; }
.ib-b-ia { background: var(--accent-soft); color: var(--accent); }
.ib-b-hum { background: var(--amber-soft); color: var(--amber); }
.ib-b-ok { background: var(--green-soft); color: var(--green); }
.ib-b-off { background: var(--bg); color: var(--muted); }
.ib-b-lost { background: var(--red-soft, #fde8e8); color: var(--red, #d32f2f); }
.ib-b-camp { background: var(--purple-soft, #f3e8ff); color: var(--purple, #7c3aed); }
.inbox-thread { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow); }
.inbox-empty { margin: auto; color: var(--muted); font-size: 13.5px; }
.ib-thread-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ib-thread-actions { display: flex; gap: 8px; }
.ib-msgs { flex: 1; overflow-y: auto; padding: 16px; background: #EFEAE2; display: flex; flex-direction: column; gap: 6px; }
.ib-msg { display: flex; }
.ib-msg.out { justify-content: flex-end; }
.ib-bubble { max-width: 72%; padding: 7px 11px; border-radius: 10px; font-size: 13px; line-height: 1.45; background: #fff; box-shadow: 0 1px 1px rgba(14,21,37,.08); white-space: pre-wrap; word-break: break-word; }
.ib-msg.out .ib-bubble { background: #D9FDD3; }
.ib-bubble.failed { background: var(--red-soft); }
.ib-msg-meta { font-size: 10.5px; color: var(--muted); margin-top: 3px; text-align: right; }
.ib-tick { color: var(--muted); }
.ib-tick.read { color: #53BDEB; }
.ib-tick.fail { color: var(--red); }
.ib-input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); background: var(--card); }
.ib-input input { flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 13.5px; font-family: inherit; }
@media (max-width: 900px) { .inbox-wrap { grid-template-columns: 1fr; height: auto; } .inbox-thread { height: 70vh; } }
#ib-mic.rec { background: var(--red-soft); color: var(--red); border-color: var(--red); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .55; } }

/* ---------- Agenda ---------- */
.ag-week { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.ag-day { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; min-height: 300px; box-shadow: var(--shadow); }
.ag-day.today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.ag-day-head { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin-bottom: 8px; display: flex; justify-content: space-between; }
.ag-ev { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 8px; padding: 7px 9px; margin-bottom: 7px; cursor: pointer; background: var(--bg); }
.ag-ev:hover { background: var(--accent-soft); }
.ag-ev.done { opacity: .5; text-decoration: line-through; }
.ag-ev-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.ag-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ag-allday { font-size: 10px; color: var(--muted); text-transform: uppercase; }
.ag-ev-txt { font-size: 12px; line-height: 1.35; margin: 3px 0; }
.ag-ev-who { font-size: 10.5px; color: var(--muted); }
.ag-empty { color: var(--muted); font-size: 12px; text-align: center; padding-top: 24px; }
@media (max-width: 1100px) { .ag-week { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .ag-week { grid-template-columns: 1fr; } .ag-day { min-height: auto; } }

/* ---------- Agenda v2 (grade de horas) ---------- */
.agx { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.agx-head { display: grid; grid-template-columns: 52px repeat(7, 1fr); border-bottom: 1px solid var(--border); }
.agx-col-head { padding: 10px 6px; text-align: center; border-left: 1px solid var(--border); }
.agx-col-head.today .agx-dnum { background: var(--accent); color: #fff; }
.agx-dow { display: block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.agx-dnum { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-size: 14px; font-weight: 800; margin-top: 3px; }
.agx-allday { display: grid; grid-template-columns: 52px repeat(7, 1fr); border-bottom: 1px solid var(--border); background: var(--bg); }
.agx-allday-col { border-left: 1px solid var(--border); padding: 3px; min-height: 26px; }
.agx-chip { font-size: 10.5px; padding: 2px 6px; border-radius: 6px; background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--accent); margin: 2px 0; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agx-body { display: grid; grid-template-columns: 52px repeat(7, 1fr); position: relative; }
.agx-gutter { position: relative; }
.agx-hour { position: absolute; right: 6px; transform: translateY(-7px); font-size: 10.5px; color: var(--muted); }
.agx-col { position: relative; border-left: 1px solid var(--border); }
.agx-col.today { background: var(--accent-soft)/50; background: color-mix(in srgb, var(--accent-soft) 40%, transparent); }
.agx-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border); opacity: .6; }
.agx-now { position: absolute; left: 0; right: 0; border-top: 2px solid var(--red); z-index: 3; }
.agx-now::before { content: ''; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.agx-ev { position: absolute; z-index: 2; border-radius: 6px; border-left: 3px solid; padding: 3px 6px; font-size: 11px; line-height: 1.25; overflow: hidden; cursor: pointer; box-shadow: 0 1px 2px rgba(14,21,37,.12); backdrop-filter: saturate(1.4); background-clip: padding-box; }
.agx-ev:hover { z-index: 4; height: auto !important; min-height: 24px; }
.agx-ev.done { opacity: .45; text-decoration: line-through; }
.agx-ev-who { font-size: 9.5px; color: var(--ink-2); }
.agx-legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 8px 12px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--ink-2); }
.agx-leg { display: inline-flex; align-items: center; gap: 5px; }
.agx-zoomable { cursor: pointer; }
.agx-zoomable:hover { background: var(--accent-soft); }

/* ---------- Agenda v3 (layout alinhado, flex) ---------- */
.ag2 { background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.ag2-top { padding: 12px 16px 0; }
.ag2-month { font-size: 13px; font-weight: 700; color: var(--ink-2); text-transform: capitalize; }
.ag2-month a { cursor: pointer; }
.ag2-scroll { overflow-x: auto; }
.ag2-inner { min-width: 760px; }
.ag2-header, .ag2-allrow { display: flex; }
.ag2-header { border-bottom: 1px solid var(--border); margin-top: 8px; }
.ag2-gut { width: 56px; min-width: 56px; position: relative; }
.ag2-gut-lbl { font-size: 10px; color: var(--muted); display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; }
.ag2-dhead { flex: 1; text-align: center; padding: 10px 4px 12px; border-left: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ag2-dhead.zoom { cursor: pointer; }
.ag2-dhead.zoom:hover { background: var(--accent-soft); }
.ag2-dow { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ag2-dnum { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14.5px; font-weight: 800; color: var(--ink); }
.ag2-dhead.today .ag2-dnum { background: var(--accent); color: #fff; }
.ag2-dhead.today .ag2-dow { color: var(--accent); }
.ag2-allrow { border-bottom: 1px solid var(--border); background: var(--bg); }
.ag2-allcol { flex: 1; border-left: 1px solid var(--border); padding: 3px 4px; min-height: 24px; }
.ag2-chip { font-size: 10.5px; padding: 2px 7px; border-radius: 6px; background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--cor, var(--accent)); margin: 2px 0; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag2-body { display: flex; position: relative; }
.ag2-hlbl { position: absolute; right: 8px; transform: translateY(-50%); font-size: 10.5px; font-weight: 600; color: var(--muted); background: var(--card); padding: 0 2px; }
.ag2-col { flex: 1; position: relative; border-left: 1px solid var(--border); }
.ag2-col.today { background: color-mix(in srgb, var(--accent-soft) 35%, transparent); }
.ag2-line { position: absolute; left: 0; right: 0; border-top: 1px dashed color-mix(in srgb, var(--border) 80%, transparent); }
.ag2-now { position: absolute; left: 0; right: 0; border-top: 2px solid var(--red); z-index: 3; }
.ag2-now::before { content: ''; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.ag2-ev { position: absolute; z-index: 2; border-radius: 8px; padding: 4px 7px; font-size: 11px; line-height: 1.3; overflow: hidden; cursor: pointer;
  background: color-mix(in srgb, var(--cor) 12%, #fff); border: 1px solid color-mix(in srgb, var(--cor) 35%, transparent); border-left: 4px solid var(--cor);
  box-shadow: 0 1px 3px rgba(14,21,37,.10); transition: box-shadow .15s; }
.ag2-ev:hover { z-index: 5; box-shadow: var(--shadow-lg); height: auto !important; min-height: 40px; }
.ag2-ev.manual { border-style: dashed; border-left-style: solid; }
.ag2-ev.done { opacity: .45; }
.ag2-ev.done .ag2-ev-title { text-decoration: line-through; }
.ag2-ev.lunch { background: #fef3c7; border-color: #f59e0b; border-left: 3px solid #f59e0b; opacity: .7; pointer-events: none; }
.ag2-ev.lunch .ag2-ev-time { color: #b45309; }
.ag2-ev.lunch .ag2-ev-title { color: #92400e; font-weight: 500; font-size: 11px; }
.ag2-ev-time { font-size: 10px; font-weight: 800; color: var(--cor); }
.ag2-ev-title { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag2-ev-who { font-size: 9.5px; color: var(--muted); }
.ag2-foot { display: flex; gap: 14px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--ink-2); }
.ag2-leg { display: inline-flex; align-items: center; gap: 5px; }
.ag2-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ag2-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--card); }
.ag2-seg-btn { border: none; background: transparent; padding: 8px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--ink-2); font-family: inherit; }
.ag2-seg-btn.on { background: var(--accent); color: #fff; }

/* ---------- Agenda v3.1: grade "planilha" (linhas e colunas fortes) ---------- */
.ib-panic { border-color: var(--red) !important; color: var(--red) !important; font-weight: 700; }
.ib-panic:hover { background: var(--red-soft) !important; }
.ag2-header { position: sticky; top: 0; z-index: 6; background: #F0F3F9; border-bottom: 2px solid #C9D2E0; margin-top: 8px; }
.ag2-dhead { border-left: 1px solid #C9D2E0; }
.ag2-allrow { border-bottom: 2px solid #C9D2E0; }
.ag2-allcol { border-left: 1px solid #C9D2E0; }
.ag2-col { border-left: 1px solid #C9D2E0; }
.ag2-col.wkd { background: #F6F8FB; }
.ag2-col.today { background: color-mix(in srgb, var(--accent-soft) 55%, #fff); box-shadow: inset 2px 0 0 var(--accent), inset -2px 0 0 var(--accent); }
.ag2-line { border-top: 1px solid #DCE3EE; }
.ag2-line.half { border-top: 1px dashed #ECF0F7; }
.ag2-gut { background: #F0F3F9; border-right: 1px solid #C9D2E0; }
.ag2-body .ag2-gut { background: var(--card); }
.ag2-hlbl { right: 8px; font-size: 11px; font-weight: 800; color: var(--ink-2); background: transparent; }
.ag2-body { border-bottom: 1px solid #C9D2E0; }
.ag2-inner { min-width: 860px; }
.ag2-ev { border-radius: 6px; }

/* ---------- Agenda: 3 estilos (Planilha = padrão v3.1; Clean; Noturno) ---------- */
.agt-clean .ag2-header { background: #fff; border-bottom: 1px solid var(--border); }
.agt-clean .ag2-gut { background: #fff; border-right: none; }
.agt-clean .ag2-dhead, .agt-clean .ag2-col, .agt-clean .ag2-allcol { border-left: 1px solid #EEF1F6; }
.agt-clean .ag2-line { border-top: 1px solid #F1F4F9; }
.agt-clean .ag2-line.half { display: none; }
.agt-clean .ag2-col.wkd { background: transparent; }
.agt-clean .ag2-col.today { background: color-mix(in srgb, var(--accent-soft) 30%, transparent); box-shadow: none; }
.agt-clean .ag2-ev { border: none; border-left: 4px solid var(--cor); background: color-mix(in srgb, var(--cor) 10%, #fff); border-radius: 10px; box-shadow: 0 1px 4px rgba(14,21,37,.08); }
.agt-noite { background: #0F1522; border-color: #232C3F; }
.agt-noite .ag2-top, .agt-noite .ag2-month { color: #B8C2D6; }
.agt-noite .ag2-header { background: #161E30; border-bottom: 2px solid #2A3550; }
.agt-noite .ag2-gut { background: #161E30; border-right: 1px solid #2A3550; }
.agt-noite .ag2-body .ag2-gut { background: #0F1522; }
.agt-noite .ag2-dow { color: #7D8AA5; }
.agt-noite .ag2-dnum { color: #E8EDF6; }
.agt-noite .ag2-dhead, .agt-noite .ag2-col, .agt-noite .ag2-allcol { border-left: 1px solid #232C3F; }
.agt-noite .ag2-line { border-top: 1px solid #1B2436; }
.agt-noite .ag2-line.half { border-top: 1px dashed #171F30; }
.agt-noite .ag2-col.wkd { background: #121927; }
.agt-noite .ag2-col.today { background: rgba(36,83,255,.10); box-shadow: inset 2px 0 0 var(--accent), inset -2px 0 0 var(--accent); }
.agt-noite .ag2-hlbl { color: #7D8AA5; }
.agt-noite .ag2-ev { background: color-mix(in srgb, var(--cor) 22%, #131A2A); border-color: color-mix(in srgb, var(--cor) 45%, transparent); }
.agt-noite .ag2-ev-title { color: #E8EDF6; }
.agt-noite .ag2-ev-who { color: #93A1BC; }
.agt-noite .ag2-allrow { background: #121927; border-bottom: 2px solid #2A3550; }
.agt-noite .ag2-chip { background: #182136; border-color: #2A3550; color: #D7DFEE; }
.agt-noite .ag2-foot { border-top: 1px solid #232C3F; color: #93A1BC; }
.agt-noite .ag2-dhead.zoom:hover { background: #1B2740; }

/* ---------- Inbox: abas por canal + funil da Bia ---------- */
.ib-online-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; flex-wrap: wrap; font-size: 12.5px; }
.ib-online-user { display: flex; align-items: center; gap: 4px; color: var(--ink-2); font-weight: 500; }
.ib-online-user.on { color: var(--ink); font-weight: 700; }
.ib-online-dot { width: 8px; height: 8px; border-radius: 50%; background: #ccc; flex-shrink: 0; }
.ib-online-user.on .ib-online-dot { background: #22c55e; box-shadow: 0 0 4px #22c55e; }
.ib-tabs { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.ib-tab { border: 1px solid var(--border); background: var(--card); border-radius: 10px; padding: 8px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--ink-2); font-family: inherit; }
.ib-tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.ib-tab-n { background: var(--green); color: #fff; font-size: 10px; font-weight: 800; border-radius: 999px; padding: 1px 6px; margin-left: 4px; }
.ib-tab-n:empty { display: none; }
.ib-b-camp { background: var(--amber-soft); color: var(--amber); }
.sdrf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.sdrf-step { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 10px 18px; text-align: center; min-width: 92px; }
.sdrf-n { font-size: 22px; font-weight: 800; color: var(--ink); }
.sdrf-l { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sdrf-arrow { display: flex; flex-direction: column; align-items: center; color: var(--muted); font-size: 15px; }
.sdrf-arrow span { font-size: 10.5px; font-weight: 800; color: var(--accent); }

/* ---------- Kanban: cards ricos ---------- */
.kcard-top { display: flex; gap: 8px; align-items: flex-start; }
.kavatar { width: 26px; height: 26px; min-width: 26px; font-size: 10px; box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(14,21,37,.2); }
.kphone { margin: 4px 0 2px; }
.kphone a { font-size: 11.5px; color: var(--green); text-decoration: none; font-weight: 600; }
.kphone a:hover { text-decoration: underline; }
.kdate { font-size: 10.5px; color: var(--muted); font-weight: 600; }

/* ---------- Relatórios: abas de segmentação ---------- */
.rp-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 14px; flex-wrap: wrap; }
.rp-tab { border: none; background: transparent; padding: 9px 16px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; font-family: inherit; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.rp-tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.rp-tab:hover { color: var(--ink); }
.sg-foot { display: flex; gap: 18px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--border); margin-top: 8px; font-size: 12px; color: var(--ink-2); }

/* reunião do dia: destaque fixo (sem pulso — pulso é só pro LIGAR AGORA) */
.kcard-today { border: 2px solid #E5484D !important; }
.kalert.ktoday { background: #fff; color: #E5484D; border: 1.5px dashed #E5484D; }
/* cores por tipo de call — card kanban */
.kcard-today.ktoday-video { border-color: #2563EB !important; }
.kalert.ktoday.ktoday-video { color: #2563EB; border-color: #2563EB; }
.kcard-today.ktoday-phone { border-color: #16A34A !important; }
.kalert.ktoday.ktoday-phone { color: #16A34A; border-color: #16A34A; }
/* indicador tipo de call — agenda (borda esquerda colorida sem sobrescrever cor da vendedora) */
.ag2-ev.ag-video { box-shadow: inset 4px 0 0 #2563EB; }
.ag2-ev.ag-phone { box-shadow: inset 4px 0 0 #16A34A; }
.agt-clean .ag2-ev.ag-video { border-left-color: #2563EB !important; }
.agt-clean .ag2-ev.ag-phone { border-left-color: #16A34A !important; }
.agt-noite .ag2-ev.ag-video { box-shadow: inset 4px 0 0 #2563EB; }
.agt-noite .ag2-ev.ag-phone { box-shadow: inset 4px 0 0 #16A34A; }

/* alerta urgente no card (🔴 ligar agora) */
.kcard-alert { border: 2px solid #E5484D !important; animation: kpulse 1.2s ease-in-out infinite; }
.kalert { background: #E5484D; color: #fff; font-size: 11px; font-weight: 800; border-radius: 8px; padding: 5px 9px; margin-bottom: 8px; line-height: 1.35; }
@keyframes kpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .45); } 50% { box-shadow: 0 0 0 6px rgba(229, 72, 77, 0); } }

/* ---------- Marketing ---------- */
.mk-layout { display: grid; grid-template-columns: 190px 1fr; gap: 16px; align-items: start; }
.mk-tabs { display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; position: sticky; top: 12px; }
.mk-tab { display: flex; align-items: center; gap: 10px; border: none; background: none; border-radius: 10px; padding: 10px 12px; font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--ink-2); text-align: left; font-family: inherit; }
.mk-tab:hover { background: var(--bg); color: var(--ink); }
.mk-tab.active { background: var(--ink, #0E1525); color: #fff; }
.mk-tab-ic { width: 20px; text-align: center; }
.mk-pattern:hover { border-color: var(--ink, #0E1525) !important; background: var(--bg); }
.mk-md h2 { font-size: 16px; margin: 14px 0 6px; }
.mk-md h3 { font-size: 14px; margin: 12px 0 4px; }
.mk-md ul, .mk-md ol { margin: 4px 0 8px 20px; }
.mk-md p { margin-bottom: 8px; }
@media (max-width: 1100px) {
  .mk-layout, .mk-bench-grid { grid-template-columns: 1fr; }
  .mk-tabs { flex-direction: row; flex-wrap: wrap; position: static; }
}
.kpi-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kpi-value { font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin-top: 6px; }
.mk-pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 100px; }
.mk-pill.ok { background: #e3f6ec; color: #0FA968; }
.mk-pill.warn { background: #fdf3e0; color: #b07a1f; }
.mk-pill.off { background: #eef0f4; color: var(--muted); }
.mk-pill.err { background: #fdeaea; color: #c0392b; }
/* inbox IG */
.mk-inbox { display: grid; grid-template-columns: 320px 1fr; gap: 14px; height: calc(100vh - 240px); min-height: 420px; }
.mk-convlist { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow-y: auto; }
.mk-conv { padding: 14px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.mk-conv:hover, .mk-conv.sel { background: var(--bg); }
.mk-conv-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mk-conv-prev { font-size: 12px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-st { font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 100px; background: #eef0f4; color: var(--muted); }
.mk-st.st-ativa { background: #e3f6ec; color: #0FA968; }
.mk-st.st-assumida { background: #e7edff; color: #2453FF; }
.mk-thread { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.mk-thread-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.mk-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.mk-msg { display: flex; }
.mk-msg.out { justify-content: flex-end; }
.mk-bubble { max-width: 70%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.45; background: #fff; border: 1px solid var(--border); }
.mk-bubble.out { background: #e7edff; border-color: #d3ddff; }
.mk-bubble.fail { border-color: #c0392b; }
.mk-meta { font-size: 10px; color: var(--muted); margin-top: 4px; }
.mk-compose { padding: 12px 14px; border-top: 1px solid var(--border); }
.mk-compose textarea { width: 100%; resize: vertical; }
.mk-compose-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
/* comentários */
.mk-reply-row { display: flex; gap: 8px; align-items: center; }
.mk-reply-row input { flex: 1; }
/* estúdio */
.mk-studio { display: grid; grid-template-columns: 280px 1fr; gap: 14px; align-items: start; }
.mk-postlist { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 240px); overflow-y: auto; }
.mk-postitem { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.mk-postitem:hover, .mk-postitem.sel { background: var(--bg); border-color: #2453FF; }
.mk-editor { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.mk-slides { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.mk-slidecard { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; }
.mk-slidecard .btn-ghost { padding: 3px 9px; font-size: 12px; }
.mk-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.mk-files { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.mk-files img { width: 130px; border-radius: 10px; border: 1px solid var(--border); display: block; }
.mk-sf-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.mk-preview { width: 324px; height: 405px; overflow: hidden; border-radius: 12px; border: 1px solid var(--border); background: #eee; }
.mk-preview iframe { width: 1080px; height: 1350px; transform: scale(0.3); transform-origin: top left; border: 0; pointer-events: none; }
.mk-slideform { margin-bottom: 14px; }
/* conexão */
.mk-conn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.mk-check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin-top: 10px; cursor: pointer; }
.mk-conn-grid code { background: var(--bg); padding: 2px 8px; border-radius: 6px; font-size: 12px; }
@media (max-width: 1100px) { .mk-conn-grid, .mk-sf-grid, .mk-studio, .mk-inbox { grid-template-columns: 1fr; } }

/* ===== Marketing · Jornadas ===== */
.jn-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.jn-stat { background: var(--card, #fff); border: 1px solid var(--line, #e5e8f0); border-radius: 14px; padding: 16px 20px; }
.jn-stat-n { font-size: 26px; font-weight: 800; }
.jn-stat-n small { font-size: 13px; font-weight: 700; color: #0FA968; }
.jn-stat-l { font-size: 12.5px; color: var(--muted, #6b7390); font-weight: 600; }
.jn-card { margin-bottom: 14px; }
.jn-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.jn-meta { font-size: 12px; color: var(--muted, #6b7390); font-weight: 500; margin-left: 8px; }
.jn-desc { font-size: 13px; color: var(--muted, #6b7390); margin-bottom: 10px; max-width: 680px; }
.jn-status { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 100px; margin-left: 8px; text-transform: uppercase; letter-spacing: .04em; }
.jn-status.st-manual { background: #eef1f7; color: #4a5370; }
.jn-status.st-automatica { background: #e3f6ec; color: #0FA968; }
.jn-status.st-pausada { background: #fdeaea; color: #E5484D; }
.jn-flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.jn-step { background: var(--bg, #f4f6fb); border: 1px solid var(--line, #e5e8f0); border-radius: 100px; padding: 7px 14px; font-size: 12.5px; font-weight: 600; }
.jn-step b { margin-left: 7px; color: #2453FF; }
.jn-arrow { color: var(--muted, #6b7390); font-weight: 700; }
.jn-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.jn-form input, .jn-form select, .jn-set-status { border: 1px solid var(--line, #e5e8f0); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 13.5px; background: #fff; }
.jn-form input#jn-pet { width: 200px; }
.jn-result { margin-top: 12px; font-size: 13.5px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.jn-result code { background: var(--bg, #f4f6fb); padding: 5px 10px; border-radius: 8px; font-size: 12.5px; }
.jn-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.jn-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #6b7390); padding: 8px 10px; border-bottom: 1px solid var(--line, #e5e8f0); }
.jn-table td { padding: 9px 10px; border-bottom: 1px solid var(--line, #e5e8f0); }
.jn-table tr:last-child td { border-bottom: none; }
.jn-actions { display: flex; gap: 6px; white-space: nowrap; }
@media (max-width: 900px) { .jn-stats { grid-template-columns: 1fr; } }

/* online/offline toggle (15/08) */
#online-toggle { font-size: 11px; padding: 3px 10px; border-radius: 20px; border: 1.5px solid; cursor: pointer; font-weight: 600; transition: all .2s; line-height: 1.3; }
#online-toggle.on { background: #0fa96820; color: #0fa968; border-color: #0fa968; }
#online-toggle.off { background: #ff4d4f15; color: #ff4d4f; border-color: #ff4d4f40; }
#online-toggle.on::before { content: '● '; }
#online-toggle.off::before { content: '○ '; }

/* Popup de confirmação de presença ativa */
.leads-confirm-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(14,21,37,.6); backdrop-filter: blur(4px);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
  animation: lcFadeIn .2s;
}
@keyframes lcFadeIn { from { opacity: 0 } to { opacity: 1 } }
.leads-confirm-box {
  background: #fff; border-radius: 16px; padding: 32px 36px;
  text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.25);
  max-width: 360px; width: 90%;
}
