/* ClientLead Dashboard - TailAdmin Template Inspired Styles */

/* Import Google Font */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap");

/* Root variables for consistent theming */
:root {
  /* Brand Colors */
  --color-brand-500: #465fff;
  --color-brand-600: #3641f5;
  --color-brand-700: #2a31d8;
  
  /* Gray Colors */
  --color-gray-100: #f2f4f7;
  --color-gray-200: #e4e7ec;
  --color-gray-300: #d0d5dd;
  --color-gray-400: #98a2b3;
  --color-gray-500: #667085;
  --color-gray-600: #475467;
  --color-gray-700: #344054;
  --color-gray-800: #1d2939;
  --color-gray-900: #101828;
  
  /* Success Colors */
  --color-success-50: #ecfdf3;
  --color-success-500: #12b76a;
  --color-success-600: #039855;
  
  /* Error Colors */
  --color-error-50: #fef3f2;
  --color-error-500: #f04438;
  --color-error-600: #d92d20;
  
  /* Info Colors */
  --color-info-50: #f0f9ff;
  --color-info-500: #0ba5ec;
  --color-info-600: #0086c9;
}

/* Base font */
.clientlead-dashboard {
  font-family: 'Outfit', sans-serif;
}

/* Hover styles for elements with tooltips */
.metric-card-label:hover,
.chart-title:hover {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* Modern Card Style */
.modern-card {
  background-color: #ffffff;
  border: 1px solid var(--color-gray-200);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.modern-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.modern-card-header {
  padding: 1.25rem 1.5rem;
  background-color: transparent;
  border-bottom: 1px solid var(--color-gray-200);
  border-radius: 1rem 1rem 0 0;
}

.modern-card-body {
  padding: 1.25rem 1.5rem;
}

/* Metric Card Styles */
.metric-card {
  background-color: #ffffff;
  border: 1px solid var(--color-gray-200);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Specific metric card colors */
.metric-card-leads::before {
  background: #3B82F6;
}

.metric-card-value::before {
  background: #10B981;
}

.metric-card-conversion::before {
  background: #F59E0B;
}

.metric-card-scheduled::before {
  background: #8B5CF6;
}

.metric-card:hover::before {
  opacity: 1;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.metric-card-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--color-gray-800);
  margin-bottom: 0.5rem;
}

.metric-card-label {
  font-size: 0.875rem;
  color: var(--color-gray-500);
  margin-bottom: 1rem;
}

.metric-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

/* Status Badge Styles */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-badge-success {
  background-color: var(--color-success-50);
  color: var(--color-success-600);
}

.status-badge-error {
  background-color: var(--color-error-50);
  color: var(--color-error-600);
}

.status-badge-info {
  background-color: var(--color-info-50);
  color: var(--color-info-600);
}

/* Chart Container Styles */
.chart-container {
  background-color: #ffffff;
  border: 1px solid var(--color-gray-200);
  border-radius: 1rem;
  padding: 1.5rem;
  min-height: 60px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.chart-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-gray-800);
}

.chart-subtitle {
  font-size: 0.875rem;
  color: var(--color-gray-500);
  margin-top: 0.25rem;
}

/* Modern Input Styles */
.modern-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--color-gray-300);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-gray-800);
  background-color: #ffffff;
  transition: all 0.2s ease;
}

.modern-input:focus {
  outline: none;
  border-color: var(--color-brand-500);
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.1);
}

.modern-select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--color-gray-300);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-gray-800);
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modern-select:focus {
  outline: none;
  border-color: var(--color-brand-500);
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.1);
}

/* Modern Button Styles */
.modern-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1rem;
  border: 1px solid var(--color-gray-300);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-700);
  background-color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modern-button:hover {
  background-color: var(--color-gray-50);
  color: var(--color-gray-800);
}

.modern-button-primary {
  color: #ffffff;
  background-color: var(--color-brand-600);
  border-color: var(--color-brand-600);
}

.modern-button-primary:hover {
  background-color: var(--color-brand-700);
  border-color: var(--color-brand-700);
}

/* Grid Layout */
.modern-grid {
  display: grid;
  gap: 1.5rem;
}

.modern-grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .modern-grid-cols-sm-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .modern-grid-cols-md-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .modern-grid-cols-md-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .modern-grid-cols-lg-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .modern-grid-cols-lg-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* New Pipeline Stage Styles - Conversion Focused */
.pipeline-container {
  width: 100%;
  padding: 1rem 0;
}

