/* ═══════════════════════════════════════════════════════════════
   HUNTER CODER ZAP IA BOOT — Design System
   ═══════════════════════════════════════════════════════════════ */
:root {
  --bg: #04060a;
  --bg-2: #080c12;
  --panel: rgba(255, 255, 255, 0.026);
  --panel-2: rgba(255, 255, 255, 0.045);
  --panel-3: rgba(255, 255, 255, 0.07);
  --solid: #0b1017;
  --solid-2: #10161f;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #e9eef5;
  --text-2: #aab5c4;
  --muted: #6d7889;
  --brand: #00e58f;
  --brand-2: #00c2ff;
  --violet: #7c5cff;
  --gold: #f5c451;
  --danger: #ff5c7a;
  --warn: #ffb547;
  --info: #3ba7ff;
  --grad: linear-gradient(135deg, #00e58f 0%, #00c2ff 100%);
  --grad-ai: linear-gradient(135deg, #8f6bff 0%, #4f8bff 55%, #00c2ff 100%);
  --grad-gold: linear-gradient(135deg, #ffd978 0%, #f5a524 100%);
  --glow: 0 0 0 1px rgba(0, 229, 143, 0.35), 0 8px 30px -6px rgba(0, 229, 143, 0.35);
  --radius: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75);
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --display: 'Sora', 'Inter', 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
  --sidebar: 268px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(0, 194, 255, 0.10), transparent 60%),
    radial-gradient(700px 500px at 10% 110%, rgba(124, 92, 255, 0.10), transparent 60%),
    radial-gradient(600px 400px at 40% 30%, rgba(0, 229, 143, 0.04), transparent 70%);
}
body::after {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.35;
  background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
}
::selection { background: rgba(0, 229, 143, 0.3); }
a { color: var(--brand-2); text-decoration: none; }
code, .mono { font-family: var(--mono); }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; font-weight: 600; }
p { margin: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); background-clip: padding-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

.svg-i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ───────── Layout ───────── */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: var(--sidebar) 1fr; height: 100vh; }
.sidebar {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px 14px 14px;
  background: linear-gradient(180deg, rgba(9, 13, 19, 0.92), rgba(5, 8, 12, 0.96));
  border-right: 1px solid var(--line); overflow-y: auto; overflow-x: hidden;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; }
.brand-mark { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 6px 16px rgba(0, 229, 143, 0.35)); }
.brand-text { line-height: 1.05; min-width: 0; }
.brand-top { font-family: var(--display); font-size: 10.5px; letter-spacing: 0.28em; color: var(--text-2); text-transform: uppercase; font-weight: 600; white-space: nowrap; }
.brand-main { font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.brand-main b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-main i { font-style: normal; background: var(--grad-ai); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-main em { font-style: normal; font-size: 0.78em; letter-spacing: 0.1em; background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-sec { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; font-weight: 600; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--text-2); cursor: pointer; transition: background .2s, color .2s; font-weight: 500; user-select: none;
}
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active { color: var(--text); background: linear-gradient(90deg, rgba(0, 229, 143, 0.13), rgba(0, 194, 255, 0.04)); box-shadow: inset 0 0 0 1px rgba(0, 229, 143, 0.16); }
.nav-item.active::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); box-shadow: 0 0 12px var(--brand); }
.nav-item.active .svg-i { color: var(--brand); }
.nav-item .badge { margin-left: auto; }
.nav-label { white-space: nowrap; }

.side-status { margin-top: auto; padding: 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 10px; }
.side-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-2); }
.side-row b { color: var(--text); font-weight: 600; margin-left: auto; }
.side-foot { font-size: 11px; color: var(--muted); text-align: center; padding-top: 8px; letter-spacing: .04em; }

.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; overflow: hidden; }
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 16px 28px; border-bottom: 1px solid var(--line);
  background: rgba(4, 6, 10, 0.6); backdrop-filter: blur(16px); z-index: 5;
}
.top-title h1 { font-size: 20px; }
.top-title { min-width: 0; }
.top-title p { color: var(--muted); font-size: 12.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-trigger {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; min-width: 220px; white-space: nowrap; border-radius: 12px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line); cursor: pointer; font-size: 13px; transition: border .2s;
}
.search-trigger:hover { border-color: var(--line-2); color: var(--text-2); }
.kbd { margin-left: auto; font-family: var(--mono); font-size: 10.5px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--text-2); background: var(--panel-2); }
.menu-btn { display: none; }

