/* ============================================
   FeedBackPro ME — Tema estilo Vuexy
   paleta 22atlas: navy #081340 · azul #1747e0/#4d70ff · gold #C9A227 (marca)
   ============================================ */

:root {
  /* Identidade nova: fundo quente, navy como base, gold só em detalhes */
  --primary: #1747e0;
  --primary-light: #4d70ff;
  --primary-hi: #4d70ff;
  --primary-dark: #0d2fa8;
  --navy: #081340;
  --navy-2: #0d1b52;
  --primary-tint: rgba(23, 71, 224, .10);
  --gold: #C9A227;
  --gold-light: #E0C060;
  --gold-tint: rgba(23, 71, 224, .12);
  --brand-gold-tint: rgba(201, 162, 39, .14);

  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-2: #f0ede6;
  --border: #e5e0d1;
  --text: #1b2447;
  --text-2: #555f7c;
  --text-3: #8a8fa0;

  --sidebar-bg: #081340;
  --sidebar-text: #c4cdea;
  --sidebar-muted: #7e8ab3;
  --sidebar-w: 260px;

  --success: #28c76f;
  --danger: #ea5455;
  --warning: #ff9f43;
  --info: #00cfe8;
  --success-tint: rgba(40, 199, 111, .16);
  --danger-tint: rgba(234, 84, 85, .16);
  --warning-tint: rgba(255, 159, 67, .18);
  --info-tint: rgba(0, 207, 232, .14);

  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 1px 3px rgba(24, 26, 44, .06);
  --shadow-lg: 0 8px 30px rgba(8, 19, 64, .16);
  --font: 'Public Sans', 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', 'Public Sans', Georgia, serif;
}

[data-theme="dark"] {
  --primary: #4d70ff;
  --primary-light: #7f9cf5;
  --primary-hi: #7f9cf5;
  --primary-dark: #2b50e0;
  --primary-tint: rgba(77, 112, 255, .18);
  --bg: #09090f;
  --surface: #111436;
  --surface-2: #1a2050;
  --border: #2a3468;
  --text: #e8ecfa;
  --text-2: #9aa4c8;
  --text-3: #6a76a8;
  --sidebar-bg: #0a0f28;
  --sidebar-text: #d6dbf0;
  --sidebar-muted: #6a76a8;
  --shadow: 0 .1875rem .75rem rgba(3, 6, 20, .5);
  --shadow-lg: 0 .25rem 1.125rem rgba(3, 6, 20, .65);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
section[id] { scroll-margin-top: 90px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }
img { max-width: 100%; }
h1, h2, h3, h4 { color: var(--text); font-weight: 600; letter-spacing: -.01em; }
a:focus-visible, button:focus-visible, .input:focus-visible, .select:focus-visible,
summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 9px 20px; border-radius: var(--radius); border: 1px solid transparent;
  font-family: var(--font); font-size: .92rem; font-weight: 600;
  cursor: pointer; transition: all .18s ease; text-decoration: none;
  background: var(--surface-2); color: var(--text); white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 1px 2px rgba(13, 47, 168, .3);
}
.btn-primary:hover { color: #fff; background: var(--primary-dark); }
.btn-gold {
  background: #fff; color: var(--primary);
  box-shadow: 0 .125rem .375rem rgba(10, 17, 40, .25);
}
.btn-gold:hover { color: var(--primary-dark); background: #f0f3ff; }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary-tint); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-outline { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn-sm { padding: 5px 14px; font-size: .82rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 24px;
}
.card + .card { margin-top: 18px; }
.card-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 2px; }
.card-subtitle { color: var(--text-2); font-size: .85rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }

