/* ==========================================================================
   Central Operacional — Design system
   Tokens → base → layout → componentes → módulos
   ========================================================================== */

:root {
  --brand: #2F6BFF;
  --brand-ink: #FFFFFF;
  --brand-soft: color-mix(in srgb, var(--brand) 11%, transparent);
  --brand-line: color-mix(in srgb, var(--brand) 28%, transparent);

  --ai: #7A5AF8;
  --ai-soft: color-mix(in srgb, var(--ai) 11%, transparent);
  --ai-line: color-mix(in srgb, var(--ai) 30%, transparent);

  --ok: #12B76A;   --ok-soft: color-mix(in srgb, var(--ok) 12%, transparent);
  --warn: #F79009; --warn-soft: color-mix(in srgb, var(--warn) 13%, transparent);
  --danger: #F04438; --danger-soft: color-mix(in srgb, var(--danger) 11%, transparent);
  --info: #0BA5EC; --info-soft: color-mix(in srgb, var(--info) 12%, transparent);
  --wa: #1FAF5A;

  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface-2: #FAFAFB;
  --surface-3: #F2F3F6;
  --line: #E5E7EB;
  --line-2: #EEF0F3;
  --text: #0E1320;
  --text-2: #4A5468;
  --text-3: #8C95A6;

  --chat-bg: #EEF0F4;
  --bubble-in: #FFFFFF;

  --shadow-sm: 0 1px 2px rgba(15, 20, 35, .05);
  --shadow: 0 1px 2px rgba(15, 20, 35, .04), 0 2px 8px -2px rgba(15, 20, 35, .06);
  --shadow-lg: 0 24px 48px -12px rgba(15, 20, 35, .22), 0 2px 6px rgba(15, 20, 35, .06);

  --r-xs: 6px;
  --r-sm: 9px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  --sidebar-w: 252px;
  --topbar-h: 64px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
  --bg: #0A0C11;
  --surface: #11141B;
  --surface-2: #151922;
  --surface-3: #1A1F29;
  --line: #222835;
  --line-2: #1B202A;
  --text: #ECEFF5;
  --text-2: #A2ABBB;
  --text-3: #687184;
  --chat-bg: #0D1016;
  --bubble-in: #1A1F29;
  --brand-soft: color-mix(in srgb, var(--brand) 18%, transparent);
  --ai-soft: color-mix(in srgb, var(--ai) 18%, transparent);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 12px -4px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .04);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01', 'tnum';
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.015em; }
p { margin: 0; }
svg { flex-shrink: 0; }
::selection { background: var(--brand-soft); }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.hide { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Layout ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 16px 12px;
  z-index: 20;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 4px 8px 18px;
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #0B1020));
  color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .02em;
  box-shadow: 0 6px 14px -6px var(--brand), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.brand-name { font-weight: 700; font-size: 14.5px; line-height: 1.15; }
.brand-sub { font-size: 11.5px; color: var(--text-3); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-3); padding: 14px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  height: 38px; padding: 0 10px; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 500;
  transition: background .15s, color .15s;
  position: relative;
}
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
[data-theme="dark"] .nav-item.active { color: color-mix(in srgb, var(--brand) 70%, #fff); }
.nav-item .count {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  background: var(--surface-3); color: var(--text-2);
}
.nav-item .count.hot { background: var(--danger); color: #fff; }
.nav-item .count.ai { background: var(--ai); color: #fff; }

.ai-status {
  margin-top: auto;
  border: 1px solid var(--ai-line);
  background: linear-gradient(160deg, var(--ai-soft), transparent 70%);
  border-radius: var(--r);
  padding: 12px;
}
.ai-status-head { display: flex; align-items: center; gap: 10px; }
.ai-orb {
  width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 8%, color-mix(in srgb, var(--ai) 60%, #fff) 22%, var(--ai) 60%, color-mix(in srgb, var(--ai) 60%, #000) 100%);
  box-shadow: 0 0 0 3px var(--ai-soft), 0 6px 16px -4px var(--ai);
  position: relative; flex-shrink: 0;
}
.ai-orb.live::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid var(--ai); opacity: 0; animation: orbPulse 2.4s var(--ease) infinite;
}
@keyframes orbPulse { 0% { transform: scale(.85); opacity: .7; } 100% { transform: scale(1.35); opacity: 0; } }
.ai-status-title { font-weight: 600; font-size: 13px; }
.ai-status-sub { font-size: 11.5px; color: var(--text-2); }
.ai-status-meter { display: flex; gap: 10px; margin-top: 10px; font-size: 11.5px; color: var(--text-2); }
.ai-status-meter b { color: var(--text); font-weight: 700; }

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 8px 2px; margin-top: 12px; border-top: 1px solid var(--line);
}

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 15;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.topbar-crumb { font-size: 12px; color: var(--text-3); }
.topbar .spacer { flex: 1; }
.demo-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  color: var(--warn); background: var(--warn-soft);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  white-space: nowrap;
}
.demo-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.search {
  display: flex; align-items: center; gap: 8px;
  height: 38px; width: 280px; padding: 0 12px;
  border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface); color: var(--text-3);
}
.search input { border: 0; outline: 0; background: transparent; width: 100%; color: var(--text); }
.search kbd {
  font: 600 10.5px var(--font); color: var(--text-3);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px;
}
.content {
  width: 100%; max-width: 1480px; margin: 0 auto;
  padding: 24px 28px 48px;
  animation: viewIn .28s var(--ease);
}
.content.flush { max-width: none; padding: 0; }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 700; }
.page-head p { color: var(--text-2); margin-top: 3px; }

.bottomnav { display: none; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: var(--r-sm);
  font-weight: 600; font-size: 13px; white-space: nowrap;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s, color .15s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--brand); border-color: transparent; color: var(--brand-ink); box-shadow: 0 1px 2px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.18); }
