body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #f5f7fa, #bad8d4);
}

/* Banner */
.top-banner {
  background-color: #3f4b56;
  padding: 14px 20px;
}

.header {
  justify-content: space-between;
}

.logo {
  height: 65px;
}

.logo-3ja {
  height: 40px;
}

.nombre-usuario {
  font-size: 1.5rem;
}

@media (max-width: 767px) {

  .nombre-usuario {
    font-size: 1rem;
  }

}

/* Wrapper centrado */
.main-wrapper {
  min-height: calc(100dvh - 93px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

@media (max-width: 992px) {

  .main-wrapper {
    min-height: calc(100dvh);
    padding-top: 2rem;
    padding-bottom: 3rem;
  }

}

.main-wrapper-login {
  min-height: calc(100dvh);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Contenedor módulos */
.modules-container {
  display: flex;
  gap: 2rem;
  transition: all 0.4s ease;
  width: 90%;
  max-width: 1100px;
}

/* Módulos */
.module-card {
  background: white;
  border-radius: 12px;
  width: 100%;
  min-height: 220px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  transition: all 0.4s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header */
.module-header {
  padding: 1rem 1.2rem;
  background-color: #3f4b56;
  color: white;
  font-weight: 500;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

/* Botón cerrar */
.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  display: none;
  cursor: pointer;
}

.module-content {
  flex: 1;
  padding: 1.5rem;
}

/* ESTADO COLAPSADO */
.module-card.collapsed .module-icon-view {
  display: flex;
}

.module-card.collapsed .module-body {
  display: none;
}

.module-card.collapsed .module-header {
  cursor: pointer;
}

.module-card.collapsed .module-content {
  cursor: pointer;
}

/* ESTADO EXPANDIDO */
.module-card.expanded .module-icon-view {
  display: none;
}

.module-card.expanded .module-body {
  display: block;
}

.module-card.expanded {
  width: 100%;
  overflow: visible;
}

.module-card.expanded .close-btn {
  display: block;
}

.module-card.expanded .module-header {
  cursor: default;
}

@media (max-width: 767px) {

  .module-content {
    padding: 1.5rem;
  }

  .module-card {
    min-height: 260px;
  }

}

/* Vista ícono de módulos */
.module-icon-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 160px;
  text-align: center;
  transition: opacity 0.3s ease;
}

.module-icon {
  font-size: 3rem;
  color: #3f4b56;
}

/* Vista body de módulos */
.module-body {
  display: none;
  animation: fadeIn 0.4s ease;
}

/* Animación suave */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===============================
  MÓDULO REGISTRO DE FACTURAS
================================ */
.box-btn {
  text-align: center;
}

#processBtn {
  background-color: #3f4b56;
  color: #fff;
  transition: background-color 0.3s ease;
  width: 30%;
}

#processBtn:hover {
  background-color: #a5cdc8;
  color: #3f4b56;
}

@media (max-width: 992px) {

  #processBtn {
    width: 100%;
  }

}

/* VALIDACIÓN EN EL REGISTRO FACTURAS */
.validation-wrapper {
  animation: fadeIn 0.4s ease;
}

.validation-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.validation-card {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  border: 1px solid #e2e6ea;
  transition: all 0.2s ease;
}

.validation-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.validation-header {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: #3f4b56;
  word-break: break-word;
}

.validation-body {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.validation-total-ia {
  font-size: 0.9rem;
  color: #6c757d;
}

.validation-input {
  max-width: 150px;
}

.validation-approve {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.validation-confirm-btn {
  background-color: #3f4b56 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 0.7rem !important;
  transition: all 0.3s ease !important;
  font-weight: 500 !important;
  width: 30% !important;
}

.validation-confirm-btn:hover {
  background-color: #a5cdc8 !important;
  color: #3f4b56 !important;
}

@media (max-width: 992px) {

  .validation-confirm-btn{
    width: 100% !important;
  }

}

/* Responsive ajustes */
@media (max-width: 576px) {
  .validation-body {
    flex-direction: column;
    align-items: flex-start;
  }

  .validation-input {
    width: 100%;
  }
}

/* ===============================
   MÓDULO ESTADO DE CAJA
================================ */
.cash-result {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1.2rem;
  animation: fadeIn 0.3s ease;
}

.cash-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.cash-item strong {
  font-weight: 600;
}

.cash-item.total {
  font-size: 1.1rem;
  border-top: 1px solid #dee2e6;
  padding-top: 0.8rem;
  margin-top: 0.8rem;
}

.cash-item.total strong {
  color: #3f4b56;
}

.cash-btn {
  background-color: #3f4b56 !important;
  color: #fff !important;
  transition: background-color 0.3s ease !important;
  width: 30% !important;
}

.cash-btn:hover {
  background-color: #a5cdc8 !important;
  color: #3f4b56 !important;
}

@media (max-width: 992px) {

  .cash-btn {
    width: 100% !important;
  }

}

.btn-duplicate {
  background-color: #3f4b56 !important;
  border-color: #3f4b56 !important;
  color: #fff !important;
}

.btn-duplicate:hover {
  background-color: #323d47 !important;
  border-color: #323d47 !important;
  color: #fff !important;
}

/* MOVIMIENTOS ESTADO DE CAJA */
.expenses-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* suavidad en iPhone */
}

.cash-movements-table {
  max-height: 280px;
  min-width: 600px;
  overflow-y: auto;
  border-top: 1px solid #c7c7c7;
  padding-top: 0.5rem;
}

.cash-movement-row {
  display: grid;
  grid-template-columns: 2fr 0.8fr 1fr 1fr 1fr;
  gap: 0.5rem;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid #c7c7c7;
  font-size: 0.85rem;
}

.cash-movement-row:last-child {
  border-bottom: none;
}

.cash-file-name {
  font-weight: 500;
  color: #3f4b56;
  word-break: break-all;
}

.badge-status {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  break-inside: avoid;
}

.badge-aprobado {
  background-color: #d4edda;
  color: #155724;
}

.badge-revision {
  background-color: #fff3cd;
  color: #856404;
}

/* ===============================
   MÓDULO GESTIÓN DE EMPLEADOS
================================ */

.rol-cont {
  background: #3f4b56 !important;
}

.rol-emp {
  background: #a5cdc8 !important;
}

#btnNewEmployee {
  background-color: #3f4b56 !important;
  border-color: #3f4b56 !important;
  color: #fff !important;
}

#btnNewEmployee:hover {
  background-color: #323d47 !important;
  border-color: #323d47 !important;
  color: #fff !important;
}

#btnNewCashIncome {
  background-color: #a5cdc8 !important;
  border-color: #a5cdc8 !important;
  color: #fff !important;
}

#btnNewCashIncome:hover {
  background-color: #80aca6 !important;
  border-color: #80aca6 !important;
  color: #fff !important;
}

#btnEditEmployee {
  background-color: #a5cdc8 !important;
  border-color: #a5cdc8 !important;
  color: #fff !important;
}

#btnEditEmployee:hover {
  background-color: #80aca6 !important;
  border-color: #80aca6 !important;
  color: #fff !important;
}

.btn-actions {
  margin: 0.2rem 0.1rem !important;
}

/* ===============================
   MÓDULO NOTIFICACIONES
================================ */

.title-tb-notifications {
      color: #3f4b56;
}
