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

:root {
  /* Color Palette - Navy & Orange Lubricant CRM */
  --bg-main: #070f1e;
  --bg-gradient: linear-gradient(135deg, #070f1e 0%, #0d1b2a 100%);
  --navy-deep: #0a192f;
  --navy-light: #172a45;
  --navy-border: rgba(23, 42, 69, 0.8);
  --navy-highlight: #30475e;
  
  --primary-orange: #ff6b35;
  --primary-orange-hover: #ff8552;
  --primary-orange-light: rgba(255, 107, 53, 0.15);
  --primary-orange-glow: rgba(255, 107, 53, 0.45);
  
  /* Status Colors */
  --status-hot: #ff3b30;
  --status-hot-bg: rgba(255, 59, 48, 0.15);
  --status-warm: #ffcc00;
  --status-warm-bg: rgba(255, 204, 0, 0.15);
  --status-cold: #007aff;
  --status-cold-bg: rgba(0, 122, 255, 0.15);
  --status-success: #34c759;
  --status-success-bg: rgba(52, 199, 89, 0.15);
  
  /* Text Colors */
  --text-main: #f8f9fa;
  --text-secondary: #a0aec0;
  --text-muted: #718096;
  --text-dark: #1a202c;
  
  /* Glassmorphism Tokens */
  --glass-bg: rgba(13, 27, 42, 0.65);
  --glass-bg-accent: rgba(255, 107, 53, 0.08);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-border-focus: rgba(255, 107, 53, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glass-blur: blur(12px);
  
  /* Utilities */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: #03070b;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Responsive Frame & Container */
/* On PC, display like a gorgeous modern smartphone */
#app-frame {
  width: 100%;
  height: 100vh;
  max-width: 480px; /* Standard mobile width */
  max-height: 960px; /* Standard mobile ratio */
  background: var(--bg-gradient);
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

@media (min-width: 768px) {
  #app-frame {
    height: 90vh;
    border-radius: 40px;
    border: 8px solid #1a202c; /* Slick thick phone border on desktop */
  }
  
  body {
    background: radial-gradient(circle at top right, #102a43 0%, #060c14 100%);
  }
  
  /* Mock Speaker / Dynamic Island */
  #app-frame::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 24px;
    background: #000;
    border-radius: 20px;
    z-index: 1000;
    pointer-events: none;
    box-shadow: inset 0 1px 3px rgba(255,255,255,0.1);
  }
}

/* Content Container with independent scroll */
#app-viewport {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 80px 16px 90px 16px; /* Top banner spacing & Bottom nav spacing */
  scroll-behavior: smooth;
}

#app-viewport::-webkit-scrollbar {
  width: 5px;
}
#app-viewport::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
#app-viewport::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

/* App Header (Sticky Top) */
.app-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: rgba(7, 15, 30, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--glass-border);
  z-index: 999;
}

@media (min-width: 768px) {
  .app-header {
    padding-top: 24px; /* Account for Dynamic Island mockup */
    height: 74px;
  }
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--primary-orange) 0%, #ff3f00 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 16px;
  box-shadow: 0 4px 10px var(--primary-orange-light);
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(to right, #ffffff, #cbe2f8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.header-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.header-btn .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: var(--primary-orange);
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-main);
}

/* Bottom Navigation */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 72px;
  background: rgba(7, 15, 30, 0.9);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: var(--safe-bottom);
  z-index: 999;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  gap: 4px;
  width: 20%;
  height: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.nav-item i {
  font-size: 20px;
  transition: var(--transition-smooth);
}

.nav-item.active {
  color: var(--primary-orange);
  font-weight: 700;
}

.nav-item.active i {
  transform: translateY(-2px);
  color: var(--primary-orange);
  filter: drop-shadow(0 2px 8px var(--primary-orange-glow));
}

.nav-item.ai-coach-nav {
  position: relative;
}

