/* ══════════════════════════════════════════════
   SCA Online — Components
   ══════════════════════════════════════════════ */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-lg);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-base);
  transition: all var(--duration-base) var(--ease-smooth);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-btn);
  color: white;
  box-shadow: var(--shadow-glow-violet);
}
.btn-primary:hover {
  background: var(--gradient-btn-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.5);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
}
.btn-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent-violet);
  transform: translateY(-2px);
}

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

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--fs-lg);
  border-radius: var(--radius-xl);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-sm);
}

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

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  backdrop-filter: blur(16px);
  transition: all var(--duration-base) var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-hero);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-smooth);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow-violet);
}
.card:hover::before { opacity: 1; }

.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Navigation ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(11, 11, 26, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: var(--z-sticky);
  transition: all var(--duration-base) var(--ease-smooth);
}

.navbar.scrolled {
  background: rgba(11, 11, 26, 0.95);
  box-shadow: var(--shadow-md);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--text-primary);
}

.nav-logo .logo-icon {
  width: 40px; height: 40px;
  background: var(--gradient-btn);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-lg);
}

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

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  position: relative;
  padding: var(--space-2) 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--gradient-btn);
  transition: width var(--duration-base) var(--ease-smooth);
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--accent-violet-light); }
.nav-links a.active::after { width: 100%; }

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  cursor: pointer;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--duration-base) var(--ease-smooth);
}

/* ── Forms ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.form-label {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input {
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--fs-base);
  transition: all var(--duration-fast) var(--ease-smooth);
}
.form-input:focus {
  border-color: var(--accent-violet);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
  background: rgba(255, 255, 255, 0.08);
}
.form-input::placeholder { color: var(--text-muted); }

.form-select {
  padding: var(--space-3) var(--space-4);
  background-color: #1E1722;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394A3B8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: var(--space-10);
  cursor: pointer;
}

.form-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(212, 135, 143, 0.15);
}

.form-select option {
  background-color: #1E1722;
  color: var(--text-primary);
  padding: var(--space-3) var(--space-4);
}

.form-select option:hover,
.form-select option:checked {
  background-color: var(--accent-secondary);
  color: white;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-violet { background: rgba(124,58,237,0.15); color: var(--accent-violet-light); }
.badge-cyan { background: rgba(6,182,212,0.15); color: var(--accent-cyan-light); }
.badge-rose { background: rgba(236,72,153,0.15); color: var(--accent-rose-light); }
.badge-green { background: rgba(16,185,129,0.15); color: var(--accent-green); }
.badge-amber { background: rgba(245,158,11,0.15); color: var(--accent-amber); }

/* ── Progress Bar ── */
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--gradient-btn);
  border-radius: var(--radius-full);
  transition: width 1s var(--ease-smooth);
}

/* ── Avatar ── */
.avatar {
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  background: var(--gradient-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--fs-sm);
  color: white;
  flex-shrink: 0;
}
.avatar-lg { width: 56px; height: 56px; font-size: var(--fs-lg); }
.avatar-xl { width: 80px; height: 80px; font-size: var(--fs-2xl); }

/* ── Tags ── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}

/* ── Modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-base) var(--ease-smooth);
}
.modal-backdrop.active { opacity: 1; visibility: visible; }

.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  max-width: 520px;
  width: 90%;
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-base) var(--ease-smooth);
}
.modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

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

.toast {
  padding: var(--space-4) var(--space-6);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  animation: slideInRight 0.4s var(--ease-smooth);
  min-width: 300px;
}

/* ── Stat Card ── */
.stat-card {
  text-align: center;
  padding: var(--space-6);
}
.stat-card .stat-value {
  font-family: var(--font-heading);
  font-size: var(--fs-4xl);
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-2);
}
.stat-card .stat-label {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Footer ── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

.footer-brand p {
  margin-top: var(--space-4);
  font-size: var(--fs-sm);
}

.footer-col h4 {
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  padding: var(--space-1) 0;
}
.footer-col a:hover { color: var(--accent-violet-light); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
}
.footer-social a {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-smooth);
}
.footer-social a:hover {
  background: var(--accent-violet);
  color: white;
  transform: translateY(-2px);
}

/* ── Responsive Nav ── */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(11, 11, 26, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--space-8) var(--space-6);
    gap: var(--space-4);
    transform: translateY(-110%);
    transition: transform var(--duration-base) var(--ease-smooth);
    border-bottom: 1px solid var(--border-subtle);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: flex; }
  .nav-actions .btn { display: none; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
  .footer-bottom { flex-direction: column; gap: var(--space-4); }
}
