:root {
  --header-bg: #111723;
  --header-border: #202839;
  --text-main: #f2f6ff;
  --text-muted: #c6cedf;
  --control-bg: #0d131f;
  --control-border: #2a3244;
  --accent: #f3bf2c;
  --success: #00b67a;
  --error: #ff4757;
  --auth-bg: #f8f9fb;
}

.auth-page {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 22px;
  background: linear-gradient(135deg, #f8f9fb 0%, #e8ecf4 100%);
}

.auth-container {
  width: 100%;
  max-width: 480px;
}

.auth-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(17, 29, 55, 0.12);
  padding: 40px 32px;
  border: 1px solid #e3e6ed;
}

.auth-redirect-notice {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
}

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

.auth-logo {
  width: 120px;
  height: auto;
  margin-bottom: 16px;
}

.auth-header h1 {
  margin: 0 0 8px;
  color: #1f2736;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.auth-header p {
  margin: 0;
  color: #707a8f;
  font-size: 16px;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  background: #f5f6fa;
  padding: 4px;
  border-radius: 8px;
}

.auth-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: #707a8f;
  font-size: 15px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab.active {
  background: #ffffff;
  color: #1f2736;
  box-shadow: 0 2px 8px rgba(17, 29, 55, 0.08);
}

.auth-tab:hover:not(.active) {
  color: #434b5d;
}

.auth-form {
  display: block;
}

.auth-form.hidden {
  display: none;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: #434b5d;
  font-size: 14px;
  font-weight: 600;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2736;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
  outline: none;
}

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(243, 191, 44, 0.1);
}

.form-group input::placeholder {
  color: #9ca3af;
}

.form-group input.error {
  border-color: var(--error);
}

.form-group input.error:focus {
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 38px;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: #707a8f;
}

.eye-icon {
  font-size: 16px;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #707a8f;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  margin: 1px auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath stroke='%231d2432' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
}

.forgot-password {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.forgot-password:hover {
  color: #e5a626;
}

.auth-submit {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #1d2432;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 24px;
}

.auth-submit:hover {
  background: #e5a626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(243, 191, 44, 0.3);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-divider {
  position: relative;
  text-align: center;
  margin: 24px 0;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e3e6ed;
}

.auth-divider span {
  background: #ffffff;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 600;
  padding: 0 16px;
  position: relative;
}

.social-auth {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.google-signin-container {
  width: 100%;
  display: flex;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #434b5d;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.social-btn:hover {
  background: #f8f9fb;
  border-color: #9ca3af;
  transform: translateY(-1px);
}

.social-icon {
  font-size: 18px;
}

.social-btn.google:hover {
  border-color: #4285f4;
  color: #4285f4;
}

.social-btn.facebook:hover {
  border-color: #1877f2;
  color: #1877f2;
}

.download-badges {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.store-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #000000;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid #333;
  transition: all 0.2s ease;
}

.store-badge:hover {
  background: #1a1a1a;
  border-color: #555;
  transform: translateY(-2px);
}

.store-badge svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.store-badge span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.store-badge span small {
  font-size: 11px;
  color: #999;
  font-weight: 400;
  line-height: 1.2;
}

.store-badge span strong {
  font-size: 14px;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.2;
}

.auth-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #e3e6ed;
}

.auth-footer p {
  margin: 0;
  color: #707a8f;
  font-size: 14px;
}

.auth-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.auth-footer a:hover {
  color: #e5a626;
}

.error-message {
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.2);
  color: var(--error);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}

.success-message {
  background: rgba(0, 182, 122, 0.1);
  border: 1px solid rgba(0, 182, 122, 0.2);
  color: var(--success);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}

.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 760px) {
  .auth-page {
    padding: 20px var(--page-pad-x, 16px);
    min-height: calc(100vh - 150px);
  }

  .auth-card {
    padding: 32px 24px;
  }

  .auth-header h1 {
    font-size: 24px;
  }

  .auth-header p {
    font-size: 14px;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
  }

  .social-auth {
    gap: 10px;
  }

  .social-btn {
    padding: 10px 16px;
    font-size: 14px;
  }

  .download-badges {
    gap: 10px;
  }

  .store-badge {
    padding: 8px 12px;
    gap: 8px;
  }

  .store-badge svg {
    width: 24px;
    height: 24px;
  }

  .store-badge span small {
    font-size: 10px;
  }

  .store-badge span strong {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .auth-page {
    padding: 18px var(--page-pad-x-sm, 12px);
  }

  .auth-card {
    padding: 24px 20px;
  }

  .auth-logo {
    width: 100px;
  }

  .auth-header h1 {
    font-size: 22px;
  }

  .form-group input {
    padding: 10px 14px;
    font-size: 14px;
  }

  .auth-submit {
    padding: 12px 16px;
    font-size: 15px;
  }

  .download-badges {
    flex-direction: column;
    gap: 8px;
  }

  .store-badge {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
  }
