/* NO tocar display aquí: lo controla .tab-content */
#overview {
    padding: 24px;
    /* display: flex;  <-- eliminado */
    /* flex-direction: column;  <-- eliminado */
    /* gap: 32px;  <-- eliminado */
}

/* Si quieres la estructura en columna, envuelve el contenido en un contenedor interno,
   por ejemplo <div class="overview-inner">...</div> y aplica flex ahí. */

/* HEADER (NO sticky) */
.ov-header {
    padding: 12px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.ov-file-name {
    font-size: 1.6rem;
    margin: 0;
}

.ov-meta {
    display: flex;
    gap: 16px;
    margin-top: 6px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* KPI GRID */
.ov-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.ov-kpi-card {
    background: var(--card-bg);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.ov-kpi-title {
    font-size: 0.9rem;
    opacity: 0.7;
}

.ov-kpi-value {
    font-size: 1.4rem;
    margin-top: 8px;
}

.ov-kpi-semaforo {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-top: 8px;
}

.ov-kpi-semaforo.green { background: #4caf50; }
.ov-kpi-semaforo.yellow { background: #ffb300; }
.ov-kpi-semaforo.red { background: #e53935; }

.ov-kpi-bar {
    height: 8px;
    background: var(--accent-color);
    width: calc(var(--value) * 10%);
    border-radius: 4px;
    margin-top: 8px;
}

/* DATA PREVIEW */
.ov-data-preview {
    margin-top: 28px;
}

.ov-data-preview h4 {
    margin-bottom: 6px;
}

.ov-table-block {
    margin-bottom: 20px;
}

/* QUALITY */
.ov-quality {
    margin-top: 24px;
}

.ov-quality-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.ov-quality-indicator.good { background: #4caf50; }
.ov-quality-indicator.medium { background: #ffb300; }
.ov-quality-indicator.bad { background: #e53935; }

.ov-quality-note {
    margin-top: 8px;
    opacity: 0.8;
}

/* Tooltip container */
.ov-tip {
    position: relative;
    display: inline-block;
    margin-left: 6px;
    cursor: help;
    font-size: 0.85rem;
    color: var(--accent-color);
}

/* Tooltip bubble */
.ov-tip-text {
    visibility: hidden;
    opacity: 0;
    width: 240px;
    background-color: var(--card-bg);
    color: var(--text-color);
    text-align: left;
    border-radius: 6px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    position: absolute;
    z-index: 100;
    bottom: 130%;
    left: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: opacity 0.25s ease-in-out;
    font-size: 0.85rem;
}

/* Tooltip arrow */
.ov-tip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 12px;
    border-width: 6px;
    border-style: solid;
    border-color: var(--border-color) transparent transparent transparent;
}

/* Show tooltip on hover */
.ov-tip:hover .ov-tip-text {
    visibility: visible;
    opacity: 1;
}