/* =========================================================
   ASTROLAND HOME — CSS BASE (VERSIÓN ESTABLE / FUNCIONAL)
   ========================================================= */

/* =========================
   PALETA ASTROLAND
========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --cream: #EFE6DA;
  --cream-light: #F6EFE8;
  --white: #FFFFFF;
  --tan: #D6C3B5;
  --earth: #C6A28C;
  --brown: #8A6E63;
  --text-dark: #4A4A4A;
  --text-muted: #8C8C8C;
  --shadow: rgba(0, 0, 0, 0.06);
}

/* =========================
   BASE
========================= */
html, body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", sans-serif;
  background-color: var(--cream);
  color: var(--text-dark);
  height: 100%;
}

/* Footer siempre abajo */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header,
.app-header,
.top-bar {
  position: sticky; /* o fixed */
  top: 0;
  z-index: 100; /* 🔴 BAJO */
}

/* =========================
   LOGIN
========================= */
.login-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4rem;
  flex: 1;
}

.brand-title {
  font-size: 2.2rem;
  letter-spacing: 2px;
  font-weight: 600;
  color: var(--brown);
}

.brand-subtitle {
  margin-top: -10px;
  letter-spacing: 1px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.login-container {
  background-color: var(--white);
  margin-top: 1.5rem;
  padding: 2rem;
  border-radius: 16px;
  width: 320px;
  box-shadow: 0 8px 20px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-container h2 {
  margin-bottom: .5rem;
  font-weight: 500;
}

.login-container input {
  padding: 0.8rem;
  border: 1px solid var(--tan);
  border-radius: 8px;
  background-color: var(--cream-light);
  color: var(--text-dark);
}

.login-container input:focus {
  outline: none;
  border-color: var(--earth);
}

.login-container button,
.primary {
  padding: 0.9rem;
  background-color: var(--earth);
  border: none;
  border-radius: 8px;
  color: var(--white);
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s ease;
}

.login-container button:hover,
.primary:hover {
  background-color: var(--brown);
}

.secondary {
  padding: 0.9rem;
  border: 1px solid var(--tan);
  background-color: var(--white);
  border-radius: 8px;
  color: var(--text-dark);
}

.secondary:hover {
  background-color: var(--cream-light);
}

.password-link {
  font-size: 0.9rem;
  color: var(--brown);
  cursor: pointer;
}

.password-link:hover {
  text-decoration: underline;
}

/* =========================
   LOADING
========================= */
.loading-box {
  margin-top: 0.5rem;
  padding: 0.6rem;
  border-radius: 8px;
  background-color: var(--tan);
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.loading-spinner {
  width: 14px;
  height: 14px;
  border: 3px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =========================
   MODALS
========================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--white);
  padding: 2rem;
  width: 300px;
  border-radius: 12px;
  box-shadow: 0 6px 20px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* =========================
   INVENTARIO
========================= */
.inventory-body {
  background-color: var(--cream);
  color: var(--text-dark);
  padding: 1rem 2rem;
}

.inventory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.inventory-header h1 {
  font-size: 1.8rem;
  color: var(--brown);
}

/* =========================
   INVENTARIO — BUSCADOR
========================= */
.inventory-search {
  margin-top: 1.2rem;   /* separa del header */
  margin-bottom: 0.8rem;
}

@media (min-width: 768px) {
  .inventory-search {
    margin-top: 1.6rem;
  }
}

.inventory-logo-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.inventory-logo {
  height: 42px;
  object-fit: contain;
  opacity: 0.95;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logout-btn {
  padding: 0.5rem 1rem;
  background-color: var(--earth);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
}

.inventory-search input {
  width: 100%;
  padding: 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--tan);
  background-color: var(--cream-light);
  margin-bottom: 1.2rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding: 20px;
}

.product-card {
  background-color: var(--white);
  padding: 1.2rem;
  border-radius: 12px;
  box-shadow: 0 6px 18px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.stock-normal {
  color: var(--earth);
}

.stock-low {
  color: var(--brown);
  font-weight: 600;
}

.floating-add-btn {
  position: fixed;
  bottom: 35px;
  right: 35px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--earth);
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  box-shadow: 0 6px 16px var(--shadow);
}
/* =========================================================
   INVENTARIO — BOTONES FLOTANTES (AGRUPADOS)
========================================================= */

/* Botón principal: + Entrada */
.floating-add-btn {
  position: fixed;
  bottom: 35px;
  right: 35px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--earth);
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  box-shadow: 0 6px 16px var(--shadow);
  z-index: 1000;
}

.floating-add-btn:hover {
  background-color: var(--brown);
}

/* Botón secundario: Nuevo Producto */
.create-product-btn {
  position: fixed;
  bottom: 105px; /* queda encima del + */
  right: 35px;
  padding: 0.75rem 1.1rem;
  background-color: var(--white);
  border: 1px solid var(--tan);
  border-radius: 10px;
  color: var(--brown);
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--shadow);
  z-index: 999;
  white-space: nowrap;
}

.create-product-btn:hover {
  background-color: var(--cream-light);
}

/* ===== DROPDOWN SELECT MODERNO ===== */
.dropdown-select {
  position: relative;
  width: 100%;
}

.dropdown-selected {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  color: #555;
}

.dropdown-selected:hover {
  border-color: #c8a58a;
}

.dropdown-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  max-height: 220px;
  overflow-y: auto;
  z-index: 50;
}

