/* =========================================================
   CRM Domingos & Tosetto — tema escuro (padrão) e claro
   ========================================================= */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d12;
  --surface: #12151c;
  --surface-2: #171a23;
  --surface-3: #1f2330;
  --raised: #1b1f2a;
  --border: #262b38;
  --border-strong: #343a4b;
  --text: #e8eaf0;
  --muted: #9aa2b5;
  --faint: #6c748a;
  --primary: #5b5ef0;
  --primary-hover: #6d70ff;
  --primary-soft: rgba(109, 112, 255, 0.16);
  --primary-text: #b4b6ff;
  --bubble-in: #1b1f2a;
  --bubble-out: #2a2d6e;
  --bubble-out-text: #eceeff;
  --chat-bg: radial-gradient(1200px 600px at 100% 0%, rgba(91, 94, 240, 0.07), transparent 60%), #0f1218;
  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, 0.14);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.14);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.14);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
  --avatar-l: 32%;
  --avatar-s: 45%;
  --avatar-text: #f1f2ff;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #eef0f5;
  --raised: #ffffff;
  --border: #e3e6ee;
  --border-strong: #d2d7e2;
  --text: #141824;
  --muted: #5b6377;
  --faint: #8a91a3;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: rgba(79, 70, 229, 0.1);
  --primary-text: #4338ca;
  --bubble-in: #ffffff;
  --bubble-out: #e7e8ff;
  --bubble-out-text: #1b1d4a;
  --chat-bg: radial-gradient(1200px 600px at 100% 0%, rgba(79, 70, 229, 0.06), transparent 60%), #f6f7fb;
  --ok: #15803d;
  --ok-soft: #e3f6ea;
  --warn: #a16207;
  --warn-soft: #fdf3d6;
  --danger: #b91c1c;
  --danger-soft: #fdeaea;
  --shadow: 0 1px 2px rgba(20, 24, 36, 0.06), 0 6px 20px rgba(20, 24, 36, 0.06);
  --shadow-lg: 0 24px 64px rgba(20, 24, 36, 0.18);
  --avatar-l: 88%;
  --avatar-s: 65%;
  --avatar-text: #1b1d33;
}

:root {
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --topbar-h: 60px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  background: var(--bg);
}
@media (max-width: 767px) { body { font-size: 16px; } }

::selection { background: var(--primary); color: #fff; }
:focus-visible { outline: 2px solid var(--primary-hover); outline-offset: 2px; }
h1, h2, h3 { font-weight: 650; letter-spacing: -0.015em; line-height: 1.2; margin: 0; text-wrap: balance; color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; }
[data-icon] { display: inline-flex; }

/* scrollbars discretas */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }

/* ---------- topo ---------- */
.topbar {
  flex: none;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--primary) 0%, #9b5cf6 100%);
  box-shadow: 0 4px 14px rgba(91, 94, 240, 0.35);
}
.brand-sub {
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--primary-text); background: var(--primary-soft);
  padding: 2px 7px; border-radius: 999px;
}
.tabs { display: flex; gap: 2px; padding: 3px; background: var(--surface-3); border-radius: 10px; }
.tab {
  border: 0; background: transparent; color: var(--muted);
  padding: 6px 14px; border-radius: 8px; cursor: pointer; min-height: 34px;
  font-weight: 550; font-size: 14px;
  transition: background-color 0.15s, color 0.15s;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); background: var(--surface); box-shadow: var(--shadow); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.me { font-size: 13px; color: var(--muted); white-space: nowrap; margin-right: 4px; }
.mode { font-size: 12px; font-weight: 550; padding: 4px 10px; border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.mode::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mode-test { background: var(--warn-soft); color: var(--warn); }
.mode-live { background: var(--ok-soft); color: var(--ok); }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); cursor: pointer;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
@media (max-width: 599px) {
  .topbar { gap: 10px; padding: 0 12px; }
  .brand-name, .brand-sub, .me, .mode { display: none; }
  .tab { padding: 6px 10px; }
}