.pipeline-stages-wrapper {
  display: flex;
  gap: 0;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: nowrap;
  margin-bottom: 1.5rem;
}

/* Pipeline Stage Card - Simplified Design */
.pipeline-stage-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1rem;
  flex: 1 1 0;
  min-width: 0;
  max-width: 160px;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pipeline-stage-card:hover {
  transform: translateY(-2px);
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.pipeline-stage-card.first-stage {
  border-color: #3b82f6;
  background: linear-gradient(to bottom, #eff6ff, white);
}

.pipeline-stage-card.last-stage {
  margin-right: 0;
}

/* Stage Card Main Content */
.stage-card-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

/* Stage Header */
.stage-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stage-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.stage-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  line-height: 1.2;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Stage Count Display */
.stage-count-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
}

.stage-count-number {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stage-count-label {
  font-size: 0.625rem;
  color: #6b7280;
  text-transform: lowercase;
}

/* Conversion Indicator */
.conversion-indicator {
  position: absolute;
  top: -1rem;
  left: -1rem;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.25rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.conversion-arrow {
  font-size: 0.875rem;
  color: #6b7280;
}

.conversion-rate {
  color: #1f2937;
}

/* Conversion Quality Colors */
.conversion-indicator.excellent {
  border-color: #10b981;
  background: #f0fdf4;
}

.conversion-indicator.excellent .conversion-rate {
  color: #059669;
}

.conversion-indicator.good {
  border-color: #3b82f6;
  background: #eff6ff;
}

.conversion-indicator.good .conversion-rate {
  color: #2563eb;
}

.conversion-indicator.average {
  border-color: #f59e0b;
  background: #fffbeb;
}

.conversion-indicator.average .conversion-rate {
  color: #d97706;
}

.conversion-indicator.poor {
  border-color: #ef4444;
  background: #fef2f2;
}

.conversion-indicator.poor .conversion-rate {
  color: #dc2626;
}

/* Pipeline Insights */
.pipeline-insights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.insight-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

.insight-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.insight-card.warning {
  border-color: #fbbf24;
  background: linear-gradient(to right, #fffbeb, white);
}

.insight-card.success {
  border-color: #34d399;
  background: linear-gradient(to right, #f0fdf4, white);
}

.insight-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.insight-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.insight-label {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.insight-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .pipeline-stages-wrapper {
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
  }
  
  .pipeline-stage-card {
    flex: 0 1 calc(33.333% - 0.67rem);
    max-width: 200px;
  }
  
  .conversion-indicator {
    position: static;
    margin-bottom: 0.5rem;
    order: -1;
  }
}

@media (max-width: 768px) {
  .pipeline-stages-wrapper {
    flex-direction: column;
    gap: 1rem;
  }
  
  .pipeline-stage-card {
    flex: 1 1 100%;
    max-width: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
  }
  
  .stage-card-main {
    flex-direction: row;
    flex: 1;
    justify-content: space-between;
  }
  
  .stage-header {
    flex-direction: row;
    gap: 0.75rem;
    text-align: left;
  }
  
  .stage-name {
    text-align: left;
  }
  
  .conversion-indicator {
    position: static;
    order: 0;
    margin: 0;
  }
  
  .pipeline-insights {
    grid-template-columns: 1fr;
  }
}

/* Extra compact mode for many stages (7+) */
@media (min-width: 1201px) {
  .pipeline-stages-wrapper:has(.pipeline-stage-card:nth-child(7)) .pipeline-stage-card {
    max-width: 140px;
    padding: 0.75rem 0.5rem;
  }
  
  .pipeline-stages-wrapper:has(.pipeline-stage-card:nth-child(7)) .stage-icon {
    font-size: 1.25rem;
  }
  
  .pipeline-stages-wrapper:has(.pipeline-stage-card:nth-child(7)) .stage-count-number {
    font-size: 1.5rem;
  }
  
  .pipeline-stages-wrapper:has(.pipeline-stage-card:nth-child(7)) .stage-name {
    font-size: 0.625rem;
  }
  
  .pipeline-stages-wrapper:has(.pipeline-stage-card:nth-child(9)) .pipeline-stage-card {
    max-width: 120px;
  }
  
  .pipeline-stages-wrapper:has(.pipeline-stage-card:nth-child(9)) .stage-count-number {
    font-size: 1.25rem;
  }
}

/* Social Media Stats */
.social-stat {
  text-align: center;
  padding: 1rem;
}

.social-stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-gray-800);
  margin-bottom: 0.25rem;
}

.social-stat-label {
  font-size: 0.875rem;
  color: var(--color-gray-600);
}

.social-stat-percentage {
  font-size: 0.75rem;
  color: var(--color-gray-500);
}

/* Controls Container */
.modern-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background-color: var(--color-gray-50);
  border-bottom: 1px solid var(--color-gray-200);
  gap: 1rem;
  flex-wrap: wrap;
}

/* Time Navigation Container */
.time-navigation-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

/* Period Type Selector */
.period-type-selector {
  display: flex;
  gap: 0.5rem;
}

.period-type-selector .modern-button {
  flex: 1;
  min-width: auto;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

/* Period Selector Button - Radio Button Group Style */
.period-selector-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: auto;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-700);
  background-color: #ffffff;
  border: 1px solid var(--color-gray-300);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.period-selector-button:hover {
  background-color: var(--color-gray-100);
  color: var(--color-gray-800);
}

.period-selector-button.active {
  background-color: var(--color-gray-200);
  color: var(--color-gray-900);
  font-weight: 600;
  border-color: var(--color-gray-400);
}

/* Dark mode styles for period selector buttons */
@media (prefers-color-scheme: dark) {
  .period-selector-button {
    background-color: #ffffff;
    color: var(--color-gray-700);
    border-color: var(--color-gray-300);
  }
  
  .period-selector-button:hover {
    background-color: var(--color-gray-100);
    color: var(--color-gray-800);
  }
  
  .period-selector-button.active {
    background-color: var(--color-gray-200);
    color: var(--color-gray-900);
    border-color: var(--color-gray-400);
  }
}

/* Period type button styles removed - now using modern-button classes */

/* Period Navigation */
.period-navigation {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Navigation button styles removed - now using modern-button classes */

.period-navigation .modern-button {
  width: 2rem;
  height: 2rem;
  padding: 0;
  min-width: auto;
}

.period-display {
  min-width: 150px;
  text-align: center;
  font-weight: 700;
  color: var(--color-gray-900);
  font-size: 1rem;
  padding: 0.25rem 0.75rem;
  background-color: #ffffff;
  border: 1px solid var(--color-gray-300);
  border-radius: 0.375rem;
}


/* Date Inputs */
.date-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.date-inputs span {
  color: var(--color-gray-500);
}

@media (max-width: 768px) {
  .modern-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .modern-controls > * {
    width: 100%;
  }
  
  .time-navigation-container {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .period-type-selector {
    width: 100%;
    justify-content: space-around;
  }
  
  .period-navigation {
    width: 100%;
    justify-content: center;
  }
  
  .date-inputs {
    width: 100%;
    justify-content: space-between;
  }
}

/* Dark mode support for new controls */
@media (prefers-color-scheme: dark) {
  .period-type-selector {
    background-color: transparent;
  }
  
  /* Dark mode button styles removed - now using modern-button classes */
  
  .period-display {
    color: var(--color-gray-900);
    background-color: #ffffff;
    border-color: var(--color-gray-400);
  }
  
  .date-inputs span {
    color: var(--color-gray-400);
  }
}

/* Utility Classes */
.text-muted {
  color: var(--color-gray-500);
}

.text-small {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

/* Modern Checkbox Styles */
.modern-checkbox-label {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: var(--color-gray-700);
  cursor: pointer;
  user-select: none;
}

.modern-checkbox {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  border: 1px solid var(--color-gray-300);
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modern-checkbox:checked {
  background-color: var(--color-brand-600);
  border-color: var(--color-brand-600);
}

.modern-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.1);
}

/* Goal Progress Styles */
.goal-progress-item {
  padding: 1.5rem;
  text-align: center;
}

.goal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.goal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-gray-700);
  margin: 0;
}

.goal-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-brand-600);
}

