/* ==========================================================================
   Plataforma GFS — design system, alinhado ao site gfstecnologia.com.br
   Preto / papel / azul elétrico · Archivo 800 em caixa alta nos títulos ·
   cantos retos, linhas finas, movimento discreto. Claro/escuro via [data-theme].
   ========================================================================== */
:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Archivo', 'Arial Narrow', Impact, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --r: 2px; --r-sm: 2px; --r-xs: 2px;

  --accent: #2b59ff; --accent-hover: #1f45d6; --accent-soft: rgba(43, 89, 255, .07); --accent-text: #2b59ff; --accent-l: #6f8fff;
  --btn-bg: #0b0b0c; --btn-fg: #ffffff;

  --bg: #f5f5f7; --surface: #ffffff; --surface-2: #fafafb; --surface-3: #efeff2;
  --border: #e0e0e5; --border-strong: #c9c9d0;
  --text: #0b0b0c; --text-2: #48484f; --text-3: #6e6e73;
  --shadow: 0 0 0 transparent;
  --shadow-md: 0 10px 28px -10px rgba(0, 0, 0, .18);
  --shadow-lg: 0 28px 60px -16px rgba(0, 0, 0, .35);
  --overlay: rgba(0, 0, 0, .55);
  --dots: rgba(0, 0, 0, .09);

  --side-bg: #000; --side-border: rgba(255, 255, 255, .14); --side-text: rgba(255, 255, 255, .62); --side-hover: rgba(255, 255, 255, .06); --side-active: rgba(255, 255, 255, .09);

  --ok: #0f9d6b; --warn: #d97706; --danger: #d92d20; --info: #2b59ff; --violet: #7c3aed;
  --side: 244px; --top: 60px; --tab: 60px;
}
[data-theme='dark'] {
  --accent: #2b59ff; --accent-hover: #5379ff; --accent-soft: rgba(111, 143, 255, .12); --accent-text: #8aa5ff;
  --btn-bg: #ffffff; --btn-fg: #000000;
  --bg: #000; --surface: #0b0b0c; --surface-2: #111113; --surface-3: #1d1d1f;
  --border: rgba(255, 255, 255, .14); --border-strong: rgba(255, 255, 255, .26);
  --text: #ffffff; --text-2: rgba(255, 255, 255, .74); --text-3: #86868b;
  --shadow-md: 0 10px 28px -10px rgba(0, 0, 0, .8);
  --shadow-lg: 0 28px 60px -16px rgba(0, 0, 0, .9);
  --overlay: rgba(0, 0, 0, .7);
  --dots: rgba(255, 255, 255, .07);
  --side-bg: #000;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; border-radius: 0; }
button { cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---- Estrutura ----------------------------------------------------------- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); height: 100dvh; }
.side { display: flex; flex-direction: column; background: var(--side-bg); color: var(--side-text); min-height: 0; border-right: 1px solid var(--side-border); }
.brand { display: flex; align-items: center; padding: 0 22px; height: var(--top); border-bottom: 1px solid var(--side-border); }
.logo { display: block; height: 30px; width: auto; user-select: none; }
.nav { display: flex; flex-direction: column; gap: 1px; padding: 14px 0; flex: 1; overflow-y: auto; }
.nav-label { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: #55555b; padding: 18px 22px 8px; }
.nav-label:first-child { padding-top: 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 22px; font-weight: 500; font-size: 13.5px; letter-spacing: .01em; color: var(--side-text); position: relative; transition: background .15s, color .15s; }
.nav a svg { width: 17px; height: 17px; flex: none; }
.nav a:hover { background: var(--side-hover); color: #fff; }
.nav a.active { background: var(--side-active); color: #fff; }
.nav a.active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent-l); }
.side-foot { padding: 14px 16px; border-top: 1px solid var(--side-border); }
.me { display: flex; align-items: center; gap: 10px; }
.me .grow { flex: 1; min-width: 0; }
.me b { display: block; font-size: 13px; color: #fff; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { color: var(--side-text); font-size: 11px; display: block; text-transform: uppercase; letter-spacing: .1em; }
.me .out { width: 30px; height: 30px; display: grid; place-items: center; color: var(--side-text); flex: none; transition: background .15s, color .15s; }
.me .out:hover { background: var(--side-hover); color: #fff; }
.me .out svg { width: 16px; height: 16px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { height: var(--top); flex: none; display: flex; align-items: center; gap: 12px; padding: 0 32px; background: var(--surface); border-bottom: 1px solid var(--border); z-index: 5; }
.crumbs { display: flex; align-items: center; gap: 10px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .14em; font-weight: 500; color: var(--text-3); }
.crumbs b { color: var(--text); font-weight: 600; }
.crumbs svg { width: 12px; height: 12px; }
.top-brand { display: none; }
.only-mobile { display: none; }
.spacer { flex: 1; }
#view { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 32px 32px 56px; overscroll-behavior: contain; }
#view.fill { overflow: hidden; padding: 20px 24px 24px; }
.view-enter { animation: fade .3s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.tabbar { display: none; }

/* ---- Componentes base ---------------------------------------------------- */
.icon { width: 18px; height: 18px; flex: none; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; color: var(--text-2); border: 1px solid var(--border-strong); background: transparent; transition: background .15s, color .15s, border-color .15s; }
.icon-btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.icon-btn .icon { width: 16px; height: 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; height: 38px; font-weight: 600; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; background: transparent; border: 1px solid var(--border-strong); color: var(--text);
  transition: background .2s, border-color .2s, color .2s; white-space: nowrap; }
.btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .icon { width: 15px; height: 15px; }
.btn.primary { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }
.btn.danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); border-color: transparent; }
.btn.sm { height: 30px; padding: 0 12px; font-size: 11px; }
.btn.block { width: 100%; height: 46px; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

.card { background: var(--surface); border: 1px solid var(--border); }
.card.pad { padding: 22px; }
.eyebrow, .card-title { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.card-title .icon { width: 15px; height: 15px; color: var(--text-3); }
.card-sub { color: var(--text-3); font-size: 13px; margin: 4px 0 18px; }
.link { color: var(--accent-text); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.page-head h1 { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1; text-transform: uppercase; letter-spacing: -.01em; }
.page-head p { color: var(--text-3); margin-top: 8px; font-size: 13.5px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; line-height: 1.6; color: var(--c, var(--text-2)); background: color-mix(in srgb, var(--c, var(--text-3)) 11%, transparent); white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--text-3)); flex: none; }

.avatar { --s: 32px; width: var(--s); height: var(--s); display: grid; place-items: center; flex: none; color: #fff; font-family: var(--display); font-weight: 800; font-size: calc(var(--s) * .4); background: var(--bg-av, #1d1d1f); letter-spacing: .04em; }
.avatar.lg { --s: 56px; } .avatar.sm { --s: 28px; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field > label, .label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--text-2); }
.hint { font-size: 12.5px; color: var(--text-3); }
.input, .select, .textarea { width: 100%; padding: 0 12px; background: var(--surface); border: 1px solid var(--border-strong); height: 40px; transition: border-color .15s, box-shadow .15s; outline: none; font-size: 14px; }
.textarea { resize: vertical; min-height: 92px; padding: 10px 12px; line-height: 1.5; height: auto; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 400px; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 15px; height: 15px; pointer-events: none; }
.search .input { padding-left: 36px; }

.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 13.5px; }
.switch input { display: none; }
.switch .track { width: 38px; height: 20px; background: var(--border-strong); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; transition: transform .2s var(--ease); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); }

.segmented { display: inline-flex; border: 1px solid var(--border-strong); flex-wrap: wrap; max-width: 100%; }
.segmented button { padding: 7px 14px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); display: inline-flex; gap: 7px; align-items: center; transition: background .15s, color .15s; border-right: 1px solid var(--border-strong); }
.segmented button:last-child { border-right: 0; }
.segmented button:hover { background: var(--surface-3); color: var(--text); }
.segmented button.on { background: var(--btn-bg); color: var(--btn-fg); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; font-size: 12.5px; font-weight: 500; color: var(--text-2); background: transparent; border: 1px solid var(--border-strong); transition: background .15s, border-color .15s, color .15s; }
.chip:hover { border-color: var(--text); color: var(--text); }
.chip.on { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }

.empty { text-align: center; padding: 56px 24px; color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty .art { width: 52px; height: 52px; border: 1px solid var(--border-strong); display: grid; place-items: center; color: var(--text-3); margin-bottom: 10px; }
.empty .art svg { width: 22px; height: 22px; }
.empty b { color: var(--text); font-family: var(--display); font-weight: 800; font-size: 20px; text-transform: uppercase; } .empty p { max-width: 380px; font-size: 13.5px; margin-bottom: 12px; }

.skeleton { background: linear-gradient(100deg, var(--surface-3) 30%, var(--surface-2) 50%, var(--surface-3) 70%); background-size: 300% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---- Toasts, drawer, modal ---------------------------------------------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: min(380px, calc(100vw - 32px)); padding: 11px 16px; background: var(--btn-bg); color: var(--btn-fg); box-shadow: var(--shadow-lg); font-size: 13.5px; font-weight: 500; border-left: 3px solid var(--c); animation: toast-in .3s var(--ease) both; }
.toast .ti { width: 16px; height: 16px; display: grid; place-items: center; flex: none; }
.toast .ti svg { width: 16px; height: 16px; }
.toast.out { animation: toast-out .2s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(4px); } }

.backdrop { position: fixed; inset: 0; z-index: 50; background: var(--overlay); animation: fadeb .2s both; display: flex; justify-content: flex-end; }
.backdrop.center { justify-content: center; align-items: center; padding: 16px; }
.backdrop.closing { animation: fadeb .18s reverse both; }
@keyframes fadeb { from { opacity: 0; } }
.drawer { width: min(480px, 100%); height: 100%; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--border-strong); animation: slide-in .32s var(--ease) both; }
.backdrop.closing .drawer { animation: slide-in .2s var(--ease) reverse both; }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-family: var(--display); font-weight: 800; font-size: 20px; text-transform: uppercase; flex: 1; letter-spacing: -.005em; }
.drawer-body { flex: 1; overflow-y: auto; padding: 24px; overscroll-behavior: contain; }
.drawer-foot { padding: 14px 24px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface-2); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.grab { display: none; }
.modal { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border-strong); padding: 26px; box-shadow: var(--shadow-lg); animation: pop .25s var(--ease) both; }
.modal .art { width: 40px; height: 40px; margin-bottom: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.modal h3 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 20px; margin-bottom: 6px; } .modal p { color: var(--text-2); margin-bottom: 22px; font-size: 13.5px; }
.modal .btns { display: flex; gap: 8px; justify-content: flex-end; }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(8px); } }

