/* ==========================================================================
   DYNAMIC QUOTE
   A beautiful, focused stylesheet for insurance quoting
   Dark-first design inspired by Fizzy, clean and minimal
   ========================================================================== */

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

/* Screen reader only - visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */

:root {
  /* Base palette - Dark mode default (matte, softer blacks) */
  --bg-base: #141418;
  --bg-surface: #1c1c21;
  --bg-elevated: #242429;
  --bg-hover: #2c2c32;
  
  --border-subtle: #333338;
  --border-default: #44444a;
  
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-tertiary: #52525b;
  --text-muted: #71717a;
  
  /* Status colors - The soul of the app */
  --status-not-now: #94a3b8;
  --status-intake: #3b82f6;
  --status-underwriters: #f59e0b;
  --status-quoted: #a855f7;
  --status-presented: #ec4899;
  --status-bound: #22c55e;
  --status-not-taken: #6b7280;
  
  /* Accents */
  --accent-primary: #10b981;
  --accent-primary-hover: #059669;
  --accent-success: #22c55e;
  --accent-danger: #ef4444;
  --accent-warning: #f59e0b;
  --accent-subtle: rgba(16, 185, 129, 0.1);
  --accent-muted: rgba(16, 185, 129, 0.25);
  
  /* Sizing */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Animation */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.1s;
  --duration-normal: 0.2s;
  
  /* Shadows */
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  
  color-scheme: dark;
}

/* Light mode override */
[data-theme="light"] {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --bg-hover: #f1f5f9;
  
  --border-subtle: #e2e8f0;
  --border-default: #cbd5e1;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #cbd5e1;
  --text-muted: #94a3b8;
  
  color-scheme: light;
}

/* ==========================================================================
   BASE
   ========================================================================== */

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

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   APP SHELL
   ========================================================================== */

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

/* Fixed actions wrapper - for elements that need fixed positioning outside app-shell */
.fixed-actions-wrapper {
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  padding: 0 32px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-logo {
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  gap: 12px;
  position: absolute;
}

.header-actions--left {
  left: 32px;
}

.header-actions--right {
  right: 32px;
}

.header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: background var(--duration-fast), color var(--duration-fast);
}

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

.app-main {
  flex: 1;
  width: 100%;
  display: block;
}

/* ==========================================================================
   BOARD - Kanban Pipeline
   ========================================================================== */

.board-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 56px);
  overflow: auto;
}

.board-page__board {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.board-page__board[hidden] {
  display: none !important;
}

.board-filter-results[hidden] {
  display: none !important;
}

.board {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 0 28px 28px;
  overflow-x: auto;
  background: var(--bg-base);
  align-items: flex-start;
}

.board-column {
  display: flex;
  flex-direction: column;
  min-width: 340px;
  max-width: 420px;
  background: transparent;
  border-radius: var(--radius-xl);
}

/* Column Header */
.column-header {
  padding: 20px 24px 16px;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 12px;
}

.column-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

.column-count {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Status-colored counts */
.board-column--not_now .column-count { color: var(--status-not-now); }
.board-column--intake .column-count { color: var(--status-intake); }
.board-column--with_underwriters .column-count { color: var(--status-underwriters); }
.board-column--quoted .column-count { color: var(--status-quoted); }
.board-column--presented .column-count { color: var(--status-presented); }
.board-column--bound .column-count { color: var(--status-bound); }
.board-column--not_taken .column-count { color: var(--status-not-taken); }

/* Column Cards Area */
.column-cards {
  padding: 0 8px 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
}

/* Empty column styles are now handled by accordion collapsed state */
/* The board-column--empty class is kept for semantic purposes but
   visual styling is controlled by board-column--collapsed and board-column--expanded */

/* Header action icons - menu and add */
.column-header__menu,
.column-header__add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  text-decoration: none;
}

.column-header__menu:hover,
.column-header__add:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Hide add button in collapsed columns */
.board-column--collapsed .column-header__add {
  display: none;
}

/* Hide menu button in collapsed columns */
.board-column--collapsed .column-header__menu {
  display: none;
}

/* Hide cards area in collapsed columns */
.board-column--collapsed .column-cards {
  display: none;
}

/* ==========================================================================
   ADD CARD MENU - Company Search/Add Dropdown
   ========================================================================== */

.add-card-menu {
  position: absolute;
  z-index: 9999;
  width: 320px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 10px 20px -5px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.add-card-menu[hidden] {
  display: none;
}

.add-card-menu__header {
  padding: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.add-card-menu__input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: 14px;
  background: var(--bg-base);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.add-card-menu__input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-ghost);
}

.add-card-menu__input::placeholder {
  color: var(--text-muted);
}

.add-card-menu__results {
  max-height: 240px;
  overflow-y: auto;
  padding: 8px;
}

.add-card-menu__hint {
  padding: 16px 8px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.add-card-menu__empty {
  padding: 16px 8px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.add-card-menu__result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: background var(--duration-fast);
}

.add-card-menu__result:hover {
  background: var(--bg-hover);
}

.add-card-menu__result-name {
  font-size: 14px;
  font-weight: 500;
}

.add-card-menu__result-dot {
  font-size: 12px;
  color: var(--text-secondary);
}

.add-card-menu__footer {
  padding: 8px 12px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

.add-card-menu__new-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--duration-fast);
}

.add-card-menu__new-btn:hover {
  background: var(--accent-primary-hover);
  color: white;
}

/* Empty placeholder - style for expanded empty columns */
.column-empty-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  font-size: 14px;
  background: var(--bg-surface);
  opacity: 0.7;
  margin: 8px;
}

/* Drop card for empty columns - Basecamp style */
.column-drop-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
}

.column-drop-card__text {
  color: var(--text-tertiary);
  font-size: 14px;
  font-weight: 500;
}

