/* ============================================================
   CEREBRUM CRM — Premium Stylesheet
   Dark-first theme with teal accent
   All class names match index.php & app.js exactly
   ============================================================ */

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

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */

[data-theme="dark"],
:root {
  --accent: #28AFB0;
  --accent-dark: #1A535C;
  --accent-light: #3DD4D5;
  --accent-glow: rgba(40, 175, 176, 0.15);

  --bg-page: #0A0F1A;
  --bg-card: #111827;
  --bg-card-hover: #1A2332;
  --bg-input: #0D1420;
  --bg-sidebar: #0D1117;

  --text-primary: #E5E7EB;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --text-heading: #FFFFFF;

  --border: #1F2E40;
  --border-light: rgba(31, 46, 64, 0.5);

  --success: #10B981;
  --success-badge: #34D399;
  --warning: #F6AE2D;
  --danger: #EF4444;
  --danger-badge: #F87171;
  --purple: #8B5CF6;
  --gold: #F6AE2D;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(40, 175, 176, 0.1);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

[data-theme="light"] {
  --accent: #1A9A9B;
  --accent-dark: #157A7B;
  --accent-light: #28AFB0;
  --accent-glow: rgba(40, 175, 176, 0.10);

  --bg-page: #F3F4F6;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F9FAFB;
  --bg-input: #FFFFFF;
  --bg-sidebar: #FFFFFF;

  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --text-heading: #111827;

  --border: #E5E7EB;
  --border-light: rgba(209, 213, 219, 0.5);

  --success: #059669;
  --success-badge: #059669;
  --warning: #D97706;
  --danger: #DC2626;
  --danger-badge: #DC2626;
  --purple: #7C3AED;
  --gold: #D97706;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 20px rgba(40, 175, 176, 0.05);
}

/* ============================================================
   GLOBAL RESET & BASE
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-light);
}

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

::selection {
  background: var(--accent);
  color: #FFFFFF;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */

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

::-webkit-scrollbar-track {
  background: var(--bg-page);
}

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

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

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg-page);
}

/* ============================================================
   LAYOUT — .app-layout grid
   ============================================================ */

.app-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 260px;
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 800;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

/* .brand-text — shared between login, sidebar, mobile-header */
.brand-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
}

/* .brand-sub — subtitle under brand in login/setup */
.brand-sub {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-top: 4px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

/* .nav-link — sidebar navigation links (NOT .sidebar-nav-link) */
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  margin: 1px 0;
  text-decoration: none;
  cursor: pointer;
}

.nav-link:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.nav-link.active {
  background: var(--accent-glow);
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

.nav-link svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-link.active svg {
  opacity: 1;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* .sidebar-clock — clock display in sidebar footer */
.sidebar-clock {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

/* .sidebar-overlay — mobile overlay behind sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 799;
}

/* Uses .show NOT .active */
.sidebar-overlay.show {
  display: block;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */

.main-content {
  grid-column: 2;
  padding: 24px;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100vh;
}

.page {
  /* page wrapper divs — no extra styling needed beyond display toggling */
}

/* ============================================================
   PAGE HEADER — flex-between with h1 + .toolbar-right
   ============================================================ */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ============================================================
   MOBILE HEADER
   ============================================================ */

.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 798;
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-heading);
}

.card-body {
  color: var(--text-primary);
}

.card-footer {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

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

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

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary:hover {
  background: var(--accent);
  color: #FFFFFF;
}

.btn-danger {
  background: var(--danger);
  color: #FFFFFF;
  border-color: var(--danger);
}

.btn-danger:hover {
  background: #DC2626;
  border-color: #DC2626;
}

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

.btn-ghost:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  flex-shrink: 0;
}

.btn-icon.btn-sm {
  width: 28px;
  height: 28px;
}

.btn-group {
  display: flex;
  flex-direction: row;
  gap: 8px;
}

/* ============================================================
   FORMS
   ============================================================ */

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  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-input.error {
  border-color: var(--danger);
}

.form-input.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239CA3AF' d='M6 8.825L1.175 4 2.238 2.938 6 6.7 9.763 2.937 10.825 4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

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

/* .form-select-sm / .form-input-sm — compact variants for filter bars */
.form-select-sm {
  padding: 6px 32px 6px 10px;
  font-size: 13px;
  background-position: right 10px center;
}

.form-input-sm {
  padding: 6px 10px;
  font-size: 13px;
}

/* .form-checkbox — applied directly on <input type="checkbox"> NOT on a wrapper */
.form-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--bg-input);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  position: relative;
  vertical-align: middle;
}