.goal-subtitle {
  font-size: 0.875rem;
  color: var(--color-gray-500);
  margin-top: 0.5rem;
}

/* Progress Container (from medewerkers popup) */
.progress-container {
  background-color: #f5f5f5;
  border-radius: 5px;
  margin: 5px 0 3px;
  height: 22px;
  position: relative;
  overflow: hidden;
  border: 1px solid #ddd;
}

.progress-bar {
  height: 100%;
  text-align: center;
  line-height: 22px;
  color: white;
  font-weight: bold;
  font-size: 0.85rem;
  transition: width 0.4s ease;
  display: inline-block;
  box-sizing: border-box;
}

.progress-bar.attended {
  background-color: #28a745;
}

.progress-bar.scheduled {
  background-color: #007bff;
}

/* Old Progress Bar styles for other uses */
.progress-bar-container {
  width: 100%;
  height: 1.5rem;
  background-color: var(--color-gray-200);
  border-radius: 0.75rem;
  overflow: hidden;
  position: relative;
}

.progress-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

/* Info Card */
.info-card {
  background-color: var(--color-info-50);
  border: 1px solid var(--color-info-500);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-top: 1rem;
}

.info-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-info-600);
  margin-bottom: 0.25rem;
}

.info-subtext {
  font-size: 0.875rem;
  color: var(--color-info-600);
  opacity: 0.8;
}