.view { flex: 1; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; }
.page { padding: 26px 28px 60px; max-width: 1560px; margin: 0 auto; animation: pageIn .45s var(--ease); }
.page.full { max-width: none; padding: 0; height: 100%; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ───────── Primitives ───────── */
.card {
  position: relative; background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.018));
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: border-color .25s, transform .25s var(--ease);
}
.card.hover:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card.glow { box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.06); }
.card-h { display: flex; align-items: center; gap: 12px; padding: 18px 20px 0; flex-wrap: wrap; }
.card-h > div:not(.ico-box):not(.actions) { min-width: 0; flex: 1 1 200px; }
.card-h h3 { font-size: 15px; display: flex; align-items: center; gap: 10px; }
.card-h .sub { color: var(--muted); font-size: 12.5px; }
.card-h .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-b { padding: 18px 20px 20px; }
.card-b.tight { padding-top: 12px; }
.ico-box { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); flex: none; }
.ico-box.brand { color: var(--brand); background: rgba(0, 229, 143, 0.08); border-color: rgba(0, 229, 143, 0.2); }
.ico-box.ai { color: #a993ff; background: rgba(124, 92, 255, 0.1); border-color: rgba(124, 92, 255, 0.25); }
.ico-box.gold { color: var(--gold); background: rgba(245, 196, 81, 0.08); border-color: rgba(245, 196, 81, 0.2); }
.ico-box.cyan { color: var(--brand-2); background: rgba(0, 194, 255, 0.08); border-color: rgba(0, 194, 255, 0.2); }
.ico-box.danger { color: var(--danger); background: rgba(255, 92, 122, 0.08); border-color: rgba(255, 92, 122, 0.2); }

.grid { display: grid; gap: 18px; }
.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)); }
.g-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.g-side { grid-template-columns: minmax(0, 1fr) 380px; }
.stack { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.stack > *, .grid > * { min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 18px; } .mt-s { margin-top: 10px; } .mb { margin-bottom: 18px; } .mb-s { margin-bottom: 10px; }
.muted { color: var(--muted); } .soft { color: var(--text-2); } .small { font-size: 12.5px; } .xs { font-size: 11.5px; }
.center { text-align: center; } .right { text-align: right; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-brand { color: var(--brand); } .text-cyan { color: var(--brand-2); } .text-ai { color: #a993ff; } .text-gold { color: var(--gold); } .text-danger { color: var(--danger); } .text-warn { color: var(--warn); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-ai-text { background: var(--grad-ai); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Buttons */
.btn {
  --b: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 11px;
  border: 1px solid var(--b); background: var(--panel-2); color: var(--text); font: 600 13px var(--font); cursor: pointer;
  transition: transform .15s, background .2s, border-color .2s, box-shadow .25s, opacity .2s; white-space: nowrap; user-select: none;
}
.btn:hover { background: var(--panel-3); border-color: rgba(255,255,255,0.2); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled, .btn.loading { opacity: .55; pointer-events: none; }
.btn .svg-i { width: 16px; height: 16px; }
.btn-primary { background: var(--grad); color: #01140c; border: 0; box-shadow: 0 8px 24px -8px rgba(0, 229, 143, 0.55), inset 0 1px 0 rgba(255,255,255,0.35); }
.btn-primary:hover { background: var(--grad); filter: brightness(1.08); box-shadow: 0 10px 30px -8px rgba(0, 229, 143, 0.7), inset 0 1px 0 rgba(255,255,255,0.35); }
.btn-ai { background: var(--grad-ai); color: #fff; border: 0; box-shadow: 0 8px 24px -8px rgba(124, 92, 255, 0.6), inset 0 1px 0 rgba(255,255,255,0.25); }
.btn-ai:hover { background: var(--grad-ai); filter: brightness(1.1); }
.btn-gold { background: var(--grad-gold); color: #241600; border: 0; }
.btn-danger { --b: rgba(255, 92, 122, 0.35); color: #ff8aa0; background: rgba(255, 92, 122, 0.08); }
.btn-danger:hover { background: rgba(255, 92, 122, 0.16); border-color: rgba(255, 92, 122, 0.55); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--panel-2); color: var(--text); border-color: var(--line); }
.btn-sm { height: 31px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn-xs { height: 26px; padding: 0 9px; font-size: 11.5px; border-radius: 8px; gap: 5px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 14px; border-radius: 13px; }
.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 31px; }
.btn-icon.btn-xs { width: 26px; }
.btn.loading::after { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Forms */
.field { display: grid; gap: 7px; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.hint { font-size: 11.8px; color: var(--muted); line-height: 1.45; }
.input, .textarea, .select {
  width: 100%; background: rgba(0,0,0,0.28); border: 1px solid var(--line-2); color: var(--text); border-radius: 11px;
  padding: 10px 13px; font: 13.5px var(--font); outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.input:hover, .textarea:hover, .select:hover { border-color: rgba(255,255,255,0.18); }
.input:focus, .textarea:focus, .select:focus { border-color: rgba(0, 229, 143, 0.6); box-shadow: 0 0 0 4px rgba(0, 229, 143, 0.12); background: rgba(0,0,0,0.38); }
.input::placeholder, .textarea::placeholder { color: #4f5968; }
.textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.textarea.code { font-family: var(--mono); font-size: 12.5px; }
.select { appearance: none; padding-right: 34px; 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='%23aab5c4' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.select option { background: #0e141c; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group .svg-i { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.input-group .input { padding-left: 38px; }
.input-group .suffix { position: absolute; right: 8px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }

/* Switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 42px; height: 24px; border-radius: 99px; background: rgba(255,255,255,0.1); border: 1px solid var(--line-2); position: relative; transition: background .25s, border-color .25s, box-shadow .25s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #cfd6df; transition: transform .3s var(--ease), background .25s; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.switch input:checked + .track { background: var(--grad); border-color: transparent; box-shadow: 0 0 16px -2px rgba(0, 229, 143, 0.55); }
.switch input:checked + .track::after { transform: translateX(18px); background: #fff; }
.switch.lg .track { width: 54px; height: 30px; }
.switch.lg .track::after { width: 24px; height: 24px; }
.switch.lg input:checked + .track::after { transform: translateX(24px); }
.switch-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .txt { flex: 1; min-width: 0; }
.switch-row .txt b { display: block; font-weight: 600; font-size: 13.5px; }
.switch-row .txt span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

/* Range */
.range-wrap { display: grid; gap: 8px; }
.range-head { display: flex; align-items: baseline; justify-content: space-between; }
.range-val { font-family: var(--mono); font-size: 12.5px; color: var(--brand); background: rgba(0, 229, 143, 0.08); padding: 2px 8px; border-radius: 7px; border: 1px solid rgba(0, 229, 143, 0.18); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--brand) 0%, var(--brand-2) var(--p, 50%), rgba(255,255,255,0.08) var(--p, 50%)); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); box-shadow: 0 0 0 5px rgba(0, 229, 143, 0.15), 0 3px 10px rgba(0,0,0,.5); cursor: grab; }

/* Segmented */
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: rgba(0,0,0,0.3); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--text-2); font: 600 12.5px var(--font); padding: 7px 13px; border-radius: 9px; cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; gap: 7px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2), 0 4px 12px -4px rgba(0,0,0,.5); }
.seg button.on .svg-i { color: var(--brand); }

.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days button { width: 40px; height: 34px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font: 600 12px var(--font); cursor: pointer; }
.days button.on { background: rgba(0, 229, 143, 0.12); border-color: rgba(0, 229, 143, 0.45); color: var(--brand); }

/* Badges / chips */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--panel-3); color: var(--text-2); border: 1px solid var(--line); letter-spacing: .02em; white-space: nowrap; }
.badge.brand { background: rgba(0, 229, 143, 0.1); color: var(--brand); border-color: rgba(0, 229, 143, 0.25); }
.badge.cyan { background: rgba(0, 194, 255, 0.1); color: var(--brand-2); border-color: rgba(0, 194, 255, 0.25); }
.badge.ai { background: rgba(124, 92, 255, 0.12); color: #b4a2ff; border-color: rgba(124, 92, 255, 0.3); }
.badge.gold { background: rgba(245, 196, 81, 0.1); color: var(--gold); border-color: rgba(245, 196, 81, 0.25); }
.badge.danger { background: rgba(255, 92, 122, 0.1); color: #ff8aa0; border-color: rgba(255, 92, 122, 0.28); }
.badge.warn { background: rgba(255, 181, 71, 0.1); color: var(--warn); border-color: rgba(255, 181, 71, 0.28); }
.badge.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.pulse::before { animation: pulse 1.6s infinite; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); font-size: 12px; color: var(--text-2); cursor: pointer; transition: all .2s; font-family: var(--mono); }
.chip:hover { border-color: rgba(0, 229, 143, 0.4); color: var(--brand); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; position: relative; }
.status-dot.on { background: var(--brand); box-shadow: 0 0 10px var(--brand); }
.status-dot.on::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; animation: ping 2s infinite; }
.status-dot.wait { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.status-dot.off { background: var(--danger); }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Progress */
.progress { height: 8px; border-radius: 99px; background: rgba(255,255,255,0.06); overflow: hidden; position: relative; }
.progress > i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--grad); box-shadow: 0 0 14px rgba(0, 229, 143, 0.5); transition: width .6s var(--ease); }
.progress.ai > i { background: var(--grad-ai); box-shadow: 0 0 14px rgba(124, 92, 255, 0.5); }
.progress.warn > i { background: linear-gradient(90deg, #ffb547, #ff7a59); box-shadow: none; }
.progress.striped > i { background-image: linear-gradient(45deg, rgba(255,255,255,.18) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.18) 75%, transparent 75%), var(--grad); background-size: 22px 22px, auto; animation: stripes 1s linear infinite; }
@keyframes stripes { to { background-position: 22px 0, 0 0; } }

/* KPI */
.kpi { padding: 18px 20px; overflow: hidden; }
.kpi .k-top { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.kpi .k-val { font-family: var(--display); font-size: 32px; font-weight: 700; letter-spacing: -0.03em; margin-top: 12px; line-height: 1; }
.kpi .k-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.kpi .spark { position: absolute; right: 0; bottom: 0; width: 55%; height: 60px; opacity: .9; pointer-events: none; }
.delta { font-weight: 700; font-size: 11.5px; padding: 2px 7px; border-radius: 7px; }
.delta.up { color: var(--brand); background: rgba(0, 229, 143, 0.1); }
.delta.down { color: var(--danger); background: rgba(255, 92, 122, 0.1); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 26px 28px; border-radius: 22px; border: 1px solid rgba(0, 229, 143, 0.16); background:
  radial-gradient(600px 220px at 100% 0%, rgba(0, 194, 255, 0.16), transparent 70%),
  radial-gradient(500px 220px at 0% 100%, rgba(0, 229, 143, 0.13), transparent 70%),
  linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)); }
.hero h2 { font-size: 26px; }
.hero .hero-sub { color: var(--text-2); margin-top: 6px; max-width: 640px; }
.hero-orb { position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: conic-gradient(from 180deg, rgba(0,229,143,.0), rgba(0,229,143,.35), rgba(0,194,255,.35), rgba(124,92,255,.3), rgba(0,229,143,0)); filter: blur(40px); opacity: .55; animation: orb 14s linear infinite; pointer-events: none; }
@keyframes orb { to { transform: rotate(360deg); } }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: rgba(255,255,255,0.018); }
.table tr:last-child td { border-bottom: 0; }

/* Empty */
.empty { display: grid; place-items: center; text-align: center; padding: 50px 20px; color: var(--muted); gap: 10px; }
.empty .e-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--text-2); margin-bottom: 6px; }
.empty .e-ico .svg-i { width: 28px; height: 28px; }
.empty h3 { color: var(--text); font-size: 16px; }

.skeleton { background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.03) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; color: var(--text-2); font: 600 13px var(--font); padding: 11px 14px; cursor: pointer; position: relative; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); }
.tabs button.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--grad); box-shadow: 0 0 10px var(--brand); }

