.detalle-parte-page {
    padding: 0;
}

.detalle-parte-cargando {
    color: #6b7280;
    font-size: 0.95rem;
}

/* Header */
.detalle-parte-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detalle-parte-volver {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    color: #6b7280;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.detalle-parte-volver:hover {
    color: #1a1a1a;
}

.detalle-parte-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.detalle-parte-subtitle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.detalle-parte-licencia {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.detalle-parte-vehiculo {
    color: #374151;
}

.detalle-parte-conductor {
    display: inline-flex;
    align-items: center;
    color: #374151;
}

.estado-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #e5e7eb;
}

.estado-badge.editable {
    color: #16a34a;
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.detalle-parte-actions {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

.btn-editar-parte {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.btn-editar-parte:hover {
    background: #f3f4f6;
}

.btn-eliminar-parte {
    background: #2563eb;
    border: 1px solid #2563eb;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.btn-eliminar-parte:hover {
    background: #1e40af;
    border-color: #1e40af;
}

.btn-editar-parte:disabled,
.btn-editar-parte:disabled:hover {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-eliminar-parte:disabled,
.btn-eliminar-parte:disabled:hover {
    background: #93b4f5;
    border-color: #93b4f5;
    color: #fff;
    cursor: not-allowed;
}

/* Tarjetas */
.detalle-parte-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.detalle-parte-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: #1a1a1a;
}

.detalle-parte-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.detalle-parte-card-header .detalle-parte-card-title {
    margin: 0;
}

.detalle-parte-servicios-total {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 600;
}

/* Kil�metros */
.detalle-parte-kilometros {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.detalle-parte-km-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.detalle-parte-km-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a1a;
}

.detalle-parte-km-value.recorridos {
    color: #2563eb;
}

/* Servicios */
.detalle-parte-servicios-lista {
    list-style: none;
    margin: 0;
    padding: 0;
}

.detalle-parte-servicio {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.detalle-parte-servicio:last-child {
    border-bottom: none;
}

.detalle-parte-servicio-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #6b7280;
}

.detalle-parte-servicio-info i {
    font-size: 1rem;
}

.detalle-parte-servicio-nombre {
    color: #1a1a1a;
    font-size: 0.9rem;
}

.detalle-parte-servicio-importe {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a1a;
}

/* Caja */
.detalle-parte-caja-resumen {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 1rem;
}

.detalle-parte-caja-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.detalle-parte-caja-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
}

.detalle-parte-caja-seccion {
    background: #f9fafb;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.detalle-parte-caja-seccion:last-child {
    margin-bottom: 0;
}

.detalle-parte-caja-subtitle {
    font-size: 0.7rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.75rem 0;
}

.detalle-parte-caja-fila {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    padding: 0.4rem 0;
    color: #374151;
}

/* Observaciones */
.detalle-parte-observaciones {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* Auditor�a */
.detalle-parte-auditoria p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 0.5rem 0;
}

.detalle-parte-auditoria p:last-child {
    margin-bottom: 0;
}

.detalle-parte-empty {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
}

.matricula-badge {
    display: inline-flex;
    align-items: center;
    background-color: #f3f4f6;
    color: #1a1a1a;
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.parte-eliminar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.78);
}

.parte-eliminar-modal {
    width: 100%;
    max-width: 410px;
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    padding: 22px 20px 20px;
    border: 1px solid #dedbd5;
    border-radius: 10px;
    background: #faf9f6;
    color: #333;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.parte-eliminar-title {
    margin: 0 0 10px;
    font-size: 0.9rem;
    font-weight: 700;
}

.parte-eliminar-descripcion {
    margin: 0 0 16px;
    color: #77746d;
    font-size: 0.72rem;
    line-height: 1.4;
}

.parte-eliminar-descripcion strong {
    color: #333;
}

.parte-eliminar-label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.72rem;
}

.parte-eliminar-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #e5e1d9;
    border-radius: 8px;
    background: transparent;
    color: #333;
    font-size: 0.75rem;
}

.parte-eliminar-input:focus {
    outline: 2px solid #dc7984;
    outline-offset: 1px;
}

.parte-eliminar-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 13px;
}

.parte-eliminar-cancelar,
.parte-eliminar-confirmar {
    padding: 7px 12px;
    border: 1px solid #e5e1d9;
    border-radius: 8px;
    font-size: 0.72rem;
    cursor: pointer;
}

.parte-eliminar-cancelar {
    background: transparent;
    color: #111;
}

.parte-eliminar-confirmar {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    font-weight: 600;
}

.parte-eliminar-confirmar:hover:not(:disabled) {
    background: #1e40af;
    border-color: #1e40af;
}

.parte-eliminar-confirmar:disabled {
    background: #93b4f5;
    border-color: #93b4f5;
    cursor: not-allowed;
}

.parte-eliminar-cancelar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 767px) {
    .detalle-parte-header {
        flex-direction: column;
    }

    .detalle-parte-actions {
        width: 100%;
    }

    .btn-editar-parte,
    .btn-eliminar-parte {
        flex: 1;
        justify-content: center;
    }

    .detalle-parte-kilometros {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .detalle-parte-km-item.text-center,
    .detalle-parte-km-item.text-end {
        text-align: left;
    }

    .detalle-parte-caja-resumen {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .detalle-parte-caja-item.text-end {
        text-align: left;
    }
}
