* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;

  font-family: Arial, Helvetica, sans-serif;

  background: linear-gradient(135deg, #111827, #1f2937);

  color: #f9fafb;
}

#jaja {
  height: 100px;
  /* background-image: radial-gradient(#ffb931, #ff6100); */
  /* background-image: radial-gradient(#b0110c 30%, #000 100%); */
  /* color: #c1ff72; */
  color: #ff8924;
  text-align: center;
  padding: 0.2rem 0;
  position: relative;
  /* width: 90%; */
  margin-left: auto;
  margin-right: auto;
  /* border-radius: 5px; */
  background: #1c1c1c;
  max-width: 420px;
  border-radius: 15px;
}
.logo {
  position: absolute;
  width: 100%;
  height: 70px;
  display: flex;
  justify-content: center;
  z-index: 5;
  /* opacity: 0.8; */
  /* animation: heartbeat2 1.5s ease-in-out 4; */
}
.logo img {
  position: relative;
}
#jaja h1 {
  font-size: 2.5rem;
  position: relative;
  z-index: 2;
  top: -20px;
  -webkit-text-stroke: 1px #333;
  text-shadow: 0 6px 6px rgba(0, 0, 0, 0.6);
}
#jaja p {
  margin-top: 0.5rem;
  position: relative;
  z-index: 7;
  font-weight: bold;
  top: 67px;
  /* -webkit-text-stroke: 0.5px #7ba842; */
  -webkit-text-stroke: 0.5px #66391e;
  text-shadow: 0 6px 6px rgba(0, 0, 0, 0.6);
}
.menu-container {
  display: flex;
  width: 100%;
  justify-content: right;
  align-items: center;
  position: absolute;
  padding: 0 2rem;
  height: 40px;
  top: 0;
  bottom: 0;
  margin: auto;
}
.menu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 30px;
  cursor: pointer;
  z-index: 10;
}
.menu-toggle:hover {
  transform: scale(1.05);
  /* color: #444; */
  color: #a31010;
}
.menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #333;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  width: 200px;
  z-index: 10;
}
.menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu li {
  border-bottom: 1px solid #444;
}
.menu li:last-child {
  border-bottom: none;
}
.menu a {
  color: white;
  text-decoration: none;
  display: flex;
  height: 40px;
  justify-content: center;
  align-items: center;
}
.menu a:hover {
  background-color: #555;
  border-radius: 5px;
  transform: scale(1.01);
  font-weight: bold;
}
.menu.active {
  display: flex;
  right: 2rem;
}
.menu.inactive {
  display: none;
}

/* =========================
   LOGIN
========================= */

.login-container {
  /* min-height: 100vh; */

  display: flex;
  justify-content: center;
  /* align-items: center; */

  padding: 10px 20px;
}

.login-box {
  width: 100%;
  max-width: 420px;

  padding: 10px 35px;

  background: #1c1c1c;

  border-radius: 15px;

  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);

  text-align: center;
}

.logo-login {
  width: 180px;
  max-width: 80%;
}

.login-box h1 {
  margin-bottom: 5px;
}

.login-box p {
  color: #aaa;
}

.campo {
  margin-bottom: 20px;

  text-align: left;
}

.campo label {
  display: block;

  margin-bottom: 7px;

  font-weight: bold;
}

.campo input,
.campo textarea,
.editor-toolbar input,
.editor-toolbar select {
  width: 100%;

  padding: 12px;

  border: 1px solid #444;

  border-radius: 8px;

  background: #292929;

  color: white;

  font-size: 16px;
}

.login-box button,
.btn-guardar {
  border: none;

  border-radius: 8px;

  padding: 12px 20px;

  background: #e85d04;

  color: white;

  font-size: 16px;

  font-weight: bold;

  cursor: pointer;
}

.login-box button {
  width: 100%;
}

button:hover {
  opacity: 0.85;
}

.error {
  color: #ff5252 !important;
}

.oculto {
  display: none !important;
}

/* =========================
   CONTENEDOR
========================= */

.contenedor {
  width: 100%;
  max-width: 900px;

  margin: 0 auto;

  padding: 30px 20px 50px;
}

/* =========================
   ENCABEZADO
========================= */

.encabezado {
  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 20px;

  margin-bottom: 25px;
}

.encabezado h1 {
  font-size: 30px;
  margin-bottom: 5px;
}

.encabezado p {
  color: #9ca3af;
  font-size: 15px;
}

.btn-volver {
  border: none;

  background: #374151;
  color: white;

  padding: 10px 18px;

  border-radius: 8px;

  cursor: pointer;

  font-size: 14px;

  transition: 0.2s;
}

.btn-volver:hover {
  background: #4b5563;
}

/* =========================
   FORMULARIO
========================= */

