/* ===========================================
   ALOES - Design System
   Sober, Modern, Simple
   =========================================== */

:root {
  /* Palette - Restrained (Navy + Bleu sobre) */
  --primary: #0F172A;
  --primary-soft: #1E293B;
  --accent: #0369A1;
  --accent-hover: #075985;
  
  /* Neutrals - Tinted toward brand */
  --bg-page: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
  --bg-surface: #FFFFFF;
  --bg-elevated: #FFFFFF;
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #94A3B8;
  --text-inverse: #FFFFFF;
  
  --border-light: #E2E8F0;
  --border-subtle: #F1F5F9;
  
  /* Semantic */
  --success: #059669;
  --success-bg: #ECFDF5;
  --error: #DC2626;
  --error-bg: #FEF2F2;
  --warning: #D97706;
  --info: #0284C7;
  
  /* Carousel */
  --carousel-opacity: 0.6;
  --carousel-brightness: 100%;
  
  /* Spacing - 4px base */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  
  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Shadows - Soft, minimal */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  
  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--bg-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ===========================================
   Layout
   =========================================== */

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.section {
  padding: var(--space-16) 0;
}

.section-sm {
  padding: var(--space-10) 0;
}

/* ===========================================
   Header
   =========================================== */

.header {
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.9) 100%);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
  animation: headerSlideDown 0.5s var(--ease-out);
}

@keyframes headerSlideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  transition: transform 0.3s var(--ease-out);
}

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

.logo-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inverse);
  font-weight: var(--font-bold);
  font-size: var(--text-sm);
  animation: logoPulse 3s ease-in-out infinite;
  box-shadow: 0 4px 15px rgba(3, 105, 161, 0.3);
}

@keyframes logoPulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(3, 105, 161, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 6px 25px rgba(3, 105, 161, 0.5);
    transform: scale(1.05);
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  padding: var(--space-2) 0;
  position: relative;
  transition: color var(--duration-fast) var(--ease-out);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--duration-normal) var(--ease-out);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* ===========================================
   Buttons
   =========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.btn:active::after {
  width: 200px;
  height: 200px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: var(--text-inverse);
  box-shadow: 0 2px 10px rgba(3, 105, 161, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, #0c4a6e 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(3, 105, 161, 0.4);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-color: var(--text-tertiary);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-page);
}

.btn-lg {
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
}

.btn-sm {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
}

/* ===========================================
   Hero
   =========================================== */

.hero {
  padding: var(--space-16) 0;
  background: var(--primary);
  color: var(--text-inverse);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(3, 105, 161, 0.3), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(2, 132, 199, 0.15), transparent);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.hero-title {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: var(--space-8);
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-10);
  margin-bottom: var(--space-8);
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  display: block;
}

.hero-stat-label {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
}

/* ===========================================
   Hero Carousel
   =========================================== */

.hero-carousel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 0;
}

.hero-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-carousel-slide.active {
  opacity: var(--carousel-opacity);
  filter: brightness(var(--carousel-brightness));
  animation: carousel-zoom 20s ease-in-out infinite alternate;
}

@keyframes carousel-zoom {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1);
  }
}

.hero-carousel::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.85) 0%,
    rgba(15, 23, 42, 0.7) 50%,
    rgba(15, 23, 42, 0.6) 100%
  );
  z-index: 1;
}

.hero .hero-inner {
  position: relative;
  z-index: 2;
}

