/*

 */

/* ===================================
   MODERN DESIGN SYSTEM - 2025
   Premium & Elegant
   =================================== */

:root {
  /* Brand Colors */
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;

  /* Accent Colors */
  --accent-violet: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

  /* Neutrals - Refined */
  --gray-50: #fafafa;
  --gray-100: #f4f4f5;
  --gray-200: #e4e4e7;
  --gray-300: #d4d4d8;
  --gray-400: #a1a1aa;
  --gray-500: #71717a;
  --gray-600: #52525b;
  --gray-700: #3f3f46;
  --gray-800: #27272a;
  --gray-900: #18181b;

  /* Shadows - More Pronounced */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 2px 8px -2px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow: 0 4px 16px -4px rgb(0 0 0 / 0.12), 0 2px 8px -4px rgb(0 0 0 / 0.08);
  --shadow-md: 0 8px 24px -6px rgb(0 0 0 / 0.15), 0 4px 12px -4px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 16px 40px -8px rgb(0 0 0 / 0.18), 0 8px 20px -6px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 24px 50px -12px rgb(0 0 0 / 0.25);

  /* Offset Shadows - Signature Style */
  --shadow-offset: 6px 6px 0px 0px var(--gray-900);
  --shadow-offset-sm: 4px 4px 0px 0px var(--gray-900);
  --shadow-offset-primary: 6px 6px 0px 0px var(--primary);
  --shadow-offset-primary-sm: 4px 4px 0px 0px var(--primary);

  /* Colored Shadows */
  --shadow-primary: 0 8px 24px -6px rgba(37, 99, 235, 0.35);
  --shadow-success: 0 8px 24px -6px rgba(16, 185, 129, 0.35);
  --shadow-danger: 0 8px 24px -6px rgba(239, 68, 68, 0.35);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--accent-violet) 100%);
  --gradient-warm: linear-gradient(135deg, var(--accent-amber) 0%, var(--accent-pink) 100%);
  --gradient-cool: linear-gradient(135deg, var(--accent-cyan) 0%, var(--primary) 100%);
  --gradient-success: linear-gradient(135deg, var(--accent-emerald) 0%, var(--accent-cyan) 100%);
  --gradient-dark: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
  --gradient-subtle: linear-gradient(180deg, white 0%, var(--gray-50) 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
  letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* ===================================
   MODERN CARDS - Premium Style
   =================================== */

/* Standard Card */
.card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

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

/* Card with Offset Shadow - Signature Style */
.card-offset {
  background: white !important;
  border-radius: var(--radius-lg) !important;
  border: 2px solid var(--gray-900) !important;
  box-shadow: var(--shadow-offset-sm) !important;
  transition: all var(--transition);
  position: relative;
}

.card-offset:hover {
  box-shadow: var(--shadow-offset) !important;
  transform: translate(-2px, -2px);
}

/* Card with Primary Offset */
.card-offset-primary {
  background: white;
  border-radius: var(--radius-lg);
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-offset-primary-sm);
  transition: all var(--transition);
}

.card-offset-primary:hover {
  box-shadow: var(--shadow-offset-primary);
  transform: translate(-2px, -2px);
}

/* Glassmorphism Card */
.card-glass {
  background: var(--gradient-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
}

/* Elevated Card */
.card-elevated {
  background: white;
  border-radius: var(--radius-xl);
  border: none;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
}

.card-elevated:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* Stat Card - Dashboard Style */
.stat-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--primary-100);
}

.stat-card:hover::before {
  transform: scaleX(1);
}

/* Form Card */
.form-card {
  background: white;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  padding: 2rem;
}

/* ===================================
   NAVIGATION - Refined
   =================================== */

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  color: var(--gray-600);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all var(--transition);
  position: relative;
}

.nav-item:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.nav-item.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-primary);
}

.nav-item.active:hover {
  background: var(--gradient-primary);
}

/* Navigation Section Title */
.nav-section-title {
  padding: 1.25rem 1rem 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 800;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* View Tabs */
.view-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-500);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.view-tab:hover {
  color: var(--gray-900);
  background: rgba(0,0,0,0.03);
}

.view-tab.active {
  background: white;
  color: var(--gray-900);
  box-shadow: var(--shadow-sm);
}

