:root {
  --primary: #0369a1;
  --primary-light: #0ea5e9;
  --primary-dark: #075985;
  --accent: #06b6d4;
  --bg-main: #f0f9ff;
  --bg-card: #ffffff;
  --text-primary: #0c4a6e;
  --text-secondary: #64748b;
  --border-color: #bae6fd;
  --shadow-color: rgba(3, 105, 161, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg-main);
  min-height: 100vh;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-text {
  font-family: "Space Grotesk", sans-serif;
}

/* Background Animation Container */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* DNA Helix Animation */
.dna-strand {
  position: absolute;
  width: 100%;
  height: 200%;
  top: -50%;
}

.dna-strand-left {
  left: -5%;
  animation: dnaFloat 25s linear infinite;
}

.dna-strand-right {
  right: -5%;
  animation: dnaFloat 25s linear infinite reverse;
  animation-delay: -12s;
}

@keyframes dnaFloat {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  100% {
    transform: translateY(-50%) rotate(0deg);
  }
}

.dna-node {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  opacity: 0.3;
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.4);
}

.dna-connector {
  position: absolute;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary-light),
    transparent
  );
  opacity: 0.15;
  transform-origin: center;
}

/* Floating Cells */
.cell {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(14, 165, 233, 0.2);
  background: radial-gradient(
    circle at 30% 30%,
    rgba(14, 165, 233, 0.08),
    transparent
  );
  animation: cellFloat 20s ease-in-out infinite;
}

.cell::before {
  content: "";
  position: absolute;
  top: 20%;
  left: 20%;
  width: 30%;
  height: 30%;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.15);
}

@keyframes cellFloat {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  25% {
    transform: translate(30px, -30px) rotate(90deg);
  }

  50% {
    transform: translate(-20px, -50px) rotate(180deg);
  }

  75% {
    transform: translate(20px, -20px) rotate(270deg);
  }
}

/* Grid Background */
.grid-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
      rgba(14, 165, 233, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(14, 165, 233, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Main Container */
.main-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* Login Card */
.login-card {
  background: var(--bg-card);
  border-radius: 24px;
  box-shadow: 0 4px 6px -1px var(--shadow-color),
    0 20px 50px -12px rgba(3, 105, 161, 0.15),
    0 0 0 1px rgba(14, 165, 233, 0.05);
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 440px;
  position: relative;
  overflow: hidden;
  animation: cardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--accent),
    var(--primary-light)
  );
}

/* Logo & Brand */
.brand-section {
  text-align: center;
  margin-bottom: 2.5rem;
}

.brand-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  /* background: linear-gradient(135deg, var(--primary), var(--accent)); */
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(3, 105, 161, 0.25);
  animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.brand-logo svg {
  width: 40px;
  height: 40px;
  color: white;
}

.brand-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.brand-tagline {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Form Styles */
.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.form-control {
  height: 52px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  background: var(--bg-main);
  color: var(--text-primary);
}

.form-control:focus {
  background: white;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
  outline: none;
}

.form-control::placeholder {
  color: #94a3b8;
}

.input-group-text {
  background: var(--bg-main);
  border: 2px solid var(--border-color);
  border-right: none;
  border-radius: 12px 0 0 12px;
  color: var(--text-secondary);
  padding: 0 1rem;
}

.input-group .form-control {
  border-left: none;
  border-radius: 0 12px 12px 0;
}

.input-group:focus-within .input-group-text {
  border-color: var(--primary-light);
  background: white;
}

/* Buttons */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  height: 52px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  color: white;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

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

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(3, 105, 161, 0.35);
}

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

.btn-primary-custom:active {
  transform: translateY(0);
}

.btn-link-custom {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  padding: 0.25rem 0;
  position: relative;
  transition: all 0.2s ease;
}

.btn-link-custom::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.btn-link-custom:hover {
  color: var(--primary-dark);
}

.btn-link-custom:hover::after {
  width: 100%;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--border-color),
    transparent
  );
}

.divider span {
  padding: 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Form Check */
.form-check-input {
  width: 1.15em;
  height: 1.15em;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
  border-color: var(--primary-light);
}

.form-check-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Modal Styles */
.modal-content {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(3, 105, 161, 0.25);
}

.modal-header {
  background: linear-gradient(135deg, var(--bg-main), white);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 2rem;
}

.modal-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.35rem;
}

.btn-close:focus {
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 1.25rem 2rem;
  background: var(--bg-main);
}

/* Footer Links */
.footer-links {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.footer-links p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

/* Password Toggle */
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: var(--primary);
}

.password-wrapper {
  position: relative;
}

.password-wrapper .form-control {
  padding-right: 48px;
}

/* Alert Styles */
.alert-info-custom {
  background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.alert-info-custom svg {
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 480px) {
  .login-card {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }

  .brand-name {
    font-size: 1.5rem;
  }

  .brand-logo {
    width: 60px;
    height: 60px;
  }

  .modal-body {
    padding: 1.5rem;
  }
}

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

/* Focus Visible */
.btn:focus-visible,
.form-control:focus-visible,
.btn-link-custom:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}
