/* ==========================================================================
   TMV DCF Valuation Pro — v1.1.0
   Gabriel Llano / TodoMontevideo
   ========================================================================== */

/* BASE */
.tmv-dcf-wrap {
    font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
    max-width: 1180px;
    margin: 24px auto;
    color: #eef3fb;
}

/* HERO */
.tmv-dcf-hero {
    background: linear-gradient(135deg, #08111f, #10233c 55%, #520f16);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 24px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    box-shadow: 0 24px 80px rgba(0,0,0,.25);
}
.tmv-kicker {
    color: #ff334f;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 800;
    font-size: 12px;
}
.tmv-dcf-hero h1,
.tmv-dcf-hero h2 {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    margin: .25em 0;
    font-size: 34px;
    line-height: 1.05;
}
.tmv-dcf-hero p {
    color: #cbd5e1;
    font-size: 16px;
}
.tmv-dcf-badge {
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.08);
    padding: 18px;
    border-radius: 18px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
}

/* CARDS */
.tmv-card {
    background: #0f1b2d;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 22px;
    margin: 18px 0;
    padding: 24px;
    box-shadow: 0 14px 44px rgba(0,0,0,.18);
}
.tmv-card.light {
    background: #fff;
    color: #102033;
}
.tmv-card h3 {
    margin-top: 0;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}
.tmv-card.light h3 {
    color: #102033 !important;
    -webkit-text-fill-color: #102033 !important;
}

/* GLOSARIO */
.tmv-dcf-wrap .tmv-glossary,
.tmv-dcf-wrap details.tmv-glossary,
.tmv-dcf-wrap details.tmv-card.tmv-glossary,
details.tmv-glossary,
#page .tmv-dcf-wrap details,
.site-content .tmv-dcf-wrap details {
    background: #0f1b2d !important;
    background-color: #0f1b2d !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    border-radius: 22px !important;
    color: #eef3fb !important;
    -webkit-text-fill-color: #eef3fb !important;
    padding: 24px !important;
    margin: 12px 0 !important;
    box-shadow: 0 14px 44px rgba(0,0,0,.18) !important;
}
.tmv-dcf-wrap details summary,
.tmv-dcf-wrap .tmv-glossary summary,
#page .tmv-dcf-wrap details summary,
.site-content .tmv-dcf-wrap details summary {
    background: transparent !important;
    background-color: transparent !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    list-style: none !important;
    padding: 0 !important;
    border: none !important;
    opacity: 1 !important;
}
.tmv-dcf-wrap details summary::-webkit-details-marker,
.tmv-dcf-wrap details summary::marker { display: none; }
.tmv-dcf-wrap .tmv-glossary summary {
    list-style: none;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    opacity: 1 !important;
}
.tmv-glossary summary::-webkit-details-marker { display: none; }
.tmv-glosario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.tmv-dcf-wrap .tmv-glosario-grid div {
    background: rgba(255,255,255,.06) !important;
    border-radius: 12px;
    padding: 14px;
}
.tmv-dcf-wrap .tmv-glosario-grid strong {
    display: block !important;
    color: #ff334f !important;
    -webkit-text-fill-color: #ff334f !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    margin-bottom: 4px;
    opacity: 1 !important;
}
.tmv-dcf-wrap .tmv-glosario-grid p {
    margin: 0;
    font-size: 13px !important;
    color: #cbd5e1 !important;
    -webkit-text-fill-color: #cbd5e1 !important;
    line-height: 1.5;
    opacity: 1 !important;
}