.form-checkbox:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.form-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #FFFFFF;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form-checkbox:focus {
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* .checkbox-group — group of checkbox labels */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* .checkbox-label — label wrapping checkbox + text */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

/* ============================================================
   TABLES
   ============================================================ */

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

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead {
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 5;
}

.data-table th {
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
  user-select: none;
}

/* .sortable — clickable sortable column header */
.sortable {
  cursor: pointer;
  transition: color 0.2s ease;
}

.sortable:hover {
  color: var(--text-primary);
}

/* .sort-icon — sort direction indicator */
.sort-icon {
  display: inline-block;
  margin-left: 4px;
  opacity: 0.5;
  font-size: 10px;
  transition: opacity 0.2s ease;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 14px;
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr {
  transition: background 0.15s ease;
}

.data-table tbody tr:hover td {
  background: var(--bg-card-hover);
}

/* .selected — selected table row */
.data-table tbody tr.selected td {
  background: var(--accent-glow);
}

/* .lead-name-link — clickable lead name */
.lead-name-link {
  color: var(--accent);
  font-weight: 600;
  transition: color 0.2s ease;
}

.lead-name-link:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

/* .contact-icons — flex row of contact action icons */
.contact-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================
   BADGES
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success-badge);
}

.badge-warning {
  background: rgba(246, 174, 45, 0.15);
  color: var(--warning);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger-badge);
}

.badge-gray {
  background: rgba(107, 114, 128, 0.15);
  color: var(--text-muted);
}

.badge-purple {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple);
}

.badge-accent {
  background: var(--accent-glow);
  color: var(--accent);
}

.badge-muted {
  background: rgba(107, 114, 128, 0.15);
  color: var(--text-muted);
}

/* .badge-stage — stage badge with inline background/color */
.badge-stage {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

/* ============================================================
   FILTER BAR
   ============================================================ */

.filter-bar {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   VIEW TOGGLE
   ============================================================ */

.view-toggle {
  display: flex;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.view-toggle-btn {
  padding: 8px 16px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
}

.view-toggle-btn:hover {
  background: var(--bg-card-hover);
}

.view-toggle-btn.active {
  background: var(--accent);
  color: #FFFFFF;
}

/* ============================================================
   BULK BAR
   ============================================================ */

.bulk-bar {
  position: fixed;
  bottom: 0;
  left: 260px;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  animation: slideUp 0.25s ease forwards;
}

/* ============================================================
   KANBAN BOARD
   ============================================================ */

.kanban {
  display: flex;
  flex-direction: row;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  min-height: 60vh;
  align-items: flex-start;
}

.kanban-column {
  min-width: 280px;
  max-width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  max-height: calc(100vh - 200px);
}

[data-theme="light"] .kanban-column {
  background: rgba(249, 250, 251, 0.7);
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-heading);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

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

.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.kanban-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent-light);
}

.kanban-card-name {
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 4px;
  font-size: 14px;
}

.kanban-card-company {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 6px;
}

.kanban-card-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.kanban-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
  min-width: 0;
}