/* ---------- botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  font-weight: 550; font-size: 14px;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(91, 94, 240, 0.28); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-secondary { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--border-strong); background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-icon { padding: 0; width: 40px; }
.btn-block { width: 100%; }
.btn-danger-ghost { background: transparent; color: var(--faint); }
.btn-danger-ghost:hover { background: var(--danger-soft); color: var(--danger); }
@media (max-width: 767px) { .btn { min-height: 44px; } .btn-icon { width: 44px; } }

input, select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); background: var(--surface); }
textarea { resize: vertical; min-height: 96px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 550; color: var(--muted); }
label > input, label > select, label > textarea { color: var(--text); font-weight: 400; font-size: 14px; }
small, .hint { font-size: 13px; color: var(--muted); margin: 0; font-weight: 400; }
.stack { display: grid; gap: 14px; }

/* ---------- área principal ---------- */
.main { flex: 1; min-height: 0; display: flex; }
.view { flex: 1; min-width: 0; min-height: 0; }

.inbox { display: grid; grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr); }
.pane { min-height: 0; min-width: 0; background: var(--surface); display: flex; flex-direction: column; }
.inbox[data-panel="list"] .chat-pane,
.inbox[data-panel="list"] .detail-pane,
.inbox[data-panel="chat"] .list-pane,
.inbox[data-panel="chat"] .detail-pane,
.inbox[data-panel="detail"] .list-pane,
.inbox[data-panel="detail"] .chat-pane { display: none; }

@media (min-width: 768px) {
  .inbox { grid-template-columns: 320px 1fr; }
  .list-pane { display: flex !important; border-right: 1px solid var(--border); }
  .inbox[data-panel="list"] .chat-pane { display: flex; }
  .back-to-list { display: none; }
}
@media (min-width: 1200px) {
  .inbox { grid-template-columns: 340px 1fr 340px; }
  .chat-pane, .detail-pane { display: flex !important; }
  .detail-pane { border-left: 1px solid var(--border); }
  .back-to-chat, .open-detail { display: none; }
}

/* ---------- avatar ---------- */
.avatar {
  --h: 230;
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-size: 14px; font-weight: 650; letter-spacing: 0.01em;
  color: var(--avatar-text);
  background: hsl(var(--h) var(--avatar-s) var(--avatar-l));
}
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 56px; height: 56px; font-size: 19px; }

/* ---------- lista ---------- */
.list-tools { padding: 14px 14px 10px; display: grid; gap: 8px; }
.search { position: relative; }
.search input { padding-left: 38px; background: var(--surface-3); border-color: transparent; }
.search input:focus { background: var(--surface); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); display: flex; pointer-events: none; }
.list-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.list-actions select { background-color: var(--surface-3); border-color: transparent; }
.list-tools .btn-ghost { justify-content: flex-start; color: var(--primary-text); min-height: 36px; font-size: 13px; padding: 0 10px; }
.list-tools .btn-ghost:hover { background: var(--primary-soft); color: var(--primary-text); }

.contact-list { list-style: none; margin: 0; padding: 4px 8px 12px; overflow-y: auto; flex: 1; display: grid; gap: 2px; align-content: start; }
.contact {
  width: 100%; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center;
  text-align: left; background: transparent; border: 0; border-radius: 12px;
  padding: 10px; cursor: pointer; color: inherit;
  transition: background-color 0.12s;
}
.contact:hover { background: var(--surface-3); }
.contact.is-active { background: var(--primary-soft); }
.contact-body { min-width: 0; display: grid; gap: 2px; }
.contact-top, .contact-bottom { display: flex; align-items: center; gap: 8px; min-width: 0; }
.contact-name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-time { font-size: 12px; color: var(--faint); flex: none; }
.contact.has-unread .contact-time { color: var(--primary-text); font-weight: 600; }
.contact-preview { flex: 1; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.contact.has-unread .contact-preview { color: var(--text); }
.contact-meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; min-width: 0; }
.badge {
  flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--primary); color: #fff; font-size: 11.5px; font-weight: 650;
  display: inline-flex; align-items: center; justify-content: center;
}
.empty { padding: 32px 16px; color: var(--muted); list-style: none; text-align: center; font-size: 14px; }

