/**
 * Gerador de Lista de Exercícios BNCC - v2.0
 * Frontend Styles
 */

/* =========================================
   FORMULÁRIO
   ========================================= */
.gle-form-container {
    max-width: 1000px;
    margin: 40px auto;
    background: #fff;
    padding: 45px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}

/* Seções */
.gle-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.gle-section:last-child {
    border-bottom: none;
    margin-bottom: 30px;
}

.gle-section h3 {
    color: #2c3e50;
    font-size: 22px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Grid layout */
.gle-row {
    display: flex;
    gap: 25px;
    margin-bottom: 20px;
}

.gle-col-3 {
    flex: 1;
}

/* Campos do formulário */
.gle-field {
    margin-bottom: 25px;
}

.gle-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #34495e;
    font-size: 15px;
}

.gle-field input[type="text"],
.gle-field input[type="number"],
.gle-field select,
.gle-field textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafafa;
    box-sizing: border-box;
}

.gle-field input:focus,
.gle-field select:focus,
.gle-field textarea:focus {
    outline: none;
    border-color: #3498db;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

/* Checkboxes */
.gle-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
    padding: 5px;
    border-radius: 8px;
    transition: border 0.3s ease;
}

.gle-checkbox-label {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.gle-checkbox-label:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-2px);
}

.gle-checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.gle-checkbox-label input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #2980b9;
}

/* =========================================
   BOTÃO PRINCIPAL
   ========================================= */
.gle-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    font-size: 18px;
    font-weight: 600;
    padding: 18px 35px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gle-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.gle-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.gle-footer-note {
    text-align: center;
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 20px;
}

/* =========================================
   LOADING
   ========================================= */
#gle-loading-container {
    margin: 40px auto;
    max-width: 600px;
    display: none;
}

.gle-loading-box {
    background: #fff;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gle-loading-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.1) 0%, transparent 70%);
    animation: gle-rotate-bg 20s linear infinite;
    z-index: -1;
}

/* Spinner */
.gle-spinner {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.spinner-circle {
    width: 15px;
    height: 15px;
    background: #3498db;
    border-radius: 50%;
    animation: gle-spinner-bounce 1.4s ease-in-out infinite;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

.spinner-circle:nth-child(1) {
    animation-delay: -0.32s;
    background: #3498db;
}

.spinner-circle:nth-child(2) {
    animation-delay: -0.16s;
    background: #2980b9;
}

.spinner-circle:nth-child(3) {
    background: #1976d2;
}

#gle-loading-title {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 600;
}

#gle-loading-message {
    color: #7f8c8d;
    font-size: 16px;
    margin-bottom: 30px;
}

/* Barra de progresso */
.gle-progress-bar {
    width: 100%;
    height: 8px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
    position: relative;
}

.gle-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 10px;
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.gle-progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: gle-progress-shine 2s infinite;
}

/* Dicas */
.gle-loading-tips {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    border-left: 4px solid #3498db;
}

