/* Estilos específicos Regla del 72 */

/* Tabs modo: estimar años / estimar tasa */
.modo-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.4rem;
    flex-wrap: wrap;
}

.modo-tab {
    flex: 1;
    min-width: 130px;
    padding: 0.6rem 0.8rem;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-soft);
    font-family: var(--font-primary);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.modo-tab.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Indicador principal */
.r72-indicator {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-soft);
    margin-top: 1rem;
    grid-column: 1 / -1;
}

.r72-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.r72-icon.fast {
    background: #d1fae5;
    color: #059669;
}

.r72-icon.medium {
    background: #dbeafe;
    color: #2563eb;
}

.r72-icon.slow {
    background: #fef3c7;
    color: #d97706;
}

.r72-icon.veryslow {
    background: #fee2e2;
    color: #dc2626;
}

.r72-verdict {
    font-family: var(--font-primary);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-color);
}

.r72-verdict span {
    display: block;
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* Tabla de referencia rápida */
.tabla-referencia {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    font-family: var(--font-primary);
}

.tabla-referencia th {
    background: var(--bg-soft);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.8rem;
    text-align: right;
    border-bottom: 2px solid var(--border-color);
}

.tabla-referencia th:first-child {
    text-align: left;
}

.tabla-referencia td {
    padding: 0.45rem 0.8rem;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.tabla-referencia td:first-child {
    text-align: left;
    font-weight: 600;
}

.tabla-referencia tr.destacada td {
    background: #eff6ff;
    color: var(--primary-color);
    font-weight: 700;
}

.tabla-referencia td.exacto {
    color: #059669;
    font-weight: 700;
}

.tabla-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Regla del 69 y 114 cards */
.reglas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.regla-card {
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.1rem 1.2rem;
    text-align: center;
}

.regla-card.highlight {
    border-color: var(--secondary-color);
    background: #eff6ff;
}

.regla-numero {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.2rem;
}

.regla-card.highlight .regla-numero {
    color: var(--secondary-color);
}

.regla-label {
    font-size: 0.78rem;
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.regla-resultado {
    font-size: 1.05rem;
    font-weight: 700;
    font-family: var(--font-primary);
    color: var(--text-color);
}

.regla-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* Barra visual de progreso */
.duplicacion-bar {
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 0.5rem;
}

.duplicacion-bar h3 {
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.bar-item {
    margin-bottom: 0.9rem;
}

.bar-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.3rem;
}

.bar-label {
    font-size: 0.8rem;
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--text-color);
}

.bar-valor {
    font-size: 0.8rem;
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--primary-color);
}

.bar-track {
    height: 10px;
    background: var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 5px;
    background: var(--primary-color);
    transition: width 0.6s ease;
}

.bar-fill.active {
    background: var(--secondary-color);
}