/*
 * atlas.css
 * CSS principal de la aplicación Atlas Inversiones.
 * Consolida: demo.css + style.css (eliminando duplicados) + estilos inline extraídos de las vistas.
 *
 * SECCIONES:
 *   1. Template base (ex-demo.css)
 *   2. Tarjetas generales / lista de productos
 *   3. Componentes de operaciones (modales, simulador, formularios)
 *   4. Navegación y botones de moneda
 *   5. Tablas y filtros
 *   6. Utilidades de color
 *   7. Media queries
 *******************************************************************************/


/* =============================================================================
   1. TEMPLATE BASE
   ============================================================================= */

.menu .app-brand.demo {
  height: 64px;
  margin-top: 12px;
}

.app-brand-logo.demo svg {
  width: 22px;
  height: 38px;
}

.app-brand-text.demo {
  font-size: 1.75rem;
  letter-spacing: -0.5px;
  text-transform: lowercase;
}

/* Padding top fix para navbar fija */
.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: 76px !important;
}
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 64px !important;
}

.content-wrapper .navbar {
  z-index: auto;
}

/* Demo helpers */
.demo-blocks > * { display: block !important; }
.demo-inline-spacing > * { margin: 1rem 0.375rem 0 0 !important; }

.demo-vertical-spacing > * { margin-top: 1rem !important; margin-bottom: 0 !important; }
.demo-vertical-spacing.demo-only-element > :first-child { margin-top: 0 !important; }

.demo-vertical-spacing-lg > * { margin-top: 1.875rem !important; margin-bottom: 0 !important; }
.demo-vertical-spacing-lg.demo-only-element > :first-child { margin-top: 0 !important; }

.demo-vertical-spacing-xl > * { margin-top: 5rem !important; margin-bottom: 0 !important; }
.demo-vertical-spacing-xl.demo-only-element > :first-child { margin-top: 0 !important; }

.rtl-only { display: none !important; text-align: left !important; direction: ltr !important; }
[dir='rtl'] .rtl-only { display: block !important; }

.layout-demo-wrapper {
  display: flex;
  align-items: center;
  flex-direction: column;
  margin-top: 1rem;
}
.layout-demo-placeholder img { width: 900px; }
.layout-demo-info { text-align: center; margin-top: 1rem; }


/* =============================================================================
   2. TARJETAS GENERALES / LISTA DE PRODUCTOS
   ============================================================================= */

.container-general {
  max-width: 520px;
  margin: 0 auto;
}

.card-general {
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 2px solid #B6C0CD;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.card-general:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.left-content-general {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.arrow {
  min-width: 8px;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid;
  flex-shrink: 0;
}

