/* ============================================== */
/* TABLERO.CSS — Dashboard-only styles            */
/* Prefijo "tb-" en clases que chocan con styles.css */
/* ============================================== */

/* --- Variables del tablero (overrides + exclusivas) --- */
:root {
    --gold-2: #1d2b4f;
    --blue-2: #307cbb;
    --blue-3: #64abe4;
    --blue-5: #a0cbed;
    --blue-8: #f0f0f0;

    --accent-1: #F57C00;
    --accent-2: #4FC3F7;
    --neutral-1: #FFFFFF;
    --neutral-2: #B0BEC5;

    --bg-main: var(--gold-8);
    --bg-card: var(--gold-7);
    --text-primary: var(--neutral-1);
    --text-secondary: var(--neutral-2);
    --btn-primary: var(--accent-1);
    --btn-secondary: var(--gold-4);
    --chart-color-1: var(--gold-2);
    --chart-color-2: var(--accent-1);
    --chart-color-3: var(--accent-2);
}

/* --- Reset body para tablero --- */
body {
    background-color: var(--blue-8);
}

/* --- Layout principal --- */
.dashboard-container {
    display: flex;
    align-items: start;
    justify-content: space-between;
    flex-flow: column nowrap;
    width: 100vw;
    height: 100vh;
}

.dashboard-container h1,
.dashboard-container h2,
.dashboard-container h3,
.dashboard-container h4,
.dashboard-container h5,
.dashboard-container h6 {
    text-align: start;
    font-weight: 300;
}

.dashboard-container b,
.dashboard-container strong {
    font-weight: 700;
}

.dashboard-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
}

.dashboard-header {
    text-align: center;
    padding: 10px;
}

.over-flow {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-flow: column nowrap;
}

/* --- Transiciones Vue --- */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.3s ease;
}
.fade-enter-from, .fade-leave-to {
    opacity: 0;
}

/* ============================================== */
/* FLEX — prefijo tb-                             */
/* ============================================== */
.tb-flex {
    display: flex;
}
.tb-flex-center {
    display: flex;
    align-items: center;
}
.tb-flex-start {
    display: flex;
    align-items: flex-start;
}
.tb-flex-start-between {
    display: flex;
    align-items: flex-start !important;
    justify-content: space-between !important;
    flex-flow: row nowrap !important;
}
.tb-flex-center-center {
    display: flex;
    align-items: center;
    justify-content: center;
}
.tb-flex-center-end {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.tb-flex-center-between {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}
.tb-flex-center-start {
    display: flex;
    align-items: center !important;
    justify-content: flex-start;
}
.tb-flex-stretch-between {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
}
.tb-flexc {
    display: flex;
    flex-flow: column nowrap !important;
}
.tb-flexc-start {
    display: flex;
    flex-flow: column nowrap;
    align-items: flex-start;
}
.tb-flexc-center {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
}
.tb-flexc-center-center {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    justify-content: center;
}
.tb-flexc-start-between {
    display: flex;
    flex-flow: column nowrap;
    align-items: flex-start;
    justify-content: space-between;
}
.tb-flexc-center-between {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    justify-content: space-between;
}
.tb-flexc-end-center {
    display: flex;
    flex-flow: column nowrap;
    align-items: flex-end;
    justify-content: center;
}
.tb-flexc-end-between {
    display: flex;
    flex-flow: column nowrap;
    align-items: flex-end;
    justify-content: space-between;
}
.tb-flex-nowrap {
    flex-flow: row nowrap !important;
}

/* ============================================== */
/* BOX / BTN — prefijo tb-                        */
/* ============================================== */
.tb-box {
    padding: 1rem;
    border-radius: 0.4rem;
    transition: 0.3s;
    box-shadow: 0 0 0.1rem var(--black-4);
}

.tb-btn {
    padding: 0.25rem 0.8rem;
    text-decoration: none;
    border-radius: 0.4rem;
    transition: 0.2s;
    background-color: var(--gray-3);
    border: none;
    outline: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--black-3);
    box-shadow: 0 0 0.1rem var(--black-2);
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================== */
/* INPUT — prefijo tb-                            */
/* ============================================== */
.tb-input-container {
    position: relative;
    border-radius: 0.4rem;
    display: flex;
    flex-flow: column nowrap;
}
.tb-input-container label {
    margin: 0 0 0.7rem 0;
    color: var(--black-4);
    font-size: 1.3rem !important;
    font-weight: 600 !important;
}
.tb-input-btn {
    height: 50px !important;
}
.tb-input-field {
    display: block;
    position: relative;
    border: none;
    padding: 0.2rem 0.3rem;
    outline: none;
    border-radius: 0.3rem;
    width: 100%;
    font-size: 1.3rem;
    box-shadow: 0 0 0.1rem var(--black-2) !important;
    margin: 0;
    transition: 0.2s;
    color: var(--black-3);
    background-color: white;
}
.tb-input-field-textarea {
    display: block;
    border: none;
    padding: 0.5rem 0.8rem;
    outline: none;
    border-radius: 0.3rem;
    width: 100%;
    min-height: 5rem;
    resize: vertical;
    height: 8rem;
    max-height: 30rem;
    font-size: 1rem;
    box-shadow: 0 0 0.1rem var(--black-2) !important;
    margin: 0;
    transition: 0.2s;
    color: var(--black-3);
    background-color: var(--gray-9);
}
.tb-input-field:focus, .tb-input-field select:focus {
    background-color: var(--gray-10) !important;
    transition: 0.2s;
    color: black !important;
    box-shadow: 0 0 0.15rem var(--black-4) !important;
}
.tb-input-field::placeholder {
    text-transform: none !important;
}
.tb-input-field:disabled {
    background-color: var(--gray-3) !important;
    cursor: not-allowed;
}
.tb-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0.2rem !important;
    min-height: 0.2rem;
    background-color: var(--blue-2);
    border-radius: 0.4rem;
    transition: all 0.5s ease-in-out;
}
.tb-input-field:focus + .tb-underline {
    width: 100%;
}

