/* ===========================================
   RW TRUCKS AI - CSS MODERNO
   Design System 2025 • Mobile First • Dark Mode
   =========================================== */

:root {
  /* === CORES PRINCIPAIS === */
  --bg-base: #0a0e27;
  --bg-elevated: #131836;
  --bg-card: #1a2046;
  --bg-hover: #232b54;
  --bg-input: #0f1530;

  /* === SUPERFÍCIES === */
  --surface-1: #131836;
  --surface-2: #1a2046;
  --surface-3: #232b54;
  --border: #2a3360;
  --border-light: #353f7a;

  /* === TEXTO === */
  --text-primary: #ffffff;
  --text-secondary: #b4bce0;
  --text-muted: #6e7aa8;
  --text-disabled: #4a5170;

  /* === CORES DE DESTAQUE === */
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-pressed: #4f46e5;
  --accent-soft: rgba(99, 102, 241, 0.15);

  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.15);
  --info: #06b6d4;
  --info-soft: rgba(6, 182, 212, 0.15);

  /* === TEMPERATURAS === */
  --hot: #ef4444;
  --hot-soft: rgba(239, 68, 68, 0.15);
  --warm: #f59e0b;
  --warm-soft: rgba(245, 158, 11, 0.15);
  --cold: #3b82f6;
  --cold-soft: rgba(59, 130, 246, 0.15);

  /* === ESPAÇAMENTO === */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* === RAIOS === */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* === SOMBRAS === */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 32px rgba(99, 102, 241, 0.3);

  /* === TRANSIÇÕES === */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* === TIPOGRAFIA === */
  --font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  /* === SAFE AREAS === */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* === RESET === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: var(--font-family);
  background: var(--bg-base);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  font-size: 15px;
  line-height: 1.5;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  color: inherit;
  outline: none;
}

input, select, textarea {
  -webkit-appearance: none;
  appearance: none;
}

button {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

a {
  color: var(--accent-hover);
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ===========================================
   LOADING
   =========================================== */
.loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-base) 0%, var(--bg-elevated) 100%);
  z-index: 9999;
  gap: var(--space-6);
}

.loading.hidden { display: none; }

.logo-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.logo-icon {
  font-size: 64px;
  animation: bounce 1.5s ease-in-out infinite;
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.loader-bar {
  width: 200px;
  height: 3px;
  background: var(--surface-3);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.loader-progress {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: var(--radius-full);
  animation: loading 1.2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes loading {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

/* ===========================================
   SCREENS
   =========================================== */
.screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.screen.hidden { display: none; }

/* ===========================================
   AUTH SCREENS (Login/Register)
   =========================================== */
.auth-screen {
  background: var(--bg-base);
  position: relative;
}

.auth-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}

.shape-1 {
  width: 300px;
  height: 300px;
  background: var(--accent);
  top: -100px;
  right: -100px;
}

.shape-2 {
  width: 250px;
  height: 250px;
  background: var(--info);
  bottom: -50px;
  left: -50px;
}

.shape-3 {
  width: 200px;
  height: 200px;
  background: var(--success);
  top: 40%;
  left: 30%;
  opacity: 0.2;
}

.auth-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-6);
  position: relative;
  z-index: 1;
  overflow-y: auto;
}

.back-btn-floating {
  position: absolute;
  top: calc(var(--safe-top) + var(--space-4));
  left: var(--space-4);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 2;
  transition: var(--transition-fast);
}

.back-btn-floating:active {
  transform: scale(0.92);
  background: var(--surface-3);
}

.auth-header {
  margin-bottom: var(--space-8);
  text-align: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.brand-logo .brand-icon {
  font-size: 48px;
  filter: drop-shadow(0 8px 16px rgba(99, 102, 241, 0.4));
}

.brand-logo h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 0%, #b4bce0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-logo p {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.auth-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-xl);
}

.auth-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: var(--space-6);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  padding-left: var(--space-1);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0 var(--space-4);
  transition: var(--transition-fast);
}

