/* ============================================================
   ABSTracker CRM - Complete Production Stylesheet
   Modern, Pixel-Perfect, Mobile-First & Desktop Responsive
   ============================================================ */

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

:root {
  /* Brand Palette */
  --primary: #4F46E5;
  --primary-light: #818CF8;
  --primary-dark: #3730A3;
  --primary-bg: #EEF2FF;
  --primary-glow: rgba(79, 70, 229, 0.25);

  /* Semantic Colors */
  --success: #10B981;
  --success-dark: #059669;
  --success-bg: #ECFDF5;
  --warning: #F59E0B;
  --warning-dark: #D97706;
  --warning-bg: #FFFBEB;
  --danger: #EF4444;
  --danger-dark: #DC2626;
  --danger-bg: #FEF2F2;
  --purple: #8B5CF6;
  --purple-bg: #F5F3FF;

  /* Surfaces & Layout */
  --bg: #F8FAFC;
  --bg-dark: #0F172A;
  --sidebar-bg: #0F172A;
  --card: #FFFFFF;
  --text-main: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --border-light: #F1F5F9;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Geometry */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --sidebar-width: 260px;
  --topbar-height: 64px;

  /* Motion */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

.hidden {
  display: none !important;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes pulseGlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

.spin {
  animation: spin 1s linear infinite;
}

/* ============================================================
   1. LOGIN & AUTHENTICATION SCREEN
   ============================================================ */
.login-screen {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: var(--bg);
}

.login-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px 24px;
  background: #ffffff;
}

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

.login-brand .brand-icon {
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: #ffffff;
  box-shadow: 0 10px 20px var(--primary-glow);
}

.login-brand .brand-icon .material-icons-round {
  font-size: 30px;
}

.login-brand h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--primary), #6366F1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-brand p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 3px;
}

.login-card {
  width: 100%;
  max-width: 380px;
}

.login-card h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

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

.login-tabs {
  display: flex;
  background: #F1F5F9;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}

.login-tab {
  flex: 1;
  padding: 9px 12px;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: 7px;
  cursor: pointer;
  transition: var(--transition);
}

.login-tab.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

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

.input-icon-wrapper input,
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #F8FAFC;
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}

.input-icon-wrapper input {
  padding-left: 40px;
  padding-right: 38px;
}

.input-icon-wrapper input:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.toggle-pass {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  user-select: none;
}

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

.login-error {
  background: var(--danger-bg);
  border: 1px solid #FECACA;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 14px;
}

.login-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.login-btn:active {
  transform: translateY(0);
}

.login-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-loader {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.divider {
  display: flex;
  align-items: center;
  margin: 18px 0;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
}

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

.divider span {
  padding: 0 10px;
}

.google-btn {
  width: 100%;
  padding: 11px 16px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  transition: var(--transition);
}

.google-btn:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.login-footer a {
  color: var(--primary);
  font-weight: 600;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* Decorative Art Pane (Right) */
.login-art {
  display: none;
  flex: 1;
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 50%, #4338CA 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  padding: 48px;
  align-items: center;
  justify-content: center;
}

.login-art::before {
  content: '';
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
  top: -120px;
  right: -120px;
}

.login-art::after {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
  bottom: -80px;
  left: -80px;
}

.art-content {
  position: relative;
  z-index: 2;
  max-width: 460px;
}

.floating-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 36px;
}

.float-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 12px 18px;
  border-radius: var(--radius);
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 14px;
  width: fit-content;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  animation: floatAnim 4s ease-in-out infinite;
}

.float-card .material-icons-round {
  color: #818CF8;
  font-size: 22px;
}

.fc-1 { animation-delay: 0s; }
.fc-2 { animation-delay: 1.3s; margin-left: 36px; }
.fc-3 { animation-delay: 2.6s; margin-left: 18px; }

.art-content h2 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
  color: #ffffff;
}

.art-content p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  line-height: 1.6;
}

/* ============================================================
   2. MAIN APPLICATION SHELL
   ============================================================ */
.main-app {
  display: flex;
  min-height: 100vh;
  position: relative;
  background: var(--bg);
}

/* Sidebar Navigation */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: #ffffff;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.sidebar-brand {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-icon-sm {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 10px var(--primary-glow);
}

.brand-icon-sm .material-icons-round {
  font-size: 20px;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.65);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-item .material-icons-round {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.65);
  transition: var(--transition);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.nav-item:hover .material-icons-round {
  color: #ffffff;
}

.nav-item.active {
  background: rgba(79, 70, 229, 0.22);
  color: #ffffff;
  font-weight: 600;
}

