/* ============================================
   COSTOS INICIALES
   ============================================ */

.ci-container {
    font-family: 'Plus Jakarta Sans', sans-serif;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ci-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.ci-header h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

.ci-btn-primary {
    padding: 7px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: #1A4480;
    color: #fff;
    transition: background 0.2s;
}

.ci-btn-primary:hover { background: #153670; }
.ci-btn-primary:disabled { background: #94a3b8; cursor: not-allowed; }

.ci-btn-secondary {
    padding: 7px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    color: #475569;
    transition: background 0.2s;
}

.ci-btn-secondary:hover { background: #f1f5f9; }

.ci-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.78rem;
}

.ci-action-btn:hover { background: #f1f5f9; }

.ci-filtros {
    display: flex;
    gap: 8px;
    padding: 8px 24px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    align-items: center;
}

.ci-tabla-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px;
}

.ci-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
    table-layout: fixed;
}

.ci-tabla thead th {
    background: #1A4480;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    padding: 8px 10px;
    text-align: left;
    position: sticky !important;
    top: 0;
    z-index: 1;
    letter-spacing: 0.5px;
}
.ci-tabla thead tr th:first-child { border-radius: 6px 0 0 0; }
.ci-tabla thead tr th:last-child { border-radius: 0 6px 0 0; }

.ci-tabla tbody td {
    padding: 4px 10px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 0.7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ci-tabla tbody tr:hover { background: #f8fafc; }

.ci-costo-input {
    padding: 4px 8px;
    font-size: 0.72rem;
    border: 1px solid #CBD5E1;
    border-radius: 4px;
    width: 100%;
    font-family: 'Plus Jakarta Sans', sans-serif;
    text-align: right;
}

.ci-costo-input:focus {
    outline: none;
    border-color: #1A4480;
    box-shadow: 0 0 0 2px rgba(26,68,128,0.2);
}

.ci-dif-positiva {
    color: #10B981;
    font-weight: 600;
}

.ci-dif-negativa {
    color: #dc2626;
    font-weight: 600;
}

#pageCostosIniciales input:focus,
#pageCostosIniciales select:focus,
#pageCostosIniciales textarea:focus {
    border-color: var(--azul-400);
    box-shadow: 0 0 0 3px rgba(37,99,160,0.12);
    outline: none;
}
#pageCostosIniciales *:focus:not(input):not(select):not(textarea):not(button),
#pageCostosIniciales *:focus-visible:not(input):not(select):not(textarea):not(button) {
    outline: none !important;
}

.ci-paginacion {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 8px 24px;
}

.ci-page-btn {
    padding: 4px 10px;
    font-size: 0.72rem;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    color: #475569;
}

.ci-page-btn:hover { background: #f1f5f9; }
.ci-page-btn.active { background: #1A4480; color: #fff; border-color: #1A4480; }

.ci-modal {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ci-form-group label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 3px;
}