.input-wrapper:focus-within {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.input-icon {
  font-size: 18px;
  margin-right: var(--space-3);
  opacity: 0.7;
}

.input-wrapper input {
  flex: 1;
  padding: var(--space-4) 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 15px;
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
}

.input-action {
  padding: var(--space-2);
  border-radius: var(--radius-md);
  font-size: 16px;
  opacity: 0.6;
  transition: var(--transition-fast);
}

.input-action:active {
  opacity: 1;
  background: var(--surface-3);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-6) 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-footer {
  margin-top: var(--space-6);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.auth-footer-text {
  margin-top: var(--space-4);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* ===========================================
   BUTTONS
   =========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-pressed) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-ghost {
  background: var(--surface-3);
  color: var(--text-primary);
}

.btn-ghost:active {
  background: var(--surface-2);
  transform: scale(0.98);
}

.btn-block {
  width: 100%;
}

.btn-large {
  padding: var(--space-5) var(--space-6);
  font-size: 16px;
}

.btn-arrow {
  transition: var(--transition-fast);
}

.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-icon-primary {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
}

.btn-icon-primary:active {
  transform: scale(0.92);
}

/* ===========================================
   APP HEADER
   =========================================== */
.app-header {
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-base) 100%);
  padding: calc(var(--safe-top) + var(--space-4)) var(--space-5) var(--space-5);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.user-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent) 0%, var(--info) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.greeting {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.user-meta h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  gap: var(--space-2);
}

.header-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  position: relative;
  transition: var(--transition-fast);
}

.header-btn:active {
  transform: scale(0.92);
  background: var(--surface-3);
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--surface-2);
}

.notification-dot.hidden {
  display: none;
}

/* Daily Summary */
.daily-summary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--info) 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  position: relative;
  overflow: hidden;
}

.daily-summary::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.summary-loading {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  font-weight: 500;
}

.summary-content {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  position: relative;
}

.summary-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.summary-text h3 {
  color: white;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.summary-text p {
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  line-height: 1.4;
}

.summary-stats {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255,255,255,0.2);
  position: relative;
}

.summary-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: white;
}

.summary-stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===========================================
   MAIN APP
   =========================================== */
.app-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(80px + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
}

.page {
  display: none;
  padding: var(--space-5);
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===========================================
   SECTION HEADERS
   =========================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  margin-top: var(--space-6);
}

.section-header:first-child {
  margin-top: 0;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.section-action {
  font-size: 13px;
  color: var(--accent-hover);
  font-weight: 600;
}

/* ===========================================
   STATS GRID
   =========================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.stat-card:active {
  transform: scale(0.98);
}

.stat-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-hot .stat-icon-wrap {
  background: var(--hot-soft);
  color: var(--hot);
}

.stat-warm .stat-icon-wrap {
  background: var(--warm-soft);
  color: var(--warm);
}

.stat-trucks .stat-icon-wrap {
  background: var(--info-soft);
  color: var(--info);
}

.stat-deals .stat-icon-wrap {
  background: var(--success-soft);
  color: var(--success);
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 500;
}

.stat-trend {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--surface-3);
  color: var(--text-secondary);
}

.stat-trend.up {
  background: var(--success-soft);
  color: var(--success);
}

/* ===========================================
   CARD LIST
   =========================================== */
.card-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* ===========================================
   CONVERSATION ITEM
   =========================================== */
.conversation-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  transition: var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.conversation-item:active {
  transform: scale(0.99);
  background: var(--surface-3);
}

.conversation-item.has-unread {
  border-color: var(--accent);
  border-left-width: 3px;
}

.conversation-item.has-urgent {
  border-color: var(--danger);
  border-left-width: 3px;
}

.conv-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent) 0%, var(--info) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
  position: relative;
}