/* Collapsed column */
.board-column-collapsed {
  min-width: 80px;
  max-width: 80px;
  min-height: 400px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.board-column-collapsed:hover {
  background: var(--bg-hover);
  border-color: var(--border-default);
}

.board-column-collapsed .column-title {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.board-column-collapsed .column-count {
  background: var(--accent-primary);
  color: var(--bg-base);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  min-width: 24px;
  text-align: center;
}

/* Board Column Accordion - Collapsed state for non-active columns */
.board-column.board-column--collapsed {
  flex: 0 0 60px;
  min-width: 60px;
  max-width: 60px;
  min-height: 400px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.board-column.board-column--collapsed:hover {
  background: var(--bg-hover);
}

.board-column.board-column--collapsed .column-header {
  padding: 20px 8px;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  height: 100%;
}

.board-column.board-column--collapsed .column-count {
  font-size: 18px;
}

.board-column.board-column--collapsed .column-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 11px;
  white-space: nowrap;
}

.board-column.board-column--collapsed .column-cards {
  display: none;
}

/* Expanded state - normal column display */
.board-column.board-column--expanded {
  flex: 1;
  min-width: 340px;
  max-width: 420px;
}

/* ==========================================================================
   CARDS - Quote Cards on Board
   ========================================================================== */

.card {
  --card-status-color: var(--accent-primary);
  --card-bg: var(--bg-elevated);
  --card-border: var(--border-subtle);
  display: block;
  padding: 18px 22px 24px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--card-status-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.15s var(--ease-spring), box-shadow 0.15s var(--ease-out), background 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Status-colored cards - Light mode (default) */
.card--not_now { 
  --card-status-color: var(--status-not-now); 
  --card-bg: #f1f5f9;
  --card-border: #cbd5e1;
}
.card--intake { 
  --card-status-color: var(--status-intake); 
  --card-bg: #eff6ff;
  --card-border: #bfdbfe;
}
.card--with_underwriters { 
  --card-status-color: var(--status-underwriters); 
  --card-bg: #fffbeb;
  --card-border: #fde68a;
}
.card--quoted { 
  --card-status-color: var(--status-quoted); 
  --card-bg: #faf5ff;
  --card-border: #e9d5ff;
}
.card--presented { 
  --card-status-color: var(--status-presented); 
  --card-bg: #fdf2f8;
  --card-border: #fbcfe8;
}
.card--bound { 
  --card-status-color: var(--status-bound); 
  --card-bg: #f0fdf4;
  --card-border: #bbf7d0;
}
.card--not_taken { 
  --card-status-color: var(--status-not-taken); 
  --card-bg: #f9fafb;
  --card-border: #e5e7eb;
}

/* Status-colored cards - Dark mode */
[data-theme="dark"] .card--not_now { 
  --card-bg: #334155;
  --card-border: #94a3b880;
}
[data-theme="dark"] .card--intake { 
  --card-bg: #1e3a5f;
  --card-border: #3b82f680;
}
[data-theme="dark"] .card--with_underwriters { 
  --card-bg: #422006;
  --card-border: #f59e0b80;
}
[data-theme="dark"] .card--quoted { 
  --card-bg: #3b0764;
  --card-border: #a855f780;
}
[data-theme="dark"] .card--presented { 
  --card-bg: #500724;
  --card-border: #ec489980;
}
[data-theme="dark"] .card--bound { 
  --card-bg: #14532d;
  --card-border: #22c55e80;
}
[data-theme="dark"] .card--not_taken { 
  --card-bg: #27272a;
  --card-border: #6b728080;
}

.card-link {
  display: block;
  -webkit-user-drag: none;
  /* Allow drag events to pass through to parent card */
  pointer-events: none;
}

/* Re-enable pointer events for actual clicking when not dragging */
.card:not(.arrangement-item--dragging) .card-link {
  pointer-events: auto;
}

/* Prevent nested elements from being drag targets */
.card img,
.card svg {
  -webkit-user-drag: none;
}

/* Card header row with Q-ID and client type */
.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.card-quote-id {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: 4px;
}

.card-client-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-secondary);
}

.card-dot {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 4px;
}

.card-dot::before {
  content: "· ";
}

/* Status-specific client type colors */
.card--not_now .card-client-type {
  background: #e2e8f0;
  color: #475569;
}
.card--intake .card-client-type {
  background: #dbeafe;
  color: #1e40af;
}
.card--with_underwriters .card-client-type {
  background: #fef3c7;
  color: #92400e;
}
.card--quoted .card-client-type {
  background: #ede9fe;
  color: #5b21b6;
}
.card--presented .card-client-type {
  background: #fce7f3;
  color: #9d174d;
}
.card--bound .card-client-type {
  background: #d1fae5;
  color: #065f46;
}
.card--not_taken .card-client-type {
  background: #f3f4f6;
  color: #6b7280;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-secondary);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Status-specific tag colors - Light mode */
.card--not_now .card-tag {
  background: #e2e8f0;
  color: #475569;
  border-color: #94a3b8;
}
.card--intake .card-tag {
  background: #dbeafe;
  color: #1e40af;
  border-color: #93c5fd;
}
.card--with_underwriters .card-tag {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}
.card--quoted .card-tag {
  background: #f3e8ff;
  color: #6b21a8;
  border-color: #d8b4fe;
}
.card--presented .card-tag {
  background: #fce7f3;
  color: #9d174d;
  border-color: #f9a8d4;
}
.card--bound .card-tag {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.card--not_taken .card-tag {
  background: #f3f4f6;
  color: #374151;
  border-color: #d1d5db;
}

/* Status-specific tag colors - Dark mode */
[data-theme="dark"] .card--not_now .card-tag {
  background: #334155;
  color: #cbd5e1;
  border-color: #94a3b850;
}
[data-theme="dark"] .card--intake .card-tag {
  background: #1e3a5f;
  color: #93c5fd;
  border-color: #3b82f650;
}
[data-theme="dark"] .card--with_underwriters .card-tag {
  background: #422006;
  color: #fcd34d;
  border-color: #f59e0b50;
}
[data-theme="dark"] .card--quoted .card-tag {
  background: #3b0764;
  color: #d8b4fe;
  border-color: #a855f750;
}
[data-theme="dark"] .card--presented .card-tag {
  background: #500724;
  color: #f9a8d4;
  border-color: #ec489950;
}
[data-theme="dark"] .card--bound .card-tag {
  background: #14532d;
  color: #86efac;
  border-color: #22c55e50;
}
[data-theme="dark"] .card--not_taken .card-tag {
  background: #27272a;
  color: #a1a1aa;
  border-color: #6b728050;
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.card-meta {
  display: flex;
  gap: 12px;
}

.card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.card-timestamp {
  font-size: 12px;
  color: var(--text-muted);
}

.card-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-assignee {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), #0d9488);
  color: white;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   DRAG & DROP
   ========================================================================== */

.arrangement-item--dragging {
  opacity: 0.4;
  transform: scale(0.98);
  border-left-color: var(--text-muted) !important;
}

.arrangement-item--dropped {
  animation: drop-bounce 0.3s var(--ease-spring);
}

@keyframes drop-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* Base active zone style - neutral, overridden by status-specific colors */
.arrangement-zone--active {
  outline: 2px dashed var(--text-tertiary);
  outline-offset: -4px;
  background: rgba(128, 128, 128, 0.05);
}

.board-column.arrangement-zone--active {
  outline-offset: -8px;
}

/* Status-colored drop zones - applied to board-column when active */
.board-column--not_now.arrangement-zone--active {
  outline-color: var(--status-not-now);
  background: rgba(148, 163, 184, 0.08);
}
.board-column--intake.arrangement-zone--active {
  outline-color: var(--status-intake);
  background: rgba(59, 130, 246, 0.08);
}
.board-column--with_underwriters.arrangement-zone--active {
  outline-color: var(--status-underwriters);
  background: rgba(245, 158, 11, 0.08);
}
.board-column--quoted.arrangement-zone--active {
  outline-color: var(--status-quoted);
  background: rgba(168, 85, 247, 0.08);
}
.board-column--presented.arrangement-zone--active {
  outline-color: var(--status-presented);
  background: rgba(236, 72, 153, 0.08);
}
.board-column--bound.arrangement-zone--active {
  outline-color: var(--status-bound);
  background: rgba(34, 197, 94, 0.08);
}
.board-column--not_taken.arrangement-zone--active {
  outline-color: var(--status-not-taken);
  background: rgba(107, 114, 128, 0.08);
}

/* Touch clone styling */
.arrangement-touch-clone {
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}

/* Drop indicator line - matches column status color */
.arrangement-drop-indicator {
  height: 3px;
  background: var(--accent-primary);
  border-radius: 2px;
  margin: 4px 0;
  animation: pulse-indicator 1s infinite;
}

/* Status-colored drop indicators */
.board-column--not_now .arrangement-drop-indicator { background: var(--status-not-now); }
.board-column--intake .arrangement-drop-indicator { background: var(--status-intake); }
.board-column--with_underwriters .arrangement-drop-indicator { background: var(--status-underwriters); }
.board-column--quoted .arrangement-drop-indicator { background: var(--status-quoted); }
.board-column--presented .arrangement-drop-indicator { background: var(--status-presented); }
.board-column--bound .arrangement-drop-indicator { background: var(--status-bound); }
.board-column--not_taken .arrangement-drop-indicator { background: var(--status-not-taken); }

@keyframes pulse-indicator {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ==========================================================================
   MOBILE BOARD - Collapsible column list (Fizzy-inspired)
   ========================================================================== */

/* Show desktop board by default, hide mobile */
.board--desktop {
  display: flex;
}

.board--mobile {
  display: none;
}

/* On mobile screens, flip visibility */
@media (max-width: 768px) {
  .board--desktop {
    display: none;
  }
  
  .board--mobile {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 72px);
    background: var(--bg-base);
  }
}

/* Mobile board header */
.mobile-board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-board-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.mobile-board-count {
  font-size: 14px;
  color: var(--text-muted);
}

/* Mobile columns container */
.mobile-board-columns {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

/* Individual mobile column */
.mobile-column {
  margin: 0 12px 8px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.mobile-column--expanded {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Mobile column header (tappable) */
.mobile-column-header {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 16px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  gap: 12px;
  -webkit-tap-highlight-color: transparent;
}

.mobile-column-header:active {
  background: var(--bg-hover);
}

/* Status count pill */
.mobile-column-count {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 16px;
  color: white;
  background: var(--text-muted);
}

/* Status-colored count pills */
.mobile-column--not_now .mobile-column-count { background: var(--status-not-now); }
.mobile-column--intake .mobile-column-count { background: var(--status-intake); }
.mobile-column--with_underwriters .mobile-column-count { background: var(--status-underwriters); }
.mobile-column--quoted .mobile-column-count { background: var(--status-quoted); }
.mobile-column--presented .mobile-column-count { background: var(--status-presented); }
.mobile-column--bound .mobile-column-count { background: var(--status-bound); }
.mobile-column--not_taken .mobile-column-count { background: var(--status-not-taken); }

.mobile-column-title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.mobile-column-chevron {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.mobile-column--expanded .mobile-column-chevron {
  transform: rotate(90deg);
}

/* Mobile column cards container */
.mobile-column-cards {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--bg-elevated);
}

.mobile-column--expanded .mobile-column-cards {
  border-top: 1px solid var(--border-subtle);
}

.mobile-column-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* Mobile card */
.mobile-card {
  display: block;
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
  transition: background 0.15s ease;
}

.mobile-card:last-child {
  border-bottom: none;
}

.mobile-card:active {
  background: var(--bg-hover);
}

.mobile-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.mobile-card-id {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-surface);
  padding: 2px 8px;
  border-radius: 4px;
}

.mobile-card-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--text-secondary);
}

/* Status-colored badges */
.mobile-card--intake .mobile-card-badge {
  background: rgba(59, 130, 246, 0.15);
  color: var(--status-intake);
}
.mobile-card--with_underwriters .mobile-card-badge {
  background: rgba(245, 158, 11, 0.15);
  color: var(--status-underwriters);
}
.mobile-card--quoted .mobile-card-badge {
  background: rgba(168, 85, 247, 0.15);
  color: var(--status-quoted);
}
.mobile-card--presented .mobile-card-badge {
  background: rgba(236, 72, 153, 0.15);
  color: var(--status-presented);
}
.mobile-card--bound .mobile-card-badge {
  background: rgba(34, 197, 94, 0.15);
  color: var(--status-bound);
}

.mobile-card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.mobile-card-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 4px;
}

.mobile-card-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mobile-card-meta-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.mobile-card-meta-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.mobile-card-footer {
  margin-top: 8px;
}

.mobile-card-dot {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   PAGE LAYOUTS
   ========================================================================== */

.single-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px;
}

.single-page--wide {
  max-width: 1200px;
}

/* Company split view - two columns */
.company-split-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.company-split-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 900px) {
  .company-split-view {
    grid-template-columns: 1fr;
  }
}

.page-header {
  margin-bottom: 24px;
}

.page-header--flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.page-header--flex .page-header__main {
  flex: 1;
}

.page-header--flex .page-header__actions {
  flex-shrink: 0;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.page-header-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.page-header-contacts {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.contact-info {
  font-size: 13px;
}

.contact-name {
  font-weight: 500;
  color: var(--text-primary);
}

.contact-role {
  color: var(--text-muted);
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */

.section {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.section-body {
  padding: 16px;
}

/* ==========================================================================
   LISTS
   ========================================================================== */

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

.item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--duration-fast);
}

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

.item-row:hover {
  background: var(--bg-hover);
  margin: 0 -16px;
  padding: 12px 16px;
}

.item-checkbox {
  flex-shrink: 0;
}

.item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

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

.item-unit {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.item-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

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

.form-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px;
}

.form-section {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.form-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 20px 0;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.form-row-3 {
  grid-template-columns: 1fr 100px 120px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Standalone form groups (not in form-row) need bottom margin */
.form-group:not(.form-row .form-group) {
  margin-bottom: 16px;
}

/* Wrapper divs with controllers should have spacing */
[data-controller] + .form-row,
[data-controller] + .form-group,
[data-controller] + [data-controller] {
  margin-top: 16px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-primary) 20%, transparent);
}

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

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-hint--warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  background: var(--warning-subtle, #fef3c7);
  border-radius: var(--radius-sm);
  color: var(--warning-text, #92400e);
  font-size: 13px;
  line-height: 1.4;
}

.form-hint--warning svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* Bulk items section */
.bulk-items-section {
  margin-bottom: 16px;
}

.bulk-items-section[hidden] {
  display: none !important;
}

.bulk-items-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  color: var(--text-secondary);
  font-size: 13px;
}

.bulk-items-loading[hidden] {
  display: none !important;
}

/* Bulk endorsement search UI */
.search-container {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  padding: 4px 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 250px;
  overflow-y: auto;
  z-index: 100;
}

.search-suggestions[hidden] {
  display: none !important;
}

.search-suggestions-empty {
  padding: 12px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.search-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background var(--duration-fast);
}

.search-suggestion:hover {
  background: var(--bg-surface);
}

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

.search-suggestion--disabled:hover {
  background: transparent;
}

.search-suggestion__name {
  font-size: 14px;
  color: var(--text-primary);
}

.search-suggestion__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

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

.search-suggestion__subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

.search-suggestion__status {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-weight: 500;
}

.search-suggestion__status--all {
  background: var(--bg-success-subtle);
  color: var(--text-success);
}

.search-suggestion__status--none {
  background: var(--bg-warning-subtle);
  color: var(--text-warning);
}

.search-suggestion__status--partial {
  background: var(--bg-info-subtle);
  color: var(--text-info);
}

/* Selected items list */
.selected-items-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.selected-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
}

.selected-item__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

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

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

.selected-item__subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

.selected-item__type-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.selected-item__policies {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

.selected-item__detail {
  font-size: 12px;
  color: var(--text-secondary);
}

.selected-item__remove {
  padding: 4px 8px;
  font-size: 12px;
  color: var(--text-danger);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: background var(--duration-fast);
}

.selected-item__remove:hover {
  background: var(--bg-danger-subtle);
}

.form-input-file {
  font-size: 14px;
  color: var(--text-secondary);
}

.form-input-file::file-selector-button {
  padding: 8px 16px;
  margin-right: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.form-input-file::file-selector-button:hover {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
}

/* Input with prefix (e.g., $ for currency) */
.input-with-prefix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

.input-with-prefix .form-input {
  padding-left: 24px;
}

/* Input with suffix (e.g., % for percentage) */
.input-with-suffix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-suffix {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

.input-with-suffix .form-input {
  padding-right: 28px;
}

/* Utility: Hidden */
.hidden {
  display: none !important;
}

/* VIN Lookup */
.vin-input-wrapper {
  position: relative;
}

.vin-input-wrapper .form-input {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 16px;
  letter-spacing: 1px;
}

.vin-status {
  display: block;
  font-size: 12px;
  margin-top: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.vin-status--loading {
  color: var(--text-muted);
  background: var(--bg-elevated);
}

.vin-status--success {
  color: var(--status-bound);
  background: rgba(16, 185, 129, 0.1);
}

.vin-status--error {
  color: var(--accent-danger);
  background: rgba(239, 68, 68, 0.1);
}

.vin-status--warning {
  color: var(--accent-warning);
  background: rgba(245, 158, 11, 0.1);
}

/* ==========================================================================
   DRIVER SEARCH - Typeahead autocomplete for adding drivers
   ========================================================================== */

.driver-search {
  max-width: 100%;
}

.driver-search__search {
  position: relative;
}

.driver-search__search.hidden {
  display: none;
}

.driver-search__input {
  width: 100%;
  font-size: 16px;
  padding: 14px 16px;
}

.driver-search__suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  margin-top: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
  max-height: 320px;
  overflow-y: auto;
}

.driver-search__suggestion {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: var(--text-primary);
  transition: background var(--duration-fast) var(--ease-out);
}

.driver-search__suggestion:hover {
  background: var(--bg-hover);
}

.driver-search__suggestion:not(:last-child) {
  border-bottom: 1px solid var(--border-subtle);
}

.driver-search__suggestion--new {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-default);
}

.driver-search__suggestion--new:hover {
  background: color-mix(in srgb, var(--accent-primary) 10%, var(--bg-surface));
}

.driver-search__icon {
  font-size: 20px;
  flex-shrink: 0;
}

.driver-search__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.driver-search__name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.driver-search__subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.driver-search__warning {
  font-size: 11px;
  padding: 2px 6px;
  background: color-mix(in srgb, var(--accent-warning) 20%, transparent);
  color: var(--accent-warning);
  border-radius: var(--radius-sm);
  margin-left: 8px;
}

.driver-search__empty {
  padding: 24px;
  text-align: center;
}

.driver-search__empty p {
  margin: 0 0 16px;
  color: var(--text-secondary);
}

.driver-search__selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: color-mix(in srgb, var(--accent-primary) 10%, var(--bg-surface));
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.driver-search__selected-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.driver-search__selected-info strong {
  font-size: 16px;
}

.driver-search__selected-info span {
  font-size: 13px;
  color: var(--text-secondary);
}

.driver-search__action {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-primary);
  margin-left: auto;
  flex-shrink: 0;
}

.driver-search__back {
  margin-bottom: 16px;
}

.driver-search .form-hint {
  font-size: 13px;
  margin-top: 8px;
}

/* -----------------------------------------------------------------------------
   VEHICLE SEARCH - Typeahead autocomplete for adding vehicles
   (mirrors driver-search styles)
----------------------------------------------------------------------------- */

.vehicle-search {
  position: relative;
}

.vehicle-search__search {
  position: relative;
}

.vehicle-search__search.hidden {
  display: none;
}

.vehicle-search__input {
  width: 100%;
}

.vehicle-search__suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  margin-top: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
  max-height: 320px;
  overflow-y: auto;
}

.vehicle-search__suggestion {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.vehicle-search__suggestion:hover {
  background: var(--bg-hover, #2c2c32);
}

.vehicle-search__suggestion:not(:last-child) {
  border-bottom: 1px solid var(--border-subtle, #333338);
}

.vehicle-search__suggestion--new {
  background: var(--bg-elevated, #242429);
  border-top: 2px solid var(--border-default, #44444a);
}

.vehicle-search__suggestion--new:hover {
  background: var(--bg-hover, #2c2c32);
}

.vehicle-search__suggestion--exists {
  opacity: 0.6;
}

.vehicle-search__icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.vehicle-search__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.vehicle-search__name {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vehicle-search__subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vehicle-search__warning {
  padding: 16px;
  background: var(--accent-warning, #f59e0b);
  color: var(--text-primary, #0f172a);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vehicle-search__empty {
  padding: 16px;
  text-align: center;
}

.vehicle-search__empty p {
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.vehicle-search__vin-warning {
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-warning);
  border-radius: 6px;
  font-size: 14px;
}

.vehicle-search__empty button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.vehicle-search__back {
  margin-bottom: 16px;
}

.vehicle-search__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  color: var(--text-secondary);
}

/* Asset Search (alias for vehicle-search) */
.asset-search { position: relative; }
.asset-search__search { position: relative; }
.asset-search__search.hidden { display: none; }
.asset-search__input { width: 100%; }
.asset-search__suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  margin-top: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
  max-height: 320px;
  overflow-y: auto;
}
.asset-search__suggestion {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.asset-search__suggestion:hover { background: var(--bg-hover, #2c2c32); }
.asset-search__suggestion:not(:last-child) { border-bottom: 1px solid var(--border-subtle, #333338); }
.asset-search__suggestion--new {
  background: var(--bg-elevated, #242429);
  border-top: 2px solid var(--border-default, #44444a);
}
.asset-search__suggestion--new:hover { background: var(--bg-hover, #2c2c32); }
.asset-search__suggestion--exists { opacity: 0.6; }
.asset-search__icon { color: var(--text-muted); flex-shrink: 0; }
.asset-search__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.asset-search__name {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.asset-search__subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.asset-search__warning {
  padding: 16px;
  background: var(--accent-warning, #f59e0b);
  color: var(--text-primary, #0f172a);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.asset-search__empty { padding: 16px; text-align: center; }
.asset-search__empty p { margin-bottom: 12px; color: var(--text-secondary); }
.asset-search__vin-warning {
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-warning);
  border-radius: 6px;
  font-size: 14px;
}
.asset-search__empty button:disabled { opacity: 0.5; cursor: not-allowed; }
.asset-search__back { margin-bottom: 16px; }
.asset-search__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  color: var(--text-secondary);
}

.vehicle-search__loading .spinner {
  width: 20px;
  height: 20px;
}

.vehicle-search .form-hint {
  font-size: 13px;
  margin-top: 8px;
}

.form-file-current {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.form-file-name {
  font-size: 14px;
  color: var(--text-secondary);
}

.form-file-link {
  font-size: 13px;
  color: var(--accent-primary);
}

.form-file-link:hover {
  text-decoration: underline;
}

.form-checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  cursor: pointer;
}

.form-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.form-checkbox-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Toggle Switch */
.form-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.form-switch__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.form-switch__track {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--bg-muted);
  border-radius: 12px;
  transition: background var(--duration-fast);
}

.form-switch__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--bg-base);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-fast);
}

.form-switch__input:checked + .form-switch__track {
  background: var(--accent);
}

.form-switch__input:checked + .form-switch__track::after {
  transform: translateX(20px);
}

.form-switch__input:focus + .form-switch__track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-switch__label {
  font-size: 14px;
  color: var(--text-primary);
}

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

.form-errors {
  background: color-mix(in srgb, var(--accent-danger) 10%, transparent);
  border: 1px solid var(--accent-danger);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.form-errors-title {
  font-weight: 600;
  color: var(--accent-danger);
  margin: 0 0 8px 0;
}

.form-errors-list {
  margin: 0;
  padding-left: 18px;
  color: var(--accent-danger);
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--duration-fast);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-primary) 30%, transparent);
}

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

.btn-primary:hover {
  background: color-mix(in srgb, var(--accent-primary) 85%, white);
}

.btn-primary:disabled,
.btn-primary.btn-loading {
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: wait;
  opacity: 0.7;
}

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

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

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-default);
}

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

.btn-danger:hover {
  background: color-mix(in srgb, var(--accent-danger) 85%, white);
}

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

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

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

.badge-not_now { background: color-mix(in srgb, var(--status-not-now) 20%, transparent); color: var(--status-not-now); }
.badge-intake { background: color-mix(in srgb, var(--status-intake) 20%, transparent); color: var(--status-intake); }
.badge-with_underwriters { background: color-mix(in srgb, var(--status-underwriters) 20%, transparent); color: var(--status-underwriters); }
.badge-quoted { background: color-mix(in srgb, var(--status-quoted) 20%, transparent); color: var(--status-quoted); }
.badge-presented { background: color-mix(in srgb, var(--status-presented) 20%, transparent); color: var(--status-presented); }
.badge-bound { background: color-mix(in srgb, var(--status-bound) 20%, transparent); color: var(--status-bound); }
.badge-not_taken { background: color-mix(in srgb, var(--status-not-taken) 20%, transparent); color: var(--status-not-taken); }

/* Proposal status badges */
.badge-draft { background: color-mix(in srgb, var(--status-not-now) 20%, transparent); color: var(--status-not-now); }
.badge-sent { background: color-mix(in srgb, var(--status-intake) 20%, transparent); color: var(--status-intake); }
.badge-accepted { background: color-mix(in srgb, var(--status-bound) 20%, transparent); color: var(--status-bound); }
.badge-declined { background: color-mix(in srgb, var(--accent-danger) 20%, transparent); color: var(--accent-danger); }

/* Discovery session badges */
.badge-pending { background: color-mix(in srgb, var(--status-underwriters) 20%, transparent); color: var(--status-underwriters); }
.badge-transcribing { background: color-mix(in srgb, var(--status-intake) 20%, transparent); color: var(--status-intake); }
.badge-ready { background: color-mix(in srgb, var(--status-bound) 20%, transparent); color: var(--status-bound); }
.badge-failed { background: color-mix(in srgb, var(--accent-danger) 20%, transparent); color: var(--accent-danger); }
.badge-default { background: var(--bg-elevated); color: var(--text-muted); }

/* Generic badge modifiers (BEM style) */
.badge--success { background: color-mix(in srgb, var(--accent-success) 15%, transparent); color: var(--accent-success); }
.badge--warning { background: color-mix(in srgb, var(--accent-warning) 15%, transparent); color: var(--accent-warning); }
.badge--danger { background: color-mix(in srgb, var(--accent-danger) 15%, transparent); color: var(--accent-danger); }
.badge--info { background: color-mix(in srgb, var(--accent-primary) 15%, transparent); color: var(--accent-primary); }
.badge--muted { background: var(--bg-elevated); color: var(--text-muted); font-size: 12px; padding: 2px 8px; }

/* Policy status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.status-badge--processing { background: color-mix(in srgb, var(--status-underwriters) 20%, transparent); color: var(--status-underwriters); }
.status-badge--active { background: color-mix(in srgb, var(--accent-success) 20%, transparent); color: var(--accent-success); }
.status-badge--renew { background: color-mix(in srgb, var(--accent-warning) 20%, transparent); color: var(--accent-warning); }
.status-badge--cancelled { background: color-mix(in srgb, var(--accent-danger) 20%, transparent); color: var(--accent-danger); }
.status-badge--noic { background: color-mix(in srgb, var(--accent-warning) 20%, transparent); color: var(--accent-warning); }
.status-badge--noc { background: color-mix(in srgb, var(--accent-danger) 20%, transparent); color: var(--accent-danger); }

/* Endorsement status badges */
.status-badge--draft { background: color-mix(in srgb, var(--status-not-now) 20%, transparent); color: var(--status-not-now); }
.status-badge--issued { background: color-mix(in srgb, var(--accent-success) 20%, transparent); color: var(--accent-success); }
.status-badge--void { background: color-mix(in srgb, var(--accent-danger) 20%, transparent); color: var(--accent-danger); }

/* Policy driver/asset status badges */
.status-badge--terminated { background: color-mix(in srgb, var(--accent-danger) 20%, transparent); color: var(--accent-danger); }
.status-badge--pending_add { background: color-mix(in srgb, var(--accent-primary) 20%, transparent); color: var(--accent-primary); }
.status-badge--pending_remove { background: color-mix(in srgb, var(--accent-warning) 20%, transparent); color: var(--accent-warning); }

.status-badge--large {
  padding: 4px 12px;
  font-size: 13px;
}

.status-badge--warning {
  background: color-mix(in srgb, var(--accent-warning) 20%, transparent);
  color: var(--accent-warning);
}

.status-badge--danger {
  background: color-mix(in srgb, var(--accent-danger) 20%, transparent);
  color: var(--accent-danger);
}

/* Filter Tabs - for status filtering */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.filter-tab:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-color: var(--border-default);
}

.filter-tab--active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-color: var(--accent);
}

/* Status Actions - inline status buttons */
.status-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.status-actions__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-right: 8px;
}

.status-action-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.status-action-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.status-action-btn--active:hover { color: var(--accent-success); border-color: var(--accent-success); }
.status-action-btn--processing:hover { color: var(--status-underwriters); border-color: var(--status-underwriters); }
.status-action-btn--renew:hover { color: var(--accent-warning); border-color: var(--accent-warning); }
.status-action-btn--cancelled:hover { color: var(--accent-danger); border-color: var(--accent-danger); }
.status-action-btn--noic:hover { color: var(--accent-warning); border-color: var(--accent-warning); }
.status-action-btn--noc:hover { color: var(--accent-danger); border-color: var(--accent-danger); }

/* Detail List - key/value pairs in cards */
.detail-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
}

.detail-list__item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.detail-list__item:last-child {
  border-bottom: none;
}

.detail-list__item dt {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.detail-list__item dd {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: right;
  margin: 0;
}

.detail-list--compact .detail-list__item {
  padding: 6px 0;
}

.detail-list--compact .detail-list__item dt,
.detail-list--compact .detail-list__item dd {
  font-size: 12px;
}

/* Premium Total - highlighted premium display */
.premium-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  margin-bottom: 16px;
  background: var(--bg-hover);
  border-radius: var(--radius-md);
}

.premium-total__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.premium-total__value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ==========================================================================
   LOSS RUNS ANALYSIS
   ========================================================================== */

.loss-runs-section {
  margin-top: 24px;
}

.subsection-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}

.alert--compact {
  padding: 12px 16px;
  margin-bottom: 8px;
}

.alert--compact .alert__content {
  font-size: 13px;
}

.alert--compact .alert__detail {
  margin: 4px 0 0 0;
  font-size: 12px;
  opacity: 0.85;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  background: var(--bg-elevated);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

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

.data-table tfoot td {
  background: var(--bg-elevated);
  font-weight: 600;
}

.data-table .text-right {
  text-align: right;
}

/* Clickable link in table cells */
.table-link {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

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

.row--highlight {
  background: color-mix(in srgb, var(--accent-danger) 5%, transparent);
}

.row--highlight:hover {
  background: color-mix(in srgb, var(--accent-danger) 10%, transparent) !important;
}

.recommendations-list {
  margin: 0;
  padding-left: 20px;
}

.recommendations-list li {
  margin-bottom: 8px;
  color: var(--text-primary);
  line-height: 1.5;
}

/* ==========================================================================
   EMPTY STATES
   ========================================================================== */

.empty-state {
  text-align: center;
  padding: 32px 20px;
}

.empty-state-text {
  color: var(--text-muted);
  margin: 0 0 12px 0;
}

/* ==========================================================================
   DATA DISPLAY
   ========================================================================== */

.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.data-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.data-label {
  font-size: 12px;
  color: var(--text-muted);
}

.data-value {
  font-size: 14px;
  color: var(--text-primary);
}

/* ==========================================================================
   FLASH MESSAGES - Toast Notifications
   ========================================================================== */

.flash {
  position: fixed;
  top: 88px;
  right: 24px;
  z-index: 1000;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.12));
  animation: slideInRight 0.3s ease-out, fadeOut 0.3s ease-in 2s forwards;
  max-width: 360px;
}

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

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

.flash-notice {
  background: var(--status-bound);
  color: #fff;
  border: none;
}

.flash-alert {
  background: var(--accent-danger);
  color: #fff;
  border: none;
}

/* ==========================================================================
   AVATARS & CONTACTS
   ========================================================================== */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
  color: white;
  background: var(--accent-primary);
}

.contact-avatars {
  display: flex;
}

.contact-avatars > * {
  margin-left: -8px;
}

.contact-avatars > *:first-child {
  margin-left: 0;
}

.contact-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
  color: white;
  border: 2px solid var(--bg-surface);
  transition: transform var(--duration-fast);
}

.contact-avatar:hover {
  transform: scale(1.1);
  z-index: 1;
}

.contact-avatar--add {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border-color: var(--border-default);
}

/* Avatar color variants */
.contact-avatar--1, .contacts-strip__avatar.contact-avatar--1 { background: #f59e0b; }
.contact-avatar--2, .contacts-strip__avatar.contact-avatar--2 { background: #10b981; }
.contact-avatar--3, .contacts-strip__avatar.contact-avatar--3 { background: #3b82f6; }
.contact-avatar--4, .contacts-strip__avatar.contact-avatar--4 { background: #ec4899; }

/* Contact info next to avatars */
.contact-info {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  font-size: 13px;
}

.contact-name {
  font-weight: 500;
  color: var(--text-primary);
}

.contact-role {
  color: var(--text-muted);
}

/* ==========================================================================
   CARD DETAIL VIEW (Quote Request Show)
   ========================================================================== */

.card-perma {
  --card-color: var(--accent-primary);
  min-height: calc(100vh - 72px);
  background: var(--bg-base);
  padding: 24px 32px;
}

.card-perma__container {
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
}

.card-perma__back {
  margin-bottom: 12px;
}

.page-back {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.page-back__text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.page-back__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  transition: all var(--duration-fast);
}

.page-back__link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--text-secondary);
  transition: color var(--duration-fast);
}

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

.breadcrumb__separator {
  color: var(--text-muted);
}

.breadcrumb__current {
  color: var(--text-primary);
  font-weight: 500;
}

.page-breadcrumb {
  margin-bottom: 16px;
}

.page-breadcrumb .back-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.page-breadcrumb .back-link:hover {
  color: var(--text-primary);
}

.page-breadcrumb .back-link svg {
  opacity: 0.7;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  transition: color var(--duration-fast);
}

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

.back-link__key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 24px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.card-perma__actions {
  position: fixed;
  display: flex;
  flex-direction: column;
  gap: 12px;
  top: 180px;
  z-index: 10;
}

/* Position icons outside the larger card (880px + gap) */
.card-perma__actions--left { left: calc(50% - 500px); }
.card-perma__actions--right { right: calc(50% - 500px); }

.card-perma__action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-fast);
}

.card-perma__action-btn:hover {
  background: color-mix(in srgb, var(--card-color) 20%, var(--bg-surface));
  border-color: color-mix(in srgb, var(--card-color) 50%, var(--border-subtle));
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
}

.card-perma__action-btn--active {
  background: color-mix(in srgb, var(--accent) 15%, var(--bg-surface));
  border-color: var(--accent);
  color: var(--accent);
}

.card-perma__action-btn--active:hover {
  background: color-mix(in srgb, var(--accent) 25%, var(--bg-surface));
}

.card-perma__bg {
  background: color-mix(in srgb, var(--card-color) 15%, var(--bg-surface));
  border: 2px solid color-mix(in srgb, var(--card-color) 40%, transparent);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.card--detail {
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.card--detail:hover {
  transform: none;
  box-shadow: none;
}

.card__header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

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

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

.card__id {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  background: var(--bg-elevated);
  border-radius: 4px;
  color: var(--text-muted);
}

.card__id--large {
  font-size: 18px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  color: var(--text-primary);
}

.card__effective-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-secondary);
}

.card__effective-tag svg {
  opacity: 0.7;
}

.card__board-name {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Business type tag pills - inherits card status color */
.card__tags {
  display: flex;
  gap: 6px;
}

.card__tag {
  display: inline-block;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
}

.card__tag button,
button.card__tag {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--duration-fast);
  font-family: inherit;
}

.card__tag button:hover,
button.card__tag:hover {
  background: color-mix(in srgb, var(--card-color) 10%, var(--bg-surface));
  border-color: color-mix(in srgb, var(--card-color) 50%, var(--border-subtle));
  color: var(--text-secondary);
}

.card__tag--active button,
button.card__tag--active {
  background: color-mix(in srgb, var(--card-color) 15%, var(--bg-surface));
  border-color: var(--card-color);
  color: var(--card-color);
  font-weight: 600;
}

.card__tag--active button:hover,
button.card__tag--active:hover {
  background: color-mix(in srgb, var(--card-color) 20%, var(--bg-surface));
}

.card__body {
  display: flex;
  gap: 24px;
}

.card__content {
  flex: 1;
}

.card__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.card__title-sub {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: 8px;
}

.card__description {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

.card__description p {
  margin: 0 0 4px 0;
}

.card__client-type {
  display: inline-block;
  padding: 2px 8px;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: color-mix(in srgb, var(--card-color) 20%, var(--bg-elevated));
  border-radius: 4px;
  color: var(--card-color);
  vertical-align: middle;
}

.card__section {
  margin-bottom: 20px;
}

.card__section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 10px 0;
}

.card__section-add {
  font-size: 12px;
  color: var(--card-color);
  margin-left: 8px;
}

.card__checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.card__checklist-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

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

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

.card__checklist-text {
  font-size: 14px;
  color: var(--text-primary);
}

.card__checklist-meta {
  font-size: 13px;
  color: var(--text-muted);
}

/* Coverage Table */
.coverage-table {
  border-collapse: collapse;
  font-size: 14px;
}

.coverage-table thead {
  border-bottom: 1px solid var(--border-subtle);
}

.coverage-table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  padding-bottom: 8px;
}

.coverage-table th.coverage-table__type,
.coverage-table td.coverage-table__type {
  text-align: left;
  padding-right: 32px;
}

.coverage-table th.coverage-table__limit,
.coverage-table td.coverage-table__limit {
  text-align: left;
  padding-left: 24px;
  padding-right: 24px;
}

.coverage-table th.coverage-table__deductible,
.coverage-table td.coverage-table__deductible {
  text-align: left;
  padding-left: 24px;
}

.coverage-table__row td {
  padding-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.coverage-table__row:last-child td {
  border-bottom: none;
}

.coverage-table__type a {
  color: var(--text-primary);
  transition: color var(--duration-fast);
}

.coverage-table__type a:hover {
  color: var(--card-color);
}

.coverage-table td.coverage-table__limit,
.coverage-table td.coverage-table__deductible {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* Coverage Table - Compact variant for embedded views */
.coverage-table--compact {
  width: 100%;
  margin-top: 8px;
}

.coverage-table--compact th {
  font-size: 10px;
  padding-bottom: 6px;
  text-align: left;
}

.coverage-table--compact th:first-child {
  padding-left: 0;
}

.coverage-table--compact td {
  padding: 6px 12px 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border-subtle);
}

.coverage-table--compact td:first-child {
  padding-left: 0;
}

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

/* ==========================================================================
   QUOTE CARD - Expanded quote display in proposals
   ========================================================================== */

.quote-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
}

.quote-card:last-child {
  margin-bottom: 0;
}

.quote-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.quote-card__title-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  transition: color var(--duration-fast);
}

.quote-card__title-link:hover {
  color: var(--accent-primary);
}

.quote-card__title {
  font-size: 16px;
  font-weight: 600;
}

.quote-card__premium {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-primary);
  margin-left: auto;
}

.quote-card__arrow {
  font-size: 14px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--duration-fast), transform var(--duration-fast);
}

.quote-card__title-link:hover .quote-card__arrow {
  opacity: 1;
  transform: translateX(0);
}

.quote-card__details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quote-card__coverages {
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.quote-card__coverages > .data-label {
  display: block;
  margin-bottom: 8px;
}

/* Bind Ready Section */
.bind-ready-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.bind-ready-info {
  flex: 1;
}

.bind-ready-info p {
  margin: 0 0 4px 0;
  color: var(--text-primary);
}

.bind-ready-hint {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Bind Modal Styles */
/* Bind Modal - Large variant */
.modal-dialog--lg {
  max-width: 680px;
  width: 90vw;
}

/* Bind Modal Form */
.bind-modal-form .modal-body {
  max-height: 60vh;
  overflow-y: auto;
}

.bind-modal-form .modal-description {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 20px 0;
}

/* Quote Section */
.bind-quote-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.bind-quote-section:last-child {
  margin-bottom: 0;
}

.bind-quote-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.bind-quote-section-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bind-quote-section-title strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.bind-quote-section-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.bind-quote-market-select {
  flex: 1;
  min-width: 180px;
  max-width: 320px;
}

.bind-quote-market-select .form-select {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.bind-quote-header-fields {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

.bind-quote-policy-number {
  flex-shrink: 0;
  width: 120px;
}

.bind-quote-policy-number .form-input {
  font-size: 13px;
}

/* Toggle Tabs */
.bind-quote-input-toggle {
  padding: 12px 16px 0;
}

.toggle-tabs {
  display: inline-flex;
  gap: 2px;
  background: var(--bg-muted);
  padding: 3px;
  border-radius: var(--radius-sm);
}

.toggle-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-xs, 4px);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

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

.toggle-tab--active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Upload Section */
.bind-quote-upload {
  padding: 16px;
}

/* Manual Entry Section */
.bind-quote-manual {
  padding: 16px;
}

.bind-settings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.bind-settings-grid .form-group {
  margin-bottom: 0;
}

.bind-settings-grid .form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

/* Modal Footer */
.bind-modal-form .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
}

@media (max-width: 640px) {
  .bind-quote-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .bind-quote-market-select {
    min-width: 100%;
  }
  
  .bind-settings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Spinner */
.spinner--sm {
  width: 14px;
  height: 14px;
  border-width: 2px;
}

/* Alert Success */
.alert-success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-md, 8px);
  color: var(--text-primary);
}

.alert-success svg {
  color: #22c55e;
  flex-shrink: 0;
}

.alert-success .alert-link {
  color: #22c55e;
  text-decoration: none;
  font-weight: 500;
}

.alert-success .alert-link:hover {
  text-decoration: underline;
}

.data-grid--compact {
  gap: 8px;
}

.data-grid--compact .data-item {
  gap: 1px;
}

.data-grid--compact .data-label {
  font-size: 11px;
}

.data-grid--compact .data-value {
  font-size: 13px;
}

.card__stats {
  display: flex;
  gap: 24px;
}

.card__stat {
  text-align: center;
}

.card__stat--link {
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast);
}

.card__stat--link:hover {
  background: var(--bg-elevated);
}

.card__stat-number {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.card__stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

.card__empty {
  color: var(--text-muted);
  font-size: 14px;
}

/* Status selector */
.card__stages {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}

/* Desktop/Mobile visibility */
.card__stages--mobile {
  display: none;
}

.card__column-name {
  padding: 8px 12px;
  font-size: 13px;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--duration-fast), color var(--duration-fast);
}

.card__column-name:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.card__column-name--current {
  background: var(--accent-primary);
  color: white;
}

.card__column-name--current:hover {
  background: var(--accent-primary);
  color: white;
}

/* Status-specific current button colors */
.card__column-name--not_now.card__column-name--current {
  background: #94a3b8;
}
.card__column-name--intake.card__column-name--current {
  background: #3b82f6;
}
.card__column-name--with_underwriters.card__column-name--current {
  background: #f59e0b;
}
.card__column-name--quoted.card__column-name--current {
  background: #a855f7;
}
.card__column-name--presented.card__column-name--current {
  background: #ec4899;
}
.card__column-name--bound.card__column-name--current {
  background: #22c55e;
}
.card__column-name--not_taken.card__column-name--current {
  background: #6b7280;
}

.card__footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid color-mix(in srgb, var(--card-color) 30%, var(--border-subtle));
}

/* Fizzy-style Status List (mobile card-in-card) */
.status-list {
  background: color-mix(in srgb, var(--card-color) 8%, var(--bg-base));
  border: 1px solid color-mix(in srgb, var(--card-color) 30%, var(--border-subtle));
  border-radius: var(--radius-md);
  overflow: hidden;
}

.status-list__item {
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid color-mix(in srgb, var(--card-color) 15%, var(--border-subtle));
  color: var(--card-color);
  cursor: pointer;
  transition: background var(--duration-fast);
}

.status-list__item:last-child {
  border-bottom: none;
}

.status-list__item:hover {
  background: color-mix(in srgb, var(--card-color) 12%, transparent);
}

.status-list__item--current {
  background: var(--card-color);
  color: #fff;
}

.status-list__item--current:hover {
  background: var(--card-color);
}

/* Mobile Fizzy-style action bar */
.mobile-action-group {
  display: flex;
  gap: 8px;
}

.mobile-action-group--center {
  gap: 12px;
}

.mobile-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--duration-fast);
}