.formulario-container {
  background: #1f2937;

  border: 1px solid #374151;

  border-radius: 14px;

  padding: 25px;

  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

/* =========================
   SECCIONES
========================= */

.seccion {
  padding-bottom: 25px;
  margin-bottom: 25px;

  border-bottom: 1px solid #374151;
}

.seccion:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.seccion h2 {
  font-size: 18px;

  margin-bottom: 20px;

  color: #ffffff;
}

/* =========================
   CAMPOS
========================= */

.campo {
  display: flex;

  flex-direction: column;

  gap: 7px;

  margin-bottom: 18px;
}

.campo label {
  font-size: 14px;

  font-weight: 600;

  color: #d1d5db;
}

.campo label span {
  color: #ef4444;
}

.campo input,
.campo textarea,
.campo select {
  width: 100%;

  border: 1px solid #4b5563;

  border-radius: 8px;

  background: #111827;

  color: #ffffff;

  padding: 11px 13px;

  font-size: 14px;

  outline: none;

  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.campo input:focus,
.campo textarea:focus,
.campo select:focus {
  border-color: #f59e0b;

  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.campo textarea {
  resize: vertical;

  min-height: 100px;
}

.campo select {
  cursor: pointer;
}

/* =========================
   FILA
========================= */

.fila {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 20px;
}

/* =========================
   PRECIO
========================= */

.input-precio {
  display: flex;

  align-items: center;

  background: #111827;

  border: 1px solid #4b5563;

  border-radius: 8px;

  overflow: hidden;
}

.input-precio span {
  padding-left: 13px;

  color: #9ca3af;

  font-size: 14px;
}

.input-precio input {
  border: none;

  border-radius: 0;

  box-shadow: none;

  background: transparent;
}

.input-precio input:focus {
  box-shadow: none;
}

/* =========================
   IMAGEN
========================= */

.imagen-container {
  display: grid;

  grid-template-columns: 220px 1fr;

  gap: 25px;

  align-items: center;
}

.preview-container {
  width: 220px;
  height: 170px;

  border: 2px dashed #4b5563;

  border-radius: 10px;

  overflow: hidden;

  background: #111827;

  display: flex;

  justify-content: center;
  align-items: center;
}

.preview-vacio {
  text-align: center;

  color: #6b7280;
}

.preview-vacio span {
  display: block;

  font-size: 38px;

  margin-bottom: 5px;
}

.preview-vacio p {
  font-size: 13px;
}

.preview-imagen {
  display: none;

  width: 100%;
  height: 100%;

  object-fit: cover;
}

/* =========================
   CONTROLES IMAGEN
========================= */

.imagen-controles {
  display: flex;

  flex-direction: column;

  align-items: flex-start;

  gap: 10px;
}

.btn-imagen {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  padding: 11px 18px;

  background: #f59e0b;

  color: #111827;

  font-weight: bold;

  border-radius: 8px;

  cursor: pointer;

  transition: 0.2s;
}

.btn-imagen:hover {
  background: #fbbf24;
}

.nombre-imagen {
  max-width: 100%;

  color: #9ca3af;

  font-size: 13px;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;
}

.btn-eliminar-imagen {
  border: none;

  background: transparent;

  color: #ef4444;

  cursor: pointer;

  font-size: 13px;
}

.btn-eliminar-imagen:hover {
  text-decoration: underline;
}

/* =========================
   SWITCH
========================= */

.switch-container {
  display: flex;

  align-items: center;

  gap: 12px;

  cursor: pointer;

  width: fit-content;
}

.switch-container input {
  display: none;
}

.switch {
  width: 45px;
  height: 24px;

  background: #4b5563;

  border-radius: 20px;

  position: relative;

  transition: 0.2s;
}

.switch::after {
  content: "";

  position: absolute;

  width: 18px;
  height: 18px;

  top: 3px;
  left: 3px;

  border-radius: 50%;

  background: white;

  transition: 0.2s;
}

.switch-container input:checked + .switch {
  background: #22c55e;
}

.switch-container input:checked + .switch::after {
  transform: translateX(21px);
}

.switch-text {
  color: #d1d5db;

  font-size: 14px;
}

/* =========================
   ACCIONES
========================= */

.acciones {
  display: flex;

  justify-content: flex-end;

  gap: 12px;

  padding-top: 25px;
}

.btn {
  border: none;

  border-radius: 8px;

  padding: 11px 20px;

  font-size: 14px;

  font-weight: 600;

  cursor: pointer;

  transition: 0.2s;
}

.btn-cancelar {
  background: #374151;

  color: #ffffff;
}

.btn-cancelar:hover {
  background: #4b5563;
}

.btn-guardar {
  background: #f59e0b;

  color: #111827;
}

.btn-guardar:hover {
  background: #fbbf24;
}

/* =========================
   MODAL
========================= */

.modal {
  display: none;

  position: fixed;

  inset: 0;

  background: rgba(0, 0, 0, 0.65);

  justify-content: center;
  align-items: center;

  padding: 20px;

  z-index: 1000;
}

.modal.mostrar {
  display: flex;
}

.modal-contenido {
  width: 100%;

  max-width: 400px;

  background: #1f2937;

  border: 1px solid #374151;

  border-radius: 14px;

  padding: 30px;

  text-align: center;

  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.modal-icono {
  width: 55px;
  height: 55px;

  margin: 0 auto 15px;

  border-radius: 50%;

  display: flex;

  justify-content: center;
  align-items: center;

  background: #22c55e;

  color: white;

  font-size: 25px;

  font-weight: bold;
}

.modal-contenido h2 {
  margin-bottom: 10px;
}

.modal-contenido p {
  color: #9ca3af;

  font-size: 14px;

  line-height: 1.5;

  margin-bottom: 20px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 650px) {
  .contenedor {
    padding: 20px 12px 30px;
  }

  .encabezado {
    align-items: flex-start;

    flex-direction: column;
  }

  .formulario-container {
    padding: 18px;
  }

  .fila {
    grid-template-columns: 1fr;

    gap: 0;
  }

  .imagen-container {
    grid-template-columns: 1fr;
  }

  .preview-container {
    width: 100%;
    max-width: 300px;

    margin: 0 auto;
  }

  .imagen-controles {
    align-items: center;
  }

  .acciones {
    flex-direction: column-reverse;
  }

  .acciones .btn {
    width: 100%;
  }
}