.btn.primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn.ai { background: var(--ai); border-color: transparent; color: #fff; }
.btn.ai:hover { background: color-mix(in srgb, var(--ai) 88%, #000); }
.btn.success { background: var(--ok); border-color: transparent; color: #fff; }
.btn.success:hover { background: color-mix(in srgb, var(--ok) 88%, #000); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.soft { background: var(--brand-soft); border-color: transparent; color: var(--brand); box-shadow: none; }
[data-theme="dark"] .btn.soft { color: color-mix(in srgb, var(--brand) 65%, #fff); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { height: 44px; padding: 0 18px; font-size: 14px; border-radius: var(--r); }
.btn.icon { width: 36px; padding: 0; }
.btn.icon.sm { width: 30px; }
.btn.block { width: 100%; }
.icon-btn {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  display: grid; place-items: center; color: var(--text-2);
  position: relative; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .dot {
  position: absolute; top: 7px; right: 7px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--bg);
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 18px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px 12px;
}
.card-head h3 { font-size: 14.5px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-head .sub { font-size: 12px; color: var(--text-3); font-weight: 500; }
.card-body { padding: 0 18px 18px; }
.card.hoverable { transition: border-color .15s, box-shadow .2s, transform .2s; cursor: pointer; }
.card.hoverable:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); box-shadow: var(--shadow); transform: translateY(-1px); }

.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpis.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1440px) { .kpis.six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis.six { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hide-sm { display: none; } }
.kpi { padding: 16px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.kpi-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.kpi-foot { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.delta { font-weight: 600; font-size: 11.5px; padding: 1px 6px; border-radius: 999px; }
.delta.up { color: var(--ok); background: var(--ok-soft); }
.delta.down { color: var(--danger); background: var(--danger-soft); }
.tone-brand { color: var(--brand); background: var(--brand-soft); }
.tone-ai { color: var(--ai); background: var(--ai-soft); }
.tone-ok { color: var(--ok); background: var(--ok-soft); }
.tone-warn { color: var(--warn); background: var(--warn-soft); }
.tone-danger { color: var(--danger); background: var(--danger-soft); }
.tone-info { color: var(--info); background: var(--info-soft); }
.tone-neutral { color: var(--text-2); background: var(--surface-3); }

/* Hero do dashboard */
.hero {
  display: flex; align-items: center; gap: 18px; padding: 18px 20px; margin-bottom: 16px;
  border-radius: var(--r-xl);
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--ai) 30%, transparent), transparent 55%),
    radial-gradient(90% 120% at 0% 100%, color-mix(in srgb, var(--brand) 35%, transparent), transparent 60%),
    #0E1220;
  color: #EEF1F7; border: 1px solid rgba(255,255,255,.06);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: linear-gradient(90deg, transparent, #000 60%);
}
.hero h2 { font-size: 19px; font-weight: 700; }
.hero p { color: rgba(238,241,247,.72); font-size: 13.5px; margin-top: 3px; }
.hero .hero-actions { margin-left: auto; display: flex; gap: 8px; position: relative; z-index: 1; flex-wrap: wrap; }
.hero .btn { box-shadow: none; }
.hero .btn.glass { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color: #fff; }
.hero .btn.glass:hover { background: rgba(255,255,255,.14); }
.hero .ai-orb { width: 46px; height: 46px; }

/* ---------- Badges / pills / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.outline { background: transparent; border: 1px solid var(--line); color: var(--text-2); }
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px;
  border-radius: 6px; font-size: 11px; font-weight: 600;
  background: var(--surface-3); color: var(--text-2);
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  transition: all .15s;
}
.chip:hover { border-color: var(--brand-line); color: var(--text); }
.chip.on { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); font-weight: 600; }
.chip .x { opacity: .6; }
.chip .x:hover { opacity: 1; }

/* Segmented */
.seg {
  display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px;
  background: var(--surface-3); border: 1px solid var(--line-2);
}
.seg button {
  height: 30px; padding: 0 12px; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 6px;
}
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg .n { font-size: 11px; color: var(--text-3); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button {
  height: 40px; padding: 0 14px; font-weight: 600; font-size: 13px; color: var(--text-3);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
}
.tabs button.on { color: var(--text); border-bottom-color: var(--brand); }
.tabs button:hover { color: var(--text); }

/* Avatar */
.avatar {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 700; font-size: 12.5px;
  color: #fff; letter-spacing: .01em;
}
.avatar.round { border-radius: 50%; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; border-radius: 8px; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; border-radius: 16px; }

/* ---------- Formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 11.5px; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px;
  border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface); color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238C95A6' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.switch { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span {
  position: absolute; inset: 0; border-radius: 999px; background: var(--line);
  transition: background .2s; cursor: pointer;
}
.switch span::after {
  content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .2s var(--ease);
}
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(16px); }
input[type="range"] { width: 100%; accent-color: var(--brand); }
input[type="color"] { width: 44px; height: 38px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 3px; background: var(--surface); cursor: pointer; }

/* ---------- Listas ---------- */
.list { display: flex; flex-direction: column; }
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-top: 1px solid var(--line-2);
  transition: background .12s;
}
.list-row:first-child { border-top: 0; }
a.list-row:hover, .list-row.clickable:hover { background: var(--surface-2); cursor: pointer; }
.list-title { font-weight: 600; font-size: 13.5px; }
.list-sub { font-size: 12.5px; color: var(--text-2); }
.empty { padding: 36px 20px; text-align: center; color: var(--text-3); }
.empty .ico { width: 48px; height: 48px; border-radius: 14px; margin: 0 auto 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 18px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable:hover td { background: var(--surface-2); cursor: pointer; }

/* Timeline */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-item { position: relative; padding: 0 0 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -26px; top: 0; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line);
  color: var(--text-3);
}
.tl-dot.ai { border-color: var(--ai); color: var(--ai); background: var(--ai-soft); }
.tl-dot.ok { border-color: var(--ok); color: var(--ok); }
.tl-dot.brand { border-color: var(--brand); color: var(--brand); }
.tl-dot.warn { border-color: var(--warn); color: var(--warn); }
.tl-dot.danger { border-color: var(--danger); color: var(--danger); }
.tl-title { font-weight: 600; font-size: 13px; }
.tl-meta { font-size: 12px; color: var(--text-3); }
.tl-text { font-size: 13px; color: var(--text-2); margin-top: 2px; }

/* Atividade IA */
.activity-item { display: flex; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--line-2); align-items: flex-start; }
.activity-item:first-child { border-top: 0; }
.activity-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.activity-item .t { font-size: 13px; line-height: 1.45; }
.activity-item .t b { font-weight: 600; }
.activity-item .m { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.activity-item.fresh { animation: freshIn .6s var(--ease); background: linear-gradient(90deg, var(--ai-soft), transparent); }
@keyframes freshIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

/* Mini chart */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-stack { width: 100%; max-width: 30px; display: flex; flex-direction: column-reverse; border-radius: 6px; overflow: hidden; }
.bar-stack .ia { background: var(--ai); }
.bar-stack .hu { background: color-mix(in srgb, var(--brand) 55%, var(--surface-3)); }
.bar-col .lbl { font-size: 11px; color: var(--text-3); }
.bar-col.today .lbl { color: var(--text); font-weight: 700; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Progress */
.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--ai); transition: width .5s var(--ease); }

/* ---------- Overlay: modal / drawer / sheet ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8, 10, 16, .48);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .18s ease;
}
.overlay.closing { animation: fadeOut .16s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.modal {
  width: 100%; max-width: 560px; max-height: calc(100vh - 40px);
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-xl); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: popIn .24s var(--ease);
}
.modal.lg { max-width: 760px; }
.modal.xl { max-width: 980px; }
.modal.sm { max-width: 420px; }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { font-size: 16px; font-weight: 700; }
.modal-head p { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.overlay.drawer { justify-content: flex-end; padding: 0; align-items: stretch; }
.overlay.drawer .modal { max-width: 520px; max-height: none; height: 100%; border-radius: 0; border-width: 0 0 0 1px; animation: slideIn .28s var(--ease); }
.overlay.drawer .modal.lg { max-width: 680px; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }

/* Toasts */
#toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast {
  pointer-events: auto; width: 360px; max-width: calc(100vw - 32px);
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 14px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  animation: toastIn .32s var(--ease);
}
.toast.out { animation: toastOut .22s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(16px); } }
.toast .ti { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.toast .tt { font-weight: 600; font-size: 13px; }
.toast .ts { font-size: 12.5px; color: var(--text-2); margin-top: 1px; }
.toast .ta { margin-top: 8px; display: flex; gap: 6px; }

/* Popover (notificações) */
.popover {
  position: fixed; z-index: 120; width: 380px; max-width: calc(100vw - 24px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); overflow: hidden; animation: popIn .2s var(--ease);
}
.popover-head { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-2); }
.popover-body { max-height: 420px; overflow-y: auto; }
.notif { display: flex; gap: 11px; padding: 12px 16px; border-top: 1px solid var(--line-2); cursor: pointer; }
.notif:first-child { border-top: 0; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.notif.unread .nt::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-left: 6px; vertical-align: 1px; }
.notif .nt { font-weight: 600; font-size: 13px; }
.notif .ns { font-size: 12.5px; color: var(--text-2); }
.notif .nm { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* ==========================================================================
   Módulo: Atendimento (WhatsApp simulado)
   ========================================================================== */
.inbox {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr) 340px;
  height: calc(100vh - var(--topbar-h));
  background: var(--surface);
}
.inbox.no-info { grid-template-columns: 340px minmax(0, 1fr); }
.inbox-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.inbox-list-head { padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line-2); }
.inbox-filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.inbox-filters .chip { height: 28px; font-size: 12px; flex-shrink: 0; }
.inbox-scroll { overflow-y: auto; flex: 1; }
.conv-item {
  display: flex; gap: 11px; padding: 12px 14px; border-bottom: 1px solid var(--line-2);
  cursor: pointer; position: relative; transition: background .12s;
}
.conv-item:hover { background: var(--surface-2); }
.conv-item.active { background: var(--brand-soft); }
.conv-item.active::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.conv-item .ci-top { display: flex; align-items: baseline; gap: 6px; }
.conv-item .ci-name { font-weight: 600; font-size: 13.5px; flex: 1; min-width: 0; }
.conv-item .ci-time { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.conv-item .ci-msg { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.conv-item .ci-tags { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.conv-item .unread { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--wa); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.conv-item.new { animation: convNew 1.4s var(--ease); }
@keyframes convNew { 0% { background: color-mix(in srgb, var(--wa) 18%, transparent); } 100% { background: transparent; } }

.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--chat-bg); position: relative; }
.chat-head {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 62px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.chat-head .who { min-width: 0; flex: 1; }
.chat-head .who b { font-size: 14px; display: block; }
.chat-head .who span { font-size: 12px; color: var(--text-3); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mode-banner {
  display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 12.5px;
  border-bottom: 1px solid var(--line);
}
.mode-banner.ai { background: linear-gradient(90deg, var(--ai-soft), var(--surface) 80%); color: var(--text-2); }
.mode-banner.human { background: linear-gradient(90deg, var(--brand-soft), var(--surface) 80%); color: var(--text-2); }
.mode-banner.wait { background: linear-gradient(90deg, var(--warn-soft), var(--surface) 80%); color: var(--text-2); }
.mode-banner b { color: var(--text); }
.mode-banner .btn { margin-left: auto; }
.sim-bar {
  display: flex; align-items: center; gap: 8px; padding: 6px 16px; font-size: 11.5px; color: var(--text-3);
  background: var(--surface-2); border-bottom: 1px dashed var(--line);
}
.sim-bar .live { display: inline-flex; align-items: center; gap: 6px; color: var(--danger); font-weight: 700; letter-spacing: .04em; }
.sim-bar .live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }

.chat-scroll {
  flex: 1; overflow-y: auto; padding: 20px 6% 12px;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px);
  background-size: 18px 18px;
}
.day-sep { text-align: center; margin: 8px 0 14px; }
.day-sep span { font-size: 11.5px; font-weight: 600; color: var(--text-2); background: var(--surface); padding: 4px 10px; border-radius: 8px; box-shadow: var(--shadow-sm); }
.msg { display: flex; margin: 3px 0; }
.msg.anim, .typing-row { animation: msgIn .28s var(--ease); }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }
.msg.out { justify-content: flex-end; }
.bubble {
  max-width: min(76%, 560px); padding: 8px 11px 6px; border-radius: 12px;
  box-shadow: 0 1px 1px rgba(0,0,0,.06); font-size: 13.5px; line-height: 1.45;
  white-space: pre-wrap; word-wrap: break-word; position: relative;
}
.msg.in .bubble { background: var(--bubble-in); border-top-left-radius: 4px; }
.msg.out.ia .bubble { background: color-mix(in srgb, var(--ai) 13%, var(--surface)); border-top-right-radius: 4px; }
.msg.out.human .bubble { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); border-top-right-radius: 4px; }
.bubble .by { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; margin-bottom: 2px; }
.msg.ia .by { color: var(--ai); }
.msg.human .by { color: var(--brand); }
.bubble .meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.bubble .meta .ticks { color: #53BDEB; }
.msg.sys { justify-content: center; margin: 12px 0; }
.msg.sys .sys-pill {
  display: inline-flex; align-items: center; gap: 7px; max-width: 88%;
  font-size: 12px; font-weight: 500; padding: 6px 12px; border-radius: 10px;
  background: var(--surface); color: var(--text-2); box-shadow: var(--shadow-sm); border: 1px solid var(--line-2);
}
.msg.sys.warn .sys-pill { color: color-mix(in srgb, var(--warn) 80%, var(--text)); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.msg.sys.brand .sys-pill { color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); border-color: var(--brand-line); }
.msg.sys.ai .sys-pill { color: var(--ai); background: color-mix(in srgb, var(--ai) 8%, var(--surface)); border-color: var(--ai-line); }
.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
.typing-label { font-size: 11px; color: var(--text-3); margin: 2px 4px 6px; }

/* Card de transferência (dentro do chat e na central) */
.handoff {
  margin: 14px auto; max-width: 520px;
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line));
  box-shadow: var(--shadow);
}
.handoff.anim { animation: popIn .35s var(--ease); }
.handoff-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: linear-gradient(90deg, var(--warn-soft), transparent);
  border-bottom: 1px solid var(--line-2);
}
.handoff-head .t { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: color-mix(in srgb, var(--warn) 85%, var(--text)); }
.handoff-head .s { font-size: 12px; color: var(--text-2); }
.handoff dl { margin: 0; display: grid; grid-template-columns: 128px 1fr; gap: 0; }
.handoff dt, .handoff dd { margin: 0; padding: 8px 14px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.handoff dt { color: var(--text-3); font-weight: 500; }
.handoff dd { font-weight: 600; }
.handoff .foot { display: flex; gap: 8px; padding: 12px 14px; flex-wrap: wrap; }
.handoff.done { border-color: var(--line); }
.handoff.done .handoff-head { background: var(--surface-2); }

.composer { background: var(--surface); border-top: 1px solid var(--line); padding: 10px 14px 12px; }
.composer-role { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 11.5px; color: var(--text-3); flex-wrap: wrap; }
.composer-role .seg button { height: 24px; font-size: 11.5px; padding: 0 9px; }
.composer-row { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea {
  flex: 1; resize: none; min-height: 42px; max-height: 140px; padding: 11px 14px;
  border-radius: 22px; border: 1px solid var(--line); background: var(--surface-2); outline: none; line-height: 1.4;
}
.composer textarea:focus { border-color: var(--brand); background: var(--surface); }
.composer.sim textarea { border-style: dashed; }
.send-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--wa); color: #fff; flex-shrink: 0; transition: transform .1s, filter .15s; }
.send-btn:hover { filter: brightness(1.06); }
.send-btn:active { transform: scale(.95); }
.send-btn.owner { background: var(--brand); }
.quick-replies { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 8px; }
.quick-replies .chip { flex-shrink: 0; height: 28px; font-size: 12px; }
.composer-locked { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-2); }