.mobile-action-btn:hover,
.mobile-action-btn:active {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.mobile-action-btn--primary {
  background: var(--card-color);
  border-color: var(--card-color);
  color: #fff;
}

.mobile-action-btn--primary:hover,
.mobile-action-btn--primary:active {
  background: color-mix(in srgb, var(--card-color) 85%, white);
  border-color: color-mix(in srgb, var(--card-color) 85%, white);
  color: #fff;
}

.mobile-action-btn--success {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.mobile-action-btn--success:hover,
.mobile-action-btn--success:active {
  background: #16a34a;
  border-color: #16a34a;
}

.mobile-action-btn--muted {
  background: var(--bg-elevated);
  border-color: var(--border-default);
  color: var(--text-muted);
}

.mobile-action-btn--muted:hover,
.mobile-action-btn--muted:active {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

/* Mobile close button - top right of card */
.mobile-close-btn {
  display: none;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all var(--duration-fast);
}

.mobile-close-btn:hover,
.mobile-close-btn:active {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Fizzy-style assignment bar */
.card__assignment {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.card__assigned {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.card__assigned-divider {
  color: var(--text-muted);
  opacity: 0.5;
}

.card__assigned-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card__assigned-label {
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--card-color);
}

.card__assigned-label strong {
  font-weight: 700;
}

.card__assigned-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--card-color);
}

.card__assigned-icon {
  color: var(--card-color);
}

.card__assigned--empty {
  opacity: 0.6;
}

/* Avatar variants for assignment */
.avatar--internal {
  background: var(--card-color);
  color: #000;
  font-weight: 700;
}

.avatar--contact {
  background: var(--bg-elevated);
  border: 2px solid var(--card-color);
  color: var(--text-primary);
}

.avatar--placeholder {
  background: var(--bg-elevated);
  border: 2px dashed var(--border-default);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Legacy meta styles (keep for other uses) */
.card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.card__meta-text {
  font-size: 12px;
  color: var(--text-muted);
}

/* Bottom action bar */
.card-perma__notch {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  padding-bottom: 24px;
}

/* Hide mobile notch on desktop */
.card-perma__notch--mobile {
  display: none;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  background: var(--bg-surface);
  border: 1px solid color-mix(in srgb, var(--card-color) 40%, var(--border-default));
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.btn-action:hover {
  background: color-mix(in srgb, var(--card-color) 15%, var(--bg-surface));
  border-color: color-mix(in srgb, var(--card-color) 60%, var(--border-default));
}

.btn-action kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  font-size: 11px;
  padding: 0 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-muted);
}

.btn-action--primary {
  background: var(--card-color);
  border-color: var(--card-color);
  color: #fff;
}

.btn-action--primary:hover {
  background: color-mix(in srgb, var(--card-color) 85%, white);
}

/* ==========================================================================
   COMMENTS
   ========================================================================== */

.comments-section {
  margin-top: 36px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 30px;
}

.comments-section--themed {
  background: color-mix(in srgb, var(--card-color, var(--accent-primary)) 8%, var(--bg-surface));
}

/* Themed button inside comments uses status color */
.comments-section--themed .btn-primary {
  background: var(--card-color);
  color: #fff;
}

.comments-section--themed .btn-primary:hover {
  background: color-mix(in srgb, var(--card-color) 85%, white);
}

.comments-header {
  margin-bottom: 16px;
}

.comments-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.comment {
  display: flex;
  gap: 12px;
}

.comment-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: white;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comment-body {
  flex: 1;
}

.comment-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.comment-time {
  font-size: 12px;
  color: var(--text-muted);
}

.comment-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.comment-content p {
  margin: 0 0 8px 0;
}

.comment-content p:last-child {
  margin-bottom: 0;
}

.comment-form {
  display: flex;
  gap: 12px;
}

.comment-form-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comment-form-input {
  flex: 1;
}

.comment-textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  resize: vertical;
  min-height: 80px;
}

.comment-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.comment-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

/* ==========================================================================
   ACTIVITY LOG
   ========================================================================== */

.activity-log {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.activity-entry {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.activity-entry:last-child {
  border-bottom: none;
}

.activity-entry:nth-child(even) {
  background: var(--bg-elevated);
}

.activity-entry-content {
  font-size: 14px;
  color: var(--text-primary);
}

.activity-entry-time {
  font-size: 12px;
  color: var(--text-muted);
}

.activity-log-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ==========================================================================
   AI COMPONENTS
   ========================================================================== */

.ai-summary-box {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 16px;
  border-left: 3px solid var(--accent-primary);
}

.ai-summary-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.ai-icon {
  font-size: 16px;
}

.ai-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.ai-summary-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.ai-summary-content p {
  margin: 0 0 8px 0;
}

.ai-suggestions {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ai-suggestions li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.ai-suggestions li:last-child {
  border-bottom: none;
}

/* AI Insights with timestamps */
.insights-list {
  display: grid;
  gap: 12px;
}

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

.insight-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  border-left: 4px solid var(--accent-primary);
}

.insight-card--coverage_need { border-left-color: #3b82f6; }
.insight-card--risk_factor { border-left-color: #ef4444; }
.insight-card--business_info { border-left-color: #10b981; }
.insight-card--follow_up { border-left-color: #f59e0b; }
.insight-card--opportunity { border-left-color: #8b5cf6; }

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

.insight-category {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.insight-timestamp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-primary);
  background: none;
  border: 1px solid var(--accent-primary);
  border-radius: 12px;
  padding: 2px 8px;
  cursor: pointer;
  transition: all var(--duration-fast);
}

.insight-timestamp:hover {
  background: var(--accent-primary);
  color: white;
}

.insight-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.insight-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Processing spinner */
.processing-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px;
  gap: 16px;
}

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

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

/* ==========================================================================
   AUDIO PLAYER
   ========================================================================== */

.audio-player {
  width: 100%;
  height: 40px;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--accent-success); }
.text-warning { color: var(--accent-warning); }
.text-danger { color: var(--accent-danger); }
.text-sm { font-size: 12px; }
.font-mono { font-family: var(--font-mono); }

.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }

.inline-form { display: inline; }

/* Logo */
.logo-text {
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-primary), #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Action buttons */
.action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Page header info */
.page-header-info {
  flex: 1;
}

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.page-header-contacts {
  margin-top: 12px;
}

/* Card tag variants - colors now inherited from card status */
.card-tag--quote-type {
  font-weight: 600;
}

.card-tag-icon {
  opacity: 0.7;
}

/* Form extras */
.form-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 20px 0 12px 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.form-subsection-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

/* Endorsement Item Search Styles */
.search-input-wrapper {
  position: relative;
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  max-height: 350px;
  overflow-y: auto;
}

.search-suggestion {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.15s ease;
}

.search-suggestion:hover {
  background: var(--bg-muted);
}

.search-suggestion:last-child {
  border-bottom: none;
}

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

.search-suggestion__content {
  flex: 1;
  min-width: 0;
}

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

.search-suggestion__meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.search-suggestion__badges {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 12px;
}

.search-badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 10px;
}

.search-badge.on-account {
  background: rgba(34, 197, 94, 0.15);
  color: var(--color-success);
}

.search-badge.new-to-account {
  background: rgba(59, 130, 246, 0.15);
  color: var(--status-intake);
}

.search-badge.on-policy {
  background: rgba(234, 179, 8, 0.15);
  color: var(--status-negotiating);
}

.search-no-results {
  padding: 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Selected items list */
.selected-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.selected-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.selected-item__info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.selected-item__info strong {
  color: var(--text-primary);
}

.selected-item__remove {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 18px;
  line-height: 1;
}

.selected-item__remove:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
}

.form-input-group {
  display: flex;
  gap: 8px;
}

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

.form-group-narrow {
  max-width: 200px;
}

/* Item actions */
.item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* Item row header (for bulk selection tables) */
.item-row--header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-default);
  padding: 8px 0 12px;
}

.item-row--header:hover {
  background: transparent;
  margin: 0;
  padding: 8px 0 12px;
}

.item-checkbox {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding-right: 8px;
}

.item-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent-primary);
}

