/* === NAVBAR PERSONALIZADA === */
nav {
    background-color: #000;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 191, 255, 0.1);
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

nav a {
    color: #00b7ff;
    font-style: normal;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

nav a:hover {
    color: #66ffff;
    text-shadow: 0 0 8px rgba(102, 255, 255, 0.5);
}


/* === ESTILO GLOBAL === */
body {
    background-color: #111;
    color: white;
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 20px;
}

/* Título principal */
h1 {
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 30px;
    font-size: 26px;
}

/* Contenedor principal */
.main-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 100vh;
    gap: 30px;
}

/* === PANEL IZQUIERDO === */
.left-panel {
    width: 24%;
    min-width: 260px;
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 18px;
    font-size: 13px;
    z-index: 1;
    position: relative;
}

/* Formulario */
.form-box {
    background-color: #1c1c1c;
    padding: 18px;
    border-radius: 10px;
    box-shadow: 0 0 10px #000;
}

.form-box label {
    font-weight: bold;
    display: block;
    margin-top: 10px;
}

/* Inputs */
input[type="date"]:hover,
input[type="month"]:hover {
    border-color: #ffffff;
}

select {
    width: 100%;
    padding: 6px;
    background-color: #1e1e1e;
    color: #fff;
    border: 1px solid #bbb;
    border-radius: 4px;
    margin-top: 5px;
    font-weight: 500;
}

input[type="number"] {
    padding: 6px;
    width: 75px;
    background-color: #222;
    color: white;
    border: 1px solid #444;
    border-radius: 4px;
    margin-left: 10px;
    margin-bottom: 6px;
}

.checkbox-group {
    margin-top: 12px;
}
.checkbox-group div {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}
.checkbox-group input[type="checkbox"] {
    margin-right: 6px;
}

/* Botones */
input[type="submit"],
button {
    width: 100%;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px;
    margin-top: 20px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
}
input[type="submit"]:hover {
    background-color: #005bb5;
}

/* === PANEL DERECHO (Gráficos) === */
.graph-box {
    width: 72%;
    padding: 15px;
    box-sizing: border-box;
}

.graph-box img {
    width: 100%;
    height: auto;
    border: 1px solid white;
    border-radius: 10px;
    display: block;
    margin: auto;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
    transition: transform 0.4s ease;
}
.graph-box img:hover {
    transform: scale(1.02);
}

/* Gráfico principal destacado */
.grafico-retorno {
    max-width: 1200px;
    box-shadow: 0 0 25px rgba(0, 191, 255, 0.2);
}
.grafico-retorno:hover {
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.3);
}

/* === LEYENDA === */
.legend-box {
    background-color: #1c1c1c;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0 10px #000;
}
.legend-title {
    font-weight: bold;
    font-size: 15px;
    color: #ccc;
    margin-bottom: 10px;
}
.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 13px;
    color: white;
}
.legend-color {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border-radius: 3px;
    border: 1px solid #ccc;
}

/* === TABLA === */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px;
    color: white;
}
table th, table td {
    padding: 6px;
    text-align: left;
    border-bottom: 1px solid #333;
}
table thead {
    background-color: #222;
}

.table-compact th,
.table-compact td { vertical-align: middle; }
/* === STICKY === */
.portafolio-sticky {
    position: sticky;
    top: 20px;
    align-self: flex-start;
    z-index: 10;
}
.sticky-boton {
    position: sticky;
    top: 0;
    z-index: 99;
    background-color: #1c1c1c;
    padding-top: 5px;
    padding-bottom: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    margin-bottom: 15px;
}
.sticky-resultados {
    position: sticky;
    top: 60px;
    z-index: 90;
}

/* Enlaces */
.nav-link {
    display: inline-block;
    margin-top: 20px;
    color: #00e6f6;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}
.nav-link:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    text-decoration: underline;
}

/* === DATATABLES OSCURO === */
table.dataTable {
    background-color: #1c1c1c;
    color: white;
    border-collapse: collapse;
    width: 100%;
    font-size: 13px;
}
table.dataTable thead {
    background-color: #222;
    color: #ccc;
}
table.dataTable tbody tr:hover {
    background-color: #333;
}
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    background-color: #222;
    color: white;
    border: 1px solid #444;
    padding: 4px;
    border-radius: 4px;
    font-size: 13px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #00bfff !important;
    background-color: #111 !important;
    border: none;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: #007bff !important;
    color: white !important;
    border-radius: 4px;
}
.dataTables_wrapper .dataTables_info {
    color: #aaa;
    font-size: 12px;
}
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    color: #ccc;
    font-size: 13px;
}

/* === ADAPTACIÓN RESPONSIVE === */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    .left-panel,
    .graph-box {
        width: 100%;
    }
    .left-panel {
        position: relative;
        top: 0;
    }
    .portafolio-sticky,
    .sticky-boton,
    .sticky-resultados {
        position: static;
        box-shadow: none;
    }
    .grafico-retorno {
        max-width: 100%;
    }
    .legend-box,
    .form-box {
        margin-top: 15px;
    }
    table {
        font-size: 12px;
    }
    nav {
        padding: 0.8rem;
    }
    h1 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    .footer-alineado {
        max-width: 100%;
        font-size: 12px;
        padding: 10px 20px;
    }

    /* Estilo para noticias móviles */
    #reuters-feed {
        padding-bottom: 10px;
        max-width: 100vw;
    }
    .news-widget-box h2 {
        font-size: 16px;
        text-align: center;
    }
    #reuters-feed > div {
        min-width: 240px;
    }
}

