/* ═══════════════════════════════════════════════════════════
   ALSEK — Audit Digital | Design System
   Premium dark theme with glassmorphism
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ─── CSS Variables ────────────────────────────────────────── */
:root {
  /* Colors */
  --bg-primary: #07070E;
  --bg-secondary: #0E0E1A;
  --bg-surface: #141425;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  
  --accent-violet: #7C3AED;
  --accent-blue: #3B82F6;
  --accent-cyan: #06B6D4;
  --accent-gradient: linear-gradient(135deg, #7C3AED, #3B82F6);
  --accent-gradient-wide: linear-gradient(135deg, #7C3AED, #3B82F6, #06B6D4);
  
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-danger: #EF4444;
  --color-info: #3B82F6;
  
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #4B5563;
  
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);
  
  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
  --glass-blur: blur(20px);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.15);
  
  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

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

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

/* ─── Glass Card ───────────────────────────────────────────── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-glow);
}

/* ─── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(124, 58, 237, 0.45);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: var(--glass-border);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
}

.btn-outline {
  background: transparent;
  color: var(--accent-violet);
  border: 2px solid var(--accent-violet);
}

.btn-outline:hover {
  background: var(--accent-violet);
  color: white;
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ─── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--color-success); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--color-danger); }
.badge-info { background: rgba(59, 130, 246, 0.15); color: var(--color-info); }
.badge-violet { background: rgba(124, 58, 237, 0.15); color: var(--accent-violet); }

/* ─── Progress Bars ────────────────────────────────────────── */
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-bar__fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.progress-bar__fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ─── Score Circle ─────────────────────────────────────────── */
.score-circle {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-circle svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-circle__bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 8;
}

.score-circle__fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 2s cubic-bezier(0.22, 1, 0.36, 1);
}

.score-circle__value {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  z-index: 1;
}

.score-circle__label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  position: absolute;
  bottom: 15%;
}

/* ─── Score Circle Sizes ───────────────────────────────────── */
.score-circle--sm {
  width: 100px;
  height: 100px;
}

.score-circle--sm .score-circle__value {
  font-size: 1.5rem;
}

.score-circle--sm .score-circle__label {
  font-size: 0.65rem;
  bottom: 10%;
}

.score-circle--lg {
  width: 260px;
  height: 260px;
}

.score-circle--lg .score-circle__value {
  font-size: 4rem;
}

/* ─── Rating Colors ────────────────────────────────────────── */
.rating-excellent { --rating-color: var(--color-success); }
.rating-good { --rating-color: var(--accent-blue); }
.rating-average { --rating-color: var(--color-warning); }
.rating-poor { --rating-color: var(--color-danger); }

/* ─── Container ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container--narrow {
  max-width: 800px;
}

/* ─── Spinner ──────────────────────────────────────────────── */
.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-violet);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Background Effects ───────────────────────────────────── */
.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

.bg-glow--violet {
  background: var(--accent-violet);
  top: -200px;
  right: -200px;
}

.bg-glow--blue {
  background: var(--accent-blue);
  bottom: -200px;
  left: -200px;
}

/* ─── Animations ───────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes countUp {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
}

/* ─── Stagger delays ──────────────────────────────────────── */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

/* ─── Print Styles ─────────────────────────────────────────── */
@media print {
  body {
    background: white !important;
    color: #1a1a1a !important;
  }
  
  .glass-card {
    background: #f5f5f5 !important;
    border: 1px solid #ddd !important;
    backdrop-filter: none !important;
  }
  
  .bg-glow { display: none !important; }
  .no-print { display: none !important; }
  
  .text-gradient {
    -webkit-text-fill-color: #7C3AED !important;
  }
}

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  .container {
    padding: 0 var(--space-md);
  }
  
  .glass-card {
    padding: var(--space-lg);
  }
  
  .score-circle--lg {
    width: 200px;
    height: 200px;
  }
  
  .score-circle--lg .score-circle__value {
    font-size: 3rem;
  }
}
