/* Zynect Media - Elegant Design System */

/* Google Fonts - Inter for modern, clean typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Sophisticated Color Palette - Muted & Elegant */
  --color-primary: #1e293b;        /* Deep slate for primary text */
  --color-secondary: #64748b;      /* Muted slate for secondary text */
  --color-accent: #3b82f6;         /* Refined blue for accents */
  --color-success: #10b981;        /* Subtle emerald for success */
  --color-warning: #f59e0b;        /* Warm amber for warnings */
  --color-danger: #ef4444;         /* Controlled red for errors */
  
  /* Neutral Grays - Sophisticated layering */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f8fafc;
  --color-bg-tertiary: #f1f5f9;
  --color-border-light: #e2e8f0;
  --color-border-medium: #cbd5e1;
  
  /* Typography Scale */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 1rem;       /* 16px */
  --font-size-lg: 1.125rem;     /* 18px */
  --font-size-xl: 1.25rem;      /* 20px */
  --font-size-2xl: 1.5rem;      /* 24px */
  --font-size-3xl: 1.875rem;    /* 30px */
  
  /* Spacing Scale */
  --spacing-xs: 0.25rem;        /* 4px */
  --spacing-sm: 0.5rem;         /* 8px */
  --spacing-md: 1rem;           /* 16px */
  --spacing-lg: 1.5rem;         /* 24px */
  --spacing-xl: 2rem;           /* 32px */
  --spacing-2xl: 3rem;          /* 48px */
  
  /* Border Radius - Subtle curves */
  --radius-sm: 0.375rem;        /* 6px */
  --radius-md: 0.5rem;          /* 8px */
  --radius-lg: 0.75rem;         /* 12px */
  --radius-xl: 1rem;            /* 16px */
  
  /* Shadows - Refined depth */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Base Typography */
body {
  font-family: var(--font-family);
  color: var(--color-primary);
  line-height: 1.6;
  font-size: var(--font-size-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Elegant Card Component */
.card-elegant {
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.card-elegant:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-medium);
}

/* Status Badge - Refined */
.badge-elegant {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.025em;
}

.badge-success {
  background-color: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-info {
  background-color: #dbeafe;
  color: #1e40af;
}

/* Data Grid - Professional table styling */
.data-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-grid thead th {
  background-color: var(--color-bg-tertiary);
  color: var(--color-secondary);
  font-weight: 600;
  font-size: var(--font-size-sm);
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--color-border-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-grid tbody td {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-primary);
  font-size: var(--font-size-sm);
}

.data-grid tbody tr:hover {
  background-color: var(--color-bg-secondary);
}

/* Metric Card - Clean KPI display */
.metric-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(30%, -30%);
}

.metric-value {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: var(--font-size-sm);
  opacity: 0.9;
  font-weight: 500;
}

/* Button - Sophisticated styling */
.btn-elegant {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: var(--font-size-sm);
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
  outline: none;
}

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

.btn-primary:hover {
  background-color: #2563eb;
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--color-bg-tertiary);
  color: var(--color-primary);
  border: 1px solid var(--color-border-medium);
}

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

/* Input - Refined form elements */
.input-elegant {
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--color-primary);
  background-color: var(--color-bg-primary);
  transition: all 0.15s ease;
}

.input-elegant:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Toggle Switch - Minimal & elegant */
.toggle-elegant {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.toggle-elegant input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-border-medium);
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--color-accent);
}

input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

/* Progress Bar - Subtle & refined */
.progress-elegant {
  width: 100%;
  height: 8px;
  background-color: var(--color-bg-tertiary);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent) 0%, #60a5fa 100%);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* Alert - Refined notification */
.alert-elegant {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  border-left: 4px solid;
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.alert-info {
  background-color: #eff6ff;
  border-color: #3b82f6;
  color: #1e40af;
}

.alert-success {
  background-color: #f0fdf4;
  border-color: #10b981;
  color: #065f46;
}

.alert-warning {
  background-color: #fffbeb;
  border-color: #f59e0b;
  color: #92400e;
}

.alert-danger {
  background-color: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

/* Section Header - Clean & organized */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--color-border-light);
}

.section-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--color-primary);
  margin: 0;
}

/* Smooth Transitions */
* {
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* Utility Classes */
.text-muted {
  color: var(--color-secondary);
}

.text-small {
  font-size: var(--font-size-sm);
}

.text-xs {
  font-size: var(--font-size-xs);
}

.font-medium {
  font-weight: 500;
}

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

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

/* Remove default focus outlines, use custom */
*:focus {
  outline: none;
}

/* Scrollbar styling - Subtle */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--color-border-medium);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-secondary);
}

/* KPI Card Clickable - Hover effects */
.kpi-card-clickable {
  cursor: pointer;
  position: relative;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kpi-card-clickable:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
  border-color: var(--color-accent);
}

.kpi-card-clickable::after {
  content: '🔍';
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.kpi-card-clickable:hover::after {
  opacity: 0.4;
}
