:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --bg-2: #10131a;
  --panel: #141821;
  --panel-2: #1a1f2b;
  --line: #242a37;
  --line-2: #2e3545;
  --text: #e8ebf2;
  --muted: #8b93a7;
  --faint: #5d6579;
  --accent: #7c5cff;
  --accent-2: #9d85ff;
  --accent-soft: rgba(124, 92, 255, 0.14);
  --green: #2ecc8f;
  --green-soft: rgba(46, 204, 143, 0.13);
  --amber: #f5b544;
  --amber-soft: rgba(245, 181, 68, 0.13);
  --red: #ff5d6c;
  --red-soft: rgba(255, 93, 108, 0.13);
  --blue: #4da3ff;
  --blue-soft: rgba(77, 163, 255, 0.13);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a.btn { color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-appearance: none; appearance: none; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
  padding: 20px 14px;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #4da3ff);
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.4);
}
.brand-mark svg { width: 18px; height: 18px; color: white; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.brand-name span { color: var(--accent-2); }

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--muted); cursor: pointer; border: 0; background: none; text-align: left; width: 100%;
  transition: background 0.15s, color 0.15s;
}
.nav-item svg { width: 18px; height: 18px; flex: none; }
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--text); }
.nav-item.active svg { color: var(--accent-2); }
.nav-badge { margin-left: auto; font-size: 11px; padding: 1px 7px; border-radius: 20px; background: var(--green-soft); color: var(--green); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.env-pill { font-size: 12px; color: var(--muted); padding: 8px 12px; border: 1px dashed var(--line-2); border-radius: var(--radius-sm); }
.env-pill b { color: var(--amber); font-weight: 600; }

.main { padding: 28px 36px 60px; max-width: 1280px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; align-items: start; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }

/* ---------- Cards ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 16px; font-size: 15px; font-weight: 600; }
.card-sub { color: var(--muted); font-size: 13px; margin: -10px 0 16px; }
.stat { padding: 16px 18px; }
.stat-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text); display: flex; justify-content: space-between; gap: 8px; }
.field .hint { font-size: 12px; color: var(--faint); font-weight: 400; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input, .select, .textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 10px 12px; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
.textarea.tall { min-height: 320px; font-size: 13.5px; }
.input.big { font-size: 18px; padding: 12px 14px; letter-spacing: 0.02em; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238b93a7' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--panel-2); cursor: pointer; font-weight: 500; white-space: nowrap;
  transition: transform 0.08s, background 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-call { background: var(--green); border-color: var(--green); color: #05140d; font-weight: 600; width: 100%; padding: 13px; font-size: 15px; }
.btn-call:hover { filter: brightness(1.08); border-color: var(--green); }
.btn-danger { background: var(--red-soft); border-color: transparent; color: var(--red); }
.btn-danger:hover { border-color: var(--red); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--panel-2); border-color: transparent; }
.btn-sm { padding: 6px 10px; font-size: 13px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 20px; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.violet { background: var(--accent-soft); color: var(--accent-2); }
.badge.pulse::before { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; transform: scale(0.7); } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--mono); font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-2); }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; line-height: 1.5; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert.amber { background: var(--amber-soft); color: #f7cf85; }
.alert.red { background: var(--red-soft); color: #ff9aa4; }
.alert.blue { background: var(--blue-soft); color: #9ccbff; }
.alert.green { background: var(--green-soft); color: #86e6bf; }
.alert b { color: inherit; }

/* ---------- Live call ---------- */
.live-head { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--blue)); color: white;
}
.avatar.ringing { animation: ring 1.4s ease-in-out infinite; }
@keyframes ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(46, 204, 143, 0.5); } 50% { box-shadow: 0 0 0 12px rgba(46, 204, 143, 0); } }
.live-meta { flex: 1; min-width: 0; }
.live-meta .num { font-size: 17px; font-weight: 600; }
.live-meta .sub { color: var(--muted); font-size: 13px; }
.timer { font-family: var(--mono); font-size: 15px; color: var(--muted); }

.wave { display: flex; align-items: center; gap: 3px; height: 22px; }
.wave i { width: 3px; border-radius: 2px; background: var(--green); animation: wave 1s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: 0.15s; } .wave i:nth-child(3) { animation-delay: 0.3s; }
.wave i:nth-child(4) { animation-delay: 0.45s; } .wave i:nth-child(5) { animation-delay: 0.6s; }
@keyframes wave { 0%, 100% { height: 5px; } 50% { height: 20px; } }