.nav-item.ai-coach-nav .ai-avatar-glow {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary-orange) 0%, #ff2a00 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
  margin-top: -16px;
  border: 3px solid var(--bg-main);
  transition: var(--transition-smooth);
}

.nav-item.ai-coach-nav.active .ai-avatar-glow {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.7);
}

/* Glass Cards & Elements */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.glass-card.orange-tint {
  background: linear-gradient(135deg, rgba(23, 42, 69, 0.6) 0%, rgba(255, 107, 53, 0.08) 100%);
  border-color: rgba(255, 107, 53, 0.2);
}

/* Typography Helpers */
.title-section {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: -8px;
  margin-bottom: 14px;
}

/* Buttons Design */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-orange) 0%, #f74f14 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-orange-hover) 0%, #ff5214 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.55);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary-orange);
  color: var(--primary-orange);
}

.btn-outline:hover {
  background: var(--primary-orange-light);
}

.btn-icon-only {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
}

/* Badges & Tags */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.tag-hot {
  background: var(--status-hot-bg);
  color: var(--status-hot);
  border: 1px solid rgba(255, 59, 48, 0.3);
}

.tag-warm {
  background: var(--status-warm-bg);
  color: var(--status-warm);
  border: 1px solid rgba(255, 204, 0, 0.3);
}

.tag-cold {
  background: var(--status-cold-bg);
  color: var(--status-cold);
  border: 1px solid rgba(0, 122, 255, 0.3);
}

.tag-success {
  background: var(--status-success-bg);
  color: var(--status-success);
  border: 1px solid rgba(52, 199, 89, 0.3);
}

/* Input Fields & Form controls */
.form-group {
  margin-bottom: 16px;
  width: 100%;
}

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

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

.form-control {
  width: 100%;
  background: rgba(10, 20, 35, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-main);
  font-family: var(--font-sans);
  transition: var(--transition-smooth);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
  background: rgba(10, 20, 35, 0.85);
}

.input-icon-left {
  padding-left: 42px;
}

.input-icon-right {
  padding-right: 42px;
}

.input-wrapper i.left {
  position: absolute;
  left: 14px;
  color: var(--text-secondary);
  font-size: 16px;
}

.input-wrapper i.right {
  position: absolute;
  right: 14px;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
}

/* Screens Wrapper: Dynamic display toggles */
.app-screen {
  display: none;
  animation: slideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.app-screen.active {
  display: block;
}

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

/* Screen 1: Home Styles */
.welcome-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--primary-orange);
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(255,107,53,0.25);
}

.user-welcome-info h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.user-welcome-info p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Summary Card Grid */
.summary-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.stat-mini-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.stat-mini-card span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-mini-card strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 4px;
}

/* Quick Actions Grid */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.action-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.action-btn:hover {
  background: rgba(255, 107, 53, 0.08);
  border-color: rgba(255, 107, 53, 0.25);
}

.action-btn:active {
  transform: scale(0.95);
}

.action-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  font-size: 16px;
}

.action-btn:hover .action-icon-wrapper {
  background: var(--primary-orange);
  color: white;
  box-shadow: 0 4px 10px rgba(255, 107, 53, 0.3);
}

.action-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}

/* Modern KPI Cards */
.kpi-wrapper {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 20px;
}

.kpi-wrapper::-webkit-scrollbar {
  height: 4px;
}
.kpi-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.kpi-card {
  flex: 0 0 140px;
  background: linear-gradient(135deg, rgba(23, 42, 69, 0.8) 0%, rgba(13, 27, 42, 0.6) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.kpi-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kpi-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.kpi-change {
  font-size: 10px;
  font-weight: 600;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.kpi-change.up {
  color: var(--status-success);
}

.kpi-change.down {
  color: var(--status-hot);
}

/* Dynamic Priority Customer List */
.priority-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.customer-row-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-smooth);
}

.customer-row-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 107, 53, 0.2);
}

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

