/* ============================================================
   MODAIS GLOBAIS — feedbackModal, contatoModal, notificacoesModal
   Extraído de app/adms/Views/layout/main.php
   ============================================================ */

/* ── Overlay base (JS puro, sem Bootstrap) ── */
.modal-js-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 99997;
    background: rgba(0,0,0,.7);
}
.modal-js-inner {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ── Feedback Modal ── */
#feedbackModal { z-index: 99997; }

.fdbk-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,.4);
}
.fdbk-header {
    background: linear-gradient(135deg, #198754, #20c997);
    padding: 20px 28px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.fdbk-header i {
    color: #fff;
    font-size: 1.1rem;
}
.fdbk-header span {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
}
.fdbk-body {
    background: #ffffff;
    padding: 32px 28px 20px;
    text-align: center;
}
.fdbk-body .fdbk-icon {
    font-size: 4rem;
    display: block;
    margin: 0 auto 16px;
    color: #198754;
    line-height: 1;
}
.fdbk-body .fdbk-subtitle {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #198754;
    margin-bottom: 12px;
    display: block;
}
.fdbk-body .fdbk-message {
    color: #555;
    font-family: 'Poppins', sans-serif;
    font-size: .92rem;
    margin: 0;
}
.fdbk-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 16px 28px 22px;
    display: flex;
    justify-content: center;
}
.fdbk-btn-ok {
    min-width: 200px;
    padding: 12px 32px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: .95rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #198754, #20c997);
    color: #fff;
    cursor: pointer;
    transition: opacity .2s;
}
.fdbk-btn-ok:hover { opacity: .88; }

/* ── Contato Modal ── */
#contatoModal { z-index: 99996; }

.ctto-card {
    width: 100%;
    max-width: 560px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,.5);
}
.ctto-header {
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ctto-header-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #fff;
    font-size: .95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ctto-close {
    background: rgba(0,0,0,.25);
    border: none;
    color: #fff;
    width: 28px; height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.ctto-close:hover { background: rgba(0,0,0,.45); }
.ctto-body {
    background: #1a1a1a;
    padding: 22px;
}
.ctto-label {
    font-size: .72rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .07em;
    display: block;
    margin-bottom: 6px;
}
.ctto-label i { color: #3b82f6; }
.ctto-input,
.ctto-textarea {
    width: 100%;
    background: #0d0d0d;
    border: 1px solid #1a2540;
    border-radius: 9px;
    color: #e2e8f0;
    font-family: 'Poppins', sans-serif;
    font-size: .85rem;
    padding: 10px 14px;
    outline: none;
    transition: border-color .2s;
}
.ctto-input:focus,
.ctto-textarea:focus { border-color: #3b82f6; }
.ctto-textarea { resize: vertical; }
.ctto-char-info {
    text-align: right;
    margin-top: 4px;
}
.ctto-char-info small { color: #555; font-size: .72rem; }
.ctto-footer {
    background: #111;
    border-top: 1px solid #2a2a2a;
    padding: 14px 22px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.ctto-btn-cancel {
    padding: 10px 20px;
    border-radius: 9px;
    border: none;
    background: linear-gradient(135deg, #7f1d1d, #dc2626);
    color: #fff;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: .85rem;
    font-weight: 600;
    transition: opacity .15s, transform .12s;
    box-shadow: 0 3px 10px rgba(220,38,38,.3);
}
.ctto-btn-cancel:hover { opacity: .88; transform: translateY(-1px); }
.ctto-btn-send {
    padding: 10px 22px;
    border-radius: 9px;
    border: none;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    color: #fff;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: .85rem;
    font-weight: 700;
    transition: opacity .2s;
}
.ctto-btn-send:hover { opacity: .88; }

/* ── Notificações Modal ── */
#notificacoesModal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
.ntfc-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(2px);
}
.ntfc-dialog {
    position: relative;
    z-index: 1;
    width: 95%;
    max-width: 600px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
.ntfc-header {
    background: linear-gradient(135deg, #c9a227, #a07d1a);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.ntfc-header-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #fff;
    font-size: .95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ntfc-close {
    background: rgba(0,0,0,.25);
    border: none;
    color: #fff;
    width: 28px; height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.ntfc-close:hover { background: rgba(0,0,0,.45); }
.ntfc-body {
    background: #111;
    overflow-y: auto;
    flex: 1;
    min-height: 100px;
}
.ntfc-loading {
    text-align: center;
    padding: 32px 20px;
    color: #555;
}
.ntfc-loading p { margin-top: 10px; font-size: .85rem; }
.ntfc-footer {
    background: #1a1a1a;
    border-top: 1px solid #2a2a2a;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.ntfc-btn-marcar {
    display: none;
    font-size: .78rem;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid rgba(201,162,39,.4);
    background: rgba(201,162,39,.1);
    color: #c9a227;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: background .2s;
}
.ntfc-btn-marcar:hover { background: rgba(201,162,39,.2); }
.ntfc-btn-fechar {
    margin-left: auto;
    font-size: .82rem;
    padding: 8px 20px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #7f1d1d, #dc2626);
    color: #fff;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: opacity .15s, transform .12s;
    box-shadow: 0 3px 10px rgba(220,38,38,.3);
}
.ntfc-btn-fechar:hover { opacity: .88; transform: translateY(-1px); }

/* ── Modal de Loading (footer-login) ── */
.login-loading-content {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}
.login-loading-body {
    background: #ffffff;
}
.login-loading-text {
    color: #000000;
    font-weight: bold;
    font-size: 16px;
}

/* ============================================================
   MODAL DE ERROS DETALHADO (V20)
   Exibe lista de erros com detalhes e ações por arquivo
   ============================================================ */

.modal-erros-detalhado {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99998;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-erros-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
}

.modal-erros-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-erros-header {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.modal-erros-header i {
    color: #fff;
    font-size: 1.3rem;
}

.modal-erros-header h3 {
    flex: 1;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #fff;
    font-size: 1.05rem;
    margin: 0;
}

.btn-fechar-modal {
    background: rgba(0, 0, 0, 0.25);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-fechar-modal:hover {
    background: rgba(0, 0, 0, 0.45);
}

.modal-erros-body {
    background: #111;
    overflow-y: auto;
    flex: 1;
    padding: 24px;
}

.modal-erros-resumo {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    color: #e2e8f0;
    margin: 0 0 20px 0;
    padding: 14px 18px;
    background: rgba(220, 38, 38, 0.15);
    border-left: 4px solid #dc2626;
    border-radius: 8px;
}

.erro-categoria {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-left: 4px solid #ff6b6b;
    border-radius: 10px;
    margin-bottom: 16px;
    overflow: hidden;
}

.erro-categoria-header {
    background: rgba(255, 107, 107, 0.1);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.erro-categoria-header i {
    font-size: 1.1rem;
}

.erro-codigo {
    flex: 1;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: #e2e8f0;
}

.erro-count {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: rgba(255, 107, 107, 0.2);
    border-radius: 12px;
    color: #ffa8a8;
    font-weight: 600;
}

.erro-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.erro-item {
    padding: 14px 18px;
    border-top: 1px solid #2a2a2a;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.erro-item:first-child {
    border-top: none;
}

.erro-info {
    flex: 1;
    min-width: 0;
}

.erro-arquivo {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: #f1f5f9;
    margin-bottom: 6px;
    word-break: break-word;
}

.erro-mensagem {
    display: block;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 8px;
}

.btn-ver-detalhes {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-ver-detalhes:hover {
    background: rgba(59, 130, 246, 0.2);
}

.erro-detalhes {
    margin-top: 10px;
    padding: 12px;
    background: #0d0d0d;
    border: 1px solid #1a2540;
    border-radius: 8px;
}

.detalhes-lista {
    margin: 0;
    font-size: 0.8rem;
    color: #94a3b8;
}

.detalhes-lista dt {
    font-weight: 600;
    color: #cbd5e1;
    margin-top: 8px;
    text-transform: capitalize;
}

.detalhes-lista dt:first-child {
    margin-top: 0;
}

.detalhes-lista dd {
    margin: 2px 0 0 0;
    color: #94a3b8;
    word-break: break-all;
}

.erro-acoes {
    flex-shrink: 0;
}

.btn-remover-arquivo {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #dc2626;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-remover-arquivo:hover {
    background: rgba(220, 38, 38, 0.2);
    transform: translateY(-1px);
}

.modal-erros-footer {
    background: #1a1a1a;
    border-top: 1px solid #2a2a2a;
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.modal-erros-footer .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.modal-erros-footer .btn-secondary {
    background: linear-gradient(135deg, #475569, #64748b);
    color: #fff;
    box-shadow: 0 3px 10px rgba(71, 85, 105, 0.3);
}

.modal-erros-footer .btn-secondary:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.modal-erros-footer .btn-danger {
    background: linear-gradient(135deg, #7f1d1d, #dc2626);
    color: #fff;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.3);
}

.modal-erros-footer .btn-danger:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

/* Responsivo */
@media (max-width: 768px) {
    .modal-erros-content {
        max-height: 90vh;
    }
    
    .modal-erros-body {
        padding: 16px;
    }
    
    .erro-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .erro-acoes {
        width: 100%;
    }
    
    .btn-remover-arquivo {
        width: 100%;
        justify-content: center;
    }
    
    .modal-erros-footer {
        flex-direction: column;
    }
    
    .modal-erros-footer .btn {
        width: 100%;
        justify-content: center;
    }
}