/* ===========================================
   Cards
   =========================================== */

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--duration-normal) var(--ease-out);
  animation: cardFadeIn 0.5s var(--ease-out) backwards;
}

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

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(3, 105, 161, 0.15);
  transform: translateY(-4px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

.card-icon {
  font-size: var(--text-2xl);
}

/* ===========================================
   Grid
   =========================================== */

.grid {
  display: grid;
  gap: var(--space-5);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ===========================================
   Features / Offres
   =========================================== */

.offres {
  padding: var(--space-16) 0;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  min-height: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

.offre-card {
  padding: var(--space-5);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: all var(--duration-normal) var(--ease-out);
  text-decoration: none;
  color: inherit;
  display: block;
}

.offre-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(3, 105, 161, 0.15);
}

.offre-icon {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
}

.offre-title {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.offre-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.offre-meta {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--accent);
}

/* ===========================================
   Forms
   =========================================== */

.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.15), 0 4px 12px rgba(3, 105, 161, 0.1);
  transform: scale(1.01);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-error {
  font-size: var(--text-sm);
  color: var(--error);
  margin-top: var(--space-1);
}

/* ===========================================
   Auth Pages
   =========================================== */

.auth-page {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.auth-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.auth-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.auth-info {
  font-size: var(--text-sm);
  color: var(--accent);
  margin-top: var(--space-2);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-light);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--accent);
  font-weight: var(--font-medium);
}

/* ===========================================
   Dashboard
   =========================================== */

.dashboard {
  padding: var(--space-8) 0;
}

.dashboard-header {
  margin-bottom: var(--space-8);
}

.dashboard-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.dashboard-subtitle {
  color: var(--text-secondary);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
}

.dashboard-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.dashboard-card-title {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

/* Quota Circle */
.quota-display {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.quota-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-inverse);
  flex-shrink: 0;
}

.quota-value {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  line-height: 1;
}

.quota-label {
  font-size: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
}

.quota-details {
  flex: 1;
}

.quota-details p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

.quota-note {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-style: italic;
}

/* ===========================================
   Admin
   =========================================== */

.admin-page {
  padding: var(--space-8) 0;
}

.admin-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-6);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}

.admin-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: block;
  transition: all var(--duration-normal) var(--ease-out);
}

.admin-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.admin-card-icon {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
}

.admin-card-title {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.admin-card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
}

.stat-card-title {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.stat-card-value {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
}

/* Tables */
.table-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

th {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-page);
}

td {
  font-size: var(--text-sm);
  color: var(--text-primary);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--bg-page);
}

/* ===========================================
   Badges
   =========================================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  border-radius: var(--radius-sm);
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
}

.badge-error {
  background: var(--error-bg);
  color: var(--error);
}

.badge-warning {
  background: #FEF3C7;
  color: #B45309;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
}

.badge-info {
  background: #EFF6FF;
  color: var(--info);
}

/* ===========================================
   Footer
   =========================================== */

.footer {
  margin-top: auto;
  background: var(--primary);
  color: var(--text-inverse);
  padding: var(--space-8) 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-info p {
  font-size: var(--text-sm);
  opacity: 0.8;
  margin-bottom: var(--space-1);
}

.footer-links {
  display: flex;
  gap: var(--space-4);
}

.footer-links a {
  font-size: var(--text-sm);
  opacity: 0.7;
  transition: opacity var(--duration-fast);
}

.footer-links a:hover {
  opacity: 1;
}

/* ===========================================
   Alerts
   =========================================== */

.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-4);
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid #A7F3D0;
}

.alert-error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid #FECACA;
}

/* ===========================================
   Contact Section
   =========================================== */

.contact {
  background: linear-gradient(180deg, #e2e8f0 0%, #e2e8f0 100%);
  padding: var(--space-12) 0;
  text-align: center;
  min-height: 200px;
}

.contact-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.contact-info {
  font-size: var(--text-base);
  color: var(--text-secondary);
}

.contact-info p {
  margin-bottom: var(--space-2);
}

/* ===========================================
   Empty States
   =========================================== */

.empty-state {
  text-align: center;
  padding: var(--space-10);
  color: var(--text-secondary);
}

.empty-state p {
  margin-bottom: var(--space-2);
}

/* ===========================================
   Responsive
   =========================================== */

@media (max-width: 640px) {
  .header-inner {
    height: 56px;
  }
  
  .nav {
    display: none;
  }
  
  .hero-title {
    font-size: var(--text-3xl);
  }
  
  .hero-stats {
    gap: var(--space-6);
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .auth-card {
    padding: var(--space-6);
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================================
   3D Animations
   =========================================== */

/* Perspective container for 3D effects */
.perspective {
  perspective: 1000px;
}

/* 3D Card Hover Effect */
.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease-out);
}

.card-3d:hover {
  transform: rotateX(5deg) rotateY(-5deg) translateZ(10px);
}

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

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

.float-slow {
  animation: float 5s ease-in-out infinite;
}

.float-fast {
  animation: float 2s ease-in-out infinite;
}

/* Pulse glow */
@keyframes pulse-glow {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(3, 105, 161, 0.4);
  }
  50% { 
    box-shadow: 0 0 20px 10px rgba(3, 105, 161, 0);
  }
}

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

/* Shimmer effect */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-surface) 0%,
    var(--bg-page) 50%,
    var(--bg-surface) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* 3D Button press */