/* Bulk actions bar */
.bulk-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border: 1px solid var(--accent-primary);
}

.bulk-actions-bar[hidden] {
  display: none;
}

.bulk-actions-count {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.bulk-actions-buttons {
  display: flex;
  gap: 8px;
}

/* Item row with checkbox - flex container for checkbox + link */
.item-row:has(.item-checkbox) {
  display: flex;
  align-items: center;
}

.item-row-link {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  padding: 12px 16px 12px 0;
  transition: background var(--duration-fast);
}

.item-row-link:hover {
  background: var(--bg-hover);
}

.item-row-link .item-info {
  flex: 1;
  min-width: 0;
}

.item-row-link .item-meta {
  flex-shrink: 0;
}

/* Modal Dialog Styles */
.modal-dialog {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 0;
  max-width: 600px;
  width: 90vw;
  max-height: 85vh;
  overflow: visible;
  background: var(--bg-surface);
}

.modal-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-dialog[open] {
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

body.modal-open {
  overflow: hidden;
}

.modal-content {
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}

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

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

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

.modal-body {
  padding: 24px;
  overflow: visible;
  min-height: 200px;
}

.modal-hint {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 16px;
}

.modal-search-section .search-input-wrapper {
  position: relative;
}

.modal-search-section .search-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
}

.modal-search-section .search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  max-height: 350px;
  overflow-y: auto;
}

.modal-search-section .search-suggestions .search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
}

.modal-search-section .search-suggestions .search-result-item:last-child {
  border-bottom: none;
}

.modal-search-section .search-suggestions .search-result-item:hover {
  background: var(--bg-hover);
}

.modal-search-section .search-suggestions .search-result-item .asset-indicator,
.modal-search-section .search-suggestions .search-result-item .driver-indicator {
  width: 6px;
  height: 32px;
  border-radius: 3px;
  background: var(--color-success);
  flex-shrink: 0;
}

.modal-search-section .search-suggestions .search-result-item .result-info {
  flex: 1;
  min-width: 0;
}

.modal-search-section .search-suggestions .search-result-item .result-title {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
}

.modal-search-section .search-suggestions .search-result-item .result-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.modal-search-section .search-suggestions .search-result-item .result-badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.modal-search-section .search-suggestions .search-result-item .result-badge.new-to-account {
  background: var(--color-info-bg, rgba(59, 130, 246, 0.1));
  color: var(--color-info, #3b82f6);
}

.modal-search-section .search-suggestions .search-result-item .result-badge.on-account {
  background: var(--color-success-bg, rgba(34, 197, 94, 0.1));
  color: var(--color-success, #22c55e);
}

.modal-search-section .search-suggestions .search-result-item--create {
  background: var(--bg-muted);
}

.modal-search-section .search-suggestions .search-result-item--create:hover {
  background: var(--bg-hover);
}

.modal-search-section .search-suggestions .search-no-results {
  padding: 24px;
  text-align: center;
  color: var(--text-secondary);
}

.modal-search-section .search-suggestions .search-no-results p {
  margin: 0 0 16px;
}

.modal-form-section {
  animation: fadeIn 0.2s ease;
}

.modal-form-header {
  margin-bottom: 16px;
}

.modal-create-form .form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.modal-create-form .form-group {
  flex: 1;
  min-width: 0;
}

.modal-create-form .form-group--wide {
  flex: 2;
}

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

.modal-create-form .form-control {
  width: 100%;
}

.modal-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

/* Confirm Modal Styles */
.modal-dialog--confirm {
  max-width: 440px;
}

.modal-content--narrow {
  max-width: 440px;
}

.modal-lead {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 20px;
}

.modal-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
}

.modal-checklist__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.modal-checklist__item svg {
  flex-shrink: 0;
  color: var(--color-success);
}

.modal-checklist__item strong {
  color: var(--text-primary);
  font-weight: 500;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-muted);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.modal-footer .btn {
  min-width: 100px;
}

.modal-footer form {
  margin: 0;
}

/* Inline add section on quote selection */
.add-inline-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
}

.add-inline-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text-primary);
}

.add-inline-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

.add-inline-search .search-input-wrapper {
  position: relative;
  max-width: 500px;
}

.add-inline-search .search-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
}

.add-inline-search .search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  max-height: 400px;
  overflow-y: auto;
}

.add-inline-form {
  animation: fadeIn 0.2s ease;
}

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

.add-inline-form .form-header h3 {
  margin: 0;
}

.inline-create-form .form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.inline-create-form .form-group {
  flex: 1;
  min-width: 0;
}

.inline-create-form .form-group--wide {
  flex: 2;
}

.inline-create-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.inline-create-form .form-control {
  width: 100%;
}

.inline-create-form .form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

/* Badge styles for search results */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
}

.badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: var(--status-intake);
}

.badge-secondary {
  background: rgba(156, 163, 175, 0.2);
  color: var(--text-secondary);
}

/* Empty state enhancement */
.empty-state-hint {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* Asset search suggestions styling */
.asset-search__suggestion {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.asset-search__suggestion:hover {
  background: var(--bg-hover);
}

.asset-search__suggestion--new {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

.asset-search__icon {
  font-size: 20px;
  flex-shrink: 0;
}

.asset-search__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.asset-search__name {
  font-weight: 500;
  color: var(--text-primary);
}

.asset-search__subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

.asset-search__action {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.asset-search__empty {
  padding: 20px;
  text-align: center;
}

.asset-search__empty p {
  margin: 0 0 12px;
  color: var(--text-secondary);
}

/* Section actions (multiple buttons in header) */
.section-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Selection toolbar */
.selection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.selection-toolbar__left,
.selection-toolbar__right {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Import form inline */
.import-form-inline {
  display: inline-flex;
}

.import-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.hidden-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Selection item states */
.selection-item--selected {
  background: rgba(16, 185, 129, 0.1);
  border-radius: var(--radius-sm);
}

/* Import instructions */
.import-instructions {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
}

.import-instructions h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text-primary);
}

.import-instructions ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.import-instructions li {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.import-instructions p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.import-note {
  padding: 10px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--status-intake);
}

/* Import errors display */
.import-errors {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--accent-danger);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 24px;
}

.import-errors h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--accent-danger);
}

.import-errors ul {
  margin: 0;
  padding-left: 20px;
}

.import-errors li {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

/* Alert boxes */
.alert {
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.alert h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
}

.alert ul {
  margin: 0 0 8px;
  padding-left: 20px;
}

.alert li {
  font-size: 13px;
  margin-bottom: 4px;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--accent-warning);
}

.alert-warning h4 {
  color: var(--accent-warning);
}

.alert-note {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin: 8px 0 0;
}

/* Empty state actions */
.empty-state-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.item-row__link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.item-row--clickable {
  cursor: pointer;
}

/* Column empty states */
.column-empty-text {
  font-size: 12px;
  color: var(--text-muted);
}

.column-empty-prompt {
  text-align: center;
  padding: 20px;
}

.column-empty-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Discovery insights */
.discovery-insights {
  margin-top: 16px;
}

/* Data value empty state */
.data-value-empty {
  color: var(--text-muted);
  font-style: italic;
}

/* Card date in list */
.card-date {
  font-size: 12px;
  color: var(--text-muted);
}

/* DQ Card system (legacy support) */
.dq-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.dq-card--allow-overflow {
  overflow: visible;
}

.dq-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.dq-card-title {
  font-size: 14px;
  font-weight: 600;
}

.dq-quote-list-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
}

/* Snapshot system (for company quotes table) */
.snapshot-table-wrapper {
  overflow-x: auto;
}

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

.snapshot-table th,
.snapshot-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.snapshot-table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.snapshot-table-td--lines {
  max-width: 200px;
}

.snapshot-table-td--actions,
.snapshot-table-th--actions {
  text-align: right;
  width: 60px;
}

.snapshot-status-badge {
  display: inline-flex;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.snapshot-menu {
  position: relative;
}

.snapshot-menu-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--duration-fast);
}

.snapshot-menu-trigger:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.snapshot-menu-trigger--primary {
  background: var(--accent-primary);
  color: #000;
}

.snapshot-menu-trigger--subtle {
  opacity: 0.5;
}

.snapshot-menu-trigger--subtle:hover {
  opacity: 1;
}

.snapshot-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 140px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 50;
  overflow: hidden;
}

.snapshot-dropdown--fixed {
  position: absolute;
}

.snapshot-dropdown-item {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-primary);
  transition: background var(--duration-fast);
}

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

.snapshot-dropdown-item--danger {
  color: var(--accent-danger);
}

.snapshot-row-menu {
  position: relative;
}

/* ==========================================================================
   LIST PAGE - Global Driver/Asset Views
   ========================================================================== */

.list-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.list-header__main {
  flex: 1;
  min-width: 200px;
}

.list-header__nav {
  margin-bottom: 8px;
}

.list-header__title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.list-header__title svg {
  color: var(--accent-primary);
}

.list-header__count {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 4px 10px;
  border-radius: var(--radius-md);
}

.list-header__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.list-search-form {
  display: contents;
}

/* Back link inline variant */
.back-link--inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--duration-fast);
}

.back-link--inline:hover {
  color: var(--accent-primary);
}

.back-link--inline svg {
  flex-shrink: 0;
}

/* Search input for list pages */
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper .search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 220px;
  padding: 8px 12px 8px 36px;
  font-size: 13px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

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

.search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-primary) 15%, transparent);
}