.arrow-red    { border-left-color: #dc3545; }
.arrow-teal   { border-left-color: #20b2aa; }
.arrow-yellow { border-left-color: #e6a817; }
.arrow-orange { border-left-color: #e67e17; }
.arrow-black  { border-left-color: #1a1a1a; }

.info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.title {
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.amount {
  font-size: 18px;
  font-weight: bold;
  color: #2c2c2c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub-accounts {
  font-size: 14px;
  color: #20b2aa;
}

.details-button {
  color: #20b2aa;
  text-decoration: none;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 20px;
  background: #f5f5f5;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.3s ease;
}
.details-button:hover { background: #e5e5e5; }

.details-teal   { color: #20b2aa; }
.details-red    { color: #dc3545; }
.details-yellow { color: #e6a817; }
.details-orange { color: #e67e17; }
.details-black  { color: #1a1a1a; }
.details-gray   { color: #666; }

hr {
  border: none;
  border-top: 2px solid #ccc;
  width: 100%;
}


/* =============================================================================
   3. COMPONENTES DE OPERACIONES
   ============================================================================= */

/* Etiquetas sin mayúsculas forzadas */
label {
  text-transform: initial;
}

/* Popup / modal flotante (flash de éxito/error) */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1090;
  display: none;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}

/* Cabeza circular de modal de confirmación */
.cabeza-modal {
  background-color: #A90533;
  color: #fff !important;
  display: grid;
  height: 80px;
  margin-top: -80px !important;
  width: 80px;
  border-radius: 100px;
  justify-content: center;
  justify-items: center;
  align-items: center;
}

/* Loader global reutilizable */
.atlas-loader {
  display: none;
  align-items: center;
  justify-content: center;
}

.atlas-loader.is-active {
  display: flex;
}

.atlas-loader--inline {
  min-height: 90px;
  padding: 20px 0;
}

.atlas-loader--fullscreen {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
  z-index: 1100;
}

.atlas-loader__wave {
  width: 62.5px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.atlas-loader__bar {
  width: 10px;
  height: 50px;
  transform: scaleY(.4);
  transform-origin: center;
  will-change: transform;
}

.atlas-loader__bar:nth-child(1) {
  background: #C60431;
}

.atlas-loader__bar:nth-child(2) {
  background: #CF193A;
}

.atlas-loader__bar:nth-child(3),
.atlas-loader__bar:nth-child(4) {
  background: #F09151;
}

.atlas-loader__bar:nth-child(5) {
  background: #A6CDD3;
}

.atlas-loader--fullscreen .atlas-loader__wave {
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.08));
}

/* Simulador */
.titulo-simulador {
  font-size: 18px !important;
  border-bottom: 1px solid #B2DDDF !important;
  text-align: center !important;
  width: 40%;
  margin-left: 30%;
}

.size-small {
  width: 80%;
}

#respuestaDiv {
  display: flex !important;
  justify-content: center !important;
}

.centrado-inertir {
  text-align: center !important;
  gap: 20px;
  margin: 20px;
  display: grid;
}

/* Validación visual de campos de monto */
.borde-rojo  { border: 2px solid red   !important; }
.borde-verde { border: 2px solid green !important; }


/* =============================================================================
   4. NAVEGACIÓN Y BOTONES DE MONEDA
   ============================================================================= */

.boton-container {
  margin: 20px;
}

.boton {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  margin-right: 0.5rem;
  color: #6c757d;
  background-color: #e9ecef;
  transition: background-color 0.3s ease;
  display: inline-block;
}

.boton.activo {
  background-color: #E3A6A6;
  color: #6D0018;
}

.boton.inactivo {
  background-color: transparent;
  color: gray;
  border: 2px solid gray;
}


/* =============================================================================
   5. TABLAS Y FILTROS (movimientos, pendientes)
   ============================================================================= */

.filtros {
  padding: 0;
  margin-bottom: 20px;
  margin-top: 20px;
  border: 1px solid #ccc;
  border-radius: 20px;
  padding-bottom: 30px;
}

.form-control {
  text-align: center !important;
}

th {
  text-align: center !important;
}

#example_filter { display: none; }
#example_info   { display: none; }

.dataTables_wrapper .dataTables_paginate {
  float: revert-layer;
  text-align: center !important;
}

/* Pendientes */
.table th {
  background-color: #f8f9fa;
  font-weight: 600;
}

.table td {
  vertical-align: middle;
}

.badge {
  font-size: 0.875rem;
  font-weight: 500;
}

.btn-danger {
  transition: all 0.3s ease;
}

.btn-danger:hover {
  transform: scale(1.05);
}

/* Encabezado de DataTables para búsqueda */
thead input {
  width: 100%;
}


/* =============================================================================
   6. UTILIDADES DE COLOR
   ============================================================================= */

.texto-yellow { color: #ffd700 !important; }
.texto-red    { color: #ff3e1d !important; }


/* =============================================================================
   7. MEDIA QUERIES
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
  .atlas-loader__bar {
    transform: scaleY(.7) !important;
  }
}

@media only screen and (max-width: 600px) {
  .wrapper-3 {
    display: grid;
    grid-template-columns: 33% 33% 33%;
    justify-content: center;
    justify-items: center;
    align-items: center;
    margin: 12px;
  }

  .card-body {
    flex: 1 1 auto;
    padding: 0.5rem 1.5rem;
  }

  .size-small {
    font-size: 10px !important;
    width: 100% !important;
  }

  .col {
    flex: 1 0 100%;
  }
}

@media screen and (max-width: 480px) {
  .container-general {
    padding: 15px;
    margin: 10px auto;
  }

  .card-general {
    padding: 15px;
  }

  h1 {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .amount {
    font-size: 16px;
  }

  .details-button {
    padding: 6px 10px;
    font-size: 13px;
  }

  .left-content-general {
    gap: 10px;
  }
}

@media screen and (max-width: 360px) {
  .card-general {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .details-button {
    align-self: flex-end;
  }

  .left-content-general {
    width: 100%;
  }
}
