/* ═══════════════════════════════════════════════════════════
   TaquerOS · Tacos El Rodeo Jr  — Login Styles
   Tema: Western / Rodeo  |  Responsive: mobile → tablet → desktop
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Rye&family=Cinzel:wght@700;900&family=Nunito:wght@600;700;800;900&display=swap');

/* ── TOKENS ─────────────────────────────────────────────.─── */
:root {
  --leather-dark:  #1e0e05;
  --leather-mid:   #3a1a08;
  --leather-light: #5c2e0e;
  --leather-card:  #2d1509;
  --gold:          #c8860a;
  --gold-light:    #f0b429;
  --gold-pale:     #fef3c7;
  --gold-border:   #a06c08;
  --cream:         #f5e6c8;
  --cream-dim:     #c9a96e;
  --red-rodeo:     #8b1a1a;
  --text-on-dark:  #f0ddb8;
  --input-bg:      rgba(255,255,255,.07);
  --input-border:  rgba(200,134,10,.35);
  --input-focus:   #c8860a;
  --shadow-gold:   0 0 0 3px rgba(200,134,10,.25);
  --shadow-card:   0 32px 80px rgba(0,0,0,.65), 0 0 0 1px rgba(200,134,10,.15);
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; max-width: 100%; }

/* ── BODY / FONDO ────────────────────────────────────────── */
body {
  font-family: 'Nunito', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;

  background-color: var(--leather-dark);
  /* ── Cambia 'background.png' por el nombre real de tu imagen ── */
  background-image:
    linear-gradient(rgba(10,4,1,.52), rgba(10,4,1,.52)),
    url('/app/assets/img/background.png');
  background-size:     cover;
  background-position: center center;
  background-repeat:   no-repeat;
  background-attachment: fixed;
}

/* ── BARRA SUPERIOR ──────────────────────────────────────── */
.top-banner {
  width: 100%;
  /* ── Cambia 'background.png' por el nombre real de tu imagen ── */
  background-color: var(--leather-dark);
  background-image:
    linear-gradient(rgba(5,2,0,.58), rgba(5,2,0,.58)),
    url('/app/assets/img/background.png');
  background-size:     cover;
  background-position: center top;
  background-repeat:   no-repeat;
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 4px 24px rgba(0,0,0,.5), 0 1px 0 rgba(200,134,10,.4);
  padding: 10px 20px;
  text-align: center;
  position: relative;
  z-index: 10;
}

.top-banner::before,
.top-banner::after {
  content: '✦';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 14px;
  opacity: .6;
}
.top-banner::before { left: 24px; }
.top-banner::after  { right: 24px; }

.banner-title {
  font-family: 'Rye', serif;
  font-size: clamp(18px, 4vw, 32px);
  color: var(--gold-light);
  letter-spacing: .12em;
  text-shadow:
    2px 2px 0 #000,
    0 0 20px rgba(240,180,41,.4);
  line-height: 1;
  /* borde de texto oscuro para legibilidad */
  -webkit-text-stroke: .5px rgba(0,0,0,.6);
}

/* ── CONTENEDOR PRINCIPAL ────────────────────────────────── */
.login-bg {
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 160px 16px 48px;
  width: 100%;
  max-width: 100%;
}

/* ── CARD ─────────────────────────────────────────────────── */
.login-card {
  width: 100%;
  max-width: 440px;
  background:
    linear-gradient(160deg, #3d1c0a 0%, #2a1207 50%, #1e0e05 100%);
  border: 1.5px solid rgba(200,134,10,.3);
  border-radius: 20px;
  padding: 0 32px 32px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
  animation: cardIn .5s cubic-bezier(.22,.68,0,1.15) both;

  /* Textura interior */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E"),
    linear-gradient(160deg, #3d1c0a 0%, #2a1207 50%, #1e0e05 100%);
}

/* borde dorado brillante en la parte superior */
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
  border-radius: 2px;
}

@keyframes cardIn {
  from { opacity: 0; transform: scale(.93) translateY(24px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  15%     { transform: translateX(-8px); }
  30%     { transform: translateX(8px); }
  45%     { transform: translateX(-5px); }
  60%     { transform: translateX(5px); }
  75%     { transform: translateX(-3px); }
  90%     { transform: translateX(3px); }
}
.login-card.shake { animation: shake .4s ease; }

/* ── LOGO ─────────────────────────────────────────────────── */
.lc-logo-wrap {
  width: 280px;
  height: 280px;
  margin-top: -140px;
  margin-bottom: 8px;
  position: relative;
  filter: drop-shadow(0 12px 32px rgba(0,0,0,.85))
          drop-shadow(0 0 24px rgba(200,134,10,.45))
          drop-shadow(0 0 8px rgba(0,0,0,.9));
  animation: logoFloat 4s ease-in-out infinite;
  flex-shrink: 0;
  z-index: 2;
}

@keyframes logoFloat {
  0%,100% { transform: translateY(0) scale(1); }
  50%     { transform: translateY(-8px) scale(1.012); }
}

.lc-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Placeholder cuando no hay imagen */
.lc-logo-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, #5c2e0e 0%, #2a1207 100%);
  border: 4px solid var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  box-shadow: 0 0 0 2px var(--gold-border), inset 0 2px 8px rgba(0,0,0,.4);
}

/* ── BIENVENIDO ───────────────────────────────────────────── */
.lc-welcome {
  font-family: 'Cinzel', serif;
  font-size: clamp(16px, 3vw, 20px);
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: .08em;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
  margin-bottom: 24px;
  text-align: center;
}

/* ── SEPARADOR ORNAMENTAL ────────────────────────────────── */
.lc-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
}
.lc-divider::before,
.lc-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,134,10,.4));
}
.lc-divider::after {
  background: linear-gradient(90deg, rgba(200,134,10,.4), transparent);
}
.lc-divider-icon {
  font-size: 14px;
  color: var(--gold);
  opacity: .7;
}

