/* ═══════════════════════════════════════════
   FUTUNET AUTH STYLES
   Login, Registro, Paneles — Modo Claro Premium
   Coincide con la paleta de main.css
   ═══════════════════════════════════════════ */

/* ─── Auth Page Layout ─── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at top left, rgba(10, 112, 162, 0.06), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(0, 194, 129, 0.04), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #f3f7fc 50%, #eaf2fb 100%);
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
  font-family: 'Outfit', sans-serif;
}

.auth-page::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -15%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(10, 112, 162, 0.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.auth-page::after {
  content: '';
  position: absolute;
  bottom: -25%;
  left: -10%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(0, 194, 129, 0.06), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ─── Auth Card ─── */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(10, 112, 162, 0.08);
  border-radius: 28px;
  padding: 44px 38px;
  position: relative;
  z-index: 1;
  box-shadow:
    0 32px 64px rgba(10, 112, 162, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  animation: authCardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

/* ─── Logo ─── */
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.auth-logo img {
  height: 42px;
  width: auto;
}

.auth-logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #0a101d;
  letter-spacing: -0.5px;
}

/* ─── Headings ─── */
.auth-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0a101d;
  margin: 0 0 6px;
  text-align: center;
  letter-spacing: -0.03em;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: #76889e;
  text-align: center;
  margin: 0 0 28px;
  line-height: 1.5;
}

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

.auth-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #394c60;
  margin-bottom: 7px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.auth-input {
  width: 100%;
  padding: 13px 16px;
  background: #f3f7fc;
  border: 1.5px solid #e5eef8;
  border-radius: 14px;
  color: #0a101d;
  font-size: 0.95rem;
  font-family: 'Outfit', sans-serif;
  transition: all 0.3s ease;
  outline: none;
  box-sizing: border-box;
}

.auth-input::placeholder {
  color: #a0b0c4;
}

.auth-input:focus {
  border-color: #0A70A2;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(10, 112, 162, 0.1);
}

.auth-input.error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* ─── Password Toggle ─── */
.auth-password-wrap {
  position: relative;
}

.auth-password-wrap .auth-input {
  padding-right: 48px;
}

.auth-password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #76889e;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.auth-password-toggle:hover {
  color: #0A70A2;
}

/* ─── Primary Button ─── */
.auth-btn {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 14px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.auth-btn-primary {
  background: linear-gradient(135deg, #0a7ab0 0%, #22a4e0 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(10, 112, 162, 0.22);
}

.auth-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(10, 112, 162, 0.32);
}

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

.auth-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ─── Google Button ─── */
.auth-btn-google {
  background: #fff;
  color: #394c60;
  border: 1.5px solid #e5eef8;
  margin-top: 12px;
  font-weight: 600;
}

.auth-btn-google:hover {
  background: #f3f7fc;
  border-color: #0A70A2;
  color: #0A70A2;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(10, 112, 162, 0.08);
}

.auth-btn-google svg,
.auth-btn-google img {
  width: 20px;
  height: 20px;
}

/* ─── Divider ─── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
  color: #a0b0c4;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5eef8;
}

/* ─── Toggle (Login/Register switch) ─── */
.auth-toggle {
  text-align: center;
  margin-top: 24px;
  font-size: 0.85rem;
  color: #76889e;
}

.auth-toggle a,
.auth-toggle button {
  color: #0A70A2;
  font-weight: 600;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  transition: color 0.2s;
}

.auth-toggle a:hover,
.auth-toggle button:hover {
  color: #065176;
  text-decoration: underline;
}

/* ─── Login Helper Links ─── */
.auth-login-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 0.8rem;
  gap: 12px;
}

.auth-link-sec {
  color: #76889e;
  text-decoration: none;
  transition: all 0.25s ease;
  font-weight: 500;
}

.auth-link-sec:hover {
  color: #0A70A2;
  text-decoration: none;
}

/* ─── Error / Success Messages ─── */
.auth-message {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.4;
  margin-bottom: 18px;
  display: none;
  animation: authMsgIn 0.3s ease;
}

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

.auth-message.is-visible {
  display: block;
}

.auth-message.error {
  background: rgba(231, 76, 60, 0.08);
  border: 1px solid rgba(231, 76, 60, 0.15);
  color: #c0392b;
}

