/* =========================================================================
   css/regrasBoletim.css - COMPOSIÇÃO DE BOLETIM & ARREDONDAMENTO
   Visual Arejado, Alinhamento Perfeito e Ícones Temáticos
   ========================================================================= */

.boletim-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    color: #e2e8f0;
    box-sizing: border-box;
}

/* Cores de Ícones do Sistema */
.icon-cyan-color    { color: #38bdf8 !important; }
.icon-violet-color  { color: #a855f7 !important; }
.icon-emerald-color { color: #10b981 !important; }
.icon-amber-color   { color: #f59e0b !important; }
.icon-blue-color    { color: #0284c7 !important; }

/* Cabeçalho */
.boletim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e293b;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #334155;
    flex-wrap: wrap;
    gap: 1rem;
}

.boletim-titulo-bloco h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.boletim-titulo-bloco p {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: #94a3b8;
}

.boletim-header-acoes {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Barra de Contexto Lógica: Ano -> Matéria -> Turmas -> Bimestre */
.boletim-filtros-bar {
    display: flex;
    gap: 1rem;
    background: #0f172a;
    padding: 1.15rem 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid #334155;
    align-items: flex-end;
    flex-wrap: wrap;
}

.boletim-filtro-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 140px;
    flex: 1;
    position: relative;
}

.boletim-filtro-item label {
    font-size: 0.725rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.boletim-select, .boletim-input {
    background: #1e293b;
    border: 1px solid #475569;
    color: #f8fafc;
    padding: 0.6rem 0.8rem;
    border-radius: 0.4rem;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.boletim-select:focus, .boletim-input:focus {
    border-color: #38bdf8;
    background: #162032;
}

/* Seletor Múltiplo de Turmas */
.boletim-multiselect-trigger {
    background: #1e293b;
    border: 1px solid #475569;
    color: #f8fafc;
    padding: 0.6rem 0.8rem;
    border-radius: 0.4rem;
    font-size: 0.875rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.boletim-multiselect-trigger:hover {
    border-color: #38bdf8;
    background: #162032;
}

.boletim-multiselect-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    min-width: 290px;
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 0.5rem;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
    z-index: 60;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.boletim-multiselect-acoes {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.5rem 0.5rem 0.5rem;
    border-bottom: 1px solid #334155;
}

.btn-link-xs {
    background: none;
    border: none;
    color: #38bdf8;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.boletim-multiselect-lista {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.boletim-multiselect-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.6rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: #e2e8f0;
}

.boletim-multiselect-item:hover {
    background: #334155;
}

/* Banner de Homologação */
.boletim-banner-trancado {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 0.6rem;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fbbf24;
    font-size: 0.88rem;
}

/* Seção 1: Grid dos Cartões de Parâmetros */
.boletim-grid-regras-motor {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 1.25rem;
}

.boletim-card-bloco {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-sizing: border-box;
}

.boletim-card-bloco-topo {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-bottom: 1px solid #334155;
    padding-bottom: 0.75rem;
}

.boletim-card-bloco-topo h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #f8fafc;
}

.boletim-card-tag {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.45rem;
    border-radius: 0.3rem;
    width: fit-content;
}

.boletim-card-tag.blue    { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.boletim-card-tag.emerald { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.boletim-card-tag.amber   { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

/* Campos Empilhados com Altura e Espaçamento Perfeitos (Sem deslocamento) */
.boletim-campos-pilha {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.boletim-campo-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
}

.boletim-campo-item label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.boletim-card-bloco small {
    font-size: 0.725rem;
    color: #94a3b8;
    line-height: 1.3;
}

/* Seção 2: Grade de Instrumentos Avaliativos */
.boletim-painel-instrumentos {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.boletim-instrumentos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
    padding-bottom: 1rem;
}

.boletim-instrumentos-header h4 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.boletim-tabela-instrumentos {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.65rem;
}

.boletim-tabela-instrumentos th {
    text-align: left;
    padding: 0.5rem 1rem;
    font-size: 0.725rem;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.05em;
}

.boletim-linha-instrumento {
    background: #0f172a;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.boletim-linha-instrumento:hover {
    background: #162032;
}

.boletim-linha-instrumento td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-top: 1px solid #334155;
    border-bottom: 1px solid #334155;
}

.boletim-linha-instrumento td:first-child {
    border-left: 1px solid #334155;
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.boletim-linha-instrumento td:last-child {
    border-right: 1px solid #334155;
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

/* Badges e Identificadores */
.boletim-badge-sigla {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.65rem;
    border-radius: 0.375rem;
    font-weight: 800;
    font-size: 0.825rem;
    letter-spacing: 0.03em;
}

.boletim-sigla-AT  { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); }
.boletim-sigla-AC  { background: rgba(52, 211, 153, 0.15); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.4); }
.boletim-sigla-AD  { background: rgba(167, 139, 250, 0.15); color: #c084fc; border: 1px solid rgba(167, 139, 250, 0.4); }
.boletim-sigla-REC { background: rgba(251, 146, 60, 0.15); color: #fb923c; border: 1px solid rgba(251, 146, 60, 0.4); }
.boletim-sigla-DIN { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }

.boletim-badge-natureza {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.25rem 0.55rem;
    border-radius: 0.3rem;
}

.boletim-badge-natureza.simples     { background: #1e293b; color: #94a3b8; border: 1px solid #475569; }
.boletim-badge-natureza.composta    { background: rgba(167, 139, 250, 0.18); color: #c084fc; border: 1px solid #7c3aed; }
.boletim-badge-natureza.recuperacao { background: rgba(251, 146, 60, 0.18); color: #fb923c; border: 1px solid #ea580c; }

.boletim-nome-resumo {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.boletim-nome-resumo strong {
    font-size: 0.925rem;
    color: #f1f5f9;
}

.boletim-nome-resumo span {
    font-size: 0.75rem;
    color: #94a3b8;
}

.boletim-dado-destaque {
    font-weight: 700;
    font-size: 0.9rem;
    color: #f8fafc;
}

/* Card de Estado Vazio */
.boletim-vazio-card {
    background: #0f172a;
    border: 1px dashed #334155;
    border-radius: 0.75rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
}

.boletim-vazio-card h4 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.1rem;
}

.boletim-vazio-card p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.85rem;
    max-width: 480px;
}

.boletim-vazio-acoes {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Modais */
.boletim-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.boletim-modal-overlay.open {
    display: flex;
}

.boletim-modal-card {
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 560px;
    padding: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    overflow-y: auto;
}

.boletim-modal-header-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
    padding-bottom: 0.85rem;
    margin-bottom: 1.25rem;
}

.boletim-modal-titulo {
    margin: 0;
    color: #f8fafc;
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.boletim-form-grupo {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.boletim-form-grupo label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #cbd5e1;
}

.boletim-form-grid-duplo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.boletim-modal-criterios-box {
    background: #0f172a;
    border: 1px dashed rgba(167, 139, 250, 0.4);
    border-radius: 0.5rem;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.boletim-modal-criterio-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1e293b;
    border: 1px solid #334155;
    padding: 0.5rem 0.75rem;
    border-radius: 0.35rem;
}

.boletim-modal-criterio-card.selecionado {
    border-color: #a78bfa;
    background: rgba(167, 139, 250, 0.08);
}

.boletim-modal-acoes {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-top: 1.25rem;
    border-top: 1px solid #334155;
    padding-top: 1rem;
}

/* Rodapé Principal */
.boletim-rodape-acoes {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #334155;
}

.boletim-feedback-msg {
    font-size: 0.875rem;
    color: #34d399;
    opacity: 0;
    transition: opacity 0.3s;
}

.boletim-feedback-msg.visivel {
    opacity: 1;
}

.btn-outline-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid #f59e0b;
    color: #fbbf24;
}

.btn-outline-warning:hover {
    background: #f59e0b;
    color: #0f172a;
}

.btn-outline-success {
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid #10b981;
    color: #34d399;
}

.btn-outline-success:hover {
    background: #10b981;
    color: #0f172a;
}
.boletim-badge-natureza.composta {
    white-space: nowrap !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.65rem;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}