/* etiqueta de etapa do funil */
.stage-pill {
  --h: 230;
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  font-size: 11.5px; font-weight: 550; line-height: 1;
  padding: 4px 8px; border-radius: 999px;
  color: hsl(var(--h) 75% 72%);
  background: hsla(var(--h), 80%, 60%, 0.13);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
[data-theme="light"] .stage-pill { color: hsl(var(--h) 60% 34%); background: hsla(var(--h), 80%, 50%, 0.1); }
.stage-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.assignee { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- alertas de atraso ---------- */
.late-flag {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  font-size: 11.5px; font-weight: 600; line-height: 1;
  padding: 4px 8px 4px 6px; border-radius: 999px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.late-flag .icon { width: 13px; height: 13px; }
.late-warn { color: var(--warn); background: var(--warn-soft); }
.late-late { color: var(--danger); background: var(--danger-soft); }
.contact.is-late, .contact.is-warn, .card.is-late, .card.is-warn { position: relative; }
.contact.is-late::before, .contact.is-warn::before {
  content: ''; position: absolute; left: 2px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px;
}
.contact.is-late::before { background: var(--danger); }
.contact.is-warn::before { background: var(--warn); }
.card.is-late { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); box-shadow: inset 3px 0 0 var(--danger); }
.card.is-warn { box-shadow: inset 3px 0 0 var(--warn); }
.card .late-flag { grid-column: 1 / -1; justify-self: start; white-space: normal; line-height: 1.25; }
.column-counts { display: inline-flex; gap: 6px; align-items: center; }
.count-late { display: inline-flex; align-items: center; gap: 4px; color: var(--danger); background: var(--danger-soft); }
.count-late .icon { width: 12px; height: 12px; }
.tab-badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px;
  border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
}

/* ---------- conversa ---------- */
.chat-head, .detail-head {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; min-height: 68px;
  border-bottom: 1px solid var(--border); background: var(--surface);
}
.chat-title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.chat-title h2 { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-sub { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.pill { font-size: 11.5px; font-weight: 550; padding: 3px 8px; border-radius: 999px; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }

.messages {
  list-style: none; margin: 0; padding: 20px clamp(12px, 4vw, 40px);
  overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 6px;
  background: var(--chat-bg);
}
.day {
  align-self: center; font-size: 11.5px; font-weight: 550; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border);
  padding: 3px 12px; border-radius: 999px; margin: 12px 0 8px;
  box-shadow: var(--shadow);
}
.bubble {
  max-width: min(76%, 560px); padding: 9px 13px 7px; border-radius: 16px;
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.45;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}
.bubble-in { align-self: flex-start; background: var(--bubble-in); border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.bubble-out { align-self: flex-end; background: var(--bubble-out); color: var(--bubble-out-text); border-bottom-right-radius: 6px; }
.bubble-out .bubble-meta { color: color-mix(in srgb, var(--bubble-out-text) 62%, transparent); }
.bubble-failed { background: var(--danger-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); }
.bubble-meta { display: block; margin-top: 3px; font-size: 11px; color: var(--faint); text-align: right; white-space: normal; }
.bubble-error { display: block; margin-top: 4px; font-size: 12px; color: var(--danger); }

.composer { flex: none; display: flex; gap: 8px; padding: 12px 16px 16px; align-items: flex-end; background: var(--surface); border-top: 1px solid var(--border); }
.composer textarea { min-height: 44px; max-height: 160px; resize: none; border-radius: 22px; padding: 11px 16px; background: var(--surface-3); border-color: transparent; }
.composer textarea:focus { background: var(--surface); }
.composer .btn-icon { border-radius: 50%; width: 44px; min-height: 44px; }
.template-box { flex: none; padding: 14px 16px 16px; border-top: 1px solid var(--border); display: grid; gap: 10px; background: var(--surface); }
.template-box p { margin: 0; font-size: 13px; color: var(--warn); background: var(--warn-soft); padding: 10px 12px; border-radius: 10px; }
.template-row { display: grid; grid-template-columns: 1fr 110px; gap: 8px; }
.placeholder { margin: auto; padding: 32px; text-align: center; max-width: 360px; color: var(--muted); display: grid; justify-items: center; gap: 8px; }
.placeholder-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); margin-bottom: 6px; }
.placeholder-icon .icon { width: 26px; height: 26px; }
.placeholder h2 { font-size: 17px; }
.placeholder p { margin: 0; font-size: 14px; }

/* ---------- ficha ---------- */
.detail-body { overflow-y: auto; padding: 16px; display: grid; gap: 14px; align-content: start; }
.detail-head h2 { font-size: 15px; flex: 1; }
.profile { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 8px 0 4px; }
.profile h3 { font-size: 17px; }
.profile .hint { font-size: 13px; }
.card-section { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: grid; gap: 12px; }
.section-title { font-size: 12px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); margin: 0; }
.facts { margin: 0; display: grid; gap: 10px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.task { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; border-radius: 10px; }
.task:hover { background: var(--surface-3); }
.task label { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; font-weight: 400; cursor: pointer; }
.task input[type="checkbox"] { width: 18px; min-height: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.task-done .task-title { text-decoration: line-through; color: var(--faint); }
.task-due { display: block; font-size: 12px; color: var(--faint); }
.task-late { color: var(--danger); font-weight: 550; }
.task-form { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 600px) { .task-form { grid-template-columns: 1fr 140px; } .task-form .btn { grid-column: 1 / -1; } }

/* ---------- funil ---------- */
.funnel-view { overflow-y: auto; padding: 20px; background: var(--bg); }
.funnel-head { margin-bottom: 18px; display: grid; gap: 4px; }
.funnel-head h1 { font-size: 22px; }
.funnel-head p { margin: 0; color: var(--muted); font-size: 14px; }
/* Funil em colunas (quadro kanban): uma coluna por etapa, lado a lado; cards empilhados em cada coluna.
   Arraste um card para o lado para mudar de etapa. */
.funnel-view { display: flex; flex-direction: column; overflow: hidden; }
.funnel {
  flex: 1; min-height: 0;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px;
  overflow-x: auto; overflow-y: hidden; padding-bottom: 10px;
  scroll-snap-type: x proximity;
}
.column {
  --h: 230;
  min-height: 0; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 12px 10px 10px; transition: border-color 0.15s, background-color 0.15s;
  border-top: 3px solid hsl(var(--h) 70% 62%);
  scroll-snap-align: start;
}
.column.is-over { border-color: var(--primary); background: var(--primary-soft); }
.column-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; padding: 0 4px; }
.column-head h2 { font-size: 14px; }
.count { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-3); padding: 2px 8px; border-radius: 999px; }
.cards { list-style: none; margin: 0; padding: 0 2px 2px; display: grid; gap: 8px; align-content: start; overflow-y: auto; flex: 1; min-height: 60px; }
.column-head h2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.column-toggle {
  flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
  border: 0; background: transparent; color: var(--faint); cursor: pointer; transition: background-color 0.15s, color 0.15s;
}
.column-toggle:hover { background: var(--surface-3); color: var(--text); }
.column-toggle .icon { width: 15px; height: 15px; }

