/* SIGAF - Diagnóstico de Conectividade */

.sigaf-diagnostico-link {
    cursor: pointer;
    color: #1f7a63 !important;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
}

.sigaf-diagnostico-link:hover,
.sigaf-diagnostico-link:focus {
    color: #17614f !important;
    text-decoration: none !important;
}

#sigaf-diag-overlay {
    position: fixed;
    inset: 0;
    z-index: 200000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, .58);
    overflow-y: auto;
}

#sigaf-diag-overlay.sigaf-diag-aberto {
    display: flex;
}

.sigaf-diag-modal {
    width: 100%;
    max-width: 780px;
    max-height: calc(100vh - 36px);
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
    color: #334155;
    font-family: Arial, Helvetica, sans-serif;
}

.sigaf-diag-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.sigaf-diag-header-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9f7f2;
    color: #1f7a63;
    font-size: 18px;
    flex: 0 0 auto;
}

.sigaf-diag-header-text {
    min-width: 0;
    flex: 1;
}

.sigaf-diag-header-text h3 {
    margin: 0 0 3px 0;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.sigaf-diag-header-text small {
    color: #64748b;
    font-size: 12px;
}

.sigaf-diag-fechar-x {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 22px;
    cursor: pointer;
    padding: 6px;
}

.sigaf-diag-body {
    padding: 18px 20px 10px;
}

.sigaf-diag-progresso-wrap {
    margin-bottom: 16px;
}

.sigaf-diag-progresso-info {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
    font-size: 12px;
    color: #64748b;
}

.sigaf-diag-progresso {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

.sigaf-diag-progresso > div {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #1f7a63;
    transition: width .2s ease;
}

.sigaf-diag-resumo {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.sigaf-diag-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    background: #f8fafc;
}

.sigaf-diag-card-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #64748b;
    margin-bottom: 6px;
}

.sigaf-diag-card-value {
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
}

.sigaf-diag-resultado {
    border-radius: 10px;
    padding: 14px 15px;
    margin: 0 0 14px;
    border-left: 4px solid #64748b;
    background: #f8fafc;
}

.sigaf-diag-resultado strong {
    display: block;
    margin-bottom: 5px;
    font-size: 15px;
}

.sigaf-diag-resultado p {
    margin: 0;
    line-height: 1.45;
    font-size: 13px;
}

.sigaf-diag-ok { border-left-color: #15803d; background: #f0fdf4; }
.sigaf-diag-atencao { border-left-color: #d97706; background: #fffbeb; }
.sigaf-diag-ruim { border-left-color: #b91c1c; background: #fef2f2; }
.sigaf-diag-info { border-left-color: #2563eb; background: #eff6ff; }

.sigaf-diag-tabela {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
    font-size: 13px;
}

.sigaf-diag-tabela th,
.sigaf-diag-tabela td {
    padding: 9px 8px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

.sigaf-diag-tabela th {
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .35px;
}

.sigaf-diag-tabela td:nth-child(2),
.sigaf-diag-tabela th:nth-child(2) {
    text-align: right;
    white-space: nowrap;
}

.sigaf-diag-tabela td:nth-child(3),
.sigaf-diag-tabela th:nth-child(3) {
    text-align: right;
    width: 120px;
}

.sigaf-diag-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.sigaf-diag-badge-ok { background: #dcfce7; color: #166534; }
.sigaf-diag-badge-atencao { background: #fef3c7; color: #92400e; }
.sigaf-diag-badge-ruim { background: #fee2e2; color: #991b1b; }
.sigaf-diag-badge-info { background: #dbeafe; color: #1e40af; }
.sigaf-diag-badge-neutro { background: #e5e7eb; color: #475569; }

.sigaf-diag-nota {
    font-size: 11px;
    line-height: 1.45;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 12px;
}

.sigaf-diag-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px 18px;
    border-top: 1px solid #e5e7eb;
}

.sigaf-diag-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 7px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.sigaf-diag-btn:hover { background: #f8fafc; }
.sigaf-diag-btn-primary { background: #1f7a63; border-color: #1f7a63; color: #fff; }
.sigaf-diag-btn-primary:hover { background: #17614f; color: #fff; }
.sigaf-diag-btn:disabled { opacity: .55; cursor: not-allowed; }

@media (max-width: 640px) {
    #sigaf-diag-overlay { padding: 8px; align-items: flex-start; }
    .sigaf-diag-modal { max-height: calc(100vh - 16px); margin-top: 8px; }
    .sigaf-diag-resumo { grid-template-columns: 1fr; }
    .sigaf-diag-header { padding: 14px; }
    .sigaf-diag-body { padding: 14px 14px 8px; }
    .sigaf-diag-footer { padding: 12px 14px 14px; justify-content: stretch; }
    .sigaf-diag-btn { flex: 1 1 auto; }
    .sigaf-diag-tabela td:nth-child(3),
    .sigaf-diag-tabela th:nth-child(3) { width: auto; }
}

/* A tela de login passa a ter três links; permite quebra elegante em telas menores. */
.login-links {
    flex-wrap: wrap;
}