.dropdown-options div {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
}

.dropdown-options div:hover {
  background: #f3eee9;
}

.hidden {
  display: none;
}
/* =========================================================
   INVENTARIO — MODAL NUEVO PRODUCTO (AJUSTES FINOS)
========================================================= */

/* Limitar altura del modal y permitir scroll */
.modal-content {
  max-height: 85vh;
  overflow-y: auto;
  gap: 0.6rem;
}

/* Inputs más compactos */
.modal-content input {
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 13.5px;
}

/* Dropdown más compacto dentro del modal */
.modal-content .dropdown-selected {
  padding: 10px 12px;
  font-size: 13.5px;
}

/* Dropdown siempre visible sobre el modal */
.modal-content .dropdown-options {
  max-height: 180px;
  z-index: 2000;
}

/* Botones */
.modal-buttons {
  margin-top: 8px;
}

/*form*/
.form-help {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}
.hidden {
  display: none;
}

/* =========================================================
   INVENTARIO — REDUCCIÓN DE ESPACIADO EN MODAL
========================================================= */

/* Menos espacio vertical general */
.modal-content {
  gap: 0.4rem;              /* antes era 0.6 / 1rem */
}

/* Inputs más compactos */
.modal-content input {
  margin-bottom: 8px;       /* antes ~16–20px */
  padding: 8px 12px;        /* reduce altura */
  font-size: 13.5px;
}

/* Dropdown seleccionado (categoría / unidad) */
.modal-content .dropdown-selected {
  padding: 8px 12px;
  margin-bottom: 8px;
  font-size: 13.5px;
}

/* Labels más pegados al input */
.modal-content label {
  margin-bottom: 4px;
  font-size: 13px;
}

/* Botones más cercanos */
.modal-buttons {
  margin-top: 6px;
}

/* =========================================================
   INVENTARIO — MOBILE
========================================================= */
@media (max-width: 480px) {

  .floating-add-btn {
    bottom: 20px;
    right: 20px;
  }

  .create-product-btn {
    bottom: 90px;
    right: 20px;
    font-size: 0.8rem;
    padding: 0.6rem 1rem;
  }
}

/* =========================
   FACTURACIÓN
========================= */
.billing-body {
  background-color: var(--cream);
  padding: 1.5rem 2rem;
  color: var(--text-dark);
}

.billing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.billing-logo-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.billing-logo {
  height: 48px;
  opacity: 0.95;
}

.billing-top {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.billing-input {
  flex: 1;
  padding: 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--tan);
  background-color: var(--cream-light);
}

.product-results {
  width: 100%;
  background-color: white;
  border-radius: 10px;
  margin-top: .3rem;
  padding: .5rem;
  box-shadow: 0 4px 18px var(--shadow);
}

.product-item {
  padding: .6rem;
  border-bottom: 1px solid var(--cream);
  cursor: pointer;
}

.product-item:hover {
  background-color: var(--cream-light);
}

.billing-table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
}