.nav-item.active .material-icons-round {
  color: var(--primary-light);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3.5px;
  height: 22px;
  background: var(--primary-light);
  border-radius: 0 3px 3px 0;
}

.chat-badge {
  margin-left: auto;
  background: var(--danger);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.user-details {
  overflow: hidden;
}

.user-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
}

.user-role {
  display: inline-block;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.logout-btn {
  width: 100%;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #FCA5A5;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ffffff;
}

.logout-btn .material-icons-round {
  font-size: 16px;
}

/* Sidebar Backdrop Overlay on Mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 99;
}

.sidebar-overlay.show {
  display: block;
}

/* Main Content Area */
.main-content {
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  transition: margin-left 0.28s ease;
}

/* Topbar Header */
.topbar {
  height: var(--topbar-height);
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle:hover {
  background: #F1F5F9;
}

.menu-toggle .material-icons-round {
  font-size: 24px;
}

.topbar-search {
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F1F5F9;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  transition: var(--transition);
}

.topbar-search:focus-within {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.topbar-search .material-icons-round {
  color: var(--text-muted);
  font-size: 19px;
}

.topbar-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13.5px;
  width: 100%;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-greeting {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  display: none;
}

.user-avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

/* Page Layout */
.page-content {
  padding: 20px;
  flex: 1;
}

.page {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.page.active {
  display: block;
}

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

.page-header h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.page-desc {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   3. STATS & DASHBOARD COMPONENTS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon .material-icons-round {
  font-size: 24px;
}

.stat-blue .stat-icon {
  background: var(--primary-bg);
  color: var(--primary);
}

.stat-green .stat-icon {
  background: var(--success-bg);
  color: var(--success);
}

.stat-orange .stat-icon {
  background: var(--warning-bg);
  color: var(--warning-dark);
}

.stat-purple .stat-icon {
  background: var(--purple-bg);
  color: var(--purple);
}

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

.stat-value {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
}

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

.dashboard-section {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

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

.section-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-header h3 .material-icons-round {
  font-size: 18px;
  color: var(--primary);
}

.section-body {
  padding: 16px 18px;
}

.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
}

.empty-state .material-icons-round {
  font-size: 42px;
  color: #CBD5E1;
  margin-bottom: 8px;
  display: block;
}

.empty-state p {
  font-size: 13.5px;
}

/* ============================================================
   4. CONTACTS TABLE & FILTERS
   ============================================================ */
.contacts-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-bg);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-left: 8px;
  vertical-align: middle;
}

.filters-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 9px 12px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.filter-group select:focus,
.filter-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.table-container {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow-xs);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
}

.data-table th,
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-light);
}

.data-table th {
  background: #F8FAFC;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table tbody tr:hover {
  background: #F8FAFC;
}

.data-table tbody tr.row-called {
  background: #F0FDF4;
}

.data-table tbody tr.row-called:hover {
  background: #DCFCE7;
}

.select-checkbox {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  accent-color: var(--primary);
  cursor: pointer;
  vertical-align: middle;
}

.contact-name {
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

.contact-name:hover {
  color: var(--primary);
}

.phone-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.phone-link:hover {
  text-decoration: underline;
}

.vehicle-badge {
  background: #F1F5F9;
  border: 1px solid var(--border);
  color: var(--text-main);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.03em;
}

.status-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
}

.status-called {
  background: var(--success-bg);
  color: var(--success-dark);
}

.status-pending {
  background: var(--warning-bg);
  color: var(--warning-dark);
}

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

.td-remarks {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--text-secondary);
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================
   5. SMART PAGINATION (NO OVERFLOW GUARANTEE)
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
  padding: 8px 0;
}

.page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
  background: var(--primary-bg);
  border-color: var(--primary-light);
  color: var(--primary);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

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

.page-dots {
  color: var(--text-muted);
  font-weight: 600;
  padding: 0 4px;
}

.page-info {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 8px;
}

/* ============================================================
   6. FLOATING BULK ASSIGN BAR
   ============================================================ */
