/* =========================================================
   professor.css - PAINEL DOCENTE & FERRAMENTAS PEDAGÓGICAS
   Portal do Careca • Prof. Raphael Paulino
   ========================================================= */

/* ---------------------------------------------------------
   1. BARRA DE FERRAMENTAS & SELETOR DE SÉRIES
   --------------------------------------------------------- */
.barra-ferramentas-docente {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.barra-seletor-series {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0;
    padding: 10px 14px;
    background: var(--bg-surface, #111827);
    border: 1px solid var(--border-color, #23324d);
    border-radius: 12px;
    box-sizing: border-box;
}

.label-seletor-series {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.lista-pills-series {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pill-serie-prof {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card, #182238);
    border: 1px solid var(--border-color, #23324d);
    border-radius: 8px;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s ease;
}

.pill-serie-prof:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--brand-blue, #38bdf8);
    color: var(--text-primary, #f8fafc);
}

.pill-serie-prof.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--brand-blue, #38bdf8);
    color: var(--brand-blue, #38bdf8);
    font-weight: 700;
}

/* ---------------------------------------------------------
   2. FILTRO DE UNIDADES EM ANDAMENTO
   --------------------------------------------------------- */
.barra-filtro-linha {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.filtro-atuais-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--bg-surface, #131b2e);
    border: 1px solid var(--border-color, #23324d);
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s ease;
}

.filtro-atuais-check:hover {
    border-color: var(--brand-blue, #38bdf8);
    background: rgba(255, 255, 255, 0.03);
}

.filtro-atuais-check input[type="checkbox"] {
    accent-color: var(--brand-blue, #38bdf8);
    width: 17px;
    height: 17px;
    cursor: pointer;
}

.filtro-atuais-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
}

/* ---------------------------------------------------------
   3. BLOCO DA FRENTE (ACORDEÃO DOCENTE RETRÁTIL)
   --------------------------------------------------------- */
.frente-bloco-docente {
    margin-bottom: 1.75rem;
    background: rgba(19, 27, 46, 0.4);
    border: 1px solid var(--border-color, #23324d);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.frente-bloco-docente:hover {
    border-color: rgba(56, 189, 248, 0.3);
}

.frente-cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s ease;
}

.frente-cabecalho:hover {
    background: rgba(255, 255, 255, 0.02);
}

.frente-cabecalho-esquerda {
    display: flex;
    align-items: center;
    gap: 12px;
}

.frente-cabecalho-direita {
    display: flex;
    align-items: center;
    gap: 14px;
}

.frente-total-tag {
    font-size: 0.82rem;
    color: var(--text-muted, #64748b);
    font-weight: 500;
}

.frente-icone-seta {
    width: 20px;
    height: 20px;
    stroke: var(--text-muted, #64748b);
    transition: transform 0.3s ease, stroke 0.2s ease;
}

.frente-cabecalho:hover .frente-icone-seta {
    stroke: var(--brand-blue, #38bdf8);
}

/* Estado Fechado */
.frente-bloco-docente.fechado .frente-icone-seta {
    transform: rotate(-90deg);
}

.frente-bloco-docente.fechado .frente-corpo-grid {
    display: none !important;
}

.frente-corpo-grid {
    padding: 1.25rem 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ---------------------------------------------------------
   4. GRADE DO PROFESSOR: ALTURA EQUALIZADA & GRADE 2x2
   --------------------------------------------------------- */
.grid-professor-fixo {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)) !important;
    gap: 1.25rem !important;
    align-items: stretch !important;
}

/* Botões em 2x2 exclusivos do painel docente */
.grid-professor-fixo .card-materia-acoes {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
}

.grid-professor-fixo .btn-card-acao {
    min-height: 48px;
    padding: 8px 10px;
    touch-action: manipulation;
}

/* ---------------------------------------------------------
   5. AÇÕES EXCLUSIVAS DO PROFESSOR (PROJETOR & GABARITO)
   --------------------------------------------------------- */
.btn-card-projetor {
    color: #818cf8;
}

.btn-card-projetor .icon-svg,
.btn-card-projetor .icon-lucide {
    stroke: #818cf8;
}

.btn-card-projetor:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.4);
    color: #c7d2fe;
}

.btn-card-projetor:hover .icon-svg,
.btn-card-projetor:hover .icon-lucide {
    stroke: #c7d2fe;
}

.btn-link-prof-destaque {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald, #10b981);
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-weight: 700;
    touch-action: manipulation;
}

.btn-link-prof-destaque:hover {
    background: var(--accent-emerald, #10b981);
    color: #0b0f19;
}

.badge-status-regular {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted, #94a3b8);
}

/* ---------------------------------------------------------
   6. UTILITÁRIOS E ESTADOS DO PAINEL DOCENTE
   --------------------------------------------------------- */
.prof-msg-estado {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--text-muted, #94a3b8);
}

.prof-msg-erro {
    color: var(--accent-rose, #f43f5e);
}

.badge-materia-prof {
    font-size: 0.88rem;
    padding: 6px 14px;
}

.video-item-autor-prof {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
}

.icon-btn-video {
    width: 14px;
    height: 14px;
}

/* ---------------------------------------------------------
   7. RESPONSIVIDADE MOBILE CONSOLIDADA (TELAS <= 680px)
   --------------------------------------------------------- */
@media (max-width: 680px) {
    .barra-seletor-series {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .lista-pills-series {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .lista-pills-series::-webkit-scrollbar {
        display: none;
    }

    .pill-serie-prof {
        padding: 6px 12px;
        font-size: 0.78rem;
    }

    .filtro-atuais-label {
        font-size: 0.8rem;
    }

    .frente-cabecalho {
        padding: 1rem 1.1rem;
    }

    .frente-corpo-grid {
        padding: 1rem 1rem 1.1rem 1rem;
    }

    .frente-cabecalho-esquerda .badge-materia {
        font-size: 0.78rem;
        padding: 4px 10px;
    }

    .frente-total-tag {
        font-size: 0.75rem;
    }

    .grid-professor-fixo {
        gap: 1rem !important;
    }
}