/* =========================================
   ESTILOS GERAIS DA LISTA DE QUESTÕES
   ========================================= */
.questions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.question-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.question-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.question-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #0284c7, #38bdf8);
}

/* =========================================
   FILTROS MODERNOS
   ========================================= */
.modern-filters-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 2rem;
    border: 1px solid #f1f5f9;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.filter-group label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.modern-select, .modern-input {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background-color: #f8fafc;
    color: #334155;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.modern-select:focus, .modern-input:focus {
    border-color: #0284c7;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.flex-row-center {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    grid-column: 1 / -1;
    margin-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
    padding-top: 1rem;
}

.qtd-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qtd-wrapper .modern-input {
    width: 80px;
    background-image: none;
    text-align: center;
}

.btn-start-modern {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.btn-start-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.4);
}

/* =========================================
   CHIPS DE SUBDISCIPLINAS
   ========================================= */
.subdisciplines-panel {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed #e2e8f0;
}

.panel-label {
    font-size: 0.9rem;
    color: #475569;
    font-weight: 600;
    margin-bottom: 0.8rem;
    display: block;
}

.scrollable-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    max-height: 150px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.5rem;
}

.scrollable-chips::-webkit-scrollbar { width: 6px; }
.scrollable-chips::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 10px; }
.scrollable-chips::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.chip-item input[type="checkbox"] { display: none; }
.chip-item label {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.chip-item label:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.chip-item input[type="checkbox"]:checked + label {
    background: #e0f2fe;
    border-color: #0284c7;
    color: #0369a1;
    font-weight: 600;
}

/* =========================================
   CABEÇALHO DA QUESTÃO E BADGES
   ========================================= */
.question-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.question-meta-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.badges-left {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.question-tag {
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.tag-clinica { background: #e0f2fe; color: #0369a1; }
.tag-cirurgia { background: #fee2e2; color: #b91c1c; }
.tag-pediatria { background: #dcfce7; color: #166534; }
.tag-ginecologia { background: #fae8ff; color: #a21caf; }

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.status-done { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.status-new { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

.question-level {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
}
.diff-facil { color: #22c55e; }
.diff-medio { color: #eab308; }
.diff-dificil { color: #ef4444; }

.question-text {
    font-size: 1.05rem;
    color: #1e293b;
    margin-bottom: 2rem;
    line-height: 1.75;
    text-align: justify;
    text-justify: inter-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* =========================================
   OPÇÕES DA QUESTÃO
   ========================================= */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.option-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.option-item:hover {
    background: #f1f5f9;
}

.option-item.selected {
    border-color: #0284c7;
    background: #f0f9ff;
}

.option-prefix {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    margin-top: 1px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.option-item.selected .option-prefix {
    background: #0284c7;
    color: white;
    border-color: #0284c7;
}

.option-text {
    flex: 1;
    font-size: 0.975rem;
    color: #334155;
    line-height: 1.65;
    text-align: justify;
    text-justify: inter-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* =========================================
   STRIKE (Riscar alternativa)
   ========================================= */
.option-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.option-row .option-item {
    flex: 1;
    min-width: 0;
}

.strike-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    color: #cbd5e1;
    border-radius: 6px;
    transition: all 0.15s;
    flex-shrink: 0;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
}

.strike-btn:hover { color: #64748b; background: #f1f5f9; }

/* ── Explicação inline por alternativa ── */
.alt-explanation {
    margin: 0 0 0.3rem 2rem;
    border-radius: 0 0 8px 8px;
    border: 1px solid #e2e8f0;
    border-top: none;
    overflow: hidden;
    animation: fadeIn 0.2s ease;
}

.alt-exp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.8rem;
    cursor: pointer;
    background: #f8fafc;
    user-select: none;
    transition: background 0.15s;
}

.alt-exp-header:hover { background: #f1f5f9; }

.alt-exp-chevron {
    font-size: 0.72rem;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.alt-exp-body {
    display: none;
    padding: 0.6rem 0.85rem 0.75rem;
    border-top: 1px solid #e2e8f0;
    background: white;
}

.alt-exp-body p {
    text-align: justify;
    text-justify: inter-word;
    line-height: 1.6;
    color: #374151;
}

.alt-exp-body.open { display: block; }

.option-row.struck .option-item {
    opacity: 0.5;
}

.option-row.struck .option-text {
    text-decoration: line-through;
    color: #94a3b8;
}

.option-row.struck .option-prefix {
    background: #e2e8f0;
    color: #94a3b8;
    border-color: #e2e8f0;
}

.option-row.struck .strike-btn {
    color: #ef4444;
    background: #fef2f2;
}

/* =========================================
   TOAST NOTIFICATIONS (Alertas)
   ========================================= */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 280px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInRight 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    border-left: 4px solid #0284c7;
}

.toast.error { border-left-color: #ef4444; }
.toast.warning { border-left-color: #eab308; }
.toast.success { border-left-color: #22c55e; }

.toast-icon { font-size: 1.2rem; }
.toast.error .toast-icon { color: #ef4444; }
.toast.warning .toast-icon { color: #eab308; }
.toast.success .toast-icon { color: #22c55e; }

.toast-content p {
    margin: 0;
    color: #334155;
    font-size: 0.95rem;
    font-weight: 500;
}


/* =========================================
   SISTEMA DE COMENTÁRIOS MODERNO
   ========================================= */
.comments-section {
    margin-top: 1rem;
}

.comment-input-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.comment-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1.2rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    transition: all 0.2s ease;
    flex-wrap: wrap;
}

.comment-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-color: #e2e8f0;
}

/* Estilo específico para quando for uma Resposta (Filho) */
.comment-reply {
    margin-left: 3.5rem;
    background: #f8fafc;
    border-left: 3px solid #cbd5e1;
    padding: 1rem;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.comment-content {
    flex: 1;
    min-width: 200px; /* Evita que quebre errado no mobile */
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.4rem;
}

.comment-author {
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
}

.comment-date {
    font-size: 0.8rem;
    color: #94a3b8;
}

.comment-text {
    color: #475569;
    line-height: 1.5;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.comment-actions {
    display: flex;
    gap: 1.2rem;
}

.comment-action {
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.comment-action:hover {
    color: #0284c7 !important;
}

/* =========================================
   CAIXA DE RESPOSTA INLINE (Embaixo do comentário)
   ========================================= */
.inline-reply-box {
    width: 100%;
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #e2e8f0;
    animation: fadeInDown 0.3s ease;
    align-items: center;
}

.btn-cancel-reply {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s;
}

.btn-cancel-reply:hover {
    background: #fee2e2;
    color: #ef4444;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .comment-reply { margin-left: 1.5rem; }
    .comment-avatar { width: 32px; height: 32px; font-size: 0.75rem; }
    .comment-input-container { gap: 0.5rem; margin-bottom: 1.25rem; padding-bottom: 1.25rem; }
    .inline-reply-box { flex-wrap: wrap; gap: 0.4rem; }
    .inline-reply-box input { flex: 1 1 100%; min-width: 0; }
    .inline-reply-box .btn-start-modern { flex: 1; justify-content: center; }
}

/* =========================================
   STATUS CHIPS (legado – mantido para compatibilidade)
   ========================================= */
.status-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.status-chip {
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.status-chip:hover {
    border-color: #0284c7;
    color: #0284c7;
    background: #f0f9ff;
}

.status-chip.active {
    background: #0284c7;
    border-color: #0284c7;
    color: #fff;
}

@keyframes slideInRight {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

@media (max-width: 768px) {
    .flex-row-center { flex-direction: column; gap: 1rem; align-items: stretch; }
    .btn-start-modern { justify-content: center; }
    .toast-container { top: 10px; left: 10px; right: 10px; }
    .toast { min-width: 100%; }
}

/* =========================================
   FILTER WIZARD (Filtro Avançado Cascata)
   ========================================= */
.filter-wizard-container {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.wizard-category-bar {
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: #fafbfc;
}

.wizard-category-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.filter-columns {
    display: grid;
    grid-template-columns: 1fr;
    border-bottom: 1px solid #f1f5f9;
    min-height: 220px;
    transition: grid-template-columns 0.2s ease;
}

.filter-col {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #f1f5f9;
}

.filter-col:last-child { border-right: none; }

.filter-col-header {
    padding: 0.65rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: sticky;
    top: 0;
}

.filter-col-header span {
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-col-hint {
    margin-left: auto;
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.step-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.filter-col-items {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 260px;
    padding: 0.4rem 0;
}

.filter-col-items::-webkit-scrollbar { width: 4px; }
.filter-col-items::-webkit-scrollbar-track { background: transparent; }
.filter-col-items::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

.filter-item {
    padding: 0.55rem 1rem;
    cursor: pointer;
    font-size: 0.88rem;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 3px solid transparent;
    transition: background 0.12s, border-color 0.12s;
    user-select: none;
}

.filter-item:hover { background: #f1f5f9; }

.filter-item.active {
    background: #eff6ff;
    border-left-color: #0284c7;
    color: #0369a1;
    font-weight: 600;
}

.filter-item .check-icon {
    color: #0284c7;
    font-size: 0.7rem;
    display: none;
}

.filter-item.active .check-icon { display: block; }

.filter-col-empty {
    padding: 1.5rem 1rem;
    color: #94a3b8;
    font-size: 0.83rem;
    text-align: center;
}

.secondary-filters {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.filter-mini-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    position: relative;
}

.filter-mini-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.generate-bar {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.active-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    flex: 1;
}

.active-tag {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 0.22rem 0.65rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    word-break: break-word;
}

.active-tag .remove-tag {
    cursor: pointer;
    opacity: 0.6;
    font-size: 0.7rem;
}
.active-tag .remove-tag:hover { opacity: 1; }

.btn-clear-filters {
    background: none;
    border: 1px solid #e2e8f0;
    color: #94a3b8;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.15s;
}
.btn-clear-filters:hover { border-color: #ef4444; color: #ef4444; background: #fef2f2; }

@media (max-width: 768px) {
    .filter-columns { grid-template-columns: 1fr !important; }
    .filter-col { border-right: none; border-bottom: 1px solid #f1f5f9; }
    .secondary-filters { flex-direction: column; }
    .filter-mini-group { width: 100%; }
    .filter-mini-group .modern-select { width: 100%; }
    .generate-bar { flex-direction: column; align-items: stretch; }
}

/* =========================================
   SMART SELECT COMPONENT
   ========================================= */
.smart-filter-row {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
    border-bottom: 1px solid #f1f5f9;
}

.smart-filter-group {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.smart-filter-group > label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.smart-filter-group > label .filter-col-hint {
    margin-left: 0.3rem;
    font-size: 0.65rem;
    color: #94a3b8;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.smart-select {
    position: relative;
}

.smart-select-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    user-select: none;
    min-height: 40px;
}

.smart-select-trigger:hover {
    border-color: #0284c7;
}

.smart-select.open .smart-select-trigger {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.smart-select-value {
    flex: 1;
    min-width: 0;
    font-size: 0.88rem;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.smart-select-value.placeholder { color: #94a3b8; }

.ss-badge {
    background: #0284c7;
    color: #fff;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    min-width: 1.4rem;
    text-align: center;
    line-height: 1.6;
    flex-shrink: 0;
}

.smart-chevron {
    font-size: 0.72rem;
    color: #94a3b8;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.smart-select.open .smart-chevron { transform: rotate(180deg); }

.smart-clear-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    font-size: 0.78rem;
    line-height: 1;
    transition: color 0.15s;
    flex-shrink: 0;
}

.smart-clear-btn:hover { color: #ef4444; }

.smart-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.14);
    z-index: 500;
    overflow: hidden;
    min-width: 240px;
}

.smart-select.open .smart-dropdown {
    display: block;
    animation: ssDropIn 0.15s ease;
}

@keyframes ssDropIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.smart-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}

.smart-search i { color: #94a3b8; font-size: 0.8rem; flex-shrink: 0; }

.smart-search input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.85rem;
    color: #334155;
    background: transparent;
}

.smart-search input::placeholder { color: #cbd5e1; }

.smart-options {
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 #f1f5f9;
}

.smart-options::-webkit-scrollbar { width: 7px; }
.smart-options::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 4px; }
.smart-options::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 4px; }
.smart-options::-webkit-scrollbar-thumb:hover { background: #64748b; }

.smart-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    transition: background 0.1s;
    font-size: 0.87rem;
    color: #334155;
}

.smart-option:hover { background: #f0f9ff; }

.smart-option.selected {
    background: #eff6ff;
    color: #0284c7;
    font-weight: 600;
}

.smart-option.hidden { display: none; }

.option-name { flex: 1; }

.option-count {
    background: #f1f5f9;
    color: #64748b;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.1rem 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.smart-option.selected .option-count {
    background: #dbeafe;
    color: #0284c7;
}

.option-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    display: flex;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.12s;
}

.option-checkbox i { font-size: 8px; color: #fff; display: none; }

.smart-option.selected .option-checkbox {
    background: #0284c7;
    border-color: #0284c7;
}

.smart-option.selected .option-checkbox i { display: block; }

.smart-no-results {
    padding: 1.2rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.83rem;
}

@media (max-width: 768px) {
    .smart-filter-row { flex-direction: column; }
    .smart-filter-group { min-width: 100%; }
}

/* ============================================================
   REPORT ERROR BUTTON & MODAL
   ============================================================ */

/* ── Action row principal ── */
.q-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f1f5f9;
    gap: 0.75rem;
}

/* Lado esquerdo: botão de reportar + navegação (anterior/pular) */
.q-nav-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.q-nav-btns {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

/* Botão principal (Responder / Próxima / Resultado) */
.q-main-btn {
    flex-shrink: 0;
}

/* ── Mobile: duas linhas — nav em cima, botão principal embaixo ── */
@media (max-width: 560px) {
    .q-actions-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
        margin-top: 1.25rem;
        padding-top: 1rem;
    }

    .q-nav-row {
        justify-content: space-between;
        flex: unset;
    }

    .q-nav-btns {
        margin-left: 0;
        gap: 0.4rem;
    }

    .btn-label-hide { display: none; }

    .btn-report-error {
        padding: 0.55rem 0.8rem;
    }

    .btn-skip-question,
    .btn-prev-question {
        padding: 0.55rem 0.8rem;
    }

    .q-main-btn {
        width: 100%;
        justify-content: center;
        padding: 0.85rem 1rem;
        font-size: 1rem;
    }
}

.btn-report-error {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.875rem;
    border-radius: 8px;
    border: 1.5px solid #fecaca;
    background: transparent;
    color: #f87171;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.btn-report-error:hover {
    background: #fff5f5;
    color: #ef4444;
    border-color: #fca5a5;
}

.btn-skip-question {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.875rem;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    background: transparent;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-skip-question:hover {
    background: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}

/* ---- Overlay ---- */
.report-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    z-index: 9500;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.report-overlay.active {
    display: flex;
}

/* ---- Box ---- */
.report-box {
    background: #fff;
    border-radius: 18px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: reportSlideIn 0.2s ease;
}

@keyframes reportSlideIn {
    from { opacity: 0; transform: translateY(-16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.report-header {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-shrink: 0;
}

.report-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #fff5f5;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.report-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.15rem 0;
}

.report-question-info {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.report-close {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    margin-left: auto;
    flex-shrink: 0;
    transition: background 0.15s;
}

.report-close:hover { background: #e2e8f0; }

.report-body {
    padding: 1.1rem 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.report-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.6rem;
}

.report-optional {
    font-weight: 400;
    color: #94a3b8;
    font-size: 0.72rem;
}

.req { color: #ef4444; font-weight: 700; }

.report-types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.report-type-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.report-type-chip:hover {
    border-color: #fca5a5;
    color: #ef4444;
    background: #fff5f5;
}

.report-type-chip.active {
    border-color: #ef4444;
    background: #fff5f5;
    color: #ef4444;
}

.report-textarea {
    width: 100%;
    padding: 0.6rem 0.875rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-size: 0.85rem;
    color: #334155;
    resize: vertical;
    min-height: 70px;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s;
}

.report-textarea:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.report-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 0.625rem;
    flex-shrink: 0;
}

.report-btn-cancel {
    padding: 0.55rem 1.1rem;
    border-radius: 9px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.report-btn-cancel:hover { background: #f8fafc; }

.report-btn-submit {
    padding: 0.55rem 1.25rem;
    border-radius: 9px;
    border: none;
    background: #ef4444;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: opacity 0.2s;
}

.report-btn-submit:hover  { opacity: 0.9; }
.report-btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
   RESPONSIVIDADE — FILTROS E QUESTÕES
   ============================================================ */

/* Tablet landscape (≤900px): filtros secundários em grid 2x2 */
@media (max-width: 900px) {
    .secondary-filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
        padding: 0.875rem 1.25rem;
        overflow: visible;
    }

    .filter-mini-group {
        width: auto;
    }

    .filter-mini-group .modern-select {
        width: 100%;
        min-width: 0;
    }
}

/* Tablet portrait / Telas médias (≤768px) */
@media (max-width: 768px) {
    .filter-wizard-container {
        border-radius: 12px;
        margin-bottom: 1.25rem;
    }

    /* Barra de categoria: scroll horizontal */
    .wizard-category-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 0.7rem 1rem;
        gap: 0.4rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .wizard-category-bar::-webkit-scrollbar { display: none; }

    .wizard-category-label { flex-shrink: 0; }

    #categoria-tabs-questoes { flex-wrap: nowrap; }

    /* Smart filter row: colunas empilhadas */
    .smart-filter-row {
        padding: 0.875rem 1rem;
        gap: 0.65rem;
    }

    .smart-filter-group { min-width: 0; }

    /* Barra de geração */
    .generate-bar {
        padding: 0.875rem 1rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }

    .btn-start-modern {
        width: 100%;
        justify-content: center;
        padding: 0.7rem 1.5rem;
    }

    .btn-clear-filters { align-self: flex-start; }

    /* Quiz header: row 1 = contador + timer, row 2 = botão de filtro */
    #quiz-header {
        flex-direction: row !important;
        flex-wrap: wrap;
        align-items: center !important;
        padding: 0.85rem 1rem;
        gap: 0.5rem;
    }
    #question-counter {
        font-size: 1rem;
        flex: 1;
        min-width: 0;
    }
    /* Timer div (3º filho) */
    #quiz-header > div {
        flex-shrink: 0;
        font-size: 1.3rem !important;
    }
    /* Botão Alterar Filtros: ocupa linha inteira abaixo */
    #quiz-header > button {
        flex: 1 1 100%;
        justify-content: center;
        order: 10;
    }

    /* Questão: padding compacto */
    .question-card {
        padding: 1.25rem 1rem;
    }

    .question-text {
        font-size: 0.975rem;
        margin-bottom: 1.25rem;
    }

    .options-list { gap: 0.6rem; }

    .option-item {
        padding: 0.7rem 0.9rem;
        gap: 0.65rem;
    }

    /* Métricas compactas */
    .metric-card { padding: 1rem; }
    .metric-value { font-size: 1.5rem; }
}

/* Mobile (≤640px): filtros secundários 2 colunas */
@media (max-width: 640px) {
    .secondary-filters {
        grid-template-columns: 1fr 1fr;
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .filter-mini-group label {
        font-size: 0.72rem;
    }

    /* Período btn em tabs de categoria */
    .periodo-btn {
        font-size: 0.78rem;
        padding: 0.35rem 0.65rem;
        white-space: nowrap;
    }

    /* Smart select dropdown: posição corrigida em telas pequenas */
    .smart-dropdown {
        min-width: 200px;
    }

    /* Toast */
    .toast-container { top: 10px; left: 10px; right: 10px; }
    .toast { min-width: 0; width: 100%; }

    /* Banner total de questões */
    #total-banner {
        display: flex;
        width: 100%;
        font-size: 0.85rem;
    }
}

/* Mobile pequeno (≤480px): 2 colunas para Dificuldade e Status ficarem lado a lado */
@media (max-width: 480px) {
    .secondary-filters {
        grid-template-columns: 1fr 1fr;
        padding: 0.65rem 0.875rem;
    }

    .wizard-category-bar { padding: 0.6rem 0.875rem; }
    .smart-filter-row { padding: 0.65rem 0.875rem; }
    .generate-bar { padding: 0.65rem 0.875rem; }

    .question-card { padding: 0.875rem 0.75rem; }
    .question-header { margin-bottom: 1rem; gap: 0.65rem; }
    .question-text { margin-bottom: 1rem; }

    .comment-reply { margin-left: 0.75rem; }

    .option-prefix { width: 26px; height: 26px; font-size: 0.8rem; }
    .options-list { gap: 0.5rem; margin-bottom: 1rem; }

    /* Botões de ação: mais compactos */
    .q-actions-row { margin-top: 1rem; padding-top: 0.875rem; }
    .btn-report-error, .btn-stats-question, .btn-skip-question { font-size: 0.75rem; padding: 0.45rem 0.7rem; }

    /* Feedback compacto */
    #feedback-message { padding: 0.65rem 0.875rem !important; font-size: 0.875rem; }
}

/* ============================================================
   FILTRO REDESENHADO — qf-* components
   ============================================================ */

.qf-container {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.07);
    margin-bottom: 2rem;
    overflow: visible;
    border: 1px solid #e8edf5;
}

/* ── Tab bar ── */
.qf-tabbar {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    border-radius: 20px 20px 0 0;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
}
.qf-tabbar::-webkit-scrollbar { display: none; }

.qf-tabs { display: flex; gap: 0.25rem; padding: 0.75rem 0; }

.qf-tab {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1.1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    background: transparent;
    transition: all 0.2s;
    white-space: nowrap;
}
.qf-tab i { font-size: 0.78rem; }
.qf-tab:hover { color: #fff; background: rgba(255,255,255,0.1); }
.qf-tab.active {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
    box-shadow: 0 4px 14px rgba(2,132,199,0.4);
}

/* ── Corpo dois painéis ── */
.qf-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 0;
    min-height: 0;
}

/* ── Painel esquerdo ── */
.qf-left {
    padding: 1.5rem;
    border-right: 1px solid #f1f5f9;
    overflow: visible;
}

.qf-section-hdr {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 1rem;
}
.qf-section-hdr i { color: #0284c7; }

/* ── Hierarquia de filtros ── */
.qf-hierarchy {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    margin-bottom: 0.25rem;
}

.qfl-item {
    position: relative;
    padding-bottom: 0.85rem;
}

.qfl-child1 { padding-left: 1.25rem; }
.qfl-child2 { padding-left: 2.5rem; }
.qfl-child3 { padding-left: 3.75rem; }

.qfl-item::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 0;
    bottom: 0;
    width: 1.5px;
    background: linear-gradient(to bottom, #e2e8f0, transparent);
}
.qfl-child1::before { left: calc(1.25rem + 5px); }
.qfl-child2::before { left: calc(2.5rem + 5px); }
.qfl-child3::before { left: calc(3.75rem + 5px); }
.qfl-item:last-child::before { display: none; }

.qfl-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.45rem;
}

.qfl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid currentColor;
}
.qfl-dot.d1 { color: #0284c7; background: #0284c7; }
.qfl-dot.d2 { color: #10b981; background: #10b981; }
.qfl-dot.d3 { color: #8b5cf6; background: #8b5cf6; }
.qfl-dot.d4 { color: #f97316; background: #f97316; }

.qf-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 1rem 0;
}

/* ── Filtros secundários ── */
.qf-secondary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
    overflow: visible;
}

.qf-mini-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    position: relative;
}

.qf-mini-group label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.qf-mini-group label i { color: #94a3b8; font-size: 0.68rem; }

/* ── Tags ativas + limpar ── */
.qf-active-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.qf-clear-btn {
    background: none;
    border: 1px solid #fca5a5;
    color: #ef4444;
    border-radius: 8px;
    padding: 0.3rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    flex-shrink: 0;
}
.qf-clear-btn:hover { background: #fef2f2; }

/* ── Ferramentas rápidas ── */
.qf-tools-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.qf-tool {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.qf-tool i { color: #0284c7; font-size: 0.75rem; }
.qf-tool:hover { border-color: #0284c7; background: #eff6ff; color: #0284c7; }

/* ── Painel direito ── */
.qf-right {
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: #fafbfd;
    border-radius: 0 0 20px 0;
}

/* ── Card de quantidade ── */
.qf-qty-card {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.qf-qty-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.qf-qty-title i { color: #0284c7; }

.qf-qty-counter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    justify-content: center;
}

.qf-cnt-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #0284c7;
    background: transparent;
    color: #0284c7;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}
.qf-cnt-btn:hover { background: #0284c7; color: #fff; }

#qty-input {
    width: 72px;
    height: 44px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.15s;
    -moz-appearance: textfield;
}
#qty-input::-webkit-outer-spin-button,
#qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }
#qty-input:focus { border-color: #0284c7; }

.qf-presets {
    display: flex;
    gap: 0.35rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.qf-preset {
    width: 38px;
    height: 32px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.qf-preset:hover { border-color: #0284c7; color: #0284c7; }
.qf-preset.active {
    background: #0284c7;
    border-color: #0284c7;
    color: #fff;
    box-shadow: 0 3px 8px rgba(2,132,199,0.35);
}

.qf-avail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #64748b;
    background: #f0f9ff;
    border-radius: 8px;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #bae6fd;
}
.qf-avail i { color: #0284c7; }
.qf-avail strong { color: #0284c7; }

.qf-start-btn {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(2,132,199,0.4);
    letter-spacing: 0.02em;
}
.qf-start-btn:hover { box-shadow: 0 6px 20px rgba(2,132,199,0.55); transform: translateY(-1px); }
.qf-start-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ── Acesso rápido ── */
.qf-quickaccess {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.qf-qa-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.qf-qa-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.qf-qa-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 0.5rem;
    border: 1.5px solid #f1f5f9;
    border-radius: 12px;
    background: #fafbfd;
    cursor: pointer;
    transition: all 0.18s;
    font-size: 0.76rem;
    font-weight: 600;
    color: #475569;
    text-align: center;
}
.qf-qa-btn:hover { border-color: #0284c7; background: #eff6ff; color: #0284c7; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(2,132,199,0.12); }

.qf-qa-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.qa-err { background: #fef2f2; color: #ef4444; }
.qa-fav { background: #fefce8; color: #ca8a04; }
.qa-cad { background: #eff6ff; color: #0284c7; }
.qa-bus { background: #f0fdf4; color: #16a34a; }

/* ── Modais ── */
.qf-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.55);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(3px);
}
.qf-overlay.active {
    display: flex;
}

.qf-modal {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: qfModalIn 0.2s ease;
}
.qf-modal-sm { max-width: 400px; }

@keyframes qfModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: none; }
}

.qf-modal-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}
.qf-modal-hdr h3 {
    margin: 0;
    font-size: 1rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.qf-modal-hdr h3 i { color: #0284c7; }

.qf-modal-close {
    background: #f1f5f9;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    color: #64748b;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.qf-modal-close:hover { background: #fee2e2; color: #ef4444; }

.qf-modal-body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.qf-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.7rem 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.15s;
}
.qf-search-wrap:focus-within { border-color: #0284c7; }
.qf-search-wrap i { color: #94a3b8; }
.qf-search-wrap input { border: none; outline: none; flex: 1; font-size: 0.95rem; color: #334155; background: transparent; }

.qf-search-results { min-height: 200px; }
.qf-hint { color: #94a3b8; text-align: center; padding: 2rem; font-size: 0.88rem; }
.qf-coming-soon { color: #94a3b8; text-align: center; padding: 2.5rem 1rem; font-size: 0.9rem; line-height: 2; }

/* Resultado de busca de questão */
.qf-result-item {
    padding: 0.85rem 1rem;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    margin-bottom: 0.6rem;
    cursor: pointer;
    transition: all 0.15s;
    background: #fafbfd;
}
.qf-result-item:hover { border-color: #7c3aed; background: #f5f3ff; }
.qf-result-item.selecionada { border-color: #7c3aed; background: #f5f3ff; }
.qf-result-item .qf-res-disc { font-size: 0.72rem; color: #0284c7; font-weight: 600; text-transform: uppercase; margin-bottom: 0.3rem; }
.qf-result-item .qf-res-text { font-size: 0.88rem; color: #334155; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.busca-check { width: 20px; height: 20px; min-width: 20px; border-radius: 50%; border: 2px solid #cbd5e1; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; color: transparent; transition: all 0.15s; }
.busca-check.checked { border-color: #7c3aed; background: #7c3aed; color: #fff; }

/* Filtro salvo */
.qf-saved-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 0.6rem;
    gap: 0.75rem;
}
.qf-saved-filter-name { font-weight: 600; color: #334155; font-size: 0.9rem; }
.qf-saved-filter-desc { font-size: 0.78rem; color: #94a3b8; margin-top: 0.15rem; }
.qf-saved-filter-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.qf-sf-btn { padding: 0.35rem 0.75rem; border-radius: 8px; border: 1px solid #e2e8f0; background: #f8fafc; cursor: pointer; font-size: 0.78rem; font-weight: 600; color: #475569; transition: all 0.15s; }
.qf-sf-btn.primary { background: #0284c7; border-color: #0284c7; color: #fff; }
.qf-sf-btn:hover { border-color: #0284c7; color: #0284c7; }
.qf-sf-btn.primary:hover { background: #0369a1; }

/* ── Botão favorito e caderno na questão ── */
.fav-btn, .add-caderno-btn {
    background: none;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.3rem 0.55rem;
    cursor: pointer;
    color: #94a3b8;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    min-width: 52px;
}
.btn-icon-label {
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
}
.fav-btn:hover { border-color: #ef4444; color: #ef4444; background: #fef2f2; }
.fav-btn.active { border-color: #ef4444; color: #ef4444; background: #fef2f2; }
.add-caderno-btn:hover { border-color: #0ea5e9; color: #0ea5e9; background: #eff6ff; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .qf-body { grid-template-columns: 1fr; }
    .qf-right { border-radius: 0 0 20px 20px; border-top: 1px solid #f1f5f9; }
    .qf-left { border-right: none; }
}

@media (max-width: 640px) {
    .qf-left, .qf-right { padding: 1rem; }
    .qf-tabbar { padding: 0 0.5rem; }
    .qf-tab { padding: 0.4rem 0.6rem; flex-direction: column; gap: 0.2rem; min-width: 54px; }
    .qf-tab span { display: block; font-size: 0.58rem; text-align: center; line-height: 1.1; }
    .qf-tab i { font-size: 0.9rem; }
    .qf-secondary-grid { grid-template-columns: 1fr 1fr; }
    .qf-tools-row { gap: 0.4rem; }
    .qf-tool { padding: 0.5rem 0.7rem; }
}

@media (max-width: 480px) {
    .qf-qty-counter { gap: 0.5rem; }
    .qf-presets { gap: 0.25rem; }
    .qf-preset { width: 34px; height: 30px; font-size: 0.75rem; }
}

/* ============================================================
   QUIZ NAV — Barra de navegação do bloco de questões
   ============================================================ */
.quiz-nav {
    background: #fff;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}
.quiz-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.quiz-nav-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.quiz-nav-stats {
    display: flex;
    gap: 0.9rem;
    font-size: 0.78rem;
    font-weight: 700;
    align-items: center;
}
.qns-correct { color: #22c55e; }
.qns-wrong   { color: #ef4444; }

.quiz-nav-inner {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}
.quiz-nav-inner::-webkit-scrollbar { height: 3px; }
.quiz-nav-inner::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 3px; }

.qn-btn {
    min-width: 32px;
    height: 40px;
    padding: 0 2px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex: 1;
    line-height: 1;
}
.qn-btn:hover:not(.qn-current) { border-color: #0284c7; color: #0284c7; transform: translateY(-1px); }
.qn-btn.qn-current {
    border-color: #0284c7;
    background: #0284c7;
    color: #fff;
    box-shadow: 0 2px 8px rgba(2,132,199,0.35);
}
.qn-btn.qn-correct {
    border-color: #22c55e;
    background: #dcfce7;
    color: #166534;
}
.qn-btn.qn-wrong {
    border-color: #ef4444;
    background: #fee2e2;
    color: #b91c1c;
}

/* ============================================================
   PERCENTUAL DE RESPOSTAS — mostrado após responder
   ============================================================ */
.option-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.option-text { width: 100%; }

.option-pct {
    display: none;
    flex-direction: column;
    gap: 0.22rem;
    width: 100%;
    padding-bottom: 0.5rem;
}
.pct-num {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    line-height: 1;
}
.pct-bar {
    width: 100%;
    height: 7px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}
.pct-fill {
    height: 100%;
    background: #94a3b8;
    border-radius: 4px;
    transition: width 0.65s ease;
    width: 0%;
}
.pct-fill--correct {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}
.pct-num--correct {
    color: #16a34a;
    font-weight: 800;
}

/* ============================================================
   BARRA DE STATS DA SESSÃO
   ============================================================ */
.ssb-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: var(--card-bg, #fff);
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.65rem 1rem;
    flex: 1;
    min-width: 110px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.ssb-icon {
    width: 36px; height: 36px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.ssb-icon--blue  { background: #eff6ff; color: #2563eb; }
.ssb-icon--green { background: #f0fdf4; color: #22c55e; }
.ssb-icon--red   { background: #fff1f2; color: #ef4444; }
.ssb-icon--gray  { background: #f8fafc; color: #64748b; }
.ssb-info { display: flex; flex-direction: column; }
.ssb-val { font-size: 1.15rem; font-weight: 800; color: var(--dark, #0f172a); line-height: 1.1; }
.ssb-val--green { color: #22c55e; }
.ssb-val--red   { color: #ef4444; }
.ssb-label { font-size: 0.7rem; color: #64748b; font-weight: 500; margin-top: 0.1rem; }

/* ============================================================
   BOTÃO ESTATÍSTICAS NA QUESTÃO
   ============================================================ */
.btn-stats-question {
    display: none;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border: 1.5px solid #2563eb;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-stats-question:hover { background: #dbeafe; }

/* ============================================================
   MODAL ESTATÍSTICAS DA QUESTÃO
   ============================================================ */
.sm-modal {
    background: var(--card-bg, #fff);
    border-radius: 20px;
    width: 90%;
    max-width: 520px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}
.sm-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1.5px solid #f1f5f9;
}
.sm-header-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, #2563eb, #1a3f7a);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.1rem; flex-shrink: 0;
}
.sm-header-info { flex: 1; }
.sm-header-title { font-weight: 800; font-size: 0.95rem; color: var(--dark, #0f172a); }
.sm-header-sub { font-size: 0.75rem; color: #64748b; margin-top: 0.15rem; }
.sm-close {
    background: #f1f5f9; border: none; border-radius: 50%;
    width: 32px; height: 32px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #64748b; font-size: 0.9rem;
    transition: background 0.15s;
}
.sm-close:hover { background: #e2e8f0; }
.sm-tabs {
    display: flex;
    border-bottom: 1.5px solid #f1f5f9;
    padding: 0 1.5rem;
}
.sm-tab {
    padding: 0.75rem 1.1rem;
    border: none; background: none;
    font-size: 0.85rem; font-weight: 600;
    color: #64748b; cursor: pointer;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -1.5px;
    transition: color 0.15s, border-color 0.15s;
}
.sm-tab.active { color: #2563eb; border-bottom-color: #2563eb; }
.sm-body { padding: 1.25rem 1.5rem; }

/* Stats grid */
.sm-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.sm-stat-box {
    border: 1.5px solid #f1f5f9;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.sm-stat-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: #f8fafc;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; color: #64748b; margin-bottom: 0.25rem;
}
.sm-stat-icon--blue  { background: #eff6ff; color: #2563eb; }
.sm-stat-icon--green { background: #f0fdf4; color: #22c55e; }
.sm-stat-icon--red   { background: #fff1f2; color: #ef4444; }
.sm-stat-val { font-size: 1.4rem; font-weight: 800; color: var(--dark, #0f172a); line-height: 1; }
.sm-stat-label { font-size: 0.72rem; color: #64748b; font-weight: 500; }

/* Distribution bars */
.sm-dist-section { margin-top: 0.25rem; }
.sm-dist-title { font-weight: 700; font-size: 0.9rem; color: var(--dark, #0f172a); margin-bottom: 0.2rem; }
.sm-dist-subtitle { font-size: 0.75rem; color: #94a3b8; margin-bottom: 0.85rem; }
.sm-dist-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.55rem;
}
.sm-dist-letter {
    width: 26px; height: 26px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.8rem; flex-shrink: 0;
}
.sm-dist-letter--correct { background: #dcfce7; color: #16a34a; }
.sm-dist-letter--wrong   { background: #fef2f2; color: #dc2626; }
.sm-dist-bar-wrap {
    flex: 1;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}
.sm-dist-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.7s ease;
    min-width: 3px;
}
.sm-dist-bar--correct { background: linear-gradient(90deg, #22c55e, #16a34a); }
.sm-dist-bar--wrong   { background: linear-gradient(90deg, #f87171, #ef4444); }
.sm-dist-pct { font-size: 0.78rem; font-weight: 700; color: #64748b; width: 34px; text-align: right; flex-shrink: 0; }
.sm-dist-label { font-size: 0.7rem; color: #94a3b8; flex-shrink: 0; }

/* Minhas */
.sm-minhas-wrap { padding: 0.5rem 0; }
.sm-minhas-result {
    border: 1.5px solid;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Empty state */
.sm-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #94a3b8;
}
.sm-empty i { font-size: 2rem; margin-bottom: 0.75rem; display: block; }
.sm-empty p { font-size: 0.85rem; }

/* Histórico */
.sm-hist-summary {
    display: flex;
    gap: 1.25rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.82rem;
    color: #475569;
    flex-wrap: wrap;
}
.sm-hist-list { display: flex; flex-direction: column; gap: 0.5rem; }
.sm-hist-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
}
.sm-hist-num { font-size: 0.72rem; color: #94a3b8; width: 24px; flex-shrink: 0; }
.sm-hist-badge {
    display: flex; align-items: center; gap: 0.3rem;
    font-size: 0.8rem; font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
}
.sm-hist-badge--ok  { background: #dcfce7; color: #16a34a; }
.sm-hist-badge--err { background: #fee2e2; color: #dc2626; }
.sm-hist-date { font-size: 0.75rem; color: #94a3b8; margin-left: auto; }

/* ============================================================
   COMENTÁRIOS — corrigido para mobile
   ============================================================ */
.comment-input-wrap {
    flex: 1;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    min-width: 0;
}
.comment-input-wrap .modern-input {
    flex: 1;
    min-width: 0;
}
.btn-send-comment {
    flex-shrink: 0;
    padding: 0.75rem 1rem !important;
    margin: 0 !important;
}

@media (max-width: 640px) {
    .comment-input-container {
        align-items: flex-start;
        gap: 0.6rem;
    }
    .comment-input-wrap {
        flex-wrap: nowrap;
        align-items: center;
    }
    .comment-input-wrap .modern-input {
        font-size: 0.88rem;
        padding: 0.65rem 0.85rem;
    }
    .btn-send-comment {
        padding: 0.65rem 0.85rem !important;
    }
    .inline-reply-box {
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    .inline-reply-box .modern-input {
        flex: 1 1 100%;
        min-width: 0;
        font-size: 0.85rem;
    }
    .inline-reply-box .btn-start-modern {
        flex: 1;
        justify-content: center;
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
    }
    .quiz-nav-title span { display: none; }
    .quiz-nav-stats { font-size: 0.73rem; gap: 0.6rem; }
    .qn-btn { min-width: 28px; height: 34px; font-size: 0.75rem; }
}

/* ================================================================
   RESPONSIVIDADE COMPLETA — filtros + questão + anotação
   ================================================================ */

/* ── Tablet/Mobile: qf-body empilha verticalmente ── */
@media (max-width: 900px) {
    .qf-body {
        grid-template-columns: 1fr;
    }
    .qf-left {
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
        padding: 1.25rem;
    }
    .qf-right {
        padding: 1.25rem;
    }
    .qf-secondary-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }
}

/* ── Mobile: ajustes gerais do painel de filtros ── */
@media (max-width: 768px) {
    .qf-container { border-radius: 14px; }
    .qf-tabbar { padding: 0 0.5rem; }
    .qf-tab { padding: 0.4rem 0.6rem; font-size: 0.78rem; flex-direction: column; gap: 0.2rem; min-width: 54px; }
    .qf-tab span { display: block; font-size: 0.6rem; text-align: center; line-height: 1.1; }
    .qf-tab i { font-size: 1rem; }

    /* Hierarquia: reduz indentação */
    .qfl-child1 { padding-left: 0.75rem; }
    .qfl-child2 { padding-left: 1.5rem; }
    .qfl-child3 { padding-left: 2.25rem; }
    .qfl-child1::before { left: calc(0.75rem + 5px); }
    .qfl-child2::before { left: calc(1.5rem + 5px); }
    .qfl-child3::before { left: calc(2.25rem + 5px); }

    /* Filtros secundários: 2×2 em mobile */
    .qf-secondary-grid { grid-template-columns: 1fr 1fr; }

    /* Valor selecionado: quebra linha em vez de truncar — mostra nome completo */
    .smart-select-value {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.35;
    }

    /* Tags ativas: altura máxima com scroll para não dominar a tela */
    .active-filter-tags {
        max-height: 72px;
        overflow-y: auto;
        scrollbar-width: thin;
    }

    /* Ferramentas rápidas: menores */
    .qf-tool { font-size: 0.75rem; padding: 0.4rem 0.7rem; }

    /* Painel direito de quantidade: padding menor */
    .qf-qty-card { padding: 1rem; }
    .qf-qty-title { font-size: 0.82rem; }
    .qf-avail { font-size: 0.78rem; }
    .qf-presets { gap: 0.3rem; }
    .qf-preset { padding: 0.35rem 0.65rem; font-size: 0.78rem; }
    .qf-start-btn { padding: 0.85rem; }
}

/* ── Mobile pequeno: filtros secundários em coluna única ── */
@media (max-width: 480px) {
    .qf-secondary-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .qf-left { padding: 1rem; }

    /* Abas de categoria: ícone + texto empilhado */
    .qf-tab { flex-direction: column; gap: 0.2rem; padding: 0.35rem 0.5rem; min-width: 50px; }
    .qf-tab span { display: block; font-size: 0.55rem; text-align: center; line-height: 1.1; }
    .qf-tab i { font-size: 0.85rem; }

    /* Hierarquia: indentação mínima */
    .qfl-child1 { padding-left: 0.5rem; }
    .qfl-child2 { padding-left: 1rem; }
    .qfl-child3 { padding-left: 1.5rem; }
}

/* ── Questão respondida: header com muitos badges ── */
@media (max-width: 600px) {
    .question-meta-info {
        flex-wrap: wrap;
        gap: 0.4rem;
        align-items: flex-start;
    }
    .badges-left {
        flex: 1 1 100%;      /* ocupa linha inteira */
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    .question-tag {
        font-size: 0.7rem;
        padding: 0.18rem 0.5rem;
    }
    /* botões de favorito/caderno ficam alinhados à direita */
    .question-meta-info > div:last-child {
        margin-left: auto;
    }
    /* info de banca/ano/id: quebra em 2 linhas se necessário */
    .question-header > div:last-child {
        font-size: 0.78rem;
        flex-wrap: wrap;
        gap: 0.3rem;
    }
}

/* ── Barra de anotação: botões menores em mobile ── */
@media (max-width: 520px) {
    .ann-toolbar-bar {
        flex-wrap: wrap;
        gap: 0.3rem;
        margin-bottom: 0.6rem;
    }
    .ann-mode-btn {
        font-size: 0.72rem;
        padding: 0.25rem 0.55rem;
        gap: 0.25rem;
    }
}

/* ── Alternativas: strike-btn + texto + % comprimidos ── */
@media (max-width: 480px) {
    .option-row { gap: 0.2rem; }
    .strike-btn { padding: 0; width: 22px; flex-shrink: 0; font-size: 0.75rem; }
    .option-item { gap: 0.4rem; padding: 0.55rem 0.65rem; }
    .option-prefix { width: 26px; height: 26px; font-size: 0.78rem; flex-shrink: 0; margin-top: 0; }
    .option-text { font-size: 0.85rem; line-height: 1.55; }
    .pct-num { font-size: 0.72rem; }
    .pct-bar { height: 5px; }

    /* Session stats bar: 2 colunas em telas pequeninhas */
    #session-stats-bar { gap: 0.4rem !important; }
    .ssb-item { flex: 1 1 calc(50% - 0.2rem); min-width: 0; padding: 0.5rem 0.75rem; }
    .ssb-icon { width: 30px; height: 30px; font-size: 0.8rem; }
    .ssb-val { font-size: 1rem; }
    .ssb-label { font-size: 0.65rem; }

    /* Feedback message: padding reduzido */
    #feedback-message { padding: 0.75rem !important; font-size: 0.9rem; }

    /* Modal stats: full screen em mobile pequeno */
    .sm-modal { width: 96% !important; border-radius: 16px; max-height: 92vh; }
}

/* ── Quiz header: compacto em mobile ── */
@media (max-width: 560px) {
    #quiz-header {
        padding: 0.65rem 0.875rem;
        gap: 0.4rem;
    }
    #question-counter { font-size: 0.88rem; }
    #timer-display { font-size: 1rem; }
    #quiz-header > div { font-size: 1.1rem !important; }
    #quiz-header > button { font-size: 0.75rem; padding: 0.35rem 0.875rem; }
}

/* ── Breadcrumb de filtros ativos: scrolla em vez de quebrar ── */
@media (max-width: 640px) {
    .qf-active-row {
        gap: 0.4rem;
    }
    .active-tag {
        font-size: 0.72rem;
        padding: 0.18rem 0.45rem;
    }
}

/* ── Quiz nav (números): garante scroll horizontal em vez de overflow ── */
.quiz-nav-inner {
    flex-wrap: nowrap;   /* força scroll, não quebra linha */
}
@media (max-width: 480px) {
    .quiz-nav { padding: 0.55rem 0.65rem; border-radius: 10px; }
    .quiz-nav-header { margin-bottom: 0.5rem; }
    .qn-btn { min-width: 24px; height: 30px; font-size: 0.7rem; border-radius: 6px; }
    .qns-answered { font-size: 0.7rem; }
    .quiz-nav-stats { gap: 0.4rem; font-size: 0.7rem; }
}

/* ================================================================
   DARK MODE — questoes.css
   ================================================================ */

/* ── Painel de filtros ── */
[data-theme="dark"] .qf-container {
    background: #111d2e;
    border-color: #1e3550;
    box-shadow: 0 4px 32px rgba(0,0,0,0.4);
}
[data-theme="dark"] .qf-tabbar { background: #0d1828; border-bottom-color: #1e3550; }
[data-theme="dark"] .qf-tab { background: #19273a; border-color: #1e3550; color: #64748b; }
[data-theme="dark"] .qf-tab:hover { background: #1e3550; color: #94a3b8; }
[data-theme="dark"] .qf-tab.active { background: rgba(59,130,246,0.15); border-color: #3b82f6; color: #60a5fa; }
[data-theme="dark"] .qf-body { gap: 0; }
[data-theme="dark"] .qf-left { border-right-color: #1e3550; }
[data-theme="dark"] .qf-section-hdr { color: #64748b; border-bottom-color: #1e3550; }
[data-theme="dark"] .qf-section-hdr i { color: #475569; }
[data-theme="dark"] .qf-divider { background: #1e3550; }

/* ── Hierarquia de filtros ── */
[data-theme="dark"] .qfl-item::before { background: #1e3550; }
[data-theme="dark"] .qfl-label span { color: #94a3b8; }
[data-theme="dark"] .filter-col-hint { color: #475569; }

/* ── Grid de filtros secundários ── */
[data-theme="dark"] .qf-mini-group label { color: #64748b; }
[data-theme="dark"] .qf-mini-group label i { color: #475569; }

/* ── Filtros ativos e limpar ── */
[data-theme="dark"] .qf-active-row { border-top-color: #1e3550; }
[data-theme="dark"] .qf-clear-btn { background: #19273a; border-color: #2d4060; color: #64748b; }
[data-theme="dark"] .qf-clear-btn:hover { background: rgba(239,68,68,0.08); border-color: #ef4444; color: #ef4444; }

/* ── Ferramentas rápidas ── */
[data-theme="dark"] .qf-tools-row { border-top-color: #1e3550; }
[data-theme="dark"] .qf-tool { background: #19273a; border-color: #2d4060; color: #64748b; }
[data-theme="dark"] .qf-tool i { color: #3b82f6; }
[data-theme="dark"] .qf-tool:hover { border-color: #3b82f6; background: rgba(59,130,246,0.08); color: #60a5fa; }

/* ── Painel direito (qtd e start) ── */
[data-theme="dark"] .qf-right { background: #0d1828; border-left-color: #1e3550; }
[data-theme="dark"] .qf-qty-card { background: #111d2e; border-color: #1e3550; }
[data-theme="dark"] .qf-qty-title { color: #e2e8f0; }
[data-theme="dark"] .qf-qty-title i { color: #3b82f6; }
[data-theme="dark"] .qf-cnt-btn { background: #19273a; border-color: #2d4060; color: #94a3b8; }
[data-theme="dark"] .qf-cnt-btn:hover { background: #3b82f6; border-color: #3b82f6; color: #fff; }
[data-theme="dark"] #qty-input { background: #0d1828; border-color: #2d4060; color: #e2e8f0; }
[data-theme="dark"] .qf-preset { background: #19273a; border-color: #2d4060; color: #64748b; }
[data-theme="dark"] .qf-preset:hover { border-color: #3b82f6; color: #60a5fa; }
[data-theme="dark"] .qf-preset.active { background: rgba(59,130,246,0.15); border-color: #3b82f6; color: #60a5fa; }
[data-theme="dark"] .qf-avail { color: #64748b; }
[data-theme="dark"] .qf-avail i,[data-theme="dark"] .qf-avail strong { color: #3b82f6; }

/* ── Acesso rápido ── */
[data-theme="dark"] .qf-quickaccess { border-top-color: #1e3550; }
[data-theme="dark"] .qf-qa-title { color: #64748b; }
[data-theme="dark"] .qf-qa-btn { background: #19273a; border-color: #2d4060; color: #64748b; }
[data-theme="dark"] .qf-qa-btn:hover { border-color: #3b82f6; background: rgba(59,130,246,0.08); color: #60a5fa; }
[data-theme="dark"] .qa-err { background: rgba(239,68,68,0.08); color: #f87171; }
[data-theme="dark"] .qa-fav { background: rgba(234,179,8,0.08); color: #fbbf24; }
[data-theme="dark"] .qa-cad { background: rgba(59,130,246,0.08); color: #60a5fa; }
[data-theme="dark"] .qa-bus { background: rgba(16,185,129,0.08); color: #34d399; }

/* ── Modal de busca ── */
[data-theme="dark"] .qf-overlay { background: rgba(0,0,0,0.75); }
[data-theme="dark"] .qf-modal { background: #111d2e; border-color: #1e3550; box-shadow: 0 24px 64px rgba(0,0,0,0.6); }
[data-theme="dark"] .qf-modal-hdr { border-bottom-color: #1e3550; }
[data-theme="dark"] .qf-modal-hdr h3 { color: #e2e8f0; }
[data-theme="dark"] .qf-modal-hdr h3 i { color: #3b82f6; }
[data-theme="dark"] .qf-modal-close { background: #19273a; color: #64748b; border-color: #2d4060; }
[data-theme="dark"] .qf-modal-close:hover { background: rgba(239,68,68,0.1); color: #f87171; border-color: #7f1d1d; }
[data-theme="dark"] .qf-search-wrap { background: #19273a; border-color: #2d4060; }
[data-theme="dark"] .qf-search-wrap:focus-within { border-color: #3b82f6; }
[data-theme="dark"] .qf-search-wrap input { color: #e2e8f0; background: transparent; }
[data-theme="dark"] .qf-search-wrap input::placeholder { color: #475569; }
[data-theme="dark"] .qf-search-wrap i { color: #475569; }
[data-theme="dark"] .qf-hint,[data-theme="dark"] .qf-coming-soon { color: #475569; }
[data-theme="dark"] .qf-result-item { background: #19273a; border-color: #2d4060; }
[data-theme="dark"] .qf-result-item:hover { border-color: #3b82f6; background: rgba(59,130,246,0.08); }
[data-theme="dark"] .qf-result-item .qf-res-disc { color: #60a5fa; }
[data-theme="dark"] .qf-result-item .qf-res-text { color: #94a3b8; }
[data-theme="dark"] .qf-saved-filter { background: #19273a; border-color: #2d4060; }
[data-theme="dark"] .qf-saved-filter-name { color: #e2e8f0; }
[data-theme="dark"] .qf-sf-btn { background: #111d2e; border-color: #2d4060; color: #64748b; }
[data-theme="dark"] .qf-sf-btn:hover { border-color: #3b82f6; color: #60a5fa; }
[data-theme="dark"] .qf-sf-btn.primary { background: #3b82f6; border-color: #3b82f6; color: #fff; }

/* ── Área do quiz ── */
[data-theme="dark"] .question-card { background: #111d2e; border-color: #1e3550; }
[data-theme="dark"] .question-header { background: #0d1828; border-bottom-color: #1e3550; }
[data-theme="dark"] .question-meta-info { color: #64748b; }
[data-theme="dark"] .question-tag { background: #19273a; border-color: #2d4060; color: #64748b; }
[data-theme="dark"] .question-level { color: #94a3b8; }
[data-theme="dark"] .status-badge { border-color: #2d4060; }
[data-theme="dark"] .status-done { background: rgba(16,185,129,0.1); color: #34d399; border-color: rgba(16,185,129,0.2); }
[data-theme="dark"] .status-new { background: #19273a; color: #64748b; border-color: #2d4060; }
[data-theme="dark"] .question-text { color: #cbd5e1; }

/* ── Opções de resposta ── */
[data-theme="dark"] .option-item { background: #19273a; border-color: #1e3550; }
[data-theme="dark"] .option-item:hover { background: #1f3145; border-color: #2d4060; }
[data-theme="dark"] .option-item.selected { background: rgba(59,130,246,0.1); border-color: #3b82f6; }
[data-theme="dark"] .option-prefix { background: #1e3550; border-color: #2d4060; color: #64748b; }
[data-theme="dark"] .option-item.selected .option-prefix { background: #3b82f6; border-color: #3b82f6; color: #fff; }
[data-theme="dark"] .option-text { color: #cbd5e1; }

.opt-correct { background-color: #dcfce7 !important; border-color: #22c55e !important; }
.opt-wrong   { background-color: #fee2e2 !important; border-color: #ef4444 !important; }
.opt-correct .option-text, .opt-wrong .option-text { color: #1e293b; }
[data-theme="dark"] .opt-correct { background-color: rgba(34,197,94,0.15) !important; }
[data-theme="dark"] .opt-wrong   { background-color: rgba(239,68,68,0.15) !important; }
[data-theme="dark"] .opt-correct .option-text { color: #86efac; }
[data-theme="dark"] .opt-wrong .option-text   { color: #fca5a5; }

/* ── Riscado ── */
[data-theme="dark"] .option-row.struck .option-item { background: #111d2e; border-color: #1e3550; }
[data-theme="dark"] .option-row.struck .option-text { color: #334155; }
[data-theme="dark"] .option-row.struck .option-prefix { background: #1e3550; border-color: #1e3550; color: #334155; }
[data-theme="dark"] .strike-btn { color: #475569; }
[data-theme="dark"] .strike-btn:hover { color: #94a3b8; background: #19273a; }

[data-theme="dark"] .alt-explanation { border-color: #1e3550; }
[data-theme="dark"] .alt-exp-header { background: #111d2e; }
[data-theme="dark"] .alt-exp-header:hover { background: #19273a; }
[data-theme="dark"] .alt-exp-body { background: #0d1828; border-top-color: #1e3550; }
[data-theme="dark"] .alt-exp-body p { color: #cbd5e1; }

.explicacao-final-box {
    padding: 0.9rem 1rem; background: linear-gradient(135deg,#eff6ff,#dbeafe);
    border-radius: 10px; border-left: 4px solid #2563eb; margin-top: 0.5rem;
}
.explicacao-final-title { display: flex; align-items: center; gap: 0.4rem; font-weight: 700; color: #1e40af; font-size: 0.85rem; margin-bottom: 0.5rem; }
.explicacao-final-box p { color: #1e3a8a; }
[data-theme="dark"] .explicacao-final-box { background: linear-gradient(135deg,#0d1f3d,#0f2847); border-left-color: #3b82f6; }
[data-theme="dark"] .explicacao-final-title { color: #93c5fd; }
[data-theme="dark"] .explicacao-final-box p { color: #bfdbfe; }

.explicacao-old-box {
    padding: 1rem; background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 10px; margin-top: 0.5rem;
}
.explicacao-old-title { display: flex; align-items: center; gap: 0.4rem; font-weight: 700; color: #0f172a; font-size: 0.88rem; margin-bottom: 0.5rem; }
.explicacao-old-box p { color: #374151; }
[data-theme="dark"] .explicacao-old-box { background: #0d1828; border-color: #1e3550; }
[data-theme="dark"] .explicacao-old-title { color: #f1f5f9; }
[data-theme="dark"] .explicacao-old-box p { color: #cbd5e1; }

.btn-ver-explicacao { border: 1.5px solid #2563eb; background: #eff6ff; color: #1d4ed8; }
[data-theme="dark"] .btn-ver-explicacao { border-color: #3b82f6; background: rgba(59,130,246,0.12); color: #93c5fd; }

.anulada-banner { background: linear-gradient(135deg,#fef9c3,#fef08a30); }
.anulada-banner-text { color: #854d0e; }
[data-theme="dark"] .anulada-banner { background: rgba(202,138,4,0.12); border-color: #a16207 !important; }
[data-theme="dark"] .anulada-banner-text { color: #fde047; }

.batch-finish-card { background: #fff; }
.batch-finish-title { color: #334155; }
.batch-finish-text { color: #64748b; }
[data-theme="dark"] .batch-finish-card { background: #111d2e; }
[data-theme="dark"] .batch-finish-title { color: #f1f5f9; }
[data-theme="dark"] .batch-finish-text { color: #94a3b8; }

/* ── Barra de estatísticas de respostas ── */
[data-theme="dark"] .option-pct { color: #64748b; }
[data-theme="dark"] .pct-bar { background: #1e3550; }
[data-theme="dark"] .pct-fill { background: linear-gradient(90deg, #3b82f6, #60a5fa); }

/* ── Botões de ação da questão ── */
[data-theme="dark"] .q-actions-row { background: #0d1828; border-top-color: #1e3550; }
[data-theme="dark"] .fav-btn, [data-theme="dark"] .add-caderno-btn { background: #19273a; border-color: #2d4060; color: #64748b; }
[data-theme="dark"] .fav-btn:hover { border-color: #ef4444; color: #f87171; background: rgba(239,68,68,0.08); }
[data-theme="dark"] .fav-btn.active { border-color: #ef4444; color: #f87171; background: rgba(239,68,68,0.08); }
[data-theme="dark"] .add-caderno-btn:hover { border-color: #0ea5e9; color: #38bdf8; background: rgba(14,165,233,0.08); }
[data-theme="dark"] .btn-skip-question { background: #19273a; border-color: #2d4060; color: #64748b; }
[data-theme="dark"] .btn-skip-question:hover { background: #1f3145; color: #94a3b8; border-color: #475569; }
[data-theme="dark"] .btn-report-error { background: #19273a; border-color: rgba(239,68,68,0.2); color: #f87171; }
[data-theme="dark"] .btn-report-error:hover { background: rgba(239,68,68,0.08); }

/* ── Navegação do quiz ── */
[data-theme="dark"] .quiz-nav { background: #111d2e; border-color: #1e3550; }
[data-theme="dark"] .quiz-nav-header { background: #0d1828; border-bottom-color: #1e3550; }
[data-theme="dark"] .quiz-nav-title { color: #94a3b8; }
[data-theme="dark"] .quiz-nav-stats { color: #64748b; }
[data-theme="dark"] .qn-btn { background: #19273a; border-color: #2d4060; color: #64748b; }
[data-theme="dark"] .qn-btn:hover:not(.qn-current) { border-color: #3b82f6; color: #60a5fa; }
[data-theme="dark"] .qn-btn.qn-current { background: #3b82f6; border-color: #3b82f6; color: #fff; }
[data-theme="dark"] .qn-btn.qn-correct { background: rgba(16,185,129,0.15); border-color: rgba(16,185,129,0.4); color: #34d399; }
[data-theme="dark"] .qn-btn.qn-wrong { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.3); color: #f87171; }
[data-theme="dark"] .quiz-nav-inner::-webkit-scrollbar-thumb { background: #2d4060; }

/* ── Toast ── */
[data-theme="dark"] .toast { background: #111d2e; border-color: #1e3550; color: #e2e8f0; box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
[data-theme="dark"] .toast-content p { color: #cbd5e1; }

/* ── Banca category tabs ── */
.banca-cat-tab {
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.banca-cat-tab:hover { border-color: #0284c7; color: #0284c7; }
.banca-cat-tab.active { background: #0284c7; border-color: #0284c7; color: #fff; }
.banca-modal-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s;
    font-size: 0.875rem;
    color: #1e293b;
}
.banca-modal-item:hover { background: #f1f5f9; }
.banca-modal-item.selected { background: #eff6ff; color: #1d4ed8; }
.banca-modal-item .banca-check { width: 16px; height: 16px; border-radius: 4px; border: 2px solid #cbd5e1; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.15s; }
.banca-modal-item.selected .banca-check { background: #2563eb; border-color: #2563eb; color: #fff; }
.banca-modal-pg { padding: 0.3rem 0.7rem; border-radius: 8px; border: 1.5px solid #e2e8f0; background: #f8fafc; color: #64748b; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.banca-modal-pg.active { background: #0284c7; border-color: #0284c7; color: #fff; }
[data-theme="dark"] .banca-cat-tab { background: #19273a; border-color: #2d4060; color: #64748b; }
[data-theme="dark"] .banca-cat-tab.active { background: #0284c7; border-color: #0284c7; color: #fff; }
[data-theme="dark"] .banca-modal-item { color: #e2e8f0; }
[data-theme="dark"] .banca-modal-item:hover { background: #1e3550; }
[data-theme="dark"] .banca-modal-item.selected { background: rgba(37,99,235,0.15); color: #60a5fa; }

/* ── Chips de subdisciplina ── */
[data-theme="dark"] .chip-item label { background: #19273a; border-color: #2d4060; color: #64748b; }
[data-theme="dark"] .chip-item label:hover { border-color: #3b82f6; color: #60a5fa; }
[data-theme="dark"] .chip-item input[type="checkbox"]:checked + label { background: rgba(59,130,246,0.12); border-color: #3b82f6; color: #60a5fa; }

/* ── Barra de anotação com botões visíveis ── */
.ann-toolbar-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    user-select: none;
}
.ann-mode-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.ann-mode-btn:hover { border-color: #94a3b8; color: #374151; background: #f1f5f9; }
.ann-mode-btn.active { background: #fef08a; border-color: #fbbf24; color: #92400e; }
#ann-btn-strike.active { background: #fee2e2; border-color: #fca5a5; color: #991b1b; text-decoration: line-through; }
#ann-btn-clear.active { background: #f0fdf4; border-color: #86efac; color: #166534; }
.ann-btn-erase { min-width: 36px; justify-content: center; }

/* ── Toolbar de anotação (highlight/riscar) ── */
#ann-toolbar {
    display: none;
    position: fixed;
    z-index: 9999;
    background: #1e293b;
    border-radius: 10px;
    padding: 0.3rem 0.4rem;
    gap: 0.3rem;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transform: translateY(-4px);
    animation: annFadeIn 0.15s ease;
}
@keyframes annFadeIn { from { opacity:0; transform:translateY(0); } to { opacity:1; transform:translateY(-4px); } }
.ann-btn {
    border: none;
    border-radius: 6px;
    padding: 0.3rem 0.55rem;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    transition: opacity 0.12s;
}
.ann-btn:hover { opacity: 0.8; }
.ann-btn-highlight { background: #fbbf24; color: #1e293b; }
.ann-btn-strike { background: transparent; color: #fff; border: 1.5px solid #475569; text-decoration: line-through; }
.ann-btn-clear { background: transparent; color: #94a3b8; border: 1.5px solid #334155; font-size: 0.75rem; }
.question-text mark, .option-text mark { background: #fef08a; border-radius: 2px; padding: 0 1px; }
.question-text del, .option-text del { text-decoration: line-through; color: #94a3b8; }

/* ── Busca global de filtros ── */
.qf-global-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.55rem 0.85rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.15s;
}
.qf-global-search:focus-within { border-color: #0284c7; background: #fff; }
.qf-global-search i { color: #94a3b8; font-size: 0.85rem; }
.qf-global-search input { border: none; outline: none; background: transparent; flex: 1; font-size: 0.875rem; color: #1e293b; }
.qf-global-search input::placeholder { color: #94a3b8; }
.qf-global-results {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.qf-global-result-item {
    display: flex;
    flex-direction: column;
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}
.qf-global-result-item:last-child { border-bottom: none; }
.qf-global-result-item:hover { background: #f0f9ff; }
.qf-global-result-name { font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.qf-global-result-path { font-size: 0.75rem; color: #94a3b8; margin-top: 1px; }

/* ── Seção de comentários ── */
[data-theme="dark"] .comments-section { border-top-color: #1e3550; }
[data-theme="dark"] .comment-input-container { background: #0d1828; border-top-color: #1e3550; }
[data-theme="dark"] .comment-input-wrap .modern-input { background: #19273a; border-color: #2d4060; color: #e2e8f0; }
[data-theme="dark"] .inline-reply-box .modern-input { background: #19273a; border-color: #2d4060; color: #e2e8f0; }

/* ── Report modal ── */
[data-theme="dark"] .report-box { background: #111d2e; border-color: #1e3550; }
[data-theme="dark"] .report-header { background: #0d1828; border-bottom-color: #1e3550; }
[data-theme="dark"] .report-header h3 { color: #e2e8f0; }
[data-theme="dark"] .report-label { color: #cbd5e1; }
[data-theme="dark"] .report-textarea { background: #19273a; border-color: #2d4060; color: #e2e8f0; }
[data-theme="dark"] .report-textarea::placeholder { color: #475569; }
[data-theme="dark"] .report-footer { background: #0d1828; border-top-color: #1e3550; }
[data-theme="dark"] .report-close { background: #19273a; border-color: #2d4060; color: #64748b; }
[data-theme="dark"] .report-close:hover { background: #1f3145; color: #94a3b8; }
[data-theme="dark"] .report-type-chip { background: #19273a; border-color: #2d4060; color: #64748b; }
[data-theme="dark"] .report-type-chip.active { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.4); color: #f87171; }

/* ===== DARK MODE - BUSCA GLOBAL ===== */

[data-theme="dark"] .qf-global-search {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .qf-global-search:focus-within {
    background: #1e293b;
    border-color: #3b82f6;
}

[data-theme="dark"] .qf-global-search input {
    color: #f8fafc;
}

[data-theme="dark"] .qf-global-search input::placeholder {
    color: #94a3b8;
}

[data-theme="dark"] .qf-global-results {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .qf-global-result-item {
    border-bottom-color: #334155;
}

[data-theme="dark"] .qf-global-result-item:hover {
    background: #0f172a;
}

[data-theme="dark"] .qf-global-result-name {
    color: #f8fafc;
}

[data-theme="dark"] .qf-global-result-path {
    color: #94a3b8;
}

[data-theme="dark"] .qf-quickaccess {
    background: linear-gradient(135deg, #111d2e, #19273a);
    border-color: #1e3550;
    box-shadow: 0 8px 25px rgba(0,0,0,.25);
}

[data-theme="dark"] .qf-qa-title {
    color: #e2e8f0;
}

[data-theme="dark"] .qf-qa-btn {
    background: #162742;
    border-color: #223859;
    color: #e2e8f0;
}

[data-theme="dark"] .qf-qa-btn:hover {
    background: #1d3557;
    border-color: #3b82f6;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(59,130,246,.25);
}

[data-theme="dark"] .qa-err {
    background: rgba(239,68,68,.15);
}

[data-theme="dark"] .qa-fav {
    background: rgba(250,204,21,.15);
}

[data-theme="dark"] .qa-cad {
    background: rgba(59,130,246,.15);
}

[data-theme="dark"] .qa-bus {
    background: rgba(16,185,129,.15);
}
/* ══════════════════════════════════════════════
   DARK MODE — questoes.css
   ══════════════════════════════════════════════ */
[data-theme="dark"] .ann-mode-btn {
    background: #19273a;
    border-color: #1e3550;
    color: #94a3b8;
}
[data-theme="dark"] .ann-mode-btn:hover {
    background: #1e3550;
    border-color: #2d4060;
    color: #e2e8f0;
}
[data-theme="dark"] .ann-mode-btn.active {
    background: #292007;
    border-color: #78350f;
    color: #fcd34d;
}
[data-theme="dark"] #ann-btn-strike.active {
    background: #1a0f0f;
    border-color: #3b1a1a;
    color: #fca5a5;
}