.conv-avatar.temp-hot {
  background: linear-gradient(135deg, var(--hot) 0%, #f97316 100%);
}

.conv-avatar.temp-warm {
  background: linear-gradient(135deg, var(--warm) 0%, #fbbf24 100%);
}

.conv-avatar.temp-cold {
  background: linear-gradient(135deg, var(--cold) 0%, var(--info) 100%);
}

.online-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: var(--success);
  border-radius: 50%;
  border: 2px solid var(--surface-2);
}

.conv-info {
  flex: 1;
  min-width: 0;
}

.conv-name-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 4px;
}

.conv-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-preview {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.conv-preview strong {
  color: var(--text-primary);
  font-weight: 600;
}

.conv-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.conv-time {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.score-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.score-badge.temp-hot {
  background: var(--hot-soft);
  color: var(--hot);
}

.score-badge.temp-warm {
  background: var(--warm-soft);
  color: var(--warm);
}

.score-badge.temp-cold {
  background: var(--cold-soft);
  color: var(--cold);
}

/* ===========================================
   QUICK ACTIONS
   =========================================== */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.quick-action {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  transition: var(--transition-fast);
}

.quick-action:active {
  transform: scale(0.97);
  background: var(--surface-3);
}

.qa-icon {
  font-size: 28px;
}

.quick-action span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ===========================================
   SEARCH BAR
   =========================================== */
.search-bar {
  position: relative;
  margin-bottom: var(--space-4);
}

.search-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-bar input {
  width: 100%;
  padding: var(--space-4) var(--space-4) var(--space-4) calc(var(--space-4) + 26px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-size: 15px;
  transition: var(--transition-fast);
}

.search-bar input:focus {
  border-color: var(--accent);
  background: var(--surface-1);
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-clear {
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
}

.search-clear.hidden {
  display: none;
}

/* ===========================================
   FILTER CHIPS
   =========================================== */
.filter-chips {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-3);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  padding: var(--space-2) var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.chip.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.chip.chip-hot.active {
  background: var(--hot);
  border-color: var(--hot);
}

.chip.chip-warm.active {
  background: var(--warm);
  border-color: var(--warm);
}

.chip.chip-cold.active {
  background: var(--cold);
  border-color: var(--cold);
}

.chip:active {
  transform: scale(0.95);
}

/* ===========================================
   SORT BAR
   =========================================== */
.sort-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-2);
  border-radius: var(--radius-md);
}

.sort-bar span {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.sort-bar select {
  flex: 1;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.sort-bar select option {
  background: var(--surface-2);
  color: var(--text-primary);
}

/* ===========================================
   FILTER ROW
   =========================================== */
.filter-row {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.filter-row select {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.filter-row select option {
  background: var(--surface-2);
  color: var(--text-primary);
}

/* ===========================================
   TRUCKS GRID
   =========================================== */
.trucks-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.truck-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-fast);
}

.truck-card:active {
  transform: scale(0.99);
}

.truck-image-wrap {
  position: relative;
  height: 180px;
  background: linear-gradient(135deg, var(--surface-3) 0%, var(--bg-elevated) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.truck-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.truck-image-placeholder {
  font-size: 64px;
  opacity: 0.5;
}

.truck-badges-overlay {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  right: var(--space-3);
  display: flex;
  justify-content: space-between;
}

.truck-status-pill {
  padding: 4px 10px;
  background: var(--success-soft);
  color: var(--success);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.truck-fipe-pill {
  padding: 4px 10px;
  background: rgba(10, 14, 39, 0.7);
  color: white;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.truck-info {
  padding: var(--space-4);
}

.truck-brand-line {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.truck-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

.truck-specs-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}

.truck-spec-item {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.truck-spec-item strong {
  color: var(--text-primary);
  font-weight: 700;
}

.truck-price-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.truck-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--success);
  letter-spacing: -0.02em;
}

.truck-price-mini {
  font-size: 11px;
  color: var(--text-muted);
}

.truck-action-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.truck-action-btn:active {
  transform: scale(0.9);
  background: var(--accent);
  color: white;
}

/* ===========================================
   ATTENTION TABS
   =========================================== */
.attention-tabs {
  display: flex;
  gap: var(--space-2);
  background: var(--surface-2);
  padding: var(--space-1);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-5);
}

.att-tab {
  flex: 1;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.att-tab.active {
  background: var(--accent);
  color: white;
}

.att-tab-icon {
  font-size: 16px;
}

.att-content {
  display: none;
}

.att-content.active {
  display: block;
}

/* ===========================================
   BOTTOM NAVIGATION
   =========================================== */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  padding: var(--space-2) var(--space-3) calc(var(--space-2) + var(--safe-bottom));
  z-index: 20;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-2);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  position: relative;
  transition: var(--transition-fast);
}

.nav-item.active {
  color: var(--accent-hover);
}

.nav-item.active .nav-icon-wrap {
  background: var(--accent-soft);
}

.nav-icon-wrap {
  width: 48px;
  height: 32px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  position: relative;
}

.nav-item.nav-fab {
  margin-top: -16px;
}

.nav-item.nav-fab .nav-icon-wrap {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-pressed) 100%);
  color: white;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-full);
}

.nav-item.nav-fab.active .nav-icon-wrap {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
}

.nav-badge {
  position: absolute;
  top: 4px;
  right: 12px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--danger);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  color: white;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface-1);
}

