/* =============================================
   ZAPVENDA PRO — CSS COMPLETO v2.0
   ============================================= */

:root {
  --primary:       #075E54;
  --primary-light: #128C7E;
  --primary-dark:  #054740;
  --accent:        #25D366;
  --accent-light:  #dcf8c6;
  --accent-dark:   #1DA851;
  --gold:          #FFB800;
  --gold-light:    #FFF3CC;
  --danger:        #FF4757;
  --ai-grad:       linear-gradient(135deg, #667eea 0%, #764ba2 100%);

  --bg:        #F0F2F5;
  --bg-card:   #FFFFFF;
  --text-main: #111B21;
  --text-sec:  #667781;
  --text-lt:   #8696A0;
  --border:    #E9EDEF;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);

  --header-h: 60px;
  --nav-h:    64px;
  --max-w:    480px;
}

/* ── RESET ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }

body {
  font-family: 'Inter', sans-serif;
  background: #0d1b2a;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hidden { display: none !important; }

/* ══════════════════════════════════════════════
   TELA DE ACESSO BLOQUEADO
══════════════════════════════════════════════ */
.blocked-wrapper {
  position: fixed; inset: 0;
  background: linear-gradient(160deg, #0d1b2a 0%, #075E54 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 800; padding: 20px;
  overflow-y: auto;
}
.blocked-card {
  background: #fff;
  border-radius: 24px;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  overflow: hidden;
  animation: slideUp .4s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.blocked-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 36px 28px 28px;
  text-align: center;
  color: #fff;
}
.blocked-lock-icon {
  width: 72px; height: 72px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: #fff;
  margin: 0 auto 18px;
  border: 3px solid rgba(255,255,255,.3);
}
.blocked-header h2 {
  font-size: 22px; font-weight: 800; margin-bottom: 6px;
}
.blocked-header p {
  font-size: 15px; opacity: .85;
}

.blocked-body {
  padding: 24px 26px 28px;
}

.blocked-reason {
  background: #fffbeb;
  border: 1.5px solid #fbbf24;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px; color: #78350f;
  line-height: 1.5;
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 22px;
}
.blocked-reason i { font-size: 16px; margin-top: 2px; flex-shrink: 0; }

.blocked-features {
  margin-bottom: 24px;
}
.blocked-features h3 {
  font-size: 14px; font-weight: 700; color: var(--primary);
  margin-bottom: 12px;
}
.blocked-features ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.blocked-features li {
  font-size: 13px; color: #374151;
  display: flex; align-items: center; gap: 10px;
}
.blocked-features li i {
  width: 20px; height: 20px;
  background: var(--accent-light); color: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; flex-shrink: 0;
}

.btn-comprar {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #FFB800, #f59e0b);
  color: #000; font-weight: 800; font-size: 16px;
  text-decoration: none;
  border-radius: 14px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(255,184,0,.4);
  transition: transform .15s, box-shadow .15s;
  font-family: 'Inter', sans-serif;
}
.btn-comprar:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,184,0,.5);
}
.btn-comprar i { font-size: 18px; }

.blocked-email-info {
  text-align: center; font-size: 12px; color: #9ca3af;
  margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

.btn-blocked-logout {
  width: 100%; padding: 12px;
  background: #f3f4f6; color: #4b5563;
  border: none; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: 'Inter', sans-serif;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s;
}
.btn-blocked-logout:hover { background: #e5e7eb; }

/* ── SPLASH ───────────────────────────────────── */
#splash-screen {
  position: fixed; inset: 0;
  background: linear-gradient(145deg, var(--primary-dark), var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; transition: opacity .5s ease;
}
.splash-content { text-align: center; color: #fff; }
.splash-icon {
  width: 96px; height: 96px; border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 52px; margin: 0 auto 20px;
  animation: pulse 1.5s ease-in-out infinite;
}
.splash-title { font-size: 34px; font-weight: 800; margin-bottom: 8px; }
.splash-title span { color: var(--accent); }
.splash-subtitle { font-size: 16px; opacity: .8; margin-bottom: 40px; }
.splash-loader { width: 200px; height: 4px; background: rgba(255,255,255,.2); border-radius: 2px; margin: 0 auto; overflow: hidden; }
.loader-bar { width: 0; height: 100%; background: var(--accent); border-radius: 2px; animation: loading 2.2s ease forwards; }

@keyframes loading { 0%{width:0} 60%{width:70%} 100%{width:100%} }
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.08)} }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
@keyframes slideUp { from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1} }

/* ── AUTH ─────────────────────────────────────── */
.auth-wrapper {
  width: 100%; max-width: var(--max-w);
  height: 100vh; height: 100dvh;
  overflow-y: auto;
  background: linear-gradient(160deg, var(--primary-dark) 0%, #0d1b2a 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.auth-card {
  background: #fff;
  border-radius: 24px;
  padding: 28px 24px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: slideUp .4s ease;
}
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 26px; font-weight: 800; color: var(--primary);
  margin-bottom: 8px;
}
.auth-logo i { font-size: 36px; color: var(--accent); }
.auth-logo strong { color: var(--accent); }
.auth-subtitle { font-size: 13px; color: var(--text-sec); }

.auth-tabs {
  display: flex; background: var(--bg);
  border-radius: var(--radius-md); padding: 4px;
  margin-bottom: 20px;
}
.auth-tab {
  flex: 1; padding: 10px; border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  background: transparent; color: var(--text-sec); transition: all .2s;
}
.auth-tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }

.auth-form { display: flex; flex-direction: column; gap: 0; }

