/* =====================================================================
   🎯 MESA DE DISTRIBUIÇÃO — CSS PREMIUM
   ===================================================================== */

/* Fundo do modal */
#modalMesaDistribuicao .modal-content {
    background: #f1f5f9;
    border-radius: 20px;
    overflow: hidden;
}

#modalMesaDistribuicao .modal-header {
    background: linear-gradient(135deg, #1b1e24 0%, #2b303b 100%);
    border-bottom: 3px solid #fd7e14;
    padding: 20px 24px;
}

#modalMesaDistribuicao .modal-header .modal-title {
    color: #fff;
    font-weight: 900;
    letter-spacing: 0.5px;
}

/* Header das colunas (OS / Técnicos) */
.mesa-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.mesa-col-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    font-size: 0.8rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #64748b;
}

.mesa-col-title i {
    color: #fd7e14;
    font-size: 1rem;
}

.mesa-counter {
    background: #fd7e14;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 900;
    padding: 2px 10px;
    border-radius: 20px;
    margin-left: 8px;
}

/* Select de filtro */
.mesa-filter-select {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 0.85rem;
    color: #1e293b;
    transition: all 0.2s;
    cursor: pointer;
    max-width: 180px;
}

.mesa-filter-select:hover, .mesa-filter-select:focus {
    border-color: #fd7e14;
    box-shadow: 0 0 0 3px rgba(253, 126, 20, 0.1);
    outline: none;
}

/* Container das listas */
#bulkOrdersList, #bulkTechsList {
    padding: 8px;
    background: #f8fafc;
    border-radius: 16px;
    max-height: 62vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

#bulkOrdersList::-webkit-scrollbar, #bulkTechsList::-webkit-scrollbar {
    width: 8px;
}

#bulkOrdersList::-webkit-scrollbar-thumb, #bulkTechsList::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* Card da OS */
.bulk-order-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 10px;
    cursor: grab;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

.bulk-order-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #94a3b8;
    transition: background 0.2s;
}

.bulk-order-card[data-technician-id]:not([data-technician-id=""])::before {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

.bulk-order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    border-color: #fd7e14;
}

.bulk-order-card:active {
    cursor: grabbing;
}

.bulk-order-card .form-check-input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    border: 2px solid #cbd5e1;
    transition: all 0.2s;
}

.bulk-order-card .form-check-input:checked {
    background-color: #fd7e14;
    border-color: #fd7e14;
}

.bulk-order-client {
    font-weight: 900;
    color: #1e293b;
    font-size: 0.95rem;
    line-height: 1.2;
}

.bulk-order-details {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.bulk-order-badge {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    white-space: nowrap;
}

.bulk-order-badge.assigned {
    background: #dbeafe;
    color: #1e40af;
}

/* Card do técnico */
.bulk-tech-card {
    background: #fff;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: all 0.25s ease;
    min-height: 80px;
}

.bulk-tech-card:hover {
    border-color: #94a3b8;
}

.bulk-tech-card.drag-over {
    background: #dcfce7;
    border-color: #10b981;
    border-style: solid;
    transform: scale(1.02);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.bulk-tech-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fd7e14 0%, #ea580c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 900;
    flex-shrink: 0;
}

.bulk-tech-name {
    font-weight: 900;
    color: #1e293b;
    font-size: 0.95rem;
}

.bulk-tech-counter {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 700;
}

.bulk-tech-counter span {
    color: #fd7e14;
    font-weight: 900;
}

/* Dropzone (onde as OS caem) */
.bulk-tech-dropzone {
    margin-top: 10px;
    min-height: 10px;
    padding: 4px 0;
    border-radius: 10px;
    transition: all 0.2s;
}

.bulk-tech-dropzone:not(:empty) {
    background: #f8fafc;
    padding: 8px;
    border: 1px dashed #e2e8f0;
}

/* Botão "Selecionar Técnicos" */
.btn-select-techs {
    background: #fff;
    border: 2px solid #fd7e14;
    color: #fd7e14;
    font-weight: 900;
    font-size: 0.8rem;
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.2s;
}

.btn-select-techs:hover {
    background: #fd7e14;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(253, 126, 20, 0.3);
}

/* Botão "Selecionar Todas" */
.btn-select-all {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 10px;
    border-radius: 10px;
    width: 100%;
    margin-top: 8px;
    transition: all 0.2s;
}

.btn-select-all:hover {
    background: #fd7e14;
    border-color: #fd7e14;
    color: #fff;
}

/* Botão "Confirmar Reorganização" */
.btn-confirm-mesa {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: #fff;
    font-weight: 900;
    padding: 10px 28px;
    border-radius: 30px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-confirm-mesa:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

/* Modal de seleção de técnicos */
#modalSelecionarTecnicos .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

#modalSelecionarTecnicos .modal-header {
    background: linear-gradient(135deg, #1b1e24 0%, #2b303b 100%);
    border-bottom: 3px solid #fd7e14;
    color: #fff;
    border-radius: 16px 16px 0 0;
}

#modalSelecionarTecnicos .tech-select-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 6px;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid transparent;
}

#modalSelecionarTecnicos .tech-select-row:hover {
    background: #fff;
    border-color: #fd7e14;
    box-shadow: 0 2px 8px rgba(253, 126, 20, 0.1);
}

#modalSelecionarTecnicos .tech-select-row input:checked + span {
    color: #fd7e14;
    font-weight: 900;
}