.nav-badge.active {
  display: flex;
}

.nav-badge.alert {
  background: var(--danger);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ===========================================
   MODALS
   =========================================== */
.modal {
  position: fixed;
  inset: 0;
  background: var(--bg-base);
  z-index: 100;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

.modal.hidden {
  display: none;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ===========================================
   CHAT VIEW
   =========================================== */
.chat-view {
  background: var(--bg-base);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: calc(var(--safe-top) + var(--space-3)) var(--space-3) var(--space-3);
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.chat-back,
.chat-action-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.chat-back:active,
.chat-action-btn:active {
  transform: scale(0.92);
  background: var(--surface-3);
}

.chat-customer {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent) 0%, var(--info) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.chat-customer h3 {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  color: var(--text-secondary);
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
}

.chat-actions {
  display: flex;
  gap: var(--space-2);
}

/* AI Summary Card */
.ai-summary-card {
  margin: var(--space-3);
  padding: var(--space-4);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-lg);
}

.ai-summary-loading {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-secondary);
  font-size: 13px;
}

.pulse {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-glow 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
  50% { opacity: 0.7; transform: scale(1.1); box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); }
}

.ai-summary-content {
  display: flex;
  gap: var(--space-3);
}

.ai-summary-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.ai-summary-body h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-hover);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.ai-summary-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

.ai-summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.ai-tag {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--surface-3);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-weight: 500;
}

/* Messages */
.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.message {
  max-width: 78%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.message.inbound {
  align-self: flex-start;
}

.message.outbound {
  align-self: flex-end;
  align-items: flex-end;
}

.message-bubble {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-xl);
  font-size: 15px;
  line-height: 1.4;
  word-wrap: break-word;
}

.message.inbound .message-bubble {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.message.outbound .message-bubble {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-pressed) 100%);
  color: white;
  border-bottom-right-radius: 4px;
}

.message-time {
  font-size: 10px;
  color: var(--text-muted);
  padding: 0 var(--space-2);
}

.message.outbound .message-time {
  color: var(--text-secondary);
}

/* AI Suggestions */
.ai-suggestions {
  margin: var(--space-3);
  padding: var(--space-4);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
  border: 1px solid var(--warning-soft);
  border-radius: var(--radius-lg);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-suggestion-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  font-weight: 700;
  color: var(--warning);
  margin-bottom: var(--space-2);
}

.ai-dismiss {
  margin-left: auto;
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-suggestions p {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: var(--space-3);
}

.ai-actions {
  display: flex;
  gap: var(--space-2);
}

.btn-ai-action {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--text-primary);
}

