/* ==========================================================================
   SEGNALAZIONI NC & CHAT AZIONI CORRETTIVE
   ========================================================================== */

#modal4, #modal5 {
    z-index: 1065 !important;
}

/* PLANCHA KPI BOXES */
.snc-kpi-card {
    border-radius: 12px !important;
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06) !important;
    overflow: hidden;
    min-height: 82px;
}

.snc-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.14) !important;
}

.snc-kpi-aperte {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.snc-kpi-chiuse {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.snc-kpi-card .info-box-icon {
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px;
    color: #fff;
    width: 60px;
    height: 60px;
    margin: auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#snc_kpi_container {
    display: flex !important;
}

/* TAB TIPOLOGIE (TINTA COORDINATA) */
#filter_open_tipologie .nav-link,
#filter_closed_tipologie .nav-link {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    border-radius: 20px;
    margin-right: 6px;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 5px 14px;
    transition: all 0.2s;
}

#filter_open_tipologie .nav-link.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
    box-shadow: 0 3px 10px rgba(217, 119, 6, 0.25);
}

#filter_closed_tipologie .nav-link.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border-color: #059669 !important;
    box-shadow: 0 3px 10px rgba(5, 150, 105, 0.25);
}

/* CHAT AZIONI CORRETTIVE (CONDIVISA TRA NC E PdM) */
.corr-chat-box {
    border-radius: 12px !important;
}

.corr-chat-timeline {
    max-height: 400px;
    min-height: 240px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f4f6f9 0%, #eef1f5 100%);
}

.corr-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.corr-bubble {
    max-width: 78%;
    padding: 12px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.corr-bubble-left {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px 14px 14px 4px;
}

.corr-bubble-right {
    background: #eef5ff;
    border: 1px solid #cfe2ff;
    border-radius: 14px 14px 4px 14px;
}

.corr-chat-meta {
    font-size: 0.85rem;
}

.corr-chat-text {
    font-size: 0.96rem;
    line-height: 1.45;
}

.corr-event-check {
    background: #e8f8ef;
    border: 1px solid #b7ebc6;
    border-left: 4px solid #28a745;
    border-radius: 10px;
}

.corr-event-ko {
    background: #fff5f5;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #dc3545;
    border-radius: 10px;
}

/* TAB DETTAGLI EXTRA SEGNALAZIONE */
.snc-detail-tile {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.snc-detail-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    color: #fff;
    margin-right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.snc-detail-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #6c757d;
}

.snc-detail-value {
    display: block;
    font-size: 0.96rem;
    font-weight: 700;
    color: #1e293b;
}

.snc-detail-cause {
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #007bff;
    border-radius: 10px;
}

.snc-detail-cause-text {
    white-space: pre-wrap;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* TABS MODALE DETTAGLI SEGNALAZIONE */
#sncDetailsTab .nav-link {
    color: rgba(255, 255, 255, 0.72) !important;
    background: transparent !important;
    border: none !important;
    border-radius: 8px 8px 0 0;
    padding: 0.6rem 1rem;
    transition: color 0.15s, background-color 0.15s;
}

#sncDetailsTab .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

#sncDetailsTab .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.22) !important;
}