/* ---------- Inputs ---------- */
.input, .select, textarea.input {
  width: 100%; padding: 9px 13px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-family: var(--font); font-size: .92rem;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, textarea.input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 71, 224, .13);
}
.input::placeholder { color: var(--text-3); }
label { display: block; font-size: .82rem; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.field { margin-bottom: 16px; }
.field .hint { font-size: .76rem; color: var(--text-2); margin-top: 4px; }
.field-error { border-color: var(--danger) !important; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: .9rem; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }

/* ---------- Badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 4px; font-size: .78rem; font-weight: 500;
}
.badge-success { background: var(--success-tint); color: var(--success); }
.badge-danger { background: var(--danger-tint); color: var(--danger); }
.badge-muted { background: var(--surface-2); color: var(--text-2); }
.badge-warning { background: var(--warning-tint); color: #d97b06; }

.alert { padding: 12px 16px; border-radius: 8px; font-size: .88rem; margin-bottom: 16px; }
.alert-warning { background: var(--warning-tint); color: #8a4b00; border: 1px solid rgba(217,123,6,.25); }
.alert-critical { background: rgba(234,84,85,.1); color: #a5272a; border: 1px solid rgba(234,84,85,.3); }
.alert-info { background: var(--primary-tint); color: var(--primary-dark); border: 1px solid rgba(23,71,224,.2); }
.alert .a-icon { margin-right: 8px; font-weight: 700; }

/* Deltas de comparação (premium) */
.delta { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 7px; border-radius: 20px; margin-top: 4px; }
.delta.up { background: var(--success-tint); color: #1a7a48; }
.delta.down { background: rgba(234,84,85,.12); color: #c53030; }
.delta.flat { background: var(--surface-2); color: var(--text-3); }

/* Nuvem de palavras */
.wordcloud { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; padding: 20px 8px; min-height: 90px; }
.wc-word { color: var(--primary); font-weight: 600; line-height: 1; cursor: default; transition: transform .15s; }
.wc-word:hover { transform: scale(1.15); color: var(--primary-dark); }
.wc-word:nth-child(3n) { color: var(--primary-light); }
.wc-word:nth-child(4n) { color: var(--text-3); font-weight: 500; }

/* Seletor de templates */
/* Pills/chips do gerador de IA (wizard + sugestões) */
.ai-pill { display:inline-flex; align-items:center; gap:4px; padding:4px 12px; border-radius:20px; border:1px solid var(--border); background:var(--surface); color:var(--text-2); font-size:.78rem; font-weight:500; cursor:pointer; transition:all .15s; user-select:none; }
.ai-pill:hover { border-color:var(--primary); color:var(--primary); }
.ai-pill input { display:none; }
.ai-pill.on { background:var(--primary); border-color:var(--primary); color:#fff; }
.ai-pill:active { transform:scale(.96); }
.ai-mode-btn { font-size:.76rem; padding:4px 14px; border-radius:20px; border:1px solid var(--border); background:var(--surface); color:var(--text-2); cursor:pointer; font-weight:600; transition:all .15s; }
.ai-mode-btn.active { background:var(--primary); border-color:var(--primary); color:#fff; }
.ai-lint { display:flex; align-items:flex-start; gap:6px; font-size:.8rem; padding:8px 10px; border-radius:8px; margin-top:8px; line-height:1.4; }
.ai-lint.error { background:var(--danger-tint); color:#a5272a; }
.ai-lint.warn { background:var(--warning-tint); color:#8a4b00; }
.ai-lint.ok { background:var(--success-tint); color:#1a7a48; }

.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tpl-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.tpl-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.tpl-card.locked { opacity: .55; }
.tpl-icon {
  width: 40px; height: 40px; border-radius: var(--radius); margin-bottom: 10px;
  background: var(--primary-tint); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.tpl-icon svg { width: 22px; height: 22px; }
.tpl-name { font-weight: 600; font-size: .95rem; }
.tpl-desc { font-size: .8rem; color: var(--text-2); margin-top: 4px; }

/* Card de análise IA */
.ai-card { background: linear-gradient(135deg, rgba(23,71,224,.06), rgba(77,112,255,.03)); border: 1px solid rgba(23,71,224,.18); }
.ai-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-top: 16px; }
.ai-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.ai-box h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin-bottom: 8px; }
.ai-box li { font-size: .87rem; padding: 3px 0 3px 16px; position: relative; }
.ai-box li::before { content: '•'; position: absolute; left: 4px; color: var(--primary); }
.ai-summary { font-size: .95rem; line-height: 1.65; }
.sent-badge { font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.sent-positive { background: var(--success-tint); color: #1a7a48; }
.sent-neutral { background: var(--warning-tint); color: #8a4b00; }
.sent-negative { background: rgba(234,84,85,.12); color: #c53030; }

/* Respostas abertas */
.search-row { display: flex; gap: 8px; margin-bottom: 14px; }
.search-row .input { flex: 1; }
.tr-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.tr-item:last-child { border-bottom: 0; }
.tr-q { font-size: .78rem; color: var(--primary); font-weight: 600; margin-bottom: 3px; }
.tr-a { font-size: .9rem; }
.tr-meta { font-size: .74rem; color: var(--text-3); margin-top: 4px; }
.badge-gold { background: var(--gold-tint); color: var(--primary); }
.badge-primary { background: var(--primary-tint); color: var(--primary); }

/* ---------- Layout do app ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid rgba(255, 255, 255, .06);
  color: var(--sidebar-text);
  display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 40;
  transition: transform .25s ease;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 22px; min-height: 64px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.sidebar-brand img { height: 30px; width: auto; }
.sidebar-brand .brand-text { font-size: 1.15rem; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.sidebar-brand .brand-text em { font-style: normal; color: var(--gold); }
.sidebar-nav { flex: 1; padding: 10px 14px; overflow-y: auto; }
.nav-section {
  font-size: .7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: var(--sidebar-muted);
  padding: 16px 12px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: var(--radius); margin-bottom: 2px;
  color: var(--sidebar-text); font-size: .92rem; font-weight: 400;
  transition: all .15s;
}
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; opacity: .8; }
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active {
  background: #fff; color: var(--navy); font-weight: 600;
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; width: 3px; height: 22px;
  border-radius: 0 3px 3px 0; background: var(--gold);
}
.nav-item { position: relative; }
.nav-item.active svg { opacity: 1; }
.sidebar-footer { padding: 10px 14px 16px; border-top: 1px solid rgba(255, 255, 255, .07); }

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  margin: 12px 24px 0; padding: 0 18px; height: 60px;
  border-radius: var(--radius-lg); border: 1px solid var(--border);
  position: sticky; top: 12px; z-index: 30;
}
.topbar .spacer { flex: 1; }
.breadcrumb { font-size: .86rem; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.breadcrumb b { color: var(--text); font-weight: 600; }
.topbar-search {
  display: flex; align-items: center; gap: 8px; color: var(--text-2);
  background: transparent; border: none; font-family: var(--font); font-size: .9rem;
}
.topbar-search input {
  border: none; background: transparent; outline: none; width: 200px;
  color: var(--text); font-size: .9rem; font-family: var(--font);
}
.topbar-search input::placeholder { color: var(--text-3); }
.hamburger { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 6px; }
.icon-btn {
  background: transparent; border: none;
  width: 38px; height: 38px; border-radius: var(--radius); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2); transition: all .15s; position: relative;
}
.icon-btn:hover { color: var(--primary); background: var(--surface-2); }
.icon-btn svg { width: 21px; height: 21px; }

.user-chip {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 4px; border-radius: var(--radius); border: none;
  background: transparent;
}
.user-chip .avatar, .avatar {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem; border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--primary-tint);
  overflow: hidden; flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-xl { width: 72px; height: 72px; font-size: 1.5rem; }
.avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.mt-sm { margin-top: 6px; }
.user-chip .uname { font-size: .86rem; font-weight: 600; color: var(--text); }
.user-chip .urole { font-size: .72rem; color: var(--text-2); display: block; font-weight: 400; }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 200px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 6px;
  display: none; z-index: 50;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: var(--radius); border: none; background: none;
  color: var(--text); font-size: .88rem; font-family: var(--font);
  cursor: pointer; text-align: left;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); color: var(--primary); }
.dropdown-menu .sep { height: 1px; background: var(--border); margin: 5px 8px; }
.dropdown-menu .flag { font-size: 1rem; }

.content { padding: 24px; max-width: 1400px; width: 100%; margin: 0 auto; }
.page-head { margin-bottom: 22px; }
.page-head.flex { display: flex; align-items: flex-start; }
.page-head h1 {
  font-family: var(--font-display); font-size: 1.65rem; font-weight: 600;
  color: var(--navy); letter-spacing: -.015em;
}
.page-head h1 .gold-dot { color: var(--gold); }
.page-head p { color: var(--text-2); font-size: .9rem; margin-top: 4px; }

/* ---------- Welcome / congrats card ---------- */
.welcome-card {
  background: var(--navy);
  color: #fff; border-radius: var(--radius-lg);
  padding: 26px 28px; position: relative; overflow: hidden;
  border: 1px solid rgba(201, 162, 39, .25);
  display: flex; flex-direction: column; justify-content: center;
}
.welcome-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--gold);
}
.welcome-card h2 { color: #fff; font-size: 1.35rem; font-weight: 600; position: relative; z-index: 1; font-family: var(--font-display); }
.welcome-card p { color: rgba(255, 255, 255, .82); font-size: .9rem; margin: 6px 0 16px; position: relative; z-index: 1; max-width: 420px; }
.welcome-card .btn { position: relative; z-index: 1; align-self: flex-start; }
.welcome-card .w-num { font-size: 1.9rem; font-weight: 700; color: var(--gold-light); position: relative; z-index: 1; }

/* ---------- Stats cards ---------- */
/* Dashboard — cabeçalho compacto + filtros + uso */
.dash-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; flex-wrap:wrap; }
.dash-title { font-size:1.5rem; font-weight:700; color:var(--navy, #0f2a5c); font-family:var(--font-display); margin:0 0 2px; }
.dash-head .btn { flex-shrink:0; }
.dash-filters { display:flex; align-items:center; gap:18px; padding:12px 18px; margin-bottom:20px; flex-wrap:wrap; }
.df-item { display:flex; align-items:center; gap:8px; }
.df-label { font-size:.82rem; color:var(--text-2); font-weight:500; white-space:nowrap; }
.df-item .select { width:auto; min-width:190px; }
.kpi-info { display:inline-flex; align-items:center; justify-content:center; width:14px; height:14px; border-radius:50%; background:var(--surface-2); color:var(--text-3); font-size:.62rem; font-weight:700; cursor:help; vertical-align:2px; }
.kpi-info:focus-visible { outline:2px solid var(--primary); }
.chart-empty { padding:36px 16px; text-align:center; color:var(--text-3); font-size:.88rem; }
.usage-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.usage-item .usage-top { display:flex; justify-content:space-between; gap:10px; color:var(--text-2); }
@media (max-width:640px) { .usage-grid { grid-template-columns:1fr; } .df-item .select { min-width:0; flex:1; } }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-bottom: 20px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  display: flex; align-items: center; gap: 14px;
}
.stat-icon {
  width: 44px; height: 44px; border-radius: var(--radius); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.stat-icon svg { width: 24px; height: 24px; }
.stat-icon.blue { background: var(--primary-tint); color: var(--primary); }
.stat-icon.gold { background: var(--gold-tint); color: var(--primary); }
.stat-icon.green { background: var(--success-tint); color: var(--success); }
.stat-icon.red { background: var(--danger-tint); color: var(--danger); }
.stat-icon.cyan { background: var(--info-tint); color: var(--info); }
.stat-icon.orange { background: var(--warning-tint); color: var(--warning); }
.stat-value { font-size: 1.45rem; font-weight: 600; line-height: 1.2; }
.stat-label { font-size: .8rem; color: var(--text-2); font-weight: 500; }
.stat-sub { font-size: .72rem; color: var(--text-3); }

/* Mini stat com progresso (Vuexy style) */
.mini-stat {
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 18px 20px;
}
.mini-stat .ms-label { font-size: .82rem; color: var(--text-2); font-weight: 500; }
.mini-stat .ms-value { font-size: 1.4rem; font-weight: 600; margin: 2px 0 8px; }
.progress {
  height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden;
}
.progress .fill { height: 100%; border-radius: 6px; background: var(--primary); transition: width .5s; }
.progress .fill.gold { background: var(--primary-light); }
.progress .fill.green { background: var(--success); }
.progress .fill.red { background: var(--danger); }
.progress .fill.cyan { background: var(--info); }
.ms-sub { font-size: .74rem; color: var(--text-3); margin-top: 6px; }

/* NPS breakdown bar segmentada */
.nps-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; gap: 3px; margin: 12px 0 8px; }
.nps-bar > div { border-radius: 3px; }
.nps-bar .seg-p { background: var(--success); }
.nps-bar .seg-n { background: var(--warning); }
.nps-bar .seg-d { background: var(--danger); }
.nps-legend { display: flex; gap: 16px; font-size: .76rem; color: var(--text-2); flex-wrap: wrap; }
.nps-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }

.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.grid-2eq { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-23 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
@media (max-width: 980px) { .grid-2, .grid-2eq, .grid-23 { grid-template-columns: 1fr; } }

/* ---------- Listas (earning-reports style) ---------- */
.lr-item {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.lr-item:last-child { border-bottom: none; }
.lr-icon {
  width: 38px; height: 38px; border-radius: var(--radius); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--primary);
}
.lr-icon svg { width: 19px; height: 19px; }
.lr-main { flex: 1; min-width: 0; }
.lr-title { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-sub { font-size: .76rem; color: var(--text-2); }
.lr-value { font-size: .9rem; font-weight: 600; text-align: right; }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th {
  text-align: left; padding: 11px 12px; font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
.tbl td { padding: 13px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background .12s; }
.tbl tr:hover td { background: var(--surface-2); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(8, 19, 64, .45);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 720px;
  max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 1.05rem; }
.modal-x { border: none; background: none; font-size: 1.4rem; color: var(--text-3); cursor: pointer; line-height: 1; }
.modal-body { padding: 20px 24px; overflow-y: auto; }
.modal-foot { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.modal .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.modal .form-grid .span2 { grid-column: 1 / -1; }
.flag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.flag-item { display: flex; align-items: center; gap: 8px; font-size: .86rem; }
.flag-item input { width: 16px; height: 16px; accent-color: var(--primary); }
.i18n-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 720px) { .i18n-cols { grid-template-columns: 1fr; } }

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--primary-dark) 55%, var(--primary) 100%);
  padding: 24px; position: relative; overflow: hidden;
}
.auth-wrap::before {
  content: ''; position: absolute; width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 124, 224, .28), transparent 65%);
  top: -180px; right: -140px;
}
.auth-wrap::after {
  content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 39, .14), transparent 65%);
  bottom: -160px; left: -120px;
}
.auth-card {
  width: 100%; max-width: 430px; background: var(--surface);
  border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow-lg);
  position: relative; z-index: 2;
}
.auth-card.wide { max-width: 560px; }
.auth-logo { text-align: center; margin-bottom: 22px; }
.auth-logo img { height: 48px; }
.auth-card h1 { font-size: 1.3rem; font-weight: 600; text-align: center; }
.auth-card .sub { color: var(--text-2); text-align: center; font-size: .88rem; margin: 6px 0 22px; }

/* Seletor de plano no registro */
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.plan-pick {
  border: 1.5px solid var(--border); border-radius: 10px; padding: 12px 8px 10px;
  cursor: pointer; background: var(--surface); text-align: center; position: relative;
  transition: border-color .15s, box-shadow .15s;
}
.plan-pick:hover { border-color: var(--gold); }
.plan-pick.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-tint); }
.plan-pick .pp-badge {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; font-size: .6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; padding: 2px 9px;
  border-radius: 10px; white-space: nowrap;
}
.plan-pick .pp-name { font-weight: 700; font-size: .82rem; }
.plan-pick .pp-price { font-size: 1.02rem; font-weight: 800; margin-top: 4px; }
.plan-pick .pp-price small { font-size: .66rem; font-weight: 500; color: var(--text-3); }
.plan-pick .pp-limits { font-size: .68rem; color: var(--text-3); margin-top: 5px; line-height: 1.4; }
.cycle-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.cycle-toggle button {
  border: none; background: transparent; padding: 4px 11px; font-size: .74rem;
  font-weight: 600; cursor: pointer; color: var(--text-3); font-family: inherit;
}
.cycle-toggle button.active { background: var(--primary); color: #fff; }
@media (max-width: 480px) {
  .plan-grid { grid-template-columns: 1fr; }
  .plan-pick { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 14px; }
  .plan-pick .pp-badge { left: auto; right: 10px; transform: none; top: -9px; }
  .plan-pick .pp-price { margin-top: 0; }
  .plan-pick .pp-limits { margin-top: 0; margin-left: auto; text-align: right; }
}
.auth-links { text-align: center; margin-top: 18px; font-size: .88rem; color: var(--text-2); }
.lang-row { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.lang-btn {
  border: 1px solid var(--border); background: var(--surface-2);
  border-radius: var(--radius); padding: 4px 10px; font-size: .78rem; font-weight: 600;
  cursor: pointer; color: var(--text-2); transition: all .15s;
}
.lang-btn:hover, .lang-btn.active { border-color: var(--primary); color: var(--primary); }

/* ---------- Form builder ---------- */
.question-item {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; margin-bottom: 12px;
}
.question-item .q-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.question-item .q-num { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; border-radius: 8px; background: var(--primary); color: #fff; font-size: .8rem; font-weight: 700; flex-shrink: 0; }
.question-item .q-head .input { flex: 1; background: var(--surface); }
.q-actions { display: flex; gap: 6px; }
.q-meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.q-meta .field { margin-bottom: 0; }
.q-meta .input { background: var(--surface); }
.drag-handle { cursor: grab; color: var(--text-3); padding: 4px; font-size: 1.05rem; user-select: none; touch-action: none; display: inline-flex; align-items: center; }
.drag-handle:active { cursor: grabbing; }
.question-item.dragging { opacity: .45; }
.question-item.drag-over { border-color: var(--accent); box-shadow: 0 -3px 0 0 var(--accent); }

/* ---------- Público (form do respondente) ---------- */
.public-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; padding: 40px 18px;
  background: linear-gradient(160deg, var(--navy) 0%, var(--primary-dark) 60%, var(--primary) 115%);
}
.public-card {
  width: 100%; background: var(--surface); border-radius: var(--radius-lg);
  padding: 34px; box-shadow: var(--shadow-lg);
}
.public-brand { text-align: center; margin-bottom: 20px; }
.public-brand img { height: 42px; }
.progress-bar {
  height: 6px; background: var(--surface-2); border-radius: 6px;
  overflow: hidden; margin: 14px 0 24px;
}
.progress-bar .fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); transition: width .3s; }
.scale-row { display: flex; gap: 8px; flex-wrap: wrap; }
.scale-btn {
  min-width: 44px; height: 44px; border-radius: var(--radius); font-weight: 600;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; transition: all .15s; font-size: .95rem; padding: 0 12px;
}
.scale-btn:hover { border-color: var(--primary); color: var(--primary); }
.scale-btn.selected {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.option-row { display: flex; flex-direction: column; gap: 9px; }
.option-pill {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--border); border-radius: var(--radius); padding: 11px 14px;
  cursor: pointer; transition: all .15s; font-size: .94rem;
}
.option-pill:hover { border-color: var(--primary); }
.option-pill.selected { border-color: var(--primary); background: var(--primary-tint); }
.option-pill input { accent-color: var(--primary); width: 17px; height: 17px; }
.powered { text-align: center; color: rgba(255, 255, 255, .55); font-size: .78rem; margin-top: 20px; }
.powered a { color: #9db4f5; }

/* ---------- Estilos do form público (form_style do dono) ---------- */
/* Cabeçalho fixo: marca + capa + barra de progresso acompanham o scroll */
.public-card { --pf-head-bg: var(--surface); }
.pf-head {
  position: sticky; top: 0; z-index: 6;
  background: var(--pf-head-bg);
  margin: -34px -34px 4px; padding: 20px 34px 10px;
  border-top-left-radius: inherit; border-top-right-radius: inherit;
  box-shadow: 0 10px 16px -14px rgba(15, 23, 42, .28);
}

.public-card.pf-flat { box-shadow: none; border: 1px solid var(--border); }
.public-card.pf-rounded { border-radius: 28px; }
.public-card.pf-bordered { border: 2px solid var(--primary); }
.public-card.pf-glass {
  background: rgba(255, 255, 255, .74); border: 1px solid rgba(255, 255, 255, .55);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  --pf-head-bg: rgba(255, 255, 255, .72);
}
.public-card.pf-glass .pf-head {
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.public-card.pf-gradient {
  background: linear-gradient(165deg, var(--primary-tint) 0%, var(--surface) 55%);
}
.public-card.pf-neumorphism {
  background: var(--surface-2); border: none;
  box-shadow: 14px 14px 28px rgba(15, 23, 42, .30), -6px -6px 14px rgba(255, 255, 255, .35);
  --pf-head-bg: var(--surface-2);
}
.public-card.pf-elevated {
  box-shadow: 0 34px 60px -18px rgba(10, 18, 40, .45); border-radius: 20px;
}
.public-card.pf-outline {
  color-scheme: dark; color: #f3f6fb;
  background: rgba(255, 255, 255, .07); border: 1.5px solid rgba(255, 255, 255, .55);
  box-shadow: none;
  --surface: rgba(255, 255, 255, .10); --surface-2: rgba(255, 255, 255, .16);
  --text: #f3f6fb; --text-2: rgba(230, 238, 250, .78); --border: rgba(255, 255, 255, .38);
  --pf-head-bg: rgba(17, 24, 39, .55);
}
.public-card.pf-outline .pf-head {
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.public-card.pf-dark {
  color-scheme: dark; color: #eef2f8;
  background: #1a2332; border: 1px solid #2c3a52;
  --surface: #1a2332; --surface-2: #222e42; --text: #eef2f8;
  --text-2: #a6b3c8; --border: #33415a; --pf-head-bg: #1a2332;
}
@media (max-width: 640px) {
  .public-card { padding: 22px; }
  .public-card .pf-head { margin: -22px -22px 4px; padding: 14px 22px 8px; }
}

/* ---------- Toast ---------- */
.toast-area { position: fixed; top: 18px; right: 18px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg); padding: 13px 18px; box-shadow: var(--shadow-lg);
  font-size: .88rem; min-width: 260px; animation: slideIn .25s ease; color: var(--text);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Landing ---------- */
.site-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 6%; background: rgba(255, 255, 255, .75); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.site-nav .brand { display: inline-flex; align-items: center; }
.site-nav .brand img { height: 57px; width: auto; display: block; }
.site-nav .links { display: flex; gap: 10px; align-items: center; }
.site-nav .links a { color: var(--text-2); font-size: .9rem; font-weight: 500; padding: 8px 14px; }
.site-nav .links a:hover { color: var(--primary); }
.site-nav .links a.btn { color: #fff; padding: 9px 20px; }
.site-nav .links a.btn:hover { color: #fff; }
.hero {
  background: linear-gradient(180deg, #e6ebf8 0%, var(--bg) 78%);
  color: var(--navy); padding: 80px 6% 90px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(circle, rgba(23, 71, 224, .10), transparent 65%);
  top: -260px; right: -140px;
}
.hero-inner {
  max-width: 1200px; margin: 0 auto; position: relative;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}
.hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: 30px;
  background: var(--primary-tint); border: 1px solid rgba(23, 71, 224, .25);
  color: var(--primary); font-size: .8rem; font-weight: 700; margin-bottom: 22px;
}
.hero h1 { font-size: 3rem; font-weight: 800; line-height: 1.12; margin: 0 0 18px; color: var(--navy); letter-spacing: -.02em; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--primary), var(--primary-light)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--text-2); font-size: 1.08rem; max-width: 520px; margin: 0 0 30px; }
.hero .cta { display: flex; gap: 14px; }
.hero-stats { display: flex; gap: 48px; margin-top: 44px; }
.hero-stats > div { display: flex; flex-direction: column; }
.hero-stats b { font-size: 2rem; color: var(--navy); }
.hero-stats span { font-size: .82rem; color: var(--text-3); margin-top: 2px; }

/* ── Mockup do dashboard no hero ──────────────────── */
.hero-preview { position: relative; }
.pv-blob {
  position: absolute; inset: 8% -6% -6% 14%; border-radius: 32px;
  background: linear-gradient(135deg, rgba(23,71,224,.16), rgba(77,112,255,.05));
  transform: rotate(4deg); z-index: 0;
}
.preview-card {
  position: relative; z-index: 1;
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 22px; box-shadow: 0 24px 60px rgba(8, 19, 64, .14);
}
.pv-head { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .92rem; color: var(--navy); padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.pv-head img { height: 26px; }
.pv-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.pv-kpi { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.pv-kpi span { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .06em; color: var(--text-3); text-transform: uppercase; }
.pv-kpi b { font-size: 1.45rem; color: var(--navy); }
.pv-chart { display: flex; align-items: flex-end; gap: 6px; height: 110px; padding: 10px 4px 0; }
.pv-chart i { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--primary-light), var(--primary)); opacity: .9; }
.pv-chart i:nth-child(odd) { opacity: .55; }
.pv-foot { margin-top: 12px; font-size: .78rem; color: var(--text-3); text-align: right; }
@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero h1 { font-size: 2.2rem; }
  .hero-preview { max-width: 480px; }
}

/* ── Seções genéricas ─────────────────────────────── */
.section { padding: 80px 6%; max-width: 1200px; margin: 0 auto; }
.section-alt { max-width: none; background: var(--surface); }
.section-alt > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: 1.9rem; font-weight: 700; margin: 12px 0 10px; }
.section-head p { color: var(--text-2); font-size: .95rem; }
.section-tag { display: inline-block; background: var(--primary-tint); color: var(--primary); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 6px 14px; border-radius: 20px; }

/* ── Problemas ────────────────────────────────────── */
.problem-card { border-left: 3px solid #eb4d4d; }
.problem-sol { margin-top: 14px; display: flex; align-items: center; gap: 8px; color: var(--primary); font-size: .85rem; font-weight: 600; }

/* ── Como funciona ────────────────────────────────── */
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; max-width: 1100px; margin: 0 auto; }
.step-card { text-align: center; padding: 36px 24px; }
.step-num { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-hi)); color: #fff; font-size: 1.4rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; box-shadow: 0 8px 20px rgba(23,71,224,.25); }
.step-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.step-card p { font-size: .88rem; color: var(--text-2); line-height: 1.55; }

/* ── Planos / billing ─────────────────────────────── */
.billing-toggle { display: flex; justify-content: center; gap: 0; margin: 0 auto 36px; width: fit-content; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.billing-toggle button { border: none; background: transparent; padding: 10px 22px; font: inherit; font-size: .88rem; font-weight: 600; color: var(--text-2); cursor: pointer; }
.billing-toggle button.active { background: var(--primary); color: #fff; }
.popular-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--primary), var(--primary-hi)); color: #fff; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 5px 16px; border-radius: 20px; white-space: nowrap; }
.price-card.featured { border-color: var(--primary); border-width: 2px; box-shadow: 0 12px 32px rgba(23,71,224,.2); }
.price-card { position: relative; }

/* ── FAQ ──────────────────────────────────────────── */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.faq-item h4 { font-size: .95rem; font-weight: 600; margin-bottom: 8px; }
.faq-item p { font-size: .87rem; color: var(--text-2); line-height: 1.55; }

/* ── CTA banner / footer ──────────────────────────── */
.cta-banner { background: linear-gradient(135deg, var(--navy) 0%, var(--primary-dark) 55%, var(--primary) 100%); border-radius: 20px; text-align: center; padding: 60px 30px; color: #fff; }
.cta-banner h2 { font-size: 1.9rem; font-weight: 700; margin-bottom: 10px; color: #fff; }
.cta-banner p { color: rgba(255,255,255,.85); }
.site-footer { background: var(--navy); color: rgba(220,228,248,.75); padding: 34px 6% 20px; }
.footer-inner { max-width: 1200px; margin: 0 auto 18px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.site-footer .footer-logo { background: #fff; border-radius: 8px; padding: 6px 14px; display: inline-flex; }
.site-footer .footer-logo img { height: 30px; display: block; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: rgba(220,228,248,.75); font-size: .88rem; }
.footer-links a:hover { color: #fff; }
.footer-copy { max-width: 1200px; margin: 0 auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px; font-size: .8rem; color: rgba(220,228,248,.5); }
@media (max-width: 780px) { .steps-grid, .faq-grid { grid-template-columns: 1fr; } .hero-stats { gap: 24px; } }

.features { padding: 70px 6%; background: var(--bg); }
.features h2 { text-align: center; font-size: 1.8rem; margin-bottom: 40px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; max-width: 1100px; margin: 0 auto; }
.feature-card { background: var(--surface); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); }
.feature-card .f-icon {
  width: 46px; height: 46px; border-radius: var(--radius); margin-bottom: 16px;
  background: var(--primary-tint); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-2); font-size: .9rem; }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; max-width: 1000px; margin: 0 auto; }
.price-card { background: var(--surface); border-radius: var(--radius-lg); padding: 30px; position: relative; box-shadow: var(--shadow); border: 1px solid transparent; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--primary); box-shadow: 0 .25rem 1.5rem rgba(23, 71, 224, .18); }
.price-card .plan-name { font-size: 1.15rem; font-weight: 700; }
.price-card .price { font-size: 2.2rem; font-weight: 700; margin: 14px 0; }
.price-card .price small { font-size: .9rem; color: var(--text-2); font-weight: 400; }
.price-card ul { list-style: none; margin: 18px 0 24px; flex: 1; }
.price-card .btn-block { margin-top: auto; }
.price-card ul li { padding: 7px 0; font-size: .9rem; color: var(--text-2); display: flex; gap: 9px; align-items: center; }
.price-card ul li::before { content: '✓'; color: var(--success); font-weight: 700; }
.price-card ul li.no { color: var(--text-3); }
.price-card ul li.no::before { content: '✕'; color: var(--danger); }
.billing-toggle { display: flex; justify-content: center; gap: 10px; margin-bottom: 34px; }
.billing-toggle button { padding: 9px 22px; border-radius: 30px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; cursor: pointer; color: var(--text-2); }
.billing-toggle button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Misc ---------- */
.empty { text-align: center; padding: 56px 20px; color: var(--text-2); }
.empty svg { width: 56px; height: 56px; color: var(--text-3); margin-bottom: 14px; }
.spinner {
  width: 22px; height: 22px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.flex { display: flex; align-items: center; }
.gap { gap: 10px; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.right { margin-left: auto; }
.muted { color: var(--text-2); }
.small { font-size: .82rem; }
.text-center { text-align: center; }

/* ---------- Responsivo ---------- */
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .hamburger { display: block; }
  .content { padding: 16px; }
  .topbar { margin: 10px 12px 0; }
  .user-chip .uname { display: none; }
  .breadcrumb { font-size: .8rem; }
  .hero h1 { font-size: 2rem; }
  .auth-card { padding: 26px; }
  .topbar-search input { width: 110px; }
  .site-nav .links a[href*="#"] { display: none; }
}
.sidebar-overlay { display: none; }
@media (max-width: 860px) {
  .sidebar-overlay.show {
    display: block; position: fixed; inset: 0;
    background: rgba(0, 0, 0, .45); z-index: 35;
  }
}

/* ---------- Admin: navegação em seções ---------- */
.adm-tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 5px; margin-bottom: 22px;
}
.adm-tab {
  border: none; background: transparent; cursor: pointer;
  padding: 8px 16px; border-radius: var(--radius);
  font-family: var(--font); font-size: .88rem; font-weight: 500;
  color: var(--text-2); display: inline-flex; align-items: center; gap: 8px;
  transition: all .15s;
}
.adm-tab svg { width: 17px; height: 17px; opacity: .8; }
.adm-tab:hover { color: var(--navy); background: var(--surface-2); }
.adm-tab.active { background: var(--navy); color: #fff; font-weight: 600; }
.adm-tab .adm-count {
  background: var(--brand-gold-tint); color: #8a6d12;
  font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 10px;
}
.adm-tab.active .adm-count { background: rgba(255,255,255,.18); color: #fff; }
.admin-section { display: none; }
.admin-section.active { display: block; }
@media (max-width: 640px) {
  .adm-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .adm-tab { white-space: nowrap; flex-shrink: 0; }
}

/* Ticket: detalhe */
.ticket-msg { white-space: pre-wrap; background: var(--surface-2); border-radius: var(--radius); padding: 14px; font-size: .9rem; margin-bottom: 14px; }
.ticket-meta { font-size: .8rem; color: var(--text-3); margin-bottom: 10px; }

/* Linha de etapas (visão geral vazia / onboarding) */
.steps-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.step-item { display: flex; gap: 12px; align-items: flex-start; }
.step-num {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand-gold-tint); color: #8a6d12;
  font-size: .8rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.step-item .st-t { font-size: .88rem; font-weight: 600; }
.step-item .st-d { font-size: .78rem; color: var(--text-2); }
@media (max-width: 720px) { .steps-strip { grid-template-columns: 1fr; } }

[data-theme="dark"] .page-head h1 { color: var(--text); }
[data-theme="dark"] .adm-tab:hover { color: var(--text); }
[data-theme="dark"] .adm-tab.active { background: var(--surface-2); color: var(--text); }
[data-theme="dark"] .nav-item.active { background: var(--surface-2); color: var(--text); }

/* ---------- Popup proativo de insights (premium) ---------- */
.ai-pop {
  position: fixed; bottom: 24px; left: 24px; z-index: 900;
  width: min(370px, calc(100vw - 32px));
  transform: translateY(130%); opacity: 0; pointer-events: none;
  transition: transform .5s cubic-bezier(.34,1.56,.64,1), opacity .4s;
}
.ai-pop.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.ai-pop-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.ai-pop-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--border);
}
.ai-pop-icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center; color: #fff;
  animation: aiPopGlow 2s ease-in-out infinite alternate;
}
.ai-pop-icon svg { width: 18px; height: 18px; }
@keyframes aiPopGlow { to { box-shadow: 0 0 0 6px var(--primary-tint); } }
.ai-pop-title { font-size: .85rem; font-weight: 700; color: var(--text); }
.ai-pop-src { font-size: .7rem; color: var(--text-3); margin-top: 1px; }
.ai-pop-x {
  margin-left: auto; background: none; border: none; font-size: 20px;
  color: var(--text-3); cursor: pointer; line-height: 1; padding: 2px 6px; border-radius: 6px;
}
.ai-pop-x:hover { color: var(--text); background: var(--surface-2); }
.ai-pop-body { padding: 14px 16px 2px; font-size: .88rem; line-height: 1.6; color: var(--text-2); }
.ai-pop-body strong { color: var(--text); }
.ai-pop-tags { padding: 0 16px 10px; }
.ai-pop-tag {
  display: inline-block; font-size: .72rem; font-weight: 600;
  padding: 3px 10px; border-radius: 20px; margin-top: 8px;
}
.ai-pop-tag.positive { background: rgba(40,199,111,.15); color: #1f9d57; }
.ai-pop-tag.negative { background: rgba(234,84,85,.13); color: #d84040; }
.ai-pop-tag.neutral { background: rgba(255,159,67,.18); color: #d97b1c; }
.ai-pop-tag.insight { background: var(--primary-tint); color: var(--primary); }
.ai-pop-tag.ai { background: linear-gradient(135deg, var(--primary-tint), var(--brand-gold-tint, rgba(184,149,60,.15))); color: var(--navy); }
.ai-pop-foot { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 12px; }
.ai-pop-dots { display: flex; gap: 5px; }
.ai-pop-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); transition: all .3s; }
.ai-pop-dot.active { background: var(--primary); width: 16px; border-radius: 3px; }
.ai-pop-nav { display: flex; gap: 6px; }
.ai-pop-nav button {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text-2); cursor: pointer; font-size: 15px; line-height: 1;
}
.ai-pop-nav button:hover { background: var(--surface-2); color: var(--text); }
@media (max-width: 640px) { .ai-pop { left: 16px; right: 16px; bottom: 16px; width: auto; } }