.assign-bar {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-dark);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 90;
  animation: slideUp 0.25s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.assign-bar span {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* ============================================================
   7. FOLLOW-UPS
   ============================================================ */
.followup-tabs {
  display: flex;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
  margin-bottom: 18px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.fu-tab {
  padding: 7px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.fu-tab.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px var(--primary-glow);
}

.followup-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.followup-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

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

.fu-date-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
}

.fu-date-badge .fu-day {
  font-size: 17px;
  line-height: 1;
}

.fu-date-badge .fu-month {
  font-size: 10px;
  text-transform: uppercase;
  margin-top: 1px;
}

.fu-date-badge.today {
  background: var(--primary-bg);
  color: var(--primary);
}

.fu-date-badge.upcoming {
  background: var(--purple-bg);
  color: var(--purple);
}

.fu-date-badge.overdue {
  background: var(--danger-bg);
  color: var(--danger);
}

.fu-date-badge.completed {
  background: var(--success-bg);
  color: var(--success);
}

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

.fu-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fu-info p {
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fu-time {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.fu-time .material-icons-round {
  font-size: 15px;
}

.fu-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================
   8. REAL-TIME TEAM CHAT (TWO-PANEL)
   ============================================================ */
.chat-page-layout {
  display: flex;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: calc(100vh - var(--topbar-height) - 64px);
  min-height: 480px;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  position: relative;
}

.chat-channels {
  width: 240px;
  border-right: 1px solid var(--border);
  background: #F8FAFC;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

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

.channels-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.channel-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.channel-item:hover {
  background: #EDF2F7;
  color: var(--text-main);
}

.channel-item.active {
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 600;
}

.channel-item .material-icons-round {
  font-size: 18px;
}

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

.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #ffffff;
}

.chat-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header h3 {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-header h3 .material-icons-round {
  color: var(--primary);
  font-size: 20px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #F8FAFC;
}

.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 75%;
  animation: fadeIn 0.2s ease;
}

.chat-msg.own {
  margin-left: auto;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.msg-bubble {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 3px;
  padding: 9px 13px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.chat-msg.own .msg-bubble {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  border-color: transparent;
  border-radius: 14px 14px 3px 14px;
}

.msg-sender {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.chat-msg.own .msg-sender {
  color: rgba(255, 255, 255, 0.85);
}

.msg-text {
  font-size: 13.5px;
  line-height: 1.45;
  word-break: break-word;
}

.msg-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 3px;
  text-align: right;
}

.chat-msg.own .msg-time {
  color: rgba(255, 255, 255, 0.7);
}

.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  background: #ffffff;
}

.chat-input-area input {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  outline: none;
  font-size: 13.5px;
  background: #F8FAFC;
  transition: var(--transition);
}

.chat-input-area input:focus {
  border-color: var(--primary);
  background: #ffffff;
}

.chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px var(--primary-glow);
  transition: var(--transition);
}

.chat-send-btn:hover {
  transform: scale(1.05);
}

/* ============================================================
   9. DATA IMPORT (DRAG-DROP & PROGRESS)
   ============================================================ */
.import-area {
  max-width: 680px;
}

.import-dropzone {
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius-lg);
  padding: 44px 24px;
  text-align: center;
  background: #ffffff;
  cursor: pointer;
  transition: var(--transition);
}

.import-dropzone:hover,
.import-dropzone.drag-over {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.import-icon {
  font-size: 48px !important;
  color: var(--primary);
  margin-bottom: 10px;
}

.import-dropzone h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 3px;
}

.import-dropzone p {
  color: var(--text-muted);
  font-size: 13px;
}

.import-progress-container {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
}

.import-progress-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
}

.progress-bar {
  width: 100%;
  height: 7px;
  background: #E2E8F0;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar.lg {
  height: 10px;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.progress-blue { background: var(--primary); }
.progress-green { background: var(--success); }
.progress-orange { background: var(--warning); }

.import-preview {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 16px;
  overflow: hidden;
}

.import-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-bg);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.import-actions {
  padding: 12px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border-light);
  background: #F8FAFC;
}

/* ============================================================
   10. EMPLOYEES & REPORTS
   ============================================================ */
.employees-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.employee-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

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

.emp-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.emp-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

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

.emp-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.emp-stat {
  background: #F8FAFC;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
}

.emp-stat-value {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
  display: block;
}

.emp-stat-label {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.reports-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.report-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-xs);
}