.billing-table th,
.billing-table td {
  padding: 0.9rem;
  border-bottom: 1px solid var(--cream-light);
}

.remove-btn {
  color: var(--brown);
  cursor: pointer;
}

.billing-submit-btn {
  margin-top: 1.2rem;
  width: 100%;
  padding: 1rem;
  background-color: var(--earth);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  cursor: pointer;
}

.billing-submit-btn:hover {
  background-color: var(--brown);
}

/* =========================
   FACTURACIÓN — ESPACIADO Y BLOQUES
========================= */

/* Separación entre header y contenido */
.billing-content {
  margin-top: 1.5rem;
}

/* Bloque factura fiscal */
.billing-fiscal {
  margin-top: 1.2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  background-color: var(--cream-light);
  border-radius: 10px;
  border: 1px solid var(--tan);
}

/* Inputs fiscales */
.billing-fiscal input[type="text"] {
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--tan);
  background-color: var(--white);
}

/* Totales fiscales */
.billing-totals {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--tan);
}

.billing-total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.billing-total-final {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--earth);
}
.product-item .sku {
  font-size: 12px;
  color: #888;
}
.billing-options {
  display: flex;
  gap: 32px;
  padding: 14px 18px;
  border: 1px solid #e0d2c3;
  border-radius: 8px;
  background: #f8f1e8;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.billing-option {
  display: flex;
  align-items: center;
  gap: 10px;
}

.billing-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.option-input {
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid #d4c2af;
  font-size: 13px;
}

.option-input.small {
  width: 70px;
}
.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #d6b89c;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: #5b4636;
}

.btn-icon svg {
  fill: #5b4636;
}


/* =========================================================
   DASHBOARD — ASTROLAND HOME
========================================================= */

.dashboard-body {
  background-color: var(--cream);
  padding: 1.5rem 2rem;
  flex: 1;
}

/* Header (si existe en el HTML) */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 1.9rem;
  color: var(--brown);
}

/* Grid */
.dashboard-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* Card */
.dashboard-card {
  background: var(--white);
  padding: 1.8rem;
  border-radius: 14px;
  box-shadow: 0 8px 24px var(--shadow);
  cursor: pointer;
  transition: 
    transform 0.2s ease,
    box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.08);
}

/* Título */
.dashboard-card h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--brown);
}

/* Descripción */
.dashboard-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* =========================================================
   DASHBOARD — MOBILE
========================================================= */
@media (max-width: 480px) {

  .dashboard-body {
    padding: 1rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .dashboard-card {
    padding: 1.4rem;
  }

  .dashboard-card h2 {
    font-size: 1.15rem;
  }

  .dashboard-card p {
    font-size: 0.9rem;
  }
}

/* =========================================================
   FOOTER (GLOBAL, SIN CAMBIOS FUNCIONALES)
========================================================= */
.nexadom-footer {
  text-align: center;
  padding: 1rem 0;
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.7;
}
/* =========================
   VISIBILIDAD GLOBAL
========================= */
.hidden {
  display: none !important;
}
/* =========================
   HISTORIAL DE FACTURACIÓN
========================= */

/* Contenedor general (usa billing-body) */
.billing-body {
  background-color: var(--cream);
  padding: 1.5rem 2rem;
}

/* Texto descriptivo */
.module-description {
  margin: 12px 0 18px;
  font-size: 14px;
  color: var(--text-muted);
}

/* =========================
   FILTROS
========================= */
.filters-box {
  background: var(--white);
  border: 1px solid var(--tan);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px var(--shadow);
}

.filters-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-input {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--tan);
  background-color: var(--cream-light);
  font-size: 13px;
  min-width: 140px;
}

.filter-input.wide {
  flex: 1;
  min-width: 240px;
}

.filter-btn {
  padding: 8px 14px;
  background-color: var(--earth);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 13px;
  cursor: pointer;
}

.filter-btn.secondary {
  background-color: var(--cream-light);
  color: var(--text-dark);
  border: 1px solid var(--tan);
}

.filter-btn:hover {
  background-color: var(--brown);
  color: white;
}

/* =========================
   TABLA HISTÓRICOS (DESKTOP)
========================= */
.billing-table-wrapper {
  background: var(--white);
  border: 1px solid var(--tan);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px var(--shadow);
}

