/* Ricerca unificata Lab PC — codice / seriale / cliente */
.ddm-pc-cerca-panel {
    background: #eff6ff;
    border: 1px solid #93c5fd;
    border-radius: 12px;
    margin: 0 0 16px;
    padding: 16px 18px;
}

.ddm-pc-cerca-panel h3 {
    margin: 0 0 6px;
    font-size: 15px;
    color: #1e3a5f;
}

.ddm-pc-cerca-panel .ddm-pc-cerca-hint {
    margin: 0 0 12px;
    font-size: 13px;
    color: #1e40af;
    line-height: 1.45;
}

.ddm-pc-cerca-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: stretch;
}

.ddm-pc-cerca-row input {
    flex: 1 1 240px;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

.ddm-pc-cerca-row button,
.ddm-pc-cerca-btn-primary,
.ddm-pc-cerca-btn-secondary {
    cursor: pointer;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 14px;
}

.ddm-pc-cerca-row button[data-ddm-pc-cerca-btn],
.ddm-pc-cerca-btn-primary {
    background: #2563eb;
    color: #fff;
}

.ddm-pc-cerca-btn-secondary,
.ddm-pc-cerca-row button[data-ddm-pc-nuovo-cliente] {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.ddm-pc-cerca-row button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.ddm-pc-cerca-error {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 13px;
}

.ddm-pc-cerca-results {
    margin-top: 14px;
}

.ddm-pc-cerca-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.ddm-pc-cerca-results-header strong {
    color: #1e3a5f;
}

.ddm-pc-cerca-badge {
    color: #fff;
    background: #2563eb;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.ddm-pc-badge-muted {
    background: #94a3b8;
}

.ddm-pc-cerca-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    font-size: 13px;
}

.ddm-pc-cerca-table th,
.ddm-pc-cerca-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.ddm-pc-cerca-table th {
    background: #f8fafc;
    font-size: 12px;
    color: #475569;
}

.ddm-pc-cerca-table .sub {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-top: 2px;
}

.ddm-pc-cerca-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ddm-pc-cerca-actions button {
    cursor: pointer;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
}

.ddm-pc-cerca-btn-nuova {
    color: #065f46;
    background: #d1fae5;
}

.ddm-pc-cerca-btn-gestisci {
    color: #1e40af;
    background: #dbeafe;
}

.ddm-pc-cerca-btn-info {
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
}

.ddm-pc-info-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ddm-pc-info-modal {
    width: min(720px, 100%);
    max-height: min(90vh, 820px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ddm-pc-info-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.ddm-pc-info-modal-header h3 {
    margin: 0;
    font-size: 16px;
    color: #0f172a;
}

.ddm-pc-info-modal-close {
    cursor: pointer;
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: #64748b;
    padding: 0 4px;
}

.ddm-pc-info-modal-body {
    padding: 16px 18px;
    overflow-y: auto;
}

.ddm-pc-info-modal-body h4 {
    margin: 16px 0 8px;
    font-size: 14px;
    color: #334155;
}

.ddm-pc-info-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px 14px;
    padding: 12px;
    border-radius: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.ddm-pc-info-summary .lbl {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    margin-bottom: 2px;
}

.ddm-pc-info-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.ddm-pc-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ddm-pc-info-table th,
.ddm-pc-info-table td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #e2e8f0;
}

.ddm-pc-info-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
}

.ddm-pc-info-table .sub {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: #64748b;
}

.ddm-pc-info-stato {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.ddm-pc-info-stato.aperto {
    background: #fef3c7;
    color: #92400e;
}

.ddm-pc-tag-aperto {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-weight: 700;
    font-size: 12px;
}

.ddm-pc-cerca-aperto {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 13px;
}

.ddm-pc-cerca-footer-nuova {
    margin-top: 10px;
}

.ddm-pc-cerca-footer-nuova button {
    color: #065f46;
    cursor: pointer;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 13px;
}

.ddm-pc-cerca-empty {
    margin-top: 8px;
    padding: 14px;
    border-radius: 8px;
    background: #fff;
    border: 1px dashed #93c5fd;
    color: #1e3a5f;
}

.ddm-pc-cerca-empty.compact {
    margin-top: 10px;
}

.ddm-pc-cerca-empty p {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.45;
}

.ddm-pc-cliente-card {
    background: #fff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

.ddm-pc-cliente-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.ddm-pc-cliente-card-head .sub {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-top: 2px;
}

/* Nasconde la barra cliente nativa: resta in DOM per il bridge */
.form-accettazione.ddm-pc-unified-search .cliente-autocomplete {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.form-accettazione.ddm-pc-unified-search .form-group-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Il "Nuovo cliente" nativo resta accessibile sotto; lo nascondiamo se abbiamo il nostro */
.form-accettazione.ddm-pc-unified-search .form-group-inline > .btn-quick-client {
    display: none;
}

@media (max-width: 720px) {
    .ddm-pc-cerca-table {
        display: block;
        overflow-x: auto;
    }
}
