* {
  box-sizing: border-box;
  font-family: 'Segoe UI', Arial, sans-serif;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 214, 165, 0.75), transparent 32%),
    radial-gradient(circle at bottom right, rgba(255, 183, 197, 0.55), transparent 34%),
    linear-gradient(135deg, #fff8ed, #f6eadc);
  background-size: 180% 180%;
  color: #3f2a1d;
}

body::before {
  content: "☕ 🥐 🍞 🍰 ☕ 🥐 🍓 🍪";
  position: fixed;
  top: 12px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 22px;
  letter-spacing: 18px;
  opacity: 0.08;
  pointer-events: none;
}

.app {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 28px 45px;
}

.encabezado {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 20px;
}

.marca {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icono-marca {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: linear-gradient(135deg, #6f3e1f, #b87942);
  color: #fff4df;
  display: grid;
  place-items: center;
  font-size: 29px;
  box-shadow: 0 10px 24px rgba(111, 62, 31, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.icono-marca:hover {
  transform: rotate(-6deg) scale(1.08);
  box-shadow: 0 14px 30px rgba(111, 62, 31, 0.35);
}

.encabezado h1 {
  margin: 0;
  font-size: 36px;
  color: #5a2f16;
  letter-spacing: -0.5px;
}

.encabezado p {
  margin: 5px 0 0;
  color: #8a6549;
}

.lado-derecho-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.organizado-por {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(111, 62, 31, 0.1);
  padding: 9px 14px;
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(79, 47, 24, 0.08);
  text-align: right;
  min-width: 125px;
}

.organizado-por span {
  display: block;
  font-size: 11px;
  color: #8a6549;
}

.organizado-por strong {
  display: block;
  font-size: 14px;
  color: #5a2f16;
}

.btn-principal,
.btn-guardar {
  background: linear-gradient(135deg, #6f3e1f, #a66232);
  color: white;
  border: none;
  padding: 13px 22px;
  border-radius: 30px;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(111, 62, 31, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-principal:hover,
.btn-guardar:hover {
  background: linear-gradient(135deg, #4e2813, #8a4b24);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(70, 40, 20, 0.18);
}

.btn-principal:active,
.btn-guardar:active {
  transform: scale(0.96);
}

.bienvenida {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 242, 218, 0.88));
  border: 1px solid rgba(111, 62, 31, 0.08);
  padding: 22px 24px;
  border-radius: 28px;
  margin-bottom: 22px;
  box-shadow: 0 14px 34px rgba(70, 40, 20, 0.08);
}

.bienvenida h2 {
  margin: 0 0 6px;
  color: #5a2f16;
  font-size: 25px;
}

.bienvenida p {
  margin: 0;
  color: #7d614c;
}

.decoracion {
  font-size: 34px;
  background: rgba(255,255,255,0.6);
  padding: 12px 18px;
  border-radius: 24px;
  animation: flotarSuave 3.5s ease-in-out infinite;
}

.resumen {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

.card-resumen {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  padding: 22px;
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(79, 47, 24, 0.08);
  border: 1px solid rgba(111, 62, 31, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-resumen:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px rgba(79, 47, 24, 0.13);
}

.card-resumen span {
  font-size: 34px;
  font-weight: bold;
  display: block;
  color: #5a2f16;
}

.card-resumen p {
  margin: 5px 0 0;
  color: #7a604c;
}

.card-resumen.pendiente span {
  color: #c0841a;
}

.card-resumen.listo span {
  color: #9b5b22;
}

.card-resumen.entregado span {
  color: #5f8d4e;
}

/* BUSCADOR */
.buscador {
  margin-bottom: 14px;
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
}

.buscador input {
  flex: 1;
  padding: 15px 18px;
  border: 1px solid rgba(111, 62, 31, 0.08);
  border-radius: 20px;
  font-size: 16px;
  box-shadow: 0 10px 24px rgba(79, 47, 24, 0.08);
  outline: none;
  background: rgba(255,255,255,0.9);
  color: #4e2d1d;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.buscador input:focus {
  border-color: #a66232;
  box-shadow: 0 0 0 4px rgba(166, 98, 50, 0.14);
  transform: translateY(-1px);
}

.btn-buscar {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 16px;
  background: #a66232;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-ver-todos {
  height: 48px;
  border: none;
  padding: 0 14px;
  border-radius: 16px;
  background: #7b5b42;
  color: white;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-buscar:hover {
  background: #7c421e;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(70, 40, 20, 0.18);
}

.btn-ver-todos:hover {
  background: #5e4230;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(70, 40, 20, 0.18);
}

.btn-buscar:active,
.btn-ver-todos:active {
  transform: scale(0.96);
}

.resultado-busqueda {
  margin-bottom: 18px;
  padding: 11px 15px;
  border-radius: 18px;
  background: rgba(255,255,255,0.65);
  color: #7d614c;
  box-shadow: 0 8px 18px rgba(79, 47, 24, 0.06);
}

.resultado-busqueda strong {
  color: #5a2f16;
}

/* TABLERO QUE OCUPA TODA LA PANTALLA */
.tablero {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: start;
  width: 100%;
  overflow-x: visible;
  padding-bottom: 15px;
}

.columna {
  background: rgba(255,255,255,0.62);
  border-radius: 26px;
  padding: 16px;
  min-height: 500px;
  box-shadow: 0 12px 28px rgba(79, 47, 24, 0.08);
  border: 1px solid rgba(111, 62, 31, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.columna:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(79, 47, 24, 0.13);
}

.columna h2 {
  margin: 0 0 15px;
  color: #5a2f16;
  font-size: 19px;
}

/* POST-IT EN 2 COLUMNAS DENTRO DE CADA ESTADO */
.lista {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  min-height: 420px;
  align-items: start;
}

.postit {
  padding: 15px;
  border-radius: 20px;
  box-shadow: 0 9px 20px rgba(70,40,20,0.13);
  cursor: default;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  border: 1px solid rgba(255,255,255,0.35);
  overflow: hidden;
}

.postit::before {
  content: "🥐";
  position: absolute;
  right: 10px;
  top: 8px;
  font-size: 16px;
  opacity: 0.45;
}

.postit::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255,255,255,0.28) 45%,
    transparent 70%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.postit:hover::after {
  opacity: 1;
}

.postit:hover {
  transform: translateY(-6px) rotate(-1.2deg) scale(1.02);
  box-shadow: 0 18px 32px rgba(70,40,20,0.22);
}

.postit h3 {
  margin: 0 28px 8px 0;
  font-size: 18px;
  color: #3c2415;
  line-height: 1.15;
}

.postit p {
  margin: 5px 0;
  color: #4e3425;
  font-size: 13px;
  line-height: 1.25;
}

.postit .fecha {
  font-weight: bold;
  font-size: 13px;
}

.postit .descripcion {
  margin-top: 8px;
  padding: 7px;
  background: rgba(255,255,255,0.45);
  border-radius: 10px;
}

.postit.Pendiente {
  background: #fff1ad;
}

.postit.Listo {
  background: #f6c78f;
}

.postit.Entregado {
  background: #d7efc7;
}

.postit.Cancelado {
  background: #ffc9c9;
}

.vacio {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.45);
  color: #8a6549;
  text-align: center;
  font-size: 14px;
  grid-column: 1 / -1;
}

.acciones {
  display: flex;
  gap: 5px;
  margin-top: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.acciones button,
.acciones a,
.btn-mini {
  border: none;
  padding: 5px 7px;
  border-radius: 8px;
  cursor: pointer;
  color: white;
  font-size: 10px;
  font-weight: bold;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-estado {
  background: #a66232;
}

.btn-estado:hover {
  background: #7c421e;
}

.btn-editar {
  background: #7b5b42;
}

.btn-editar:hover {
  background: #5e4230;
}

.btn-eliminar {
  background: #c75c5c;
}

.btn-eliminar:hover {
  background: #a53f3f;
}

.btn-mini:hover,
.acciones button:hover,
.acciones a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(70, 40, 20, 0.18);
}

.btn-mini:active,
.acciones button:active,
.acciones a:active {
  transform: scale(0.96);
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44, 24, 13, 0.42);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999;
}

.modal.activo {
  display: flex;
}

.modal-contenido {
  width: 100%;
  max-width: 480px;
  background:
    linear-gradient(135deg, #fffaf2, #fff1de);
  border-radius: 28px;
  padding: 25px;
  box-shadow: 0 22px 55px rgba(45, 25, 13, 0.28);
  animation: modalEntrada 0.28s ease both;
  border: 1px solid rgba(111, 62, 31, 0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  color: #5a2f16;
}

.btn-cerrar {
  background: transparent;
  border: none;
  font-size: 32px;
  cursor: pointer;
  color: #8a6549;
  transition: transform 0.18s ease, color 0.18s ease;
}

.btn-cerrar:hover {
  transform: rotate(90deg) scale(1.1);
  color: #5a2f16;
}

/* Esto aplica solo al formulario del modal, no al buscador */
#formPedido {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#formPedido label {
  font-weight: bold;
  font-size: 14px;
  color: #5a2f16;
}

#formPedido input,
#formPedido select {
  padding: 12px;
  border: 1px solid rgba(111, 62, 31, 0.16);
  border-radius: 14px;
  font-size: 15px;
  outline: none;
  background: rgba(255,255,255,0.88);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#formPedido input:focus,
#formPedido select:focus {
  border-color: #a66232;
  box-shadow: 0 0 0 4px rgba(166, 98, 50, 0.14);
  transform: translateY(-1px);
}

/* ANIMACIONES QUE NO RECARGAN LA PÁGINA */
@keyframes flotarSuave {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes modalEntrada {
  from {
    opacity: 0;
    transform: translateY(25px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* RESPONSIVE */
@media (max-width: 1050px) {
  .tablero {
    grid-template-columns: repeat(2, 1fr);
  }

  .resumen {
    grid-template-columns: repeat(2, 1fr);
  }

  .bienvenida {
    align-items: flex-start;
    gap: 14px;
  }

  .lista {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 650px) {
  .app {
    padding: 15px;
  }

  .encabezado {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .marca {
    align-items: flex-start;
  }

  .encabezado h1 {
    font-size: 29px;
  }

  .lado-derecho-header {
    width: 100%;
    justify-content: space-between;
  }

  .organizado-por {
    text-align: left;
  }

  .bienvenida {
    flex-direction: column;
  }

  .decoracion {
    font-size: 26px;
  }

  .buscador {
    flex-direction: row;
  }

  .btn-buscar {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
  }

  .btn-ver-todos {
    height: 46px;
    padding: 0 12px;
  }

  .tablero {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .resumen {
    grid-template-columns: 1fr;
  }

  .lista {
    grid-template-columns: 1fr;
  }

  .acciones button,
  .acciones a,
  .btn-mini {
    font-size: 10px;
    padding: 5px 6px;
  }
}