.kv { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); color: var(--text-2); font-size: 13.5px; }
.kv:last-child { border: 0; } .kv .icon { color: var(--text-3); width: 16px; height: 16px; } .kv b { color: var(--text); font-weight: 500; word-break: break-word; }
.section-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--text-3); margin: 26px 0 8px; }

/* ---- Dashboard ----------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); border: 1px solid var(--border); background: var(--surface); margin-bottom: 16px; }
.stat { padding: 20px 22px 18px; cursor: pointer; display: block; position: relative; border-right: 1px solid var(--border); transition: background .2s; }
.stat:last-child { border-right: 0; }
.stat:hover { background: var(--surface-2); }
.stat::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.stat:hover::after { transform: scaleX(1); }
.stat-top { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); }
.stat-top .icon { width: 16px; height: 16px; }
.stat-value { font-family: var(--display); font-weight: 800; font-size: 54px; letter-spacing: -.02em; line-height: 1; margin: 16px 0 10px; font-variant-numeric: tabular-nums; }
.stat-foot { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.stat:hover .stat-foot { color: var(--accent-text); }
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.span-7 { grid-column: span 7; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-12 { grid-column: span 12; }
.bars svg { width: 100%; height: auto; display: block; overflow: visible; }
.bars .bar { transform-box: fill-box; transform-origin: bottom; animation: grow .7s var(--ease) both; animation-delay: calc(var(--i) * 45ms + 100ms); }
@keyframes grow { from { transform: scaleY(0); } }
.bars text { fill: var(--text-3); font-size: 11px; font-family: var(--font); text-transform: uppercase; letter-spacing: .06em; }
.bars text.val { fill: var(--text); font-weight: 700; font-size: 13px; font-family: var(--display); }
.bars .grid-line { stroke: var(--border); }
.donut-wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; justify-content: center; padding: 6px 0; }
.donut { width: 150px; height: 150px; flex: none; }
.donut circle.seg { fill: none; stroke-width: 16; animation: donut .9s var(--ease) both; animation-delay: calc(var(--i) * 90ms + 100ms); }
.donut circle.track { fill: none; stroke: var(--surface-3); stroke-width: 16; }
@keyframes donut { from { stroke-dasharray: 0 1000; } }
.donut text { text-anchor: middle; fill: var(--text); }
.legend { display: flex; flex-direction: column; gap: 10px; min-width: 170px; flex: 1; }
.legend div { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-2); } .legend .dot { border-radius: 0; }
.legend b { margin-left: auto; color: var(--text); font-family: var(--display); font-weight: 800; font-size: 17px; padding-left: 12px; font-variant-numeric: tabular-nums; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 -14px; border-top: 1px solid var(--border); transition: background .12s; cursor: pointer; }
.list-item:first-child { border-top: 0; }
.list-item:hover { background: var(--surface-2); }
.list-item .grow { flex: 1; min-width: 0; } .list-item b { display: block; font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item small { color: var(--text-3); font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.callout { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; margin-bottom: 16px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-left: 3px solid var(--accent); }
.callout b { display: block; font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 17px; margin-bottom: 4px; } .callout p { color: var(--text-2); font-size: 13.5px; }
.callout .steps { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ---- Tabela (contatos, equipe) ------------------------------------------ */
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.table-wrap { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); padding: 12px 18px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.table td { padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-2); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr.click { cursor: pointer; } .table tbody tr.click:hover { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); }
.cell-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell-user b { display: block; color: var(--text); font-weight: 600; line-height: 1.3; white-space: nowrap; }
.cell-user small { color: var(--text-3); font-size: 12.5px; display: block; }
.table .muted { color: var(--text-3); }
.table-foot { padding: 11px 18px; font-size: 12px; color: var(--text-3); border-top: 1px solid var(--border); letter-spacing: .04em; }