.transcript { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow-y: auto; padding: 4px 2px; margin-top: 16px; scroll-behavior: smooth; }
.transcript.full { max-height: none; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; line-height: 1.5; animation: pop 0.2s ease-out; white-space: pre-wrap; word-wrap: break-word; }
@keyframes pop { from { opacity: 0; transform: translateY(4px); } }
.msg .who { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 2px; opacity: 0.7; }
.msg.assistant { align-self: flex-start; background: var(--accent-soft); border: 1px solid rgba(124, 92, 255, 0.25); border-bottom-left-radius: 4px; }
.msg.user { align-self: flex-end; background: var(--panel-2); border: 1px solid var(--line-2); border-bottom-right-radius: 4px; }
.msg.system { align-self: center; max-width: 100%; background: none; color: var(--faint); font-size: 12px; padding: 2px 8px; }
.empty { text-align: center; color: var(--faint); padding: 40px 20px; }
.empty svg { width: 40px; height: 40px; margin-bottom: 10px; color: var(--line-2); }

/* ---------- Agents ---------- */
.agent-card { display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.agent-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.agent-card h3 { margin: 0; font-size: 15px; }
.agent-card p { margin: 0; color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.agent-card .foot { display: flex; gap: 8px; align-items: center; margin-top: auto; }
.agent-new { display: grid; place-items: center; border-style: dashed; color: var(--muted); min-height: 170px; }
.agent-new:hover { color: var(--text); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 500; color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em; padding: 0 14px 10px; }
td { padding: 13px 14px; border-top: 1px solid var(--line); white-space: nowrap; }
tbody tr { cursor: pointer; transition: background 0.12s; }
tbody tr:hover { background: var(--panel-2); }
td.err { color: var(--muted); font-size: 12px; white-space: normal; max-width: 280px; }

/* ---------- Drawer / modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(4, 6, 10, 0.6); backdrop-filter: blur(3px); z-index: 40; animation: fade 0.15s; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(680px, 100%); z-index: 50;
  background: var(--bg-2); border-left: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column; animation: slide 0.2s ease-out;
}
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 17px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px; }
.drawer-foot { display: flex; gap: 10px; justify-content: space-between; padding: 14px 22px; border-top: 1px solid var(--line); }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 13px; margin-bottom: 18px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

/* ---------- Checklist ---------- */
.check { display: flex; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.check:first-of-type { border-top: 0; padding-top: 0; }
.check-icon { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.check-icon svg { width: 14px; height: 14px; }
.check-icon.ok { background: var(--green-soft); color: var(--green); }
.check-icon.warn { background: var(--amber-soft); color: var(--amber); }
.check-icon.bad { background: var(--red-soft); color: var(--red); }
.check-body { flex: 1; min-width: 0; }
.check-body > b { font-weight: 600; display: block; }
.check-body > span { color: var(--muted); font-size: 13px; word-break: break-word; }
.check-body > span b { color: var(--text); font-weight: 600; }
.steps { margin: 0; padding-left: 20px; color: var(--muted); }
.steps li { margin-bottom: 8px; }
.steps b { color: var(--text); font-weight: 500; }

/* ---------- Toast ---------- */
.toasts { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--panel-2); border: 1px solid var(--line-2); padding: 12px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow); max-width: 380px; animation: pop 0.2s; }
.toast.error { border-color: rgba(255, 93, 108, 0.4); }
.toast.success { border-color: rgba(46, 204, 143, 0.4); }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 30% 20%, rgba(124, 92, 255, 0.16), transparent 45%), radial-gradient(circle at 80% 90%, rgba(77, 163, 255, 0.1), transparent 40%), var(--bg); }
.login-card { width: min(400px, 100%); padding: 34px; }
.login-card .brand { padding: 0 0 22px; }
.login-card h1 { margin: 0 0 6px; font-size: 22px; }
.login-card p { margin: 0 0 24px; color: var(--muted); }

.spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: currentColor; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }


/* ---------- Editor de agentes ---------- */
.drawer.wide { width: min(980px, 100%); }
.editor-head { gap: 14px; }
.title-input { font-size: 17px; font-weight: 600; background: transparent; border-color: transparent; padding: 6px 10px; }
.title-input:hover { border-color: var(--line-2); }
.tabs { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px 14px; color: var(--muted); cursor: pointer; font-weight: 500; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab-panel { max-width: 860px; }

.section-title { margin: 26px 0 12px; }
.tab-panel > .section-title:first-child { margin-top: 0; }
.section-title h3 { margin: 0; font-size: 14px; font-weight: 600; }
.section-title p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }

.opening-options { display: flex; flex-direction: column; gap: 6px; margin: -6px 0 6px; }
.opening-options b { color: var(--text); font-weight: 500; }
.segmented { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 3px; margin-bottom: 10px; }
.segmented button { background: none; border: 0; padding: 6px 14px; border-radius: 6px; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 500; }
.segmented button.active { background: var(--accent-soft); color: var(--text); }