.customer-avatar-dot {
  position: relative;
  width: 36px;
  height: 36px;
  background: var(--navy-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.05);
}

.customer-avatar-dot .status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--bg-main);
}

.status-dot.hot { background-color: var(--status-hot); }
.status-dot.warm { background-color: var(--status-warm); }
.status-dot.cold { background-color: var(--status-cold); }

.customer-text-meta h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-text-meta p {
  font-size: 11px;
  color: var(--text-secondary);
}

.customer-action-side {
  display: flex;
  align-items: center;
  gap: 8px;
}

.customer-action-side .debt-small {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-orange);
}

.row-circle-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.row-circle-btn:hover {
  background: var(--primary-orange);
  border-color: var(--primary-orange);
  color: white;
}

/* AI Shortcut Banner style */
.ai-shortcut-card {
  background: linear-gradient(135deg, rgba(23, 42, 69, 0.9) 0%, rgba(255, 107, 53, 0.12) 100%);
  border: 1px solid rgba(255, 107, 53, 0.3);
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.08);
  position: relative;
  overflow: hidden;
}

.ai-shortcut-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.25) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.ai-shortcut-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.ai-logo-pill {
  background: linear-gradient(135deg, var(--primary-orange) 0%, #ff2a00 100%);
  color: white;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.ai-shortcut-card p {
  font-size: 12px;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

/* Screen 2: Customer List Styles */
.search-sticky-wrapper {
  position: sticky;
  top: 0;
  background: var(--bg-main);
  padding: 8px 0;
  margin-bottom: 12px;
  z-index: 50;
  display: flex;
  gap: 8px;
}

.horizontal-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.horizontal-chips::-webkit-scrollbar {
  height: 3px;
}
.horizontal-chips::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.chip {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.chip:hover, .chip.active {
  background: var(--navy-light);
  color: var(--text-main);
  border-color: rgba(255, 107, 53, 0.5);
}

.chip.active {
  background: var(--primary-orange-light);
  color: var(--primary-orange);
  border-color: var(--primary-orange);
  font-weight: 600;
}

/* Cards height sync */
.customer-full-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.customer-full-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px; /* Equalized baseline height */
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.customer-full-card:hover {
  border-color: rgba(255, 107, 53, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card-top-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.card-main-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  max-width: 80%;
  line-height: 1.4;
  /* Max 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 8px 0;
  margin-bottom: 12px;
}

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

.metric-item span {
  font-size: 10px;
  color: var(--text-muted);
}

.metric-item strong {
  font-size: 12px;
  color: var(--text-main);
  font-weight: 600;
}

.metric-item strong.danger {
  color: var(--primary-orange);
}

.card-bottom-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto; /* Push CTAs to exact bottom to sync layout height */
}

.manager-meta {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.manager-meta img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.card-cta-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-orange);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-cta-btn:hover {
  color: var(--primary-orange-hover);
}

/* Floating Action Button */
.fab-btn {
  position: absolute;
  bottom: 88px;
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-orange) 0%, #f53d00 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.5);
  z-index: 100;
  transition: var(--transition-smooth);
}

.fab-btn:hover {
  transform: scale(1.08) rotate(90deg);
}

/* Screen 3: Customer Details 360 Style */
.customer-detail-header-card {
  position: relative;
  background: linear-gradient(135deg, rgba(23, 42, 69, 0.8) 0%, rgba(13, 27, 42, 0.9) 100%);
  border: 1px solid var(--glass-border);
  padding: 20px;
}

.back-btn-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.back-btn-strip:hover {
  color: var(--text-main);
}

.company-title-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.detail-tab-menu {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 14px;
  overflow-x: auto;
  gap: 16px;
}

.detail-tab-menu::-webkit-scrollbar {
  display: none;
}

.detail-tab-item {
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}

.detail-tab-item.active {
  color: var(--primary-orange);
}

.detail-tab-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-orange);
}

.detail-content-section {
  display: none;
}

.detail-content-section.active {
  display: block;
}

/* Demand / Nhu cầu oil style */
.demand-pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.oil-demand-badge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.oil-demand-badge i {
  color: var(--primary-orange);
}

/* Timeline Interactive */
.timeline-list {
  position: relative;
  padding-left: 20px;
}

.timeline-list::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 5px;
  width: 1px;
  height: calc(100% - 16px);
  background: rgba(255, 255, 255, 0.08);
}

.timeline-event {
  position: relative;
  padding-bottom: 16px;
}

.timeline-event::before {
  content: '';
  position: absolute;
  top: 6px;
  left: -19px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-secondary);
  border: 2px solid var(--bg-main);
}