.kanban-detail svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.kanban-detail a {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kanban-detail a:hover {
  color: var(--accent);
}

.kanban-comment {
  font-style: italic;
  opacity: 0.8;
}

.kanban-comment span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* .kanban-card-meta — bottom area with date + icons */
.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   MODAL
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

/* Uses .show NOT .active */
.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s ease;
}

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

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

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

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

/* ============================================================
   SLIDEOUT
   ============================================================ */

.slideout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Uses .show NOT .active */
.slideout-overlay.show {
  opacity: 1;
  visibility: visible;
}

.slideout {
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  width: 700px;
  max-width: 90vw;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  z-index: 901;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.slideout-overlay.show .slideout {
  transform: translateX(0);
}

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

.slideout-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0;
}

.slideout-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.slideout-section {
  margin-bottom: 24px;
}

/* ============================================================
   LEAD DETAIL — detail-grid, detail-item, detail-label
   ============================================================ */

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.detail-item:nth-last-child(-n+2) {
  border-bottom: none;
}

.detail-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.detail-item > span:last-child {
  font-size: 14px;
  color: var(--text-primary);
}

/* ============================================================
   TIMELINE
   ============================================================ */

.timeline {
  display: flex;
  flex-direction: column;
}

.timeline-input {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  align-items: flex-end;
}

.timeline-input .form-textarea {
  flex: 1;
  min-height: 60px;
}

.timeline-input-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.timeline-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* .timeline-avatar-system — gray system avatar (NOT .timeline-avatar.system) */
.timeline-avatar-system {
  background: var(--bg-card-hover);
  color: var(--text-muted);
}

.timeline-content {
  flex: 1;
  min-width: 0;
}

.timeline-content p {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.timeline-meta {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

.timeline-event {
  color: var(--text-muted) !important;
  font-style: italic;
  font-size: 13px !important;
}

/* .recording — mic button recording state (pulsing glow) */
.recording {
  background: var(--accent) !important;
  color: #FFFFFF !important;
  border-color: var(--accent) !important;
  animation: micPulse 1.5s ease infinite;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

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

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  min-width: 300px;
  max-width: 420px;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Uses .show for visibility */
.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-success {
  border-left-color: var(--success);
}

.toast-error {
  border-left-color: var(--danger);
}

.toast-warning {
  border-left-color: var(--warning);
}

.toast-info {
  border-left-color: var(--accent);
}

/* .toast-content — inner flex wrapper with icon + text */
.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  font-size: 14px;
}

.toast-content svg {
  flex-shrink: 0;
}

.toast-success .toast-content svg {
  color: var(--success);
}

.toast-error .toast-content svg {
  color: var(--danger);
}

/* ============================================================
   TABS
   ============================================================ */

.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 0;
  overflow-x: auto;
}

.tab {
  padding: 12px 20px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  background: none;
}

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

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

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.login-page {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-page);
  padding: 20px;
}

/* .setup-page.login-page inherits login-page styles */
.setup-page.login-page {
  /* inherits from .login-page */
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  width: 90%;
  padding: 40px;
}

/* .login-card.card — combined class, ensure card hover is subtle */
.login-card.card:hover {
  box-shadow: var(--shadow-lg);
}

.login-brand {
  text-align: center;
  margin-bottom: 32px;
}

.login-brand .brand-text {
  font-size: 28px;
  letter-spacing: 4px;
  display: block;
}

.login-brand .brand-sub {
  display: block;
}

.login-form .form-group {
  margin-bottom: 20px;
}

/* ============================================================
   DASHBOARD — TIME TRACKER
   ============================================================ */

.timer-section {
  text-align: center;
}

.timer-display {
  font-size: 48px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-heading);
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.timer-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.timer-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.timer-stat {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timer-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timer-stat span:last-child {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-heading);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   DASHBOARD — MONTHLY TARGETS
   ============================================================ */

.targets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.target-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  background: var(--bg-card-hover);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.target-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.target-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-heading);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   DASHBOARD — KPI CARDS
   ============================================================ */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.kpi-card:hover {
  box-shadow: var(--shadow-md);
}