.input-pwd { position: relative; display: flex; align-items: center; }
.input-pwd input { flex: 1; padding-right: 44px; }
.btn-eye {
  position: absolute; right: 12px; background: none; border: none;
  color: var(--text-lt); cursor: pointer; font-size: 16px; padding: 0;
}
.btn-forgot {
  background: none; border: none; color: var(--primary-light);
  font-size: 13px; cursor: pointer; text-align: right;
  margin-bottom: 16px; font-family: 'Inter', sans-serif;
}

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0; color: var(--text-lt); font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; border: 2px solid var(--border);
  padding: 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .2s; color: var(--text-main);
}
.btn-google img { width: 20px; height: 20px; }
.btn-google:hover { background: var(--bg); border-color: #ccc; }

.auth-hotmart-note {
  text-align: center; font-size: 12px; color: var(--text-lt);
  margin-top: 20px; display: flex; align-items: center;
  justify-content: center; gap: 6px;
}
.auth-hotmart-note i { color: var(--accent); }

/* ── APP WRAPPER ──────────────────────────────── */
.app-wrapper {
  width: 100%; max-width: var(--max-w);
  height: 100vh; height: 100dvh;
  background: var(--bg);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(0,0,0,0.5);
}

/* ── HEADER ───────────────────────────────────── */
.app-header {
  height: var(--header-h); flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.header-left { display: flex; align-items: center; gap: 10px; }
.header-logo { display: flex; align-items: center; gap: 8px; color: #fff; }
.header-logo i { font-size: 28px; color: var(--accent); }
.header-logo span { font-size: 18px; font-weight: 600; color: #fff; }
.header-logo strong { font-weight: 800; color: var(--accent); }
.header-title { color: #fff; font-size: 17px; font-weight: 600; }
.header-right { display: flex; gap: 4px; }
.btn-menu, .btn-icon {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.9); width: 40px; height: 40px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 18px; position: relative; transition: background .2s;
}
.btn-menu:hover, .btn-icon:hover { background: rgba(255,255,255,.15); }

/* ── MAIN & SECTIONS ──────────────────────────── */
.app-main { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.section {
  display: none; padding: 16px;
  min-height: calc(100vh - var(--header-h) - var(--nav-h));
  animation: fadeIn .25s ease;
}
.section.active { display: block; }

/* ── HOME ─────────────────────────────────────── */
.home-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px; color: #fff;
}
.hero-text h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.hero-text p { font-size: 14px; opacity: .85; margin-bottom: 16px; }
.hero-stats { display: flex; gap: 12px; }
.stat-card {
  flex: 1; background: rgba(255,255,255,.15);
  border-radius: var(--radius-md); padding: 12px 8px; text-align: center;
}
.stat-num { display: block; font-size: 24px; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 11px; opacity: .8; }

.section-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title-row h3 { font-size: 16px; font-weight: 700; }

.badge-premium {
  background: linear-gradient(135deg, #f093fb, #f5a623);
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 20px; display: flex; align-items: center; gap: 4px;
}
.badge-ai {
  background: var(--ai-grad); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px; margin-left: 6px;
}

/* ── MODULES ──────────────────────────────────── */
.modules-grid { display: flex; flex-direction: column; gap: 10px; }
.module-card {
  background: var(--bg-card); border-radius: var(--radius-md);
  padding: 16px; display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: all .2s; box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
}
.module-card:hover, .module-card:active { border-color: var(--accent); transform: translateX(3px); }
.module-card.module-ai { border-color: rgba(102,126,234,.2); }
.module-card.module-ai:hover { border-color: #667eea; }
.module-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.scripts-icon  { background: #E8F5E9; color: #2E7D32; }
.respostas-icon{ background: #E3F2FD; color: #1565C0; }
.gerador-icon  { background: #F3E5F5; color: #6A1B9A; }
.ai-icon       { background: var(--ai-grad); color: #fff; }
.module-info { flex: 1; }
.module-info h4 { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.module-info p  { font-size: 12px; color: var(--text-sec); }
.module-arrow   { color: var(--text-lt); font-size: 14px; }

/* ── TIP CARD ─────────────────────────────────── */
.tip-card {
  background: var(--gold-light); border-radius: var(--radius-md);
  padding: 16px; display: flex; gap: 12px; align-items: flex-start;
  border: 1.5px solid var(--gold); margin-bottom: 16px;
}
.tip-icon { color: var(--gold); font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.tip-card p { font-size: 14px; line-height: 1.5; color: #5a3e00; }

/* ── SITUATIONS ───────────────────────────────── */
.situations-list { display: flex; flex-direction: column; gap: 10px; }
.situation-card {
  background: var(--bg-card); border-radius: var(--radius-md);
  padding: 18px 16px; display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: all .2s; box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
}
.situation-card:active { transform: scale(.98); border-color: var(--accent); }
.situation-emoji { font-size: 32px; flex-shrink: 0; }
.situation-info h4 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.situation-info p  { font-size: 13px; color: var(--text-sec); }
.situation-count {
  margin-left: auto; background: var(--accent-light); color: var(--primary);
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; flex-shrink: 0;
}

/* ── SCRIPT DETAIL ────────────────────────────── */
.script-detail-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-lg); padding: 20px; color: #fff;
  margin-bottom: 20px; text-align: center;
}
.script-detail-emoji { font-size: 44px; margin-bottom: 8px; }
.script-detail-header h3 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.script-detail-header p  { font-size: 13px; opacity: .8; }
.steps-list { display: flex; flex-direction: column; gap: 14px; }
.step-card { background: var(--bg-card); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.step-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.step-num { width: 28px; height: 28px; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.step-title { font-size: 14px; font-weight: 600; }
.step-body { padding: 14px 16px; }
.step-text { font-size: 14px; line-height: 1.6; background: #f8faf8; border-radius: var(--radius-sm); padding: 12px; margin-bottom: 12px; border-left: 3px solid var(--accent); white-space: pre-wrap; }
.step-tip { display: flex; gap: 8px; align-items: flex-start; background: var(--gold-light); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 12px; }
.step-tip i { color: var(--gold); font-size: 14px; margin-top: 2px; }
.step-tip p { font-size: 12px; color: #5a3e00; line-height: 1.4; }
.btn-copy-step {
  background: var(--accent); color: #fff; border: none;
  padding: 11px 12px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; transition: background .2s;
  white-space: nowrap;
}
.btn-copy-step:hover { background: var(--accent-dark); }
.btn-copy-step.copied { background: var(--primary); }

/* ── SEARCH ───────────────────────────────────── */
.search-box {
  background: #fff; border-radius: var(--radius-md);
  padding: 10px 14px; display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; box-shadow: var(--shadow-sm);
}
.search-box i { color: var(--text-lt); font-size: 16px; }
.search-box input { border: none; outline: none; flex: 1; font-size: 14px; font-family: 'Inter',sans-serif; background: transparent; }

/* ── CATEGORIES TABS ──────────────────────────── */
.categories-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.cat-tab {
  background: #fff; border: 2px solid var(--border); color: var(--text-sec);
  padding: 7px 14px; border-radius: 20px; font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: all .2s;
}
.cat-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* ── RESPOSTAS ────────────────────────────────── */
.respostas-list { display: flex; flex-direction: column; gap: 10px; }
.resposta-card { background: var(--bg-card); border-radius: var(--radius-md); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.resposta-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.resposta-title { font-size: 13px; font-weight: 600; color: var(--text-sec); }
.btn-fav { background: none; border: none; cursor: pointer; color: var(--text-lt); font-size: 18px; padding: 0; transition: all .2s; line-height: 1; }
.btn-fav.active { color: var(--gold); transform: scale(1.2); }
.resposta-text { font-size: 14px; line-height: 1.6; margin-bottom: 12px; white-space: pre-wrap; }
.resposta-actions { display: flex; gap: 8px; }
.btn-copy-resp {
  flex: 1; background: var(--accent); color: #fff; border: none;
  padding: 9px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: background .2s;
}
.btn-copy-resp:hover { background: var(--accent-dark); }
.btn-copy-resp.copied { background: var(--primary); }

/* ── FORMS ────────────────────────────────────── */
.form-card { background: var(--bg-card); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-md); margin-bottom: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-sec); margin-bottom: 8px; }
.form-group label i { color: var(--primary-light); }
.optional { font-weight: 400; color: var(--text-lt); font-size: 12px; }

.form-group input[type=text],
.form-group input[type=email],
.form-group input[type=password],
.form-group input[type=tel],
.form-group input[type=number],
.form-group select,
.form-group textarea {
  width: 100%; border: 2px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 14px; font-family: 'Inter',sans-serif;
  color: var(--text-main); background: #fff; outline: none; transition: border-color .2s;
  appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: none; line-height: 1.6; }
.form-group select { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23667781' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

.phone-input-row { display: flex; border: 2px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; transition: border-color .2s; }
.phone-input-row:focus-within { border-color: var(--accent); }
.phone-prefix { background: #f0f2f5; padding: 12px 14px; font-size: 15px; font-weight: 600; color: var(--text-sec); border-right: 2px solid var(--border); }
.phone-input-row input { flex: 1; border: none !important; border-radius: 0 !important; }

.msg-vars { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.label-vars { font-size: 12px; color: var(--text-lt); }
.btn-var { background: var(--accent-light); color: var(--primary-dark); border: none; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .2s; font-family: monospace; }
.btn-var:hover { background: var(--primary-light); color: #fff; }

/* ── LINK RESULT ──────────────────────────────── */
.link-result { background: #fff; border-radius: var(--radius-md); padding: 16px; box-shadow: var(--shadow-md); margin-bottom: 20px; border: 2px solid var(--accent); animation: slideUp .3s ease; }
.link-result-header { display: flex; align-items: center; gap: 8px; color: var(--accent-dark); font-weight: 600; font-size: 14px; margin-bottom: 12px; }
.link-result-header i { font-size: 18px; }
.link-box { background: #f0f2f5; border-radius: var(--radius-sm); padding: 12px; font-size: 13px; color: var(--primary); word-break: break-all; font-family: monospace; margin-bottom: 12px; line-height: 1.5; }
.link-actions { display: flex; gap: 10px; }
.link-history-list { display: flex; flex-direction: column; gap: 10px; }
.link-history-item { background: #fff; border-radius: var(--radius-md); padding: 14px 16px; box-shadow: var(--shadow-sm); border: 1.5px solid transparent; transition: all .2s; }
.link-history-item:hover { border-color: var(--accent); }
.link-history-phone { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.link-history-phone i { color: var(--accent); }
.link-history-msg { font-size: 13px; color: var(--text-sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 8px; }
.link-history-actions { display: flex; gap: 8px; }
.link-history-time { font-size: 11px; color: var(--text-lt); margin-left: auto; align-self: center; }

/* ── ASSISTENTE IA ────────────────────────────── */
.ia-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 2px; }
.ia-tab {
  background: #fff; border: 2px solid var(--border); color: var(--text-sec);
  padding: 8px 14px; border-radius: 20px; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: all .2s; display: flex; align-items: center; gap: 6px;
}
.ia-tab.active { background: var(--ai-grad); border-color: transparent; color: #fff; }
.ia-panel { display: none; }
.ia-panel.active { display: block; animation: fadeIn .25s ease; }

.ia-intro {
  background: linear-gradient(135deg, #f8f0ff, #e8f0fe);
  border-radius: var(--radius-md); padding: 14px 16px;
  display: flex; gap: 12px; align-items: center; margin-bottom: 16px;
  border: 1.5px solid #d0bcff;
}
.ia-intro i { font-size: 28px; background: var(--ai-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; flex-shrink: 0; }
.ia-intro p { font-size: 14px; color: #4a0080; line-height: 1.4; }

/* Tom chips */
.tom-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--bg); border: 2px solid var(--border); color: var(--text-sec);
  padding: 7px 12px; border-radius: 20px; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.chip.active { background: var(--ai-grad); border-color: transparent; color: #fff; font-weight: 600; }

/* IA Result Card */
.ia-result {
  background: #fff; border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-md);
  border: 2px solid #d0bcff; margin-top: 16px; animation: slideUp .3s ease;
}
.ia-result-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ia-result-header h4 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.ia-result-header h4 i { background: var(--ai-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.ia-result-body { font-size: 14px; line-height: 1.7; color: var(--text-main); white-space: pre-wrap; }
.ia-result-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.ia-loading { display: flex; flex-direction: column; align-items: center; padding: 30px 0; gap: 12px; color: var(--text-sec); }
.ia-loading i { font-size: 32px; background: var(--ai-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: pulse 1.5s infinite; }
.ia-loading span { font-size: 14px; }

/* ── SECTION INTRO ────────────────────────────── */
.section-intro { background: #fff; border-radius: var(--radius-md); padding: 12px 16px; margin-bottom: 16px; font-size: 14px; color: var(--text-sec); border-left: 3px solid var(--accent); }

/* ── FAVORITOS ────────────────────────────────── */
#favoritos-list .resposta-card { border-left: 3px solid var(--gold); }

/* ── EMPTY STATE ──────────────────────────────── */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-lt); }
.empty-state i { font-size: 48px; display: block; margin-bottom: 12px; opacity: .3; }
.empty-state p { font-size: 15px; line-height: 1.6; }

/* ── BUTTONS ──────────────────────────────────── */
.btn-primary {
  background: var(--accent); color: #fff; border: none;
  padding: 14px 24px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .2s; font-family: 'Inter',sans-serif;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.btn-secondary {
  background: #f0f2f5; color: var(--text-main); border: none;
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: background .2s;
}
.btn-secondary:hover { background: var(--border); }

.btn-whatsapp {
  flex: 1; background: var(--accent); color: #fff; border: none;
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .2s;
}
.btn-whatsapp:hover { background: var(--accent-dark); }

.btn-ia {
  background: var(--ai-grad); color: #fff; border: none;
  padding: 14px 24px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity .2s; font-family: 'Inter',sans-serif;
}
.btn-ia:hover { opacity: .9; }
.btn-ia:disabled { opacity: .6; cursor: not-allowed; }

.btn-ia-gen {
  background: linear-gradient(135deg, #11998e, #38ef7d); color: #fff; border: none;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity .2s; font-family: 'Inter',sans-serif;
}
.btn-ia-gen:hover { opacity: .9; }
.btn-ia-gen:disabled { opacity: .6; cursor: not-allowed; }

.btn-full { width: 100%; }
.btn-text { background: none; border: none; color: var(--danger); font-size: 13px; cursor: pointer; font-family: 'Inter',sans-serif; }
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text-sec); padding: 12px 24px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s; }

/* ── BOTTOM NAV ───────────────────────────────── */
.bottom-nav {
  height: var(--nav-h); background: #fff;
  display: flex; border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,.08); flex-shrink: 0;
}
.nav-btn {
  flex: 1; background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; color: var(--text-lt); transition: all .2s; padding: 4px;
}
.nav-btn i { font-size: 20px; }
.nav-btn span { font-size: 11px; font-weight: 500; }
.nav-btn.active { color: var(--primary); }
.nav-btn.active i { transform: scale(1.1); }
.nav-btn-ia.active { color: #764ba2; }
.nav-btn-ia i { background: var(--ai-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-btn-ia.active i { transform: scale(1.1); }

/* ── BADGE ────────────────────────────────────── */
.badge { position: absolute; top: 4px; right: 4px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* ── MODAL ────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: none; align-items: flex-end; justify-content: center;
  z-index: 1000; backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; animation: fadeIn .2s ease; }
.modal-box {
  background: #fff; border-radius: 24px 24px 0 0;
  width: 100%; max-width: var(--max-w); max-height: 88vh;
  overflow-y: auto; animation: slideUp .3s ease;
  position: relative;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 16px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: #fff; z-index: 10;
}
.modal-header h3 { font-size: 18px; font-weight: 700; }
.btn-close {
  background: var(--bg); border: none; width: 34px; height: 34px;
  border-radius: 50%; cursor: pointer; color: var(--text-sec); font-size: 15px;
  display: flex; align-items: center; justify-content: center; transition: background .2s; flex-shrink: 0;
}
.btn-close:hover { background: var(--border); }

/* Header flutuante (sem título — ex: menu do usuário) */
.modal-header-overlay {
  border-bottom: none !important; padding: 0 !important;
  background: transparent !important; position: absolute;
  right: 12px; top: 12px; z-index: 30; pointer-events: none;
}
.modal-header-overlay h3 { display: none; }
.modal-header-overlay .btn-close,
.btn-close-float {
  pointer-events: all;
  background: rgba(0,0,0,.25) !important;
  color: #fff !important;
  backdrop-filter: blur(6px);
}
.btn-close-float:hover { background: rgba(0,0,0,.4) !important; }

.modal-body { padding: 20px; }

/* ── TOAST ────────────────────────────────────── */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + 16px); left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #2d2d2d; color: #fff; padding: 12px 24px;
  border-radius: 24px; font-size: 14px; font-weight: 500;
  z-index: 2000; opacity: 0; transition: all .3s ease;
  white-space: nowrap; pointer-events: none;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--primary); }
.toast.error   { background: var(--danger); }

/* ── SPINNER ──────────────────────────────────── */
.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.4); border-radius: 50%; border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── USER MENU MODAL ──────────────────────────── */
/* Remove o padding padrão do modal-body quando contém o user-menu */
.modal-body:has(.user-menu) { padding: 0; }
.user-menu { padding: 0; }

/* Header do menu */
.user-menu-header {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 20px 20px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
  border-radius: 20px 20px 0 0; color: #fff;
}
.user-avatar-wrap { position: relative; flex-shrink: 0; }
.user-avatar {
  width: 58px; height: 58px; border-radius: 50%;
  background: rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; flex-shrink: 0;
  border: 2.5px solid rgba(255,255,255,.4);
}
.user-avatar-img {
  width: 58px; height: 58px; border-radius: 50%;
  object-fit: cover; border: 2.5px solid rgba(255,255,255,.4);
  display: block;
}
.user-menu-info { flex: 1; min-width: 0; }
.user-name  { font-size: 17px; font-weight: 700; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 12px; opacity: .8; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-plan-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,184,0,.22); border: 1px solid rgba(255,184,0,.5);
  color: var(--gold); font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
}

/* Rótulo de seção */
.user-menu-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--text-lt);
  padding: 14px 16px 4px;
}

/* Items do menu */
.user-menu-items { padding: 4px 10px; display: flex; flex-direction: column; gap: 2px; }
.user-menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 10px; border-radius: var(--radius-md);
  cursor: pointer; transition: background .18s;
  border: none; background: none; width: 100%; text-align: left;
  color: var(--text-main);
}
.user-menu-item:hover { background: var(--bg); }
.user-menu-item.danger { color: var(--danger); }
.user-menu-item.danger .umi-icon { background: #ffe4e4 !important; color: var(--danger) !important; }
.user-menu-item.danger:hover { background: #fff0f0; }

/* Ícone do item */
.umi-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
  transition: transform .15s;
}
.user-menu-item:hover .umi-icon { transform: scale(1.08); }
.umi-edit    { background: #e3f2fd; color: #1565c0; }
.umi-fav     { background: var(--gold-light); color: var(--gold); }
.umi-ia      { background: #ede7f6; color: #6a1b9a; }
.umi-contact { background: #e8f5e9; color: #2e7d32; }
.umi-terms   { background: #e3f2fd; color: #0277bd; }
.umi-privacy { background: #fce4ec; color: #c62828; }
.umi-logout  { background: #ffe4e4; color: var(--danger); }

/* Texto do item */
.umi-text  { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.umi-title { font-size: 14px; font-weight: 600; color: var(--text-main); }
.umi-sub   { font-size: 11px; color: var(--text-lt); margin-top: 1px; }
.user-menu-item.danger .umi-title { color: var(--danger); }
.umi-arrow { font-size: 11px; color: var(--text-lt); flex-shrink: 0; }

/* Versão */
.user-menu-version {
  text-align: center; font-size: 11px; color: var(--text-lt);
  padding: 12px 0 14px; border-top: 1px solid var(--border); margin: 4px 10px 0;
}

/* ── HEADER AVATAR PERSONALIZADO ─────────────── */
.header-avatar-img {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; display: block;
  border: 2px solid rgba(255,255,255,.5);
}
.header-avatar-letter {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
  border: 2px solid rgba(255,255,255,.5);
}

/* ── EDITAR PERFIL ────────────────────────────── */
.perfil-edit-form { padding: 4px 0; }
.perfil-preview {
  display: flex; justify-content: center; margin-bottom: 4px;
}
.perfil-avatar-preview {
  width: 90px; height: 90px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--accent);
  display: block;
}
.perfil-avatar-letter {
  width: 90px; height: 90px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; font-weight: 700; color: #fff;
  border: 3px solid var(--accent);
}

/* ── FALE CONOSCO ─────────────────────────────── */
.contato-form { padding: 4px 0; }
.contato-intro {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--accent-light); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13px; color: var(--primary);
  line-height: 1.5; margin-bottom: 18px;
}
.contato-intro i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.contato-email-direto {
  text-align: center; font-size: 12px; color: var(--text-lt);
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.contato-email-direto a { color: var(--primary-light); font-weight: 600; text-decoration: none; }
.contato-email-direto a:hover { text-decoration: underline; }

/* ── DOCUMENTOS LEGAIS (Termos / Política) ────── */
.legal-doc { padding: 4px 0; max-height: 65vh; overflow-y: auto; }
.legal-updated {
  font-size: 12px; color: var(--text-lt);
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.legal-section { margin-bottom: 18px; }
.legal-section h4 {
  font-size: 14px; font-weight: 700; color: var(--primary);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.legal-section h4 i { font-size: 13px; }
.legal-section p { font-size: 13px; color: var(--text-sec); line-height: 1.6; margin-bottom: 6px; }
.legal-section ul { padding-left: 18px; margin-top: 6px; }
.legal-section ul li { font-size: 13px; color: var(--text-sec); line-height: 1.6; margin-bottom: 3px; }
.legal-link { color: var(--primary-light); font-weight: 600; text-decoration: none; }
.legal-link:hover { text-decoration: underline; }

@media (min-width: 481px) { body { background: #0d1b2a; } }

/* ══════════════════════════════════════════════
   NOVOS MÓDULOS v3.0
══════════════════════════════════════════════ */

/* ── HOME SALES ROW ───────────────────────────── */
.home-sales-row { display: flex; gap: 10px; margin-bottom: 4px; }
.sale-mini-card { flex:1; background:#fff; border-radius:var(--radius-md); padding:14px 8px; text-align:center; box-shadow:var(--shadow-sm); }
.sale-mini-num  { display:block; font-size:20px; font-weight:800; color:var(--primary); }
.sale-mini-label{ font-size:11px; color:var(--text-sec); }

/* ── TEXTAREA EDITÁVEL — Scripts e Respostas ──── */
.step-textarea,
.resposta-textarea {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background: #f8faf8;
  resize: vertical;
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
  border-left: 3px solid var(--accent);
  margin-bottom: 12px;
}
.step-textarea:focus,
.resposta-textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37,211,102,.12);
}
.resposta-textarea { min-height: 90px; }
.step-textarea     { min-height: 110px; }
.edit-hint {
  font-size: 11px; color: var(--text-lt); margin-bottom: 6px;
  display: flex; align-items: center; gap: 4px;
}

/* ── CONTATOS ─────────────────────────────────── */
.contato-card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
  border: 1.5px solid transparent;
  transition: all .2s;
  overflow: hidden;
}
.contato-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }

/* Linha principal com avatar + info + botões */
.contato-main {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px 14px 16px;
}

.contato-avatar {
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.contato-info  { flex: 1; min-width: 0; }
.contato-nome  { font-size: 15px; font-weight: 700; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contato-fone  { font-size: 13px; color: var(--text-sec); display: flex; align-items: center; gap: 5px; }
.contato-tag   { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; margin-top: 4px; display: inline-block; }
.tag-lead      { background: #E3F2FD; color: #1565C0; }
.tag-cliente   { background: #E8F5E9; color: #2E7D32; }
.tag-inativo   { background: #F5F5F5; color: #757575; }

/* Barra de ações na parte inferior do card */
.contato-actions {
  display: flex;
  border-top: 1px solid var(--border);
  background: #fafafa;
}
.btn-contato-action {
  flex: 1;
  height: 40px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background .2s, color .2s;
  background: transparent;
  color: var(--text-lt);
  border-right: 1px solid var(--border);
  gap: 5px;
}
.btn-contato-action:last-child { border-right: none; }
.btn-contato-action span { font-size: 11px; font-weight: 600; }
.btn-whats-contato  { color: var(--accent-dark); }
.btn-whats-contato:hover  { background: var(--accent-light); color: var(--accent-dark); }
.btn-venda-contato  { color: #E65100; }
.btn-venda-contato:hover  { background: #FFF3E0; }
.btn-edit-contato   { color: var(--primary-light); }
.btn-edit-contato:hover   { background: #E8F5E9; }
.btn-del-contato    { color: var(--danger); }
.btn-del-contato:hover    { background: #ffe4e4; }

/* ── PRODUTOS ─────────────────────────────────── */
.produto-card {
  background:#fff; border-radius:var(--radius-md); padding:16px;
  box-shadow:var(--shadow-sm); margin-bottom:10px; border:1.5px solid transparent; transition:all .2s;
}
.produto-card:hover { border-color:#667eea; }
.produto-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.produto-nome  { font-size:16px; font-weight:700; }
.produto-preco { font-size:18px; font-weight:800; color:var(--primary); }
.produto-desc  { font-size:13px; color:var(--text-sec); margin-bottom:10px; }
.produto-stats { display:flex; gap:12px; }
.produto-stat  { font-size:12px; color:var(--text-lt); display:flex; align-items:center; gap:4px; }
.produto-stat i{ font-size:11px; }
.produto-actions { display:flex; gap:8px; margin-top:12px; }

/* ── VENDA MODAL ──────────────────────────────── */
.venda-form { display:flex; flex-direction:column; gap:14px; }
.venda-produto-select { display:flex; flex-direction:column; gap:8px; }
.produto-option {
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px; border-radius:var(--radius-sm); border:2px solid var(--border);
  cursor:pointer; transition:all .2s;
}
.produto-option.selected { border-color:var(--accent); background:var(--accent-light); }
.produto-option-nome  { font-size:14px; font-weight:600; }
.produto-option-preco { font-size:14px; font-weight:700; color:var(--primary); }

/* ── ESTATÍSTICAS ────────────────────────────── */
.stats-hero {
  background:linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius:var(--radius-lg); padding:20px; color:#fff; margin-bottom:20px; text-align:center;
}
.stats-hero h3 { font-size:22px; font-weight:800; margin-bottom:4px; }
.stats-hero p  { font-size:14px; opacity:.8; }
.stats-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.stat-big-card {
  background:#fff; border-radius:var(--radius-md); padding:16px;
  box-shadow:var(--shadow-sm); text-align:center;
}
.stat-big-num   { display:block; font-size:28px; font-weight:800; color:var(--primary); margin-bottom:4px; }
.stat-big-label { font-size:12px; color:var(--text-sec); }
.stat-big-card.destaque { background:linear-gradient(135deg,var(--primary),var(--primary-light)); color:#fff; grid-column:1/-1; }
.stat-big-card.destaque .stat-big-num   { color:var(--accent); font-size:36px; }
.stat-big-card.destaque .stat-big-label { color:rgba(255,255,255,.8); }

.stats-produto-item {
  background:#fff; border-radius:var(--radius-md); padding:14px 16px;
  box-shadow:var(--shadow-sm); margin-bottom:8px; display:flex; align-items:center; gap:12px;
}
.stats-produto-bar-wrap { flex:1; }
.stats-produto-nome  { font-size:13px; font-weight:600; margin-bottom:4px; }
.stats-produto-bar   { height:6px; background:var(--border); border-radius:3px; overflow:hidden; }
.stats-produto-fill  { height:100%; background:linear-gradient(90deg,var(--primary),var(--accent)); border-radius:3px; transition:width .5s ease; }
.stats-produto-num   { font-size:14px; font-weight:700; color:var(--primary); white-space:nowrap; }

.venda-item {
  background:#fff; border-radius:var(--radius-md); padding:14px 16px;
  box-shadow:var(--shadow-sm); margin-bottom:8px; display:flex; align-items:center; gap:12px;
}
.venda-item-avatar { width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:16px; font-weight:700; color:#fff; flex-shrink:0; }
.venda-item-info { flex:1; min-width:0; }
.venda-item-nome { font-size:14px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.venda-item-prod { font-size:12px; color:var(--text-sec); }
.venda-item-val  { font-size:15px; font-weight:800; color:var(--primary); white-space:nowrap; }
.venda-item-data { font-size:11px; color:var(--text-lt); }

/* ── SELETOR DE CONTATO ───────────────────────── */
.contato-picker { display:flex; flex-direction:column; gap:8px; max-height:320px; overflow-y:auto; }
.contato-pick-item {
  display:flex; align-items:center; gap:12px; padding:12px;
  border-radius:var(--radius-sm); border:2px solid var(--border); cursor:pointer; transition:all .2s;
}
.contato-pick-item:hover, .contato-pick-item.selected { border-color:var(--accent); background:var(--accent-light); }
.contato-pick-avatar { width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:14px; font-weight:700; color:#fff; flex-shrink:0; }
.contato-pick-info { flex:1; }
.contato-pick-nome { font-size:14px; font-weight:600; }
.contato-pick-fone { font-size:12px; color:var(--text-sec); }

/* ── PERÍODO SELECTOR ─────────────────────────── */
.periodo-tabs { display:flex; gap:6px; margin-bottom:16px; }
.periodo-tab { flex:1; padding:8px 4px; border:2px solid var(--border); border-radius:var(--radius-sm); font-size:12px; font-weight:600; cursor:pointer; background:#fff; color:var(--text-sec); transition:all .2s; }
.periodo-tab.active { background:var(--primary); border-color:var(--primary); color:#fff; }

/* ── FORM FLOATING LABEL ──────────────────────── */
.form-row { display:flex; gap:10px; }
.form-row .form-group { flex:1; }

/* ── EMPTY STATE melhorado ────────────────────── */
.empty-state button { margin-top:16px; }

/* ── PHONE + AGENDA ROW ─────────────────────── */
.phone-agenda-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.btn-agenda {
  width: 48px;
  min-width: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .2s;
  flex-shrink: 0;
}
.btn-agenda:hover { opacity: .85; }
.input-hint {
  font-size: 12px;
  color: var(--text-lt);
  margin-top: 6px;
}
.btn-link-hint {
  background: none;
  border: none;
  color: var(--primary-light);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-link-hint:hover { text-decoration: underline; }

/* ── SELETOR DE CONTATO NA IA ────────────────── */
.ia-contato-bar {
  background: linear-gradient(135deg, rgba(7,94,84,.06), rgba(37,211,102,.08));
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
}
.ia-contato-label {
  font-size: 12px; font-weight: 700; color: var(--primary);
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
}
.ia-contato-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

/* ── CARDS DE ETAPA DA IA ─────────────────────── */
.ia-etapas-list {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 14px;
}
.ia-etapa-card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1.5px solid var(--border);
  transition: box-shadow .2s;
}
.ia-etapa-card:hover { box-shadow: var(--shadow-md); }

.ia-etapa-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
}
.ia-etapa-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,.35);
}
.ia-etapa-titulo {
  font-size: 14px; font-weight: 700; flex: 1;
  line-height: 1.3;
}

.ia-etapa-body {
  padding: 14px 14px 12px;
}
.ia-etapa-textarea {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  line-height: 1.65;
  color: var(--text-main);
  background: #f8faf8;
  resize: vertical;
  outline: none;
  transition: border-color .2s, background .2s;
  border-left: 3px solid var(--accent);
  min-height: 90px;
  margin-bottom: 10px;
}
.ia-etapa-textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37,211,102,.1);
}

.ia-etapa-dica {
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--gold-light);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  margin-bottom: 10px;
}
.ia-etapa-dica i { color: var(--gold); font-size: 13px; margin-top: 2px; flex-shrink: 0; }
.ia-etapa-dica p { font-size: 12px; color: #5a3e00; line-height: 1.45; }

.ia-etapa-actions {
  display: flex; gap: 7px;
}
.ia-etapa-actions .btn-copy-step {
  flex: 1; font-size: 12px; padding: 9px 8px;
}

/* ── CONTATO BADGE & BOTÃO ESCOLHER ──────────── */
.contato-badge-nome {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  color: var(--primary);
  border: 1.5px solid var(--accent);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
}
.contato-badge-nome i { font-size: 11px; }

.btn-escolher-contato {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background .2s, transform .1s;
  white-space: nowrap;
}
.btn-escolher-contato:hover  { background: var(--primary-light); }
.btn-escolher-contato:active { transform: scale(.97); }

/* ── LINHA DE CONTATO NO SCRIPT DETAIL ────────── */
.script-contato-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

/* ── BARRA DE AÇÕES DO STEP (2 botões) ─────────── */
.step-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.step-actions-row .btn-copy-step {
  flex: 1;
  width: auto;
}
/* Botão "Copiar texto" (verde escuro) */
.btn-copy-step.btn-copy-only {
  background: var(--primary);
}
.btn-copy-step.btn-copy-only:hover { background: var(--primary-dark); }
.btn-copy-step.btn-copy-only.copied { background: var(--accent-dark); }

/* ── BARRA DE CONTATO NAS RESPOSTAS ─────────────── */
.resp-contato-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border: 1.5px dashed var(--border);
}

/* ── BADGE GERADOR ──────────────────────────────── */
.gerador-contato-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ══════════════════════════════════════════════
   LINKS DE AFILIADOS
══════════════════════════════════════════════ */
.afiliado-card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  border: 1.5px solid transparent;
  transition: all .2s;
  overflow: hidden;
}
.afiliado-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }

.afiliado-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 8px;
}
.afiliado-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.afiliado-info { flex: 1; min-width: 0; }
.afiliado-nome { font-size: 15px; font-weight: 700; color: var(--text-main); }
.afiliado-produto { font-size: 12px; color: var(--text-sec); display: flex; align-items: center; gap: 4px; margin-top: 2px; }

.btn-copy-afiliado {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: background .2s, transform .1s;
  flex-shrink: 0;
}
.btn-copy-afiliado:hover { background: var(--primary-light); }
.btn-copy-afiliado.copied { background: var(--accent-dark); }

.afiliado-link-row {
  padding: 4px 14px 10px;
  border-bottom: 1px solid var(--border);
}
.afiliado-link-text {
  font-size: 12px;
  color: var(--primary-light);
  word-break: break-all;
  font-family: monospace;
}
.afiliado-obs {
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-sec);
  font-style: italic;
}
.afiliado-actions {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
}
.btn-afiliado-action {
  flex: 1;
  padding: 10px 8px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text-sec);
  transition: background .15s, color .15s;
}
.btn-afiliado-action:last-child { border-right: none; }
.btn-copy-full { color: var(--primary); }
.btn-copy-full:hover { background: var(--accent-light); }
.btn-copy-full.copied { background: var(--accent-light); color: var(--accent-dark); }
.btn-edit-af:hover { background: #f0f4ff; color: #4a6cef; }
.btn-del-af { color: var(--danger); }
.btn-del-af:hover { background: #fff0f0; }

/* ── SELETOR GENÉRICO (produto/afiliado) ──── */
.seletor-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.seletor-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e8f5e9;
  color: #2e7d32;
  border: 1.5px solid #a5d6a7;
  border-radius: 20px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
}
.seletor-badge i { font-size: 11px; }
.seletor-badge-af {
  background: #e8eaf6;
  color: #3949ab;
  border-color: #9fa8da;
}
.seletor-badge-af i { color: #3949ab; }

.btn-escolher-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f8e9;
  color: #33691e;
  border: 1.5px solid #aed581;
  border-radius: 20px;
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background .2s;
  white-space: nowrap;
}
.btn-escolher-item:hover { background: #dcedc8; }
.btn-escolher-af {
  background: #e8eaf6;
  color: #3949ab;
  border-color: #9fa8da;
}
.btn-escolher-af:hover { background: #c5cae9; }

/* Preview do link de afiliado no gerador */
.af-link-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  background: #e8eaf6;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  color: #3949ab;
  word-break: break-all;
}
.btn-copy-inline {
  background: #3949ab;
  color: #fff;
  border: none;
  border-radius: 6px;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 12px;
  flex-shrink: 0;
  transition: background .2s;
}
.btn-copy-inline:hover { background: #283593; }

/* ── BARRA DE SELETORES (Respostas / Scripts) ── */
.resp-selectors-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border);
  align-items: flex-start;
}
.resp-selector-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 1;
  min-width: 80px;
}

/* Barra de seletores no script-detail */
.script-selectors-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  align-items: flex-start;
}
.script-selector-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 1;
  min-width: 80px;
}

/* Barra de seletores na IA */
.ia-selectors-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(7,94,84,.05), rgba(37,211,102,.07));
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius-md);
  padding: 12px 13px;
  margin-bottom: 16px;
}
.ia-selector-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 1;
  min-width: 80px;
}

/* Botão pequeno para os seletores */
.btn-selector-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background .2s;
  white-space: nowrap;
}
.btn-selector-sm:hover { background: var(--primary-light); }
.btn-selector-prod {
  background: #388e3c;
}
.btn-selector-prod:hover { background: #2e7d32; }
.btn-selector-af {
  background: #3949ab;
}
.btn-selector-af:hover { background: #283593; }

/* ── BOTTOM NAV COM 6 BOTÕES ─────────────────── */
.bottom-nav { display: flex; justify-content: space-around; }
.bottom-nav .nav-btn { flex: 1; }