.timeline-event.primary-oil::before {
  background: var(--primary-orange);
}

.timeline-event.success-state::before {
  background: var(--status-success);
}

.timeline-event-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.timeline-event-meta span {
  font-size: 10px;
  color: var(--text-muted);
}

.timeline-event-meta strong {
  font-size: 12px;
  color: var(--text-main);
}

.timeline-event-body {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Kế hoạch chăm sóc */
.care-plan-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

.care-plan-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  color: transparent;
  transition: var(--transition-smooth);
}

.care-plan-checkbox.checked {
  background: var(--status-success);
  border-color: var(--status-success);
  color: white;
}

.care-plan-text {
  font-size: 12px;
  color: var(--text-main);
}

.care-plan-text.crossed {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Floating AI Coach detail suggestion button */
.ai-suggest-floating-btn {
  position: sticky;
  bottom: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #7b2cbf 0%, var(--primary-orange) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 40px;
  padding: 12px 20px;
  box-shadow: 0 8px 30px rgba(123, 44, 191, 0.3);
  font-weight: 700;
  font-size: 13px;
  color: white;
  margin: 16px auto;
  cursor: pointer;
  width: calc(100% - 32px);
  z-index: 100;
  transition: var(--transition-smooth);
}

.ai-suggest-floating-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(255, 107, 53, 0.4);
}

/* Screen 4: Today Tasks Styles */
.tasks-tab-header {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.tasks-tab-btn {
  flex: 1;
  padding: 8px 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: var(--transition-smooth);
}

.tasks-tab-btn.active {
  background: var(--navy-light);
  color: var(--primary-orange);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.05);
}

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

.task-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition-smooth);
}

.task-card.overdue {
  border-color: rgba(255, 59, 48, 0.25);
  background: linear-gradient(135deg, rgba(13, 27, 42, 0.6) 0%, rgba(255, 59, 48, 0.04) 100%);
}

.task-checkbox-wrap {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: transparent;
  font-size: 12px;
  transition: var(--transition-smooth);
}

.task-checkbox-wrap.checked {
  background: var(--status-success);
  border-color: var(--status-success);
  color: white;
}

.task-body-desc {
  flex: 1;
}

.task-body-desc h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.task-body-desc h4.checked {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-body-desc p {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Screen 5: AI Sales Coach Style */
.ai-coach-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.coach-tab-btn {
  padding: 8px 2px;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: var(--transition-smooth);
}

.coach-tab-btn.active {
  background: var(--navy-light);
  color: var(--primary-orange);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.05);
}

.ai-coach-content-panel {
  display: none;
}

.ai-coach-content-panel.active {
  display: block;
}

/* Objections / Knowledge cards style */
.knowledge-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.knowledge-item-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: var(--transition-smooth);
}