.kpi-card.ahead {
  border-left: 3px solid var(--success);
}

.kpi-card.behind {
  border-left: 3px solid var(--danger);
}

.kpi-title {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.kpi-progress {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
  margin-bottom: 12px;
}

.kpi-progress-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* Progress bar color classes — used by KPI and mini progress */
.bg-success {
  background: var(--success);
}

.bg-warning {
  background: var(--warning);
}

.bg-danger {
  background: var(--danger);
}

.kpi-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ============================================================
   DASHBOARD — FOLLOW-UPS
   ============================================================ */

.followup-section {
  margin-bottom: 16px;
}

.followup-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-heading);
}

.followup-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s ease;
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}

.followup-item:last-child {
  border-bottom: none;
}

.followup-item:hover {
  background: var(--bg-card-hover);
}

.followup-item.followup-overdue {
  border-left: 3px solid var(--danger);
  background: rgba(239, 68, 68, 0.05);
}

.followup-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.followup-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ============================================================
   DASHBOARD — ACTIVITY LOG
   ============================================================ */

.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.activity-input-card {
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: border-color 0.2s ease;
}

.activity-input-card:focus-within {
  border-color: var(--accent);
}

.activity-input-card .form-label {
  margin-bottom: 8px;
}

.activity-input-card .form-input {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* .mini-progress / .mini-progress-bar — tiny progress bars */
.mini-progress {
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
  margin-top: 8px;
}

.mini-progress-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ============================================================
   DASHBOARD — DAILY REPORT
   ============================================================ */

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.report-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  background: var(--bg-card-hover);
  border-radius: var(--radius-sm);
}

.report-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.report-item > span:last-child {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-heading);
}

/* Month history row tinting — applied on .data-table rows */
.status-successful td {
  background: rgba(16, 185, 129, 0.05);
}

.status-partial td {
  background: rgba(246, 174, 45, 0.05);
}

.status-failed td {
  background: rgba(239, 68, 68, 0.05);
}

.status-dayoff td {
  background: rgba(107, 114, 128, 0.05);
}

/* .week-subtotal — bold subtotal row */
.week-subtotal td {
  font-weight: 700;
  background: var(--bg-card-hover) !important;
  border-bottom: 2px solid var(--border);
}

/* ============================================================
   SETTINGS
   ============================================================ */

.settings-list {
  display: flex;
  flex-direction: column;
}

.settings-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.settings-list-item:last-child {
  border-bottom: none;
}