.billing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.billing-table thead {
  background-color: var(--cream-light);
}

.billing-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: var(--brown);
  border-bottom: 1px solid var(--tan);
}

.billing-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--cream-light);
  color: var(--text-dark);
}

.billing-table tbody tr:hover {
  background-color: var(--cream-light);
}

/* =========================
   ACCIONES
========================= */
.billing-table td button {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--tan);
  background-color: var(--white);
  font-size: 12px;
  cursor: pointer;
  margin-right: 6px;
}

.billing-table td button:hover {
  background-color: var(--earth);
  color: white;
}

/* =========================
   ESTADO VACÍO
========================= */
.empty-state {
  padding: 30px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

/* =========================
   RESPONSIVE — MOBILE (CARDS)
========================= */
@media (max-width: 480px) {

  /* Ocultar tabla */
  .billing-table {
    display: none;
  }

  /* Cards */
  #tablaHistoricos {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  #tablaHistoricos tr {
    display: block;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 6px 16px var(--shadow);
    padding: 14px;
  }

  #tablaHistoricos td {
    display: block;
    border: none;
    padding: 4px 0;
    font-size: 14px;
  }

  #tablaHistoricos td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--brown);
    margin-bottom: 2px;
  }

  /* Acciones */
  #tablaHistoricos td:last-child {
    display: flex;
    gap: 10px;
    margin-top: 10px;
  }

  #tablaHistoricos td button {
    flex: 1;
    background-color: var(--earth);
    color: white;
    border: none;
    padding: 8px;
  }
}
/* =========================
   HISTORIAL – ESPACIADOS
========================= */

/* Barra de búsqueda principal */
.filters-row:first-child {
  margin-bottom: 14px; /* separación clara */
}

/* Caja completa de filtros */
.filters-box {
  margin-top: 18px;
  margin-bottom: 22px;
}
/* =========================
   HISTORIAL – TABLA SCROLL
========================= */

.billing-table-wrapper {
  max-height: 55vh;          /* controla altura visible */
  overflow-y: auto;          /* scroll interno */
  overflow-x: hidden;
}

/* Header fijo al hacer scroll */
.billing-table thead th {
  position: sticky;
  top: 0;
  background-color: var(--cream-light);
  z-index: 2;
}
/* =========================
   HISTORIAL – FILAS
========================= */

.billing-table td {
  padding: 12px 14px;
  line-height: 1.4;
}

.billing-table tbody tr:nth-child(even) {
  background-color: #faf6f1;
}
/* =========================
   HISTORIAL – ACCIONES
========================= */

.billing-table td:last-child {
  white-space: nowrap;
}

.billing-table td button {
  margin-right: 8px;
}
#previewModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9999; /* clave */
  display: flex;
  align-items: center;
  justify-content: center;
}
#previewModal .preview-card {
  background: #fff;
  border-radius: 12px;
  max-width: 420px;
  width: 90%;
  padding: 20px;
  position: relative;
  z-index: 10000;
}

/* preview factura */
#previewModal {
  position: fixed;
  inset: 0;
  z-index: 1100;
}

/* reenvío (SIEMPRE arriba) */
#reenvioModal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}
/* =========================================================
   REPORTES
========================================================= */

/* Body igual al dashboard */
.report-body {
  background-color: var(--cream);
  padding: 1.5rem 2rem;
  flex: 1;
}

/* Header similar al billing / dashboard */
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.8rem;
}

.report-logo-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.report-logo {
  height: 48px;
  opacity: 0.95;
}

.report-header h1 {
  margin: 0;
  font-size: 1.9rem;
  color: var(--brown);
}

/* Grid exactamente como dashboard */
.report-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* Cards idénticas a dashboard-card */
.report-card {
  background: var(--white);
  padding: 1.6rem;
  border-radius: 14px;
  box-shadow: 0 8px 24px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Títulos */
.report-card h2 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--brown);
}

/* KPI principal */
.report-card p {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--earth);
  margin: 0.4rem 0 0;
}

/* Listados */
.report-card ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.95rem;
  color: var(--text-dark);
}