.list-content {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

/* List Table */
.list-table {
  width: 100%;
}

.list-table__header {
  display: flex;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.list-table__row {
  display: flex;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  text-decoration: none;
  transition: background var(--duration-fast);
}

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

.list-table__row:hover {
  background: var(--bg-hover);
}

.list-table__cell {
  display: flex;
  align-items: center;
  padding-right: 12px;
}

.list-table__cell--name,
.list-table__cell--asset {
  flex: 2;
  gap: 10px;
  font-weight: 500;
}

.list-table__cell--vin {
  flex: 1.5;
}

.list-table__cell--license,
.list-table__cell--type {
  flex: 1;
}

.list-table__cell--companies {
  flex: 1.5;
}

.list-table__cell--dob {
  flex: 1;
}

.list-table__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  flex-shrink: 0;
}

.list-table__name {
  color: var(--text-primary);
}

.text-mono {
  font-family: ui-monospace, "SF Mono", Monaco, monospace;
  font-size: 13px;
}

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

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

/* Pagination */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   DASHBOARD PAGE - Modern Company View
   ========================================================================== */

.dashboard-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* Dashboard Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.dashboard-header__main {
  flex: 1;
}

.dashboard-header__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-header__title {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.dashboard-header__edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast);
}

.dashboard-header__edit:hover {
  color: var(--accent-primary);
  background: var(--bg-elevated);
}

/* Contacts Avatar Strip */
.contacts-strip {
  display: flex;
  align-items: center;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: var(--radius-lg);
  transition: all var(--duration-fast);
}

.contacts-strip:hover {
  background: var(--bg-elevated);
}

.contacts-strip__avatars {
  display: flex;
  align-items: center;
}

.contacts-strip__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--bg-page);
  margin-left: -8px;
  object-fit: cover;
  transition: transform var(--duration-fast);
}

.contacts-strip__avatar:first-child {
  margin-left: 0;
}

.contacts-strip:hover .contacts-strip__avatar {
  transform: translateY(-2px);
}

.contacts-strip__avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: white;
  background: var(--accent-primary);
}

.contacts-strip__avatar--more {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border-color: var(--bg-page);
}

.contacts-strip__avatar--add {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 2px dashed var(--border-subtle);
  margin-left: 4px;
  transition: all var(--duration-fast);
}

.contacts-strip__avatar--add:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  background: var(--bg-elevated);
}

.dashboard-header__dot {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-secondary);
}

.dashboard-header__meta {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 6px 0 0 0;
  letter-spacing: 0.01em;
}

.dashboard-header__details {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}

.detail-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
}

.detail-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.dashboard-header__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* Cargo Visual - shows cargo types as chips in header */
.cargo-visual {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--duration-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.cargo-visual:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  transform: translateY(-1px);
}

.cargo-visual--empty {
  background: var(--bg-surface);
}

.cargo-visual--empty:hover {
  background: var(--bg-surface);
}

.cargo-visual__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.cargo-visual__label svg {
  color: var(--text-muted);
}

.cargo-visual__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.cargo-visual__chevron {
  color: var(--text-muted);
  flex-shrink: 0;
}

.cargo-visual:hover .cargo-visual__chevron {
  color: var(--accent-primary);
}

/* Cargo Chips */
.cargo-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.cargo-chip__pct {
  font-weight: 600;
  color: var(--text-primary);
}