.btn-3d {
  transform: translateY(0);
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}

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

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

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #60A5FA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero gradient animation */
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-animated {
  background: linear-gradient(-45deg, var(--primary) 0%, #1E3A5F 50%, var(--primary) 100%);
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
}

/* 3D Tilt card */
.tilt-card {
  transform: perspective(1000px) rotateX(0) rotateY(0);
  transition: transform 0.3s var(--ease-out);
}

.tilt-card:hover {
  transform: perspective(1000px) rotateX(5deg) rotateY(-5deg);
}

/* Stagger fade in */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in-up 0.5s var(--ease-out) forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* Scale in */
@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-scale-in {
  animation: scale-in 0.4s var(--ease-out) forwards;
}

/* Rotate in */
@keyframes rotate-in {
  from {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
  }
  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

.animate-rotate-in {
  animation: rotate-in 0.5s var(--ease-out) forwards;
}

/* 3D Quota circle with shine */
.quota-circle-3d {
  background: linear-gradient(135deg, var(--accent) 0%, #0EA5E9 50%, var(--accent) 100%);
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite, float 4s ease-in-out infinite;
  box-shadow: 
    0 10px 20px rgba(3, 105, 161, 0.3),
    inset 0 -5px 15px rgba(0, 0, 0, 0.1),
    inset 0 5px 15px rgba(255, 255, 255, 0.2);
}

/* Card lift with shadow */
.card-lift {
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.card-lift:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 20px 40px rgba(15, 23, 42, 0.15),
    0 0 0 1px var(--accent);
}

/* Header blur + shadow */
.header-blur {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

/* Hero decorative elements */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
}

.hero-orb-1 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  top: -100px;
  left: -100px;
  animation: float 6s ease-in-out infinite;
}

.hero-orb-2 {
  width: 300px;
  height: 300px;
  background: #0EA5E9;
  bottom: -50px;
  right: -50px;
  animation: float 8s ease-in-out infinite reverse;
}

/* Icon hover 3D bounce */
.icon-bounce {
  display: inline-block;
  transition: transform 0.3s var(--ease-out);
}

.icon-bounce:hover {
  transform: scale(1.2) rotate(5deg);
}

/* Badge shine */
.badge-shine {
  position: relative;
  overflow: hidden;
}

.badge-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

/* Table row hover 3D */
.table-3d tr {
  transition: transform 0.2s var(--ease-out), background 0.2s;
}

.table-3d tr:hover {
  transform: translateX(4px);
  background: var(--bg-page);
}

/* Progress bar 3D */
.progress-3d {
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-3d::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #0EA5E9 100%);
  border-radius: 4px;
  transition: width 0.5s var(--ease-out);
}

/* Nav link indicator */
.nav-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.nav-link:hover .nav-indicator,
.nav-link.active .nav-indicator {
  transform: scaleX(1);
}

/* Focus states */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: rgba(3, 105, 161, 0.2);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Cart Popup */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 999;
}

.cart-popup {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  max-height: 100vh;
  background: var(--bg-surface);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-popup[style*="block"] {
  right: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
}

.cart-header h3 {
  margin: 0;
  font-size: var(--text-lg);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  background: var(--bg-surface);
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.cart-total {
  padding: var(--space-4);
  border-top: 1px solid var(--border-light);
  background: var(--bg-page);
}