/* ---- Chamados (kanban) --------------------------------------------------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 16px; align-items: start; }
.col { background: var(--surface-2); border: 1px solid var(--border); padding: 12px; min-height: 140px; transition: background .15s, border-color .15s; border-top: 2px solid var(--c); }
.col.over { border-color: var(--accent); background: var(--accent-soft); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 2px 12px; font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; }
.col-head .dot { border-radius: 0; }
.col-head .count { margin-left: auto; font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--text-2); letter-spacing: 0; }
.col-body { display: flex; flex-direction: column; gap: 8px; min-height: 56px; }
.kcard { background: var(--surface); border: 1px solid var(--border); padding: 13px 14px; cursor: grab; transition: border-color .15s, box-shadow .2s, transform .2s var(--ease); animation: fade .25s var(--ease) both; }
.kcard:hover { border-color: var(--text); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kcard.dragging { opacity: .4; cursor: grabbing; }
.kcard b { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; margin-bottom: 4px; }
.kcard p { color: var(--text-2); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px; }
.kcard .foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 12px; }
.kcard .foot .avatar { margin-left: auto; }
.col-empty { text-align: center; color: var(--text-3); font-size: 12.5px; padding: 20px 8px; border: 1px dashed var(--border-strong); }

/* ---- Inbox --------------------------------------------------------------- */
.split { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: 100%; border: 1px solid var(--border); overflow: hidden; background: var(--surface); }
.split > .pane.card { border: 0; }
.split > .pane.list { border-right: 1px solid var(--border); }
.pane { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.pane-head { padding: 16px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.pane-head h2 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 19px; }
.pane-head .search { max-width: none; }
.pane-scroll { flex: 1; overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.conv { display: flex; gap: 12px; padding: 14px 16px; cursor: pointer; border-bottom: 1px solid var(--border); position: relative; transition: background .12s; }
.conv:hover { background: var(--surface-2); }
.conv.active { background: var(--accent-soft); }
.conv.active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); }
.conv .grow { flex: 1; min-width: 0; } .conv .r1 { display: flex; gap: 8px; align-items: baseline; } .conv b { flex: 1; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv time { font-size: 11.5px; color: var(--text-3); flex: none; } .conv p { color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv.closed { opacity: .55; }
.thread-head { padding: 10px 18px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); min-height: 64px; }
.thread-head .grow { flex: 1; min-width: 0; } .thread-head b { display: block; line-height: 1.25; font-weight: 600; font-size: 15px; } .thread-head small { color: var(--text-3); font-size: 12.5px; }
.back { display: none; }
.msgs { flex: 1; overflow-y: auto; padding: 20px 24px 8px; display: flex; flex-direction: column; gap: 4px; min-height: 0; overscroll-behavior: contain; background: var(--surface-2); background-image: radial-gradient(var(--dots) 1px, transparent 1px); background-size: 20px 20px; }
.day-sep { align-self: center; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); background: var(--surface); padding: 3px 12px; margin: 12px 0; border: 1px solid var(--border); }
.bubble { max-width: min(72%, 540px); padding: 9px 13px 5px; word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; animation: fade .2s var(--ease) both; font-size: 14px; }
.bubble.in { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); }
.bubble.out { align-self: flex-end; background: var(--btn-bg); color: var(--btn-fg); }
.bubble .by { display: flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; opacity: .7; margin-bottom: 2px; }
.bubble .by .icon { width: 12px; height: 12px; }
.bubble time { display: block; font-size: 10.5px; opacity: .6; text-align: right; margin-top: 1px; }
.composer { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: flex; gap: 8px; align-items: flex-end; background: var(--surface); }
.composer .textarea { min-height: 40px; max-height: 140px; padding: 9px 12px; resize: none; flex: 1; height: 40px; }
.composer .btn { height: 40px; flex: none; }
.composer .btn.primary { width: 44px; padding: 0; }
.placeholder-pane { display: grid; place-items: center; height: 100%; background: var(--surface-2); }