/* Coluna recolhida: faixa estreita com o nome na vertical. Continua aceitando cards arrastados. */
.column.is-collapsed { padding: 10px 4px; cursor: pointer; align-items: center; }
.column.is-collapsed:hover { background: var(--surface-2); }
.column.is-collapsed .cards { display: none; }
.column.is-collapsed .column-head { flex-direction: column; align-items: center; gap: 10px; padding: 0; margin: 0; height: 100%; }
.column.is-collapsed .column-head h2 {
  flex: none; writing-mode: vertical-rl; transform: rotate(180deg);
  overflow: visible; font-size: 13px; color: var(--muted);
}
.column.is-collapsed .column-counts { flex-direction: column; order: 2; }
@media (max-width: 767px) {
  .funnel-view { padding: 14px 12px; }
  .funnel { grid-auto-columns: 85%; }
}
.card {
  width: 100%; text-align: left; display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center;
  padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  cursor: grab; color: inherit;
  transition: border-color 0.15s, transform 0.15s var(--ease), box-shadow 0.15s;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow); }
.card.is-dragging { opacity: 0.5; }
.card-body { min-width: 0; display: grid; gap: 3px; }
.card-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { font-size: 12px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 2px 10px; }
.card-meta .unread { color: var(--primary-text); font-weight: 600; }
.column-empty { font-size: 13px; color: var(--faint); padding: 14px 6px; text-align: center; border: 1px dashed var(--border); border-radius: 10px; }

/* ---------- diálogos e avisos ---------- */
.dialog {
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px;
  width: min(440px, calc(100vw - 32px)); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg);
}
.dialog::backdrop { background: rgba(5, 6, 10, 0.6); backdrop-filter: blur(2px); }
.dialog h2 { font-size: 18px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.toast {
  position: fixed; left: 50%; top: calc(var(--topbar-h) + 12px); transform: translateX(-50%);
  max-width: calc(100vw - 32px); padding: 11px 16px; border-radius: 12px;
  background: var(--raised); color: var(--text); border: 1px solid var(--border);
  font-size: 14px; box-shadow: var(--shadow-lg); z-index: 10;
}
.toast-error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }

@media (prefers-reduced-motion: no-preference) {
  .bubble { animation: rise 0.2s var(--ease); }
  .toast { animation: drop 0.2s var(--ease); }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  @keyframes drop { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
}
