@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Outfit:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ── VARIÁVEIS ── */
:root {
  --bg:           #f4f7fb;
  --surface:      #ffffff;
  --surface2:     #f8fafc;
  --border:       #e1e7f0;
  --border-hover: #c7d2e4;
  --border-focus: #06b6d4;

  --accent:       #06b6d4;
  --accent-dark:  #0891b2;
  --accent-dim:   rgba(6,182,212,0.08);
  --accent-glow:  rgba(6,182,212,0.2);

  --green:        #10b981;
  --green-dim:    rgba(16,185,129,0.08);
  --green-glow:   rgba(16,185,129,0.2);

  --blue:         #3b82f6;
  --blue-dim:     rgba(59,130,246,0.08);

  --orange:       #f97316;
  --orange-dim:   rgba(249,115,22,0.08);

  --purple:       #8b5cf6;
  --purple-dim:   rgba(139,92,246,0.08);

  --red:          #ef4444;
  --red-dim:      rgba(239,68,68,0.08);

  --text:         #0f172a;
  --muted:        #64748b;
  --muted2:       #94a3b8;

  --shadow-xs:    0 1px 2px rgba(15,23,42,0.05);
  --shadow-sm:    0 1px 4px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow:       0 4px 16px rgba(15,23,42,0.08), 0 2px 6px rgba(15,23,42,0.04);
  --shadow-lg:    0 16px 48px rgba(15,23,42,0.12), 0 4px 12px rgba(15,23,42,0.06);
}

/* ── TEMA ESCURO ── */
[data-theme="dark"] {
  --bg:           #0b0f1a;
  --surface:      #111827;
  --surface2:     #1a2236;
  --border:       rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.14);

  --accent-dim:   rgba(6,182,212,0.14);
  --green-dim:    rgba(16,185,129,0.13);
  --blue-dim:     rgba(59,130,246,0.13);
  --orange-dim:   rgba(249,115,22,0.13);
  --purple-dim:   rgba(139,92,246,0.13);
  --red-dim:      rgba(239,68,68,0.13);

  --text:         #e8edf5;
  --muted:        #6b7a99;
  --muted2:       #4a5568;

  --shadow-xs:    0 1px 3px rgba(0,0,0,0.4);
  --shadow-sm:    0 1px 4px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.3);
  --shadow:       0 4px 16px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.3);
  --shadow-lg:    0 16px 48px rgba(0,0,0,0.6), 0 4px 12px rgba(0,0,0,0.4);
}

[data-theme="dark"] body {
  background: var(--bg);
}