/* ── CAMPOS ───────────────────────────────────────────────── */
.lc-fields {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 6px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--cream-dim);
  letter-spacing: .1em;
  text-transform: uppercase;
  padding-left: 4px;
}

.field-wrap {
  position: relative;
}

.field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: .5;
  pointer-events: none;
}

.field-input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--cream);
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}

.field-input::placeholder {
  color: rgba(200,169,110,.35);
  font-weight: 600;
}

.field-input:focus {
  border-color: var(--input-focus);
  background: rgba(200,134,10,.08);
  box-shadow: var(--shadow-gold);
}

.field-input.has-toggle {
  padding-right: 48px;
}

.field-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 17px;
  opacity: .45;
  transition: opacity .15s;
  padding: 4px;
  line-height: 1;
}
.field-toggle:hover { opacity: .85; }

/* ── ERROR ────────────────────────────────────────────────── */
.login-error {
  width: 100%;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #fca5a5;
  background: rgba(139,26,26,.35);
  border: 1.5px solid rgba(239,68,68,.3);
  border-radius: 10px;
  padding: 9px 14px;
  display: none;
  margin-top: 2px;
}
.login-error:not(:empty) { display: block; }

/* ── BOTÓN INICIAR SESIÓN ────────────────────────────────── */
.btn-enter {
  width: 100%;
  margin-top: 10px;
  padding: 15px;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 50%, #a06c08 100%);
  border: none;
  border-top: 1.5px solid rgba(255,255,255,.3);
  border-radius: 12px;
  color: #1a0900;
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  cursor: pointer;
  transition: all .18s;
  box-shadow:
    0 4px 16px rgba(0,0,0,.4),
    0 1px 0 rgba(255,255,255,.15) inset;
  text-shadow: 0 1px 0 rgba(255,255,255,.25);
  position: relative;
  overflow: hidden;
}

/* Brillo al hover */
.btn-enter::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .18s;
  border-radius: inherit;
}
.btn-enter:hover:not(:disabled)::after { opacity: 1; }

.btn-enter:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.5), 0 0 16px rgba(240,180,41,.25);
}
.btn-enter:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.btn-enter:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-enter.success {
  background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%) !important;
  color: #fff !important;
}

/* ── OLVIDÉ CONTRASEÑA ───────────────────────────────────── */
.lc-forgot {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cream-dim);
  opacity: .6;
  cursor: pointer;
  transition: opacity .15s, color .15s;
  text-align: center;
  background: none;
  border: none;
  font-family: 'Nunito', sans-serif;
}
.lc-forgot:hover { opacity: 1; color: var(--gold-light); }

/* ── VERSIÓN ──────────────────────────────────────────────── */
.lc-version {
  margin-top: 12px;
  font-size: 10px;
  color: rgba(200,169,110,.3);
  font-weight: 600;
  letter-spacing: .05em;
  text-align: center;
}