/* Circular Progress */
.circular-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-circle {
  transition: stroke-dashoffset 0.5s ease;
}

.circular-progress-label {
  font-size: 0.875rem;
  color: var(--color-gray-500);
  margin-top: 0.5rem;
}

/* Smooth transitions */
* {
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Monthly Goals v2 Styles */
.monthly-goals-v2 {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid var(--color-gray-200);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.goals-header-v2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--color-gray-100);
}

.goals-title-v2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-gray-800);
  margin: 0;
}

.goals-month-v2 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-gray-600);
  background: var(--color-gray-100);
  padding: 0.375rem 0.875rem;
  border-radius: 0.5rem;
}

/* Month Navigation Styles */
.goals-month-navigation {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.month-nav-button {
  background-color: #ffffff;
  border: 1px solid var(--color-gray-300);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
  color: var(--color-gray-700);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
}

.month-nav-button:hover:not(:disabled) {
  background-color: var(--color-gray-50);
  border-color: var(--color-brand-500);
  color: var(--color-brand-600);
  transform: scale(1.05);
}

.month-nav-button:active:not(:disabled) {
  transform: scale(0.95);
}

.month-nav-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: var(--color-gray-400);
}

.nav-arrow {
  font-size: 1.125rem;
  line-height: 1;
}

.goals-grid-v2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Goal Cards */
.goal-card-v2 {
  background-color: #ffffff;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--color-gray-200);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  display: flex;
  gap: 1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.goal-card-v2:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.goal-card-v2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.goal-card-v2:hover::before {
  opacity: 1;
}

.goal-card-primary::before {
  background: linear-gradient(90deg, #3b82f6 0%, #6366f1 100%);
}

.goal-card-secondary::before {
  background: linear-gradient(90deg, #10b981 0%, #14b8a6 100%);
}

.goal-card-accent::before {
  background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);
}

/* Goal Icon */
.goal-icon-v2 {
  flex-shrink: 0;
}

/* Goal Header Styles */
.goal-header-v2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.goal-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.25rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.goal-input-label {
  font-size: 0.8125rem;
  color: var(--color-gray-600);
  font-weight: 500;
  white-space: nowrap;
}

.goal-input {
  width: 85px;
  padding: 0.375rem 0.625rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-gray-800);
  background-color: #ffffff;
  border: 1px solid #f3f4f6 !important;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  text-align: center;
  -moz-appearance: textfield;
}

/* Hide number input spinners */
.goal-input::-webkit-inner-spin-button,
.goal-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.goal-input:hover:not(:disabled) {
  border-color: #e5e7eb !important;
  background-color: #fafbfc;
}

.goal-input:focus {
  outline: none;
  border-color: var(--color-brand-500) !important;
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.08);
  background-color: #ffffff;
}

.goal-input:disabled {
  background-color: #fafbfc;
  cursor: not-allowed;
  opacity: 1;
  border-color: #f9fafb !important;
  color: var(--color-gray-700);
  font-weight: 500;
}

/* Goal period styling */
.goal-period-v2 {
  background-color: var(--color-gray-100);
  color: var(--color-gray-600);
}

/* Inline editing styles */
.goal-target-v2.editable,
.percentage-value-simple.editable {
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  position: relative;
}