/* === FOOTER === */
.footer-alineado {
    max-width: 72%;
    margin: 40px auto 20px auto;
    color: #aaa;
    font-size: 13px;
    background: #111;
    padding: 10px 30px;
}

/* === Z-INDEX MODALES === */
#modal-login,
#modal-registro {
    z-index: 5000 !important;
    position: fixed !important;
}
/* limita el z-index relativo solo donde lo necesites, por ejemplo el contenido principal */
.app-root > * { 
  position: relative;
  z-index: 1;
}
/* o si tu página usa .report-page como wrapper: */
.report-page > * { position: relative; z-index: 1; }


/* === ESPECÍFICO PARA DASHBOARD MACRO === */
.macro-dashboard .main-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
}
.macro-dashboard .left-panel {
    width: 22%;
    padding: 10px;
    box-sizing: border-box;
}
.macro-dashboard .graph-box {
    width: 76%;
    padding: 10px;
    box-sizing: border-box;
}

/* === ENLACES GLOBALES === */
a {
    color: #66ccff;
    text-decoration: none;
    font-weight: bold;
}
a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* === NOTICIAS: INVESTING Y REUTERS === */
.news-widget-box {
    margin-top: 30px;
    padding: 18px;
    background-color: #1a1a1a;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 150, 255, 0.15);
    width: 100%;
    box-sizing: border-box;
}
.news-widget-box h2 {
    font-size: 18px;
    color: #66ccff;
    margin-bottom: 15px;
}

/* Estilo para enlaces en feed de Reuters */
#reuters-feed {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
}
#reuters-feed > div {
    display: inline-block;
    min-width: 260px;
    max-width: 100%;
    box-sizing: border-box;
    vertical-align: top;
}
#reuters-feed a:hover {
    color: #ffffff;
    text-shadow: 0 0 5px #66ccff;
}

@media (max-width: 768px) {
  #reuters-feed > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #111;
    border-radius: 8px;
  }

  #reuters-feed img {
    width: 100% !important;
    height: auto !important;
    border-radius: 6px;
    margin-bottom: 10px;
  }

  #reuters-feed a {
    font-size: 15px !important;
    line-height: 1.3;
  }

  #reuters-feed p {
    font-size: 13px !important;
    line-height: 1.4;
    color: #ccc;
  }

  .news-widget-box h2 {
    font-size: 16px;
    margin-bottom: 10px;
  }
}

/* Tabla debajo de gráfico de velas en la Página*/
.tabla-financiera {
    width: 100%;
    background-color: #111;
    color: white;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.95rem;
}


.tabla-financiera th,
.tabla-financiera td {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #333;
}


.titulo-comparativa {
    color: #66ccff;
    font-size: 1.1rem;
    margin-top: 20px;
    margin-bottom: 5px;
}

.tabla-comparativa {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.tabla-comparativa th, 
.tabla-comparativa td {
    padding: 6px 8px;
    border: 1px solid #444;
    text-align: center;
    color: #fff;
}

.tabla-comparativa th {
    background-color: #222;
    font-weight: 600;
}

.tabla-comparativa tr:nth-child(even) {
    background-color: #1a1a1a;
}


/* === TABLA COMPACTA DEL DASHBOARD MACRO === */
.table-compact {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;            /* evita “bailes” de ancho */
}

.table-compact th,
.table-compact td {
  padding: 6px 8px;
  text-align: left;               /* neutraliza la regla global del último td */
  border-bottom: 1px solid #333;
}

.table-compact thead {
  background-color: #222;
}

/* columnas numéricas: derecha + dígitos tabulares */
.table-compact .num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;  /* fallback */
  white-space: nowrap;
}

/* útil para porcentajes largos/valores con sufijos (%, T, etc.) */
.table-compact .nowrap { white-space: nowrap; }

@media (max-width: 768px) {
  .table-compact { font-size: 12px; }
}

.report-notes {
  font-size: 13px;          /* texto más pequeño */
  transform: scale(0.9);    /* reduce visualmente todo el bloque */
  transform-origin: top center;
  line-height: 1.6;
  background-color: #121212;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 188, 212, 0.2);
}

/* opcional: en móvil no escales tanto para legibilidad */
@media (max-width: 768px) {
  .report-notes {
    transform: scale(0.95);
    font-size: 12.5px;
  }
}

/* compactar la tabla del reporte en modo Desktop ===== */
@media (min-width: 769px) {
  .report-page #tabla-indicadores th,
  .report-page #tabla-indicadores td {
    font-size: 12.5px;   /* prueba 12px si quieres aún más compacto */
    padding: 6px 8px;    /* menos padding vertical */
  }
  .report-page #tabla-indicadores tbody tr {
    line-height: 1.25;   /* filas más bajas */
  }
}