/* Category-specific colors */
.cargo-chip--general-freight,
.cargo-chip--general-dry-freight {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}
.cargo-chip--general-freight .cargo-chip__pct,
.cargo-chip--general-dry-freight .cargo-chip__pct { color: #2563eb; }

.cargo-chip--refrigerated {
  background: rgba(6, 182, 212, 0.12);
  color: #06b6d4;
}
.cargo-chip--refrigerated .cargo-chip__pct { color: #0891b2; }

.cargo-chip--hazmat,
.cargo-chip--hazmat-freight {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}
.cargo-chip--hazmat .cargo-chip__pct,
.cargo-chip--hazmat-freight .cargo-chip__pct { color: #dc2626; }

.cargo-chip--livestock {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}
.cargo-chip--livestock .cargo-chip__pct { color: #16a34a; }

.cargo-chip--auto-hauler,
.cargo-chip--car-hauler {
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
}
.cargo-chip--auto-hauler .cargo-chip__pct,
.cargo-chip--car-hauler .cargo-chip__pct { color: #9333ea; }

.cargo-chip--heavy-machinery,
.cargo-chip--construction {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}
.cargo-chip--heavy-machinery .cargo-chip__pct,
.cargo-chip--construction .cargo-chip__pct { color: #d97706; }

.cargo-chip--household-goods {
  background: rgba(236, 72, 153, 0.12);
  color: #ec4899;
}
.cargo-chip--household-goods .cargo-chip__pct { color: #db2777; }

.cargo-chip--intermodal,
.cargo-chip--intermodal-operations,
.cargo-chip--containerized-freight {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
}
.cargo-chip--intermodal .cargo-chip__pct,
.cargo-chip--intermodal-operations .cargo-chip__pct,
.cargo-chip--containerized-freight .cargo-chip__pct { color: #4f46e5; }

.cargo-chip--flat-bed {
  background: rgba(251, 146, 60, 0.12);
  color: #fb923c;
}
.cargo-chip--flat-bed .cargo-chip__pct { color: #ea580c; }

.cargo-chip--sand-gravel,
.cargo-chip--scrap-metal {
  background: rgba(120, 113, 108, 0.12);
  color: #78716c;
}
.cargo-chip--sand-gravel .cargo-chip__pct,
.cargo-chip--scrap-metal .cargo-chip__pct { color: #57534e; }

.cargo-chip--medical-supplies {
  background: rgba(20, 184, 166, 0.12);
  color: #14b8a6;
}
.cargo-chip--medical-supplies .cargo-chip__pct { color: #0d9488; }

.cargo-chip--appliances {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}
.cargo-chip--appliances .cargo-chip__pct { color: #475569; }

.cargo-chip--motor-coach {
  background: rgba(217, 70, 239, 0.12);
  color: #d946ef;
}
.cargo-chip--motor-coach .cargo-chip__pct { color: #c026d3; }

.cargo-chip--more {
  background: var(--bg-surface);
  border: 1px dashed var(--card-border);
  color: var(--text-muted);
  font-weight: 600;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.type-badge--trucking {
  background: rgba(236, 72, 153, 0.15);
  color: #ec4899;
}

.type-badge--non_trucking {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.type-badge--personal_line {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.type-badge--radius {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--bg-elevated);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.dashboard-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--bg-elevated);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  width: 100%;
}

@media (max-width: 900px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}

.stat-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.stat-card__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.stat-card__action {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: 50%;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--duration-fast);
}

.stat-card__action:hover {
  background: var(--accent-primary);
  color: white;
}

.stat-card__value {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-card__value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.stat-card__value-row .stat-card__value {
  margin-bottom: 0;
}

.stat-card__footer {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-card__compare {
  font-size: 12px;
  color: var(--text-muted);
}

.stat-card__link {
  font-size: 12px;
  color: var(--accent-primary);
}

/* Contacts card with list */
.stat-card--contacts {
  display: flex;
  flex-direction: column;
}

.contact-list-mini {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  margin-bottom: 8px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast);
}

.contact-row:hover {
  background: var(--bg-hover);
  margin: 0 -8px;
  padding: 4px 8px;
}

.contact-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: white;
  background: var(--accent-primary);
  flex-shrink: 0;
}

.contact-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-card__avatars {
  display: flex;
}

.mini-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  color: white;
  margin-right: -6px;
  border: 2px solid var(--bg-surface);
  background: var(--accent-primary);
}

.mini-avatar--more {
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

/* Compact Clickable Stat Cards */
.stats-row--compact {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  width: 100%;
}

.stat-card--clickable {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  text-decoration: none;
  transition: all var(--duration-fast);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.stat-card--clickable:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

.stat-card__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-card--clickable .stat-card__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-card--clickable .stat-card__value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin: 0;
}

.stat-card__chevron {
  color: var(--text-muted);
  opacity: 0;
  transition: all var(--duration-fast);
}

.stat-card--clickable:hover .stat-card__chevron {
  opacity: 1;
  color: var(--accent-primary);
}

@media (max-width: 1100px) {
  .stats-row--compact {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .stats-row--compact {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stat-card--clickable .stat-card__value {
    font-size: 24px;
  }
}

/* AI Summary Banner (Collapsible) */
.ai-summary-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
  border: none;
  cursor: pointer;
  text-align: left;
  transition: all var(--duration-fast);
}

.ai-summary-banner:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
}

.ai-summary-banner--expanded {
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.ai-summary-banner__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-summary-banner__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.ai-summary-banner__counts {
  display: flex;
  gap: 6px;
}

.ai-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  color: white;
}

.ai-count--critical {
  background: #dc2626;
}

.ai-count--warning {
  background: #f59e0b;
}

.ai-count--info {
  background: #3b82f6;
}

.ai-count--success {
  background: #22c55e;
}

.ai-summary-banner__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-summary-banner__meta {
  font-size: 12px;
  color: var(--text-muted);
}

.ai-summary-banner__chevron {
  color: var(--text-secondary);
  transition: transform var(--duration-fast);
}

.ai-insights-panel {
  display: none;
}

/* Secondary Navigation (in header) */
.secondary-nav {
  display: flex;
  gap: 6px;
}

.secondary-nav__item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  transition: all var(--duration-fast);
}

.secondary-nav__item:hover {
  color: var(--text-primary);
  border-color: var(--accent-primary);
  background: var(--bg-surface);
}

.secondary-nav__count {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
}

.secondary-nav__item:hover .secondary-nav__count {
  color: var(--accent-primary);
}

/* AI Filter Buttons */
.ai-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-filters {
  display: flex;
  gap: 4px;
}

.ai-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--duration-fast);
  opacity: 0.35;
}

.ai-filter--active {
  opacity: 1;
}

.ai-filter--critical {
  background: #dc2626;
  color: white;
}

.ai-filter--warning {
  background: #f59e0b;
  color: white;
}

.ai-filter--info {
  background: #3b82f6;
  color: white;
}

.ai-filter--success {
  background: #22c55e;
  color: white;
}

.ai-filter__count {
  font-size: 11px;
  font-weight: 700;
}

/* Dashboard Grid - 2x2 layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 24px;
}

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

/* Dashboard Grid - 3 column layout */
.dashboard-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 1200px) {
  .dashboard-grid-3col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .dashboard-grid,
  .dashboard-grid--2col {
    grid-template-columns: 1fr;
  }
  
  .dashboard-grid-3col {
    grid-template-columns: 1fr;
  }
}

.dashboard-column {
  display: contents; /* Makes children participate in parent grid */
}

/* Dashboard Cards */
.dashboard-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.dashboard-card--ai {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  border-color: rgba(16, 185, 129, 0.2);
}

.dashboard-card--full {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dashboard-card--full .dashboard-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dashboard-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.dashboard-card__title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-muted);
  border-radius: 11px;
}

.dashboard-card__body {
  padding: 16px 20px;
}

.dashboard-card__footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-subtle);
}

.dashboard-card__section {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
}

.dashboard-card__section--collapsed {
  background: var(--bg-muted);
}

.data-table--muted {
  opacity: 0.7;
}

.data-table--muted .data-table__row:hover {
  background: var(--bg-hover);
}

.data-table__row--clickable {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.data-table__row--clickable:hover {
  background-color: var(--bg-hover, #f8f9fa);
}

.data-table__row--clickable:hover td {
  background-color: var(--bg-hover, #f8f9fa);
}

.card-link {
  font-size: 13px;
  color: var(--accent-primary);
  font-weight: 500;
}

.section-subtitle {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 12px 0;
}

/* Task List */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin: 0 -12px;
  border-radius: var(--radius-md);
  transition: background var(--duration-fast);
}

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

.task-item__status {
  flex-shrink: 0;
}

.task-item__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  color: var(--text-muted);
}

.task-item__content {
  flex: 1;
  min-width: 0;
}

.task-item__title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.task-item__meta {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

/* Status Dots */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-dot--not_now { background: var(--status-not-now); }
.status-dot--intake { background: var(--status-intake); }
.status-dot--underwriters { background: var(--status-underwriters); }
.status-dot--quoted { background: var(--status-quoted); }
.status-dot--presented { background: var(--status-presented); }
.status-dot--bound { background: var(--status-bound); }
.status-dot--not_taken { background: var(--status-not-taken); }

/* Badge Pill Variant */
.badge--pill {
  border-radius: 20px;
  padding: 4px 10px;
}

/* AI Components */
.ai-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-icon {
  font-size: 18px;
}

.ai-summary {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 16px;
}

.ai-summary-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.ai-summary__content {
  margin-bottom: 12px;
}

.ai-summary__content p {
  margin: 0 0 8px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.ai-summary__content p:last-child {
  margin-bottom: 0;
}

.ai-summary__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 16px;
}

/* AI Insight Cards */
.ai-insights-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-insights-list--compact {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}

.ai-insights-list--compact::-webkit-scrollbar {
  width: 6px;
}

.ai-insights-list--compact::-webkit-scrollbar-track {
  background: var(--bg-muted);
  border-radius: 3px;
}

.ai-insights-list--compact::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 3px;
}

.ai-insights-list--compact::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.ai-insight-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  border-left: 4px solid var(--text-muted);
}

.ai-insight-card--critical {
  border-left-color: #dc2626;
  background: color-mix(in srgb, #dc2626 5%, var(--bg-surface));
}

.ai-insight-card--warning {
  border-left-color: #f59e0b;
  background: color-mix(in srgb, #f59e0b 5%, var(--bg-surface));
}

.ai-insight-card--info {
  border-left-color: #3b82f6;
  background: color-mix(in srgb, #3b82f6 5%, var(--bg-surface));
}

.ai-insight-card--success {
  border-left-color: #22c55e;
  background: color-mix(in srgb, #22c55e 5%, var(--bg-surface));
}

.ai-insight-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.ai-insight-card__badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-elevated);
}

.ai-insight-card--critical .ai-insight-card__badge {
  background: #dc2626;
  color: white;
}

.ai-insight-card--warning .ai-insight-card__badge {
  background: #f59e0b;
  color: white;
}

.ai-insight-card--info .ai-insight-card__badge {
  background: #3b82f6;
  color: white;
}

.ai-insight-card--success .ai-insight-card__badge {
  background: #22c55e;
  color: white;
}

.ai-insight-card__category {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ai-insight-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.ai-insight-card__description {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Fixed height card with scroll */
.dashboard-card--fixed {
  max-height: 600px;
  display: flex;
  flex-direction: column;
}

.dashboard-card--fixed .dashboard-card__header {
  flex-shrink: 0;
}

.dashboard-card__body--scroll {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.ai-text {
  font-size: 14px;
  line-height: 1.6;
}

.ai-prompt {
  text-align: center;
  padding: 24px 16px;
}

.ai-prompt--centered {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.ai-prompt__icon {
  margin-bottom: 12px;
  color: var(--text-muted);
}

.ai-prompt__text {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
}

/* Insight List */
.insight-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.insight-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  margin: 0 -12px;
  border-radius: var(--radius-md);
  transition: background var(--duration-fast);
}

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

.insight-item__content {
  min-width: 0;
}

.insight-item__title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.insight-item__meta {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.insight-item__date {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Quick Actions Grid */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast);
}

.quick-action:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
}

.quick-action__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

.quick-action__icon--blue {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.quick-action__icon--purple {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.quick-action__icon--green {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.quick-action__icon--orange {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.quick-action__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Empty State Mini */
.empty-state-mini {
  text-align: center;
  padding: 24px 16px;
}

.empty-state-mini p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 12px 0;
}

/* Extra small button */
.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
}

/* ==========================================================================
   COMMAND PALETTE - Fizzy Quick Menu
   ========================================================================== */

.command-palette {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 8vh;
}

.command-palette[hidden] {
  display: none;
}

.command-palette__backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.15s ease-out;
}

.command-palette__dialog {
  position: fixed;
  top: 8vh;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 480px;
  max-height: 75vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  box-shadow: 
    0 0 0 1px rgba(0, 0, 0, 0.05),
    0 20px 40px -8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: paletteIn 0.2s var(--ease-out);
}

.command-palette__dialog--find-mode {
  border: 2px solid transparent;
  background: 
    linear-gradient(var(--bg-surface), var(--bg-surface)) padding-box,
    linear-gradient(135deg, var(--accent-primary), #22d3ee) border-box;
  box-shadow: 
    0 0 20px rgba(16, 185, 129, 0.3),
    0 0 40px rgba(34, 211, 238, 0.15),
    0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@keyframes paletteIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

/* Search Input */
.command-palette__search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.command-palette__search--find-mode {
  background: transparent;
}

.command-palette__ff-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--accent-primary), #22d3ee);
  color: white;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  flex-shrink: 0;
  animation: pill-appear 0.15s ease-out;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.command-palette__ff-pill svg {
  opacity: 0.9;
}

@keyframes pill-appear {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.command-palette__search-icon {
  display: none;
}

.command-palette__input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 17px;
  font-weight: 400;
  color: var(--text-primary);
  outline: none;
}

.command-palette__input::placeholder {
  color: var(--text-muted);
}

/* Search hint when in find mode with no query */
.command-palette__search-hint {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* Content */
.command-palette__content {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
}

/* Sections */
.command-palette__section {
  margin-bottom: 4px;
}

.command-palette__section:last-child {
  margin-bottom: 0;
}

.command-palette__section-header {
  padding: 10px 8px 6px;
}

.command-palette__section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-primary);
}

/* Items */
.command-palette__items {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.command-palette__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--duration-fast);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
}

.command-palette__item:hover,
.command-palette__item--selected {
  background: var(--bg-hover);
}

.command-palette__item-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: 8px;
  color: var(--text-secondary);
}

.command-palette__item-icon--green {
  background: var(--accent-primary);
  color: white;
}

.command-palette__item-icon--blue {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.command-palette__item-icon--purple {
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
}

.command-palette__item-icon--person {
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
}

.command-palette__item-icon--add {
  background: transparent;
  color: var(--text-muted);
}

.command-palette__item-label {
  flex: 1;
}

.command-palette__kbd {
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-muted);
}

.command-palette__empty {
  padding: 12px 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* Quick Action Buttons - Fizzy Style */
.command-palette__quick-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.command-palette__quick-btn {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast);
}

.command-palette__quick-btn svg {
  width: 24px;
  height: 24px;
}

.command-palette__quick-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.command-palette__quick-btn--active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.command-palette__quick-btn--active:hover {
  background: var(--accent-primary-hover);
  border-color: var(--accent-primary-hover);
  color: white;
}

.command-palette__quick-kbd {
  position: absolute;
  top: 4px;
  right: 6px;
  padding: 1px 4px;
  font-size: 9px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  color: inherit;
  opacity: 0.7;
}

.command-palette__quick-btn:not(.command-palette__quick-btn--active) .command-palette__quick-kbd {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

/* Collapsible Sections */
.command-palette__section--collapsible .command-palette__section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 8px 6px;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.command-palette__section--collapsible .command-palette__section-header:hover {
  background: var(--bg-hover);
  border-radius: 6px;
}

.command-palette__chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--duration-fast);
}

.command-palette__section--collapsible[data-expanded="false"] .command-palette__chevron {
  transform: rotate(-90deg);
}

.command-palette__section--collapsible[data-expanded="false"] .command-palette__items {
  display: none;
}

/* Search Results Styles */
.command-palette__results-group {
  margin-bottom: 4px;
}

.command-palette__results-group:last-child {
  margin-bottom: 0;
}

.command-palette__results-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 12px 12px 6px;
  margin-bottom: 0;
}

.command-palette__results-group .command-palette__item {
  padding: 10px 12px;
  border-radius: 8px;
  margin: 0 4px;
}

.command-palette__results-group .command-palette__item:hover {
  background: var(--bg-hover);
}

.command-palette__results-group .command-palette__item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--bg-surface);
}

.command-palette__item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.command-palette__item-meta {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.command-palette__section--dynamic {
  padding: 0;
}

.command-palette__section--dynamic .command-palette__section-header {
  display: none;
}

.command-palette__section--dynamic .command-palette__items {
  padding: 0;
}

.command-palette__no-results {
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

/* Footer */
.command-palette__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  border-radius: 0 0 16px 16px;
}

.command-palette__hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.command-palette__hint kbd {
  padding: 3px 8px;
  font-size: 11px;
  font-family: inherit;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
}

/* Make logo clickable button style */
.app-logo {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* ==========================================================================
   QUOTE CARDS INDEX VIEW
   ========================================================================== */

.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
}

.page-header {
  margin-bottom: 24px;
}

.page-header__nav {
  margin-bottom: 16px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--duration-fast);
}

.back-link:hover {
  color: var(--accent-primary);
}

.page-header__main {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.page-header__title {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.page-header__count {
  font-size: 14px;
  color: var(--text-muted);
}

.page-header__actions {
  margin-top: 16px;
}

/* Cards Grid (reusable for quote lists) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

/* Badge outline variant */
.badge--outline {
  background: transparent;
  border: 1px solid currentColor;
}

/* Info List (for detail views) */
.info-list {
  display: grid;
  gap: 16px;
}

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

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

.info-item dd {
  font-size: 14px;
  color: var(--text-primary);
  margin: 0;
}

/* Activity Log */
.activity-log {
  padding: 16px;
}

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

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

.activity-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: 50%;
  color: var(--text-secondary);
}

.activity-icon--created {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.activity-icon--license,
.activity-icon--document {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.activity-icon--employment,
.activity-icon--linked {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.activity-icon--employment_end,
.activity-icon--status_change {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.activity-icon--quote {
  background: rgba(236, 72, 153, 0.15);
  color: #ec4899;
}

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

.activity-description {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.activity-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   ACTIVITY TIMELINE - Connected dot style
   ========================================================================== */

.activity-timeline {
  padding: 20px 20px 20px 28px;
  position: relative;
}

/* The connecting line */
.activity-timeline::before {
  content: "";
  position: absolute;
  left: 34px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  background: var(--border-subtle);
}

.activity-timeline__item {
  display: flex;
  gap: 16px;
  position: relative;
  padding-bottom: 20px;
}

.activity-timeline__item:last-child {
  padding-bottom: 0;
}

/* The colored dot marker */
.activity-timeline__marker {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border-default);
  position: relative;
  z-index: 1;
  margin-top: 4px;
}

/* Marker color variants */
.activity-timeline__marker--created {
  background: #10b981;
  border-color: #10b981;
}

.activity-timeline__marker--license,
.activity-timeline__marker--document {
  background: #3b82f6;
  border-color: #3b82f6;
}

.activity-timeline__marker--employment,
.activity-timeline__marker--linked {
  background: #8b5cf6;
  border-color: #8b5cf6;
}

.activity-timeline__marker--employment_end,
.activity-timeline__marker--status_change {
  background: #f59e0b;
  border-color: #f59e0b;
}

.activity-timeline__marker--quote {
  background: #ec4899;
  border-color: #ec4899;
}

.activity-timeline__content {
  flex: 1;
  min-width: 0;
}

.activity-timeline__text {
  font-size: 14px;
  color: var(--text-primary);
  margin: 0 0 2px 0;
  line-height: 1.4;
}

.activity-timeline__time {
  font-size: 12px;
  color: var(--text-muted);
}

.activity-timeline__link {
  color: var(--accent-primary);
  text-decoration: none;
}

.activity-timeline__link:hover {
  text-decoration: underline;
}

/* Two-column timeline for full width */
.activity-timeline--two-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 24px;
  justify-content: center;
}

.activity-timeline--two-col::before {
  display: none; /* Hide single line in multi-col mode */
}

.activity-timeline--two-col .activity-timeline__item {
  padding-left: 20px;
  border-left: 2px solid var(--border-subtle);
  padding-bottom: 0;
}

.activity-timeline--two-col .activity-timeline__marker {
  position: absolute;
  left: -7px;
}

/* ==========================================================================
   DOCUMENT LIST (compact list for global pages)
   ========================================================================== */

.document-list {
  padding: 0;
}

.document-list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.document-list__item:last-child {
  border-bottom: none;
}

.document-list__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.1);
  border-radius: var(--radius-md);
  color: #3b82f6;
}

.document-list__content {
  flex: 1;
  min-width: 0;
}

.document-list__name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.document-list__meta {
  font-size: 12px;
  color: var(--text-muted);
}

.document-list__action {
  flex-shrink: 0;
  padding: 6px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast);
}

.document-list__action:hover {
  background: var(--bg-elevated);
  color: var(--accent-primary);
}

/* VIN Code Styling */
.vin-code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 16px 0;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.empty-state__icon {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.empty-state__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.empty-state__text {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 20px 0;
}

/* Selection List (for drivers/equipment) */
.selection-form {
  max-width: 100%;
}

.selection-list {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.selection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.selection-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.selection-count {
  font-size: 13px;
  color: var(--text-muted);
}

.selection-items {
  max-height: 400px;
  overflow-y: auto;
}

.selection-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background var(--duration-fast);
}

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

.selection-item:hover {
  background: var(--bg-elevated);
}

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

.selection-item__content {
  flex: 1;
  min-width: 0;
}

.selection-item__name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.selection-item__details {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Market Status Badges */
.market-status {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 10px;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--status-color) 15%, transparent);
  color: var(--status-color);
}

/* Combobox / Searchable Dropdown */
.combobox {
  position: relative;
}

.combobox-input {
  width: 100%;
}

.combobox-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  margin-top: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 300px;
  overflow: hidden;
}

.combobox-options {
  max-height: 300px;
  overflow-y: auto;
}

.combobox-option {
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--duration-fast);
}

.combobox-option:hover,
.combobox-option--selected {
  background: var(--bg-elevated);
}

.combobox-option--selected {
  background: var(--accent-subtle);
}

/* ==========================================================================
   MOBILE RESPONSIVE STYLES
   ========================================================================== */

/* Mobile-first breakpoints */
@media (max-width: 768px) {
  /* App Shell */
  .app-header {
    padding: 12px 16px;
  }
  
  .header-actions--left {
    left: 16px;
  }
  
  .header-actions--right {
    right: 16px;
  }
  
  .app-content {
    padding-top: 56px;
  }
  
  /* Dashboard Page */
  .dashboard-page {
    padding: 16px 12px;
  }
  
  /* Dashboard Header - Stack on mobile */
  .dashboard-header {
    flex-direction: column;
    gap: 12px;
    position: relative;
  }
  
  .dashboard-header__main {
    flex: 1;
    min-width: 0;
    padding-right: 40px; /* Space for the edit button only */
  }
  
  /* Move edit button to top right */
  .dashboard-header__edit {
    position: absolute;
    top: 0;
    right: 0;
  }
  
  /* Move contacts strip below header, full width */
  .dashboard-header__actions {
    position: static;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    order: 1;
  }
  
  .dashboard-header__actions .contacts-strip {
    padding: 8px 0;
  }
  
  .dashboard-header__actions .contacts-strip__avatar {
    width: 36px;
    height: 36px;
    font-size: 12px;
    margin-left: -8px;
  }
  
  .dashboard-header__actions .contacts-strip__avatar:first-child {
    margin-left: 0;
  }
  
  .dashboard-header__actions .contacts-strip__avatar--add {
    margin-left: 4px;
  }
  
  .dashboard-header__title {
    font-size: 18px;
  }
  
  .dashboard-header__meta {
    font-size: 12px;
    line-height: 1.4;
  }
  
  .dashboard-header__dot {
    font-size: 14px;
  }
  
  .dashboard-header__details {
    gap: 8px;
  }
  
  .detail-item {
    font-size: 12px;
  }
  
  /* Stats Row */
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .stat-card {
    padding: 14px 16px;
  }
  
  .stat-card__value {
    font-size: 28px;
  }
  
  /* Single Page Layout */
  .single-page {
    padding: 16px 12px;
  }
  
  .page-title {
    font-size: 20px;
  }
  
  /* Board Layout - Horizontal scroll */
  .board-grid {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  
  .board-column {
    min-width: 280px;
    max-width: 280px;
    flex-shrink: 0;
    scroll-snap-align: start;
  }
  
  .board-column-header {
    padding: 12px 14px;
  }
  
  .board-column-header__title {
    font-size: 12px;
  }
  
  /* Cards */
  .card {
    padding: 14px;
  }
  
  .card-title {
    font-size: 14px;
  }
  
  .card-subtitle {
    font-size: 12px;
  }
  
  /* Cards Grid */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  /* Forms */
  .form-page {
    padding: 16px 12px;
  }
  
  .form-section {
    padding: 20px 16px;
  }
  
  .form-title {
    font-size: 20px;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .form-row {
    flex-direction: column;
    gap: 16px;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 12px;
  }
  
  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Buttons */
  .btn {
    padding: 10px 16px;
  }
  
  .btn-sm {
    padding: 8px 12px;
  }
  
  /* Sections */
  .section {
    margin-bottom: 20px;
  }
  
  .section-header {
    padding: 14px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .section-title {
    font-size: 15px;
  }
  
  .section-body {
    padding: 16px;
  }
  
  /* Data Grid */
  .data-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  /* Tables - Horizontal scroll */
  .data-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .data-table {
    min-width: 600px;
  }
  
  /* Quote Show Page */
  .quote-show-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  /* Selection List */
  .selection-list {
    gap: 8px;
  }
  
  .selection-item {
    padding: 12px 14px;
  }
  
  /* Back Link */
  .back-link {
    font-size: 13px;
  }
  
  .back-link__key {
    display: none;
  }
  
  /* Modals/Command Palette */
  .command-palette {
    width: 95%;
    max-width: 400px;
    max-height: 70vh;
  }
  
  .command-palette__input {
    padding: 14px 16px;
    font-size: 16px; /* Prevents iOS zoom */
  }
  
  /* Toast */
  .toast-container {
    bottom: 16px;
    left: 12px;
    right: 12px;
  }
  
  /* DQ Card (Quotes Snapshot) */
  .dq-card {
    padding: 16px;
  }
  
  /* Discovery Section */
  .discovery-content {
    padding: 16px;
  }
  
  /* Comments */
  .comment-form textarea {
    font-size: 16px; /* Prevents iOS zoom */
  }
}

/* Extra small screens (phones in portrait) */
@media (max-width: 480px) {
  .dashboard-header__title {
    font-size: 18px;
  }
  
  .stats-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .stat-card__value {
    font-size: 24px;
  }
  
  .board-column {
    min-width: 260px;
    max-width: 260px;
  }
  
  .card-tags {
    flex-wrap: wrap;
  }
  
  .page-header-row {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .page-header-actions {
    flex-direction: column;
  }
  
  .page-header-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Hide less important elements on very small screens */
  .card-dot {
    display: none;
  }
  
  .card-meta {
    gap: 12px;
  }
  
  .card-timestamp {
    font-size: 11px;
  }
}

/* Touch-friendly tap targets */
@media (hover: none) and (pointer: coarse) {
  .btn, 
  .stat-card__action,
  .header-icon-btn,
  .selection-item,
  .combobox-option {
    min-height: 44px;
  }
  
  .combobox-option {
    padding: 14px 16px;
  }
  
  .data-table td,
  .data-table th {
    padding: 14px 12px;
  }
}

/* Landscape phone adjustments */
@media (max-width: 768px) and (orientation: landscape) {
  .board-grid {
    max-height: 60vh;
  }
  
  .command-palette {
    max-height: 80vh;
  }
}

/* Card Perma (Quote Detail) Mobile */
@media (max-width: 1100px) {
  /* Hide fixed side actions on narrower screens */
  .card-perma__actions {
    display: none;
  }
}

@media (max-width: 768px) {
  /* =========================================
     QUOTE DETAIL MOBILE - Fizzy-inspired
     ========================================= */
  
  .card-perma {
    padding: 12px;
    min-height: calc(100vh - 64px);
  }
  
  .card-perma__container {
    padding: 0;
  }
  
  .card-perma__bg {
    padding: 16px;
    border-radius: var(--radius-lg);
    min-height: auto;
    position: relative;
  }
  
  /* Mobile close button - show on mobile */
  .mobile-close-btn {
    display: flex;
  }
  
  /* Back link / breadcrumb */
  .card-perma__back {
    display: none; /* Hidden on mobile - using mobile-close-btn instead */
  }
  
  .breadcrumb {
    display: none; /* Hide full breadcrumb on mobile */
  }
  
  .back-link {
    font-size: 14px;
    gap: 8px;
  }
  
  .back-link__key {
    display: none; /* Hide keyboard shortcut on mobile */
  }
  
  /* Header row - stack everything vertically */
  .card__header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .card__board {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .card__id--large {
    font-size: 14px;
    padding: 4px 10px;
  }
  
  .card__effective-tag {
    font-size: 12px;
    padding: 4px 10px;
  }
  
  /* Tags row */
  .card__tags {
    flex-wrap: wrap;
    gap: 4px;
  }
  
  .card__tag button,
  button.card__tag {
    padding: 3px 8px;
    font-size: 10px;
  }
  
  /* Card body - stack sections vertically */
  .card__body {
    flex-direction: column;
    gap: 0;
  }
  
  /* Title and description */
  .card__title {
    font-size: 18px;
    line-height: 1.3;
  }
  
  .card__title-sub {
    display: block;
    margin: 4px 0 0 0;
  }
  
  .card__description {
    font-size: 13px;
    margin-bottom: 16px;
  }
  
  .card__client-type {
    margin-left: 0;
    margin-top: 4px;
    display: inline-block;
  }
  
  /* Sections */
  .card__section {
    margin-bottom: 16px;
    padding: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--card-color) 20%, var(--border-subtle));
    padding-bottom: 16px;
  }
  
  .card__section:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
  }
  
  .card__section-title {
    font-size: 11px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .card__section-add {
    font-size: 13px;
    font-weight: 600;
    margin-left: 0;
  }
  
  /* Coverage & Markets tables - card style on mobile */
  .coverage-table {
    width: 100%;
    min-width: 0;
  }
  
  .coverage-table thead {
    display: none; /* Hide headers, use card layout instead */
  }
  
  .coverage-table tbody {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .coverage-table__row {
    display: flex;
    flex-direction: column;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
  }
  
  .coverage-table__row td {
    padding: 0;
    border-bottom: none;
  }
  
  .coverage-table__row td.coverage-table__type {
    padding-right: 0;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
  }
  
  .coverage-table__row td.coverage-table__limit,
  .coverage-table__row td.coverage-table__deductible {
    padding-left: 0;
    padding-right: 0;
    font-size: 13px;
  }
  
  .coverage-table__row td.coverage-table__limit::before {
    content: "Limit: ";
    font-weight: 500;
    color: var(--text-muted);
  }
  
  .coverage-table__row td.coverage-table__deductible::before {
    content: "Ded: ";
    font-weight: 500;
    color: var(--text-muted);
  }
  
  /* Stats row (Drivers/Equipment) */
  .card__stats {
    gap: 16px;
    justify-content: flex-start;
  }
  
  .card__stat--link {
    flex: 1;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
  }
  
  .card__stat-number {
    font-size: 20px;
  }
  
  .card__stat-label {
    font-size: 11px;
  }
  
  /* Status selector - hide desktop version, show dropdown on mobile */
  .card__stages--desktop {
    display: none;
  }
  
  .card__stages--mobile {
    display: block;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid color-mix(in srgb, var(--card-color) 20%, var(--border-subtle));
  }
  
  /* Footer - vertical stacking */
  .card__footer {
    padding-top: 16px;
    margin-top: 16px;
  }
  
  .card__assignment {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .card__assigned {
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
  }
  
  .card__assigned-divider {
    display: none;
  }
  
  .card__assigned-info {
    flex: 1;
  }
  
  .card__assigned-label {
    font-size: 10px;
  }
  
  .card__assigned-name {
    font-size: 11px;
  }
  
  /* Bottom action bar - hide desktop, show mobile Fizzy-style */
  .card-perma__notch--desktop {
    display: none;
  }
  
  .card-perma__notch--mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding: 12px 0;
    padding-bottom: 16px;
    gap: 8px;
  }
  
  /* Comments section mobile */
  .comments-section {
    margin-top: 20px;
    padding: 16px;
    border-radius: var(--radius-lg);
  }
  
  .comments-header {
    margin-bottom: 12px;
  }
  
  .comments-title {
    font-size: 13px;
  }
  
  /* Market status badge */
  .market-status {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
  }
  
  /* Empty state */
  .card__empty {
    font-size: 13px;
    padding: 12px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    text-align: center;
  }
}

/* Safe area insets for notched phones */
@supports (padding: max(0px)) {
  .app-header {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  
  .app-content {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }
  
  .dashboard-page,
  .single-page,
  .form-page {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  
  /* Mobile board safe areas */
  .mobile-board-header {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  
  .mobile-board-columns {
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
  
  .mobile-column {
    margin-left: max(12px, env(safe-area-inset-left));
    margin-right: max(12px, env(safe-area-inset-right));
  }
  
  /* Quote detail page safe areas */
  .card-perma {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  
  .card-perma__notch {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}

/* ==========================================================================
   CARGO PROFILE SELECTOR
   Category chips and item selection for Dynamic App cargo distribution
   ========================================================================== */

/* Category chip colors matching the screenshot */
.cargo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.cargo-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.cargo-chip__remove {
  font-size: 14px;
  opacity: 0;
  margin-left: 2px;
  transition: opacity var(--duration-fast);
}

.cargo-chip.selected {
  border-color: var(--accent-primary);
}

.cargo-chip.selected .cargo-chip__remove {
  opacity: 0.6;
}

.cargo-chip:hover .cargo-chip__remove {
  opacity: 1;
}

/* Chip color variants */
.cargo-chip--blue {
  background: #dbeafe;
  color: #1e40af;
}

.cargo-chip--yellow {
  background: #fef3c7;
  color: #92400e;
}

.cargo-chip--gray {
  background: #f3f4f6;
  color: #374151;
}

.cargo-chip--green {
  background: #d1fae5;
  color: #065f46;
}

.cargo-chip--orange {
  background: #ffedd5;
  color: #9a3412;
}

.cargo-chip--purple {
  background: #ede9fe;
  color: #5b21b6;
}

.cargo-chip--teal {
  background: #ccfbf1;
  color: #115e59;
}

.cargo-chip--pink {
  background: #fce7f3;
  color: #9d174d;
}

.cargo-chip--cyan {
  background: #cffafe;
  color: #155e75;
}

.cargo-chip--indigo {
  background: #e0e7ff;
  color: #3730a3;
}

.cargo-chip.selected {
  box-shadow: 0 0 0 2px var(--accent-primary);
}

/* Category items container */
.cargo-categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.cargo-category {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  overflow: hidden;
}

.cargo-category__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.cargo-category__items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ==========================================================================
   OPERATIONS PAGE - Sticky Header Card
   ========================================================================== */

.operations-sticky-header {
  position: sticky;
  top: 88px;
  z-index: 90;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px;
  padding: 20px 28px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  backdrop-filter: blur(8px);
}

.operations-header__limit {
  flex: 0 0 auto;
}

.operations-header__distribution {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}

.operations-header__save {
  flex: 0 0 auto;
  margin-left: auto;
}

.operations-header__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.operations-header__input-group {
  display: flex;
  align-items: center;
  background: var(--bg-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.operations-header__prefix {
  padding: 10px 12px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 14px;
}

.operations-header__input {
  width: 140px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
}

.operations-header__input:focus {
  outline: none;
}

.operations-header__input-group:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.operations-header__meter-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.operations-header__meter {
  flex: 1;
  height: 12px;
  background: var(--bg-base);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.operations-header__bar {
  height: 100%;
  width: 0%;
  background: var(--accent-warning);
  border-radius: 6px;
  transition: width 0.3s ease, background 0.3s ease;
}

.operations-header__bar.bar--success {
  background: linear-gradient(90deg, var(--accent-primary) 0%, #34d399 100%);
}

.operations-header__bar.bar--warning {
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.operations-header__bar.bar--danger {
  background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

.operations-header__percentage {
  font-size: 24px;
  font-weight: 700;
  min-width: 70px;
  text-align: right;
}

.operations-header__percentage.text-success {
  color: var(--accent-primary);
}

.operations-header__percentage.text-warning {
  color: var(--accent-warning);
}

.operations-header__percentage.text-danger {
  color: var(--accent-danger);
}

/* Total percentage display - legacy, kept for backwards compat */
.cargo-total {
  display: none;
}

/* Header row for items table */
.cargo-items-header {
  display: grid;
  grid-template-columns: 1fr 70px 90px 90px;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

@media (min-width: 640px) {
  .cargo-items-header {
    grid-template-columns: 1fr 80px 100px 100px;
    gap: 16px;
    padding: 8px 16px;
  }
}

.cargo-items-header__item {
  text-align: left;
}

.cargo-items-header__exposure {
  text-align: center;
}

.cargo-items-header__max,
.cargo-items-header__avg {
  text-align: right;
}

/* Updated cargo item layout */
.cargo-item {
  display: grid;
  grid-template-columns: 1fr 70px 90px 90px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  transition: background var(--duration-fast) var(--ease-out);
}

@media (min-width: 640px) {
  .cargo-item {
    grid-template-columns: 1fr 80px 100px 100px;
    gap: 16px;
    padding: 12px 16px;
  }
}

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

.cargo-item__label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.4;
}

.cargo-item__label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent-primary);
  flex-shrink: 0;
}

.cargo-item--inactive .cargo-item__percentage,
.cargo-item--inactive .cargo-item__max,
.cargo-item--inactive .cargo-item__avg {
  visibility: hidden;
}

.cargo-item__percentage {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 14px;
  text-align: center;
}

@media (min-width: 640px) {
  .cargo-item__percentage {
    padding: 8px 10px;
  }
}

.cargo-item__percentage:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.cargo-item__max,
.cargo-item__avg {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  text-align: right;
}

/* Mobile labels for values */
.cargo-item__max::before,
.cargo-item__avg::before {
  display: inline;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-right: 4px;
}

@media (min-width: 768px) {
  .cargo-item__max::before,
  .cargo-item__avg::before {
    display: none;
  }
}

/* ==========================================================================
   Document Upload - Card Grid (matches Drive Portal)
   ========================================================================== */

/* Document type section */
.doc-type-section {
  margin-bottom: 0;
}

.doc-type-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 20px 0;
}

/* Section containing type selection */
.doc-type-section {
  margin-bottom: 24px;
}

/* Grid of document type tiles */
.doc-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .doc-type-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .doc-type-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .doc-type-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Individual tile wrapper */
.doc-type-tile {
  position: relative;
}

/* Hide the actual radio input */
.doc-type-tile__input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
}

/* The clickable card label */
.doc-type-tile__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 12px;
  min-height: 110px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.doc-type-tile__label:hover {
  border-color: #94a3b8;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Selected state - blue border and light background */
.doc-type-tile__input:checked + .doc-type-tile__label {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #3b82f6;
}

/* Icon */
.doc-type-tile__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #334155;
}

.doc-type-tile__icon svg {
  width: 32px;
  height: 32px;
  stroke-width: 1.5;
}

/* Text label */
.doc-type-tile__name {
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  line-height: 1.3;
  max-width: 100%;
  word-wrap: break-word;
}

/* Upload form fields section */
.upload-form-fields {
  margin-top: 24px;
}

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

.upload-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-default);
}

.upload-form-actions .btn {
  min-width: 120px;
}

.document-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 16px;
  min-height: 120px;
  background: var(--surface-secondary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.document-type-btn:hover {
  border-color: var(--accent-primary);
  background: var(--surface-tertiary);
}

.document-type-btn--selected {
  border-color: var(--accent-primary);
  background: var(--accent-primary-subtle);
}

.document-type-btn__icon {
  font-size: 28px;
  line-height: 1;
  color: var(--text-secondary);
}

.document-type-btn__icon svg {
  width: 32px;
  height: 32px;
}

.document-type-btn:hover .document-type-btn__icon,
.document-type-btn--selected .document-type-btn__icon {
  color: var(--accent-primary);
}

.document-type-btn__name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.2;
}

.document-type-btn__description {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
  display: none; /* Hide descriptions for cleaner grid */
}

/* Selected Type Header */
.selected-type-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--accent-primary-subtle);
  border-radius: 8px;
  margin-bottom: 16px;
}

.selected-type-name {
  font-weight: 600;
  color: var(--text-primary);
}

/* Dynamic Fields Container */
.dynamic-fields-container {
  margin-top: 24px;
}

/* File Upload Dropzone */
.file-upload-container {
  margin-top: 24px;
}

.file-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  transition: all 0.2s ease;
  background: var(--surface-secondary);
}

.file-dropzone:hover,
.file-dropzone--active {
  border-color: var(--accent-primary);
  background: var(--accent-primary-subtle);
}

.file-dropzone__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.file-dropzone__icon {
  color: var(--text-tertiary);
}

.file-dropzone__text {
  font-size: 14px;
  color: var(--text-secondary);
}

.file-dropzone__browse {
  color: var(--accent-primary);
  cursor: pointer;
  text-decoration: underline;
}

.file-dropzone__browse:hover {
  color: var(--accent-primary-dark);
}

.file-dropzone__hint {
  font-size: 12px;
  color: var(--text-tertiary);
}

.file-dropzone__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-dropzone {
  position: relative;
}

.file-preview[hidden],
.file-preview__status[hidden] {
  display: none !important;
}

.file-preview__status--loading {
  color: var(--accent-primary);
  font-size: 12px;
}

.file-preview__status--success {
  color: var(--color-success, #22c55e);
  font-size: 12px;
}

.file-preview__remove {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
}

.file-preview__remove:hover {
  color: var(--color-danger, #ef4444);
}

/* File Preview */
.file-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.file-preview__info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-preview__icon {
  font-size: 24px;
}

.file-preview__name {
  font-weight: 500;
  color: var(--text-primary);
}

.file-preview__size {
  font-size: 12px;
  color: var(--text-secondary);
}

.file-preview__remove {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-tertiary);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.file-preview__remove:hover {
  background: var(--accent-danger);
  color: white;
}

/* Submit Container */
.file-upload-container + .form-actions,
[data-document-upload-target="submitContainer"] {
  margin-top: 24px;
}

/* Analysis Results */
.stat-cards--compact {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .stat-cards--compact {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stat-cards--compact {
    grid-template-columns: 1fr;
  }
}

.stat-cards--compact .stat-card {
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-cards--compact .stat-card__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  order: 1;
}

.stat-cards--compact .stat-card__value {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  order: 2;
  margin: 0;
}

/* Alert Styles */
.alert {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: 8px;
  margin: 24px 0;
}

/* Section Header Actions */
.section-header__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* IFTA States inline */
.ifta-states {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.ifta-states__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.alert--warning {
  background: color-mix(in srgb, var(--accent-warning) 10%, transparent);
  border: 1px solid var(--accent-warning);
}

.alert--danger {
  background: color-mix(in srgb, var(--accent-danger) 10%, transparent);
  border: 1px solid var(--accent-danger);
}

.alert--success {
  background: color-mix(in srgb, var(--accent-success) 10%, transparent);
  border: 1px solid var(--accent-success);
}

.alert__icon {
  font-size: 20px;
  flex-shrink: 0;
}

.alert__content {
  flex: 1;
}

.alert__title {
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--text-primary);
}

.alert__list {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.alert__list li {
  margin-bottom: 4px;
}

/* Tag List */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--surface-tertiary);
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Document Detail Layout */
.document-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

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

.document-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.document-preview__image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  object-fit: cover;
}

.document-preview__embed {
  width: 100%;
  height: 400px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--surface-secondary);
}

.document-preview__pdf,
.document-preview__file,
.document-preview__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 16px;
  background: var(--surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-align: center;
}

.document-preview__icon {
  font-size: 48px;
  line-height: 1;
}

.document-preview__filename {
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
}

.document-preview__download {
  width: 100%;
  justify-content: center;
}

.document-details {
  flex: 1;
}

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

@media (max-width: 600px) {
  .document-details .data-grid {
    grid-template-columns: 1fr;
  }
}

/* Code Block */
.code-block {
  background: var(--surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Detail Section */
.detail-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.detail-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  cursor: pointer;
}

.detail-section-title:not(:first-child) {
  margin-top: 20px;
}

/* Item list for endorsement details */
.item-list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

.item-list__item:last-child {
  margin-bottom: 0;
}

.item-list__item--added {
  border-left: 3px solid var(--color-success);
}

.item-list__item--removed {
  border-left: 3px solid var(--color-danger);
}

.item-list__icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
}

.item-list__item--added .item-list__icon {
  color: var(--color-success);
}

.item-list__item--removed .item-list__icon {
  color: var(--color-danger);
}

.item-list__name {
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.item-list__meta {
  font-size: 13px;
  color: var(--text-secondary);
}

.item-list__value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

details.detail-section > summary {
  list-style: none;
}

details.detail-section > summary::-webkit-details-marker {
  display: none;
}

details.detail-section > summary::before {
  content: "▶ ";
  font-size: 10px;
  margin-right: 4px;
}

details.detail-section[open] > summary::before {
  content: "▼ ";
}

/* Detail Grid */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

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

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

.detail-value {
  font-size: 14px;
  color: var(--text-primary);
}

/* ==========================================================================
   DOCUMENT CARDS (Drive Portal Style)
   ========================================================================== */

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

.document-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--surface-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.document-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.document-card__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}

.document-card__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.document-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-card__name:hover {
  color: var(--accent-primary);
}

.document-card__type {
  font-size: 12px;
  color: var(--text-secondary);
}

.document-card__expiry {
  font-size: 11px;
  color: var(--text-tertiary);
}

.document-card__expiry--expired {
  color: var(--accent-danger);
  font-weight: 500;
}

.document-card__date {
  font-size: 11px;
  color: var(--text-tertiary);
}

.document-card__actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.document-card:hover .document-card__actions {
  opacity: 1;
}

.document-card__actions .btn {
  padding: 6px;
}

.document-card__actions .btn svg {
  width: 16px;
  height: 16px;
}

/* Inline Upload Form */
.document-upload-inline {
  margin-bottom: 24px;
  padding: 24px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Typed Upload Modal Header */
.typed-upload-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.typed-upload-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.typed-upload-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #64748b;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.typed-upload-close:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.document-upload-inline .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.document-upload-inline .form-actions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* Danger Zone */
.danger-zone {
  margin-top: 48px;
  padding: 24px;
  border: 1px solid var(--accent-danger);
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.03);
}

.danger-zone__title {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-danger);
}

.danger-zone__description {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Typed Confirmation Modal */
.typed-confirm-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.typed-confirm-modal.is-open {
  display: flex;
}

.typed-confirm-modal__content {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  overflow: hidden;
}

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

.typed-confirm-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
}

.typed-confirm-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #64748b;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.typed-confirm-modal__close:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.typed-confirm-modal__body {
  padding: 24px;
}

.typed-confirm-modal__warning {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
}

.typed-confirm-modal__list {
  margin: 0 0 16px 0;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.typed-confirm-modal__list li {
  padding: 2px 0;
}

.typed-confirm-modal__instruction {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
}

.typed-confirm-modal__input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.typed-confirm-modal__confirm-text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f1f5f9;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  color: #475569;
}

.typed-confirm-modal__copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: 1px dashed #94a3b8;
  border-radius: 4px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.typed-confirm-modal__copy-btn:hover {
  background: #e2e8f0;
  border-color: #64748b;
  color: #475569;
}

.typed-confirm-modal__input {
  width: 100%;
}

.typed-confirm-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
}

.typed-confirm-modal__footer .btn-danger {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

.typed-confirm-modal__footer .btn-danger:hover:not(:disabled) {
  background: #dc2626;
  border-color: #dc2626;
}

.typed-confirm-modal__footer .btn-danger:disabled {
  background: #fca5a5;
  border-color: #fca5a5;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.7;
}





/* ==========================================================================
   AUTH PAGES
   ========================================================================== */

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: linear-gradient(135deg, var(--bg-base) 0%, var(--bg-surface) 100%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo-text {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: -0.5px;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-title {
  font-size: 26px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px;
  letter-spacing: -0.3px;
}

.auth-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.auth-form {
  margin-bottom: 24px;
}

.auth-field {
  margin-bottom: 24px;
}

.auth-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.auth-input::placeholder {
  color: var(--text-tertiary);
}

.auth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-button:hover {
  background: #0ea572;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.auth-button:active {
  transform: translateY(0);
}

.auth-button svg {
  transition: transform 0.2s ease;
}

.auth-button:hover svg {
  transform: translateX(3px);
}

.auth-footer {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.auth-body {
  margin: 0;
  padding: 0;
  background: var(--bg-base);
}

.auth-flash {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  animation: authFlashIn 0.3s ease;
}

@keyframes authFlashIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.auth-flash--notice {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.auth-flash--alert {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Code input styling */
.auth-input--code {
  text-align: center;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 12px;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  padding: 18px 24px;
}

.auth-input--code::placeholder {
  letter-spacing: 12px;
  opacity: 0.4;
}

.auth-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-link--button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  display: inline;
}

.auth-resend-form {
  display: inline;
}

.auth-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 8px !important;
}


/* User menu in header */
.user-menu {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
}

.user-menu-trigger:hover {
  background: var(--bg-subtle);
  border-color: var(--border-default);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), #0d9488);
  color: white;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-menu-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.user-menu-chevron {
  color: var(--text-tertiary);
  transition: transform 0.15s ease;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 100;
  overflow: hidden;
}

.user-menu-dropdown[hidden] {
  display: none;
}

.user-menu-header {
  padding: 12px 14px;
  background: var(--bg-subtle);
}

.user-menu-email {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.user-menu-role {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-menu-divider {
  height: 1px;
  background: var(--border-default);
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.1s ease;
}

.user-menu-item:hover {
  background: var(--bg-subtle);
}

.user-menu-item svg {
  color: var(--text-tertiary);
}

.user-menu-item--danger {
  color: var(--accent-danger);
}

.user-menu-item--danger svg {
  color: var(--accent-danger);
}

.user-menu-item--danger:hover {
  background: rgba(239, 68, 68, 0.08);
}

/* Assignee Badge */
.assignee-badge {
  position: relative;
  display: inline-block;
}

.assignee-trigger {
  display: flex;
  align-items: center;
  padding: 4px;
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.assignee-trigger:hover {
  background: var(--bg-subtle);
}

.assignee-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), #0d9488);
  color: white;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.assignee-avatar--empty {
  background: var(--bg-subtle);
  color: var(--text-tertiary);
  border: 1px dashed var(--border-default);
}

.assignee-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 100;
  overflow: hidden;
}

.assignee-dropdown[hidden] {
  display: none;
}

.assignee-dropdown-header {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-default);
}

.assignee-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-primary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.1s ease;
  text-align: left;
}

.assignee-option:hover {
  background: var(--bg-subtle);
}

.assignee-option--active {
  background: var(--bg-subtle);
}

.assignee-option--active::after {
  content: "✓";
  margin-left: auto;
  color: var(--accent-primary);
  font-size: 12px;
}

.assignee-option-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), #0d9488);
  color: white;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.assignee-option-avatar--empty {
  background: var(--bg-base);
  color: var(--text-tertiary);
  border: 1px solid var(--border-default);
}

.assignee-option-you {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Card Assignee Button (for detail view footer) */
.card__assignee-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  color: inherit;
  font: inherit;
}

.card__assignee-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: var(--card-color);
}

.card__assignee-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  overflow: visible;
}

.card__assignee-dropdown[hidden] {
  display: none;
}

.assignee-form {
  display: contents;
}

.avatar--assignee {
  background: linear-gradient(135deg, var(--accent-primary), #0d9488);
}

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

.dq-filter-bar {
  margin-bottom: 16px;
}

/* Collapsed state */
.dq-filter-bar__collapsed {
  display: flex;
  justify-content: center;
  padding: 8px;
}

.dq-filter-bar__collapsed[hidden] {
  display: none;
}

.dq-filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.dq-filter-trigger:hover {
  background: var(--bg-elevated);
  border-color: var(--border-default);
  color: var(--text-primary);
}

.dq-filter-trigger svg {
  opacity: 0.7;
}

.dq-filter-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-family: inherit;
  color: var(--text-tertiary);
}

/* Expanded state */
.dq-filter-bar__expanded {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
}

.dq-filter-bar__expanded[hidden] {
  display: none;
}

.dq-filter-form {
  margin: 0;
}

.dq-filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Filter pills */
.dq-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 13px;
}

.dq-filter-pill--search {
  flex: 1;
  min-width: 150px;
  max-width: 280px;
}

.dq-filter-pill__icon {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.dq-filter-pill__label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.dq-filter-pill__input {
  flex: 1;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text-primary);
}

.dq-filter-pill__input::placeholder {
  color: var(--text-tertiary);
}

.dq-filter-pill__select {
  padding: 0;
  padding-right: 16px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right center;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.dq-filter-pill__select option {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* Submit button */
.dq-filter-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--accent-primary);
  border: none;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: white;
  cursor: pointer;
  transition: background var(--duration-fast) ease;
}

.dq-filter-submit:hover {
  background: #0d9488;
}

/* Clear all link */
.dq-filter-clear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.dq-filter-clear:hover {
  background: var(--accent-danger);
  border-color: var(--accent-danger);
  color: white;
}

/* Collapse button */
.dq-filter-collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  margin-left: auto;
}

.dq-filter-collapse:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .dq-filter-pill--search {
    flex: 1 1 100%;
    max-width: none;
  }
  
  .dq-filter-controls {
    gap: 6px;
  }
  
  .dq-filter-pill {
    padding: 5px 8px;
    font-size: 12px;
  }
  
  .dq-filter-pill__label {
    display: none;
  }
}

/* ==========================================================================
   BATCH ACTION BAR
   ========================================================================== */

.dq-batch-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin-bottom: 16px;
  background: var(--bg-elevated);
  border: 2px solid var(--accent-primary);
  border-radius: var(--radius-lg);
}

.dq-batch-bar[hidden] {
  display: none;
}

.dq-batch-bar__count {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-primary);
  white-space: nowrap;
}

.dq-batch-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dq-batch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.dq-batch-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
}

.dq-batch-btn--primary {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.dq-batch-btn--primary:hover {
  background: #0d9488;
}

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

.dq-batch-btn--clear:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

/* Table with selection checkboxes */
.dq-table--selectable th:first-child,
.dq-table--selectable td:first-child {
  width: 40px;
  padding-right: 0;
}

.dq-table--selectable input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent-primary);
}

/* Responsive batch bar */
@media (max-width: 640px) {
  .dq-batch-bar {
    flex-wrap: wrap;
    padding: 8px 12px;
  }
  
  .dq-batch-bar__count {
    flex: 1 1 100%;
    margin-bottom: 4px;
  }
}


/* ==========================================================================
   BOARD FILTER BAR (Fizzy-style)
   ========================================================================== */

.board-filter {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 24px 16px;
  background: var(--bg-base);
}

/* Header with title */
.board-filter__header {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.board-filter__header::before,
.board-filter__header::after {
  content: "";
  position: absolute;
  top: 50%;
  height: 1px;
  background: var(--border-subtle);
  width: calc(50% - 80px);
}

.board-filter__header::before {
  left: 0;
}

.board-filter__header::after {
  right: 0;
}

.board-filter__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  padding: 0 16px;
  background: var(--bg-base);
  position: relative;
  z-index: 1;
}

/* Controls row - always visible */
.board-filter__row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  max-width: 1200px;
}

.board-filter__filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Search input - subtle rounded pill */
.board-filter__search {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 280px;
}

.board-filter__search-input {
  width: 100%;
  padding: 10px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color var(--duration-fast) ease, background var(--duration-fast) ease;
}

.board-filter__search-input::placeholder {
  color: var(--text-tertiary);
}

.board-filter__search-input:focus {
  border-color: var(--border-default);
  background: var(--bg-elevated);
}

/* Dropdown container */
.board-filter__dropdown {
  position: relative;
}

/* Pill buttons - prominent style */
.board-filter__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-muted);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration-fast) ease;
}

