/* ============================================
   AVA Cold Caller CRM - Dark Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

:root {
  color-scheme: dark;
  --bg-primary: #050507;
  --bg-card: #0a0a0f;
  --bg-card-hover: #0f0f18;
  --bg-input: #0d0d14;
  --border: #1a1a2e;
  --border-hover: #2a2a42;
  --accent: #f97316;
  --accent-hover: #fb923c;
  --accent-muted: rgba(249, 115, 22, 0.15);
  --accent-glow: rgba(249, 115, 22, 0.25);
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0b0;
  --text-muted: #6b6b7b;
  --success: #22c55e;
  --success-muted: rgba(34, 197, 94, 0.15);
  --warning: #eab308;
  --warning-muted: rgba(234, 179, 8, 0.15);
  --danger: #ef4444;
  --danger-muted: rgba(239, 68, 68, 0.15);
  --info: #3b82f6;
  --info-muted: rgba(59, 130, 246, 0.15);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.6);
  --shadow-drag: 0 12px 32px rgba(249, 115, 22, 0.2);
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ============================================
   Scrollbar
   ============================================ */

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

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

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

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

/* ============================================
   Layout
   ============================================ */

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header .logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.app-header .logo span {
  color: var(--text-primary);
  font-weight: 600;
}

.app-header .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.app-header .user-info .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-muted);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
}

.app-main {
  flex: 1;
  padding: 24px;
  overflow: hidden;
}

/* ============================================
   Stats Bar
   ============================================ */

.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition-normal);
}

.stat-card:hover {
  border-color: var(--border-hover);
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-card .stat-value.accent {
  color: var(--accent);
}

.stat-card .stat-value.success {
  color: var(--success);
}

.stat-card .stat-trend {
  font-size: 0.75rem;
  margin-top: 6px;
  color: var(--text-muted);
}

/* ============================================
   Kanban Board
   ============================================ */

.kanban-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  height: calc(100vh - 220px);
}

.kanban-column {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-normal);
}

.kanban-column.drag-over {
  border-color: var(--accent);
  background: rgba(249, 115, 22, 0.03);
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.kanban-column-header .column-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kanban-column-header .column-count {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--accent-muted);
  color: var(--accent);
}

.kanban-column-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kanban-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 16px;
}

/* Kanban Card */

.kanban-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all var(--transition-normal);
  user-select: none;
}

.kanban-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card-hover);
}

.kanban-card.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
  box-shadow: var(--shadow-drag);
}

