/* ================================================
   auth.css — GCA 2026
   Tela de Login Premium
   ================================================ */

/* ===== AUTH SCREEN ===== */
#auth-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#auth-screen.fade-out {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}

#auth-screen.hidden {
  display: none !important;
}

/* Card */
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 36px 28px 32px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  animation: authCardIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

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

/* Logo */
.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo-icon {
  font-size: 56px;
  line-height: 1;
  display: block;
  margin-bottom: 14px;
  position: relative;
}

.auth-logo-icon::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,201,255,0.12) 0%, transparent 70%);
  animation: authGlow 3s ease infinite;
}

@keyframes authGlow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%       { transform: scale(1.1); opacity: 1; }
}

.auth-logo h1 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -1px;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.auth-logo p {
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.auth-logo-city {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text3);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: rgba(255,255,255,0.04);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.07);
}

/* Google Button */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: #fff;
  color: #3c4043;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  margin-bottom: 20px;
}

.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transform: translateY(-1px);
}

.btn-google:active {
  transform: scale(0.98);
}

.btn-google svg {
  flex-shrink: 0;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--text3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--card-border);
}

/* Form */
.auth-form-group {
  margin-bottom: 12px;
  position: relative;
}

.auth-form-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: 6px;
}

.auth-form-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form-input:focus {
  border-color: rgba(0,201,255,0.5);
  box-shadow: 0 0 0 3px rgba(0,201,255,0.08);
}

.auth-form-input::placeholder {
  color: var(--text3);
}

/* Submit Button */
.btn-auth-submit {
  width: 100%;
  padding: 13px;
  background: var(--grad-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-top: 20px;
  box-shadow: var(--shadow-glow);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
}

.btn-auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(0,201,255,0.35);
}

.btn-auth-submit:active {
  transform: scale(0.98);
}

.btn-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Loading Spinner */
.auth-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Error Message */
.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: #f87171;
  margin-top: 14px;
  line-height: 1.5;
  display: none;
}

.auth-error.visible {
  display: block;
  animation: authErrIn 0.2s ease;
}

@keyframes authErrIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Footer Note */
.auth-footer-note {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
  font-size: 11px;
  color: var(--text3);
  line-height: 1.5;
}

/* ===== HEADER USER AVATAR ===== */
.user-avatar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-full);
  padding: 4px 10px 4px 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.user-avatar-btn:hover,
.user-avatar-btn:active {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.07);
}

.user-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg3);
  flex-shrink: 0;
}

.user-avatar-initials {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.user-avatar-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-avatar-logout {
  font-size: 10px;
  color: var(--red);
  font-weight: 600;
}