/* Modal */
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(2, 4, 8, 0.72); backdrop-filter: blur(8px); animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: linear-gradient(180deg, #0f151e, #0a0f16); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: 0 40px 120px -20px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,0.06); animation: pop .35s var(--ease); }
.modal.wide { width: min(860px, 100%); }
.modal.xl { width: min(1100px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 20px 22px 0; }
.modal-h h3 { font-size: 17px; }
.modal-h .x { margin-left: auto; }
.modal-b { padding: 18px 22px; overflow-y: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 0 22px 20px; }

/* Toast */
.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 14px; background: rgba(14, 20, 28, 0.94); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -10px rgba(0,0,0,.8); backdrop-filter: blur(12px); animation: toastIn .4s var(--ease); font-size: 13px; }
.toast.out { animation: toastOut .3s forwards; }
.toast .t-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.toast.success .t-ico { color: var(--brand); background: rgba(0, 229, 143, 0.12); }
.toast.error .t-ico { color: var(--danger); background: rgba(255, 92, 122, 0.12); }
.toast.warn .t-ico { color: var(--warn); background: rgba(255, 181, 71, 0.12); }
.toast.info .t-ico { color: var(--brand-2); background: rgba(0, 194, 255, 0.12); }
.toast.ai .t-ico { color: #b4a2ff; background: rgba(124, 92, 255, 0.14); }
.toast b { display: block; font-weight: 600; }
.toast span { color: var(--text-2); font-size: 12.5px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* Command palette */
.palette { width: min(620px, 100%); align-self: start; margin-top: 12vh; background: #0d131b; border: 1px solid var(--line-2); border-radius: 18px; overflow: hidden; box-shadow: 0 40px 120px -20px rgba(0,0,0,.9); animation: pop .3s var(--ease); }
.palette input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: 16px var(--font); padding: 18px 20px; border-bottom: 1px solid var(--line); }
.palette .p-list { max-height: 50vh; overflow-y: auto; padding: 8px; }
.palette .p-item { display: flex; gap: 12px; align-items: center; padding: 11px 12px; border-radius: 11px; cursor: pointer; color: var(--text-2); }
.palette .p-item.on, .palette .p-item:hover { background: var(--panel-3); color: var(--text); }
.palette .p-item small { margin-left: auto; color: var(--muted); }

/* Gauge / donut */
.gauge-wrap { position: relative; display: grid; place-items: center; }
.gauge-val { position: absolute; bottom: 8px; text-align: center; }
.gauge-val b { font-family: var(--display); font-size: 38px; font-weight: 700; display: block; line-height: 1; letter-spacing: -0.03em; }
.gauge-val span { font-size: 12px; color: var(--text-2); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.legend { display: grid; gap: 9px; }
.legend-item { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-2); }
.legend-item i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend-item b { margin-left: auto; color: var(--text); font-family: var(--mono); font-size: 12px; }
.chart-tip { position: fixed; z-index: 300; pointer-events: none; padding: 10px 12px; border-radius: 11px; background: rgba(12, 17, 24, 0.96); border: 1px solid var(--line-2); font-size: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.6); min-width: 130px; }
.chart-tip .tt { color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.chart-tip .tr { display: flex; align-items: center; gap: 8px; }
.chart-tip .tr i { width: 8px; height: 8px; border-radius: 50%; }
.chart-tip .tr b { margin-left: auto; font-family: var(--mono); }

/* Funnel */
.funnel { display: grid; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 110px 1fr 70px; align-items: center; gap: 12px; font-size: 12.5px; }
.funnel-bar { height: 30px; border-radius: 9px; background: rgba(255,255,255,0.04); overflow: hidden; position: relative; }
.funnel-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 9px; transition: width .8s var(--ease); }
.funnel-bar span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 12px; font-weight: 600; }

/* Feed / terminal */
.feed { display: grid; gap: 2px; font-size: 12.5px; }
.feed-item { display: grid; grid-template-columns: 64px 18px 1fr; gap: 8px; align-items: start; padding: 7px 8px; border-radius: 9px; animation: feedIn .4s var(--ease); }
.feed-item:hover { background: rgba(255,255,255,0.025); }
.feed-item time { font-family: var(--mono); color: var(--muted); font-size: 11.5px; padding-top: 1px; }
.feed-item .svg-i { width: 15px; height: 15px; margin-top: 2px; }
.feed-item.success .svg-i { color: var(--brand); } .feed-item.error .svg-i { color: var(--danger); } .feed-item.warn .svg-i { color: var(--warn); } .feed-item.info .svg-i { color: var(--brand-2); } .feed-item.ai .svg-i { color: #a993ff; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-4px); background: rgba(0, 229, 143, 0.06); } }
.terminal { background: #030508; border: 1px solid var(--line); border-radius: 16px; font-family: var(--mono); font-size: 12.5px; padding: 14px; height: calc(100vh - 250px); overflow-y: auto; }
.terminal .ln { display: flex; gap: 12px; padding: 3px 4px; border-radius: 6px; }
.terminal .ln:hover { background: rgba(255,255,255,0.03); }
.terminal .ln time { color: #4b5563; flex: none; }
.terminal .ln .cat { flex: none; width: 82px; font-weight: 700; }
.terminal .ln.success .cat { color: var(--brand); } .terminal .ln.error .cat { color: var(--danger); } .terminal .ln.warn .cat { color: var(--warn); } .terminal .ln.info .cat { color: var(--brand-2); } .terminal .ln.ai .cat { color: #a993ff; }

/* ───────── Conexões ───────── */
.chip-card { padding: 20px; display: grid; gap: 16px; }
.chip-head { display: flex; gap: 14px; align-items: center; }
.avatar { width: 50px; height: 50px; border-radius: 16px; flex: none; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 18px; color: #04120b; background: var(--grad); position: relative; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 38px; height: 38px; border-radius: 12px; font-size: 14px; }
.avatar.xs { width: 30px; height: 30px; border-radius: 10px; font-size: 12px; }
.avatar .st { position: absolute; right: 3px; bottom: 3px; }
.chip-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.meta-box { padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,0.25); border: 1px solid var(--line); }
.meta-box small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta-box b { font-family: var(--display); font-size: 17px; }
.qr-box { display: grid; place-items: center; gap: 16px; padding: 10px 0; }
.qr-frame { position: relative; width: 290px; height: 290px; border-radius: 22px; padding: 14px; background: #fff; box-shadow: 0 0 0 1px rgba(0,229,143,.4), 0 0 60px -10px rgba(0,229,143,.55); display: grid; place-items: center; }
.qr-frame img { width: 100%; height: 100%; image-rendering: pixelated; }
.qr-frame::before { content: ''; position: absolute; inset: -8px; border-radius: 28px; border: 2px solid transparent; background: var(--grad) border-box; -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .7; }
.qr-scan { position: absolute; left: 14px; right: 14px; height: 3px; top: 14px; background: linear-gradient(90deg, transparent, var(--brand), transparent); box-shadow: 0 0 18px var(--brand); animation: scan 2.4s ease-in-out infinite; border-radius: 3px; }
@keyframes scan { 50% { top: calc(100% - 17px); } }
.pair-code { font-family: var(--mono); font-size: 34px; letter-spacing: .25em; font-weight: 700; padding: 14px 22px; border-radius: 16px; background: rgba(0,229,143,.08); border: 1px dashed rgba(0,229,143,.4); color: var(--brand); }
.success-burst { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgba(0,229,143,.25), transparent 70%); animation: burst .8s var(--ease); }
.success-burst .svg-i { width: 58px; height: 58px; color: var(--brand); stroke-width: 2.4; filter: drop-shadow(0 0 14px var(--brand)); }
@keyframes burst { from { transform: scale(.3); opacity: 0; } }
.steps-list { display: grid; gap: 10px; counter-reset: s; }
.steps-list li { list-style: none; display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--text-2); }
.steps-list li::before { counter-increment: s; content: counter(s); width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: rgba(0,229,143,.1); color: var(--brand); font-weight: 700; font-size: 12px; flex: none; }

/* ───────── Campanhas ───────── */
.camp-card { padding: 18px 20px; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
.camp-ring { position: relative; width: 64px; height: 64px; }
.camp-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 14px; }
.camp-stats { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.camp-stats span b { color: var(--text); font-family: var(--mono); margin-right: 3px; }
.camp-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 99px; text-transform: uppercase; letter-spacing: .06em; }
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-running { color: var(--brand); background: rgba(0,229,143,.1); } .st-running::before { animation: pulse 1.2s infinite; box-shadow: 0 0 8px currentColor; }
.st-paused { color: var(--warn); background: rgba(255,181,71,.1); }
.st-scheduled { color: var(--brand-2); background: rgba(0,194,255,.1); }
.st-completed { color: #a993ff; background: rgba(124,92,255,.12); }
.st-stopped { color: var(--danger); background: rgba(255,92,122,.1); }
.st-draft { color: var(--text-2); background: var(--panel-3); }

.wizard { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 22px; align-items: start; }
.wiz-steps { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.wiz-step { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 13px; transition: all .2s; }
.wiz-step i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--panel-3); font-style: normal; font-size: 12px; }
.wiz-step.on { border-color: rgba(0,229,143,.45); color: var(--text); background: rgba(0,229,143,.06); }
.wiz-step.on i { background: var(--grad); color: #04120b; }
.wiz-step.done i { background: rgba(0,229,143,.15); color: var(--brand); }

.block { border: 1px solid var(--line); border-radius: 16px; background: rgba(0,0,0,0.2); transition: border-color .2s; }
.block:hover { border-color: var(--line-2); }
.block.dragging { opacity: .5; }
.block.drop-target { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,229,143,.15); }
.block-h { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.block-h .grip { cursor: grab; color: var(--muted); }
.block-h b { font-size: 13px; }
.block-b { padding: 14px; display: grid; gap: 12px; }
.add-blocks { display: flex; gap: 8px; flex-wrap: wrap; }
.add-blocks .btn { height: 36px; }
.var-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.media-pick { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; border: 1px dashed var(--line-2); cursor: pointer; transition: all .2s; }
.media-pick:hover { border-color: rgba(0,229,143,.5); background: rgba(0,229,143,.04); }
.media-thumb { width: 54px; height: 54px; border-radius: 12px; flex: none; overflow: hidden; display: grid; place-items: center; background: var(--panel-3); color: var(--text-2); }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }

/* Phone preview (WhatsApp-like) */
.wiz-side { align-self: stretch; }
.sticky-side { position: sticky; top: 4px; }
.phone { position: relative; width: 100%; max-width: 380px; margin: 0 auto; border-radius: 44px; padding: 12px; background: linear-gradient(160deg, #1d2530, #0b0f15); border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 40px 100px -30px rgba(0,0,0,.9), inset 0 0 0 2px rgba(0,0,0,.6); }
.phone-screen { border-radius: 34px; overflow: hidden; height: 640px; display: flex; flex-direction: column; background: #0b141a; position: relative; }
.phone-notch { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 96px; height: 26px; border-radius: 20px; background: #000; z-index: 3; }
.wa-top { display: flex; align-items: center; gap: 10px; padding: 42px 14px 10px; background: #1f2c34; }
.wa-top .avatar { width: 34px; height: 34px; border-radius: 50%; font-size: 13px; }
.wa-top b { font-size: 13.5px; display: block; }
.wa-top small { color: #8696a0; font-size: 11px; }
.wa-body { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; background-color: #0b141a; background-image: radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1px); background-size: 18px 18px; }
.wa-day { align-self: center; font-size: 11px; color: #8696a0; background: #182229; padding: 4px 10px; border-radius: 8px; margin: 4px 0 8px; }
.bubble { max-width: 86%; padding: 6px 9px 4px; border-radius: 10px; font-size: 13.2px; line-height: 1.42; position: relative; white-space: pre-wrap; word-wrap: break-word; animation: bubbleIn .35s var(--ease); box-shadow: 0 1px 1px rgba(0,0,0,.25); }
.bubble.out { align-self: flex-end; background: #005c4b; border-top-right-radius: 3px; color: #e9edef; }
.bubble.in { align-self: flex-start; background: #202c33; border-top-left-radius: 3px; color: #e9edef; }
.bubble .meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 10.5px; color: rgba(233,237,239,.6); margin-top: 2px; }
.bubble .meta .svg-i { width: 14px; height: 14px; color: #53bdeb; stroke-width: 2.2; }
.bubble img, .bubble video { display: block; width: 100%; max-width: 260px; border-radius: 7px; margin-bottom: 4px; }
.bubble .doc { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 7px; background: rgba(0,0,0,.2); margin-bottom: 4px; }
.bubble audio { width: 230px; height: 36px; margin: 2px 0; }
.bubble .voice { display: flex; align-items: center; gap: 10px; min-width: 210px; padding: 4px 2px; }
.bubble .voice .play { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); }
.bubble .wave { flex: 1; height: 22px; display: flex; align-items: center; gap: 2px; }
.bubble .wave i { flex: 1; background: rgba(233,237,239,.55); border-radius: 2px; }
.bubble.typing { display: flex; gap: 4px; padding: 12px 14px; }
.bubble.typing i { width: 7px; height: 7px; border-radius: 50%; background: #8696a0; animation: typing 1.2s infinite; }
.bubble.typing i:nth-child(2) { animation-delay: .15s; } .bubble.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.wa-input { display: flex; gap: 8px; align-items: center; padding: 8px 10px 14px; background: #0b141a; }
.wa-input .fake { flex: 1; height: 38px; border-radius: 20px; background: #202c33; color: #8696a0; font-size: 13px; display: flex; align-items: center; padding: 0 14px; }
.wa-input .mic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #00a884; color: #fff; }
.poll-card { min-width: 220px; }
.poll-card .opt { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; }
.poll-card .opt::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #8696a0; flex: none; }

/* Media library */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.media-card { overflow: hidden; display: flex; flex-direction: column; }
.media-card .m-prev { height: 150px; display: grid; place-items: center; background: rgba(0,0,0,.35); position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.media-card .m-prev img, .media-card .m-prev video { width: 100%; height: 100%; object-fit: cover; }
.media-card .m-prev .big-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--panel-3); }
.media-card .m-prev .big-ico .svg-i { width: 28px; height: 28px; }
.media-card .m-kind { position: absolute; left: 10px; top: 10px; }
.media-card .m-bot { position: absolute; right: 10px; top: 10px; }
.media-card .m-body { padding: 13px 14px; display: grid; gap: 6px; flex: 1; }
.media-card .m-body b { font-size: 13.5px; }
.media-card .m-foot { display: flex; gap: 6px; padding: 0 14px 14px; }
.dropzone { border: 2px dashed var(--line-2); border-radius: 18px; padding: 30px; display: grid; place-items: center; text-align: center; gap: 8px; cursor: pointer; transition: all .25s; color: var(--text-2); }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: rgba(0,229,143,.04); color: var(--text); }
.dropzone .svg-i { width: 30px; height: 30px; color: var(--brand); }
.recorder { display: grid; place-items: center; gap: 16px; padding: 10px 0 4px; }
.rec-btn { width: 86px; height: 86px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, #ff7a93, #ff3d64); color: #fff; box-shadow: 0 0 0 8px rgba(255,61,100,.12), 0 12px 40px -6px rgba(255,61,100,.6); transition: transform .2s; }
.rec-btn:hover { transform: scale(1.05); }
.rec-btn.rec { animation: recPulse 1.4s infinite; }
.rec-btn .svg-i { width: 34px; height: 34px; }
@keyframes recPulse { 50% { box-shadow: 0 0 0 18px rgba(255,61,100,.0), 0 12px 40px -6px rgba(255,61,100,.6); } }
.rec-time { font-family: var(--mono); font-size: 26px; font-weight: 600; letter-spacing: .05em; }
.viz { width: 100%; height: 70px; }

/* Bot */
.bot-hero { display: flex; gap: 20px; align-items: center; padding: 22px 24px; }
.bot-orb { width: 74px; height: 74px; border-radius: 24px; flex: none; display: grid; place-items: center; background: var(--grad-ai); box-shadow: 0 14px 40px -10px rgba(124,92,255,.7); position: relative; }
.bot-orb .svg-i { width: 34px; height: 34px; color: #fff; }
.bot-orb.on::after { content: ''; position: absolute; inset: -6px; border-radius: 28px; border: 2px solid rgba(143,107,255,.6); animation: ping 2.2s infinite; }
.prompt-area { min-height: 320px; font-size: 13.5px; line-height: 1.7; }
.playground { display: flex; flex-direction: column; height: 680px; }
.playground .wa-body { border-radius: 0; }
.pg-meta { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0 0; align-self: flex-end; max-width: 90%; justify-content: flex-end; }
.pg-input { display: flex; gap: 8px; padding: 10px; background: #111b21; border-top: 1px solid rgba(255,255,255,.05); }
.pg-input input { flex: 1; height: 40px; border-radius: 20px; border: 0; outline: 0; padding: 0 16px; background: #202c33; color: #e9edef; font: 13.5px var(--font); }

/* Inbox */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr) 330px; height: 100%; }
.inbox-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: rgba(5,8,12,.5); }
.inbox-list .il-head { padding: 16px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.inbox-list .il-items { overflow-y: auto; flex: 1; }
.chat-item { display: flex; gap: 12px; padding: 13px 16px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.035); transition: background .15s; position: relative; }
.chat-item:hover { background: rgba(255,255,255,0.025); }
.chat-item.on { background: rgba(0,229,143,0.06); }
.chat-item.on::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); }
.chat-item .ci-body { flex: 1; min-width: 0; }
.chat-item .ci-top { display: flex; gap: 8px; align-items: center; }
.chat-item .ci-top b { font-size: 13.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item .ci-top time { font-size: 11px; color: var(--muted); }
.chat-item .ci-last { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.chat-item .ci-tags { display: flex; gap: 5px; margin-top: 6px; }
.unread { min-width: 20px; height: 20px; border-radius: 99px; background: var(--brand); color: #04120b; font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 6px; }
.inbox-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.inbox-chat .ic-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: rgba(5,8,12,.5); }
.inbox-chat .wa-body { flex: 1; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 12px 14px; border-top: 1px solid var(--line); background: rgba(5,8,12,.6); }
.composer textarea { flex: 1; min-height: 42px; max-height: 160px; resize: none; }
.inbox-side { border-left: 1px solid var(--line); overflow-y: auto; padding: 18px; display: grid; gap: 16px; align-content: start; background: rgba(5,8,12,.5); }
.source-tag { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 1px 6px; border-radius: 5px; margin-right: 6px; }
.source-tag.bot { background: rgba(124,92,255,.25); color: #c9bcff; }
.source-tag.campaign { background: rgba(0,194,255,.2); color: #8ddcff; }
.source-tag.manual, .source-tag.phone { background: rgba(245,196,81,.2); color: #ffd978; }
.source-tag.system { background: rgba(255,255,255,.12); color: #ccd; }

/* CRM */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 10px; min-height: calc(100vh - 200px); }
.k-col { background: rgba(255,255,255,0.018); border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; min-height: 0; }
.k-col.over { border-color: var(--brand); background: rgba(0,229,143,.03); }
.k-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; font-weight: 700; font-size: 13px; }
.k-head i { width: 9px; height: 9px; border-radius: 50%; }
.k-head .badge { margin-left: auto; }
.k-list { padding: 4px 10px 12px; display: grid; gap: 10px; align-content: start; overflow-y: auto; flex: 1; min-height: 80px; }
.k-card { padding: 12px; border-radius: 13px; background: linear-gradient(180deg, #111822, #0d131b); border: 1px solid var(--line); cursor: grab; transition: transform .2s, border-color .2s; }
.k-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.k-card.dragging { opacity: .4; }
.k-card b { font-size: 13px; }
.k-card p { font-size: 12px; color: var(--muted); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Shield */
.profile-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.profile-card { padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; transition: all .25s var(--ease); position: relative; overflow: hidden; }
.profile-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.profile-card.on { border-color: rgba(0,229,143,.55); background: linear-gradient(180deg, rgba(0,229,143,.09), rgba(0,229,143,.02)); box-shadow: var(--glow); }
.profile-card b { display: block; font-family: var(--display); font-size: 15px; margin-top: 10px; }
.profile-card small { color: var(--muted); font-size: 12px; }
.profile-card .pc-check { position: absolute; right: 12px; top: 12px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #04120b; opacity: 0; transform: scale(.5); transition: all .3s var(--ease); }
.profile-card.on .pc-check { opacity: 1; transform: none; }
.profile-card .pc-check .svg-i { width: 13px; height: 13px; stroke-width: 3; }
.tip-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(255,181,71,.05); border: 1px solid rgba(255,181,71,.15); font-size: 12.5px; color: var(--text-2); }
.tip-row .svg-i { color: var(--warn); width: 16px; height: 16px; margin-top: 1px; }
.tip-row b { margin-left: auto; color: var(--warn); font-family: var(--mono); font-size: 11.5px; }
.layer { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.layer:last-child { border-bottom: 0; }
.layer .lv { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; font-family: var(--mono); font-size: 11px; font-weight: 700; }
.layer.on .lv { background: rgba(0,229,143,.12); color: var(--brand); }
.layer.off .lv { background: rgba(255,92,122,.1); color: var(--danger); }
.layer b { font-size: 13px; display: block; }
.layer span { font-size: 12px; color: var(--muted); }

/* Models */
.model-row { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 13px; border: 1px solid var(--line); background: rgba(0,0,0,.2); cursor: pointer; transition: all .2s; }
.model-row:hover { border-color: var(--line-2); }
.model-row.on { border-color: rgba(124,92,255,.55); background: rgba(124,92,255,.07); box-shadow: 0 0 0 3px rgba(124,92,255,.1); }
.model-row .m-name { font-weight: 600; font-size: 13.5px; }
.model-row .m-id { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(0,194,255,.2); background: rgba(0,194,255,.05); font-size: 13px; color: var(--text-2); }
.callout .svg-i { color: var(--brand-2); margin-top: 1px; }
.callout.ai { border-color: rgba(124,92,255,.25); background: rgba(124,92,255,.06); }
.callout.ai .svg-i { color: #a993ff; }
.callout.warn { border-color: rgba(255,181,71,.25); background: rgba(255,181,71,.05); }
.callout.warn .svg-i { color: var(--warn); }

/* Bulk selection: a checkbox slot on cards that appears in "selecting" mode, plus the sticky action bar */
.sel-box { display: none; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-2, rgba(255,255,255,.22)); background: rgba(0,0,0,.35); place-items: center; cursor: pointer; color: var(--brand); flex: none; transition: border-color .15s, background .15s; }
.sel-box .svg-i { width: 14px; height: 14px; opacity: 0; }
.selecting .sel-box { display: grid; }
.sel-box.on { border-color: var(--brand); background: rgba(0,229,143,.14); }
.sel-box.on .svg-i { opacity: 1; }
.card.selected { border-color: rgba(0,229,143,.5); box-shadow: 0 0 0 3px rgba(0,229,143,.08); }
.media-card .sel-box { position: absolute; left: 10px; bottom: 10px; z-index: 2; }
.bulk-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-radius: 16px; background: rgba(13, 19, 28, .92); border: 1px solid rgba(0,229,143,.35); box-shadow: 0 12px 40px rgba(0,0,0,.45), 0 0 0 4px rgba(0,229,143,.06); backdrop-filter: blur(10px); animation: fade .2s; }
.bulk-bar b { font-size: 13px; }
.bulk-bar .count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 99px; background: var(--brand); color: #04110b; font-weight: 800; font-size: 12px; }

/* Danger zone (Settings → Sistema): scope picker for the system reset */
.danger-zone { border-color: rgba(255,92,122,.3); }
.danger-zone .card-h h3 { color: #ff8aa0; }
.scope-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.scope { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 13px; border: 1px solid var(--line); background: rgba(0,0,0,.2); cursor: pointer; transition: border-color .15s, background .15s; }
.scope input { accent-color: var(--danger); width: 16px; height: 16px; flex: none; }
.scope .ico-box { width: 32px; height: 32px; flex: none; }
.scope b { display: block; font-size: 13px; }
.scope span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.scope.on { border-color: rgba(255,92,122,.45); background: rgba(255,92,122,.06); }
.scope.on .ico-box { color: var(--danger); border-color: rgba(255,92,122,.3); background: rgba(255,92,122,.08); }
.opt input { accent-color: var(--brand); width: 15px; height: 15px; }
.k-head .k-act { margin-left: 4px; opacity: 0; transition: opacity .15s; }
.k-col:hover .k-head .k-act { opacity: 1; }

/* Modo livre strip (Shield planner): dashed and quiet while the rails are on, red and solid once they are off */
.free-strip { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--line); background: rgba(0,0,0,.18); transition: border-color .25s, background .25s, box-shadow .25s; }
.free-strip .txt { flex: 1; min-width: 0; }
.free-strip .txt > b { display: block; font-weight: 600; font-size: 13.5px; }
.free-strip .txt > span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; line-height: 1.5; }
.free-strip .txt > span b { font-weight: 600; }
.free-strip .ico-box { flex: none; }
.free-strip.on { border-style: solid; border-color: rgba(255,92,122,.45); background: rgba(255,92,122,.06); box-shadow: 0 0 0 4px rgba(255,92,122,.06), inset 0 1px 0 rgba(255,255,255,.04); }
.free-strip.on .txt > b { color: #ff8aa0; }
.free-strip.on .txt > span { color: var(--text-2); }
.free-strip.on .switch input:checked + .track { background: var(--danger); }
@media (max-width: 640px) { .free-strip { flex-wrap: wrap; } .free-strip .switch { margin-left: auto; } }
.callout b { color: var(--text); }

.alert-bell { position: relative; }
.alert-bell .dot { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 8px var(--danger); }

.splash { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; background: var(--bg); transition: opacity .35s, visibility .35s; }
.splash.gone { opacity: 0; visibility: hidden; }
.splash-inner { display: grid; place-items: center; gap: 18px; }
.splash svg { width: 84px; height: 84px; animation: float 2.4s ease-in-out infinite; filter: drop-shadow(0 10px 30px rgba(0,229,143,.45)); }
.splash .bar { width: 180px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.splash .bar i { display: block; height: 100%; width: 40%; background: var(--grad); animation: load 1.1s ease-in-out infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes float { 50% { transform: translateY(-8px); } }

/* Responsive */
@media (max-width: 1280px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wizard { grid-template-columns: 1fr; }
  .sticky-side { position: relative; }
  .inbox { grid-template-columns: 300px minmax(0, 1fr); }
  .inbox-side { display: none; }
  .profile-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
  :root { --sidebar: 78px; }
  .brand-text, .nav-label, .nav-sec, .side-status, .side-foot, .nav-item .badge { display: none; }
  .nav-item { justify-content: center; }
  .brand { justify-content: center; padding-inline: 0; }
  .g-main, .g-side, .g-3 { grid-template-columns: 1fr; }
  .search-trigger { min-width: 0; }
  .search-trigger .lbl, .search-trigger .kbd { display: none; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 268px; z-index: 50; transform: translateX(-100%); transition: transform .35s var(--ease); }
  .sidebar.open { transform: none; box-shadow: 30px 0 80px rgba(0,0,0,.7); }
  .sidebar .brand-text, .sidebar .nav-label, .sidebar .nav-sec, .sidebar .side-status, .sidebar .side-foot { display: revert; }
  .sidebar .nav-item { justify-content: flex-start; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 12px 16px; }
  .page { padding: 18px 16px 50px; }
  .g-2, .g-4, .form-grid, .chip-meta, .profile-cards { grid-template-columns: 1fr; }
  .camp-card { grid-template-columns: 1fr; }
  .camp-actions { justify-content: flex-start; }
  .inbox { grid-template-columns: 1fr; }
  .top-actions .pill-hide { display: none; }
}