/* ---- Agentes ------------------------------------------------------------- */
.agents { display: grid; grid-template-columns: 290px minmax(0, 1fr); height: 100%; border: 1px solid var(--border); overflow: hidden; background: var(--surface); }
.agents > .card { border: 0; }
.agent-list { padding: 14px 0; display: flex; flex-direction: column; overflow-y: auto; border-right: 1px solid var(--border); background: var(--surface-2); }
.agent-list h2 { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--text-3); padding: 4px 20px 12px; }
.agent-chip { display: flex; gap: 12px; align-items: center; padding: 12px 20px; text-align: left; transition: background .12s; width: 100%; position: relative; }
.agent-chip:hover { background: var(--surface-3); }
.agent-chip.on { background: var(--surface); }
.agent-chip.on::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); }
.agent-chip .ai, .chat-top .ai, .msg .av, .hello .ai-big { background: var(--btn-bg); color: var(--btn-fg); display: grid; place-items: center; flex: none; }
.agent-chip .ai { width: 34px; height: 34px; } .agent-chip .ai svg { width: 17px; height: 17px; }
.agent-chip b { display: block; line-height: 1.25; font-weight: 600; font-size: 13.5px; } .agent-chip small { color: var(--text-3); display: block; line-height: 1.3; font-size: 12.5px; }
.agent-chip.on .ai { background: var(--accent); color: #fff; }
.chat { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 24px 28px 12px; display: flex; flex-direction: column; gap: 18px; min-height: 0; overscroll-behavior: contain; }
.msg { display: flex; gap: 12px; max-width: min(88%, 740px); animation: fade .25s var(--ease) both; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg .av { width: 30px; height: 30px; } .msg .av svg { width: 15px; height: 15px; }
.msg .body { padding: 11px 15px; min-width: 0; overflow-wrap: anywhere; position: relative; }
.msg.bot .body { background: var(--surface); border: 1px solid var(--border); }
.msg.user .body { background: var(--btn-bg); color: var(--btn-fg); white-space: pre-wrap; }
.msg.err .body { border-color: color-mix(in srgb, var(--danger) 55%, var(--border)); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); color: var(--danger); }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 10px; } .md ul, .md ol { margin: 0 0 10px; padding-left: 20px; } .md li { margin: 3px 0; }
.md h3 { margin: 12px 0 6px; font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 15px; } .md code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: .88em; background: var(--surface-3); padding: 1px 5px; }
.md pre { background: var(--surface-3); padding: 12px; overflow-x: auto; margin: 0 0 10px; } .md pre code { background: none; padding: 0; }
.copy { position: absolute; right: 8px; bottom: -13px; opacity: 0; transition: opacity .15s; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 2px 9px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-2); display: inline-flex; gap: 4px; align-items: center; }
.copy .icon { width: 12px; height: 12px; }
.msg:hover .copy { opacity: 1; }
.typing { display: inline-flex; gap: 4px; padding: 6px 2px; }
.typing i { width: 6px; height: 6px; background: var(--text-3); animation: bounce 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
.hello { margin: auto; text-align: center; max-width: 540px; padding: 10px; }
.hello .ai-big { width: 56px; height: 56px; margin: 0 auto 18px; background: var(--accent); color: #fff; } .hello .ai-big svg { width: 26px; height: 26px; }
.hello h2 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 30px; line-height: 1.05; margin-bottom: 8px; } .hello p { color: var(--text-2); margin-bottom: 22px; }
.hello .chips { justify-content: center; } .hello .chip { text-align: left; }
.chat .composer { align-items: center; }
.chat-top { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--border); min-height: 64px; }
.chat-top .ai { width: 34px; height: 34px; } .chat-top .ai svg { width: 17px; height: 17px; }
.chat-top .grow { flex: 1; } .chat-top b { display: block; line-height: 1.25; font-weight: 600; font-size: 15px; } .chat-top small { color: var(--text-3); font-size: 12.5px; }

