/* Auth pages — GP Inmho */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Source+Sans+3:wght@400;500;600;700&display=swap");

:root {
  --auth-brand: #e8945a;
  --auth-brand-deep: #d4783f;
  --auth-ink: #2c2624;
  --auth-muted: #6b635f;
  --auth-line: #e8e0db;
  --auth-soft: #f7f2ee;
  --auth-card: #ffffff;
  --auth-ok: #2f9e6b;
  --auth-warn: #d4a017;
  --auth-bad: #c44b3c;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 2rem;
  box-sizing: border-box;
  font-family: "Source Sans 3", system-ui, sans-serif;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(232, 148, 90, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, rgba(69, 53, 54, 0.18), transparent 50%),
    linear-gradient(160deg, #f3ebe4 0%, #e8945a 48%, #c9753f 100%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--auth-card);
  border-radius: 1.25rem;
  box-shadow: 0 24px 60px rgba(44, 38, 36, 0.18);
  padding: 1.75rem 1.6rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  position: relative;
  z-index: 1;
}

.auth-card--wide {
  max-width: 460px;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.auth-brand__logo {
  width: min(100%, 280px);
  max-width: 280px;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #ffffff;
  line-height: 0;
  box-shadow: none;
}

.auth-brand__logo img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  object-fit: contain;
}

.auth-title {
  margin: 0 0 0.35rem;
  text-align: center;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--auth-ink);
  letter-spacing: -0.02em;
}

.auth-subtitle {
  margin: 0 0 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--auth-muted);
  line-height: 1.4;
}

.auth-field {
  margin-bottom: 0.95rem;
}

.auth-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--auth-ink);
}

.auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--auth-line);
  border-radius: 0.7rem;
  background: #fff;
  color: var(--auth-ink);
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus {
  outline: none;
  border-color: var(--auth-brand);
  box-shadow: 0 0 0 3px rgba(232, 148, 90, 0.22);
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap .auth-input {
  padding-right: 2.75rem;
}

.auth-eye {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--auth-muted);
  cursor: pointer;
  padding: 0.45rem;
  line-height: 0;
  border-radius: 0.4rem;
  z-index: 5;
  pointer-events: auto;
}

.auth-eye:hover {
  color: var(--auth-ink);
  background: var(--auth-soft);
}

.auth-pass-meta {
  margin-top: 0.55rem;
}

.auth-pass-bar {
  height: 0.5rem;
  border-radius: 999px;
  background: #e5ddd7;
  overflow: hidden;
  border: 1px solid #d9cfc8;
}

.auth-pass-bar > span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  transition: width 0.2s ease, background 0.2s ease;
  background: transparent;
}

.auth-pass-bar[data-level="1"] > span { width: 25%; background: var(--auth-bad); }
.auth-pass-bar[data-level="2"] > span { width: 50%; background: var(--auth-warn); }
.auth-pass-bar[data-level="3"] > span { width: 75%; background: #4f8fd4; }
.auth-pass-bar[data-level="4"] > span { width: 100%; background: var(--auth-ok); }

.auth-pass-label {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--auth-ink);
}

/* Scroll marrón (como footer interno #453536) */
.auth-page,
.auth-modal,
.auth-modal-backdrop {
  scrollbar-width: thin;
  scrollbar-color: #453536 #efe7e1;
}

.auth-page::-webkit-scrollbar,
.auth-modal::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.auth-page::-webkit-scrollbar-thumb,
.auth-modal::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: #453536;
  border-radius: 50px;
}

.auth-page::-webkit-scrollbar-thumb:hover,
.auth-modal::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: #5a4543;
}

.auth-page::-webkit-scrollbar-track,
.auth-modal::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: #efe7e1;
}

.auth-pass-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.auth-link-btn {
  border: none;
  background: transparent;
  color: var(--auth-brand-deep);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--auth-muted);
  line-height: 1.35;
  background: var(--auth-soft);
  border-radius: 0.6rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--auth-line);
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1rem;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}

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

.auth-btn--primary {
  background: var(--auth-brand);
  color: #fff;
  box-shadow: 0 8px 20px rgba(232, 148, 90, 0.35);
}

.auth-btn--primary:hover {
  background: var(--auth-brand-deep);
}

.auth-btn--secondary {
  background: var(--auth-soft);
  color: var(--auth-ink);
  border: 1px solid var(--auth-line);
}

.auth-btn--secondary:hover {
  background: #efe7e1;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.15rem;
}

.auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.auth-links a,
.auth-links button {
  background: none;
  border: none;
  color: var(--auth-brand-deep);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.auth-links a:hover,
.auth-links button:hover {
  text-decoration: underline;
}

/* Modal recuperación / soporte */
.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(28, 22, 20, 0.55);
  backdrop-filter: blur(3px);
}

.auth-modal-backdrop.hidden {
  display: none !important;
}

.auth-modal {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 1.1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  padding: 1.35rem 1.25rem 1.2rem;
  position: relative;
  max-height: min(90vh, 640px);
  overflow: auto;
}

.auth-modal__close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 0.5rem;
  background: var(--auth-soft);
  color: var(--auth-ink);
  font-weight: 700;
  cursor: pointer;
}

.auth-modal__brand {
  width: min(100%, 200px);
  max-width: 200px;
  margin: 0 auto 0.85rem;
  border-radius: 0.55rem;
  overflow: hidden;
  background: #ffffff;
  line-height: 0;
}

.auth-modal__brand img {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  object-fit: contain;
}

.auth-modal h2 {
  margin: 0 0 0.35rem;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--auth-ink);
  text-align: center;
}

.auth-modal p.lead {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 0.84rem;
  color: var(--auth-muted);
}

.auth-textarea {
  min-height: 110px;
  resize: vertical;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 1.35rem 1.1rem 1.2rem;
  }
  .auth-title {
    font-size: 1.35rem;
  }
}