.report-card h3 {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.report-card h3 .material-icons-round {
  color: var(--primary);
  font-size: 19px;
}

.report-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

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

.report-item-label {
  color: var(--text-secondary);
}

.report-item-value {
  font-weight: 700;
  color: var(--text-main);
}

/* ============================================================
   11. MODALS & FORMS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.18s ease-out;
}

.modal-content {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 440px;
  position: relative;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.22s ease-out;
}

.modal-content.modal-lg {
  max-width: 620px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #F1F5F9;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
}

.modal-close:hover {
  background: #E2E8F0;
  color: var(--text-main);
}

.modal-close .material-icons-round {
  font-size: 18px;
}

.modal-content h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Contact Detail View inside Modal */
.detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.detail-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.detail-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.detail-phone {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
}

.detail-vehicle {
  font-size: 12.5px;
  color: var(--text-muted);
}

.call-log-item {
  background: #F8FAFC;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

.call-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.call-log-date {
  font-size: 11px;
  color: var(--text-muted);
}

.call-log-remarks {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.call-log-agent {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ============================================================
   12. BUTTON SYSTEM & TOAST
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  box-shadow: 0 2px 6px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
}

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

.btn-secondary:hover {
  background: #E2E8F0;
  color: var(--text-main);
}

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

.btn-danger:hover {
  background: var(--danger-dark);
}

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

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
}

.btn-icon:hover {
  background: #F1F5F9;
}

.btn-icon .material-icons-round {
  font-size: 18px;
}

/* Floating Toast Notification */
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  padding: 12px 20px;
  background: var(--bg-dark);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  animation: slideUp 0.25s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.success {
  background: #065F46;
  border-color: #059669;
}

.toast.error {
  background: #991B1B;
  border-color: #DC2626;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.activity-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon .material-icons-round {
  font-size: 17px;
}

.activity-icon.call { background: var(--success-bg); color: var(--success); }
.activity-icon.followup { background: var(--warning-bg); color: var(--warning-dark); }
.activity-icon.import { background: var(--primary-bg); color: var(--primary); }
.activity-icon.chat { background: var(--purple-bg); color: var(--purple); }
.activity-icon.assign { background: #E0E7FF; color: var(--primary); }

.activity-info {
  flex: 1;
}

.activity-text {
  font-size: 13px;
  color: var(--text-main);
}

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

.empty-td {
  text-align: center;
  padding: 40px !important;
  color: var(--text-muted);
}

.empty-td .material-icons-round {
  font-size: 36px;
  color: #CBD5E1;
  margin-bottom: 6px;
}

/* ============================================================
   13. RESPONSIVE BREAKPOINTS (MOBILE-FIRST)
   ============================================================ */

/* Mobile view (< 768px) */
@media (max-width: 767px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .menu-toggle {
    display: flex;
  }
  .btn-hide-mobile {
    display: none;
  }
  .chat-channels {
    position: absolute;
    inset: 0 auto 0 0;
    width: 220px;
    z-index: 20;
    box-shadow: 4px 0 16px rgba(0,0,0,0.1);
    transform: translateX(-100%);
  }
  .chat-channels.show {
    transform: translateX(0);
  }
  .mobile-only {
    display: inline-flex !important;
  }
}

/* Tablet view (>= 768px) */
@media (min-width: 768px) {
  .login-art {
    display: flex;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .filters-bar {
    flex-direction: row;
  }
  .filter-group select,
  .filter-group input {
    width: auto;
  }
  .employees-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .reports-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .user-greeting {
    display: inline-block;
  }
  .mobile-only {
    display: none !important;
  }
}

/* Desktop view (>= 1024px) */
@media (min-width: 1024px) {
  .sidebar {
    transform: translateX(0) !important;
  }
  .sidebar-overlay {
    display: none !important;
  }
  .main-content {
    margin-left: var(--sidebar-width);
  }
  .menu-toggle {
    display: none;
  }
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .employees-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .page-content {
    padding: 28px;
  }
}

/* Large Desktop (>= 1280px) */
@media (min-width: 1280px) {
  .reports-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================
   14. SPLASH SCREEN, CONTACT SUBTABS & ENHANCEMENTS
   ============================================================ */
.app-splash {
  position: fixed;
  inset: 0;
  background: #0F172A;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.splash-card {
  text-align: center;
}

.splash-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 10px 20px var(--primary-glow);
}

.splash-icon .material-icons-round {
  font-size: 28px;
  color: #ffffff;
}

.splash-card h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.splash-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Contact Subtabs */
.contact-subtabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.c-tab {
  padding: 7px 14px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.c-tab:hover {
  background: #F1F5F9;
  color: var(--text-main);
}

.c-tab.active {
  background: var(--primary-bg);
  border-color: var(--primary-light);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.12);
}

/* Available vs Assigned Badges */
.avail-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
}

.assigned-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #EEF2FF;
  color: #4F46E5;
  border: 1px solid #C7D2FE;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Quick Remark Preset Chips */
.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.chip {
  background: #F1F5F9;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.chip:hover {
  background: var(--primary-bg);
  border-color: var(--primary-light);
  color: var(--primary);
}

.wa-btn:hover {
  background: #DCFCE7 !important;
}

/* Advanced Reports Styles */
.reports-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.report-metric-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
}

.rm-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rm-val {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  margin: 4px 0 2px;
}

.rm-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.outcomes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.outcome-box {
  background: #F8FAFC;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
}

.outcome-count {
  font-size: 20px;
  font-weight: 800;
  display: block;
  line-height: 1.1;
}

.outcome-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
  display: block;
}