/* ---- Ajustes ------------------------------------------------------------- */
.settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.settings .span-all { grid-column: 1 / -1; }
.srow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.srow:last-child { border: 0; padding-bottom: 0; } .srow .grow { flex: 1; min-width: 0; } .srow b { display: block; font-weight: 500; } .srow small { color: var(--text-3); display: block; font-size: 12.5px; }
.srow .state { width: 8px; height: 8px; background: var(--c); flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
.code { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; background: var(--surface-3); border: 1px solid var(--border); font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; word-break: break-all; }
.code span { flex: 1; }
.stack { display: grid; gap: 16px; }

/* ---- Login --------------------------------------------------------------- */
.login { height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); background: var(--bg); }
.login-art { position: relative; background: #000; color: #fff; padding: 40px clamp(32px, 5vw, 72px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.login-art::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.2px); background-size: 28px 28px; -webkit-mask-image: linear-gradient(115deg, #000 10%, transparent 80%); mask-image: linear-gradient(115deg, #000 10%, transparent 80%); }
.login-art > * { position: relative; }
.login-art .logo { height: 54px; width: auto; align-self: flex-start; }
.login-art h2 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(48px, 6.6vw, 104px); line-height: .94; letter-spacing: -.015em; margin-bottom: 26px; }
.login-art h2 em { font-style: normal; color: var(--accent-l); }
.login-art p.lead { max-width: 440px; font-size: 15.5px; color: rgba(255, 255, 255, .7); }
.login-art .rule { height: 1px; background: rgba(255, 255, 255, .16); margin-bottom: 18px; }
.login-art small { color: #86868b; font-size: 12px; letter-spacing: .04em; }
.login-form { display: grid; place-items: center; padding: 32px; overflow-y: auto; background: var(--bg); }
.login-card { width: min(380px, 100%); animation: fade .5s var(--ease) both; }
.login-card .wm-mini { display: none; height: 44px; margin-bottom: 36px; filter: invert(1); } [data-theme='dark'] .login-card .wm-mini { filter: none; }
.login-card .eyebrow { margin-bottom: 14px; color: var(--accent-text); }
.login-card h1 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 40px; line-height: 1; letter-spacing: -.01em; }
.login-card p.sub { color: var(--text-3); margin: 12px 0 30px; }
.pw { position: relative; } .pw .input { padding-right: 44px; } .pw button { position: absolute; right: 3px; top: 3px; width: 34px; height: 34px; color: var(--text-3); display: grid; place-items: center; }
.pw button:hover { color: var(--text); background: var(--surface-3); }
.err-box { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; margin-bottom: 18px; font-size: 13.5px; color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--border)); border-left: 3px solid var(--danger); }
.err-box[hidden] { display: none; }
.err-box .icon { width: 16px; height: 16px; margin-top: 2px; }
.err-text { color: var(--danger); font-size: 13.5px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.login-card small.foot { display: block; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 12.5px; }

/* ---- Responsivo ---------------------------------------------------------- */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .span-7, .span-5 { grid-column: span 12; }
  .kanban { overflow-x: auto; grid-template-columns: repeat(4, 270px); padding-bottom: 8px; }
  .settings { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .app { grid-template-columns: 64px minmax(0, 1fr); }
  .nav a span, .nav-label, .me .grow, .me .out { display: none; }
  .brand { justify-content: center; padding: 0; } .brand .logo { height: 17px; }
  .nav a { justify-content: center; padding: 12px 0; }
  .side-foot { padding: 12px 0; display: flex; justify-content: center; }
}
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; } .login-art { display: none; } .login-card .wm-mini { display: block; }
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { padding: 0 16px; padding-top: env(safe-area-inset-top); height: calc(54px + env(safe-area-inset-top)); background: #000; border-bottom-color: rgba(255, 255, 255, .14); color: #fff; }
  .topbar .crumbs, .topbar .crumbs b { color: #fff; } .topbar .crumbs span, .topbar .crumbs svg { display: none; }
  .topbar .icon-btn { color: #fff; border-color: rgba(255, 255, 255, .26); } .topbar .icon-btn:hover { background: #fff; color: #000; }
  .top-brand { display: block; height: 26px; } .only-mobile { display: grid; }
  #view { padding: 20px 16px 28px; }
  #view.fill { padding: 0; }
  .page-head { margin-bottom: 18px; padding-bottom: 16px; } .page-head h1 { font-size: 28px; }
  .page-head .actions { margin-left: 0; width: 100%; } .page-head .actions .btn { flex: 1; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); flex: none; height: calc(var(--tab) + env(safe-area-inset-bottom)); padding: 6px 4px env(safe-area-inset-bottom); background: #000; border-top: 1px solid rgba(255, 255, 255, .14); z-index: 6; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: rgba(255, 255, 255, .55); position: relative; }
  .tabbar a svg { width: 20px; height: 20px; }
  .tabbar a.active { color: #fff; }
  .tabbar a.active::before { content: ''; position: absolute; top: -7px; width: 22px; height: 2px; background: var(--accent-l); }
  .stats { grid-template-columns: 1fr 1fr; } .stat { padding: 16px; } .stat-value { font-size: 42px; margin: 12px 0 8px; }
  .search { max-width: none; flex-basis: 100%; }

  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 14px 16px; border-bottom: 1px solid var(--border); } .table tr:last-child { border: 0; }
  .table td { padding: 2px 0; border: 0; } .table td[data-l]::before { content: attr(data-l) ': '; color: var(--text-3); font-size: 12px; }
  .table td.hide-m { display: none; }

  .kanban { grid-template-columns: repeat(4, 82vw); scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 12px; scroll-padding: 0 16px; gap: 10px; }
  .col { scroll-snap-align: center; }

  .split, .agents { display: block; border: 0; }
  .split > .pane, .agents > * { height: 100%; }
  .split > .pane.list { border-right: 0; }
  .split.has-thread > .pane.list, .agents.in-chat > .agent-list { display: none; }
  .split:not(.has-thread) > .pane.thread, .agents:not(.in-chat) > .chat { display: none; }
  .agent-list { border-right: 0; background: var(--bg); padding: 16px; } .agent-chip { background: var(--surface); border: 1px solid var(--border); margin-bottom: 8px; padding: 14px; width: 100%; } .agent-chip.on::before { display: none; }
  .back { display: grid; }
  .bubble { max-width: 86%; } .msg { max-width: 94%; }
  .msgs { padding: 14px 12px 8px; } .chat-msgs { padding: 16px 12px 10px; }

  .backdrop { align-items: flex-end; }
  .drawer { width: 100%; height: auto; max-height: 92dvh; border: 0; border-top: 2px solid var(--accent); animation: sheet .35s var(--ease) both; }
  .backdrop.closing .drawer { animation: sheet .22s var(--ease) reverse both; }
  @keyframes sheet { from { transform: translateY(100%); } }
  .grab { display: block; width: 36px; height: 3px; background: var(--border-strong); margin: 8px auto 0; flex: none; }
  .drawer-head { padding: 10px 18px; } .drawer-body { padding: 18px; } .drawer-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
  .drawer-foot .btn { flex: 1; }
  .toasts { left: 14px; right: 14px; bottom: calc(var(--tab) + 12px + env(safe-area-inset-bottom)); align-items: stretch; } .toast { max-width: none; }
  .input, .select, .textarea { font-size: 16px; }
  .input, .select { height: 44px; } .btn { height: 42px; } .btn.sm { height: 34px; }
  .login-card h1 { font-size: 34px; }
}
@media (max-width: 420px) { .row2 { grid-template-columns: 1fr; } .donut-wrap { justify-content: flex-start; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; } }

/* ---- Redes sociais ------------------------------------------------------- */
.semana { margin-bottom: 16px; overflow-x: auto; }
.week { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 1px; margin-top: 12px; background: var(--border); border: 1px solid var(--border); }
.week .day { background: var(--surface); padding: 10px; min-height: 92px; display: flex; flex-direction: column; gap: 6px; }
.week .day.hoje { background: var(--accent-soft); }
.week .dn { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); display: flex; justify-content: space-between; align-items: baseline; }
.week .dn b { font-family: var(--display); font-size: 20px; color: var(--text); letter-spacing: 0; }
.week .livre { color: var(--text-3); font-size: 12px; }
.slot { display: flex; align-items: center; gap: 6px; font-size: 11.5px; text-align: left; padding: 4px 6px; border-left: 2px solid var(--c); background: color-mix(in srgb, var(--c) 9%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot:hover { background: color-mix(in srgb, var(--c) 18%, transparent); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.post { cursor: pointer; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .2s, transform .2s var(--ease); animation: fade .3s var(--ease) both; }
.post:hover { border-color: var(--text); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.post .thumb { position: relative; aspect-ratio: 16 / 10; background: var(--surface-3); overflow: hidden; border-bottom: 1px solid var(--border); }
.media { width: 100%; height: 100%; object-fit: cover; display: block; }
.media.vazio { display: grid; place-items: center; color: var(--text-3); background: var(--surface-3); }
.media.vazio svg { width: 28px; height: 28px; }
.post .tipo, .post .ia { position: absolute; top: 8px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; background: #000; color: #fff; display: inline-flex; gap: 4px; align-items: center; }
.post .tipo { left: 8px; } .post .ia { right: 8px; background: var(--accent); } .post .ia .icon { width: 11px; height: 11px; }
.post .corpo { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.post .linha { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.post b { font-size: 14.5px; line-height: 1.35; }
.post p { color: var(--text-2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post small { color: var(--text-3); font-size: 12px; margin-top: auto; }
.post .erro { display: flex; gap: 6px; font-size: 12px; color: var(--danger); margin-top: 4px; }
.post .erro .icon { width: 14px; height: 14px; margin-top: 2px; }
.drawer.larga { width: min(980px, 100%); }
.compositor .cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; }
.ia-box { padding: 16px; margin-bottom: 20px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-left: 3px solid var(--accent); }
.ia-linha { display: flex; gap: 8px; margin: 8px 0; } .ia-linha .input { flex: 1; }
.previa { background: #000; aspect-ratio: 9 / 12; max-height: 360px; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--border); }
.previa .media { object-fit: contain; }
.previa .media.vazio { background: transparent; color: #6e6e73; }

/* ---- Funil / leads / financeiro ------------------------------------------ */
.kanban.seis { grid-template-columns: repeat(6, minmax(230px, 1fr)); overflow-x: auto; padding-bottom: 8px; }
.col-total { font-family: var(--display); font-weight: 800; font-size: 16px; padding: 0 2px 10px; color: var(--text-2); }
.kcard .valor { font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -.01em; margin: 2px 0 6px; }
.score { display: inline-grid; place-items: center; min-width: 38px; height: 26px; padding: 0 8px; font-family: var(--display); font-weight: 800; font-size: 14px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }

/* ---- Monitoramento ------------------------------------------------------- */
.monitor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.monitor { padding: 18px; display: flex; flex-direction: column; gap: 14px; cursor: pointer; border-top: 2px solid var(--c); transition: border-color .15s, box-shadow .2s; }
.monitor:hover { box-shadow: var(--shadow-md); }
.monitor.off { background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
.monitor.pausado { opacity: .6; }
.monitor .topo { display: flex; gap: 12px; align-items: flex-start; }
.monitor .grow { flex: 1; min-width: 0; } .monitor b { display: block; font-size: 15px; }
.monitor .url { font-size: 12.5px; color: var(--text-3); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .monitor .url:hover { color: var(--accent-text); text-decoration: underline; }
.dot.pulso { width: 10px; height: 10px; margin-top: 6px; animation: pulsa 2s infinite; }
@keyframes pulsa { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
.monitor .estado { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .monitor .estado small, .monitor .ultimo { color: var(--text-3); font-size: 12px; } .monitor .cliente { margin-left: auto; }
.hist { display: flex; align-items: flex-end; gap: 2px; height: 34px; }
.hist i { flex: 1 1 0; max-width: 8px; min-width: 2px; background: var(--ok); opacity: .85; } .hist i.falha { background: var(--danger); opacity: 1; }
.metricas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.metricas b { font-family: var(--display); font-weight: 800; font-size: 17px; } .metricas small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }

/* ---- Menu "Mais" (celular) ----------------------------------------------- */
.menu-mais { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu-mais a { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px solid var(--border); font-weight: 500; }
.menu-mais a:hover { border-color: var(--text); }
@media (max-width: 860px) {
  .tabbar .mais { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.55); }
  .tabbar .mais svg { width: 20px; height: 20px; }
  .compositor .cols { grid-template-columns: 1fr; }
  .kanban.seis { grid-template-columns: repeat(6, 82vw); }
  .monitor-grid, .post-grid { grid-template-columns: 1fr; }
}

/* ---- Barra lateral organizada: grupos recolhíveis, contadores e rodapé ---- */
.nav { gap: 0; padding: 10px 0 16px; }
.nav-grupo + .nav-grupo { margin-top: 6px; }
.nav .nav-label { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 14px 22px 7px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: #6b6b72; text-align: left; transition: color .15s; }
.nav .nav-label:hover { color: #b4b4bb; }
.nav .nav-label svg { width: 12px; height: 12px; transform: rotate(90deg); transition: transform .2s var(--ease); opacity: .7; }
.nav-grupo.fechado .nav-label svg { transform: rotate(0deg); }
.nav-grupo.fechado .nav-itens { display: none; }
.nav-itens { display: flex; flex-direction: column; gap: 1px; padding-bottom: 2px; }
.nav a { padding: 9px 22px; }
.nav .pill { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; min-width: 20px; height: 18px; padding: 0 6px; display: inline-grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff; letter-spacing: 0; }
.nav .pill[hidden] { display: none; }
.nav .pill.alerta { background: var(--danger); }
.side-foot { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 14px; }
.side-foot .rodape-link { display: flex; align-items: center; gap: 12px; padding: 9px 22px; font-size: 13.5px; font-weight: 500; color: var(--side-text); position: relative; transition: background .15s, color .15s; }
.side-foot .rodape-link svg { width: 17px; height: 17px; }
.side-foot .rodape-link:hover { background: var(--side-hover); color: #fff; }
.side-foot .rodape-link.active { background: var(--side-active); color: #fff; }
.side-foot .rodape-link.active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent-l); }
.side-foot .me { padding: 10px 16px 0; border-top: 1px solid var(--side-border); margin-top: 2px; }
.nav::-webkit-scrollbar { width: 6px; } .nav::-webkit-scrollbar-thumb { background: #26262b; border: 0; }
@media (max-width: 1000px) {
  .nav-grupo.fechado .nav-itens { display: flex; }
  .nav .nav-label { display: none; } .nav-grupo + .nav-grupo { margin-top: 0; border-top: 1px solid var(--side-border); padding-top: 6px; }
  .nav .pill { position: absolute; top: 2px; right: 6px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
  .side-foot .rodape-link { justify-content: center; padding: 11px 0; } .side-foot .rodape-link span { display: none; }
  .side-foot .me { padding: 10px 0 0; justify-content: center; }
}

/* ---- Subnavegação (abas) do Ajustes --------------------------------------- */
.subnav { display: flex; gap: 4px; margin: -8px 0 20px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; font-size: 13px; font-weight: 600; color: var(--text-3); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s; }
.subnav a svg { width: 15px; height: 15px; }
.subnav a:hover { color: var(--text); }
.subnav a.on { color: var(--text); border-bottom-color: var(--accent); }
.aba-corpo { animation: fade .25s var(--ease) both; }
.settings .span-all { grid-column: 1 / -1; }

/* ---- Busca global --------------------------------------------------------- */
kbd { font-family: var(--font); font-size: 11px; font-weight: 600; padding: 2px 6px; border: 1px solid var(--border-strong); color: var(--text-3); background: var(--surface-2); }
.busca-btn { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border: 1px solid var(--border-strong); color: var(--text-3); font-size: 13px; min-width: 220px; transition: border-color .15s, color .15s; }
.busca-btn:hover { border-color: var(--text); color: var(--text); }
.busca-btn svg { width: 15px; height: 15px; } .busca-btn kbd { margin-left: auto; }
.paleta { align-items: flex-start; padding-top: 12vh; }
.paleta-caixa { width: min(640px, 100%); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); animation: pop .2s var(--ease) both; display: flex; flex-direction: column; max-height: 70vh; }
.paleta-topo { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.paleta-topo svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.paleta-topo .input { border: 0; box-shadow: none; height: 54px; font-size: 15px; background: transparent; padding: 0; }
.paleta-topo .input:focus { box-shadow: none; }
.paleta-lista { overflow-y: auto; padding: 6px; }
.paleta-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; text-align: left; font-size: 14px; }
.paleta-item svg { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.paleta-item .pt { flex: 1; min-width: 0; display: flex; flex-direction: column; } .paleta-item small { color: var(--text-3); font-size: 12px; }
.paleta-item em { font-style: normal; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); }
.paleta-item.on { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.paleta-vazio { padding: 28px; text-align: center; color: var(--text-3); }
@media (max-width: 860px) { .busca-btn span, .busca-btn kbd { display: none; } .busca-btn { min-width: 0; width: 36px; padding: 0; justify-content: center; border-color: rgba(255,255,255,.26); color: #fff; } .paleta { padding-top: 6vh; } }

@media (max-width: 1180px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.stats .stat { border-bottom: 0; }

/* ---- Páginas de documento (privacidade, descadastro) ---------------------- */
body:has(> main.doc) { overflow: auto; height: auto; }
.doc { max-width: 760px; margin: 0 auto; padding: 56px 24px 96px; }
.doc h1 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 42px; line-height: 1; margin: 18px 0 8px; }
.doc h2 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 20px; margin: 36px 0 8px; }
.doc p, .doc li { color: var(--text-2); line-height: 1.7; }
.doc ul { padding-left: 20px; }
.doc .meta { color: var(--text-3); font-size: 13px; }
.doc .logo { filter: invert(1); height: 44px; width: auto; display: block; } [data-theme='dark'] .doc .logo { filter: none; }
.doc a { color: var(--accent-text); }
.doc form { margin-top: 20px; }

/* ---- Prospecção ------------------------------------------------------------ */
.ctrl { padding: 20px 22px; margin-bottom: 16px; }
.ctrl-topo { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.ctrl-estado { display: flex; align-items: center; gap: 16px; } .ctrl-estado b { display: block; font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 22px; line-height: 1.1; }
.ctrl-estado small { color: var(--text-3); font-size: 13px; }
.ctrl-acoes { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.switch.grande .track { width: 58px; height: 30px; } .switch.grande .track::after { width: 24px; height: 24px; top: 3px; left: 3px; }
.switch.grande input:checked + .track::after { transform: translateX(28px); }
.switch.grande input:checked + .track { background: var(--ok); }
.pront-linha { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.pront { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; padding: 4px 10px; color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); }
.aprov-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
.aprov-topo { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; } .aprov-topo b { display: block; font-size: 15px; } .aprov-topo small { color: var(--text-3); font-size: 12.5px; }
.aprov-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.aprov-acoes { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.fbar { display: grid; grid-template-columns: 110px 1fr 56px; gap: 12px; align-items: center; padding: 7px 0; font-size: 13px; color: var(--text-2); }
.fbar b { text-align: right; font-family: var(--display); font-weight: 800; font-size: 16px; color: var(--text); }
.trilho { height: 10px; background: var(--surface-3); } .trilho i { display: block; height: 100%; transition: width .6s var(--ease); }
@media (max-width: 860px) { .aprov-lista { grid-template-columns: 1fr; } .ctrl-topo { align-items: flex-start; } .fbar { grid-template-columns: 90px 1fr 48px; } }
