/* Fluxo | CRM v3 — glass claro, compacto e sem dependências externas · identidade visual Aumah */
/* Urbanist (SIL OFL 1.1, ver urbanist-OFL.txt) servida localmente */
@font-face { font-family: "Urbanist"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("/urbanist-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Urbanist"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("/urbanist-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
*, *::before, *::after { box-sizing: border-box; }
:root {
  --bg: #f4f3f1;
  --ink: #1c1f55;
  --navy: #141c67;
  --orange: #f15a24;
  --purple: #6400e0;
  --muted: #8d90a9;
  --line: #dcdeed;
  --petrol: #6400e0;
  --petrol-2: #6400e0;
  --petrol-dark: #5000b3;
  --danger: #b0585f;
  --warn: #a98e57;
  --ok: #5b8b75;
  --glass: #ffffff8c;
  --glass-strong: #ffffffc7;
  --glass-border: #ffffffad;
  --shadow: 0 5px 18px #181c3d07;
  --r-menu: 20px; --r-col: 17px; --r-card: 13px; --r-panel: 18px; --r-dialog: 22px;
  --sidebar: 210px;
  font-size: 14px;
}
html, body { height: 100%; }
body {
  margin: 0; font: 14px/1.45 "Urbanist", system-ui, sans-serif; color: var(--ink);
  background: radial-gradient(ellipse at 82% 0%, #eadffb, transparent 45%), radial-gradient(ellipse at 20% 90%, #fbe4da, transparent 45%), var(--bg);
  height: 100dvh; overflow: hidden;
}
body.public, body.scroll-page { height: auto; min-height: 100dvh; overflow: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid #6400e0; outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.error-text { color: var(--danger); font-size: 12px; min-height: 1em; }
.notice { font-size: 12px; color: #6f728e; }

/* botões */
.btn { border: 1px solid #ffffffcc; background: #ffffffa8; border-radius: 11px; padding: 8px 13px; color: var(--ink); font-weight: 600; font-size: 12.5px; line-height: 1.2; }
.btn:hover:not(:disabled) { background: #ffffffe0; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, #d83d0e, #c9390d); color: #fff; border-color: #c9390d; }
.btn.primary:hover:not(:disabled) { background: linear-gradient(135deg, #c9390d, #b0320b); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 5px 9px; font-size: 11.5px; border-radius: 9px; }
.btn.ghost { background: transparent; border-color: transparent; }
.icon-btn { display: grid; place-items: center; padding: 0; line-height: 1; flex-shrink: 0; width: 30px; height: 30px; border-radius: 10px; border: 1px solid #ffffffb8; background: #ffffff70; color: #5d6184; }
.icon-btn svg { display: block; width: 18px; height: 18px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #606485; }
.field > span { font-weight: 600; }
input[type=text], input[type=password], input[type=search], input[type=number], input[type=date], input[type=datetime-local], input[type=time], input:not([type]), select, textarea {
  border: 1px solid #d5d7e8; background: #ffffffd6; border-radius: 10px; padding: 8px 10px; min-height: 36px; width: 100%; color: var(--ink);
}
textarea { resize: vertical; }
input:disabled, select:disabled, textarea:disabled { background: #f2f3f8; color: #8d90a9; }

/* shell */
.workspace { display: flex; gap: 12px; padding: 12px; height: 100dvh; }
.sidebar {
  width: var(--sidebar); min-width: var(--sidebar); border-radius: var(--r-menu); background: #ffffff6b; border: 1px solid #ffffffb3;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 10px 30px #2a2f580a; padding: 18px 14px; display: flex; flex-direction: column; gap: 14px;
  transition: width .22s ease, min-width .22s ease, opacity .2s ease, padding .22s ease; overflow: hidden auto;
}
.sidebar.collapsed { width: 0; min-width: 0; padding-left: 0; padding-right: 0; opacity: 0; border-width: 0; }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brand { font-size: 36px; font-weight: 750; letter-spacing: -2px; line-height: 1; color: var(--navy); display: flex; align-items: flex-start; }
.brand .ast { width: 15px; height: 15px; margin-left: 3px; margin-top: 2px; flex-shrink: 0; }
.workspace-card { display: flex; gap: 9px; align-items: center; padding: 9px; border-radius: 13px; background: #ffffff70; border: 1px solid #ffffffb0; }
.workspace-card .wicon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #f0e7fd; color: #5000b3; font-weight: 700; }
.workspace-card .wname { font-weight: 650; font-size: 12.5px; overflow-wrap: anywhere; }
.workspace-card .wsub { font-size: 9.5px; letter-spacing: 1px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a, .nav button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; text-decoration: none; color: #4d5175; border: 1px solid transparent; background: none; text-align: left; font-size: 13px; width: 100%; }
.nav a:hover, .nav button:hover { background: #ffffff60; }
.nav [aria-current="page"] { background: #ffffffc4; border-color: #fff; font-weight: 650; color: var(--ink); box-shadow: 0 3px 10px #2b305d08; }
.nav .nicon { width: 18px; text-align: center; color: #7f83a6; }
.nav-bottom { margin-top: auto; border-top: 1px solid #ffffff99; padding-top: 10px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 12px 18px 0; position: relative; }
.master-banner { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 6px 12px; margin-bottom: 8px; border-radius: 11px; background: #f4ecdc; color: #7e6a40; font-size: 12px; border: 1px solid #fff; }
.master-banner a { color: #6a5530; font-weight: 650; }
.synthetic-banner { padding: 6px 12px; margin-bottom: 8px; border-radius: 11px; background: #e1efeb; color: #3f6b5d; font-size: 12px; font-weight: 600; border: 1px solid #fff; }
.header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.header .titles { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.breadcrumb { font-size: 8px; letter-spacing: 1.6px; color: var(--muted); font-weight: 600; }
.header h1 { font-size: 26px; line-height: 1.2; margin: 4px 0 0; letter-spacing: -.5px; }
.new-contact { padding: 9px 14px; }
.main.inbox-mode { padding-top: 14px; }
.main.inbox-mode .breadcrumb { display: none; }
.main.inbox-mode .header h1 { font-size: 25px; margin-top: 0; }
.metrics { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.metric { display: flex; align-items: baseline; gap: 10px; padding: 5px 11px; border-radius: 10px; background: #ffffff70; border: 1px solid #ffffffb0; }
.metric span { font-size: 10px; color: var(--muted); }
.metric strong { font-size: 18px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.toolbar select, .toolbar input { padding-top: 8px; padding-bottom: 8px; width: auto; }
.toolbar .search { width: 245px; margin-left: auto; }
.toolbar .hint, .toolbar .count { font-size: 12px; color: var(--muted); }
.badge { font-size: 10px; padding: 3px 8px; border-radius: 20px; background: #f0e7fd; color: #5000b3; font-weight: 650; }
.section-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.toasts { position: fixed; top: 18px; right: 18px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; width: min(400px, calc(100vw - 32px)); pointer-events: none; }
.toast { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 14px 12px 16px 14px; border-radius: 14px; background: #fff;
  border: 1px solid var(--line); border-left: 5px solid #5b5f86; box-shadow: 0 14px 36px #1b1e3a2e; color: var(--ink, #1c1f3a); overflow: hidden; pointer-events: auto; animation: toast-in .18s ease-out; }
.toast.leaving { animation: toast-out .18s ease-in forwards; }
.toast-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 800; color: #fff; background: #5b5f86; }
.toast-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.toast-title { font-size: 14.5px; font-weight: 700; color: var(--navy); }
.toast-text { font-size: 13px; line-height: 1.4; color: #3b3f5c; overflow-wrap: anywhere; }
.toast-body .toast-text:only-child { font-size: 13.5px; color: var(--navy); font-weight: 600; }
.toast-x { width: 28px; height: 28px; border: 0; border-radius: 8px; background: none; font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer; }
.toast-x:hover { background: #f0eff6; color: var(--navy); }
.toast-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: currentColor; opacity: .25; transform-origin: left; animation: toast-bar linear forwards; }
.toast.paused .toast-bar { animation-play-state: paused; }
.toast.success { border-left-color: #2f8f5b; }
.toast.success .toast-icon { background: #2f8f5b; }
.toast.success .toast-bar { color: #2f8f5b; }
.toast.error { border-left-color: #b4232f; }
.toast.error .toast-icon { background: #b4232f; }
.toast.error .toast-bar { color: #b4232f; }
.toast.warning { border-left-color: #c27c0e; }
.toast.warning .toast-icon { background: #c27c0e; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 560px) { .toasts { top: auto; bottom: 14px; right: 16px; } }
@media (prefers-reduced-motion: reduce) { .toast, .toast.leaving { animation: none; } .toast-bar { display: none; } }
.state-box { padding: 30px; text-align: center; color: var(--muted); }

/* kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(252px, 1fr); gap: 13px; overflow-x: auto; flex: 1; min-height: 0; padding: 0 2px 14px; }
.column { border-radius: var(--r-col); background: #ffffff35; border: 1px solid #ffffffad; display: flex; flex-direction: column; min-height: 0; transition: background .19s, box-shadow .19s; }
.column.drop-target { background: #ffffff6a; box-shadow: inset 0 0 0 2px #b48af2; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 15px 14px 12px; }
.col-head .dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 4px #ffffff90; }
.col-head h2 { font-size: 12px; font-weight: 600; margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.col-head .count { font-size: 10px; color: var(--muted); background: #ffffff90; border-radius: 20px; padding: 1px 7px; }
.col-body { overflow-y: auto; padding: 0 10px 50px; min-height: 160px; flex: 1; }
.col-empty { font-size: 11px; color: var(--muted); text-align: center; padding: 24px 8px; border: 1px dashed #cfd1e3; border-radius: 12px; }
.card { background: linear-gradient(135deg, #ffffffdf, #ffffffa6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid #fff; border-radius: var(--r-card); padding: 12px; margin-bottom: 8px; box-shadow: 0 5px 18px #181c3d07; cursor: grab; user-select: none; touch-action: none; transition: transform .19s cubic-bezier(.2,.8,.2,1); }
.card:focus-visible { outline: 2px solid #6400e0; }
.card .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.card .tag { font-size: 8px; letter-spacing: 1px; color: var(--muted); font-weight: 650; }
.card .grip { font-size: 19px; line-height: 10px; color: #b5b7cd; }
.card .who { display: flex; gap: 9px; align-items: center; }
.avatar { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.card .name { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.card .phone { font-size: 10px; color: var(--muted); }
.card .title { font-size: 10px; margin: 13px 0 12px; color: #5d6183; overflow-wrap: anywhere; }
.card .foot { display: flex; justify-content: space-between; padding-top: 9px; border-top: 1px solid #edeef3; font-size: 9px; color: var(--muted); }
.card .foot .open { color: var(--petrol); font-weight: 650; }
.card.dragging-source { visibility: hidden; }
.drag-ghost { position: fixed; z-index: 1000; pointer-events: none; opacity: .96; box-shadow: 0 24px 55px #282f6c35; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); transform: rotate(2deg); margin: 0; }
.drop-placeholder { border: 2px dashed #b48af2; border-radius: var(--r-card); margin-bottom: 8px; background: #ffffff40; }
.load-more { margin: 8px auto; display: block; }
.palette-mint { --stage: #8bb4aa; --av: #e1efeb; --avi: #75a195; }
.palette-blue { --stage: #89a9ce; --av: #e2ebf7; --avi: #7c9cbb; }
.palette-violet { --stage: #ae9ccb; --av: #eae4f6; --avi: #9b88b6; }
.palette-amber { --stage: #c6af81; --av: #f2ecde; --avi: #b09d74; }
.palette-green { --stage: #8cbaa3; --av: #e0f0e6; --avi: #7aa991; }
.palette-rose { --stage: #c49ca7; --av: #f5e6eb; --avi: #b18c9a; }
.palette-fallback { --stage: #9fb0bf; --av: #e8edf2; --avi: #8597a6; }
.col-head .dot { background: var(--stage); }
.avatar { background: var(--av, #e8e9f2); color: var(--avi, #8588a6); }

/* painel de conversa */
.chat-panel { position: absolute; top: 12px; right: 0; bottom: 12px; width: 420px; z-index: 30; display: flex; flex-direction: column; border-radius: var(--r-panel); background: #f6f6fbee; border: 1px solid #fff; box-shadow: -10px 0 40px #2a2f5a1c; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #e3e4f0; }
.chat-head .avatar { width: 33px; height: 33px; }
.chat-head .info { flex: 1; min-width: 0; }
.chat-head .info strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.chat-head .info span { font-size: 11px; color: var(--muted); }
.close-x { font-size: 20px; }
.context-band { margin: 8px 12px 0; padding: 7px 10px; border-radius: 10px; background: #e6e8f7; color: #2b3390; font-size: 11.5px; }
.tabs { display: flex; gap: 4px; padding: 0 14px; border-bottom: 1px solid #e3e4f0; }
.tabs button { background: none; border: none; padding: 11px 10px 9px; font-size: 12px; color: #6d7191; border-bottom: 2px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 650; border-bottom-color: #6400e0; }
.tab-panel { flex: 1; min-height: 0; overflow-y: auto; }
.thread { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 82%; padding: 8px 11px; border-radius: 13px; font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; background: #fff; border: 1px solid #edeef5; align-self: flex-start; }
.bubble.out { align-self: flex-end; background: #f0e7fd; border-color: #e4d4fb; }
.bubble.internal { align-self: flex-end; background: #fbf1cf; border-color: #f0e1ab; }
.bubble .meta { display: block; font-size: 9.5px; color: #8b8ea8; margin-top: 4px; }
.bubble .label { display: block; font-size: 9.5px; color: #96803c; font-weight: 650; margin-bottom: 2px; }
.composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 10px 14px 12px; border-top: 1px solid #e3e4f0; align-items: end; }
.composer .modes { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.composer .modes button { border: 1px solid #dbddec; background: #ffffff90; border-radius: 20px; padding: 4px 10px; font-size: 11px; }
.composer .modes button[aria-pressed="true"] { background: #6400e0; color: #fff; border-color: #6400e0; }
.composer textarea { height: 52px; min-height: 52px; max-height: 140px; resize: vertical; }
.composer .send { min-width: 39px; height: 40px; }
.composer .composer-note { grid-column: 1 / -1; font-size: 11px; color: #8a7a43; }
.composer .composer-note.off { color: #8d90a9; }
.history-list { padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.history-item { font-size: 12px; padding: 8px 10px; border-radius: 10px; background: #ffffffb0; border: 1px solid #fff; overflow-wrap: anywhere; }
.history-item time { display: block; font-size: 10px; color: var(--muted); }
.data-tab { padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.panel-block { background: #ffffffa8; border: 1px solid #fff; border-radius: 14px; padding: 12px; }
.panel-block h3 { margin: 0 0 8px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fields-form { display: flex; flex-direction: column; gap: 9px; }
.opp-item { border-top: 1px solid #e8e9f2; padding-top: 10px; margin-top: 10px; display: flex; flex-direction: column; gap: 7px; }
.opp-item:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.row { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 120px; }
.row > .btn { flex: 0 0 auto; min-width: 0; }

/* inbox */
.inbox { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 12px; padding-bottom: 12px; }
.inbox-list { border-radius: var(--r-panel); background: #ffffff60; border: 1px solid #ffffffb3; display: flex; flex-direction: column; min-height: 0; }
.inbox-list header { padding: 12px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid #e6e7f2; }
.inbox-list .eyebrow { font-size: 10px; letter-spacing: 1px; color: var(--muted); font-weight: 650; }
.people { overflow-y: auto; flex: 1; padding: 6px; }
.person { display: flex; gap: 9px; align-items: center; padding: 9px; border-radius: 12px; width: 100%; background: none; border: 1px solid transparent; text-align: left; }
.person[aria-selected="true"] { background: #ffffffd0; border-color: #fff; }
.person .pname { font-size: 12.5px; font-weight: 600; overflow-wrap: anywhere; }
.person .psub { font-size: 10.5px; color: var(--muted); }
.inbox-chat { border-radius: var(--r-panel); background: #f6f6fbd8; border: 1px solid #fff; min-height: 0; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.inbox-chat .chat-panel { position: static; width: auto; flex: 1; box-shadow: none; border: 0; border-radius: 0; background: transparent; }
.inbox-chat .chat-head { padding: 12px 18px; }
.inbox-chat .thread { padding: 18px 20px; }
.empty-chat { margin: auto; color: var(--muted); padding: 30px; text-align: center; }
.contacts-table { flex: 1; overflow: auto; border-radius: var(--r-panel); background: #ffffff60; border: 1px solid #ffffffb3; padding: 8px; }
.contacts-table .person { border-bottom: 1px solid #eeeff6; border-radius: 0; }

/* diálogos */
dialog { border: 1px solid #fff; border-radius: var(--r-dialog); background: #f3f4fbef; backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); box-shadow: 0 25px 90px #23274830; color: var(--ink); padding: 0; width: min(560px, calc(100vw - 30px)); max-height: 90dvh; }
dialog::backdrop { background: #1d203a33; backdrop-filter: blur(4px); }
.dlg { display: flex; flex-direction: column; max-height: 90dvh; }
.dlg header { padding: 20px 22px 8px; display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.dlg header h2 { margin: 0; font-size: 19px; }
.dlg .content { padding: 4px 22px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.dlg footer { padding: 12px 22px 18px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.stage-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto auto auto; gap: 6px; align-items: center; }
.list-tools { display: flex; gap: 6px; align-items: center; }

/* login */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(380px, 100%); padding: 28px; border-radius: 22px; background: #ffffffa8; border: 1px solid #fff; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 20px 60px #23274818; display: flex; flex-direction: column; gap: 12px; }
.login-card h1 { margin: 0; font-size: 22px; }
body.login-body { overflow: auto; }

/* integrações / rastreamento */
.settings-scroll { flex: 1; overflow-y: auto; padding-bottom: 24px; }
.settings-card { background: #ffffff8f; border: 1px solid #fff; border-radius: 17px; padding: 18px; max-width: 880px; display: flex; flex-direction: column; gap: 12px; }
.settings-card h2 { margin: 0; font-size: 17px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.secret-hint { font-size: 10.5px; color: var(--ok); font-weight: 650; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.inner-tabs { display: flex; gap: 6px; border-bottom: 1px solid #dcdeed; padding-bottom: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.inner-tabs [role=tab] { border: 1px solid transparent; background: none; padding: 8px 14px; border-radius: 11px; font-size: 12.5px; color: #5f6386; }
.inner-tabs [role=tab][aria-selected="true"] { background: #ffffffb0; border-color: #fff; color: var(--ink); font-weight: 650; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.glass-card { background: #ffffff8a; border: 1px solid #fff; border-radius: 15px; padding: 14px; display: flex; flex-direction: column; gap: 8px; overflow-wrap: anywhere; }
.glass-card h3 { margin: 0; font-size: 13.5px; }
.tm-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tm-metrics div { padding: 12px; border-radius: 12px; background: #ffffffa0; text-align: center; }
.tm-metrics strong { display: block; font-size: 22px; }
.tm-metrics span { font-size: 11px; color: var(--muted); }
.switch { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; background: none; border: 0; padding: 0; font-size: 12.5px; }
.switch .track { width: 40px; height: 23px; border-radius: 20px; background: #c9cbdc; position: relative; transition: background .15s; flex-shrink: 0; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch[aria-checked="true"] .track { background: #6400e0; }
.switch[aria-checked="true"] .track::after { left: 20px; }
.event-row { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: #ffffff90; border: 1px solid #fff; font-size: 12px; overflow-wrap: anywhere; }
.status-chip { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 20px; background: #ececf1; color: #85879c; font-weight: 650; }
.status-chip.ok { background: #e1efea; color: #5b8b75; }
.status-chip.warn { background: #f4ecdc; color: #a98e57; }

/* follow-up */
.fu-view { padding: 4px 10px 28px 2px; overflow-y: auto; flex: 1; min-height: 0; }
.fu-tabs { display: flex; gap: 6px; border-bottom: 1px solid #dcdeed; padding-bottom: 13px; margin-bottom: 22px; }
.fu-tabs [role=tab] { padding: 9px 16px; border-radius: 11px; border: 1px solid transparent; background: none; color: #5f6386; }
.fu-tabs [role=tab][aria-selected="true"] { background: #ffffffb0; border-color: #fff; color: var(--ink); font-weight: 650; }
.daybar { display: flex; gap: 12px; align-items: flex-end; margin-bottom: 22px; flex-wrap: wrap; }
.daybar .left { flex: 1; min-width: 200px; }
.daybar h2 { font: 600 20px/1.25 inherit; margin: 0 0 5px; }
.daybar label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; }
.daybar input, .daybar .today { height: 36px; min-height: 36px; box-sizing: border-box; }
.daybar .today { padding-top: 0; padding-bottom: 0; }
.fu-board { display: grid; grid-template-columns: minmax(270px, 1fr) minmax(180px, .7fr) minmax(270px, 1fr); gap: 18px; max-width: 1300px; }
.fu-col { padding: 14px; border-radius: 17px; background: #ffffff32; border: 1px solid #ffffff9c; min-width: 0; }
.fu-col h3 { margin: 0 0 10px; font-size: 13px; display: flex; justify-content: space-between; }
.fu-done { min-height: 240px; border: 1px dashed #b8ccc780; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: #6f8a80; }
.fu-done.ready { background: #d4eae080; border-color: #5f9b85; }
.fu-done .mark { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid #b8ccc7; font-size: 18px; }
.fu-card { padding: 14px; border-radius: 13px; margin-bottom: 10px; box-shadow: 0 3px 12px #32376310; background: #ffffffc0; border: 1px solid #fff; overflow-wrap: anywhere; touch-action: none; }
.fu-card .fname { font-size: 13px; font-weight: 650; }
.fu-card .flabel { font: 500 12px/1.35 inherit; margin: 7px 0; }
.fu-card .fproduct { font-size: 11px; color: #888ba7; }
.fu-card .ftime { font-size: 11px; margin: 12px 0; }
.fu-card .factions { display: flex; flex-wrap: wrap; gap: 5px; }
.fu-card .factions .btn { font-size: 10px; padding: 5px 8px; }
.fu-card details { border-top: 1px solid #e2e3ee80; margin-top: 12px; padding-top: 9px; font-size: 11px; }
.fu-card summary { font-size: 10px; cursor: pointer; color: #6e7294; }
.fu-card.dragging { opacity: .4; }
.fu-ghost { position: fixed; z-index: 1000; pointer-events: none; width: 260px; transform: rotate(2deg); box-shadow: 0 24px 55px #282f6c35; }
.pager { display: flex; gap: 6px; justify-content: space-between; margin-top: 6px; }
.calendar-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.calendar-bar h2 { font-size: 18px; margin: 0; white-space: nowrap; text-transform: none; min-width: 0; }
.calendar-bar .arrow { width: 36px; height: 36px; padding: 0; font-size: 22px; line-height: 1; display: grid; place-items: center; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; max-width: 1100px; }
.calendar .wd { font-size: 11px; color: var(--muted); text-align: center; }
.calendar .day { min-height: 108px; padding: 13px; border-radius: 13px; border: 1px solid #ffffffc0; background: #ffffff65; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.calendar .day.today { border-color: #84a8a1; background: #f7fcfba0; }
.calendar .day .n { font-weight: 650; }
.calendar .day .c { font-size: 11px; background: #f0e7fd; color: #5000b3; border-radius: 20px; padding: 2px 8px; align-self: flex-start; }
.calendar .blank { min-height: 1px; }
.cadence-card { max-width: 950px; margin-bottom: 12px; }
.editor { max-width: 950px; padding: 18px; border-radius: 17px; background: #ffffff8f; border: 1px solid #fff; display: flex; flex-direction: column; gap: 12px; }
.editor .field { max-width: 600px; }
.editor input, .editor select { height: 36px; }
.editor textarea { min-height: 70px; }
.step { border-radius: 13px; margin: 20px 0 0; padding: 12px; border: 1px solid #d7d9e9; display: flex; flex-direction: column; gap: 8px; }
.step legend { font-weight: 650; font-size: 12px; padding: 0 4px; }
.editor .editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.editor .editor-actions .btn { min-height: 36px; }

/* responsivo */
@media (max-width: 1200px) {
  :root { --sidebar: 180px; }
  .chat-panel { width: min(420px, 92%); }
}
@media (max-width: 1100px) {
  .fu-board { grid-template-columns: minmax(0, 1fr) 130px minmax(0, 1fr); gap: 10px; }
  .calendar .day { min-height: 90px; padding: 10px; }
}
@media (max-width: 750px) {
  :root { --sidebar: 62px; }
  .workspace { padding: 8px; gap: 8px; }
  .sidebar { padding: 12px 7px; align-items: center; }
  .sidebar .brand { font-size: 22px; letter-spacing: -1px; }
  .sidebar .brand .ast { display: none; }
  .brand-row { flex-direction: column; }
  .workspace-card { padding: 4px; }
  .workspace-card .wtext, .nav .ntext { display: none; }
  .nav a, .nav button { justify-content: center; padding: 9px 4px; }
  .main { padding: 8px 4px 0; }
  .header h1 { font-size: 21px; }
  .main.inbox-mode { padding-top: 10px; }
  .main.inbox-mode .header h1 { font-size: 21px; }
  .toolbar .search { width: 100%; height: 36px; margin-left: 0; }
  .kanban { grid-auto-columns: minmax(240px, 85%); }
  .chat-panel { position: fixed; inset: 8px 8px 8px 78px; width: auto; }
  .inbox { grid-template-columns: minmax(0, 1fr); }
  .inbox.chat-open .inbox-list { display: none; }
  .inbox:not(.chat-open) .inbox-chat { display: none; }
  .inbox-chat .chat-head { padding: 11px 13px; }
  .composer { padding: 9px 10px 10px; gap: 7px; }
  .composer textarea { height: 50px; min-height: 50px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .tm-metrics { gap: 6px; }
  .tm-metrics div { padding: 10px 8px; }
  .tm-metrics strong { font-size: 20px; }
  .fu-board { display: flex; overflow-x: auto; gap: 10px; }
  .fu-board .fu-col { flex: 0 0 260px; }
  .fu-board .fu-done { flex: 0 0 180px; }
  .daybar input, .daybar .today { height: 40px; min-height: 40px; }
  .fu-card .factions .btn { min-height: 40px; font-size: 11px; }
  .calendar { gap: 4px; }
  .calendar .day { min-height: 75px; padding: 7px; }
  .calendar .day .c .long { display: none; }
  .calendar-bar h2 { font-size: 16px; }
  .editor input, .editor select { height: 40px; }
  .editor .editor-actions .btn { min-height: 44px; }
  .stage-row { grid-template-columns: minmax(0, 1fr) 96px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* páginas públicas */
body.public { padding: 24px; max-width: 850px; margin: auto; line-height: 1.6; background-attachment: fixed; }
body.public h1 { font-size: 26px; }
body.public nav a { margin-right: 14px; color: var(--petrol); }

/* ------------------------------------------------------------------ Painel */
.dash { flex: 1; min-height: 0; overflow: auto; padding: 2px 2px 24px; display: flex; flex-direction: column; gap: 12px; }
.dash-bar { margin-bottom: 0; }
.dash-bar select { min-width: 150px; }
.dtiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dtile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: #ffffffb0; border: 1px solid #fff; box-shadow: var(--shadow); min-width: 0; }
.dtile.accent { background: var(--navy); border-color: var(--navy); color: #fff; }
.dtile .dlabel { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.dtile.accent .dlabel, .dtile.accent .dsub { color: #d7d9f3; }
.dtile strong { font-size: 22px; line-height: 1.2; font-weight: 700; color: inherit; overflow-wrap: anywhere; }
.dtile .dsub { font-size: 11.5px; color: var(--muted); }
.dgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.dcard { background: #ffffffa8; border: 1px solid #fff; border-radius: var(--r-panel); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.dcard h2 { margin: 0 0 6px; font-size: 15px; color: var(--navy); }
.dhint { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.dnote { margin: 0; font-size: 12px; color: var(--muted); }
.dcard .dnote { margin-top: 10px; }
.dempty { margin: 8px 0; font-size: 13px; color: var(--muted); }
.dfunnel, .dseries { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.drow { display: grid; grid-template-columns: minmax(80px, 130px) minmax(0, 1fr) auto; grid-template-areas: "name bar num" ". now now"; column-gap: 10px; row-gap: 1px; align-items: center; }
.drow .dname { grid-area: name; font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drow .dbar { grid-area: bar; }
.drow .dnum { grid-area: num; font-size: 12.5px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.drow .dnow { grid-area: now; font-size: 11px; color: var(--muted); text-align: right; }
.dbar { display: block; height: 10px; border-radius: 0 4px 4px 0; background: #ece9f6; overflow: hidden; }
.dbar-fill { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--purple); }
.drow.kind-won .dbar-fill { background: var(--navy); }
.drow.kind-lost .dbar-fill { background: #b9b3cc; }
.dtable-wrap { overflow-x: auto; margin: 0 -4px 10px; }
.dtable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dtable th, .dtable td { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.dtable thead th { font-size: 11px; color: var(--muted); font-weight: 600; }
.dtable tbody th { font-weight: 600; white-space: normal; }
.dtable .n { text-align: right; font-variant-numeric: tabular-nums; }
.dtable tr.none th { color: var(--muted); font-weight: 500; }
.dchip { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 20px; background: #f0e7fd; color: #5000b3; font-size: 10.5px; font-weight: 600; vertical-align: 1px; }
.camp-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.camp-new { display: flex; flex-direction: column; gap: 8px; }
.camp-new .row, .camp-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.camp-row .field { flex: 1 1 140px; }
.camp-spend { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.camp-spend li { display: flex; gap: 6px; padding: 3px 9px; border-radius: 20px; background: #ffffffc0; border: 1px solid var(--line); font-size: 11.5px; }
.origin-block { margin-top: 8px; }
.origin-block .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.reason-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.reason { display: flex; gap: 8px; align-items: center; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.reason:has(input:checked) { border-color: var(--purple); background: #f0e7fd; }
.dash-custom { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dash-custom input[type=date] { height: 36px; }
.dperiod { margin: -4px 0 0; font-size: 13px; }
.ddelta { margin-top: 3px; font-size: 11.5px; font-weight: 600; }
.ddelta.good { color: #2f6e52; }
.ddelta.bad { color: #a1373f; }
.ddelta.flat { color: var(--muted); font-weight: 500; }
.dtile.accent .ddelta.good { color: #9fe0bf; }
.dtile.accent .ddelta.bad { color: #ffb3b8; }
.dtile.accent .ddelta.flat { color: #d7d9f3; }
.camp-spend li { align-items: center; }
.icon-btn.tiny { width: 20px; height: 20px; min-height: 20px; font-size: 13px; line-height: 1; padding: 0; }
.ai-note { margin: 6px 0 0; padding: 8px 10px; border-radius: 10px; background: #f0e7fd; color: #3d0b8a; font-size: 12px; }
.ai-note .muted { color: #6a4f9a; }
@media (max-width: 1100px) {
  .dtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dgrid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 750px) {
  .dtiles { gap: 6px; }
  .dtile { padding: 10px; }
  .dtile strong { font-size: 18px; }
  .dash-bar select { min-width: 0; flex: 1 1 140px; height: 40px; }
  .dash-custom { width: 100%; }
  .dash-custom input[type=date] { flex: 1 1 120px; height: 40px; }
  .drow { grid-template-columns: minmax(70px, 96px) minmax(0, 1fr) auto; }
  .reason-list { grid-template-columns: minmax(0, 1fr); }
  .reason { min-height: 44px; }
}

/* ------------------------------------------------------------------ rotina comercial */
.owner-chip { margin-left: auto; margin-right: 6px; width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 9px; font-weight: 700; background: #f0e7fd; color: #5000b3; border: 1px solid #e4d4fb; }
.card.stale { border-color: #e9b54a; box-shadow: 0 0 0 1px #e9b54a inset, 0 5px 18px #181c3d07; }
.card.stale-hard { border-color: #d0454f; box-shadow: 0 0 0 1px #d0454f inset, 0 5px 18px #181c3d07; }
.card .foot .stale-label { font-weight: 700; color: #8a5a00; }
.card.stale-hard .foot .stale-label { color: #a1373f; }
.card.stale .foot .stale-label::before, .card.stale-hard .foot .stale-label::before { content: "⏱ "; }
.stale-toggle.has { border-color: #e9b54a; color: #7a4f00; }
.stale-toggle[aria-pressed="true"] { background: #fff4dc; border-color: #e9b54a; color: #7a4f00; }
#owner-filter, #stale-days { max-width: 210px; }
.owner-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 6px 0; }
.dup-notice { margin: 4px 0 0; padding: 9px 11px; border-radius: 10px; background: #fff4dc; color: #6b4500; font-size: 12.5px; }
.entries-block { margin-top: 10px; }
.entries-alias { margin: 2px 0; font-size: 12.5px; color: #3d0b8a; }
.entries-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.entries-list li { padding: 7px 9px; border-radius: 10px; background: #ffffffb0; border: 1px solid var(--line); }
.entries-list time { display: block; font-size: 11px; color: var(--muted); }
.composer { position: relative; }
.composer .qr-btn { margin-left: auto; border: 1px solid #dbddec; background: #ffffff90; border-radius: 20px; padding: 4px 10px; font-size: 11px; }
.qr-pop { position: absolute; left: 14px; right: 14px; bottom: calc(100% - 4px); max-height: 260px; overflow: auto; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 30px #181c3d26; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.qr-pop .muted { margin: 8px; font-size: 12px; }
.qr-item { text-align: left; border: 0; background: transparent; border-radius: 9px; padding: 7px 9px; display: grid; grid-template-columns: auto 1fr; column-gap: 4px; font-size: 12.5px; }
.qr-item small { grid-column: 1 / -1; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-item[aria-selected="true"], .qr-item:hover { background: #f0e7fd; }
.qr-manage { border: 0; border-top: 1px solid var(--line); background: transparent; padding: 8px; font-size: 12px; color: #5000b3; font-weight: 600; text-align: left; }
.qr-new, .qr-item-edit { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.qr-new .row, .qr-item-edit .row { display: flex; gap: 8px; flex-wrap: wrap; }
.qr-item-edit.archived { opacity: .7; }
@media (max-width: 750px) {
  #owner-filter, #stale-days { max-width: none; flex: 1 1 150px; height: 40px; }
  .stale-toggle { min-height: 40px; }
  .qr-pop { left: 8px; right: 8px; }
}
.rr-on { border-color: #b48af2; color: #3d0b8a; }
.rr-alert { border-color: #d0454f; background: #fdeced; color: #8e2a32; font-weight: 600; }
.rr-switch { display: flex; gap: 8px; align-items: center; font-weight: 600; margin: 6px 0; }
.rr-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rr-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "name pause order" "stats stats stats"; gap: 2px 10px; align-items: center; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.rr-row.off { background: #f7f6f4; }
.rr-row.off .rr-name span { color: var(--muted); }
.rr-row.inactive .rr-name span { text-decoration: line-through; }
.rr-name { grid-area: name; display: flex; gap: 8px; align-items: center; font-weight: 600; min-width: 0; }
.rr-pause { grid-area: pause; display: flex; gap: 6px; align-items: center; font-size: 12px; }
.rr-stats { grid-area: stats; font-size: 11.5px; }
.rr-order { grid-area: order; display: flex; gap: 4px; }
@media (max-width: 750px) { #rr-btn { min-height: 40px; flex: 1 1 100%; } .rr-row input[type=checkbox] { width: 20px; height: 20px; } }
.owner-chip.inactive { background: #f1f0ee; color: #77788f; border-style: dashed; }
.linkish { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: #3d0b8a; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: #b48af2; text-underline-offset: 3px; }
.linkish:hover { color: #6400e0; }
.dtable tr.none .linkish { color: var(--muted); font-weight: 500; }
.camp-chip { border-color: #b48af2; background: #f0e7fd; color: #3d0b8a; font-weight: 600; }
.req-stage { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 10px; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.req-stage legend { font-weight: 700; padding: 0 4px; color: var(--navy); }
.req-opt { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.blocked-msg { margin: 0 0 6px; padding: 10px 12px; border-radius: 10px; background: #fff4dc; color: #6b4500; font-weight: 600; }
@media (max-width: 750px) { .req-opt { min-height: 36px; } #req-btn, #campaign-filter { min-height: 40px; } }

/* tempo até a 1ª resposta e links rastreados */
.resp-head { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 2px 0 12px; }
.resp-head > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.resp-head .dlabel { font-size: 11px; color: var(--muted); font-weight: 600; }
.resp-head strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.resp-head strong.resp-big { font-size: 22px; color: var(--navy); }
.resp-head strong.resp-warn { color: #a1373f; }
.utm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.links-new textarea { width: 100%; resize: vertical; }
.link-item .link-url { flex: 1 1 220px; min-width: 0; font-size: 12px; }
.origin-utm, .origin-resp { margin: 4px 0 0; font-size: 12.5px; }
@media (max-width: 560px) {
  .resp-head { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .utm-grid { grid-template-columns: minmax(0, 1fr); }
}

/* aba Contatos em tabela */
.ct { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.ct-tabs { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; flex: 0 0 auto; }
.ct-tab { flex: 0 0 auto; border: 0; background: none; padding: 9px 14px 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0; cursor: pointer; white-space: nowrap; }
.ct-tab:hover { color: var(--navy); background: #ffffff80; }
.ct-tab.on { color: var(--navy); border-bottom-color: var(--purple); background: #ffffffb0; }
.ct-tab-menu, .ct-tab-add { flex: 0 0 auto; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; font-size: 16px; color: var(--muted); cursor: pointer; }
.ct-tab-menu:hover, .ct-tab-add:hover { background: #ffffffb0; color: var(--navy); }
.ct-save-view { flex: 0 0 auto; margin-left: 6px; }
.ct-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ct-search-wrap { position: relative; flex: 0 1 260px; min-width: 160px; }
.ct-search-wrap .ct-search { width: 100%; padding-left: 30px; height: 36px; border-radius: 20px; }
.ct-search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-52%); color: var(--muted); font-size: 15px; pointer-events: none; }
.ct-bar .btn { height: 36px; border-radius: 20px; }
.ct-filter-btn.on { background: #e6dcfb; border-color: var(--purple); color: #3d0b8a; }
.ct-bar-right { margin-left: auto; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ct-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ct-pills[hidden] { display: none; }
.ct-pill { display: inline-flex; align-items: center; border-radius: 8px; border: 1px solid transparent; }
.ct-pill-btn { border: 0; background: none; padding: 6px 8px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--navy); cursor: pointer; border-radius: 8px; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.ct-pill-btn:hover { background: #ffffffb0; }
.ct-pill .caret { font-size: 10px; color: var(--muted); }
.ct-pill.on { background: #ece3fd; border-color: #d7c4fa; }
.ct-pill.on .ct-pill-btn:hover { background: #e2d4fc; }
.ct-pill-x { border: 0; background: none; width: 24px; height: 24px; margin-right: 3px; border-radius: 6px; font-size: 15px; line-height: 1; color: var(--muted); cursor: pointer; }
.ct-pill-x:hover { background: #ffffffc0; color: #a1373f; }
.ct-plus { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: #ffffffc0; font-size: 17px; line-height: 1; color: var(--navy); cursor: pointer; margin-left: 4px; }
.ct-plus:hover { border-color: var(--purple); }
.link-btn { background: none; border-color: transparent; text-decoration: underline; color: #3d0b8a; font-weight: 700; font-size: 12.5px; }
.ct-pop { position: fixed; z-index: 60; min-width: 220px; max-width: min(340px, calc(100vw - 16px)); max-height: min(420px, calc(100vh - 16px)); overflow: auto; padding: 10px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: 0 12px 32px #1c124033; display: flex; flex-direction: column; gap: 8px; }
.ct-pop-title { margin: 0; font-size: 12px; font-weight: 700; color: var(--navy); }
.ct-opt-list { display: flex; flex-direction: column; gap: 1px; }
.ct-opt { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 13px; cursor: pointer; color: inherit; min-height: 36px; }
.ct-opt:hover, .ct-opt:focus-visible { background: #f0e7fd; }
.ct-opt.on { background: #ece3fd; font-weight: 700; color: #3d0b8a; }
.ct-opt.on::before { content: "✓ "; }
.ct-opt.danger { color: #a1373f; }
.ct-opt-group { margin: 6px 0 2px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ct-opt-empty { margin: 4px 10px; font-size: 12.5px; }
.ct-opt-search { width: 100%; }
.ct-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-dates { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.ct-dates .field { flex: 1 1 120px; }
.ct-pop-actions { display: flex; justify-content: flex-end; gap: 6px; }
.ct-count { font-size: 12.5px; }
.ct-scroll { flex: 1; min-height: 160px; overflow: auto; border-radius: var(--r-panel); background: #ffffffa8; border: 1px solid #fff; box-shadow: var(--shadow); }
.ct-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.ct-table th, .ct-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.ct-table thead th { position: sticky; top: 0; z-index: 2; background: #f7f5fc; font-size: 11px; color: var(--muted); font-weight: 600; }
.ct-table .sticky { position: sticky; left: 0; z-index: 1; background: #fbfaff; }
.ct-table thead .sticky { z-index: 3; background: #f7f5fc; }
.ct-table .n { text-align: right; font-variant-numeric: tabular-nums; }
.ct-table tbody tr { cursor: pointer; }
.ct-table tbody tr:hover td, .ct-table tbody tr:hover th, .ct-table tbody tr:focus-visible td, .ct-table tbody tr:focus-visible th { background: #f0e7fd; }
.ct-table tbody tr:focus-visible { outline: 2px solid var(--purple); outline-offset: -2px; }
.ct-sort { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.ct-table th[aria-sort=ascending] .ct-sort, .ct-table th[aria-sort=descending] .ct-sort { color: var(--navy); }
.ct-name { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.ct-name .avatar { width: 24px; height: 24px; font-size: 10px; flex: 0 0 auto; }
.ct-chip { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 20px; font-size: 10.5px; font-weight: 600; background: #eceaf4; color: var(--muted); }
.ct-chip.won { background: #dff3e8; color: #2f6e52; }
.ct-chip.lost { background: #f6e1e3; color: #a1373f; }
.ct-chip.wait { background: #fff1d6; color: #8a5a00; }
.ct-chip.stale { margin-left: 0; background: #fff1d6; color: #8a5a00; }
.ct-more { display: flex; justify-content: center; }
.ct-col-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ct-col-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.ct-col-list label { display: flex; gap: 8px; align-items: center; }
.ct-col-move { display: inline-flex; gap: 4px; }
@media (max-width: 560px) {
  .ct-search-wrap { flex: 1 1 100%; }
  .ct-bar-right { margin-left: 0; width: 100%; }
  .ct-count { margin-right: auto; }
  .ct-table th, .ct-table td { max-width: 180px; }
  .ct-pill-btn { max-width: 240px; }
}

/* Painel personalizável: alça ⠿ e menu ⋯ aparecem ao passar o mouse */
.dboard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; align-items: start; }
.dblock { position: relative; min-width: 0; display: flex; flex-direction: column; border-radius: var(--r-panel); }
.dblock.full { grid-column: 1 / -1; }
.dblock > .dcard { flex: 1; }
.dblock-tools { position: absolute; top: 8px; right: 8px; z-index: 4; display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: #ffffffe8; border: 1px solid var(--line); box-shadow: 0 4px 12px #1c124018;
  opacity: 0; transform: translateY(-2px); transition: opacity .12s, transform .12s; pointer-events: none; }
.dblock[data-block=kpis] > .dblock-tools { top: -16px; }
.dblock:hover > .dblock-tools, .dblock:focus-within > .dblock-tools, .dblock-tools:has([aria-expanded=true]) { opacity: 1; transform: none; pointer-events: auto; }
.dblock:hover { outline: 1.5px dashed #cdbaf5; outline-offset: 3px; }
.dblock-handle, .dblock-menu { width: 28px; height: 28px; border: 0; border-radius: 8px; background: none; color: var(--navy); font-size: 16px; line-height: 1; }
.dblock-handle { cursor: grab; touch-action: none; }
.dblock-menu { cursor: pointer; font-weight: 700; }
.dblock-handle:hover, .dblock-menu:hover { background: #f0e7fd; }
.dblock-handle:focus-visible, .dblock-menu:focus-visible, .dtile-handle:focus-visible { outline: 2px solid var(--purple); outline-offset: 1px; }
.dtile { position: relative; }
.dtile-handle { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 7px; border: 0; background: #ffffffd9; color: var(--navy); font-size: 15px; line-height: 1;
  cursor: grab; touch-action: none; opacity: 0; transition: opacity .12s; }
.dtile.accent .dtile-handle { background: #ffffff26; color: #fff; }
.dtile:hover .dtile-handle, .dtile-handle:focus-visible { opacity: 1; }
.dmenu { position: absolute; top: 42px; right: 8px; z-index: 30; min-width: 220px; padding: 6px; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: 0 12px 32px #1c124033; display: flex; flex-direction: column; gap: 1px; }
.dblock[data-block=kpis] > .dmenu { top: 18px; }
.dmenu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.dmenu-check { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.dmenu-check:hover { background: #f0e7fd; }
.dragging { opacity: .35; outline: 2px dashed var(--purple); outline-offset: 2px; }
.dghost { position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none; opacity: .92; box-shadow: 0 18px 40px #1c124040; }
.dghost .dcard { max-height: 260px; overflow: hidden; }
.dghost .dblock-tools, .dghost .dmenu { display: none; }
body.dash-dragging, body.dash-dragging * { cursor: grabbing !important; user-select: none; }
.dhidden { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 10px; border-radius: 12px; background: #ffffff80; border: 1px dashed var(--line); }
@media (max-width: 1100px) { .dboard { grid-template-columns: minmax(0, 1fr); } .dmenu .dblock-size { display: none; } }
@media (hover: none) {  /* toque: sem "passar o mouse", as alças ficam sempre visíveis */
  .dblock-tools { opacity: 1; transform: none; pointer-events: auto; }
  .dtile-handle { opacity: .85; }
  .dblock:hover { outline: none; }
}
@media (prefers-reduced-motion: reduce) { .dblock-tools, .dtile-handle { transition: none; } }

/* Integrações: situação em destaque */
.wa-status { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: #f3f2f8; border: 1px solid var(--line); }
.wa-status div { display: flex; flex-direction: column; gap: 2px; }
.wa-status strong { font-size: 15px; color: var(--navy); }
.wa-status span:not(.wa-status-icon) { font-size: 12.5px; color: #4a4e6b; }
.wa-status-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: #8b8ea8; flex: 0 0 auto; }
.wa-status.ok { background: #e9f6ef; border-color: #b9e2c9; }
.wa-status.ok .wa-status-icon { background: #2f8f5b; }
.wa-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.wa-chip { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.wa-chip.on { background: #e9f6ef; color: #23704a; }
.wa-chip.off { background: #f1f0f6; color: #5b5e78; }
.wa-warn { margin: 0; padding: 9px 12px; border-radius: 10px; background: #fff4de; color: #7a4f00; font-size: 12.5px; }