.auth-message.success {
  background: rgba(0, 194, 129, 0.08);
  border: 1px solid rgba(0, 194, 129, 0.15);
  color: #0e8a5f;
}

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

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

/* ─── Navbar Auth Elements ─── */
.navbar-auth-container {
  position: relative;
}

.nav-auth-login {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary, #394c60);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid var(--border, #e5eef8);
  border-radius: 50px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-auth-login:hover {
  background: var(--brand-pale, rgba(10, 112, 162, 0.06));
  border-color: var(--brand, #0A70A2);
  color: var(--brand, #0A70A2);
}

.nav-auth-login svg {
  width: 16px;
  height: 16px;
}

.nav-auth-user {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 12px 4px 4px;
  background: #f3f7fc;
  border: 1px solid #e5eef8;
  border-radius: 50px;
  transition: all 0.2s;
  position: relative;
  user-select: none;
}

.nav-auth-user:hover {
  background: #e5eef8;
}

.nav-auth-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0a7ab0, #22a4e0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  flex-shrink: 0;
}

.nav-auth-name {
  font-size: 0.82rem;
  color: #0a101d !important;
  font-weight: 700;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-auth-chevron {
  width: 14px;
  height: 14px;
  color: #76889e !important;
  transition: transform 0.2s;
}

/* ─── Auth Dropdown ─── */
.nav-auth-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid rgba(10, 112, 162, 0.08);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 16px 48px rgba(10, 112, 162, 0.12), 0 4px 12px rgba(0,0,0,0.04);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.nav-auth-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-auth-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: #394c60;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 10px;
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: background 0.2s;
}

.nav-auth-dropdown-item:hover {
  background: rgba(10, 112, 162, 0.06);
  color: #0A70A2;
}

.nav-auth-dropdown-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.nav-auth-dropdown-divider {
  height: 1px;
  background: #e5eef8;
  margin: 6px 10px;
}

.nav-auth-logout {
  color: #e74c3c !important;
}

.nav-auth-logout:hover {
  background: rgba(231, 76, 60, 0.06) !important;
  color: #c0392b !important;
}

/* ─── Reset form panel (within login.html) ─── */
.auth-panel {
  display: none;
}

.auth-panel.is-active {
  display: block;
  animation: authCardIn 0.4s ease both;
}

/* ─── Auth back link ─── */
.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: absolute;
  top: 24px;
  left: 24px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #76889e;
  text-decoration: none;
  z-index: 10;
  transition: color 0.2s;
}

.auth-back-link:hover {
  color: #0A70A2;
}

.auth-back-link svg {
  width: 16px;
  height: 16px;
}

/* ─── Role badge (shown after first registration) ─── */
.auth-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(0, 194, 129, 0.08);
  border: 1px solid rgba(0, 194, 129, 0.15);
  border-radius: 50px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #0e8a5f;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-top: 12px;
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
  .auth-card {
    padding: 32px 20px;
    border-radius: 22px;
  }
  
  .auth-login-links {
    flex-direction: column;
    align-items: center; /* Center them for better balance on small screens */
    gap: 12px;
    margin-top: 12px;
  }

  .auth-title {
    font-size: 1.25rem;
  }

  .auth-subtitle {
    font-size: 0.82rem;
  }

  .auth-input {
    padding: 12px 14px;
    font-size: 0.9rem;
  }

  .auth-btn {
    padding: 13px 20px;
    font-size: 0.9rem;
  }

  .auth-logo img {
    height: 34px;
  }

  .auth-logo-text {
    font-size: 1.35rem;
  }

  .nav-auth-name {
    display: none;
  }

  .nav-auth-chevron {
    display: none;
  }

  .auth-back-link {
    top: 16px;
    left: 16px;
    font-size: 0.78rem;
  }
}

@media (max-width: 360px) {
  .auth-card {
    padding: 28px 16px;
    border-radius: 18px;
  }

  .auth-title {
    font-size: 1.15rem;
  }

  .auth-btn {
    padding: 12px 16px;
    font-size: 0.85rem;
    border-radius: 12px;
  }

  .auth-input {
    border-radius: 12px;
  }
}