.board-filter__pill:hover {
  background: var(--accent-muted);
  border-color: var(--accent-primary);
}

/* Secondary pill style (for extended filters) */
.board-filter__pill--secondary {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

.board-filter__pill--secondary:hover {
  border-color: var(--border-default);
  color: var(--text-primary);
  background: var(--bg-elevated);
}

/* Active pill */
.board-filter__pill--active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.board-filter__pill--active:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: white;
}

.board-filter__pill-chevron {
  opacity: 0.6;
}

/* Icon buttons */
.board-filter__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.board-filter__icon-btn:hover {
  border-color: var(--border-default);
  color: var(--text-primary);
  background: var(--bg-elevated);
}

/* Extra filters - inline, collapsible */
.board-filter__extra {
  display: flex;
  align-items: center;
  gap: 8px;
}

.board-filter__extra[hidden] {
  display: none;
}

/* Section without header */
.section--no-header {
  padding-top: 0;
}

.section--no-header .section-body {
  padding-top: 0;
}

/* Item list left aligned */
.item-list--left {
  max-width: none;
}

/* ==========================================================================
   POLICY FILTER BAR (matches quotes board style)
   ========================================================================== */

.policy-filter {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 16px;
}

.policy-filter__header {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.policy-filter__header::before,
.policy-filter__header::after {
  content: "";
  position: absolute;
  top: 50%;
  height: 1px;
  background: var(--border-subtle);
  width: calc(50% - 60px);
}

.policy-filter__header::before {
  left: 0;
}

.policy-filter__header::after {
  right: 0;
}

.policy-filter__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  padding: 0 16px;
  background: var(--bg-base);
  position: relative;
  z-index: 1;
}