/* GRID DE CAMPOS */
.tmv-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.tmv-grid label,
.tmv-dcf-wrap .tmv-card .tmv-grid label,
.tmv-dcf-wrap label {
    color: #cbd5e1 !important;
    -webkit-text-fill-color: #cbd5e1 !important;
    opacity: 1 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    display: block;
}
.tmv-dcf-wrap .tmv-grid input,
.tmv-dcf-wrap .tmv-grid select,
.tmv-dcf-wrap .tmv-dcf-table input {
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 7px;
    background: #fff !important;
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    border: 1px solid #d8dee9 !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: 46px !important;
    appearance: auto !important;
    -webkit-appearance: auto !important;
    vertical-align: middle;
    overflow: visible !important;
}
/* Select específico — forzar visibilidad del texto */
.tmv-dcf-wrap .tmv-grid select {
    padding-right: 28px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* TABLA DE FLUJOS */
.tmv-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.tmv-table-scroll { overflow: auto; }
.tmv-dcf-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    color: #111;
    border-radius: 16px;
    overflow: hidden;
}
.tmv-dcf-table th {
    background: #152742;
    color: #fff;
    text-align: left;
    padding: 12px;
}
.tmv-dcf-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 10px;
}
.tmv-dcf-table.report th { background: #0e1d33; }

/* PANEL DE RESULTADOS */
.tmv-results {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0;
}
.tmv-results div {
    background: linear-gradient(180deg, #fff, #f1f5f9);
    color: #0f172a;
    border-radius: 18px;
    padding: 18px;
    border: 1px solid #e2e8f0;
}
.tmv-results span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 800;
}
.tmv-results strong {
    font-size: 24px;
    color: #0f172a;
}

/* BOTONES */
.tmv-dcf-wrap .tmv-btn,
.tmv-dcf-wrap button.tmv-btn,
.tmv-dcf-wrap a.tmv-btn {
    border: 0 !important;
    border-radius: 14px !important;
    padding: 14px 24px !important;
    background: #d71935 !important;
    background-color: #d71935 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-weight: 900 !important;
    font-size: 15px !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: inline-block !important;
    margin: 6px 8px 6px 0 !important;
    transition: opacity .15s !important;
    opacity: 1 !important;
    box-shadow: none !important;
    outline: none;
    line-height: 1.2 !important;
    letter-spacing: .04em !important;
    text-transform: uppercase !important;
}
.tmv-dcf-wrap .tmv-btn:hover,
.tmv-dcf-wrap button.tmv-btn:hover {
    opacity: .85 !important;
    background: #d71935 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}
.tmv-dcf-wrap .tmv-btn.secondary,
.tmv-dcf-wrap button.tmv-btn.secondary {
    background: #243b5a !important;
    background-color: #243b5a !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}
.tmv-dcf-wrap .tmv-btn.secondary:hover,
.tmv-dcf-wrap button.tmv-btn.secondary:hover {
    background: #1a2d47 !important;
    background-color: #1a2d47 !important;
}

/* BIG VALUE (portada del reporte) */
.tmv-big-value {
    background: #fff;
    color: #0f172a;
    border-radius: 20px;
    padding: 22px;
    min-width: 260px;
}
.tmv-big-value span {
    font-size: 12px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 900;
}
.tmv-big-value strong {
    display: block;
    font-size: 30px;
    color: #0f172a;
}

/* REPORTE */
.tmv-report { color: #0f172a; }
.tmv-report .cover { margin-bottom: 20px; }

/* RESPONSIVE */
@media (max-width: 800px) {
    .tmv-dcf-hero,
    .tmv-section-head { display: block; }
    .tmv-grid,
    .tmv-results { grid-template-columns: 1fr; }
    .tmv-dcf-hero h1,
    .tmv-dcf-hero h2 { font-size: 26px; }
    .tmv-big-value { margin-top: 18px; min-width: 0; }
    .tmv-glosario-grid { grid-template-columns: 1fr; }
}

/* PRINT */
@media print {
    body * { visibility: hidden; }
    .tmv-report,
    .tmv-report * { visibility: visible; }
    .tmv-report {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        max-width: none;
        color: #0f172a;
    }
    .tmv-btn { display: none; }
    .tmv-dcf-hero {
        box-shadow: none;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .tmv-card.light { border: 1px solid #ddd; }
    .tmv-results div { border: 1px solid #ddd; }
}