.kanban-card .card-company {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kanban-card .card-phone {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.kanban-card .card-city {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.kanban-card .card-rappel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 8px;
  font-weight: 500;
}

.kanban-card .card-rappel.urgent {
  background: var(--danger-muted);
  color: var(--danger);
}

.kanban-card .card-rappel.upcoming {
  background: var(--warning-muted);
  color: var(--warning);
}

.kanban-card .card-rappel.future {
  background: var(--info-muted);
  color: var(--info);
}

.kanban-card .card-niche {
  display: inline-block;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--accent-muted);
  color: var(--accent);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}

.kanban-card .card-caller-badge {
  display: inline-block;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ============================================
   Modal
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.1rem;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  font-size: 1.2rem;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ============================================
   Forms
   ============================================ */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a0a0b0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-secondary {
  background: var(--border);
  color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--border-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-card);
  border-color: var(--border-hover);
}

.btn-danger {
  background: var(--danger-muted);
  color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
}

/* ============================================
   Tabs
   ============================================ */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.tab {
  padding: 12px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  font-family: 'Inter', sans-serif;
}

.tab:hover {
  color: var(--text-secondary);
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ============================================
   Table
   ============================================ */

.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  padding: 12px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-align: left;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 12px 16px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

tbody tr {
  transition: background var(--transition-fast);
}

tbody tr:hover {
  background: var(--bg-card-hover);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr.clickable {
  cursor: pointer;
}

/* ============================================
   Toast
   ============================================ */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-card);
  animation: toastIn 300ms ease, toastOut 300ms ease 2700ms forwards;
  max-width: 360px;
}

.toast.success {
  background: var(--success-muted);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.toast.error {
  background: var(--danger-muted);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.toast.warning {
  background: var(--warning-muted);
  color: var(--warning);
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.toast.info {
  background: var(--info-muted);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

@keyframes toastIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* ============================================
   Drag & Drop CSV Zone
   ============================================ */

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.drop-zone .drop-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.drop-zone .drop-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.drop-zone .drop-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   Lead Info Grid
   ============================================ */

.lead-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.lead-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lead-info-item .info-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.lead-info-item .info-value {
  font-size: 0.875rem;
  color: var(--text-primary);
}

.lead-info-item .info-value a {
  color: var(--accent);
  text-decoration: none;
}

.lead-info-item .info-value a:hover {
  text-decoration: underline;
}

/* ============================================
   Call History
   ============================================ */

.call-history {
  margin-bottom: 24px;
}

.call-history h3 {
  font-size: 0.85rem;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.call-entry {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

.call-entry .call-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.call-entry .call-content {
  flex: 1;
}

.call-entry .call-outcome {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.call-entry .call-summary {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.call-entry .call-date {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.call-no-history {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
}

/* ============================================
   Badges / Pills
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-orange { background: var(--accent-muted); color: var(--accent); }
.badge-green { background: var(--success-muted); color: var(--success); }
.badge-red { background: var(--danger-muted); color: var(--danger); }
.badge-yellow { background: var(--warning-muted); color: var(--warning); }
.badge-blue { background: var(--info-muted); color: var(--info); }

/* ============================================
   Access Denied Screen
   ============================================ */

.access-denied {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 24px;
}

.access-denied .lock-icon {
  font-size: 4rem;
  margin-bottom: 24px;
  opacity: 0.3;
}

.access-denied h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.access-denied p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ============================================
   Loading Spinner
   ============================================ */

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 16px;
}

.loading-screen p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ============================================
   Column status colors
   ============================================ */

.status-a_contacter .column-title { color: var(--text-secondary); }
.status-message_laisse .column-title { color: var(--warning); }
.status-a_rappeler .column-title { color: var(--info); }
.status-en_discussion .column-title { color: #a855f7; }
.status-rdv_fixe .column-title { color: var(--success); }
.status-non_interesse .column-title { color: var(--danger); }

/* Column top border accent */
.status-a_contacter { border-top: 3px solid var(--text-muted); }
.status-message_laisse { border-top: 3px solid var(--warning); }
.status-a_rappeler { border-top: 3px solid var(--info); }
.status-en_discussion { border-top: 3px solid #a855f7; }
.status-rdv_fixe { border-top: 3px solid var(--success); }
.status-non_interesse { border-top: 3px solid var(--danger); }

/* ============================================
   Caller color assignments (admin view)
   ============================================ */

.caller-color-0 { background: rgba(249, 115, 22, 0.15); color: #f97316; }
.caller-color-1 { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.caller-color-2 { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.caller-color-3 { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.caller-color-4 { background: rgba(236, 72, 153, 0.15); color: #ec4899; }
.caller-color-5 { background: rgba(14, 165, 233, 0.15); color: #0ea5e9; }
.caller-color-6 { background: rgba(234, 179, 8, 0.15); color: #eab308; }
.caller-color-7 { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* ============================================
   Import Preview Table
   ============================================ */

.import-preview {
  margin-top: 24px;
}

.import-preview .preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.import-preview .preview-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.mapping-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.mapping-row .csv-col {
  min-width: 120px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.mapping-row .arrow {
  color: var(--text-muted);
}

/* ============================================
   Checkbox
   ============================================ */

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-wrapper input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-input);
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.checkbox-wrapper input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-wrapper input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ============================================
   Mobile Bottom Nav (Caller)
   ============================================ */

.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 8px 0;
  z-index: 200;
}

.mobile-nav-items {
  display: flex;
  justify-content: space-around;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  color: var(--text-muted);
  font-size: 0.65rem;
  cursor: pointer;
  border: none;
  background: none;
  font-family: 'Inter', sans-serif;
  transition: color var(--transition-fast);
}

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

.mobile-nav-item .nav-icon {
  font-size: 1.25rem;
}

/* ============================================
   Mobile Column Selector
   ============================================ */

.mobile-column-selector {
  display: none;
  overflow-x: auto;
  gap: 8px;
  padding: 0 0 16px 0;
  margin-bottom: 16px;
}

.mobile-column-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all var(--transition-fast);
}

.mobile-column-btn.active {
  background: var(--accent-muted);
  color: var(--accent);
  border-color: var(--accent);
}

/* ============================================
   Assignment Bar (Admin)
   ============================================ */

.assignment-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

.assignment-bar.visible {
  display: flex;
}

.assignment-bar .selected-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  .app-header {
    padding: 12px 16px;
  }

  .app-main {
    padding: 16px;
    padding-bottom: 80px;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-card .stat-value {
    font-size: 1.35rem;
  }

  .kanban-container {
    height: auto;
    min-height: calc(100vh - 340px);
  }

  .kanban-container:not(.mobile-single) {
    flex-wrap: nowrap;
  }

  .kanban-container.mobile-single {
    flex-wrap: nowrap;
  }

  .kanban-container.mobile-single .kanban-column {
    display: none;
    flex: 1 1 100%;
    min-width: 0;
  }

  .kanban-container.mobile-single .kanban-column.mobile-visible {
    display: flex;
  }

  .mobile-nav {
    display: block;
  }

  .mobile-column-selector {
    display: flex;
  }

  .modal {
    max-width: 100%;
    max-height: 100vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    align-self: flex-end;
  }

  .lead-info-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .tabs {
    overflow-x: auto;
  }

  .tab {
    padding: 10px 14px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .stats-bar {
    grid-template-columns: 1fr;
  }
}
/* ============================================
   Filter Bar Styles
   ============================================ */

.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-input {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.filter-input:focus {
  border-color: var(--accent);
}

.filter-input::placeholder {
  color: var(--text-muted);
}

.filter-select {
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  outline: none;
  min-width: 140px;
}

.filter-select:focus {
  border-color: var(--accent);
}

.filter-count {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
}

.show-more-btn {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.show-more-btn:hover {
  background: var(--accent-muted);
  border-color: var(--accent);
}

@media (max-width: 768px) {
  .filter-bar {
    padding: 8px 12px;
    gap: 8px;
  }
  .filter-input {
    min-width: 100%;
  }
  .filter-select {
    flex: 1;
    min-width: 0;
  }
}

/* Phone Badges */
.phone-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}
.phone-badge.mobile {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
}
.phone-badge.fixe {
  background: rgba(59,130,246,0.15);
  color: #3b82f6;
}

/* Card Rating */
.card-rating {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.card-rating .star {
  color: #f59e0b;
}
.card-rating .rev-count {
  font-size: 11px;
  opacity: 0.7;
}

/* Card Calls Count */
.card-calls {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

/* Card Niche Tag */
.card-niche {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(139,92,246,0.12);
  color: #a78bfa;
  display: inline-block;
  margin-top: 4px;
  font-weight: 500;
}

/* Select dropdown options - dark theme */
.filter-select option {
  background: #1a1a2e;
  color: #f0f0f0;
  padding: 8px;
}
select option {
  background: #1a1a2e;
  color: #f0f0f0;
}
