:root {
  --brand-primary: #0f172a;
  --brand-accent: #2563eb;
  --brand-highlight: #e0f2ff;
  --bg-login: #0a0e1a;
  --panel-bg: rgba(255, 255, 255, 0.95);
  --panel-border: rgba(37, 99, 235, 0.3);
  --text-muted: #64748b;
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-tertiary: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

body {
  background:
    radial-gradient(circle at 15% 20%, rgba(102, 126, 234, 0.25), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(245, 87, 108, 0.25), transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(79, 172, 254, 0.15), transparent 50%),
    linear-gradient(180deg, #0a0e1a 0%, #1a1f35 100%);
  min-height: 100vh;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #0f172a;
  position: relative;
  overflow-x: hidden;
}

/* Animated background particles */
body::before {
  content: '';
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 50px 50px, 80px 80px;
  background-position: 0 0, 40px 40px;
  pointer-events: none;
  animation: particleFloat 20s linear infinite;
}

@keyframes particleFloat {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50px);
  }
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  z-index: 1;
}

.auth-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border-radius: 32px;
  border: 1px solid var(--panel-border);
  box-shadow:
    0 30px 60px rgba(15, 23, 42, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 50px 100px -20px rgba(37, 99, 235, 0.2);
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  overflow: hidden;
  position: relative;
  animation: panelFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes panelFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg,
    #667eea 0%,
    #764ba2 25%,
    #f093fb 50%,
    #f5576c 75%,
    #4facfe 100%);
  background-size: 200% 100%;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.auth-panel__content {
  padding: 3rem 2.5rem;
  position: relative;
  animation: contentSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

@keyframes contentSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.auth-panel__aside {
  background:
    linear-gradient(135deg,
      rgba(102, 126, 234, 0.95) 0%,
      rgba(118, 75, 162, 0.95) 50%,
      rgba(37, 99, 235, 0.95) 100%);
  color: #fff;
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
  animation: asideSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

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

.auth-panel__aside::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  animation: patternMove 30s linear infinite;
}

@keyframes patternMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(30px, 30px);
  }
}

.auth-panel__aside::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.1), transparent);
  pointer-events: none;
}

.auth-panel__aside p {
  color: rgba(255, 255, 255, 0.82);
}

.auth-panel__aside .stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-panel__aside .stat-card {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
}

.auth-panel__aside .stat-card {
  padding: 1rem;
  border-radius: 14px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-panel__aside .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.3);
}

.auth-panel__aside .stat-card .stat-label {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.8);
}

.auth-panel__aside .stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.1rem;
}

.auth-panel__aside .stat-card .stat-meta {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

.form-control {
  border-radius: 16px;
  border: 2px solid rgba(15, 23, 42, 0.12);
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.form-control:hover {
  border-color: rgba(37, 99, 235, 0.3);
  background: #ffffff;
}

.form-control:focus {
  border-color: var(--brand-accent);
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.12),
    0 8px 20px rgba(37, 99, 235, 0.15);
  transform: translateY(-2px);
}

.form-control::placeholder {
  color: rgba(100, 116, 139, 0.5);
  font-weight: 400;
}

.form-label {
  font-weight: 600;
  color: var(--brand-primary);
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
}

.btn-primary {
  border-radius: 14px;
  padding: 1rem 2rem;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  box-shadow:
    0 12px 30px rgba(102, 126, 234, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow:
    0 16px 40px rgba(102, 126, 234, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

.btn-primary:hover::before {
  left: 100%;
}

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

.btn-outline-primary {
  border-radius: 14px;
  padding: 1rem 2rem;
  border: 2px solid rgba(37, 99, 235, 0.3);
  color: var(--brand-accent);
  font-weight: 600;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline-primary:hover {
  border-color: var(--brand-accent);
  background: rgba(37, 99, 235, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}

.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 3s ease infinite;
  font-weight: 800;
}

@keyframes gradientFlow {
  0%, 100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

.badge-soft {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: linear-gradient(135deg,
    rgba(102, 126, 234, 0.15),
    rgba(118, 75, 162, 0.15));
  border: 1.5px solid rgba(102, 126, 234, 0.3);
  color: #667eea;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(102, 126, 234, 0);
  }
}

.badge-soft.info::before {
  content: '🔒';
  font-size: 0.9rem;
}

.auth-highlights {
  background: linear-gradient(135deg,
    rgba(102, 126, 234, 0.05),
    rgba(118, 75, 162, 0.05));
  border-radius: 18px;
  border: 1.5px solid rgba(102, 126, 234, 0.15);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.auth-highlights::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent);
  animation: highlightShine 3s infinite;
}

@keyframes highlightShine {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

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

.highlight-dot {
  width: 10px;
  height: 10px;
  border-radius: 100%;
  display: inline-block;
  box-shadow: 0 0 10px currentColor;
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
}

/* Logo/Brand Section */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.auth-brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow:
    0 10px 30px rgba(102, 126, 234, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Feature Cards */
.feature-card {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(102, 126, 234, 0.5);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.25);
}

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

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
  animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@media (max-width: 767px) {
  .auth-panel {
    grid-template-columns: 1fr;
  }

  .auth-panel__content,
  .auth-panel__aside {
    padding: 2rem;
  }

  .auth-panel__aside .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
