
/* ===================================
   Login Page
   =================================== */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-box {
  background-color: white;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 400px;
}


.cortex-btn {
  position: relative;
  background: linear-gradient(135deg, var(--cortex-cyan), var(--cortex-blue));
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: var(--cortex-font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  text-transform: uppercase;
}

.cortex-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(175, 0, 0, 0.4), 0 4px 15px rgba(0, 0, 0, 0.3);
  color: #fff;
}

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

.cortex-btn .btn-glow {
  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;
}

.cortex-btn:hover .btn-glow {
  left: 100%;
}

.error-icon {
  font-size: 1rem;
}

.cortex-index-spinner {
  position: fixed;
  inset: 0;
  background: rgba(13, 22, 27, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* ===================================
   Auth -- Wrapper & Card
   =================================== */
.login-page .login-wrapper {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
}

.login-page .login-box {
  background: var(--cortex-surface);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--cortex-border);
  border-radius: var(--cortex-radius);
  padding: 2.5rem 2rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow:
          0 8px 32px rgba(0, 0, 0, 0.4),
          inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: cardAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes cardAppear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================
   Auth -- Brand
   =================================== */
.cortex-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.brand-icon {
  width: 140px;
  height: 140px;
  margin: -4vh auto -4vh;
  background-image: url('/2card-transparent.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 0 25px rgba(175, 0, 0, 0.8))
          drop-shadow(0 0 70px rgba(175, 0, 0, 0.5));
  animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% {
    filter: drop-shadow(0 0 25px rgba(175, 0, 0, 0.8))
            drop-shadow(0 0 70px rgba(175, 0, 0, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 40px rgba(175, 0, 0, 1))
            drop-shadow(0 0 120px rgba(175, 0, 0, 0.8));
  }
}

.brand-name {
  font-family: var(--cortex-font-brand);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  background: linear-gradient(135deg, var(--cortex-cyan), var(--cortex-blue), var(--cortex-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.brand-tagline {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--cortex-text-muted);
  margin: 0;
}

/* ===================================
   Auth -- Form
   =================================== */
.login-page .form-holder {
  margin-bottom: 1.25rem;
}

.login-page .form-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cortex-text-muted);
  margin-bottom: 0.4rem;
}

.login-page .cortex-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--cortex-text);
  padding: 0.7rem 1rem 0.7rem 2.75rem;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.login-page .cortex-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.login-page .cortex-input:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--cortex-cyan);
  box-shadow: 0 0 0 3px rgba(175, 0, 0, 0.1), var(--cortex-glow);
  outline: none;
  color: #fff;
}

/* ===================================
   Auth -- Error Message
   =================================== */
.login-page .error-message {
  background: rgba(255, 140, 66, 0.1);
  border: 1px solid rgba(255, 140, 66, 0.25);
  border-radius: 8px;
  color: var(--cortex-danger);
  padding: 0.6rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* ===================================
   Auth -- Validation
   =================================== */
.login-page .text-danger {
  color: var(--cortex-danger) !important;
  font-size: 0.8rem;
  margin-top: 0.3rem;
  display: block;
}

/* ===================================
   Auth -- Responsive
   =================================== */
@media (max-width: 480px) {
  .login-page .login-box {
    margin: 1rem;
    padding: 2rem 1.5rem;
  }
  .brand-name {
    font-size: 1.5rem;
  }
}

/* ===================================
   Auth -- Tier Selection
   =================================== */
.login-page .login-box.tier-selection-box {
  max-width: 780px;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tier-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.tier-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(175, 0, 0, 0.25);
}

.tier-card.selected {
  border-color: var(--cortex-cyan);
  background: rgba(175, 0, 0, 0.06);
  box-shadow: 0 0 20px rgba(175, 0, 0, 0.2), 0 0 40px rgba(175, 0, 0, 0.08);
}

.tier-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  background: linear-gradient(135deg, var(--cortex-cyan), var(--cortex-blue));
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

.tier-badge-max {
  background: linear-gradient(135deg, var(--cortex-purple), var(--cortex-blue));
}

.tier-name {
  font-family: var(--cortex-font-brand);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cortex-text);
  margin-bottom: 0.75rem;
}

.tier-card.selected .tier-name {
  color: var(--cortex-cyan);
}

.tier-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  flex: 1;
}

.tier-features li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  color: var(--cortex-text-muted);
  line-height: 1.4;
}

.tier-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cortex-text-muted);
  transition: background 0.3s;
}

.tier-card.selected .tier-features li::before {
  background: var(--cortex-cyan);
}

.tier-price {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.75rem;
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.tier-amount {
  font-family: var(--cortex-font-brand);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cortex-text);
}

.tier-card.selected .tier-amount {
  color: var(--cortex-cyan);
}

.tier-period {
  font-size: 0.75rem;
  color: var(--cortex-text-muted);
}

@media (max-width: 600px) {
  .tier-grid {
    grid-template-columns: 1fr;
  }

  .login-page .login-box.tier-selection-box {
    max-width: 420px;
  }
}

/* ===================================
   Auth -- Secondary links & helper copy
   =================================== */
.form-links {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
}

.form-links a {
  color: #8a8d93;
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s ease;
}

.form-links a:hover,
.form-links a:focus {
  color: #b4b7bd;
  text-decoration: underline;
}

.form-links-register {
  display: block;
  margin-top: 0.75rem;
}

.form-hint {
  color: #6f7279;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.info-message {
  background: rgba(175, 0, 0, 0.08);
  border: 1px solid rgba(175, 0, 0, 0.25);
  color: var(--cortex-text);
  padding: 0.6rem 0.9rem;
  border-radius: 0.4rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