/* ============================================== */
/* LIST LABELS — prefijo tb-                      */
/* ============================================== */
.tb-list-labels {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex-flow: row wrap;
    text-decoration: none;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tb-list-labels li {
    background-color: var(--blue-7);
    box-shadow: 0 0 0.05rem var(--black-2);
    padding: 0.2rem 0.6rem;
    margin: 0 0.4rem 0.1rem 0;
    border-radius: 1rem;
    color: var(--black-2);
    transition: 0.1s;
    font-size: 0.94rem;
    font-weight: 400;
}
.tb-list-labels li:hover {
    background-color: var(--gray-9);
    transition: 0.2s;
}
.tb-list-labels .list-active {
    background-color: white !important;
}
.tb-list-labels .list-active p {
    color: var(--blue-2) !important;
}

/* ============================================== */
/* CHARTS                                         */
/* ============================================== */
.chart-container {
    width: 100%;
    height: 100%;
    min-height: 300px;
}

.chart-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    overflow-y: auto;
}

.chart-section-mapa {
    width: 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

/* ============================================== */
/* CONTAINER / FILTERS — prefijo tb-              */
/* ============================================== */
.tb-container {
    display: flex;
    height: 100%;
    flex-flow: column nowrap;
}

.filters {
    width: 100%;
    background: #f8f9fa;
    padding: 0.8rem;
    display: flex;
    flex-flow: column nowrap;
    align-items: flex-start;
    justify-content: flex-start;
}

.container-consejos-detalle {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 0.5rem;
    overflow-y: auto;
}

/* ============================================== */
/* BTN RETURN                                     */
/* ============================================== */
.btn-return {
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s;
    width: 8%;
}
.btn-return:hover {
    background-color: #0056b3;
}

/* ============================================== */
/* TABLA DE ESTADOS (MAPA)                        */
/* ============================================== */
.data-section {
    flex-direction: column;
}
.data-title {
    flex-direction: row;
}
.data-label {
    width: 50%;
}
.data-result {
    width: 50%;
}
.tabla-totales {
    background-color: #ddd;
    font-weight: bold;
    border-style: solid;
}
.styled-table {
    width: 100%;
    border-collapse: collapse;
}
.styled-table th, .styled-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
}
.header-block-1 {
    background-color: #004488;
    color: white;
}
.header-block-2 {
    background-color: #008899;
    color: white;
}
.header-block-3 {
    background-color: #AA5500;
    color: white;
}
.total-row {
    font-weight: bold;
    background-color: #f4f4f4;
}

/* ============================================== */
/* MODAL — prefijo tb-                            */
/* ============================================== */
.tb-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.tb-modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.tb-btn-close {
    margin-top: 20px;
    background-color: #28a745;
    color: #fff;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* ============================================== */
/* UTILIDADES EXCLUSIVAS                          */
/* ============================================== */
.opacity-50 {
    opacity: 0.5;
}
.pointer-events-none {
    pointer-events: none;
}
.select-none {
    user-select: none;
}

.scroll-hint {
    font-size: 1.1rem;
    position: fixed;
    top: 10%;
    right: 2%;
    background-color: var(--gray-3);
    padding: 0.8rem;
    border-radius: 0.4rem;
    box-shadow: 0 0 0.1rem var(--black-3);
    color: var(--black-2);
    text-align: center;
    animation: parpadeo 3s infinite;
    margin-bottom: 10px;
}
@keyframes parpadeo {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.tb-table-section {
    height: 85vh !important;
    overflow-y: auto;
    overflow-x: hidden !important;
}

.tb-special-link {
    border: none !important;
}