/* ===================================
   BUTTONS - Premium Style
   =================================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.9375rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px rgba(37, 99, 235, 0.45);
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: white;
  color: var(--gray-700);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-50);
}

/* Offset Button - Signature Style */
.btn-offset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: white;
  color: var(--gray-900);
  border: 2px solid var(--gray-900);
  border-radius: var(--radius-lg);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-offset-sm);
}

.btn-offset:hover {
  box-shadow: var(--shadow-offset);
  transform: translate(-2px, -2px);
}

.btn-offset:active {
  box-shadow: 2px 2px 0px 0px var(--gray-900);
  transform: translate(2px, 2px);
}

/* Danger Button */
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border-radius: var(--radius-lg);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-danger);
}

.btn-danger:hover {
  transform: translateY(-2px);
}

/* ===================================
   BADGES - Refined
   =================================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-primary {
  background: var(--primary-100);
  color: var(--primary-dark);
}

.badge-success {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.badge-gray {
  background: var(--gray-100);
  color: var(--gray-600);
}

/* ===================================
   INPUTS - Modern Style
   =================================== */

.input-modern {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--gray-50);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-900);
  transition: all var(--transition);
}

.input-modern:focus {
  outline: none;
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-100);
}

.input-modern::placeholder {
  color: var(--gray-400);
  font-weight: 400;
}

.input-modern.input-with-icon {
  padding-left: 3rem;
}

/* Form Elements */
.form-group {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

/* ===================================
   AVATARS - Refined
   =================================== */

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-weight: 700;
  text-transform: uppercase;
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.avatar-xs { width: 1.75rem; height: 1.75rem; font-size: 0.625rem; }
.avatar-sm { width: 2rem; height: 2rem; font-size: 0.75rem; }
.avatar-md { width: 2.5rem; height: 2.5rem; font-size: 0.875rem; }
.avatar-lg { width: 3rem; height: 3rem; font-size: 1rem; }
.avatar-xl { width: 4rem; height: 4rem; font-size: 1.25rem; }

.avatar-group {
  display: flex;
}

.avatar-group .avatar {
  border: 2px solid white;
  margin-left: -0.5rem;
}

.avatar-group .avatar:first-child {
  margin-left: 0;
}

/* ===================================
   KANBAN
   =================================== */

.kanban-column {
  min-height: 200px;
  border-radius: var(--radius-xl);
  background: var(--gray-100);
}

.deal-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.deal-card:hover {
  transform: translateY(-4px) rotate(-0.5deg);
  box-shadow: var(--shadow-md);
}

/* ===================================
   PROGRESS BARS
   =================================== */

.progress-bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

/* ===================================
   TABLES - Modern Style
   =================================== */

.table-modern {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-modern th {
  background: var(--gray-50);
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--gray-200);
}

.table-modern td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition-fast);
}

.table-modern tbody tr:hover td {
  background: var(--gray-50);
}

/* ===================================
   ANIMATIONS
   =================================== */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

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

.animate-fade-in-up {
  animation: fadeInUp 0.4s ease-out;
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.3s ease-out;
}

.animate-pulse-soft {
  animation: pulse-soft 2s ease-in-out infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* ===================================
   SCROLLBAR - Refined
   =================================== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

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

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Hover effects */
.hover-lift {
  transition: transform var(--transition), box-shadow var(--transition);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hover-scale {
  transition: transform var(--transition);
}

.hover-scale:hover {
  transform: scale(1.02);
}

/* Focus ring */
.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-100);
}

/* Icon containers */
.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
}

.icon-box-rounded {
  border-radius: var(--radius-full);
}

.icon-box-sm { width: 2rem; height: 2rem; }
.icon-box-md { width: 2.5rem; height: 2.5rem; }
.icon-box-lg { width: 3rem; height: 3rem; }

/* Empty states */
.empty-state {
  padding: 3rem;
  text-align: center;
}

.empty-state-icon {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-2xl);
  background: var(--gray-100);
}

/* Section headers */
.section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.03em;
}

/* Color utilities */
.text-primary { color: var(--primary) !important; }
.text-primary-dark { color: var(--primary-dark) !important; }
.bg-primary { background: var(--primary) !important; }
.bg-primary-50 { background: var(--primary-50) !important; }
.bg-primary-100 { background: var(--primary-100) !important; }

/* Responsive utilities */
@media (max-width: 1024px) {
  .hide-on-tablet {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .hide-on-mobile {
    display: none !important;
  }
}