.gle-loading-tips p {
    margin: 0;
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tip-icon {
    font-size: 18px;
    color: #f39c12;
}

/* =========================================
   RESULTADO
   ========================================= */
.gle-resultado-box {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 12px;
    margin-top: 40px;
    border: 2px solid #e9ecef;
    animation: gle-fadeInUp 0.6s ease;
}

.gle-resultado-box h3 {
    color: #27ae60;
    margin-bottom: 25px;
    font-size: 24px;
}

.gle-erro-box {
    background: #fee;
    padding: 25px;
    border-radius: 10px;
    margin-top: 30px;
    border: 2px solid #fcc;
}

.gle-erro-box p {
    color: #c0392b;
    margin: 0;
    font-size: 16px;
}

/* Notificações */
.gle-cache-notice {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gle-truncated-notice {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gle-success-msg {
    background: #27ae60;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 16px;
}

/* =========================================
   LISTA GERADA
   ========================================= */
#gle-lista-gerada {
    background: white;
    padding: 40px;
    border-radius: 10px;
    line-height: 1.8;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.lista-header {
    border-bottom: 3px solid #3498db;
    padding-bottom: 25px;
    margin-bottom: 30px;
}

.lista-header h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 28px;
}

.lista-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.lista-meta p {
    margin: 5px 0;
    color: #555;
}

.lista-content h3 {
    color: #2980b9;
    margin-top: 35px;
    margin-bottom: 15px;
    font-size: 22px;
}

.lista-content h4 {
    color: #34495e;
    margin-top: 25px;
    margin-bottom: 12px;
    font-size: 18px;
}

.lista-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.lista-content ol,
.lista-content ul {
    margin-bottom: 20px;
    padding-left: 30px;
}

.lista-content li {
    margin-bottom: 8px;
}

/* Questão individual (renderizada via PHP) */
.gle-questao,
.questao-item {
    margin-bottom: 30px;
    padding: 20px 25px;
    border-left: 4px solid #3498db;
    background: #fdfdfd;
    border-radius: 0 8px 8px 0;
}

/* Instruções gerais */
.lista-instrucoes {
    background: #f0f8ff;
    padding: 20px 25px;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
    margin-bottom: 30px;
}

.lista-instrucoes h3 {
    color: #1565c0;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.lista-instrucoes p {
    margin: 0;
    color: #333;
}

/* Verdadeiro/Falso */
.gle-vf-items p {
    padding: 8px 15px;
    margin-bottom: 6px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.gle-questao-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.gle-questao-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 17px;
}

.gle-questao-badges {
    display: flex;
    gap: 8px;
}

.gle-badge {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.gle-badge-nivel-facil { background: #d4edda; color: #155724; }
.gle-badge-nivel-medio { background: #fff3cd; color: #856404; }
.gle-badge-nivel-dificil { background: #f8d7da; color: #721c24; }
.gle-badge-tipo { background: #e3f2fd; color: #1565c0; }
.gle-badge-valor { background: #e8eaf6; color: #283593; }

.gle-questao-enunciado {
    margin-bottom: 15px;
    line-height: 1.7;
}

.gle-alternativas {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gle-alternativas li {
    padding: 8px 15px;
    margin-bottom: 6px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: background 0.2s;
}

.gle-alternativas li:hover {
    background: #e9ecef;
}

/* Linhas para resposta */
.gle-linhas-resposta {
    margin: 12px 0 8px 0;
    padding: 0;
}
.gle-linha {
    height: 28px;
    border-bottom: 1px solid #bdc3c7;
    margin: 0;
}
.gle-linha:first-child {
    margin-top: 4px;
}

/* Gabarito */
.gle-gabarito-section {
    margin-top: 40px;
    padding: 30px;
    background: #e8f5e9;
    border-radius: 10px;
    border: 2px solid #c8e6c9;
}

.gle-gabarito-section h3 {
    color: #2e7d32;
    margin-top: 0;
    margin-bottom: 20px;
}

.gle-gabarito-item {
    padding: 8px 0;
    border-bottom: 1px solid #c8e6c9;
}

.gle-gabarito-item:last-child {
    border-bottom: none;
}

/* Resolução */
.gle-resolucao-section {
    margin-top: 30px;
    padding: 30px;
    background: #e3f2fd;
    border-radius: 10px;
    border: 2px solid #bbdefb;
}

.gle-resolucao-section h3 {
    color: #1565c0;
    margin-top: 0;
    margin-bottom: 20px;
}

.gle-resolucao-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #bbdefb;
}

.gle-resolucao-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.gle-resolucao-item h4 {
    color: #1565c0;
    margin-bottom: 8px;
}

/* Footer da lista */
.lista-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
    text-align: center;
    color: #7f8c8d;
}

.lista-footer p {
    font-size: 16px;
    margin: 0;
}

.lista-footer strong {
    color: #2c3e50;
}

/* =========================================
   BOTÕES DE EXPORTAÇÃO
   ========================================= */
#gle-export-buttons {
    text-align: center;
    margin-top: 40px;
    padding: 35px;
    background: #f8f9fa;
    border-radius: 12px;
}

#gle-export-buttons h3 {
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 24px;
}

.export-buttons-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.export-btn {
    display: inline-block;
    background: #27ae60;
    color: white;
    padding: 14px 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 200px;
    text-align: center;
}

.export-btn:hover {
    transform: translateY(-3px);
}

.edit-btn { background: #9b59b6; }
.edit-btn:hover { background: #8e44ad; box-shadow: 0 5px 15px rgba(155, 89, 182, 0.3); }

#btn-pdf:hover { background: #229954; box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3); }

#btn-docx { background: #3498db; }
#btn-docx:hover { background: #2980b9; box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3); }

#btn-print { background: #e67e22; }
#btn-print:hover { background: #d35400; box-shadow: 0 5px 15px rgba(230, 126, 34, 0.3); }

/* =========================================
   EDITOR DE QUESTÕES
   ========================================= */
#gle-editor-container {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    margin-top: 40px;
}

.gle-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.gle-editor-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 24px;
}

.gle-editor-actions {
    display: flex;
    gap: 10px;
}

.gle-editor-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.gle-editor-btn:hover { transform: translateY(-2px); }
.gle-editor-btn.primary { background: #27ae60; color: white; }
.gle-editor-btn.primary:hover { background: #229954; }
.gle-editor-btn.secondary { background: #e74c3c; color: white; }
.gle-editor-btn.secondary:hover { background: #c0392b; }

#btn-add-questao { background: #3498db; color: white; }
#btn-add-questao:hover { background: #2980b9; }

.editable-questao {
    padding: 20px;
    margin-bottom: 20px;
    border: 2px dashed #3498db;
    border-radius: 8px;
    background: #f8f9fa;
    position: relative;
    transition: all 0.3s ease;
}

.editable-questao:hover { background: #e9ecef; }
.editable-questao:focus { outline: none; border-color: #2980b9; background: #fff; }

.editable-section {
    padding: 20px;
    margin-bottom: 20px;
    border: 2px dashed #27ae60;
    border-radius: 8px;
    background: #f8f9fa;
}

.editable-section:focus { outline: none; border-color: #229954; background: #fff; }

.btn-remove-questao {
    position: absolute;
    top: -12px;
    right: -12px;
    background: #e74c3c;
    color: white;
    border: 3px solid #fff;
    border-radius: 20px;
    padding: 4px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
    white-space: nowrap;
}

.btn-remove-questao:hover { background: #c0392b; transform: scale(1.05); box-shadow: 0 4px 12px rgba(231, 76, 60, 0.6); }

/* Cards dos modelos (admin) */
.modelo-card { transition: transform 0.3s ease; }
.modelo-card:hover { transform: translateY(-5px); box-shadow: 0 5px 20px rgba(0,0,0,0.1); }

/* =========================================
   ANIMAÇÕES
   ========================================= */
@keyframes gle-spinner-bounce {
    0%, 80%, 100% { transform: scale(0.8) translateY(0); opacity: 0.5; }
    40% { transform: scale(1.2) translateY(-10px); opacity: 1; }
}

@keyframes gle-progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes gle-rotate-bg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes gle-fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   RESPONSIVIDADE
   ========================================= */
@media (max-width: 768px) {
    .gle-form-container { padding: 25px; }
    .gle-row { flex-direction: column; }
    .gle-checkbox-grid { grid-template-columns: 1fr; }
    .export-buttons-grid { flex-direction: column; align-items: center; }
    .export-btn { width: 90%; max-width: 300px; }
    .lista-meta { grid-template-columns: 1fr; }
    #gle-loading-container { margin: 20px auto; }
    .gle-loading-box { padding: 30px 20px; }
    #gle-loading-title { font-size: 20px; }
    #gle-loading-message { font-size: 14px; }
    .gle-editor-header { flex-direction: column; gap: 20px; }
    .gle-editor-actions { width: 100%; justify-content: center; }
    #gle-editor-container { padding: 20px; }
    .gle-questao-header { flex-direction: column; align-items: flex-start; }
}

/* =========================================
   RELATÓRIO COBERTURA BNCC
   ========================================= */
.gle-bncc-report {
    margin-top: 20px;
    padding: 18px 22px;
    background: linear-gradient(135deg, #f8f9fa, #eef2f7);
    border: 1px solid #d5dde5;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}
.gle-bncc-report h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #2c3e50;
}
.gle-bncc-report-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.gle-bncc-stat { font-size: 14px; color: #555; }
.gle-bncc-pct { font-size: 22px; font-weight: 700; color: #2c3e50; }

.gle-bncc-bar-bg {
    height: 10px;
    background: #dfe6e9;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 12px;
}
.gle-bncc-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.8s ease;
}
.gle-bar-high { background: linear-gradient(90deg, #27ae60, #2ecc71); }
.gle-bar-mid  { background: linear-gradient(90deg, #f39c12, #f1c40f); }
.gle-bar-low  { background: linear-gradient(90deg, #e74c3c, #e67e22); }

.gle-bncc-details { margin-top: 4px; }
.gle-bncc-details summary {
    cursor: pointer;
    font-size: 13px;
    color: #3498db;
    font-weight: 500;
    padding: 4px 0;
}
.gle-bncc-details summary:hover { color: #2980b9; }

.gle-bncc-uncovered {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}
.gle-bncc-uncovered li {
    padding: 6px 10px;
    font-size: 13px;
    color: #555;
    border-bottom: 1px solid #e9ecef;
    line-height: 1.4;
}
.gle-bncc-uncovered li:last-child { border-bottom: none; }
.gle-bncc-uncovered li strong { color: #2980b9; }
.gle-bncc-more { color: #999; font-style: italic; }

/* =========================================
   BNCC AUTOCOMPLETE
   ========================================= */
#gle-bncc-container {
    position: relative;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    padding: 8px;
    background: #fff;
    min-height: 46px;
    transition: border-color 0.3s ease;
    cursor: text;
}
#gle-bncc-container:focus-within {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#gle-bncc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}
.gle-bncc-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    animation: gleTagIn 0.2s ease;
}
@keyframes gleTagIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.gle-bncc-tag .gle-tag-code {
    font-weight: 700;
}
.gle-bncc-tag .gle-tag-remove {
    cursor: pointer;
    font-size: 15px;
    margin-left: 2px;
    opacity: 0.8;
    line-height: 1;
}
.gle-bncc-tag .gle-tag-remove:hover {
    opacity: 1;
}

#gle-bncc-search {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    width: 100%;
    padding: 4px 2px !important;
    font-size: 14px;
    background: transparent;
    margin: 0 !important;
}

#gle-bncc-dropdown {
    position: absolute;
    top: 100%;
    left: -2px;
    right: -2px;
    background: white;
    border: 2px solid #3498db;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.gle-bncc-option {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
}
.gle-bncc-option:hover,
.gle-bncc-option.active {
    background: #ebf5fb;
}
.gle-bncc-option:last-child { border-bottom: none; }

.gle-bncc-option-code {
    font-weight: 700;
    color: #2980b9;
    font-size: 13px;
    margin-right: 8px;
}
.gle-bncc-option-desc {
    color: #555;
    font-size: 13px;
    line-height: 1.4;
}
.gle-bncc-option-anos {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.gle-bncc-no-results {
    padding: 14px;
    text-align: center;
    color: #999;
    font-style: italic;
    font-size: 13px;
}

.gle-bncc-hint {
    padding: 10px 14px;
    text-align: center;
    color: #888;
    font-size: 12px;
    background: #f8f9fa;
    border-radius: 0 0 6px 6px;
}

/* =========================================
   IMPRESSÃO — OTIMIZADA PARA XEROX/ESCOLA
   ========================================= */
@media print {
    /* Reset: esconde TUDO do site */
    body * { visibility: hidden !important; }
    body { background: white !important; margin: 0 !important; padding: 0 !important; }

    /* Mostra APENAS a lista gerada */
    #gle-lista-gerada,
    #gle-lista-gerada * {
        visibility: visible !important;
    }
    #gle-lista-gerada {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 15px !important;
        font-size: 12pt !important;
        line-height: 1.5 !important;
        color: #000 !important;
        background: white !important;
    }

    /* Cabeçalho da lista — limpo */
    .lista-header, .gle-lista-header {
        border: none !important;
        background: none !important;
        padding: 0 0 10px 0 !important;
        margin-bottom: 15px !important;
        border-bottom: 2px solid #000 !important;
        page-break-after: avoid !important;
    }
    .lista-header h2, .gle-lista-header h2 {
        font-size: 16pt !important;
        text-align: center !important;
        margin-bottom: 8px !important;
        color: #000 !important;
    }
    .lista-header p, .gle-lista-header p {
        font-size: 11pt !important;
        color: #000 !important;
        margin: 2px 0 !important;
    }

    /* Questões */
    .gle-questao, .questao-item {
        page-break-inside: avoid !important;
        border: none !important;
        border-bottom: 1px solid #ccc !important;
        background: none !important;
        box-shadow: none !important;
        padding: 10px 0 !important;
        margin: 0 0 8px 0 !important;
    }
    .gle-questao-header h4 {
        font-size: 12pt !important;
        font-weight: bold !important;
        color: #000 !important;
        margin: 0 0 5px 0 !important;
    }
    .gle-questao-enunciado, .gle-questao-enunciado p {
        font-size: 12pt !important;
        color: #000 !important;
    }

    /* Badges: mostra como texto simples */
    .gle-questao-badges {
        display: inline !important;
        float: right !important;
    }
    .gle-badge {
        background: none !important;
        color: #555 !important;
        border: 1px solid #999 !important;
        font-size: 9pt !important;
        padding: 1px 6px !important;
        border-radius: 3px !important;
        box-shadow: none !important;
    }

    /* Alternativas */
    .gle-alternativas, ol[type="a"] {
        margin: 5px 0 5px 25px !important;
        padding: 0 !important;
    }
    .gle-alternativas li {
        font-size: 12pt !important;
        color: #000 !important;
        padding: 2px 0 !important;
        background: none !important;
        border: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    /* Gabarito — nova página */
    .gle-gabarito-section, .gabarito-section {
        page-break-before: always !important;
        border: none !important;
        background: none !important;
        padding: 0 !important;
    }
    .gle-gabarito-section h3, .gabarito-section h3 {
        font-size: 14pt !important;
        border-bottom: 2px solid #000 !important;
        padding-bottom: 5px !important;
        color: #000 !important;
    }
    .gle-gabarito-item p {
        font-size: 11pt !important;
        color: #000 !important;
    }

    /* Resolução — nova página */
    .gle-resolucao-section, .resolucao-section {
        page-break-before: always !important;
        border: none !important;
        background: none !important;
        padding: 0 !important;
    }
    .gle-resolucao-section h3, .resolucao-section h3 {
        font-size: 14pt !important;
        border-bottom: 2px solid #000 !important;
        padding-bottom: 5px !important;
        color: #000 !important;
    }

    /* Rodapé */
    .lista-footer, .gle-lista-footer {
        page-break-inside: avoid !important;
        margin-top: 30px !important;
        padding-top: 10px !important;
        border-top: 1px solid #999 !important;
        font-size: 10pt !important;
        color: #666 !important;
        text-align: center !important;
        background: none !important;
    }

    /* Esconde TUDO que não é conteúdo */
    #gle-formulario, #gle-export-buttons, #gle-editor-container,
    #gle-loading-container, .gle-resultado-box > h3,
    .gle-cache-notice, .gle-truncated-notice, .gle-bncc-report,
    nav, header, footer, .sidebar, #wpadminbar,
    .btn-remove-questao, .export-btn, button {
        display: none !important;
    }

    /* Títulos e headers: não cortar */
    h2, h3, h4 { page-break-after: avoid !important; }

    /* KaTeX no print */
    .katex { font-size: 1em !important; color: #000 !important; }

    /* Linhas para resposta no print */
    .gle-linhas-resposta { margin: 8px 0 !important; }
    .gle-linha {
        height: 24px !important;
        border-bottom: 1px solid #666 !important;
    }

    /* Links sem URL */
    a { color: #000 !important; text-decoration: none !important; }
    a::after { content: none !important; }
}
