:root {
  --ink: #123524;
  --muted: #4d6b5c;
  --green: #1f8a4c;
  --green-deep: #145c32;
  --lime: #d7f5a8;
  --line: #d7e7dc;
  --paper: #ffffff;
  --danger: #b42318;
  color: var(--ink);
  font-family: Outfit, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 110% -10%, #1b7a42 0 140px, transparent 142px),
    linear-gradient(165deg, #f6fbf7 0%, #e7f3eb 48%, #f8fbf8 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 42% 58% 48% 52%;
}

body::before {
  right: -9rem;
  bottom: -8rem;
  width: 26rem;
  height: 26rem;
  background: #145c32;
  animation: drift 16s ease-in-out infinite alternate;
}

body::after {
  left: -7rem;
  top: 18%;
  width: 16rem;
  height: 16rem;
  background: #d7f5a8;
  animation: drift 18s ease-in-out infinite alternate-reverse;
}

main,
#login {
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.marca {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo {
  display: block;
  height: 4.75rem;
  width: auto;
}

.somos {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--green);
  padding: 0.45rem 0.9rem;
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  animation: floaty 4.5s ease-in-out infinite;
}

h1,
h2 {
  color: var(--ink);
  letter-spacing: -0.03em;
}

.lead {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.card {
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  padding: 1.25rem;
  box-shadow: 0 18px 40px rgba(18, 53, 36, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(18, 53, 36, 0.12);
}

label {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"] {
  margin-top: 0.35rem;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 0.75rem 1rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(31, 138, 76, 0.15);
}

.btn {
  border: 0;
  border-radius: 999px;
  background: var(--green);
  padding: 0.85rem 1.1rem;
  color: white;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--green-deep);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-ghost {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--lime);
}

.btn-danger {
  border: 1px solid #f3c7c3;
  background: white;
  color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background: #fff1f0;
}

.paso {
  margin: 0 0 0.8rem;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.marco {
  min-height: 16rem;
  background: #e7f6ec;
  border: 1px dashed var(--green);
}

.marco-ayuda {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1.5rem;
  color: var(--green-deep);
  font-weight: 700;
  text-align: center;
}

.marco-ayuda.is-off {
  display: none;
}

.marco-mal {
  border-color: #b42318;
  box-shadow: inset 0 0 0 4px #b42318;
}

.marco-aviso {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin: 0;
  padding: 1.1rem;
  background: linear-gradient(to top, rgba(180, 35, 24, 0.92), rgba(180, 35, 24, 0.35) 58%, rgba(180, 35, 24, 0.12));
  color: white;
  font-weight: 800;
  text-align: center;
}

.marco-aviso-ok {
  align-items: flex-end;
  background: linear-gradient(to top, rgba(20, 92, 50, 0.92), rgba(20, 92, 50, 0.2) 55%, transparent);
}

.marco-aviso.is-off {
  display: none;
}

.aviso-pagina {
  margin-top: 1rem;
  border-radius: 1rem;
  background: white;
  padding: 0.85rem 1rem;
  font-weight: 700;
}

.aviso-bad {
  color: #b42318;
  box-shadow: inset 0 0 0 2px #b42318;
}

.aviso-ok {
  color: var(--green-deep);
  box-shadow: inset 0 0 0 2px var(--green);
}

.archivo-btn {
  position: relative;
  cursor: pointer;
  text-align: center;
}

.archivo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.archivo-btn:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.5;
}

.fila {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 0.75rem;
  border: 0;
  border-radius: 1.25rem;
  background: white;
  padding: 0.75rem;
  text-align: left;
  box-shadow: 0 10px 24px rgba(18, 53, 36, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fila:hover {
  transform: translateY(-2px);
}

.fila-activa {
  outline: 2px solid var(--green);
}

#paneles {
  display: grid;
  gap: 1rem;
  align-items: start;
}

@media (min-width: 1024px) {
  #paneles {
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  }
}

@media (max-width: 1023px) {
  #espera {
    display: none;
  }
}

.espera .lead {
  margin-top: 0.6rem;
}

.ficha {
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.96);
  padding: 1.25rem;
  box-shadow: 0 18px 40px rgba(18, 53, 36, 0.08);
}

.ficha-cuerpo {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .ficha-cuerpo {
    grid-template-columns: 200px minmax(0, 1fr);
    align-items: start;
  }
}

.ficha-foto > * {
  width: 100%;
}

.ficha-img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 1.15rem;
  object-fit: cover;
  background: #d7f5a8;
}

.ficha-kicker {
  margin: 0;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ficha-nombre {
  margin: 0.2rem 0 0;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.ficha-dl {
  margin: 1rem 0 0;
}

.ficha-dl div + div {
  margin-top: 0.85rem;
}

.ficha-dl dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.ficha-dl dd {
  margin: 0.1rem 0 0;
  font-size: 1rem;
  font-weight: 700;
}

.ficha .btn-danger {
  margin-top: 1.25rem;
}

.foto-bajar {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border: 0;
  border-radius: 999px;
  background: white;
  padding: 0.5rem;
  color: var(--green-deep);
  box-shadow: 0 8px 18px rgba(18, 53, 36, 0.16);
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  max-width: min(22rem, calc(100vw - 2rem));
  border-radius: 1.25rem;
  background: white;
  padding: 0.9rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 16px 40px rgba(18, 53, 36, 0.16);
  animation: toast-in 0.35s ease;
}

.toast-ok {
  color: var(--green-deep);
  box-shadow: 0 16px 40px rgba(31, 138, 76, 0.18);
}

.toast-bad {
  color: var(--danger);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) rotate(12deg); }
  to { transform: translate3d(-18px, 16px, 0) rotate(20deg); }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

section:not([hidden]),
#confirmacion:not([hidden]) {
  animation: toast-in 0.4s ease;
}

.pie {
  margin: 1.75rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}

.velo {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(18, 53, 36, 0.46);
}

.velo.is-off {
  display: none;
}

.venta {
  width: min(100%, 24rem);
  border-radius: 1.75rem;
  padding: 1.45rem 1.35rem 1.25rem;
  color: white;
  background: linear-gradient(165deg, #2ea15c 0%, #145c32 100%);
  box-shadow: 0 28px 70px rgba(18, 53, 36, 0.35);
  animation: venta-in 0.22s ease;
}

.venta-kicker {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d7f5a8;
}

.venta h2 {
  margin: 0.35rem 0 0.55rem;
  font-size: 1.55rem;
  line-height: 1.15;
}

.venta p {
  margin: 0;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.94);
}

.venta-acciones {
  display: flex;
  gap: 0.65rem;
  margin-top: 1.15rem;
}

.venta-acciones .btn {
  flex: 1;
  background: white;
  color: var(--green-deep);
}

.venta-acciones .btn:hover:not(:disabled) {
  background: var(--lime);
}

.venta-acciones .btn-ghost {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.7);
}

.venta-acciones .btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
  color: white;
}

@keyframes venta-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.venta-roja {
  background: linear-gradient(165deg, #e2554c 0%, #9d221c 100%);
}

.venta-roja .venta-kicker {
  color: #ffd5d2;
}

.venta-roja .venta-acciones .btn {
  background: white;
  color: #9d221c;
}

.venta-roja .venta-acciones .btn:hover:not(:disabled) {
  background: #fff1f0;
}

.venta-roja .venta-acciones .btn-gris {
  background: #d9d9d9;
  color: #3a3a3a;
  border: 0;
}

.venta-roja .venta-acciones .btn-gris:hover:not(:disabled) {
  background: #c8c8c8;
  color: #3a3a3a;
}