.list-editor { display: flex; flex-direction: column; gap: 8px; }
.list-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.list-num { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; font-size: 12px; font-weight: 600; margin-top: 7px; }
.list-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.list-row.inline .list-fields { flex-direction: row; flex-wrap: wrap; align-items: center; }
.list-row.inline .list-fields .input { flex: 1 1 160px; }
.list-fields .input, .list-fields .textarea { background: var(--panel); }
.list-fields .textarea { min-height: 38px; resize: vertical; }
.list-fields textarea.autosize { resize: none; overflow: hidden; }
.row-actions { display: flex; gap: 2px; flex: none; margin-top: 4px; }
.icon-btn { width: 28px; height: 28px; border-radius: 6px; border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 16px; line-height: 1; }
.icon-btn:hover:not(:disabled) { background: var(--panel-2); color: var(--text); }
.icon-btn.danger:hover { background: var(--red-soft); color: var(--red); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.add-btn { align-self: flex-start; border-style: dashed; background: transparent; color: var(--muted); }
.add-btn:hover { color: var(--text); }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; cursor: pointer; }
.check-inline input { accent-color: var(--accent); }
.detected { margin-top: 10px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-btn { border: 0; cursor: pointer; }
.chip-btn:hover { background: var(--accent); color: white; }
.textarea.tall-sm { min-height: 200px; }
.muted-note { color: var(--faint); font-size: 13px; margin: 0 0 12px; }

.row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.var-input { display: flex; flex-direction: column; gap: 4px; }
.var-input span { font-size: 12px; color: var(--muted); }

.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.template-card { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: border-color 0.15s, transform 0.15s; }
.template-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.template-card b { font-size: 15px; }
.template-card span { color: var(--muted); font-size: 13px; }
.agent-meta { font-size: 12px; color: var(--faint); }

.test-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.test-actions { margin: -4px 0 4px; }
.prompt-pre { white-space: pre-wrap; word-break: break-word; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; font-family: var(--mono); font-size: 12px; line-height: 1.55; color: var(--muted); max-height: 520px; overflow: auto; margin: 0; }
.prompt-meta { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--faint); margin-bottom: 8px; }
.prompt-meta b { color: var(--muted); font-weight: 500; }
.voice-test { position: sticky; top: 0; background: var(--bg-2); }
.voice-head { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; }
.voice-head h3 { margin: 0; font-size: 15px; }
.voice-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.voice-status { margin-top: 10px; min-height: 4px; }
.voice-test .transcript { max-height: 360px; min-height: 160px; }

.result-card { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 14px 16px; margin: 16px 0 6px; }
.result-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint); }
.result-card p { margin: 8px 0 0; }
.kv.compact { margin: 10px 0 0; grid-template-columns: 170px 1fr; font-size: 13px; }

@media (max-width: 860px) {
  .test-grid { grid-template-columns: 1fr; }
  .voice-test { position: static; }
  .voice-head { flex-direction: column; }
}


/* ---------- Gravações ---------- */
.play-cell { width: 44px; padding-right: 0; }
.play-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); cursor: pointer; font-size: 12px; display: inline-grid; place-items: center; transition: background 0.15s, border-color 0.15s, transform 0.1s; }
.play-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.play-btn:active { transform: scale(0.94); }
.play-btn.playing { background: var(--accent); border-color: var(--accent); color: white; }
.recording { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 12px 14px; margin: 16px 0 6px; }
.recording-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.recording audio { width: 100%; height: 36px; color-scheme: dark; }

/* ---------- Campanhas ---------- */
#campaign-list { display: flex; flex-direction: column; gap: 14px; }
.campaign-card { cursor: pointer; transition: border-color 0.15s; }
.campaign-card:hover { border-color: var(--line-2); }
.campaign-top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.campaign-top h3 { margin: 0 0 3px; font-size: 16px; }
.muted { color: var(--muted); font-size: 13px; }
.campaign-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.progress { height: 8px; background: var(--bg-2); border-radius: 8px; overflow: hidden; margin-top: 14px; border: 1px solid var(--line); }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--green)); border-radius: 8px; transition: width 0.4s; }
.progress-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--muted); }
.progress-meta b { color: var(--text); }
.alert.slim { padding: 9px 12px; margin: 12px 0 0; }
.campaign-toolbar { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.import-box { background: var(--bg-2); border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 16px; margin-top: 16px; }
.import-box h3 { margin: 0 0 4px; font-size: 15px; }
.import-box p { margin: 0 0 10px; }
.import-box code { background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; border: 2px dashed var(--line-2); border-radius: var(--radius); cursor: pointer; text-align: center; background: var(--panel); transition: border-color 0.15s, background 0.15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.has-file { border-color: var(--green); border-style: solid; }
.dz-icon { font-size: 26px; }
.paste-box { margin-top: 10px; }
.paste-box summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.import-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.contacts-table td { font-size: 13px; }
.row-live { background: var(--green-soft); }
.days { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.day { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; }
.day input { accent-color: var(--accent); }
.settings-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.empty-card .empty { padding: 50px 20px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1050px) {
  .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 10px 0 0; }
  .nav-item { width: auto; flex: none; }
  .brand-name, .nav-item span, .sidebar-foot .env-pill, .nav-badge { display: none; }
  .sidebar-foot { margin: 0 0 0 auto; flex-direction: row; }
  .main { padding: 20px 16px 50px; }
  .row { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
}
