
body {
  font-family: 'Poppins', sans-serif;
  background: #f9f9f9;
  margin: 0;
  padding: 1rem;
  max-width: 480px;
  margin-inline: auto;
}
h1, h2, h3 {
  text-align: center;
  margin-bottom: 1rem;
}
.summary-card {
  display: flex;
  justify-content: space-between;
  background: yellow;
  padding: 1rem;
  border-radius: 15px;
  margin-bottom: 1rem;
}
.summary-item {
  flex: 1;
  text-align: center;
}
.summary-value {
  font-size: 1.5rem;
  font-weight: bold;
}
.card {
  background: white;
  padding: 1rem;
  border-radius: 15px;
  margin-bottom: 1rem;
}
input, button {
  display: block;
  width: 100%;
  margin: 0.5rem 0;
  padding: 0.8rem;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid #ccc;
}
button {
  background: black;
  color: white;
  border: none;
}
.card.danger button {
  background: red;
}


/* --- Ajustes de tipografía global y picker de fecha minimal --- */
input, button, select, textarea {
  font-family: inherit;
}
input[type="date"] {
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #ddd;
  padding: 0.6rem;
  border-radius: 8px;
  font-size: 1rem;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.5);
  cursor: pointer;
}


/* ---- Botones con animación de carga ---- */
.btn {
  position: relative;
  display: block;
  width: 100%;
  margin: 0.5rem 0;
  padding: 0.9rem;
  font-size: 1rem;
  border-radius: 10px;
  border: none;
  background: #000;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s ease;
}
.btn:hover { background: #222; }

.btn.loading {
  pointer-events: none;
  color: transparent;           /* ocultamos el texto mientras carga */
}
.btn.loading::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 20px; height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid currentColor;
  border-bottom-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Placeholder largo dentro del ancho ---- */
input::placeholder {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* aseguramos que ningún input se salga del contenedor */
input, select, textarea {
  max-width: 100%;
}


.btn.danger { background: #d40000; }
.btn.danger:hover { background: #b00000; }

/* ---- Overlay de carga con blur ---- */
.overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, 0.4);
  z-index: 999;
  font-size: 1.1rem;
}
.overlay.visible {
  display: flex;
}
.loader {
  width: 32px;
  height: 32px;
  border: 3px solid #000;
  border-bottom-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
