/* ============================================
   TAGTICO - Auth Page Styles
   Clean, premium, dark
   ============================================ */

/* --- Topbar --- */
.auth-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-logo .logo-img {
  height: 28px;
}

/* --- Main layout --- */
.auth-main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 40px;
  background: var(--black-deep);
}

/* --- Card --- */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--gray-dark);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

/* --- Views --- */
.auth-view {
  display: none;
}

.auth-view.active {
  display: block;
  animation: authFadeIn 0.35s ease;
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Back button --- */
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--gray-light);
  font-size: 0.85rem;
  font-family: var(--font-primary);
  cursor: pointer;
  margin-bottom: 24px;
  padding: 4px 0;
  transition: var(--transition);
}

.auth-back:hover {
  color: var(--white);
}

/* --- Header --- */
.auth-header {
  text-align: center;
  margin-bottom: 36px;
}

.auth-header h1 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.auth-header p {
  color: var(--gray-light);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* --- Selector options --- */
.auth-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-option-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.auth-option-login {
  background: var(--accent-gradient);
  color: var(--white);
}

.auth-option-login:hover {
  background: var(--accent-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(108, 92, 231, 0.35);
}

.auth-option-signup {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.auth-option-signup:hover {
  border-color: var(--accent-light);
  color: var(--accent-light);
  transform: translateY(-2px);
}

/* --- Form --- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-soft);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.auth-field input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.auth-field input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.auth-field input:focus {
  border-color: var(--accent);
  background: rgba(108, 92, 231, 0.06);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.auth-field input.invalid {
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.06);
}

.auth-field input.invalid:focus {
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

/* --- Password wrapper --- */
.auth-password-wrap {
  position: relative;
}

.auth-password-wrap input {
  padding-right: 48px;
}

.auth-toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-light);
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
  display: flex;
  align-items: center;
}

.auth-toggle-pw:hover {
  color: var(--white);
}

/* --- Error messages --- */
.auth-error {
  font-size: 0.78rem;
  color: #e74c3c;
  min-height: 0;
  opacity: 0;
  transition: var(--transition);
}

.auth-error.visible {
  min-height: 16px;
  opacity: 1;
}

/* --- Alert --- */
.auth-alert {
  display: none;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
}

.auth-alert.alert-error {
  display: block;
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
  color: #e74c3c;
}

.auth-alert.alert-success {
  display: block;
  background: rgba(0, 184, 148, 0.1);
  border: 1px solid rgba(0, 184, 148, 0.3);
  color: var(--success);
}

/* --- Submit button --- */
.auth-submit {
  width: 100%;
  padding: 15px;
  background: var(--accent-gradient);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.auth-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(108, 92, 231, 0.35);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- Switch link --- */
.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 0.88rem;
  color: var(--gray-light);
}

.auth-switch a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.auth-switch a:hover {
  color: var(--white);
}

/* --- Footer note --- */
.auth-footer-note {
  margin-top: 32px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.2);
  text-align: center;
}

/* --- Responsive --- */
@media (max-width: 520px) {
  .auth-card {
    padding: 36px 24px;
    border-radius: var(--radius-md);
  }

  .auth-header h1 {
    font-size: 1.3rem;
  }

  .auth-option-btn {
    padding: 14px 20px;
    font-size: 0.9rem;
  }
}
