.editar-parte-page {
    width: 100%;
    padding: 0;
}

.editar-parte-cargando {
    color: #6b7280;
    font-size: 0.95rem;
}

.editar-parte-error {
    color: #ef4444;
    font-size: 0.95rem;
}

/* Header */
.editar-parte-header {
    margin-bottom: 1.5rem;
}

.editar-parte-volver {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    color: #6b7280;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.editar-parte-volver:hover {
    color: #1a1a1a;
}

.editar-parte-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.editar-parte-subtitle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.editar-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;
}

.editar-parte-conductor {
    display: inline-flex;
    align-items: center;
    color: #374151;
}

/* Tarjetas */
.editar-parte-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.editar-parte-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: #1a1a1a;
}

.editar-parte-empty {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
}

/* Campos */
.editar-parte-campo {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.editar-parte-campo label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
}

.editar-parte-campo .form-control,
.editar-parte-campo .form-select {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    color: #1a1a1a;
    background: #fff;
}

.editar-parte-campo .form-control:disabled {
    background: #f3f4f6;
    color: #6b7280;
}

.editar-parte-estado-hint {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Kilometros */
.editar-parte-kilometros {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* Servicios */
.editar-parte-servicios-lista {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.editar-parte-servicio {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.editar-parte-servicio-cabecera {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s;
}

.editar-parte-servicio-cabecera:hover {
    background: #f9fafb;
}

.editar-parte-servicio-nombre {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
}

.editar-parte-servicio-nombre i {
    color: #6b7280;
    font-size: 0.9rem;
}

.editar-parte-servicio-total {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
}

.editar-parte-servicio-eliminar {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #6b7280;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
}

.editar-parte-servicio-eliminar:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

.editar-parte-servicio-campos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 1rem 1rem 1rem;
    border-top: 1px solid #f3f4f6;
    padding-top: 1rem;
}

.editar-parte-aadir-servicio,
.editar-parte-a�adir-servicio {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 1.5px dashed #2563eb;
    border-radius: 10px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2563eb;
    cursor: pointer;
}

.editar-parte-aadir-servicio:hover,
.editar-parte-a�adir-servicio:hover {
    background: #fef2f2;
}

.editar-parte-servicios-card {
    padding: 0;
    overflow: hidden;
    border-color: #e5e1d9;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.editar-parte-servicios-card > .editar-parte-card-title {
    margin: 0;
    padding: 1.25rem;
}

.editar-parte-servicios-card .editar-parte-empty {
    padding: 1rem;
}

.editar-parte-servicios-card .editar-parte-servicios-lista {
    gap: 0;
    margin: 0;
}

.editar-parte-servicios-card .editar-parte-servicio {
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid #e5e1d9;
    background: #f9f9f7;
    overflow: visible;
}

.editar-parte-servicios-card .editar-parte-servicio-cabecera {
    padding: 0.6rem;
}

.editar-parte-servicios-card .editar-parte-servicio-nombre {
    gap: 2rem;
    font-size: 0.8rem;
    font-weight: 400;
}

.editar-parte-servicio-codigo {
    color: #2563eb;
    font-size: 0.7rem;
}

.editar-parte-servicios-card .editar-parte-servicio-total {
    font-size: 0.8rem;
    font-weight: 400;
    flex-shrink: 0;
}

.editar-parte-servicios-card .editar-parte-servicio-eliminar {
    background: transparent;
    border: 0;
    color: #2563eb;
}

.editar-parte-servicios-card .editar-parte-servicio-eliminar:hover {
    background: #eff6ff;
    color: #1e40af;
}

.editar-parte-servicios-card .editar-parte-servicio-campos {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0.5rem 0.6rem 0.6rem;
    border-top: 0;
}

.editar-parte-servicios-card .editar-parte-campo label {
    font-size: 0.75rem;
    font-weight: 400;
    color: #111;
}

.editar-parte-servicios-card .form-control,
.editar-parte-servicios-card .form-select {
    background-color: #f8f7f4;
    border-color: #e5e1d9;
    font-size: 0.75rem;
    padding: 0.45rem 0.6rem;
}

.editar-parte-servicio-importe {
    position: relative;
}

.editar-parte-servicio-importe .form-control {
    padding-right: 2rem;
    appearance: textfield;
    -moz-appearance: textfield;
}

.editar-parte-servicio-importe input::-webkit-inner-spin-button,
.editar-parte-servicio-importe input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.editar-parte-servicio-importe span {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 0.75rem;
    pointer-events: none;
}

.editar-parte-servicios-card > button {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0.8rem;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #2563eb;
    font-size: 0.8rem;
    font-weight: 400;
}

.editar-parte-servicios-card > button:hover {
    background: #eff6ff;
    color: #1e40af;
}

.editar-parte-servicios-card .editar-parte-autocomplete {
    position: relative;
}

.editar-parte-servicios-card .editar-parte-sugerencias {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #e5e1d9;
    border-radius: 8px;
    background: #fff;
    max-height: 200px;
    overflow-y: auto;
}

.editar-parte-servicios-card .editar-parte-sugerencias li {
    padding: 0.5rem 0.6rem;
    font-size: 0.75rem;
    cursor: pointer;
}

.editar-parte-servicios-card .editar-parte-sugerencias li:hover {
    background: #f8f7f4;
}

/* Caja */
.editar-parte-caja {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.editar-parte-total-libreta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f3f4f6;
    padding-top: 1rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.editar-parte-total-libreta strong {
    color: #1a1a1a;
    font-size: 1.1rem;
}

/* Footer */
.editar-parte-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.editar-parte-cancelar {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    background: #fff;
    border: 1px solid #e5e7eb;
    text-decoration: none;
}

.editar-parte-cancelar:hover {
    background: #f3f4f6;
    color: #1a1a1a;
}

.editar-parte-guardar {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: #2563eb;
    border: none;
    cursor: pointer;
}

.editar-parte-guardar:hover {
    background: #1e40af;
}

/* Responsive */
@media (max-width: 767px) {
    .editar-parte-kilometros,
    .editar-parte-caja {
        grid-template-columns: 1fr;
    }

    .editar-parte-servicio-campos {
        grid-template-columns: 1fr;
    }

    .editar-parte-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .editar-parte-cancelar,
    .editar-parte-guardar {
        justify-content: center;
    }
}

/* Fecha */
.editar-parte-fecha {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.editar-parte-fecha-valor {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    text-transform: capitalize;
}

.editar-parte-fecha-picker {
    position: relative;
    display: inline-block;
}

.editar-parte-btn-cambiar-dia,
.editar-parte-btn-cambiar-dia:focus {
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: none;
    outline: none;
}

.editar-parte-btn-cambiar-dia-activo {
    background: #e5e7eb;
    color: #1a1a1a;
}

.editar-parte-btn-cambiar-dia:hover {
    background: #e5e7eb;
}

.editar-parte-fecha-popup {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    z-index: 1000;
    width: 280px;
    padding: 1rem;
}

.editar-parte-calendario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: capitalize;
}

.editar-parte-calendario-nav,
.editar-parte-calendario-nav:focus {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 1rem;
    padding: 0.25rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    outline: none;
}

.editar-parte-calendario-nav:hover {
    color: #1a1a1a;
}

.editar-parte-calendario-semana {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 0.35rem;
}

.editar-parte-calendario-dias {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.editar-parte-calendario-dia,
.editar-parte-calendario-dia:focus {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #374151;
    border-radius: 50%;
    cursor: pointer;
    padding: 0.35rem;
    box-sizing: border-box;
    text-align: center;
    box-shadow: none;
    outline: none;
    border: none;
    background: none;
}

.editar-parte-calendario-dia:hover {
    background: #f3f4f6;
}

.editar-parte-calendario-dia-vacio {
    cursor: default;
    pointer-events: none;
}

.editar-parte-calendario-dia-hoy {
    background: #2563eb;
    color: #fff;
    font-weight: 700;
}

.editar-parte-calendario-dia-seleccionado {
    background: #2563eb;
    color: #fff;
    font-weight: 700;
}

.editar-parte-calendario-dia.editar-parte-calendario-dia-seleccionado:hover {
    background: #1e40af;
}

.editar-parte-fecha-acciones {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.editar-parte-fecha-hoy,
.editar-parte-fecha-hoy:focus,
.editar-parte-fecha-aplicar,
.editar-parte-fecha-aplicar:focus {
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
    box-shadow: none;
    outline: none;
}

.editar-parte-fecha-hoy {
    background: none;
    color: #6b7280;
}

.editar-parte-fecha-hoy:hover {
    color: #1a1a1a;
}

.editar-parte-fecha-aplicar {
    background: #2563eb;
    color: #fff;
}

.editar-parte-fecha-aplicar:hover {
    background: #1e40af;
}
