﻿/* â•â•â•â•â•â•â•â•â•â•â•â•â•â• AUTHENTICATION PAGE â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
#login-page {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #02040a;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
#login-page.out {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);
}
body.light-mode #login-page {
  background: #f1f5f9;
}

.auth-card {
  width: 460px;
  max-width: 90%;
  padding: 40px;
  border-radius: var(--radius-lg);
  position: relative;
  z-index: 10;
  background: rgba(10, 16, 32, 0.8);
  border: 1px solid rgba(0, 245, 255, 0.2);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 245, 255, 0.05);
  animation: authFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
body.light-mode .auth-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 102, 255, 0.15);
  box-shadow: 0 24px 64px rgba(148, 163, 184, 0.15), 0 0 40px rgba(0, 102, 255, 0.02);
}

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

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  margin-bottom: 16px;
}
.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Auth Tabs */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(2, 4, 10, 0.6);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
body.light-mode .auth-tabs {
  background: rgba(226, 232, 240, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.auth-tab {
  padding: 10px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.auth-tab.active {
  background: var(--panel-bg-solid);
  color: var(--neon-cyan);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 245, 255, 0.15);
}
body.light-mode .auth-tab.active {
  box-shadow: 0 4px 12px rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(0, 102, 255, 0.1);
}

/* Form Styles */
.auth-form-container {
  display: none;
}
.auth-form-container.active {
  display: block;
}

.form-group {
  margin-bottom: 18px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--neon-cyan);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.input-wrapper {
  position: relative;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(2, 4, 10, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  direction: ltr;
  text-align: left;
}
body.light-mode .input-wrapper input {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text-primary);
}

.input-wrapper input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.15);
  background: rgba(2, 4, 10, 0.9);
}
body.light-mode .input-wrapper input:focus {
  background: #ffffff;
  box-shadow: 0 0 10px rgba(0, 102, 255, 0.1);
}
.input-wrapper input:-webkit-autofill,
.input-wrapper input:-webkit-autofill:hover,
.input-wrapper input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0px 1000px rgba(2, 4, 10, 0.9) inset;
  transition: background-color 5000s ease-in-out 0s;
}
body.light-mode .input-wrapper input:-webkit-autofill,
body.light-mode .input-wrapper input:-webkit-autofill:hover,
body.light-mode .input-wrapper input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0px 1000px #ffffff inset;
}

.auth-btn {
  width: 100%;
  padding: 14px;
  background: var(--grad-cyan);
  color: #fff;
  border: none;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-neon-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 0 24px rgba(0, 245, 255, 0.4);
}
body.light-mode .auth-btn:hover {
  box-shadow: 0 0 24px rgba(0, 136, 255, 0.3);
}

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

.auth-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: none;
}
body.light-mode .btn-loader {
  border-color: rgba(0, 0, 0, 0.15);
  border-top-color: var(--neon-cyan);
}

.auth-btn.loading .btn-loader {
  display: block;
}

.auth-error {
  min-height: 20px;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--neon-pink);
  text-align: center;
  animation: shake 0.3s ease-in-out;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
