/* ============================================
   VIVATECH SAT - TEMA MODERNO ESTILO APPLE
   ============================================ */

:root {
  /* Colores VivaTech + Apple */
  --vivatech-red: #E31E24;
  --primary: #E31E24;
  --secondary: #1d1d1f;
  --success: #34C759;
  --warning: #FF9500;
  --danger: #FF3B30;
  --info: #007AFF;
  
  /* Grises Apple */
  --gray-50: #F5F5F7;
  --gray-100: #E8E8ED;
  --gray-200: #D2D2D7;
  --gray-300: #AEAEB2;
  --gray-500: #86868B;
  --gray-800: #1d1d1f;
  --gray-900: #000000;
  
  /* Sombras */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.16);
  
  /* Bordes */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
}

/* Reset y Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
}

/* Header Moderno */
header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

header h4 {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
  flex-grow: 1;
}

header img {
  height: 40px;
  width: auto;
}

/* Main Container */
.main-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* Welcome Section */
.welcome-section {
  background: linear-gradient(135deg, var(--vivatech-red) 0%, #c41a1f 100%);
  border-radius: var(--radius-xl);
  padding: 48px;
  margin-bottom: 40px;
  color: white;
  box-shadow: var(--shadow-lg);
}

.welcome-section h3 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.welcome-section p {
  font-size: 18px;
  opacity: 0.9;
}

/* Cards Principales (Grandes) */
.main-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.main-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--gray-100);
  position: relative;
  overflow: hidden;
}

.main-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--vivatech-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

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

.main-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--gray-200);
}

.main-card-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.main-card-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}

.main-card-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}

.main-card-icon.blue {
  background: linear-gradient(135deg, #007AFF20 0%, #007AFF10 100%);
  color: var(--info);
}

.main-card-icon.green {
  background: linear-gradient(135deg, #34C75920 0%, #34C75910 100%);
  color: var(--success);
}

.main-card-icon.red {
  background: linear-gradient(135deg, #E31E2420 0%, #E31E2410 100%);
  color: var(--vivatech-red);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 24px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--gray-200);
  transition: all 0.2s ease;
  display: block;
}

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

.stat-card.registrados { border-left-color: #6C757D; }
.stat-card.presupuestados { border-left-color: var(--info); }
.stat-card.en-curso { border-left-color: var(--vivatech-red); }
.stat-card.finalizados { border-left-color: var(--success); }
.stat-card.rechazados { border-left-color: var(--danger); }
.stat-card.total { border-left-color: var(--gray-800); }
.stat-card.facturas { border-left-color: var(--warning); }

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-card-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
}

.stat-card-icon {
  font-size: 24px;
  color: var(--gray-300);
}

.stat-card-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1;
}

/* Alert Moderno */
.modern-alert {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--success);
}

.modern-alert h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--gray-800);
}

.modern-alert p {
  color: var(--gray-500);
  margin: 0;
}

/* Notification Widget */
#notification-widget {
  margin-left: auto;
}

/* Responsive */
@media (max-width: 768px) {
  .main-page {
    padding: 24px 16px;
  }
  
  .welcome-section {
    padding: 32px 24px;
  }
  
  .welcome-section h3 {
    font-size: 24px;
  }
  
  .main-actions {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }
  
  .stat-card {
    padding: 16px;
  }
  
  .stat-card-value {
    font-size: 24px;
  }
}

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

.main-card, .stat-card {
  animation: fadeIn 0.4s ease backwards;
}

.main-card:nth-child(1) { animation-delay: 0.1s; }
.main-card:nth-child(2) { animation-delay: 0.2s; }
.main-card:nth-child(3) { animation-delay: 0.3s; }

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.15s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.25s; }
.stat-card:nth-child(5) { animation-delay: 0.3s; }
.stat-card:nth-child(6) { animation-delay: 0.35s; }
.stat-card:nth-child(7) { animation-delay: 0.4s; }
