/* == REPARTO / LIQUIDACIONES ============================= */

.reparto-liquidaciones-page {
    width: 100%;
    max-width: 100%;
}

.reparto-seccion {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.reparto-seccion-titulo {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.35rem 0;
}

.reparto-seccion-subtitulo {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0 0 1.25rem 0;
    line-height: 1.45;
    max-width: 800px;
}

.reparto-global-card {
    background: #faf9f7;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
}

.reparto-global-campo {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 320px;
}

.reparto-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1f2937;
}

.reparto-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.reparto-input {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f7f7f5;
    padding: 0.55rem 0.75rem;
    font-size: 0.875rem;
    color: #1f2937;
    font-family: inherit;
    box-sizing: border-box;
    min-width: 0;
}

.reparto-input:focus {
    outline: none;
    border-color: #9ca3af;
    background: #fff;
}

.reparto-input[type="number"] {
    width: 90px;
    text-align: center;
}

.reparto-select {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f7f7f5;
    padding: 0.55rem 0.75rem;
    font-size: 0.875rem;
    color: #1f2937;
    font-family: inherit;
    min-width: 140px;
    cursor: pointer;
}

.reparto-select:focus {
    outline: none;
    border-color: #9ca3af;
    background: #fff;
}

.reparto-reglas {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.reparto-regla {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #faf9f7;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.85rem 1rem;
}

.reparto-regla-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.reparto-regla-nombre {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
}

.reparto-regla-descripcion {
    font-size: 0.78rem;
    color: #6b7280;
}

.reparto-regla-acciones {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    flex-shrink: 0;
}

.reparto-campo {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.reparto-regla-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.reparto-input-porcentaje {
    width: 70px !important;
}

.reparto-ejemplo-card {
    background: #faf9f7;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    overflow-x: auto;
}

.reparto-ejemplo-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.reparto-ejemplo-tabla th,
.reparto-ejemplo-tabla td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    vertical-align: middle;
}

.reparto-ejemplo-tabla thead tr {
    border-bottom: 1px solid #e5e7eb;
}

.reparto-ejemplo-tabla th {
    font-size: 0.72rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.reparto-ejemplo-tabla tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

.reparto-ejemplo-tabla tbody tr:last-child {
    border-bottom: none;
}

.reparto-ejemplo-tabla td:nth-child(2),
.reparto-ejemplo-tabla td:nth-child(3),
.reparto-ejemplo-tabla th:nth-child(2),
.reparto-ejemplo-tabla th:nth-child(3) {
    text-align: right;
}

.reparto-ejemplo-resultado td {
    font-weight: 700;
    color: #e02020;
}

/* == RESPONSIVE ========================================= */

@media (max-width: 1024px) {
    .reparto-regla {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .reparto-regla-acciones {
        width: 100%;
        flex-wrap: wrap;
    }

    .reparto-campo {
        flex: 1;
        min-width: 140px;
    }

    .reparto-regla-label {
        width: 100%;
    }

    .reparto-select,
    .reparto-input-porcentaje {
        width: 100%;
    }

    .reparto-regla-acciones .admin-btn {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .reparto-seccion {
        padding: 1rem;
    }

    .reparto-global-campo {
        max-width: 100%;
    }

    .reparto-input-group {
        flex-wrap: wrap;
    }

    .reparto-input[type="number"],
    .reparto-input-porcentaje {
        width: 100% !important;
        text-align: left;
    }

    .reparto-regla-acciones {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .reparto-campo {
        width: 100%;
        min-width: auto;
    }

    .reparto-select {
        width: 100%;
        min-width: auto;
    }

    .reparto-regla-acciones .admin-btn {
        width: 100%;
    }

    .reparto-ejemplo-tabla th,
    .reparto-ejemplo-tabla td {
        padding: 0.5rem 0.35rem;
        font-size: 0.8rem;
    }
}