.goal-target-v2.editable:hover,
.percentage-value-simple.editable:hover {
  background-color: rgba(70, 95, 255, 0.08);
  transform: scale(1.05);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Edit overlay */
.edit-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background-color: transparent;
  cursor: pointer;
}

/* Conversion edit overlay - separate from main overlay */
.conversion-edit-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 998;
  background-color: transparent;
  cursor: pointer;
}

/* Minimalist inline input */
.goal-input-inline {
  width: 60px;
  padding: 0.25rem 0.375rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-gray-800);
  background: transparent;
  border: 1px solid #e5e7eb !important;
  border-radius: 0.375rem;
  text-align: center;
  -moz-appearance: textfield;
  position: relative;
  z-index: 1000;
  transition: all 0.15s ease;
}

.goal-input-inline::-webkit-inner-spin-button,
.goal-input-inline::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.goal-input-inline:focus {
  outline: none;
  border-color: var(--color-brand-500) !important;
  background-color: #ffffff;
}


/* Conversion Rate Card - Dual Circle Styles */
.conversion-dual-circles {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  width: 100%;
  margin-top: 0.5rem;
}

.conversion-metric-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 999;
}

.conversion-circle-container {
  position: relative;
  width: 90px;
  height: 90px;
  cursor: default;
  transition: transform 0.2s ease;
}

.conversion-circle-container.editable {
  cursor: pointer;
}

.conversion-circle-container.editable:hover {
  transform: scale(1.05);
}

.conversion-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: baseline;
  gap: 1px;
  cursor: inherit;
  padding: 0.5rem;
  z-index: 1000;
}

.conversion-label {
  font-size: 0.75rem;
  color: var(--color-gray-500);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.conversion-circle {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.conversion-circle-bg {
  fill: none;
  stroke: #f3f4f6;
  stroke-width: 6;
}

.conversion-circle-progress {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease;
}

.conversion-circle-progress.actual {
  stroke: #3b82f6;
}

.conversion-circle-progress.target {
  stroke: #10b981;
}

.conversion-percentage {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-gray-800);
  line-height: 1;
  letter-spacing: -0.025em;
  display: inline-block;
  min-width: 35px;
  text-align: right;
}

.conversion-symbol {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-gray-500);
}

.conversion-input-circle {
  width: 35px !important;
  padding: 0 !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  text-align: right !important;
  border: none !important;
  background: transparent !important;
  color: var(--color-gray-800) !important;
  outline: none !important;
  -moz-appearance: textfield;
  position: relative;
  z-index: 1001;
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0;
}

.conversion-input-circle::-webkit-inner-spin-button,
.conversion-input-circle::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Goal accent card gradient */
.goal-card-accent::before {
  background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .conversion-dual-circles {
    gap: 1.5rem;
  }
  
  .conversion-circle-container {
    width: 80px;
    height: 80px;
  }
  
  .conversion-percentage {
    font-size: 1.25rem;
  }
  
  .conversion-symbol {
    font-size: 0.875rem;
  }
  
  .conversion-input-circle {
    font-size: 1.25rem !important;
    width: 40px !important;
  }
}

/* Reset button styles */
.reset-button {
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  color: var(--color-gray-600);
  background-color: transparent;
  border: 1px solid var(--color-gray-300);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.reset-button:hover {
  color: var(--color-brand-600);
  border-color: var(--color-brand-500);
  background-color: var(--color-brand-50);
}

/* Client Churn Tracking Styles */
.metric-card-churn {
  border-left: 4px solid #F59E0B;
}

.metric-card-risk {
  border-left: 4px solid #EF4444;
}

.metric-card-rate {
  border-left: 4px solid #8B5CF6;
}

.metric-card-left {
  border-left: 4px solid #6B7280;
}

/* Retention Timeline Styles */
.retention-timeline {
  max-height: 400px;
  overflow-y: auto;
  padding: 1rem;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  position: relative;
  padding-left: 2rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.timeline-item.safe .timeline-marker {
  background-color: #10B981;
}

.timeline-item.warning .timeline-marker {
  background-color: #F59E0B;
}

.timeline-item.critical .timeline-marker {
  background-color: #EF4444;
}

.timeline-item.left .timeline-marker {
  background-color: #6B7280;
}

.timeline-content {
  flex: 1;
}

.timeline-client {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gray-800);
  margin: 0 0 0.25rem 0;
}

.timeline-date {
  font-size: 0.75rem;
  color: var(--color-gray-600);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.days-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.timeline-item.critical .days-badge {
  background-color: rgba(239, 68, 68, 0.1);
  color: #DC2626;
}

.timeline-item.warning .days-badge {
  background-color: rgba(245, 158, 11, 0.1);
  color: #D97706;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-gray-500);
}

.empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

/* Conversion source indicator */
.conversion-source {
  margin-top: 0.5rem;
}

.source-indicator {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 500;
}

.source-indicator.custom {
  background-color: var(--color-warning-100);
  color: var(--color-warning-800);
}

.source-indicator.calculated {
  background-color: var(--color-success-100);
  color: var(--color-success-800);
}

.icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background: var(--color-gray-100);
  border-radius: 0.75rem;
  font-size: 1.5rem;
}

/* Goal Content */
.goal-content-v2 {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.goal-label-v2 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-600);
  margin: 0 0 0.5rem 0;
}