.knowledge-item-card:hover {
  border-color: rgba(255, 107, 53, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.knowledge-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.knowledge-body {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Workshop prompt generator style */
.ai-interactive-panel {
  background: linear-gradient(135deg, rgba(23, 42, 69, 0.4) 0%, rgba(13, 27, 42, 0.7) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.chat-bubble-ai {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  padding: 12px;
  border-radius: 0 16px 16px 16px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-main);
  margin-bottom: 14px;
  position: relative;
}

.chat-bubble-ai .glow-tag {
  color: var(--primary-orange);
  font-weight: 700;
  margin-bottom: 4px;
}

.result-generator-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  min-height: 80px;
  margin-top: 12px;
  line-height: 1.5;
  white-space: pre-line;
}

.result-generator-box.active {
  border-style: solid;
  border-color: rgba(52, 199, 89, 0.3);
  background: rgba(52, 199, 89, 0.02);
  color: var(--text-main);
}

/* Screen 6: Debt (Công nợ) Style */
.debt-ring-card {
  text-align: center;
  padding: 24px 18px;
}

.debt-circle-graphic {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.svg-ring {
  transform: rotate(-90deg);
}

.svg-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 10px;
}

.svg-ring-progress {
  fill: none;
  stroke: var(--primary-orange);
  stroke-width: 10px;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 94; /* 75% completed visually */
  transition: var(--transition-smooth);
}

.circle-inner-data {
  position: absolute;
  display: flex;
  flex-direction: column;
}

.circle-inner-data span {
  font-size: 10px;
  color: var(--text-muted);
}

.circle-inner-data strong {
  font-size: 18px;
  color: var(--text-main);
  font-weight: 700;
}

.debt-aging-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.aging-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
}

.aging-card span {
  font-size: 9px;
  color: var(--text-muted);
  display: block;
}

.aging-card strong {
  font-size: 12px;
  color: var(--text-main);
  font-weight: 700;
}

.aging-card.high-risk {
  border-color: rgba(255, 59, 48, 0.25);
  background: rgba(255, 59, 48, 0.04);
}

.aging-card.high-risk strong {
  color: var(--status-hot);
}

/* Screen 7: Báo cáo / Analytics Style */
.analytics-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.analytics-metric-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 12px;
  border-radius: var(--radius-md);
}

.visual-chart-sim {
  height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}

.chart-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.chart-bar-val {
  width: 24px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, rgba(255, 107, 53, 0.2), var(--primary-orange));
  min-height: 5px;
  transition: var(--transition-smooth);
}

.chart-bar-val.accent {
  background: linear-gradient(to top, rgba(0, 122, 255, 0.2), var(--status-cold));
}

.chart-bar-label {
  font-size: 9px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.leaderboard-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.leaderboard-profile img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.leaderboard-profile span {
  font-weight: 600;
}

.rank-badge {
  width: 16px;
  height: 16px;
  background: var(--navy-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
}

.leaderboard-row:nth-child(1) .rank-badge {
  background: #ffd700;
  color: #000;
}

.leaderboard-row:nth-child(2) .rank-badge {
  background: #c0c0c0;
  color: #000;
}

/* Modal Core Styles */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 7, 11, 0.8);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-body-panel {
  width: 100%;
  background: var(--bg-main);
  border-top: 1px solid var(--glass-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px 20px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 85%;
  overflow-y: auto;
}

.modal-overlay.active .modal-body-panel {
  transform: translateY(0);
}

.modal-header-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-close-btn:hover {
  color: var(--text-main);
}

/* Success State Modal Details */
.success-card-feedback {
  text-align: center;
  padding: 16px 0;
}

.success-icon-animation {
  width: 56px;
  height: 56px;
  background: var(--status-success-bg);
  border: 2px solid var(--status-success);
  color: var(--status-success);
  font-size: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  animation: popScale 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popScale {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Empty States */
.empty-state-wrap {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.empty-state-wrap i {
  font-size: 40px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.empty-state-wrap h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.empty-state-wrap p {
  font-size: 11px;
  line-height: 1.4;
}

/* Loading Spinner Utility */
.loading-box-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 30px;
}

.spinner-icon {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 107, 53, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-orange);
  animation: spin 0.8s linear infinite;
}

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

/* Utility details */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.margin-b-16 { margin-bottom: 16px; }
.margin-t-16 { margin-top: 16px; }
.font-w-700 { font-weight: 700; }