.item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.item-name {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.item-color {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.item-actions {
  display: flex;
  gap: 4px;
}

/* ============================================================
   WHATSAPP BUTTON
   ============================================================ */

.wa-btn {
  background: #25D366;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.wa-btn:hover {
  background: #1EBE5A;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.wa-btn.btn-sm {
  padding: 4px 8px;
  font-size: 12px;
}

/* ============================================================
   SPINNER & LOADING
   ============================================================ */

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* .spinner-wrapper — centered spinner container */
.spinner-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

/* .empty-state — centered empty message */
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
}

.empty-state p {
  max-width: 400px;
  line-height: 1.6;
}

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */

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

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

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes micPulse {
  0% { box-shadow: 0 0 0 0 rgba(40, 175, 176, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(40, 175, 176, 0); }
  100% { box-shadow: 0 0 0 0 rgba(40, 175, 176, 0); }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

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

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-wrap {
  flex-wrap: wrap;
}

.align-center {
  align-items: center;
}

.gap-sm { gap: 8px; }
.gap-md { gap: 12px; }
.gap-lg { gap: 24px; }

.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-heading { color: var(--text-heading); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }

.hidden { display: none !important; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.w-full { width: 100%; }

/* ============================================================
   RESPONSIVE — TABLET (<=768px)
   ============================================================ */

@media (max-width: 768px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    transform: translateX(-100%);
    z-index: 800;
  }

  /* .sidebar.open — mobile open state */
  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    grid-column: 1;
    padding: 16px;
    padding-top: 72px;
    height: 100vh;
  }

  .mobile-header {
    display: flex;
  }

  .desktop-only {
    display: none !important;
  }

  .page-header h1 {
    font-size: 20px;
  }

  .modal {
    max-width: 100%;
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .modal-overlay {
    align-items: flex-end;
  }

  .modal-overlay.show .modal {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .slideout {
    width: 100%;
    max-width: 100vw;
  }

  .kanban {
    min-height: auto;
  }

  .kanban-column {
    min-width: 260px;
  }

  .activity-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .kpi-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .toolbar-right {
    flex-wrap: wrap;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    width: 100%;
  }

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

  .bulk-bar {
    left: 0;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .timer-display {
    font-size: 36px;
  }

  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .toast {
    min-width: auto;
    max-width: 100%;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .report-grid {
    grid-template-columns: 1fr;
  }

  .targets-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .followup-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .followup-actions {
    width: 100%;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (<=480px)
   ============================================================ */

@media (max-width: 480px) {
  .main-content {
    padding: 12px;
    padding-top: 68px;
  }

  .card {
    padding: 16px;
    border-radius: var(--radius-sm);
  }

  .page-header h1 {
    font-size: 18px;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .activity-grid {
    grid-template-columns: 1fr;
  }

  .kanban-column {
    min-width: 240px;
    max-width: 280px;
  }

  .timer-display {
    font-size: 28px;
  }

  .kpi-value {
    font-size: 22px;
  }

  .btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-footer {
    padding: 12px 16px;
  }

  .slideout-body {
    padding: 16px;
  }

  .slideout-header {
    padding: 16px;
  }

  .login-card {
    padding: 24px;
  }

  .toolbar-right {
    width: 100%;
  }

  .btn-group {
    flex-wrap: wrap;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================
   VISIBILITY HELPERS
   ============================================================ */

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .mobile-only {
    display: flex;
  }
}

@media (min-width: 769px) {
  .desktop-only {
    display: flex;
  }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {
  body {
    background: #FFFFFF;
    color: #000000;
    overflow: visible;
    height: auto;
  }

  .sidebar,
  .mobile-header,
  .sidebar-overlay,
  .btn,
  .btn-group,
  .toolbar-right,
  .filter-bar,
  .bulk-bar,
  .toast-container,
  .modal-overlay,
  .slideout-overlay,
  .view-toggle,
  .timeline-input,
  .timer-actions,
  .followup-actions {
    display: none !important;
  }

  .app-layout {
    display: block;
  }

  .main-content {
    padding: 0;
    height: auto;
    overflow: visible;
  }

  .card {
    box-shadow: none;
    border: 1px solid #DDD;
    break-inside: avoid;
  }

  .data-table th,
  .data-table td {
    border: 1px solid #DDD;
    color: #000;
  }

  .badge {
    border: 1px solid currentColor;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}

/* ============================================================
   INLINE STAGE SELECT (in lead table rows)
   ============================================================ */

.inline-stage-select {
  appearance: none;
  -webkit-appearance: none;
  border-radius: 999px;
  padding: 4px 24px 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%239CA3AF' d='M6 8.825L1.175 4 2.238 2.938 6 6.7 9.763 2.937 10.825 4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  max-width: 160px;
}

.inline-stage-select:hover {
  opacity: 0.85;
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.inline-stage-select:focus {
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

/* ============================================================
   FILTER DROPDOWN (multi-select checkbox menu)
   ============================================================ */

.filter-dropdown-btn {
  border: 1px solid var(--border) !important;
  background: var(--bg-input) !important;
}

.filter-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  padding: 8px 0;
  margin-top: 4px;
}

.filter-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  transition: background 0.15s ease;
}

.filter-dropdown-item:hover {
  background: var(--bg-card-hover);
}

.filter-dropdown-item .item-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.filter-dropdown-actions {
  padding: 8px 16px 4px;
  border-top: 1px solid var(--border-light);
  margin-top: 4px;
  display: flex;
  justify-content: flex-end;
}

/* ============================================================
   ACTIVITY HIT BUTTON
   ============================================================ */

.activity-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.activity-input-row .form-input {
  flex: 1;
}

.btn-hit {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 44px;
}

.btn-hit-minus {
  border: 1px solid var(--border) !important;
  color: var(--text-secondary) !important;
}

.btn-hit-minus:hover {
  border-color: var(--warning) !important;
  color: var(--warning) !important;
  background: rgba(246, 174, 45, 0.1) !important;
}

/* ============================================================
   TOUCH MESSAGES SECTION
   ============================================================ */

.touch-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.touch-block {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
}

.touch-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.touch-block .form-group {
  margin-bottom: 12px;
}

.touch-block .form-group:last-child {
  margin-bottom: 0;
}

.touch-block .form-textarea {
  min-height: 50px;
  font-size: 13px;
}

/* ============================================================
   INLINE FOLLOW-UP
   ============================================================ */

.inline-followup {
  padding: 4px 10px !important;
  font-size: 13px !important;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ============================================================
   PROSPECTOR SCREEN
   ============================================================ */

.prospector-search-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prospector-search-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.prospector-search-row .form-group {
  margin-bottom: 0;
}

.prospector-search-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.prospector-quick-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.prospector-quick-cat {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.prospector-quick-cat:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.prospector-results-panel .card-header {
  flex-wrap: wrap;
  gap: 12px;
}

.prospector-filters {
  display: flex;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.prospector-filters .form-input {
  padding: 6px 12px;
  font-size: 13px;
  min-width: 180px;
}

/* ============================================================
   FLOATING ACTIVITY TRACKER
   ============================================================ */

.floating-activity {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.floating-activity-toggle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-activity-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 0 24px rgba(40, 175, 176, 0.4);
}

.floating-activity-toggle.open {
  background: var(--danger);
}

.floating-activity-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
  animation: slideUp 0.2s ease;
}

.floating-activity-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 4px 8px 6px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 2px;
}

.floating-hit-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-primary);
  font-size: 14px;
  transition: background 0.15s ease;
}

.floating-hit-btn:hover {
  background: var(--accent-glow);
}

.floating-hit-btn:active {
  background: var(--accent);
  color: #fff;
}

.floating-hit-btn span:first-child {
  font-size: 18px;
}

.floating-count {
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  min-width: 24px;
  text-align: right;
}

@media (max-width: 768px) {
  .floating-activity {
    bottom: 16px;
    right: 16px;
  }

  .floating-activity-toggle {
    width: 46px;
    height: 46px;
  }
}

.prospector-table {
  font-size: 13px;
}

.prospector-table td {
  padding: 10px 12px;
}

.prospector-table th {
  padding: 10px 12px;
}

.prosp-row-imported td {
  opacity: 0.6;
}

.prospector-imported-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
  border-radius: 999px;
  white-space: nowrap;
}

.prospector-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  gap: 16px;
  text-align: center;
}

.prospector-empty-state p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 400px;
}

.prosp-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.prosp-pagination-btns {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.prosp-pagination-btns .btn {
  min-width: 36px;
  padding: 6px 10px;
}

/* Leads pagination */
.leads-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.leads-pagination-btns {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.leads-pagination-btns .btn {
  min-width: 36px;
  padding: 6px 10px;
}

@media (max-width: 768px) {
  .leads-pagination {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .prosp-pagination {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .prospector-search-row {
    flex-direction: column;
  }

  .prospector-search-row .form-group {
    flex: 1 1 100% !important;
  }

  .prospector-quick-cats {
    gap: 6px;
  }

  .prospector-quick-cat {
    font-size: 11px;
    padding: 4px 10px;
  }
}