.btn-ai-primary {
  background: var(--accent);
  color: white;
}

/* Chat Input */
.chat-input-container {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  padding-bottom: calc(var(--space-3) + var(--safe-bottom));
  background: var(--surface-1);
  border-top: 1px solid var(--border);
}

.chat-attach {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 15px;
}

.chat-input:focus {
  border-color: var(--accent);
}

.chat-send {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-pressed) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.chat-send:active {
  transform: scale(0.92);
}

/* ===========================================
   DETAIL VIEW (Truck)
   =========================================== */
.detail-view {
  background: var(--bg-base);
}

.detail-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: calc(var(--safe-top) + var(--space-3)) var(--space-3) var(--space-3);
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
}

.detail-header h2 {
  flex: 1;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
}

.truck-hero {
  position: relative;
  height: 280px;
  background: linear-gradient(135deg, var(--surface-3) 0%, var(--bg-elevated) 100%);
}

.truck-images {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.truck-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.truck-images .truck-image-placeholder {
  font-size: 96px;
}

.truck-hero-overlay {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  right: var(--space-3);
  display: flex;
  justify-content: space-between;
}

.truck-status-badge {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  background: rgba(16, 185, 129, 0.85);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
}

.truck-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5);
  padding-bottom: calc(80px + var(--safe-bottom));
}

.truck-price-section {
  margin-bottom: var(--space-5);
}

.truck-price-section .truck-price {
  font-size: 32px;
}

.truck-price-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-1);
  font-size: 13px;
  color: var(--text-secondary);
}

.truck-price-trend {
  padding: 2px 8px;
  background: var(--success-soft);
  color: var(--success);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 11px;
}

.truck-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.truck-spec {
  padding: var(--space-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.truck-spec-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.truck-spec-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.truck-section {
  margin-bottom: var(--space-5);
}

.truck-section h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.truck-section p {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
}

.interested-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.interested-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.truck-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.truck-stat {
  text-align: center;
  padding: var(--space-3);
  background: var(--surface-2);
  border-radius: var(--radius-md);
}

.truck-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-hover);
}

.truck-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 500;
}

/* ===========================================
   MODERN FORM
   =========================================== */
.modern-form {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.modern-form .form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.modern-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  padding-left: var(--space-1);
}

.modern-input,
.modern-select,
.modern-textarea {
  width: 100%;
  padding: var(--space-4);
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 15px;
  transition: var(--transition-fast);
}

.modern-input:focus,
.modern-select:focus,
.modern-textarea:focus {
  border-color: var(--accent);
  background: var(--surface-1);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.modern-input::placeholder,
.modern-textarea::placeholder {
  color: var(--text-muted);
}

.modern-select {
  cursor: pointer;
}

.modern-select option {
  background: var(--surface-2);
  color: var(--text-primary);
}

.modern-textarea {
  resize: none;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

/* ===========================================
   EMPTY STATES
   =========================================== */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 56px;
  margin-bottom: var(--space-3);
  opacity: 0.5;
}

.empty-state-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.empty-state-text {
  font-size: 13px;
}

/* ===========================================
   TOAST
   =========================================== */
.toast {
  position: fixed;
  top: calc(var(--safe-top) + var(--space-4));
  left: var(--space-4);
  right: var(--space-4);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-xl);
  z-index: 200;
  animation: toastSlide 0.3s ease;
  max-width: 400px;
  margin: 0 auto;
}

.toast.hidden { display: none; }

.toast-content {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 14px;
  font-weight: 500;
}

.toast.success { border-color: var(--success); }
.toast.success #toast-icon::before { content: '✓'; color: var(--success); font-weight: 700; font-size: 18px; }
.toast.error { border-color: var(--danger); }
.toast.error #toast-icon::before { content: '⚠'; color: var(--danger); font-weight: 700; font-size: 18px; }
.toast.info #toast-icon::before { content: 'ℹ'; color: var(--accent); font-weight: 700; font-size: 18px; }

