.ddm-cli-hidden-duplicate {
    display: none !important;
}

.ddm-cliente-edit-box {
    margin: 0 0 20px;
    padding: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
}

.ddm-cli-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.ddm-cli-head h4 {
    margin: 0;
    font-size: 16px;
    color: #0f172a;
}

.ddm-cli-tipo {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
}

.ddm-cli-intro,
.ddm-cli-hint {
    margin: 0 0 14px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.45;
}

.ddm-cli-section {
    margin-bottom: 14px;
}

.ddm-cli-section h5 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #334155;
}

.ddm-cli-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.ddm-cli-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ddm-cli-field.narrow {
    max-width: 140px;
}

.ddm-cli-field span {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.ddm-cli-field input {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
}

.ddm-cli-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.ddm-cli-actions .btn-save {
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ddm-cli-actions .btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ddm-cli-msg {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
}

.ddm-cli-msg.ok {
    background: #dcfce7;
    color: #166534;
}

.ddm-cli-msg.err {
    background: #fee2e2;
    color: #b91c1c;
}

.ddm-cli-msg {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.ddm-cli-open-conflitto {
    cursor: pointer;
    border: 1px solid #fca5a5;
    background: #fff;
    color: #b91c1c;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.ddm-cli-open-conflitto:hover {
    background: #fef2f2;
}

.ddm-cli-open-conflitto:disabled {
    opacity: 0.6;
    cursor: wait;
}

.ddm-cli-referenti-edit {
    margin-top: 14px;
}

.ddm-cli-ref-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
}

.ddm-cli-ref-table th,
.ddm-cli-ref-table td {
    border: 1px solid #e2e8f0;
    padding: 8px;
    vertical-align: middle;
}

.ddm-cli-ref-table th {
    background: #f1f5f9;
    text-align: left;
    font-weight: 600;
}

.ddm-cli-ref-table input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px;
    font-size: 13px;
}

.ddm-cli-ref-actions {
    white-space: nowrap;
}

.ddm-cli-ref-actions .btn-mini {
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    margin-right: 4px;
}

.ddm-cli-ref-actions .btn-mini.save {
    background: #16a34a;
    color: #fff;
}

.ddm-cli-ref-actions .btn-mini.del {
    background: #fee2e2;
    color: #b91c1c;
}

.ddm-cli-principale {
    font-size: 11px;
    font-weight: 700;
    color: #1d4ed8;
}

@media (max-width: 768px) {
    .ddm-cli-grid {
        grid-template-columns: 1fr;
    }

    .ddm-cli-field.narrow {
        max-width: none;
    }

    .ddm-cli-ref-table {
        display: block;
        overflow-x: auto;
    }
}

/* Pulsante Anagrafica in Gestione Riparazione */
.ddm-gestione-cliente-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ddm-open-anagrafica-btn {
    cursor: pointer;
    border: 1px solid #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.ddm-open-anagrafica-btn:hover {
    background: #dbeafe;
}

.ddm-open-anagrafica-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Modale anagrafica da scheda riparazione */
.ddm-anagrafica-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    overflow: auto;
}

.ddm-anagrafica-modal {
    width: min(720px, 100%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
    overflow: hidden;
}

.ddm-anagrafica-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 8px;
    border-bottom: 1px solid #e2e8f0;
}

.ddm-anagrafica-modal-head h3 {
    margin: 0;
    font-size: 18px;
    color: #0f172a;
}

.ddm-anagrafica-modal-close {
    border: none;
    background: #f1f5f9;
    color: #334155;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.ddm-anagrafica-modal-body {
    margin: 0;
    border: none;
    border-radius: 0;
    background: #fff;
}

.ddm-cli-actions .btn-cancel {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 16px;
    background: #f8fafc;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 8px;
}

.ddm-cli-actions {
    gap: 8px;
}