/* Painel de informações coletadas */
.info-panel { border-left: 1px solid var(--line); overflow-y: auto; background: var(--surface); }
.info-section { padding: 16px; border-bottom: 1px solid var(--line-2); }
.info-section h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 650; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.collect { display: flex; flex-direction: column; gap: 2px; }
.collect-row { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; }
.collect-ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; border: 1.5px dashed var(--line); color: var(--text-3); transition: all .3s var(--ease); }
.collect-row.ok .collect-ico { border: 0; background: var(--ok); color: #fff; }
.collect-row.ok.anim .collect-ico { animation: tick .4s var(--ease); }
.collect-row.asking .collect-ico { border-color: var(--ai); color: var(--ai); border-style: solid; }
@keyframes tick { 0% { transform: scale(.5); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.collect-row .k { font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.collect-row .v { font-size: 13px; font-weight: 600; }
.collect-row.empty .v { color: var(--text-3); font-weight: 400; font-style: italic; }
.collect-row.asking .v { color: var(--ai); font-style: normal; font-weight: 500; }

/* ==========================================================================
   Módulo: Agenda
   ========================================================================== */
.agenda-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.agenda-toolbar .period { font-weight: 700; font-size: 16px; min-width: 210px; }
.agenda-toolbar .period::first-letter { text-transform: uppercase; }
.cal.day .cal-ev .t { display: block !important; }
.cal { overflow: hidden; }
.cal-week { display: grid; grid-template-columns: 56px repeat(var(--days, 7), minmax(0, 1fr)); }
.cal-head { position: sticky; top: 0; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--line); }
.cal-dayhead { padding: 10px 8px; text-align: center; border-left: 1px solid var(--line-2); }
.cal-dayhead .dw { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.cal-dayhead .dn { font-size: 20px; font-weight: 700; line-height: 1.2; }
.cal-dayhead.today .dn { color: #fff; background: var(--brand); width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 15px; margin-top: 2px; }
.cal-body { position: relative; max-height: 640px; overflow-y: auto; }
.cal-grid { display: grid; grid-template-columns: 56px repeat(var(--days, 7), minmax(0, 1fr)); position: relative; }
.cal-hours { display: flex; flex-direction: column; }
.cal-hour { height: 56px; font-size: 11px; color: var(--text-3); text-align: right; padding-right: 8px; transform: translateY(-7px); }
.cal-col { position: relative; border-left: 1px solid var(--line-2); background-image: linear-gradient(var(--line-2) 1px, transparent 1px); background-size: 100% 56px; cursor: copy; }
.cal-col.today { background-color: color-mix(in srgb, var(--brand) 3%, transparent); }
.cal-col.off { background-color: var(--surface-2); }
.cal-ev {
  position: absolute; left: 4px; right: 4px; border-radius: 8px; padding: 5px 7px; overflow: hidden;
  font-size: 11.5px; line-height: 1.3; cursor: pointer; border-left: 3px solid;
  transition: transform .12s, box-shadow .15s; z-index: 1;
}
.cal-ev:hover { transform: translateY(-1px); box-shadow: var(--shadow); z-index: 3; }
.cal-ev b { display: block; font-weight: 650; font-size: 12px; }
.cal-ev .t { opacity: .8; }
.ev-confirmado { background: color-mix(in srgb, var(--brand) 13%, var(--surface)); border-color: var(--brand); color: var(--text); }
.ev-pendente { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--warn) 14%, var(--surface)) 0 8px, color-mix(in srgb, var(--warn) 8%, var(--surface)) 8px 16px); border-color: var(--warn); }
.ev-concluido { background: color-mix(in srgb, var(--ok) 11%, var(--surface)); border-color: var(--ok); }
.ev-cancelado { background: var(--surface-3); border-color: var(--text-3); text-decoration: line-through; opacity: .65; }
.ev-andamento { background: color-mix(in srgb, var(--ai) 13%, var(--surface)); border-color: var(--ai); }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 2; pointer-events: none; }
.now-line::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-month .mh { padding: 10px; font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
.cal-cell { min-height: 112px; padding: 8px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); cursor: pointer; transition: background .12s; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell:hover { background: var(--surface-2); }
.cal-cell.other { background: var(--surface-2); color: var(--text-3); }
.cal-cell .n { font-size: 12.5px; font-weight: 600; margin-bottom: 6px; display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 50%; }
.cal-cell.today .n { background: var(--brand); color: #fff; }
.mev { display: flex; align-items: center; gap: 5px; font-size: 11px; padding: 2px 6px; border-radius: 5px; margin-bottom: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mev .d { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.agenda-side { display: flex; flex-direction: column; gap: 16px; }
.agenda-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.slot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.slot {
  height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface);
  font-weight: 600; font-size: 12.5px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15;
  transition: all .15s;
}
.slot small { font-size: 10.5px; font-weight: 500; color: var(--text-3); }
.slot:hover { border-color: var(--brand); color: var(--brand); }
.slot.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.slot.on small { color: rgba(255,255,255,.8); }
.slot.busy { background: var(--surface-3); color: var(--text-3); text-decoration: line-through; pointer-events: none; }
.alert {
  display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); font-size: 12.5px; align-items: flex-start;
}
.alert.warn { background: var(--warn-soft); color: color-mix(in srgb, var(--warn) 70%, var(--text)); }
.alert.ok { background: var(--ok-soft); color: color-mix(in srgb, var(--ok) 70%, var(--text)); }
.alert.ai { background: var(--ai-soft); color: color-mix(in srgb, var(--ai) 75%, var(--text)); }
.alert.danger { background: var(--danger-soft); color: color-mix(in srgb, var(--danger) 75%, var(--text)); }
.alert.info { background: var(--info-soft); color: color-mix(in srgb, var(--info) 60%, var(--text)); }

/* Lista do dia (agenda / dashboard) */
.appt { display: flex; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line-2); cursor: pointer; transition: background .12s; }
.appt:first-child { border-top: 0; }
.appt:hover { background: var(--surface-2); }
.appt-time { width: 54px; flex-shrink: 0; }
.appt-time b { display: block; font-size: 14px; font-weight: 700; }
.appt-time span { font-size: 11px; color: var(--text-3); }
.appt-bar { width: 3px; border-radius: 3px; flex-shrink: 0; }

/* ==========================================================================
   Módulo: Clientes
   ========================================================================== */
.client-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.client-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.client-card .stats { display: flex; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.client-card .stats div { font-size: 11.5px; color: var(--text-3); }
.client-card .stats b { display: block; font-size: 15px; color: var(--text); font-weight: 700; }
.profile-head { display: flex; gap: 16px; align-items: flex-start; padding: 20px; flex-wrap: wrap; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.profile-meta span { display: inline-flex; align-items: center; gap: 6px; }
.equip-card { padding: 14px; display: flex; gap: 12px; align-items: flex-start; }
.equip-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.spec { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.spec div { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line-2); }
.spec span { display: block; font-size: 11px; color: var(--text-3); font-weight: 500; }
.spec b { font-size: 13px; font-weight: 650; }

/* ==========================================================================
   Módulo: Orçamentos (kanban)
   ========================================================================== */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(264px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kcol { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-lg); display: flex; flex-direction: column; min-height: 200px; }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; font-weight: 650; font-size: 13px; }
.kcol-head .n { margin-left: auto; font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.kcol-head .bullet { width: 8px; height: 8px; border-radius: 50%; }
.kcol-sum { padding: 0 12px 8px; font-size: 11.5px; color: var(--text-3); }
.kcol-body { padding: 0 8px 10px; display: flex; flex-direction: column; gap: 8px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s; }
.kcard:hover { box-shadow: var(--shadow); transform: translateY(-1px); border-color: color-mix(in srgb, var(--brand) 25%, var(--line)); }
.kcard .num { font-size: 11px; font-weight: 600; color: var(--text-3); }
.kcard .ttl { font-weight: 600; font-size: 13px; margin: 3px 0 6px; line-height: 1.35; }
.kcard .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 8px; }
.kcard .val { font-weight: 700; font-size: 13.5px; }
.items-table { width: 100%; border-collapse: collapse; }
.items-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 600; text-align: left; padding: 6px 6px; }
.items-table td { padding: 4px 6px; vertical-align: middle; }
.items-table .input, .items-table .select { height: 34px; }
.total-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-2); margin-top: 12px; }
.total-row b { font-size: 18px; }
.stepper { display: flex; align-items: center; gap: 0; overflow-x: auto; scrollbar-width: none; }
.step { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--text-3); white-space: nowrap; }
.step .b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 10.5px; }
.step.done { color: var(--text-2); }
.step.done .b { background: var(--ok); color: #fff; }
.step.cur { color: var(--brand); }
.step.cur .b { background: var(--brand); color: #fff; }
.step-line { width: 18px; height: 2px; background: var(--line); margin: 0 6px; flex-shrink: 0; }

/* ==========================================================================
   Módulo: Instagram
   ========================================================================== */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.post { overflow: hidden; display: flex; flex-direction: column; }
.post-art { aspect-ratio: 1 / 1; position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 22px; color: #fff; }
.post-art .eyebrow { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .85; display: flex; align-items: center; gap: 6px; }
.post-art .headline { font-size: 24px; font-weight: 800; line-height: 1.08; letter-spacing: -.025em; margin-top: 10px; max-width: 82%; position: relative; z-index: 1; }
.post-art .subline { font-size: 12.5px; margin-top: 8px; opacity: .85; max-width: 70%; position: relative; z-index: 1; }
.post-art .illu { position: absolute; right: -6%; bottom: 7%; width: 72%; opacity: .98; }
.post-art .brandline { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; position: relative; z-index: 1; }
.post-art .brandline .bm { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: rgba(255,255,255,.18); font-size: 9px; font-weight: 800; }
.post-art .grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 24px 24px; mask-image: radial-gradient(circle at 75% 70%, #000, transparent 70%); }
.post-art .stamp { position: absolute; top: 14px; right: 14px; z-index: 2; }
.art-navy { background: radial-gradient(120% 90% at 85% 90%, #2F6BFF 0%, transparent 55%), linear-gradient(160deg, #0E1530, #0A0E1E); }
.art-amber { background: radial-gradient(110% 90% at 90% 90%, #FFB020 0%, transparent 55%), linear-gradient(160deg, #2A1A05, #120C04); }
.art-green { background: radial-gradient(110% 90% at 90% 90%, #12B76A 0%, transparent 55%), linear-gradient(160deg, #07261A, #04130D); }
.art-violet { background: radial-gradient(110% 90% at 90% 90%, #7A5AF8 0%, transparent 55%), linear-gradient(160deg, #1A1238, #0C0920); }
.art-graphite { background: radial-gradient(110% 90% at 90% 90%, #6B7385 0%, transparent 55%), linear-gradient(160deg, #1C2029, #0B0D12); }
.art-red { background: radial-gradient(110% 90% at 90% 90%, #F04438 0%, transparent 55%), linear-gradient(160deg, #2A0B0A, #140605); }
.post-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-caption { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-tags { font-size: 12.5px; color: var(--brand); font-weight: 500; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.post-actions { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line-2); }
.post-actions .btn { flex: 1; }
.ig-frame { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.ig-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 13px; font-weight: 600; }
.ig-cap { padding: 10px 12px 14px; font-size: 13px; white-space: pre-wrap; }
.ig-cap .h { color: var(--brand); }

/* ==========================================================================
   Módulo: Aprovações
   ========================================================================== */
.appr { display: flex; gap: 14px; padding: 16px 18px; border-top: 1px solid var(--line-2); align-items: flex-start; }
.appr:first-child { border-top: 0; }
.appr-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.appr-title { font-weight: 650; font-size: 14px; }
.appr-detail { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.appr-quote { margin-top: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13px; color: var(--text-2); white-space: pre-wrap; }
.appr-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.appr.leaving { animation: leave .35s var(--ease) forwards; }
@keyframes leave { to { opacity: 0; transform: translateX(24px); } }
.done-state { padding: 48px 20px; text-align: center; }
.done-state .big { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }

/* ==========================================================================
   Módulo: Configurações da IA
   ========================================================================== */
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.setting-row:first-child { border-top: 0; }
.setting-row .t { font-weight: 600; font-size: 13.5px; }
.setting-row .d { font-size: 12.5px; color: var(--text-2); }
.q-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); margin-bottom: 6px; }
.q-item .ord { width: 22px; height: 22px; border-radius: 6px; background: var(--surface-3); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--text-2); }
.rule-lock { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.rule-lock:first-child { border-top: 0; }
.integ { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.integ:first-child { border-top: 0; }
.preview-phone { border-radius: 26px; border: 1px solid var(--line); overflow: hidden; background: var(--chat-bg); box-shadow: var(--shadow); }
.preview-phone .ph-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.preview-phone .ph-body { padding: 14px; min-height: 260px; }

/* Roteiro da demonstração */
.guide-step { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); align-items: flex-start; }
.guide-step:first-child { border-top: 0; }
.guide-step .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: var(--surface-3); color: var(--text-2); flex-shrink: 0; }
.guide-step.done .n { background: var(--ok); color: #fff; }
.guide-step .gt { font-weight: 600; font-size: 13.5px; }
.guide-step .gd { font-size: 12.5px; color: var(--text-2); }

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (max-width: 1360px) {
  .inbox { grid-template-columns: 310px minmax(0, 1fr) 300px; }
  .settings-layout { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: 1fr; }
  .inbox, .inbox.no-info { grid-template-columns: 300px minmax(0, 1fr); }
  .inbox .info-panel { display: none; }
  .inbox.show-info .info-panel { display: block; position: fixed; right: 0; top: var(--topbar-h); bottom: 0; width: 340px; z-index: 30; box-shadow: var(--shadow-lg); }
  .agenda-layout, .settings-layout { grid-template-columns: 1fr; }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search { width: 200px; }
}
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 0 16px; }
  .search, .topbar-crumb { display: none; }
  .content { padding: 16px 16px 104px; }
  .content.flush { padding: 0; }
  .g-2, .g-3 { grid-template-columns: 1fr; }
  .bottomnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .bottomnav a, .bottomnav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 10.5px; font-weight: 600; color: var(--text-3); padding: 6px 0; border-radius: 10px; position: relative;
  }
  .bottomnav .active { color: var(--brand); }
  .bottomnav .bdg { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 9.5px; display: grid; place-items: center; }
  .inbox, .inbox.no-info { grid-template-columns: 1fr; height: calc(100vh - var(--topbar-h) - 64px); }
  .inbox.has-chat .inbox-list { display: none; }
  .inbox:not(.has-chat) .chat { display: none; }
  .inbox.show-info .info-panel { width: 100%; top: var(--topbar-h); bottom: 64px; }
  .chat-scroll { padding: 14px 10px; }
  .bubble { max-width: 86%; }
  .hero { flex-wrap: wrap; padding: 16px; gap: 12px; }
  .hero .ai-orb { width: 34px; height: 34px; }
  .hero h2 { font-size: 17px; }
  .hero p { font-size: 13px; }
  .hero .hero-actions { margin-left: 0; width: 100%; }
  .hero .hero-actions .btn { flex: 1; }
  .hero .hero-actions .btn.ai { flex-basis: 100%; height: 44px; font-size: 14px; }
  .toast { width: 100%; }
  #toast-root { left: 12px; right: 12px; bottom: 80px; align-items: stretch; }
  .overlay { padding: 0; align-items: flex-end; }
  .overlay .modal { max-height: 92vh; border-radius: var(--r-xl) var(--r-xl) 0 0; animation: sheetUp .3s var(--ease); }
  .overlay.drawer .modal { height: 92vh; border-radius: var(--r-xl) var(--r-xl) 0 0; }
  @keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
  .form-grid { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 20px; }
  .handoff dl { grid-template-columns: 104px 1fr; }
  .cal-body { max-height: 560px; }
  .agenda-toolbar .period { min-width: 0; width: 100%; order: -1; }
  .agenda-toolbar > label { display: none !important; }
  .agenda-toolbar > .grow { display: none; }
  .agenda-toolbar .seg { margin-left: auto; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 13px; }
  .kpi-value { font-size: 24px; }
  .g-4 { grid-template-columns: 1fr 1fr; }
  .demo-pill .txt { display: none; }
  .slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-hour { font-size: 10px; }
  .cal-ev { font-size: 10.5px; padding: 3px 4px; }
  .cal-ev .t { display: none; }
  .cal-cell { min-height: 72px; padding: 4px; }
  .mev span { display: none; }
  .posts { grid-template-columns: 1fr; }
}
/* Sugestão de resposta da IA para o proprietário */
.handoff.sug-card { border-color: var(--ai-line); }
.sug-text { padding: 12px 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; background: color-mix(in srgb, var(--ai) 5%, var(--surface)); }
.sim-toggle { display: none; }
.sim-toggle.on { color: var(--danger); background: var(--danger-soft); }

/* Agendamento em 3 passos */
.ap-sec { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.ap-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ap-label .n { width: 18px; height: 18px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-grid; place-items: center; font-size: 10.5px; margin-right: 6px; letter-spacing: 0; }
.ap-client { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.day-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px 4px; scroll-snap-type: x proximity; }
.day-chip { flex: 0 0 auto; width: 66px; padding: 9px 0 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; align-items: center; gap: 1px; scroll-snap-align: start; transition: all .15s; }
.day-chip span { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; }
.day-chip b { font-size: 19px; line-height: 1.15; }
.day-chip small { font-size: 10.5px; color: var(--ok); font-weight: 600; }
.day-chip.full small { color: var(--text-3); }
.day-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 16px -8px var(--brand); }
.day-chip.on span, .day-chip.on small { color: rgba(255,255,255,.88); }
.ap-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.ap-slots .slot { height: 54px; font-size: 15px; border-radius: 12px; }
.ap-more { border-top: 1px solid var(--line-2); padding-top: 12px; }
.ap-more summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--brand); list-style: none; display: flex; align-items: center; gap: 6px; }
.ap-more summary::-webkit-details-marker { display: none; }
.ap-more[open] summary { margin-bottom: 14px; }

/* Instagram: revisão uma a uma */
.ig-review { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 16px; border-color: var(--ai-line); background: linear-gradient(120deg, var(--ai-soft), var(--surface) 70%); }
.ig-stack { position: relative; width: 70px; height: 64px; flex-shrink: 0; }
.ig-stack > div { position: absolute; top: 0; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; border: 2px solid var(--surface); box-shadow: var(--shadow); }
.ig-mini { width: 300px; transform: scale(.1867); transform-origin: 0 0; }
.rv-art { max-width: 360px; margin: 0 auto; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.rv-cap { font-size: 14px; line-height: 1.5; white-space: pre-wrap; color: var(--text-2); }
.rv-foot { display: flex; gap: 8px; width: 100%; }
.rv-foot .btn { flex: 1; height: 48px; font-size: 14px; }
.rv-foot .btn.success { flex: 2; }
.post-actions .btn.icon { flex: 0 0 40px; }

/* Tela inicial para iniciante */
.home { max-width: 860px; margin: 0 auto; }
.home-hero { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-xl); color: #EEF1F7; background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--ai) 35%, transparent), transparent 60%), radial-gradient(90% 120% at 0% 100%, color-mix(in srgb, var(--brand) 35%, transparent), transparent 60%), #0E1220; }
.home-hero h2 { font-size: 19px; }
.home-hero p { font-size: 13.5px; color: rgba(238,241,247,.78); margin-top: 2px; }
.home-hero b { color: #fff; }
.home-hero .ai-orb { width: 40px; height: 40px; }
.home-hero .btn.glass { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #fff; box-shadow: none; flex-shrink: 0; }
.home-h { display: flex; align-items: center; gap: 8px; margin: 22px 2px 10px; }
.home-h h2 { font-size: 17px; font-weight: 750; }
.home-count { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.tile:active { transform: scale(.98); }
.tile:hover { box-shadow: var(--shadow); }
.tile b { font-size: 15px; margin-top: 6px; }
.tile small { font-size: 12px; color: var(--text-3); line-height: 1.35; }
.tile-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; position: relative; }
.tile-badge { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); }
.home-fold { overflow: hidden; }
.home-fold-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-size: 14px; text-align: left; color: var(--text); }

/* Cartões de decisão */
.dc-list { display: flex; flex-direction: column; gap: 12px; }
.dc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); overflow: hidden; }
.dc-head { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px 10px; }
.dc-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.dc-kicker { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; color: var(--text-3); }
.dc-title { font-size: 16px; font-weight: 700; line-height: 1.3; margin-top: 1px; }
.dc-sub { font-size: 13px; color: var(--text-2); margin-top: 1px; }
.dc-body { padding: 0 16px 4px; }
.dc-why { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: color-mix(in srgb, var(--warn) 80%, var(--text)); margin-bottom: 10px; }
.dc-label { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--ai); text-transform: uppercase; letter-spacing: .05em; margin: 4px 0 6px; }
.dc-msg { padding: 11px 13px; border-radius: 4px 14px 14px 14px; background: color-mix(in srgb, var(--brand) 9%, var(--surface)); border: 1px solid var(--brand-line); font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; margin-bottom: 12px; }
.dc-slots { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; }
.dc-slot { flex: 0 0 auto; min-width: 82px; padding: 8px 10px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); display: flex; flex-direction: column; align-items: center; gap: 1px; transition: all .15s; }
.dc-slot span { font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.dc-slot b { font-size: 18px; line-height: 1.2; display: grid; place-items: center; min-height: 22px; }
.dc-slot small { font-size: 10.5px; color: var(--text-3); }
.dc-slot.on { border-color: var(--ok); background: var(--ok-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 15%, transparent); }
.dc-slot.on span, .dc-slot.on small { color: color-mix(in srgb, var(--ok) 75%, var(--text)); }
.dc-slot.other { border-style: dashed; color: var(--brand); }
.dc-actions { display: flex; gap: 8px; padding: 6px 16px 16px; }
.dc-actions .btn { height: 46px; }
.dc-actions .btn.icon { width: 46px; flex-shrink: 0; }
.dc-actions .dc-main { flex: 1; min-width: 0; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; }
.dc-when { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.dc-cal { width: 52px; height: 56px; border-radius: 12px; border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; background: var(--surface-2); }
.dc-cal span { font-size: 10.5px; font-weight: 700; color: var(--danger); text-transform: uppercase; }
.dc-cal b { font-size: 21px; line-height: 1.1; }
.wk-strip { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 12px; }
.wk-item { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wk-item span { font-size: 12px; font-weight: 700; margin-top: 4px; }
.wk-item small { font-size: 11px; color: var(--text-3); }
.wk-thumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; flex-shrink: 0; box-shadow: var(--shadow-sm); cursor: pointer; }
.wk-mini { width: 300px; transform: scale(.2134); transform-origin: 0 0; pointer-events: none; }
.wk-list { display: flex; flex-direction: column; }
.wk-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line-2); width: 100%; transition: background .12s; }
.wk-row:hover { background: var(--surface-2); }
.wk-row .wk-thumb { width: 48px; height: 48px; border-radius: 10px; }
.wk-row .wk-mini { transform: scale(.16); }
.wk-day { width: 74px; flex-shrink: 0; text-align: left; display: flex; flex-direction: column; }
.wk-day b { font-size: 13.5px; }
.wk-day span { font-size: 11.5px; color: var(--text-3); }

/* ==========================================================================
   Celular (prioridade da demonstração)
   ========================================================================== */
.demo-pill .short { display: none; }
.collect-strip, .info-close { display: none; }
.tour {
  position: fixed; z-index: 45; left: 50%; transform: translateX(-50%); bottom: 20px;
  width: min(560px, calc(100% - 24px));
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px;
  border-radius: 18px; color: #EEF1F7;
  background: linear-gradient(135deg, #151A2E, #0E1220);
  border: 1px solid rgba(255,255,255,.1); box-shadow: 0 18px 40px -10px rgba(0,0,0,.55);
  animation: fadeIn .3s ease;
}
.tour .tn { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--ai); color: #fff; }
.tour .tt { font-weight: 700; font-size: 13.5px; line-height: 1.25; }
.tour .td { font-size: 12px; color: rgba(238,241,247,.7); line-height: 1.35; margin-top: 1px; }
.tour .tbar { height: 3px; border-radius: 3px; background: rgba(255,255,255,.12); margin-top: 6px; overflow: hidden; }
.tour .tbar span { display: block; height: 100%; background: var(--ai); transition: width .3s; }
.tour .btn { box-shadow: none; }
.tour .btn.glass { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color: #fff; }
.tour .x { color: rgba(255,255,255,.6); width: 30px; height: 30px; }
.tour.min { width: auto; left: auto; right: 16px; transform: none; padding: 6px; border-radius: 50%; cursor: pointer; }

@media (max-width: 1180px) {
  .collect-strip {
    display: flex; align-items: center; gap: 6px; width: 100%; padding: 8px 12px; overflow-x: auto; scrollbar-width: none;
    background: var(--surface); border-bottom: 1px solid var(--line); text-align: left;
  }
  .collect-strip .cs-count { font-size: 11.5px; font-weight: 700; color: var(--ai); white-space: nowrap; margin-right: 2px; }
  .collect-strip .cs { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--text-3); flex-shrink: 0; }
  .collect-strip .cs.ok { background: var(--ok-soft); color: var(--ok); }
  .collect-strip .cs.asking { background: var(--ai-soft); color: var(--ai); animation: blink 1.4s infinite; }
  .collect-strip .cs.more { background: transparent; color: var(--brand); }
  .info-close { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
}

@media (max-width: 960px) {
  :root { --topbar-h: 56px; }
  .demo-pill .txt { display: none; }
  .demo-pill .short { display: inline; }
  .topbar { gap: 4px; }
  .topbar .icon-btn { width: 36px; height: 36px; }
  .topbar-title { font-size: 15px; }
  .input, .select, .textarea, .composer textarea, .search input { font-size: 16px; }
  .btn { height: 40px; }
  .btn.sm { height: 34px; }
  .btn.icon { width: 40px; }
  .btn.icon.sm { width: 34px; }
  .page-head { margin-bottom: 14px; }
  .page-head > .row, .page-head > .btn { width: 100%; }
  .page-head > .row .btn, .page-head > .btn { flex: 1; }
  .kanban { grid-auto-columns: 84%; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 8px; }
  .kcol { scroll-snap-align: center; }
  .appr { padding: 14px; gap: 12px; }
  .appr-ico { display: none; }
  .appr .spec { grid-template-columns: 1fr 1fr !important; gap: 6px; }
  .appr .spec div { padding: 7px 9px; }
  .appr .spec b { font-size: 12px !important; }
  .appr-quote { padding: 8px; }
  .page-head > .row { flex-wrap: wrap; }
  .appr-actions .btn { flex: 1 1 auto; }
  .post-actions { padding: 10px 12px; }
  #toast-root { top: calc(10px + env(safe-area-inset-top)); bottom: auto; }
  .tour { bottom: calc(74px + env(safe-area-inset-bottom)); }

  /* Conversa em tela cheia, como no WhatsApp */
  body.in-chat .topbar, body.in-chat .bottomnav { display: none; }
  .inbox, .inbox.no-info { height: calc(100dvh - var(--topbar-h) - 64px - env(safe-area-inset-bottom)); }
  body.in-chat .inbox { height: 100dvh; }
  body.in-chat .tour { bottom: calc(132px + env(safe-area-inset-bottom)); padding: 8px 8px 8px 10px; }
  body.in-chat .tour .td { display: none; }
  .hide-m { display: none; }
  body.in-chat .tour.min { bottom: calc(140px + env(safe-area-inset-bottom)); }
  .chat-head { min-height: 56px; padding: 8px 10px; gap: 8px; padding-top: calc(8px + env(safe-area-inset-top)); }
  .chat-head .avatar { width: 34px; height: 34px; }
  .mode-banner { padding: 8px 12px; font-size: 12px; gap: 8px; }
  .mode-banner > svg, .mode-banner > .ai-orb { display: none; }
  .mode-banner .btn { flex-shrink: 0; }
  .sim-bar { padding: 6px 12px; }
  .sim-bar .grow { font-size: 0; }
  .sim-bar .grow::after { content: 'Simulação do cliente'; font-size: 11.5px; }
  .composer { padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); }
  .composer-role { display: none; }
  .sim-bar { display: none; }
  .sim-toggle { display: grid; }
  .modal-foot .btn.primary, .modal-foot .btn.success { flex: 1; height: 46px; }
  .sug-text { font-size: 15px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dc-head { padding: 14px 14px 10px; }
  .dc-body { padding: 0 14px 4px; }
  .dc-actions { padding: 6px 14px 14px; }
  .home-hero { padding: 14px; }
  .home-hero h2 { font-size: 17px; }
  .ig-review .btn { flex-shrink: 0; }
  .inbox.show-info .info-panel { top: 0; bottom: 0; width: 100%; z-index: 60; }
  .handoff { margin: 12px 0; }
  .handoff dt, .handoff dd { padding: 7px 12px; font-size: 12.5px; }
  .handoff .foot .btn { flex: 1 1 auto; }
  .conv-item { padding: 12px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