/* Navegación */
.nav-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.nav-btn {
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--tan);
  background-color: var(--white);
  color: var(--text-dark);
  cursor: pointer;
  font-size: 0.9rem;
}

.nav-btn:hover {
  background-color: var(--cream-light);
}
.small-chart {
  height: 260px;          /* 👈 aquí controlas el tamaño */
  max-width: 700px;       /* opcional, más elegante */
  margin-top: 10px;
}
@media (max-width: 768px) {
  .small-chart {
    height: 320px;
  }
}
.grid-graficas {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  margin-top: 20px;
  align-items: center;
}

.grafica-box {
  background: transparent;
}

.grafica-wrapper {
  position: relative;
  height: 260px;
}

.grafica-wrapper.doughnut {
  height: 220px;
}

/* Responsive */
@media (max-width: 900px) {
  .grid-graficas {
    grid-template-columns: 1fr;
  }

  .grafica-wrapper,
  .grafica-wrapper.doughnut {
    height: 260px;
  }
}
.grid-graficas {
  align-items: start; /* 🔑 fuerza alineación superior */
}
.grafica-box h3 {
  min-height: 28px;   /* misma línea base */
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}
.export-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 248, 240, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  font-size: 1.1rem;
  color: #7a4a2e;
}

.export-overlay.hidden {
  display: none;
}
/* =========================================================
   CONFIGURACIONES
========================================================= */
.config-section {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
}

.config-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #6b5a4a;
}
.config-list {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
}

.config-list li {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 12px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.config-list li:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.06);
}
.config-list li span:first-child {
  font-size: 15px;
  font-weight: 500;
  color: #3f3a36;
}
.config-actions {
  display: flex;
  gap: 14px;
  font-size: 16px;
}

.config-actions span {
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.config-actions span:hover {
  opacity: 1;
  transform: scale(1.15);
}
.config-section .primary {
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #ffffff;
  border-radius: 18px;
  padding: 22px;
  width: 100%;
  max-width: 420px;

  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
  gap:0.4rem;
}

.modal-content h3 {
  margin-bottom: 18px;
  font-size: 18px;
  color: #6b5a4a;
}
.modal-content input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  margin-bottom: 8px;
  font-size: 14px;
}
.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
/* Separación entre botón "Agregar" y lista de categorías */
.config-list {
  margin-top: 18px;
}
/* =========================
   HEADER — NAVEGACIÓN GLOBAL
========================= */

.user-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.nav-actions {
  display: flex;
  gap: 8px;
}

.nav-actions .nav-btn {
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
}
/* ===== USERS CARD ===== */
.users-card {
  max-width: 900px;
  margin: 40px auto;
  background: #fff;
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

/* Header */
.users-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.users-card-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #4a3b2f;
}

/* ===== TABLE ===== */
.users-table {
  width: 100%;
  border-collapse: collapse;
}

.users-table thead th {
  text-align: left;
  font-size: 13px;
  color: #8a7a6a;
  padding: 10px 8px;
  border-bottom: 1px solid #eee;
}

.users-table tbody td {
  padding: 12px 8px;
  font-size: 14px;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}

/* Hover fila */
.users-table tbody tr:hover {
  background: #faf7f4;
}

/* ===== ESTADO ===== */
.estado-activo {
  background: #e7f6ec;
  color: #1f7a3f;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.estado-inactivo {
  background: #fdeaea;
  color: #b42318;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

/* ===== ACCIONES ===== */
.user-actions {
  display: flex;
  gap: 10px;
}

.user-actions button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.7;
}

.user-actions button:hover {
  opacity: 1;
}

.config-card {
  background: #ffffff;
  max-width: 520px;
  margin: 40px auto;
  padding: 32px 36px;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.config-card h2 {
  margin-bottom: 6px;
  font-size: 20px;
}

.config-description {
  font-size: 14px;
  color: #777;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}

.form-group input[type="number"] {
  width: 100%;
}

.form-group.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-actions {
  margin-top: 28px;
  text-align: right;
}
.help-text {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #9aa0b4;
}

.hidden {
  display: none;
}

input:disabled {
  background-color: #1c1f2a;
  opacity: 0.6;
  cursor: not-allowed;
}