.policy-filter__row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.policy-filter__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.policy-filter__search {
  min-width: 200px;
  max-width: 280px;
}

.policy-filter__search-input {
  width: 100%;
  padding: 10px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color var(--duration-fast) ease, background var(--duration-fast) ease;
}

.policy-filter__search-input::placeholder {
  color: var(--text-tertiary);
}

.policy-filter__search-input:focus {
  border-color: var(--border-default);
  background: var(--bg-elevated);
}

.policy-filter__dropdown {
  position: relative;
}

.policy-filter__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-muted);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration-fast) ease;
}

.policy-filter__pill:hover {
  background: var(--accent-muted);
  border-color: var(--accent-primary);
}

.policy-filter__pill--active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.policy-filter__pill--active:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.policy-filter__pill-chevron {
  opacity: 0.6;
}

.policy-filter__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration-fast) ease;
}

.policy-filter__icon-btn:hover {
  border-color: var(--border-default);
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.policy-filter__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 180px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  overflow: hidden;
}

.policy-filter__menu[hidden] {
  display: none;
}

.policy-filter__menu-header {
  padding: 12px 14px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.policy-filter__menu-items {
  padding-bottom: 8px;
}

.policy-filter__menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--duration-fast) ease;
}

.policy-filter__menu-item:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.policy-filter__menu-item--selected {
  background: var(--accent-primary);
  color: white;
  font-weight: 500;
}

.policy-filter__menu-item--selected:hover {
  background: var(--accent-hover);
  color: white;
}

/* Dropdown menu */
.board-filter__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  overflow: hidden;
}

.board-filter__menu[hidden] {
  display: none;
}

.board-filter__menu-header {
  padding: 12px 14px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.board-filter__menu-filter {
  display: block;
  width: calc(100% - 16px);
  margin: 0 8px 8px;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

.board-filter__menu-filter:focus {
  border-color: var(--border-default);
}

.board-filter__menu-items {
  max-height: 280px;
  overflow-y: auto;
  padding-bottom: 8px;
}

.board-filter__menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background var(--duration-fast) ease;
}

.board-filter__menu-item:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.board-filter__menu-item--selected {
  background: var(--accent-primary);
  color: white;
  font-weight: 500;
}

.board-filter__menu-item--selected:hover {
  background: var(--accent-hover);
  color: white;
}

.board-filter__menu-item--selected::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Icon buttons */
.board-filter__icon-btn,
.board-filter__clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.board-filter__icon-btn:hover,
.board-filter__clear-btn:hover {
  border-color: var(--border-default);
  color: var(--text-secondary);
}

.board-filter__clear-btn {
  margin-left: auto;
}

/* Quick action filter indicator */
.board-filter-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  background: var(--bg-blue-subtle, #e8f1fc);
  border-bottom: 1px solid var(--border-subtle);
}

.board-filter-indicator__text {
  font-size: 14px;
  color: var(--text-primary);
}

.board-filter-indicator__clear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) ease;
}

.board-filter-indicator__clear:hover {
  color: var(--text-primary);
  border-color: var(--border-default);
  background: var(--bg-hover);
}

/* Filtered view (when filters are active) - horizontal row like Fizzy */
.board-filter-results {
  flex: 1;
  padding: 0 24px 24px;
  overflow-x: auto;
  overflow-y: hidden;
}

.board-filter-results__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 4px;
}

.board-filter-results__grid .card {
  flex: 0 0 340px;
  max-width: 400px;
}

.board-filter-results__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 200px;
  color: var(--text-tertiary);
  font-size: 15px;
}

/* Filtered card styles - horizontal cards like Fizzy */
.filtered-card {
  flex: 0 0 340px;
  min-width: 340px;
  max-width: 400px;
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--duration-fast) ease;
}

/* Status-colored left border */
.filtered-card--intake { border-left-color: var(--status-intake); }
.filtered-card--with_underwriters { border-left-color: var(--status-underwriters); }
.filtered-card--quoted { border-left-color: var(--status-quoted); }
.filtered-card--presented { border-left-color: var(--status-presented); }
.filtered-card--bound { border-left-color: var(--status-bound); }
.filtered-card--not_taken { border-left-color: var(--status-not-taken); }
.filtered-card--not_now { border-left-color: var(--status-not-now); }

.filtered-card:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-md);
}

.filtered-card__link {
  display: block;
  padding: 16px;
  text-decoration: none;
  color: inherit;
}

.filtered-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.filtered-card__id {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.filtered-card__status {
  margin-left: auto;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.filtered-card__status--intake { background: var(--status-intake-bg); color: var(--status-intake-text); }
.filtered-card__status--with_underwriters { background: var(--status-underwriters-bg); color: var(--status-underwriters-text); }
.filtered-card__status--quoted { background: var(--status-quoted-bg); color: var(--status-quoted-text); }
.filtered-card__status--presented { background: var(--status-presented-bg); color: var(--status-presented-text); }
.filtered-card__status--bound { background: var(--status-bound-bg); color: var(--status-bound-text); }
.filtered-card__status--not_taken { background: var(--status-not-taken-bg); color: var(--status-not-taken-text); }
.filtered-card__status--not_now { background: var(--status-not-now-bg); color: var(--status-not-now-text); }

.filtered-card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.filtered-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.filtered-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
}

.filtered-card__tag--date {
  color: var(--accent-primary);
}

.filtered-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.filtered-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filtered-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.filtered-card__assignee {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.filtered-card__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--accent-primary);
  color: white;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .board-filter__controls {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  
  .board-filter__search {
    min-width: 160px;
  }
  
  .board-filter__pill {
    flex-shrink: 0;
  }
}

/* ==========================================================================
   ENDORSEMENT FORM - Estimate Card & Checkbox Lists
   ========================================================================== */

/* Checkbox List */
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.checkbox-item:hover {
  border-color: var(--border-default);
  background: var(--bg-hover);
}

.checkbox-item input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.checkbox-item input[type="checkbox"]:checked + .checkbox-label {
  color: var(--text-primary);
}

.checkbox-label {
  flex: 1;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.checkbox-label strong {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 2px;
}

/* Estimate Card */
.estimate-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.estimate-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.estimate-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.estimate-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.estimate-value.positive {
  color: var(--accent-success);
}

.estimate-value.negative {
  color: var(--accent-danger);
}

.estimate-breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.estimate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.estimate-row span:last-child {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