#toast-icon::before {
  content: 'ℹ';
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
}

@keyframes toastSlide {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (min-width: 768px) {
  #app {
    max-width: 480px;
    margin: 0 auto;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
}

/* ===========================================
   UTILITIES
   =========================================== */
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.text-center { text-align: center; }

/* ===========================================
   ADVANCED FILTERS
   =========================================== */
.advanced-filters {
  margin-bottom: var(--space-3);
}

.filter-toggle {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-toggle:active {
  background: var(--surface-3);
}

.advanced-filters-content {
  margin-top: var(--space-2);
  padding: var(--space-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.filter-row-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.filter-select-full {
  width: 100%;
  padding: var(--space-3);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
}

/* ===========================================
   FINANCING BADGES
   =========================================== */
.financing-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.financing-badge.aprovado {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid var(--success);
}

.financing-badge.pendente {
  background: var(--warning-soft);
  color: var(--warning);
  border: 1px solid var(--warning);
}

.financing-badge.negado {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.financing-badge.nao_solicitado {
  background: var(--surface-3);
  color: var(--text-muted);
}

.trade-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.customer-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border: 1px solid var(--accent);
}

/* ===========================================
   CONVERSATION CARDS - Enhanced
   =========================================== */
.conversation-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

/* ===========================================
   MASS MESSAGE MODAL
   =========================================== */
.mass-message-content {
  padding: var(--space-5);
  padding-bottom: calc(80px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  overflow-y: auto;
}

.anti-ban-warning {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(239, 68, 68, 0.1) 100%);
  border: 1px solid var(--warning);
  border-radius: var(--radius-lg);
}

.warning-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.anti-ban-warning h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--warning);
  margin-bottom: 4px;
}

.anti-ban-warning p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.mini-stat {
  padding: var(--space-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
}

.mini-stat-value {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-hover);
  letter-spacing: -0.02em;
}

.mini-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.template-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-height: 200px;
  overflow-y: auto;
}

.template-item {
  padding: var(--space-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.template-item:active {
  transform: scale(0.98);
  background: var(--surface-3);
}

.template-item.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.template-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.template-preview {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.char-counter {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
}

.recipients-preview {
  padding: var(--space-3);
  background: var(--surface-2);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-secondary);
  max-height: 120px;
  overflow-y: auto;
}

.recipients-preview strong {
  color: var(--text-primary);
}

.anti-ban-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  background: var(--surface-2);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.important-notice {
  padding: var(--space-3);
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-primary);
}

.campaigns-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.campaign-item {
  padding: var(--space-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.campaign-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.campaign-progress {
  height: 4px;
  background: var(--surface-3);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: var(--space-2);
}

.campaign-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--success) 100%);
  transition: width 0.3s;
}

/* ===========================================
   FINANCING MODAL
   =========================================== */
.financing-result {
  margin-top: var(--space-5);
  padding: var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.financing-result h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: var(--space-4);
  color: var(--accent-hover);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.result-item {
  padding: var(--space-3);
  background: var(--bg-input);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.result-item.highlight {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
}

.result-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.result-item.highlight .result-value {
  color: var(--accent-hover);
}

/* ===========================================
   BANKS COMPARISON
   =========================================== */

.banks-comparison {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.bank-card {
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition: all 0.2s ease;
}

.bank-card.best {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.05);
}

.bank-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.bank-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.bank-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.bank-badge.best-badge {
  background: var(--success);
  color: white;
}

.bank-badge.rate-badge {
  background: var(--accent-soft);
  color: var(--accent);
}

.bank-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
}

.bank-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bank-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bank-stat-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.bank-stat-value.highlight {
  color: var(--accent-hover);
  font-size: 16px;
  font-weight: 700;
}

.bank-rate-info {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

.disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--space-3);
  font-style: italic;
}