/* Ambient glow no dark mode */
[data-theme="dark"] body::before {
  content: '';
  position: fixed; top: -200px; left: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(6,182,212,0.06) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
[data-theme="dark"] body::after {
  content: '';
  position: fixed; bottom: -200px; right: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(16,185,129,0.05) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* Ajustes específicos do dark mode */
[data-theme="dark"] .stat-card:hover { border-color: rgba(6,182,212,0.4); }
[data-theme="dark"] tr:hover td { background: rgba(255,255,255,0.02); }
[data-theme="dark"] .activity-item:hover { background: rgba(255,255,255,0.02); }
[data-theme="dark"] .user-card:hover { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .card:hover { border-color: rgba(255,255,255,0.12); }
[data-theme="dark"] .nav-item:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea { color: var(--text); }
[data-theme="dark"] select option { background: #1a2236; }
[data-theme="dark"] .tabs { border-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .tab.active { box-shadow: 0 1px 4px rgba(0,0,0,0.5); }
[data-theme="dark"] .filter-chip { background: var(--surface2); }
[data-theme="dark"] .filter-chip:hover { background: rgba(6,182,212,0.1); }
[data-theme="dark"] .btn-ghost { background: var(--surface2); border-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: var(--accent); }
[data-theme="dark"] .notif { background: var(--surface); border-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .action-btn { background: var(--surface2); border-color: rgba(255,255,255,0.07); }
[data-theme="dark"] .status-badge.aprovado  { background: rgba(16,185,129,0.15);  color: #34d399; }
[data-theme="dark"] .status-badge.aprovado::before  { background: #34d399; }
[data-theme="dark"] .status-badge.pendente  { background: rgba(245,158,11,0.15);  color: #fbbf24; }
[data-theme="dark"] .status-badge.pendente::before  { background: #fbbf24; }
[data-theme="dark"] .status-badge.enviado   { background: rgba(59,130,246,0.15);  color: #60a5fa; }
[data-theme="dark"] .status-badge.enviado::before   { background: #60a5fa; }
[data-theme="dark"] .status-badge.expirado  { background: rgba(239,68,68,0.15);   color: #f87171; }
[data-theme="dark"] .status-badge.expirado::before  { background: #f87171; }
[data-theme="dark"] .status-badge.rascunho  { background: rgba(100,116,139,0.15); color: #94a3b8; }
[data-theme="dark"] .status-badge.rascunho::before  { background: #94a3b8; }
[data-theme="dark"] .total-row { background: rgba(255,255,255,0.03); }
[data-theme="dark"] .modal-footer { background: var(--surface2); }
[data-theme="dark"] .table-filters { background: var(--surface2); }
[data-theme="dark"] th { background: rgba(255,255,255,0.03); }
[data-theme="dark"] .alertas-banner { background: rgba(249,115,22,0.1); border-color: rgba(249,115,22,0.2); }

/* Botão de tema (fica no rodapé da sidebar, acima do user-card) */
.btn-tema {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 10px; margin-bottom: 6px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500;
  color: var(--muted); transition: all 0.15s;
}
.btn-tema::after { content: attr(data-label); }
.btn-tema:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* ── RESET ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── SIDEBAR ── */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: 232px; height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 100;
  transition: left 0.3s ease;
}

.logo {
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: flex-start;
}
.logo-mark {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1;
}
.logo-mark span { color: var(--accent); }
.logo-sub { font-size: 11px; color: var(--muted2); margin-top: 3px; letter-spacing: 0.02em; }

.nav {
  flex: 1; padding: 10px 10px;
  display: flex; flex-direction: column; gap: 1px;
  overflow-y: auto;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500;
  color: var(--muted); cursor: pointer;
  transition: all 0.15s; border: 1px solid transparent;
  text-decoration: none; line-height: 1;
}
.nav-item:hover { color: var(--text); background: var(--bg); border-color: var(--border); }
.nav-item.active {
  color: var(--accent); background: var(--accent-dim);
  border-color: rgba(6,182,212,0.18); font-weight: 600;
}
.nav-icon {
  width: 17px; height: 17px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; opacity: 0.65;
}
.nav-item.active .nav-icon,
.nav-item:hover .nav-icon { opacity: 1; }
.nav-badge {
  margin-left: auto; background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px;
}
.nav-divider { height: 1px; background: var(--border); margin: 8px 4px; }

.sidebar-footer {
  padding: 10px 10px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── User card ── */
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 9px;
  transition: background 0.15s;
  cursor: default;
}
.user-card:hover { background: var(--bg); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #3b82f6);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; color: #fff; flex-shrink: 0;
}
.user-text { min-width: 0; flex: 1; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
.user-card-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}
.user-plan {
  font-size: 11px;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-upgrade-link {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent-dim);
  border: 1px solid rgba(6,182,212,0.25);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.7;
  transition: background 0.15s, color 0.15s;
}
.sidebar-upgrade-link:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── MAIN ── */
.main {
  margin-left: 232px;
  padding: 26px 32px 40px;
  position: relative;
  min-height: 100vh;
}

/* ── TOPBAR ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 26px; flex-wrap: wrap; gap: 12px;
}
.topbar-title-wrap { flex: 1; min-width: 0; }
.page-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.2;
}
.page-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ── BOTÕES ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
  border: none; font-family: inherit; white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 1px 3px rgba(6,182,212,0.25);
}
.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 4px 14px rgba(6,182,212,0.35);
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); box-shadow: var(--shadow-xs);
}
.btn-ghost:hover { background: var(--bg); border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--red-dim); color: var(--red); border: 1px solid rgba(239,68,68,0.18); }
.btn-danger:hover { background: rgba(239,68,68,0.14); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── STAT CARDS ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px;
  position: relative; overflow: hidden; cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  box-shadow: var(--shadow-sm);
}
.stat-card:hover {
  box-shadow: var(--shadow); transform: translateY(-2px);
  border-color: var(--border-focus);
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; border-radius: 14px 14px 0 0;
}
.stat-card.green::before  { background: linear-gradient(90deg, #10b981, rgba(16,185,129,0.05)); }
.stat-card.blue::before   { background: linear-gradient(90deg, #3b82f6, rgba(59,130,246,0.05)); }
.stat-card.orange::before { background: linear-gradient(90deg, #f97316, rgba(249,115,22,0.05)); }
.stat-card.purple::before { background: linear-gradient(90deg, #8b5cf6, rgba(139,92,246,0.05)); }
.stat-card.cyan::before   { background: linear-gradient(90deg, #06b6d4, rgba(6,182,212,0.05)); }

.stat-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; margin-bottom: 14px; flex-shrink: 0;
}
.stat-icon.green  { background: var(--green-dim);  color: #059669; }
.stat-icon.blue   { background: var(--blue-dim);   color: var(--blue); }
.stat-icon.orange { background: var(--orange-dim); color: var(--orange); }
.stat-icon.purple { background: var(--purple-dim); color: var(--purple); }
.stat-icon.cyan   { background: var(--accent-dim); color: var(--accent); }

.stat-value {
  font-family: 'Outfit', sans-serif; font-size: 23px; font-weight: 700;
  line-height: 1; color: var(--text); letter-spacing: -0.3px;
}
.stat-label { font-size: 12px; color: var(--muted); margin-top: 5px; font-weight: 400; }
.stat-delta, .stat-trend {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 500; margin-top: 9px;
  padding: 3px 8px; border-radius: 20px;
}
.stat-delta.up, .stat-trend.up   { color: #059669; background: var(--green-dim); }
.stat-delta.down, .stat-trend.down { color: var(--orange); background: var(--orange-dim); }

/* ── CHARTS ── */
.charts-grid {
  display: grid; grid-template-columns: 1fr 280px;
  gap: 14px; margin-bottom: 22px;
}
.chart-container { padding: 4px 8px 12px; position: relative; height: 196px; }

/* ── CARD ── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm);
}
.card:hover { border-color: var(--border-hover); }
.card-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title {
  font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 600; color: var(--text);
}
.card-action {
  font-size: 12px; color: var(--accent); cursor: pointer;
  text-decoration: none; font-weight: 500; transition: color 0.15s;
}
.card-action:hover { color: var(--accent-dark); }

/* ── CONTENT GRID ── */
.content-grid { display: grid; grid-template-columns: 1fr 320px; gap: 14px; }
.right-panel { display: flex; flex-direction: column; gap: 14px; }

/* ── TABLE ── */
.table-filters {
  padding: 12px 20px; display: flex; gap: 6px;
  border-bottom: 1px solid var(--border); background: var(--surface2); flex-wrap: wrap;
}
.filter-chip {
  padding: 5px 14px; border-radius: 20px;
  font-size: 12px; cursor: pointer; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted);
  transition: all 0.15s; font-family: inherit; font-weight: 500;
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip.active {
  background: var(--accent-dim); color: var(--accent);
  border-color: rgba(6,182,212,0.3); font-weight: 600;
}
.filter-chip-vencendo { color: #ea580c; border-color: rgba(249,115,22,0.3); }
.filter-chip-vencendo:hover { border-color: #ea580c; color: #ea580c; background: rgba(249,115,22,0.07); }
.filter-chip-vencendo.active { background: rgba(249,115,22,0.1); color: #ea580c; border-color: rgba(249,115,22,0.4); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  padding: 10px 20px; text-align: left; font-size: 11px; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--surface2); border-bottom: 1px solid var(--border);
}
td {
  padding: 13px 20px; font-size: 13px;
  border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg); }

/* Linhas de orçamento clicáveis (dashboard + listagem) */
.orc-row-clickable td {
  cursor: pointer;
  transition: background 0.12s ease;
}

.client-cell { display: flex; align-items: center; gap: 10px; }
.client-avatar {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.client-name { font-weight: 500; font-size: 13px; color: var(--text); }
.client-service { font-size: 11px; color: var(--muted); margin-top: 1px; }
.value-cell { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 13px; }

/* ── STATUS BADGES ── */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.status-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.status-badge.aprovado  { background: rgba(16,185,129,0.1);  color: #059669; }
.status-badge.aprovado::before  { background: #059669; }
.status-badge.pendente  { background: rgba(245,158,11,0.1);  color: #d97706; }
.status-badge.pendente::before  { background: #d97706; }
.status-badge.enviado   { background: rgba(59,130,246,0.1);  color: var(--blue); }
.status-badge.enviado::before   { background: var(--blue); }
.status-badge.expirado  { background: rgba(239,68,68,0.1);   color: var(--red); }
.status-badge.expirado::before  { background: var(--red); }
.status-badge.rascunho  { background: rgba(100,116,139,0.1); color: var(--muted); }
.status-badge.rascunho::before  { background: var(--muted); }

/* ── ACTION BUTTONS ── */
.action-btn {
  background: var(--bg); border: 1px solid var(--border);
  color: var(--muted); padding: 5px 9px; border-radius: 7px;
  font-size: 12px; cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.action-btn:hover      { color: var(--accent); border-color: rgba(6,182,212,0.3); background: var(--accent-dim); }
.action-btn.send:hover { color: var(--green);  border-color: rgba(16,185,129,0.3); background: var(--green-dim); }
.action-btn.edit:hover { color: var(--blue);   border-color: rgba(59,130,246,0.3); background: var(--blue-dim); }
.action-btn.pdf:hover  { color: var(--orange); border-color: rgba(249,115,22,0.3); background: var(--orange-dim); }
.action-btns { display: flex; gap: 4px; flex-wrap: nowrap; }

/* ── MODAL PDF ── */
.modal-pdf { width: min(880px, 95vw); max-height: 95vh; overflow: hidden; }
.modal-pdf .modal-body { padding: 0; height: 78vh; background: #525659; border-radius: 0 0 20px 20px; }
.modal-pdf iframe { width: 100%; height: 100%; border: none; border-radius: 0 0 20px 20px; }

/* ── FORMS ── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
input, select, textarea {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 12px;
  color: var(--text); font-size: 13.5px; font-family: inherit;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s; width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(6,182,212,0.1);
}
textarea { resize: vertical; min-height: 80px; }
select option { background: var(--surface); color: var(--text); }
.input-error { border-color: rgba(239,68,68,0.5) !important; }
.error-msg { font-size: 11px; color: var(--red); margin-top: 4px; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.5); backdrop-filter: blur(4px);
  z-index: 200; display: none; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; width: 560px; max-height: 90vh; overflow-y: auto;
  animation: slideUp 0.25s ease; box-shadow: var(--shadow-lg);
}
@keyframes slideUp { from{transform:translateY(16px);opacity:0} to{transform:none;opacity:1} }
.modal-header {
  padding: 22px 26px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.modal-title { font-family: 'Outfit', sans-serif; font-size: 17px; font-weight: 700; color: var(--text); }
.modal-close {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.modal-close:hover { color: var(--text); border-color: var(--accent); }
.modal-body { padding: 22px 26px; display: flex; flex-direction: column; gap: 16px; }
.modal-footer {
  padding: 16px 26px; border-top: 1px solid var(--border);
  display: flex; gap: 8px; justify-content: flex-end; background: var(--surface2);
}

/* ── WHATSAPP ── */
.wpp-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.wpp-header { background: #0a4a3a; padding: 13px 16px; display: flex; align-items: center; gap: 11px; }
.wpp-avatar-circle {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.wpp-dot { width: 7px; height: 7px; border-radius: 50%; background: #25d366; box-shadow: 0 0 8px rgba(37,211,102,0.6); }
.wpp-title { font-size: 13px; font-weight: 600; color: #fff; }
.wpp-sub { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 1px; }
.wpp-body {
  padding: 12px 12px; background: #0d1f1a;
  display: flex; flex-direction: column; gap: 7px;
  min-height: 190px; max-height: 250px; overflow-y: auto;
}
.wpp-body::-webkit-scrollbar { width: 4px; }
.wpp-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
.msg {
  max-width: 82%; padding: 8px 11px; border-radius: 10px;
  font-size: 12.5px; line-height: 1.5; position: relative;
}
.msg-time { font-size: 10px; color: rgba(255,255,255,0.3); margin-top: 3px; text-align: right; }
.msg.received { background: #1a332b; align-self: flex-start; border-bottom-left-radius: 3px; color: #d0ede2; }
.msg.sent { background: #005c4b; align-self: flex-end; border-bottom-right-radius: 3px; color: #dcf8c6; }
.msg-typing {
  display: flex; gap: 4px; align-items: center;
  background: #1a332b; padding: 10px 14px;
  border-radius: 10px; align-self: flex-start; width: 56px; border-bottom-left-radius: 3px;
}
.dot-anim {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,0.35); animation: bounce 1.2s infinite;
}
.dot-anim:nth-child(2) { animation-delay: 0.2s; }
.dot-anim:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-5px)} }
.wpp-chips {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 8px 12px; background: #0d1a15;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.chip-btn {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px; padding: 5px 10px;
  font-size: 11px; color: rgba(255,255,255,0.5);
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.chip-btn:hover { border-color: #25d366; color: #25d366; background: rgba(37,211,102,0.08); }
.wpp-input {
  padding: 10px 12px; background: #0d1a15;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex; gap: 7px; align-items: center;
}
.wpp-input input {
  flex: 1; background: #1a2e26; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px; padding: 7px 13px;
  color: #d0ede2; font-size: 12px; font-family: inherit; outline: none;
}
.wpp-input input:focus { border-color: rgba(37,211,102,0.35); box-shadow: none; }
.wpp-input input::placeholder { color: rgba(255,255,255,0.2); }
.mic-btn, .send-btn {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all 0.15s;
}
.mic-btn { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.4); }
.mic-btn:hover { background: rgba(249,115,22,0.2); color: var(--orange); }
.mic-btn.listening { background: rgba(239,68,68,0.25); color: #f87171; animation: mic-pulse 1s ease-in-out infinite; }
@keyframes mic-pulse { 0%,100%{box-shadow:0 0 0 0 rgba(239,68,68,0.4)} 50%{box-shadow:0 0 0 8px rgba(239,68,68,0)} }
.send-btn { background: #25d366; color: #fff; }
.send-btn:hover { background: #1ea855; transform: scale(1.06); }

/* ── ACTIVITY ── */
.activity-list { display: flex; flex-direction: column; }
.activity-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--border); transition: background 0.15s;
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--bg); }
.activity-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.activity-text { font-size: 12.5px; line-height: 1.5; color: var(--text); }
.activity-text strong { font-weight: 600; }
.activity-time { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── LEMBRETE ENVIADO (feedback na listagem) ── */
.lembrete-enviado-badge {
  font-size: 11px; color: #b45309; margin-top: 4px;
  display: inline-flex; align-items: center; gap: 4px;
}
[data-theme="dark"] .lembrete-enviado-badge { color: #fbbf24; }

/* ── CATÁLOGO ── */
.catalogo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ── NOTIFICAÇÃO ── */
.notif {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-lg);
  transform: translateX(calc(100% + 30px));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 320px;
}
.notif.show { transform: translateX(0); }
.notif-icon { font-size: 20px; flex-shrink: 0; }
.notif-title { font-size: 13px; font-weight: 600; overflow-wrap: break-word; word-break: break-word; color: var(--text); }
.notif-sub { font-size: 12px; color: var(--muted); margin-top: 2px; overflow-wrap: break-word; word-break: break-word; }

/* ── TABS ── */
.tabs {
  display: flex; gap: 2px; padding: 3px;
  background: var(--bg); border-radius: 10px;
  border: 1px solid var(--border); margin-bottom: 20px;
}
.tab {
  flex: 1; padding: 7px 14px; border-radius: 7px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  text-align: center; transition: all 0.15s;
  background: transparent; border: none; color: var(--muted); font-family: inherit;
}
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 600; }

/* ── ITEMS DO ORÇAMENTO ── */
.items-section { display: flex; flex-direction: column; gap: 8px; }
.item-row { display: grid; grid-template-columns: 1fr 80px 100px 32px; gap: 8px; align-items: center; }
.remove-btn {
  width: 32px; height: 32px; border-radius: 7px;
  background: var(--red-dim); border: 1px solid rgba(239,68,68,0.2);
  color: var(--red); cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.remove-btn:hover { background: rgba(239,68,68,0.15); }
.add-item-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px;
  background: var(--accent-dim); border: 1px dashed rgba(6,182,212,0.3);
  color: var(--accent); font-size: 13px; cursor: pointer;
  transition: all 0.15s; font-family: inherit; width: 100%; justify-content: center;
}
.add-item-btn:hover { background: rgba(6,182,212,0.14); border-color: var(--accent); }
.total-row {
  display: flex; flex-direction: column; gap: 5px;
  padding: 14px 16px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px; font-size: 14px;
}
.total-value { color: var(--green); font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 700; }
#subtotal-row, #desconto-row { font-size: 13px; font-weight: 500; }

/* ── AUTOCOMPLETE ── */
.cliente-autocomplete { position: relative; }
.cliente-sugestoes-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; z-index: 9999; max-height: 220px; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.sugestao-item {
  padding: 9px 14px; cursor: pointer; font-size: 13px; color: var(--text);
  display: flex; align-items: center; gap: 8px; transition: background 0.1s;
  border-bottom: 1px solid var(--border);
}
.sugestao-item:last-child { border-bottom: none; }
.sugestao-item:hover { background: var(--bg); }
.sugestao-item.novo { color: var(--accent); font-weight: 600; border-top: 1px solid var(--border); }

/* ── LOADING ── */
.loading { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 40px; color: var(--muted); font-size: 14px; }
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 48px; color: var(--muted); }
.empty-state .icon { font-size: 38px; margin-bottom: 14px; }
.empty-state .title { font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-state .desc { font-size: 13px; }

/* ── ALERT ── */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; }
.alert-error   { background: var(--red-dim);   border: 1px solid rgba(239,68,68,0.2);   color: var(--red);   }
.alert-success { background: var(--green-dim); border: 1px solid rgba(16,185,129,0.2); color: var(--green); }

/* ── ANIMATIONS ── */
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
.pulse { animation: pulse 2s infinite; }

/* ── ALERTAS VENCIMENTO ── */

/* ── MOBILE / RESPONSIVE ── */
.btn-hamburger {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 18px;
  cursor: pointer; line-height: 1; box-shadow: var(--shadow-xs);
}
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,0.4); z-index: 99; }
.sidebar-overlay.open { display: block; }

@media (max-width: 768px) {
  .sidebar { left: -260px; z-index: 300; width: 232px; }
  .sidebar.open { left: 0; box-shadow: 8px 0 40px rgba(15,23,42,0.15); }
  .main { margin-left: 0; padding: 18px 16px 32px; }
  .topbar { margin-bottom: 18px; gap: 8px 12px; align-items: flex-start; }
  .topbar .topbar-title-wrap { flex: 1 1 auto; min-width: 0; }
  .topbar .topbar-actions { flex-basis: 100%; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 8px; }
  .page-title { font-size: 18px; }
  .page-sub { font-size: 12px; }
  .btn-hamburger { display: flex; }
  .stats-row { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
  .stat-card { padding: 15px; }
  .stat-value { font-size: 19px; }
  .stat-icon { width: 32px; height: 32px; font-size: 14px; margin-bottom: 10px; }
  .charts-grid { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  th { padding: 10px 12px; font-size: 10px; }
  td { padding: 11px 12px; font-size: 12px; }
  .table-filters { padding: 10px 12px; }
  .modal { width: 95vw; max-height: 92vh; border-radius: 14px; }
  .modal-body { padding: 16px 18px; gap: 12px; }
  .modal-header { padding: 16px 18px 14px; }
  .modal-footer { padding: 12px 18px; }
  .modal-title { font-size: 15px; }
  .form-row { grid-template-columns: 1fr; }
  .item-row { grid-template-columns: 1fr 56px 80px 32px; gap: 6px; }
  .notif { top: 10px; right: 10px; max-width: calc(100% - 20px); }
  .modal-pdf { width: 98vw; max-height: 96vh; }
  .modal-pdf .modal-body { height: 72vh; }
  .catalogo-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .catalogo-grid .catalogo-card-img { height: 88px !important; }
  .catalogo-grid .catalogo-card-img img { max-height: 88px !important; }
  .catalogo-grid .catalogo-card-img--empty { height: 64px !important; }
  .catalogo-grid .catalogo-card-content { padding: 10px !important; gap: 6px !important; }
  .catalogo-grid .catalogo-card-nome { font-size: 13px !important; }
  .catalogo-grid .catalogo-card-desc { display: none; }
  .catalogo-grid .catalogo-card-preco { font-size: 14px; }
  .catalogo-grid .catalogo-card-preco span:first-child { font-size: 15px !important; }
  .catalogo-grid .catalogo-card-actions { gap: 4px !important; }
  .catalogo-grid .catalogo-card-btn { padding: 5px 6px !important; font-size: 11px !important; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .main { padding: 12px 12px 28px; }
  .topbar { margin-bottom: 14px; }
  .topbar-actions .btn { padding: 8px 12px; font-size: 12px; }
  .page-title { font-size: 16px; }
  .action-btn { padding: 4px 7px; }
  .catalogo-grid { gap: 8px; }
  .catalogo-grid .catalogo-card-img { height: 72px !important; }
  .catalogo-grid .catalogo-card-img img { max-height: 72px !important; }
  .catalogo-grid .catalogo-card-img--empty { height: 52px !important; }
  .catalogo-grid .catalogo-card-content { padding: 8px !important; }
  .catalogo-grid .catalogo-card-nome { font-size: 12px !important; }
  .catalogo-grid .catalogo-card-preco span:first-child { font-size: 14px !important; }
}

/* ── LOGIN PAGE ── */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
.login-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 40px; width: 400px;
  box-shadow: var(--shadow-lg); position: relative; z-index: 1;
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .logo-mark { justify-content: center; font-size: 26px; }
.login-logo .logo-sub { text-align: center; margin-top: 6px; }
.login-title { font-family: 'Outfit', sans-serif; font-size: 19px; font-weight: 700; margin-bottom: 22px; color: var(--text); }
.login-footer { text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }
.login-footer a { color: var(--accent); cursor: pointer; text-decoration: none; }
.login-footer a:hover { text-decoration: underline; }
.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