/* ── ESTRELLAS DECORATIVAS DE FONDO ─────────────────────── */
.bg-star {
  position: fixed;
  pointer-events: none;
  user-select: none;
  color: var(--gold-light);
  font-size: 60px;
  animation: starFloat 10s ease-in-out infinite;
  z-index: 0;
  overflow: hidden;
  max-width: 100vw;
  /* Glow dorado */
  text-shadow: 0 0 12px rgba(240,180,41,.6), 0 0 30px rgba(240,180,41,.3);
}
/* Estrellas grandes — visibles */
.bg-star:nth-child(1) { top:  7%; left:  4%; font-size: 90px; opacity: .18; animation-delay: 0s;   animation-duration: 9s; }
.bg-star:nth-child(2) { top: 10%; right: 5%; font-size: 65px; opacity: .14; animation-delay: 2.5s; animation-duration: 11s; }
.bg-star:nth-child(3) { bottom: 12%; left:  6%; font-size: 80px; opacity: .16; animation-delay: 5s; animation-duration: 10s; }
.bg-star:nth-child(4) { bottom: 16%; right: 4%; font-size: 70px; opacity: .15; animation-delay: 1s;   animation-duration: 13s; }
/* Estrellas medianas */
.bg-star:nth-child(5) { top: 42%; left:  1.5%; font-size: 44px; opacity: .12; animation-delay: 3.5s; animation-duration: 8s; }
.bg-star:nth-child(6) { top: 38%; right: 1.5%; font-size: 50px; opacity: .13; animation-delay: 6.5s; animation-duration: 12s; }
/* Estrellas pequeñas — destellos */
.bg-star:nth-child(7) { top: 28%; left: 15%; font-size: 28px; opacity: .20; animation-delay: 1.8s; animation-duration: 7s; }
.bg-star:nth-child(8) { top: 22%; right:18%; font-size: 22px; opacity: .22; animation-delay: 4.2s; animation-duration: 6s; }
.bg-star:nth-child(9) { bottom: 32%; left: 20%; font-size: 24px; opacity: .18; animation-delay: 0.8s; animation-duration: 9s; }
.bg-star:nth-child(10){ bottom: 28%; right:22%; font-size: 20px; opacity: .20; animation-delay: 5.5s; animation-duration: 8s; }

@keyframes starFloat {
  0%,100% { transform: translateY(0) rotate(0deg) scale(1); }
  25%     { transform: translateY(-12px) rotate(8deg) scale(1.05); }
  50%     { transform: translateY(-6px) rotate(-4deg) scale(1.02); }
  75%     { transform: translateY(-16px) rotate(12deg) scale(1.08); }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */

/* Tablet grande (iPad Pro 12.9", 1024px) — muy parecido a desktop */
@media (max-width: 1024px) {
  .login-card { max-width: 420px; }
  .lc-logo-wrap { width: 260px; height: 260px; margin-top: -128px; }
}

/* Tablet mediana (iPad 768px) */
@media (max-width: 768px) {
  .top-banner { padding: 10px 16px; }
  .banner-title { letter-spacing: .08em; }
  .login-bg { padding: 28px 20px 40px; }
  .login-card { max-width: 400px; padding: 0 28px 28px; }
  .lc-logo-wrap { width: 240px; height: 240px; margin-top: -118px; }
  .lc-welcome { font-size: 18px; }
}

/* Móvil (600px y menos) — logo flota con margin negativo, igual que tablet */
@media (max-width: 600px) {
  .banner-title { font-size: 20px; letter-spacing: .06em; }
  .top-banner::before,
  .top-banner::after { display: none; }

  .login-bg {
    padding: 110px 16px 36px;
    align-items: center;
    justify-content: flex-start;
  }

  .login-card {
    max-width: 100%;
    width: 100%;
    padding: 0 22px 28px;
    border-radius: 18px;
  }

  .lc-logo-wrap {
    width: 200px;
    height: 200px;
    margin-top: -100px;
    margin-bottom: 8px;
  }

  .lc-welcome { font-size: 17px; margin-bottom: 18px; }
  .field-input { font-size: 16px; padding: 12px 14px 12px 42px; }
  .btn-enter { font-size: 14px; padding: 14px; }
}

/* Móvil pequeño (480px) */
@media (max-width: 480px) {
  .banner-title { font-size: 17px; }
  .login-bg { padding: 96px 14px 32px; }
  .lc-logo-wrap { width: 180px; height: 180px; margin-top: -90px; }
  .login-card { padding: 0 18px 24px; border-radius: 16px; }
  .lc-welcome { font-size: 16px; margin-bottom: 16px; }
  .lc-fields { gap: 12px; }
  .btn-enter { padding: 13px; }
}

/* Móvil muy pequeño (360px) */
@media (max-width: 360px) {
  .banner-title { font-size: 15px; }
  .login-bg { padding: 84px 12px 28px; }
  .lc-logo-wrap { width: 160px; height: 160px; margin-top: -78px; }
  .login-card { padding: 0 14px 20px; }
  .lc-welcome { font-size: 15px; }
}