:root {
    --sas-azul-marinho: #144057;
    --sas-ciano: #07c4cf;
}

/* Rótulo associado a campo que já tem contexto visual suficiente ao redor
   (ex: enunciado da questão logo acima) — some visualmente, continua
   anunciado por leitor de tela. Padrão clip-rect, não é decoração. */
.apenas-leitor-de-tela {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    background: #f4f6f8;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    background: var(--sas-azul-marinho);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.5rem;
    flex-shrink: 0;
}

.app-topbar-esquerda {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-topbar .logo-menu {
    height: 40px;
    width: auto;
}

.botao-hamburguer {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    margin: -0.4rem;
    cursor: pointer;
}

.app-topbar-usuario.ui.dropdown {
    color: #fff;
    cursor: pointer;
}

.app-topbar-usuario.ui.dropdown .text {
    color: #fff;
    font-weight: 700;
}

.app-topbar-usuario.ui.dropdown > .dropdown.icon {
    color: #fff;
}

.app-body {
    display: flex;
    flex: 1;
}

.app-sidebar {
    width: 230px;
    flex-shrink: 0;
    background: var(--sas-azul-marinho);
    padding: 1rem 0;
}

.app-sidebar-fundo {
    display: none;
}

.app-sidebar-item {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.app-sidebar-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.app-content {
    flex: 1;
    min-width: 0;
    padding: 1.5rem 2rem;
}

.curso-thumbnail,
.curso-thumbnail-placeholder {
    height: 140px;
    width: 100%;
    object-fit: cover;
    display: block;
}

.curso-thumbnail-placeholder {
    background: var(--sas-fundo-neutro, #f4f6f8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sas-azul-marinho);
    opacity: 0.35;
    font-size: 2.5rem;
}

.curso-thumbnail-mini,
.curso-thumbnail-placeholder-mini {
    width: 88px;
    height: 62px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.curso-thumbnail-placeholder-mini {
    background: var(--sas-fundo-neutro, #f4f6f8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sas-azul-marinho);
    opacity: 0.35;
    font-size: 1.4rem;
}

.cabecalho-com-thumbnail {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cabecalho-com-thumbnail .ui.header {
    margin: 0;
}

.ui.button.botao-primario,
.ui.buttons .ui.button.botao-primario {
    background: var(--sas-ciano);
    color: var(--sas-azul-marinho);
}

.ui.button.botao-primario:hover {
    background: #06aeb8;
}

/* Token "button-destrutivo" (DESIGN.md) — antes reescrito inline em 6 telas
   (achado do /impeccable audit, 2026-07-27). Aplica no botão de confirmação
   final dos modais de exclusão/reset, sempre atrás de campo de senha. */
.ui.button.botao-destrutivo {
    background: #db2828;
    color: #fff;
}

.ui.button.botao-destrutivo:hover {
    background: #c21f1f;
    color: #fff;
}

.ui.card,
.ui.cards > .card {
    box-shadow: 0 1px 3px rgba(20, 64, 87, 0.12) !important;
    border: none !important;
}

/* Paginação client-side (sastraining.js, paginarArray/renderizarPaginacao) —
   Semantic UI deixa o "ui pagination menu" largura-de-conteúdo por padrão
   (flex row), o que o joga pra esquerda dentro do container. Estica pra
   largura total e centraliza os itens, sem precisar tocar cada template. */
.ui.pagination.menu {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 1rem;
}

.rodape-sastraining {
    padding: 1.5rem 0;
    text-align: center;
    color: #5c6b76;
    font-size: 0.85rem;
}

/* #7a8894 original media 3.36:1 contra o fundo #f4f6f8, abaixo do minimo AA
   (4.5:1). Escurecido pra #5c6b76 (5.07:1) - mesmo tom, so mais escuro. */
.texto-auxiliar {
    color: #5c6b76;
}

/* Semantic UI usa branco sobre #21ba45 por padrao (2.57:1, abaixo do AA).
   Escurecido pra #15792d (5.52:1) - mesma familia de verde, so mais escura. */
.ui.green.label {
    background-color: #15792d !important;
}

/* Sidebar de 230px + topbar fixos não tinham tratamento responsivo (achado
   do /impeccable audit, 2026-07-27). Abaixo de 768px a sidebar vira drawer
   off-canvas acionado pelo hamburguer — mesmo vocabulário visual (azul-
   marinho, itens idênticos), só muda o mecanismo de exibição. */
@media (max-width: 767px) {
    .botao-hamburguer {
        display: block;
    }

    .app-body {
        position: relative;
    }

    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.2s ease-out;
        overflow-y: auto;
    }

    .app-sidebar.aberta {
        transform: translateX(0);
    }

    .app-sidebar-item {
        padding: 0.9rem 1.5rem;
    }

    .app-sidebar-fundo {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(20, 64, 87, 0.45);
        z-index: 99;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease-out;
    }

    .app-sidebar-fundo.visivel {
        opacity: 1;
        pointer-events: auto;
    }

    .app-content {
        padding: 1rem 1.25rem;
    }

    .app-topbar {
        padding: 0.6rem 1rem;
    }

    /* Tabelas administrativas (.ui.table) não têm wrapper de scroll próprio
       em nenhuma das 8 telas que as usam — sem isso, colunas extras ficam
       cortadas em vez de acessíveis por scroll horizontal contido. */
    .app-content .ui.table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}