/* ============================================================
   CurriculoOnline – Design System Global
   ============================================================ */

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

/* ── Custom Properties ───────────────────────────────────── */
:root {
  /* Brand Colors */
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-300: #a5b4fc;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-800: #3730a3;
  --brand-900: #312e81;

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

  /* Neutral Dark */
  --dark-900: #050510;
  --dark-800: #0a0a1e;
  --dark-750: #0f0f2d;
  --dark-700: #13132a;
  --dark-600: #1a1a3e;
  --dark-500: #23234f;
  --dark-400: #2e2e6b;
  --dark-300: #3d3d82;

  /* Neutral Light */
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Semantic */
  --success: #10b981;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    #06b6d4;

  /* Backgrounds */
  --bg-primary:   var(--dark-800);
  --bg-secondary: var(--dark-700);
  --bg-card:      rgba(19, 19, 42, 0.8);
  --bg-glass:     rgba(255, 255, 255, 0.04);
  --bg-glass-hover: rgba(255, 255, 255, 0.08);

  /* Text */
  --text-primary:   #ffffff;
  --text-secondary: rgba(255,255,255,0.7);
  --text-muted:     rgba(255,255,255,0.4);
  --text-disabled:  rgba(255,255,255,0.25);

  /* Borders */
  --border-subtle: rgba(255,255,255,0.06);
  --border-soft:   rgba(255,255,255,0.1);
  --border-medium: rgba(255,255,255,0.18);
  --border-brand:  rgba(99,102,241,0.5);

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.5);
  --shadow-xl:   0 20px 60px rgba(0,0,0,0.6);
  --shadow-brand: 0 0 40px rgba(99,102,241,0.3);
  --shadow-glow:  0 0 80px rgba(99,102,241,0.15);

  /* Gradients */
  --gradient-brand:  linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-dark:   linear-gradient(180deg, var(--dark-800) 0%, var(--dark-900) 100%);
  --gradient-card:   linear-gradient(135deg, rgba(99,102,241,0.1) 0%, rgba(139,92,246,0.05) 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);

  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', 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;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;
  --text-7xl:  4.5rem;

  /* Transitions */
  --transition-fast:   150ms cubic-bezier(0.4,0,0.2,1);
  --transition-normal: 250ms cubic-bezier(0.4,0,0.2,1);
  --transition-slow:   400ms cubic-bezier(0.4,0,0.2,1);
  --transition-spring: 400ms cubic-bezier(0.34,1.56,0.64,1);

  /* Z-index */
  --z-base:    1;
  --z-dropdown: 100;
  --z-sticky:  200;
  --z-modal:   300;
  --z-toast:   400;
  --z-top:     500;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

h1 { font-size: clamp(var(--text-4xl), 5vw, var(--text-7xl)); }
h2 { font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl)); }
h3 { font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl)); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p { color: var(--text-secondary); line-height: 1.7; }

a {
  color: var(--brand-400);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--brand-300); }

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

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--dark-700); }
::-webkit-scrollbar-thumb { background: var(--dark-400); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--brand-500); }

/* ── Selection ───────────────────────────────────────────── */
::selection { background: rgba(99,102,241,0.3); color: #fff; }

/* ── Layout Utilities ────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-sm { max-width: 640px; }
.container-md { max-width: 768px; }
.container-lg { max-width: 1024px; }

.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center{ align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid { display: grid; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.text-center { text-align: center; }
.relative { position: relative; }
.absolute { position: absolute; }
.overflow-hidden { overflow: hidden; }

/* ── Glass Card ──────────────────────────────────────────── */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  transition: all var(--transition-normal);
}
.glass-card:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border: none;
  outline: none;
  text-decoration: none;
  transition: all var(--transition-normal);
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition-fast);
}
.btn:hover::after { background: rgba(255,255,255,0.08); }
.btn:active::after { background: rgba(0,0,0,0.1); }

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,0.4);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(99,102,241,0.5);
  color: #fff;
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

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

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-sm { padding: 0.5rem 1rem; font-size: var(--text-xs); border-radius: var(--radius-sm); }
.btn-lg { padding: 1rem 2rem; font-size: var(--text-base); border-radius: var(--radius-lg); }
.btn-xl { padding: 1.125rem 2.5rem; font-size: var(--text-lg); border-radius: var(--radius-lg); }

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}
.btn-icon-sm { width: 32px; height: 32px; border-radius: var(--radius-sm); }

/* ── Badge ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.025em;
}
.badge-brand { background: rgba(99,102,241,0.2); color: var(--brand-400); border: 1px solid var(--border-brand); }
.badge-success { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.3); }
.badge-warning { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }
.badge-danger  { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }

/* ── Form Inputs ─────────────────────────────────────────── */
.form-group {
  position: relative;
  margin-bottom: var(--space-5);
}

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

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: 1.5;
  transition: all var(--transition-normal);
  outline: none;
  -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  background: rgba(255,255,255,0.08);
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label { color: var(--brand-400); }

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 2.5rem;
}
.form-select option { background: var(--dark-700); color: var(--text-primary); }

.form-textarea { resize: vertical; min-height: 100px; }

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
}
.form-error {
  font-size: var(--text-xs);
  color: var(--danger);
  margin-top: var(--space-1);
  display: flex;
  align-items: center;
  gap: 4px;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.input-group .form-input { padding-left: 2.75rem; }
.input-group .input-icon {
  position: absolute;
  left: 0.875rem;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}

/* ── Checkbox & Radio ────────────────────────────────────── */
.checkbox-group, .radio-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
}
.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-500);
  cursor: pointer;
}

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* ── Toast Notification ──────────────────────────────────── */
.toast-container {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--dark-600);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  font-size: var(--text-sm);
  font-weight: 500;
  pointer-events: all;
  animation: toastIn 0.4s var(--transition-spring) forwards;
  min-width: 280px;
  max-width: 400px;
}

.toast.hide { animation: toastOut 0.3s ease forwards; }
.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--danger); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-info    { border-left: 3px solid var(--info); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%) scale(0.9); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(100%) scale(0.9); }
}

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,5,16,0.8);
  backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  background: var(--dark-700);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95) translateY(20px);
  transition: all var(--transition-spring);
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

/* ── Progress Bar ────────────────────────────────────────── */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--dark-400);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}

/* ── Skeleton Loader ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--dark-500) 25%, var(--dark-400) 50%, var(--dark-500) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(99,102,241,0.3); }
  50%       { box-shadow: 0 0 40px rgba(99,102,241,0.6); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animate-fadein { animation: fadeIn 0.5s var(--transition-spring) both; }
.animate-float  { animation: float 4s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
.animate-spin   { animation: spin 1s linear infinite; }

/* 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; }

/* ── Gradient Text ───────────────────────────────────────── */
.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Noise Texture Overlay ───────────────────────────────── */
.noise-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 var(--space-4); }
  .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}
