/* style.css */
body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background-color: #F3F4F6;
  margin: 0;
  padding: 2rem;
}
.container {
  max-width: 960px;
  margin: auto;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  overflow: hidden;
}
.wizard-steps {
  display: flex;
  justify-content: space-between;
  background: #F9FAFB;
  padding: 1rem 1.5rem;
}
.wizard-steps .step {
  display: flex;
  align-items: center;
  font-weight: 500;
  color: #6B7280;
}
.wizard-steps .step.active {
  color: #1D4ED8;
}
.wizard-steps .step .circle {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid #D1D5DB;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  font-size: 0.875rem;
  color: #6B7280;
}
.wizard-steps .step.active .circle {
  border-color: #1D4ED8;
  color: #1D4ED8;
}

.main {
  padding: 1.5rem;
}
.main h1 {
  margin-top: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
}

/* Filtros */
.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.filters label {
  display: flex;
  flex-direction: column;
  font-size: 0.875rem;
  color: #374151;
}
.filters input[type="month"],
.filters select {
  padding: 0.5rem;
  border: 1px solid #D1D5DB;
  border-radius: 0.375rem;
  margin-top: 0.25rem;
}

/* Cards de totales */
.cards {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}
.cards .card {
  flex: 1;
  background: #F3F4F6;
  padding: 1rem;
  border-radius: 0.375rem;
  text-align: center;
}
.cards .card .value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
}
.cards .card .label {
  font-size: 0.875rem;
  color: #6B7280;
}

/* Contenedor scrollable */
.table-container {
  overflow: auto;
  max-height: 400px;
  border: 1px solid #E5E7EB;
  border-radius: 0.375rem;
}

/* Tabla */
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  border-bottom: 1px solid #E5E7EB;
  padding: 0.5rem;
  font-size: 0.875rem;
  color: #111827;
  white-space: nowrap;
}
th {
  position: sticky;
  top: 0;
  background: #F3F4F6;
  z-index: 1;
}
tbody tr:hover {
  background: #F9FAFB;
}

/* Footer */
footer {
  background: #F9FAFB;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  border-top: 1px solid #E5E7EB;
}

button {
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: none;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-secondary {
  background: #E5E7EB;
  color: #374151;
}
.btn-primary {
  background: #1D4ED8;
  color: white;
}

.wizard-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #E5E7EB;
  background: #FFFFFF;
}
.wizard-logo {
  height: 9rem;
}
button {
  transition: background .2s, transform .1s;
}
.btn-primary {
  background: #1D4ED8;
  color: #FFF;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.btn-primary:hover:not(:disabled) {
  background: #2563EB;
  transform: translateY(-1px);
}
.btn-secondary {
  background: #E5E7EB;
  color: #374151;
}
.btn-secondary:hover:not(:disabled) {
  background: #D1D5DB;
  transform: translateY(-1px);
}
.wizard-steps a.step {
  text-decoration: none;
  color: inherit;
}
.wizard-steps a.step:hover .circle {
  border-color: #1D4ED8;
  color: #1D4ED8;
}

/* Scrollbar para Webkit */
.table-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.table-container::-webkit-scrollbar-thumb {
  background-color: #A1A1AA;
  border-radius: 4px;
}
.table-container::-webkit-scrollbar-track {
  background: #F3F4F6;
}

/* Filtros y file-input */
.filters input,
.filters select,
input[type="file"] {
  border: 1px solid #D1D5DB;
  background: #FFFFFF;
}
input[type="file"]::file-selector-button {
  background: #1D4ED8;
  color: #FFF;
  border: none;
  padding: 0.3rem 0.6rem;
  margin-right: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background .2s;
}
input[type="file"]::file-selector-button:hover {
  background: #2563EB;
}

/* SPINNER OVERLAY */
#spinner-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.8);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
/* El spinner */
#spinner-overlay .spinner {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #1E88E5;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}
/* El texto bajo el spinner */
#spinner-overlay .spinner-text {
  margin-top: 12px;
  font-size: 14pt;
  color: #333;
  font-weight: 500;
}
@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}