.goal-period-v2 {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-gray-500);
  margin-left: 0.5rem;
  padding: 0.125rem 0.5rem;
  background-color: var(--color-gray-100);
  border-radius: 0.25rem;
  white-space: nowrap;
}

.goal-metrics-v2 {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.goal-current-v2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-gray-800);
}

.goal-divider-v2 {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-gray-400);
}

.goal-target-v2 {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-gray-500);
}

/* Progress Bar */
.goal-progress-v2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin-top: 0.5rem;
}

.progress-track-v2 {
  flex: 1;
  height: 0.5rem;
  background: var(--color-gray-200);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.dual-progress {
  display: flex;
  align-items: center;
  position: relative;
}

.dual-progress .progress-fill-v2 {
  position: absolute;
  top: 0;
  height: 100%;
}

.progress-green {
  z-index: 2;
}

.progress-blue {
  z-index: 1;
}

.progress-fill-v2 {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.5s ease, background-color 0.3s ease;
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: -100% 0; }
  100% { background-position: 100% 0; }
}

.progress-text-v2 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gray-700);
  min-width: 3rem;
  text-align: right;
}

/* Progress Legend */
.progress-legend {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-text {
  color: var(--color-gray-600);
  white-space: nowrap;
}

/* Extra Info */
.goal-extra-info-v2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-gray-100);
}

.info-icon {
  font-size: 1rem;
}

.info-text {
  font-size: 0.875rem;
  color: var(--color-gray-600);
}

/* Planning Stats */
.planning-stats-v2 {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat-item-v2 {
  text-align: center;
}

.stat-number-v2 {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-gray-800);
}

.stat-label-v2 {
  display: block;
  font-size: 0.75rem;
  color: var(--color-gray-500);
  margin-top: 0.25rem;
}

.stat-divider-v2 {
  width: 1px;
  height: 3rem;
  background: var(--color-gray-300);
}

/* Mini Chart */
.mini-chart-v2 {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 3rem;
}

.chart-bar-v2 {
  flex: 1;
  background: linear-gradient(to top, var(--color-brand-500), var(--color-brand-400));
  border-radius: 0.25rem 0.25rem 0 0;
  transition: height 0.5s ease;
  min-height: 0.25rem;
}

.chart-bar-v2.secondary {
  background: linear-gradient(to top, var(--color-success-500), var(--color-success-400));
}

/* Conversion Percentage Display */
.conversion-percentage-display {
  display: flex;
  gap: 1.5rem;
  margin: 1.5rem 0;
  justify-content: center;
  align-items: center;
}

/* Simple Conversion Percentage Display */
.conversion-percentage-display-simple {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}

.percentage-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.percentage-label-simple {
  font-size: 0.875rem;
  color: var(--color-gray-600);
  font-weight: 500;
  min-width: 60px;
}

.percentage-value-simple {
  font-size: 1.25rem;
  font-weight: 700;
  transition: color 0.3s ease;
}

.percentage-value-simple.success {
  color: #059669;
}

.percentage-value-simple.warning {
  color: #d97706;
}

.percentage-value-simple.target {
  color: #4f46e5;
}

.percentage-box {
  flex: 1;
  max-width: 150px;
  background: var(--color-gray-50);
  border: 2px solid var(--color-gray-200);
  border-radius: 1rem;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.percentage-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  transition: all 0.3s ease;
}

