/* =========================================================
   BARDON - Pantallas de acceso
   Login y registro (index.html), contraseña nueva (reset.html) y
   el cartel de mantenimiento del soundboard. Misma estética que
   la app: tarjeta pergamino con borde hueso, logo en ficha con
   relieve, Grenze en títulos y botones, campos blancos cálidos.
   ========================================================= */

/* Relieve de fichas (también está en tiles.css; acá con respaldo,
   porque index.html y reset.html no cargan ese archivo). */
.auth-screen {
  --auth-bevel: var(--tile-bevel-sm, inset 0 0 0 2px rgba(0,0,0,0.12), inset 0 -5px 0 rgba(0,0,0,0.16));
  --auth-bevel-pressed: var(--tile-bevel-sm-pressed, inset 0 0 0 2px rgba(0,0,0,0.14), inset 0 -2px 0 rgba(0,0,0,0.16));
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  background: rgba(46, 36, 28, 0.55); /* sobre la app (mantenimiento): la oscurece */
  z-index: 1000;
  overflow-y: auto;
}
/* Como página propia (login, contraseña nueva): se ve el paisaje de fondo */
.auth-screen.is-page { position: relative; inset: auto; min-height: 100vh; background: transparent; }

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--color-parchment);
  border: 3px solid var(--color-bone);
  border-radius: 18px;
  padding: 28px 28px 24px;
  color: var(--color-espresso);
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 14px 40px rgba(46, 36, 28, 0.28);
  box-sizing: border-box;
}

/* ---------- Marca ---------- */
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 6px; }
.auth-brand-mark {
  width: 64px; height: 64px; border-radius: 16px; background: var(--color-espresso);
  display: flex; align-items: center; justify-content: center; padding-bottom: 4px; box-sizing: border-box;
  box-shadow: var(--auth-bevel), 0 4px 12px rgba(0,0,0,0.2);
}
.auth-brand-note {
  width: 76%; height: 76%; background-color: var(--color-parchment);
  -webkit-mask: url('../assets/icons/ui/logo-note-chico.svg') center/contain no-repeat;
  mask: url('../assets/icons/ui/logo-note-chico.svg') center/contain no-repeat;
}
.auth-title {
  font-family: 'Grenze', serif;
  font-size: 2.3rem;
  line-height: 1;
  margin: 0;
  text-align: center;
  color: var(--color-espresso);
}
.auth-subtitle {
  font-size: 0.85rem;
  color: var(--color-bronze);
  margin: 0 0 10px;
  text-align: center;
  line-height: 1.4;
}

/* ---------- Iniciar sesión / Crear cuenta ---------- */
.auth-tabs { display: flex; gap: 8px; margin-bottom: 8px; }
.auth-tab {
  flex: 1; padding: 8px 6px 11px; border-radius: 9px; border: none; cursor: pointer;
  background: var(--color-bone); color: var(--color-espresso);
  font-family: 'Grenze', serif; font-weight: 700; font-size: 1.02rem;
  box-shadow: var(--auth-bevel); transition: transform 0.1s ease;
}
.auth-tab:hover { transform: translateY(-2px); }
.auth-tab.active { background: var(--color-espresso); color: var(--color-parchment); }

/* ---------- Campos ---------- */
.auth-card label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 6px;
  color: var(--color-espresso);
}
.auth-card input {
  width: 100%;
  box-sizing: border-box;
  background: #FFFCF6;
  border: 2px solid var(--color-bone);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--color-espresso);
  font-size: 0.92rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.12s ease;
}
.auth-card input::placeholder { color: var(--color-ash); }
.auth-card input:focus { border-color: var(--color-espresso); }

.auth-link {
  align-self: flex-end; margin-top: 2px;
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 0.76rem; font-weight: 700;
  color: var(--color-espresso); text-decoration: underline;
}
.auth-link.center { align-self: center; margin-top: 10px; }

.auth-message {
  min-height: 1.2em;
  font-size: 0.8rem;
  line-height: 1.4;
  margin-top: 8px;
  color: var(--color-bronze);
}
.auth-message.bad { color: var(--st-bad-text, #8C2A1C); font-weight: 600; }
.auth-message.ok { color: var(--st-ok-text, #3F5A2C); font-weight: 600; }

/* ---------- Botones ---------- */
.auth-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.auth-actions button, .auth-submit {
  flex: 1;
  padding: 10px 10px 13px;
  border-radius: 9px;
  font-family: 'Grenze', serif;
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.1;
  border: none;
  cursor: pointer;
  box-shadow: var(--auth-bevel);
  transition: transform 0.1s ease;
}
.auth-actions button:hover, .auth-submit:hover { transform: translateY(-2px); }
.auth-actions button:active, .auth-submit:active { transform: translateY(1px); box-shadow: var(--auth-bevel-pressed); }
.auth-actions button:disabled, .auth-submit:disabled { opacity: 0.6; cursor: default; transform: none; }
.auth-actions .btn-save, .auth-submit { background: var(--color-espresso); color: var(--color-parchment); }
.auth-actions .btn-cancel { background: var(--color-bone); color: var(--color-espresso); }

.auth-foot { margin: 14px 0 0; text-align: center; font-size: 0.72rem; color: var(--color-bronze); line-height: 1.5; }
.auth-foot a { color: var(--color-espresso); font-weight: 700; }

@media (max-width: 420px) {
  .auth-card { padding: 22px 18px 18px; }
  .auth-title { font-size: 2rem; }
}
