/* =============================================
   Dashboard de Tickets - CRMNG
   ============================================= */
.ticket-locked {
    opacity: 0.7;
    cursor: not-allowed;
}

.ticket-card {
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    cursor: grab;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    /* overflow: hidden REMOVIDO — estava bloqueando z-index dos filhos */
    min-height: 140px;
}

.ticket-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #075E54 0%, #128C7E 100%);
    border-radius: 16px 16px 0 0;
    z-index: 0;
}

/* ::after REMOVIDO — era o principal culpado por sobrepor o conteúdo */

.ticket-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(18, 140, 126, 0.2);
}

/* === Prioridades === */
.ticket-card.prioridade-alta {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.08) 0%, rgba(220, 53, 69, 0.02) 100%);
    border-color: rgba(220, 53, 69, 0.15);
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.1);
}

.ticket-card.prioridade-alta::before {
    background: linear-gradient(90deg, #dc3545 0%, #c82333 100%);
    animation: priorityPulse 2s ease-in-out infinite;
}

.ticket-card.prioridade-media {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.12) 0%, rgba(255, 193, 7, 0.04) 100%);
    border-color: rgba(255, 193, 7, 0.2);
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.08);
}

.ticket-card.prioridade-media::before {
    background: linear-gradient(90deg, #ffc107 0%, #e0a800 100%);
    animation: priorityPulse 2.5s ease-in-out infinite;
}

.ticket-card.prioridade-baixa {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(40, 167, 69, 0.01) 100%);
    border-color: rgba(40, 167, 69, 0.1);
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.05);
}

.ticket-card.prioridade-baixa::before {
    background: linear-gradient(90deg, #28a745 0%, #218838 100%);
    animation: priorityPulse 3s ease-in-out infinite;
}

/* === Drag and Drop === */
.ticket-card.dragging {
    opacity: 0.7;
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    cursor: grabbing;
}

.column-drop-target {
    transition: background 0.2s ease;
    min-height: 60px;
}

.column-drop-target.drag-over {
    background: rgba(33, 150, 243, 0.06);
    border-radius: 12px;
}

/* === Elementos internos do card === */
.ticket-card .ticket-code {
    font-weight: 700;
    font-size: 1.2em;
    margin-bottom: 12px;
    color: #075E54;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.ticket-card .ticket-desc {
    font-size: 0.9em;
    margin-bottom: 8px;
    line-height: 1.4;
    color: #495057;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.ticket-card .ticket-meta {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    font-size:0.85em;
    margin-bottom:8px;
    line-height:1.3;
    color:#495057;
    font-weight:500;
    position:relative;
    z-index:1;
}

.ticket-card .ticket-meta i {
    color: #128C7E;
    font-size: 1em;
}

.ticket-card .expand-btn {
    padding: 10px 16px;
    font-size: 0.9em;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, #075E54 0%, #128C7E 100%);
    border: none;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(18, 140, 126, 0.2);
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.ticket-card .expand-btn:hover {
    background: linear-gradient(135deg, #128C7E 0%, #20c997 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(18, 140, 126, 0.3);
}

/* === Status Badges === */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-badge.aberto {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    border: 1px solid rgba(13, 110, 253, 0.2);
}

.status-badge.execucao {
    background: rgba(255, 193, 7, 0.15);
    color: #856404;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-badge.aguardando {
    background: rgba(13, 202, 240, 0.1);
    color: #087990;
    border: 1px solid rgba(13, 202, 240, 0.2);
}

.status-badge.finalizado {
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
    border: 1px solid rgba(25, 135, 84, 0.2);
}

/* === Priority Indicator === */
.priority-indicator {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 2;
    animation: priorityGlow 2s ease-in-out infinite;
}

.priority-indicator.alta  { background: #dc3545; }
.priority-indicator.media { background: #ffc107; }
.priority-indicator.baixa { background: #28a745; }

/* === Scrollbar === */
.card-body::-webkit-scrollbar       { width: 6px; }
.card-body::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
.card-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #075E54, #128C7E);
    border-radius: 10px;
}
.card-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #128C7E, #20c997);
}

/* === Empty Column === */
.empty-column {
    text-align: center;
    padding: 40px 20px;
    color: #adb5bd;
}

.empty-column i {
    font-size: 2.5em;
    margin-bottom: 8px;
    display: block;
}

/* === Image Preview === */
.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.image-preview {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.image-preview:hover {
    transform: scale(1.1);
    border-color: #0d6efd;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

/* === Timeline === */
.timeline {
    position: relative;
    padding-left: 30px;
    margin-bottom: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background-color: #dee2e6;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #0d6efd;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #0d6efd;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-content {
    background-color: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 4px solid #0d6efd;
}

.timeline-content h6 { margin: 0 0 5px 0; font-size: 0.95em; }
.timeline-content small { color: #6c757d; }
.timeline-content p { margin: 0; font-size: 0.9em; }

/* === Animações === */
@keyframes priorityPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.6; }
}

@keyframes priorityGlow {
    0%, 100% { box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
    50%       { box-shadow: 0 2px 12px rgba(0,0,0,0.35); }
}

/* === Responsividade === */
@media (max-width: 768px) {
    .ticket-card { padding: 14px; min-height: 110px; }
    .ticket-card .ticket-code { font-size: 1em; }
    .ticket-card .ticket-meta { font-size: 0.82em; padding: 5px 8px; }
    .ticket-card .expand-btn  { padding: 8px 12px; font-size: 0.85em; }
    .priority-indicator { width: 12px; height: 12px; top: 10px; right: 10px; }
}

/* Header */
.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ticket-code {
    font-weight: 700;
    font-size: 0.95rem;
    color: #075E54;
    letter-spacing: 0.5px;
}

/* Descrição */
.ticket-desc {
    font-size: 0.85rem;
    color: #495057;
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ticket-meta{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
}

.ticket-meta-left{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
}

.expand-btn{
    flex-shrink:0;
    border:none;
    background:transparent;
    cursor:pointer;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(18, 140, 126, 0.08);
    color: #075E54;
    padding: 3px 6px;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: 500;
}

.meta-pill i {
    font-size: 0.7rem;
}

.expand-btn:hover {
    color: #075E54;
    transform: scale(1.1);
}

/* Priority Dot nova */
.priority-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.priority-dot.alta  { background: #dc3545; }
.priority-dot.media { background: #ffc107; }
.priority-dot.baixa { background: #28a745; }