.percentage-box.success::before {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.percentage-box.warning::before {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.percentage-box.target::before {
  background: linear-gradient(90deg, #6366f1 0%, #4f46e5 100%);
}

.percentage-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.percentage-label {
  display: block;
  font-size: 0.75rem;
  color: var(--color-gray-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.percentage-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-gray-800);
  line-height: 1;
  margin: 0.75rem 0;
}

.percentage-symbol {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-gray-600);
  margin-left: 0.125rem;
}

/* Status-specific colors */
.percentage-box.success .percentage-value {
  color: #059669;
}

.percentage-box.warning .percentage-value {
  color: #d97706;
}

.percentage-box.target .percentage-value {
  color: #4f46e5;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .percentage-box {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .percentage-label {
    color: rgba(255, 255, 255, 0.7);
  }
  
  .percentage-value {
    color: rgba(255, 255, 255, 0.9);
  }
  
  .percentage-symbol {
    color: rgba(255, 255, 255, 0.6);
  }
  
  .percentage-box.success .percentage-value {
    color: #34d399;
  }
  
  .percentage-box.warning .percentage-value {
    color: #fbbf24;
  }
  
  .percentage-box.target .percentage-value {
    color: #a5b4fc;
  }
}

.radial-progress-v2 {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.radial-text-v2 {
  position: absolute;
  display: flex;
  align-items: baseline;
  gap: 0.125rem;
}

.radial-value-v2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-gray-800);
}

.radial-unit-v2 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-500);
}

/* Status Badges */
.status-badge-v2 {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge-v2.excellent {
  background: var(--color-success-50);
  color: var(--color-success-600);
}

.status-badge-v2.good {
  background: var(--color-info-50);
  color: var(--color-info-600);
}

.status-badge-v2.average {
  background: #fef3c7;
  color: #d97706;
}

.status-badge-v2.poor {
  background: var(--color-error-50);
  color: var(--color-error-600);
}

/* Overall Progress */
.overall-progress-v2 {
  background: var(--color-gray-50);
  border-radius: 0.75rem;
  padding: 1.25rem;
  border: 1px solid var(--color-gray-200);
}

.overall-header-v2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.overall-label-v2 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gray-700);
}

.overall-status-v2 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-600);
}

.overall-track-v2 {
  height: 0.75rem;
  background: var(--color-gray-200);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.overall-fill-v2 {
  height: 100%;
  background: linear-gradient(90deg, var(--color-brand-500) 0%, var(--color-brand-600) 100%);
  border-radius: 9999px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.overall-fill-v2::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: progress-shine 2s ease-in-out infinite;
}

@keyframes progress-shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .monthly-goals-v2 {
    padding: 1.5rem;
  }
  
  .goals-header-v2 {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .goals-grid-v2 {
    grid-template-columns: 1fr;
  }
  
  .goal-card-v2 {
    padding: 1.25rem;
  }
}

/* Category Chart Styles (TailAdmin Sales Category Style) */
.category-chart-container {
  padding: 1rem 0;
}

.category-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.category-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-gray-100);
  transition: all 0.2s ease;
}

.category-item:last-child {
  border-bottom: none;
}

.category-item:hover {
  background-color: var(--color-gray-50);
  margin: 0 -1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
}

.category-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.category-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gray-800);
  flex: 1;
}

.category-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.category-percentage {
  font-weight: 700;
  color: var(--color-gray-900);
  min-width: 3rem;
  text-align: right;
}

.category-count {
  color: var(--color-gray-500);
  font-size: 0.75rem;
}

.category-bar-container {
  width: 100%;
  height: 0.5rem;
  background-color: var(--color-gray-100);
  border-radius: 0.25rem;
  overflow: hidden;
  position: relative;
}

.category-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-brand-500) 0%, var(--color-brand-600) 100%);
  border-radius: 0.25rem;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Animate the bars on first load */
@keyframes category-bar-fill {
  from {
    width: 0 !important;
  }
}

.category-bar {
  animation: category-bar-fill 0.8s ease-out;
}

/* Different colors for each origin type chart */
.chart-container:nth-child(1) .category-bar {
  background: linear-gradient(90deg, #FF6384 0%, #FF4567 100%);
}

.chart-container:nth-child(2) .category-bar {
  background: linear-gradient(90deg, #36A2EB 0%, #2483c5 100%);
}

.chart-container:nth-child(3) .category-bar {
  background: linear-gradient(90deg, #FFCE56 0%, #FFB700 100%);
}

/* Add shine effect on hover */
.category-item:hover .category-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: category-shine 1s ease-in-out;
}

@keyframes category-shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Empty state styling */
.category-chart-container .empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--color-gray-500);
  font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .category-info {
    flex-wrap: wrap;
  }
  
  .category-stats {
    font-size: 0.75rem;
  }
  
  .category-percentage {
    min-width: 2.5rem;
  }
}

/* TailAdmin Card Styles for Origin Charts */
.tailadmin-card {
  background-color: #ffffff;
  border: 1px solid var(--color-gray-200);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  position: relative;
  overflow: visible;
}

@media (min-width: 640px) {
  .tailadmin-card {
    padding: 1.5rem;
  }
}

.tailadmin-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.tailadmin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.25rem;
  width: 100%;
  min-height: 2rem;
}

h3.tailadmin-card-title,
.tailadmin-card h3,
.tailadmin-card-title {
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  line-height: 1.75rem !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 10 !important;
  text-align: left !important;
  white-space: normal !important;
  height: auto !important;
  width: auto !important;
  min-height: 1.75rem !important;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .tailadmin-card {
    background-color: rgba(255, 255, 255, 0.012);
    border-color: var(--color-gray-200);
  }
  
  h3.tailadmin-card-title,
  .tailadmin-card h3,
  .tailadmin-card-title {
    color: rgba(255, 255, 255, 0.9) !important;
  }
}

/* Dropdown button styling */
.dropdown-button {
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  transition: color 0.2s ease;
  padding: 0.25rem;
}

.dropdown-button:hover {
  color: #374151;
}

.dropdown-button.active {
  color: #374151;
}

/* Dark mode dropdown button */
@media (prefers-color-scheme: dark) {
  .dropdown-button:hover {
    color: #ffffff;
  }
  
  .dropdown-button.active {
    color: #ffffff;
  }
}

/* Dropdown menu styling */
.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 40;
  width: 10rem;
  padding: 0.5rem;
  background-color: #ffffff;
  border: 1px solid var(--color-gray-200);
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  display: none;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-menu button {
  display: flex;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-align: left;
  color: #6b7280;
  background: none;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropdown-menu button:hover {
  background-color: #f3f4f6;
  color: #374151;
}

/* Dark mode dropdown menu */
@media (prefers-color-scheme: dark) {
  .dropdown-menu {
    background-color: #1f2937;
    border-color: #374151;
  }
  
  .dropdown-menu button {
    color: #9ca3af;
  }
  
  .dropdown-menu button:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #d1d5db;
  }
}

/* Donut Chart Container Styles */
.donut-chart-container {
  position: relative;
  height: 300px;
  width: 100%;
  padding: 1rem;
  margin-top: 1rem;
  overflow: hidden;
}

/* Ensure ApexCharts container doesn't overflow */
.donut-chart-container .apexcharts-canvas {
  position: relative !important;
}

@media (max-width: 768px) {
  .donut-chart-container {
    height: 250px;
  }
}

/* Ensure charts are responsive */
.chart-container canvas {
  max-width: 100% !important;
  height: auto !important;
}

/* Force consistent borders on all dashboard cards */
.clientlead-dashboard .tailadmin-card {
  border: 1px solid var(--color-gray-200) !important;
  border-width: 1px !important;
}

/* Ensure no child elements add extra borders */
.tailadmin-card * {
  border-color: var(--color-gray-200) !important;
}

/* Specifically target ApexCharts elements to prevent border issues */
.tailadmin-card .apexcharts-canvas,
.tailadmin-card .apexcharts-svg,
.tailadmin-card .apexcharts-inner {
  border: none !important;
  outline: none !important;
}

/* Ensure consistent appearance in both light and dark modes */
.clientlead-dashboard .tailadmin-card,
.clientlead-dashboard .modern-card,
.clientlead-dashboard .chart-container {
  border: 1px solid var(--color-gray-200) !important;
  border-width: 1px !important;
}

/* Force title visibility - highest priority */
.clientlead-dashboard .tailadmin-card h3.tailadmin-card-title {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.5 !important;
  position: static !important;
  z-index: 999 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-family: inherit !important;
}

/* Fix for flex container in conversations chart */
.tailadmin-card-header .flex {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Ensure the select element in conversations chart doesn't break layout */
.tailadmin-card-header select {
  min-width: 0;
  flex-shrink: 0;
}