/*
==============================
Fábio G. Silva (www.fabiog.com.br)
==============================
https://www.toptal.com/developers/cssminifier
*/

@charset "utf-8";

/* =============================================================================
   CSS GERAL — CDD (digitacao/)
   -----------------------------------------------------------------------------
   Carregado em TODAS as páginas via head.php. lesson.php e custom.php linkam este
   arquivo de novo depois de animate.css/keyboard.css, para vencer a cascata deles.

   Regras exclusivas de um perfil ficam em arquivos próprios, carregados só
   nas páginas protegidas pelo restrict correspondente (ver head.php):
     - css/admin.css   → páginas com controllers/restrict-admin.php
     - css/escola.css  → páginas com controllers/restrict-school.php

   A ORDEM DAS SEÇÕES IMPORTA (cascata): base → utilitários → layout →
   componentes → navegação/rodapé → telas → celular (sempre por último).
   Documentação: documentation/css.md
   ============================================================================= */


/* =============================================================================
   1. BASE — reset e seletores de tag
   Precisa vir primeiro: várias regras abaixo (a.btn, a.btn-buy, a.topnav__*)
   têm a mesma especificidade de a:link e só vencem por virem depois.
   ============================================================================= */

body {
    font-family: Roboto, Arial, Helvetica, sans-serif;
    /* background-image: url(../img/background.jpg); */
    background-repeat: repeat;
    margin: 0;
    padding: 0;
    color: #000;
    background-color: #9b1e49;
}

/* listas sem padding/margem — variações entre navegadores */
ul,
ol,
dl {
    padding: 0;
    margin: 0;
}

/* títulos e parágrafos: padding lateral no elemento em vez do div (evita somar largura) */
h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin-top: 0;
    padding-right: 15px;
    padding-left: 15px;
    color: #666;
}

h1 {
    font-size: 22px;
    text-align: center;
    clear: both;
    padding-top: 20px;
}

h2 {
    color: #2d8eb5;
    font-size: 22px;
    text-align: center;
    margin-top: 59px;
}

h3 {
    color: #999999;
    font-size: 16px;
    text-align: center;
}

p {
    color: #000;
    font-size: 14px;
    text-align: center;
}

/* remove a borda azul de imagem dentro de link em navegadores antigos */
a img {
    border: none;
}

/* links: manter a ordem link → visited → hover/active/focus */
a:link {
    color: #42413C;
    text-decoration: underline;
}

a:visited {
    color: #6E6C64;
    text-decoration: underline;
}

a:hover,
a:active,
a:focus {
    text-decoration: none;
}

::-webkit-input-placeholder {
    color: #e1e1e1;
}

:-moz-placeholder {
    /* Firefox 18- */
    color: #e1e1e1;
}

::-moz-placeholder {
    /* Firefox 19+ */
    color: #e1e1e1;
}

:-ms-input-placeholder {
    color: #e1e1e1;
}

label {
    display: list-item;
    list-style: none;
}

input[type=number],
input[type=date],
input[type=email],
input[type=text],
input[type=password],
select {
    padding: 10px;
    font-size: 1.2em;
    border: thin solid #e1e1e1;
    margin: 10px;
    font-size: 15px;
    font-family: "Arial";
}

button {
    padding: 11px;
    border: none;
    background-color: #0066CC;
    color: #FFF;
    font-size: 18px;
    margin-top: 10px;
    margin-left: 5px;
    min-width: 150px;
    border-radius: 24px;
}

button:hover {
    background-color: #ff6600;
}

table {
    border-collapse: collapse;
    width: 87%;
    margin: auto;
    font-size: 11px;
}

td,
th {
    border: 1px solid #dddddd;
    text-align: left;
    padding: 8px;
}

th {
    background-color: #f95893;
    color: white;
}

tr:nth-child(even) {
    background-color: #ededed;
}


/* =============================================================================
   2. UTILITÁRIOS
   ============================================================================= */

/* flutua à direita/esquerda — o elemento flutuado deve vir antes do conteúdo */
.fltrt {
    float: right;
    margin-left: 8px;
}

.fltlft {
    float: left;
    margin-right: 8px;
}

/* em <br>/div vazio após o último elemento flutuado */
.clearfloat {
    clear: both;
    height: 0;
    font-size: 1px;
    line-height: 0px;
}

.noSelected {
    -webkit-touch-callout: none; /* iPhone OS, Safari */
    -webkit-user-select: none;   /* Chrome, Safari 3 */
    -khtml-user-select: none;    /* Safari 2 */
    -moz-user-select: none;      /* Firefox */
    -ms-user-select: none;       /* IE10+ */
    user-select: none;
}

.nocursor {
    cursor: default;
}


/* =============================================================================
   3. LAYOUT — container branco central e logo
   ============================================================================= */

/* contêiner que cerca todos os outros elementos (no celular vira largura total, ver seção 99) */
.container {
    width: 80%;
    max-width: 950px;
    background-color: #fff;
    margin: 0 auto;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    box-shadow: 0 1px 23px #000;
}

/* padding só em cima/embaixo; o padding lateral fica nos elementos internos (h1..p) */
.content {
    transition: all 0.5s ease;
    padding: 10px 0;
    position: relative;
}

/* logo.php e telas de criar/editar escola (school-create-admin.php, school-edit-admin.php) */
div#logo {
    width: 300px;
    margin: auto;
}

img#poweredby,
img#logo {
    margin: auto;
    width: 250px;
    display: block;
}


/* =============================================================================
   4. COMPONENTES COMPARTILHADOS
   ============================================================================= */

/* ---- Botões ---- */

a.btn {
    clear: both;
    padding: 10px;
    background-color: #0066CC;
    color: #FFF;
    margin: 10px;
    text-decoration: none;
    transition: all 0.5s ease;
    border-radius: 5px;
}

a.btn:hover {
    background-color: #099;
}

/* botão verde de "criar/confirmar" (login, compra, relatórios, home_admin, ativar aluno) */
button.create_btn {
    background-color: #5daf31;
}

button.create_btn:hover {
    background-color: #4ca31d;
}

/* ---- Mensagens de retorno (sucesso/erro) ---- */

span.info,
span.error {
    display: block;
    border: thin solid #da203a;
    padding: 10px;
    margin: 20px;
}

span.info {
    border: thin solid #090;
}

/* ---- Relatório de lições: cards de resumo + gráfico (reports-graphic.php) ----
   Telas: reports.php e student-report.php. Documentação: documentation/reports.md */
.rep-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin: 20px 0 16px;
}

.rep-kpi {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    padding: 12px 14px;
    text-align: left;
}

.rep-kpi__label {
    display: block;
    font-size: 12px;
    color: #77777f;
    margin-bottom: 4px;
}

.rep-kpi strong {
    font-size: 22px;
    color: #2b2b33;
}

.rep-chart {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    padding: 14px 16px 10px;
    margin-bottom: 20px;
}

.rep-chart__bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.rep-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* `button.` + :hover explícitos: o `button`/`button:hover` global (laranja, min-width 150px, margin) tem
   especificidade maior que uma classe sozinha e vazaria pra cá. */
button.rep-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin: 0;
    background: transparent;
    color: #888;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

button.rep-chip:hover {
    background: #f5f5f5;
    color: #555;
    border-color: #ccc;
}

.rep-chip i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 0.35;
}

button.rep-chip.is-on,
button.rep-chip.is-on:hover {
    background: #f1f6fb;
    color: #0a74b8;
    border-color: #b9d7ee;
}

.rep-chip.is-on i {
    opacity: 1;
}

.rep-chart__wrap {
    position: relative;
    height: 320px;
}

.rep-chart__note {
    font-size: 12px;
    color: #888;
    margin: 8px 0 0;
}

@media (max-width: 600px) {
    .rep-chart__wrap { height: 240px; }
}

/* ---- Botão de download CSV ----
   Telas: students-school.php, students-lessons.php, reports.php, student-report.php,
   school-invoices.php, custom.php, certificate.php, certificate_tag.php.
   Centralizado aqui em 2026-09 (antes cada tela duplicava a regra no <style> inpage).
   `.export-toolbar` só precisa de display:flex: o botão se alinha à direita sozinho
   via margin-left:auto, sozinho na linha ou dividindo espaço com busca/filtro.
   Estilo intencionalmente discreto (cinza, borda fina, sem preenchimento) — pedido
   explícito do usuário para não competir com as ações primárias da tela. */
.export-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
}

.btn-export-csv {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    background: transparent;
    color: #888;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-export-csv:link,
.btn-export-csv:visited {
    color: #888;
    text-decoration: none;
}

.btn-export-csv:hover {
    background: #f5f5f5;
    color: #555;
    border-color: #ccc;
}

.btn-export-csv svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    opacity: 0.7;
}

/* ---- Tabela ordenável (#table-ranking-list.sortable-table) ----
   Usada por telas de admin E de escola, por isso fica aqui:
   reports.php e student-report.php (controllers/Ranking.php), students-lessons.php e
   student-status.php (User::printTableStudentsLessons), log_user.php, student-search.php,
   school-invoices.php, lesson_group (controllers/Lesson.php) e custom.php (#addtext).
   Escopada por .sortable-table para não colidir com outro #table-ranking-list sem
   essa classe. Ordenação: js/table-sort.js.
   O modo "card no celular" (.table-cards-mobile) só é usado em telas admin → css/admin.css. */
.table-card-wrapper {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e6e6e6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    margin-top: 16px;
    background-color: #fff;
}

#table-ranking-list.sortable-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

#table-ranking-list.sortable-table thead th {
    position: sticky;
    top: 0;
    background-color: #f7f7f7;
    color: #333;
    text-align: left;
    padding: 10px 12px;
    font-weight: 700;
    border-bottom: 2px solid #e6e6e6;
    white-space: nowrap;
}

#table-ranking-list.sortable-table th.col-rank {
    width: 40px;
}

#table-ranking-list.sortable-table th.th-sortable {
    cursor: pointer;
    user-select: none;
}

#table-ranking-list.sortable-table th.th-sortable:hover {
    background-color: #eee;
}

#table-ranking-list.sortable-table th.th-sortable::after {
    content: '\21C5';
    display: inline-block;
    margin-left: 4px;
    font-size: 10px;
    color: #aaa;
}

#table-ranking-list.sortable-table th.th-sortable.sort-asc::after {
    content: '\25B2';
    color: #0066cc;
}

#table-ranking-list.sortable-table th.th-sortable.sort-desc::after {
    content: '\25BC';
    color: #0066cc;
}

#table-ranking-list.sortable-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
}

#table-ranking-list.sortable-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

#table-ranking-list.sortable-table tbody tr:hover {
    background-color: #f0f6ff;
}

#table-ranking-list.sortable-table td.col-rank {
    color: #aaa;
    font-size: 11px;
    text-align: center;
}

/* barra de progresso de lições e selo de status (User::printTableStudentsLessons —
   students-lessons.php [escola] e student-status.php [admin]) */
#table-ranking-list.sortable-table .lesson-progress {
    position: relative;
    width: 90px;
    height: 20px;
    background-color: #f2f2f2;
    border-radius: 20px;
    overflow: hidden;
}

#table-ranking-list.sortable-table .lesson-progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background-color: #2b9b41;
    opacity: 0.25;
}

#table-ranking-list.sortable-table .lesson-progress-label {
    position: relative;
    z-index: 1;
    display: block;
    text-align: center;
    line-height: 20px;
    font-size: 11px;
    color: #333;
    text-decoration: none;
}

#table-ranking-list.sortable-table .status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-decoration: none;
    white-space: nowrap;
}

#table-ranking-list.sortable-table .status-badge.status-approved {
    background-color: #2b9b41;
    color: #fff;
}

#table-ranking-list.sortable-table .status-badge.status-approved:hover {
    background-color: #237a34;
}

#table-ranking-list.sortable-table .status-badge.status-pending {
    background-color: #eef0f2;
    color: #7a8ba6;
}

@media (max-width: 600px) {
    #table-ranking-list.sortable-table {
        font-size: 12px;
    }

    #table-ranking-list.sortable-table thead th,
    #table-ranking-list.sortable-table tbody td {
        padding: 6px 8px;
    }
}

/* ---- Lista de grupos/lições (controllers/Group.php — lesson_group.php, students-school.php) ---- */

ul.lessons_list {
    list-style-type: none;
    -moz-column-count: 2;
    -moz-column-gap: 20px;
    -webkit-column-count: 2;
    -webkit-column-gap: 20px;
    column-count: 2;
    column-gap: 20px;
}

.lessons_list li {
    margin-left: 30px;
    margin-bottom: 5px;
    margin-top: 5px;
    white-space: nowrap;
    max-width: 350px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content a.list,
.content a.list:visited {
    text-decoration: none;
    padding: 10px;
    display: inline-block;
    transition: all 0.1s ease;
    border-radius: 5px;
}

.content a.list:hover {
    background-color: #c64e03;
    margin-left: 10px;
    color: #FFF;
}

.content a.list.done {
    background-color: #00cc66;
    color: #FFF;
}

.content a.list.incomplete {
    background-color: #ff9933;
    color: #FFF;
}

ul.group_list li {
    margin-bottom: 10px;
    margin-top: 10px;
}

ul.group_list {
    margin-left: 50px;
    list-style-type: none;
}

span.lesson.done {
    font-size: 10px;
    background-color: #00b359;
    color: white;
    padding: 4px;
    margin: 0px 9px 0px 0px;
}


/* =============================================================================
   5. NAVEGAÇÃO — barra única (nav.php, incluída por body.php)
   Documentação: documentation/navegacao.md
   Fica em fluxo normal (sem position: absolute), então não depende de logo.php
   para não cobrir o h1.
   ============================================================================= */

.topnav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 6px 16px 10px;
    border-bottom: 1px solid #eee;
}

.topnav__side {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.topnav__side--right {
    justify-content: flex-end;
}

.topnav__logo img {
    display: block;
    height: 44px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

/* a.: precisa empatar com o a:link global (cor #42413C + sublinhado) e vencer por vir depois */
a.topnav__back,
a.topnav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
}

a.topnav__back {
    min-width: 0;
    background-color: #eef4fb;
    color: #0066CC;
    font-weight: 600;
}

.topnav__back:hover {
    background-color: #dde9f7;
}

.topnav__back-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

a.topnav__link {
    color: #444;
}

.topnav__link:hover {
    background-color: #f2f2f2;
}

.topnav__link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

a.topnav__link--buy {
    background-color: #093;
    color: #fff;
    font-weight: 600;
}

.topnav__link--buy:hover {
    background-color: #0c3;
}

/* abas da área (admin e escola — as duas usam): uma linha, rola na horizontal quando não cabe */
.topnav-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 8px 16px;
    border-bottom: 1px solid #eee;
    background-color: #fafafa;
    scrollbar-width: thin;
}

.topnav-tabs a {
    flex-shrink: 0;
    padding: 8px 12px;
    border-radius: 16px;
    color: #555;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

.topnav-tabs a:hover {
    background-color: #eee;
}

.topnav-tabs a.is-active {
    background-color: #0066CC;
    color: #fff;
    font-weight: 600;
}

@media (max-width: 600px) {
    .topnav {
        gap: 6px;
        padding: 4px 8px 8px;
    }

    .topnav__logo img {
        height: 30px;
        max-width: 96px;
    }

    /* só ícone no celular — o aria-label do link mantém o nome para leitor de tela */
    .topnav__link-label {
        display: none;
    }

    /* a.: mesma especificidade das regras de desktop (a.topnav__back/a.topnav__link) — sem o
       "a." estas regras perdiam e o celular ficava com 40px de altura em vez dos 44px de toque */
    a.topnav__back,
    a.topnav__link {
        min-height: 44px;
        padding: 0 10px;
        font-size: 13px;
    }

    a.topnav__link {
        min-width: 44px;
        justify-content: center;
    }

    /* precisa vir depois de a.topnav__link acima (mesma especificidade) */
    a.topnav__link--buy {
        font-size: 12px;
        white-space: normal;
        line-height: 1.1;
        text-align: center;
        max-width: 76px;
    }

    .topnav-tabs {
        padding: 8px;
    }
}


/* =============================================================================
   6. RODAPÉ (footer.php)
   ============================================================================= */

img#poweredby {
    width: 120px;
}

/* ---- Código de usuário para suporte ---- */

.idsuporte-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background-color: #f2f6fc;
    border: 1px solid #d6e4f7;
    border-radius: 20px;
    color: #555;
    font-size: 10px;
}

.idsuporte-badge a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 600;
}

.idsuporte-badge a:hover {
    text-decoration: underline;
}

.idsuporte-code {
    display: inline-block;
    min-width: 16px;
    padding: 2px 8px;
    background-color: #0066cc;
    color: #fff;
    border-radius: 10px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    line-height: 1.4;
}

/* ---- Seletor de cor de fundo ---- */

.color-box {
    display: inline-block;
    width: 15px;
    height: 15px;
    margin-right: 5px;
    cursor: pointer;
    border-radius: 5px;
}

.backgroundColor1 {
    /* antes: #4da6ff */
    background-color: #1775d2;
}

.backgroundColor2 {
    background-color: #9b1e49;
}

.backgroundColor3 {
    background-color: gray;
}

.backgroundColor4 {
    background-color: #111111;
}

div#backgroundcolorselect {
    width: 100px;
    margin: auto;
    margin-left: 20px;
    font-size: 10px;
}


/* =============================================================================
   7. TELA: HOME (home.php — todos os perfis)
   Documentação: documentation/home.md
   ============================================================================= */

div.home {
    padding: 20px;
    display: inline-block;
}

a div.block,
a div.block span {
    text-decoration: none;
}

/* quadrados do painel */
div.block {
    padding: 20px;
    background-color: #4da6ff;
    display: block;
    text-align: center;
    float: left;
    min-width: 150px;
    min-height: 150px;
    margin: 10px;
    color: #FFF;
    transition: all 0.5s ease;
}

div.block:not(.nocursor):hover {
    background-color: #ff8c1a;
}

div.block span.title {
    font-weight: 400;
}

div.block span.big {
    font-size: 30px;
    text-align: center;
    margin: auto;
    display: block;
    margin-top: 40px;
}

div.block img {
    max-width: 100px;
    margin: 10px;
}

div.dashboard {
    clear: both;
    margin: auto;
}

/* celular: quadrados (floats de 150px = 1 por linha) viram grade de 2 colunas.
   O form do admin (.home-admin) fica em css/admin.css. */
@media (max-width: 600px) {
    /* inline-block encolheria a grade ao conteúdo — precisa ser block */
    div.home {
        display: block;
        padding: 12px;
    }

    div.home div.dashboard:not(.admin) {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    /* sem o float do div.block, o sublinhado do <a> passa a propagar para o texto do quadrado */
    div.home div.dashboard:not(.admin) > a {
        display: block;
        text-decoration: none;
    }

    div.home div.dashboard:not(.admin) div.block {
        float: none;
        margin: 0;
        min-width: 0;
        min-height: 140px;
        height: 100%;
        box-sizing: border-box;
        padding: 14px 8px;
    }

    div.home div.dashboard:not(.admin) div.block img {
        max-width: 64px;
        margin: 10px auto 0;
    }

    div.home div.dashboard:not(.admin) div.block span.big {
        font-size: 26px;
        margin-top: 28px;
    }
}


/* =============================================================================
   8. TELA: TREINO DE DIGITAÇÃO (lesson.php e custom.php)
   ============================================================================= */

/* ---- Texto a digitar e campo de digitação ---- */

div#text-display {
    padding: 10px;
    font-size: x-large;
}

input#input-type {
    border: none;
    padding: 10px;
    text-align: center;
    font-size: x-large;
    border-bottom: thin solid #999;
    width: 87%;
}

.letter {
    transition: all 0.5s ease;
}

.letter.wrong {
    color: #FFF;
    background-color: #F00;
}

.letter.correct {
    color: #FFF;
    background-color: #8fb9db;
}

/* ---- Controles (pausar, recarregar, tamanho da fonte, som) ---- */

#pause {
    background-color: #d7ab73;
    color: #FFF;
    padding: 4px;
    cursor: default;
    border-radius: 5px;
    margin: 10px;
}

#pause.active {
    background-color: #093;
}

#pause:hover.active {
    background-color: #0C3;
}

#pause:hover {
    background-color: #dda153;
}

a#reload {
    display: inline-block;
    margin: 10px;
}

a.btn.removeEspecialChars {
    cursor: default;
}

#increase,
#decrease {
    border: thin solid #ccc;
    padding: 2px;
    background-color: #dcdcdc;
    cursor: pointer;
}

#increase:hover,
#decrease:hover {
    background-color: #fff;
}

#decrease .a {
    font-size: 11px;
}

#increase .a {
    font-size: 16px;
}

#sound {
    width: 20px;
    top: 0px;
    position: relative;
    cursor: pointer;
}

/* ---- Indicação das mãos (lesson.php) ---- */

.hand {
    display: block;
    width: 50%;
    font-size: 12px;
    text-align: left;
    margin-bottom: 22px;
}

.left.hand {
    float: left;
}

.right.hand {
    float: right;
}

/* ---- Tutorial e caixa de informações ---- */

#tutorial {
    width: 90%;
    margin: auto;
    margin-top: 20px;
}

#tutorial img {
    width: 90%;
    height: auto;
}

#tutorial h2 {
    margin-top: 20px;
}

#info {
    cursor: alias;
}

.info_box {
    margin-bottom: 22px;
}

/* ---- Resultado (percentual de acerto) ---- */

span#percentual {
    font-size: 21px;
    margin: 12px;
    color: #d2691e;
    background-color: beige;
    padding: 36px;
    border: thin solid #d7ab73;
    display: block;
}

span#percentual.correct {
    color: #3d916a;
    background-color: #dec;
    padding: 36px;
    border: thin solid #73d7c4;
    display: block;
}

/* ---- Instruções (lesson.php) ---- */

#instruction {
    text-align: left;
    font-size: 13px;
    color: #ccc;
    background: #3a3a3a;
    border-radius: 10px;
    clear: both;
    margin: 20px auto;
    max-width: 860px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

#instruction h2 {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-align: left !important;
    margin: 0 !important;
    padding: 12px 20px;
    background: #06c;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#instruction ul {
    list-style: none;
    padding: 16px;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    counter-reset: inst-counter;
}

#instruction li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    background: #444;
    border-radius: 7px;
    border: 1px solid #555;
    line-height: 1.5;
    color: #ccc;
    counter-increment: inst-counter;
}

#instruction li::before {
    content: counter(inst-counter);
    background: #06c;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    min-width: 20px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

#instruction a {
    color: #6ea8fe;
}

#instruction img.info {
    vertical-align: middle;
    width: 16px;
    filter: brightness(1.5);
}

@media (max-width: 620px) {
    #instruction ul {
        grid-template-columns: 1fr;
        padding: 10px;
    }
}

@media (max-width: 600px) {
    #hands-panel {
        flex-direction: column;
    }
}


/* =============================================================================
   9. TELA: TREINO PERSONALIZADO (custom.php)
   ============================================================================= */

#addtext {
    width: 80%;
    display: block;
    margin: auto;
    text-align: center;
    margin-bottom: 50px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    padding: 26px 30px 30px;
}

#addtext p {
    color: #555;
}

textarea#customtext {
    width: 100%;
    min-height: 200px;
    margin-bottom: 30px;
    font-size: 20px;
    word-break: break-all;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea#customtext:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

/* contador de caracteres */
span#crctr {
    margin-top: -20px;
    display: block;
    font-size: 12px;
}

#addtext span#crctr {
    display: inline-block;
    margin-top: 0px;
    padding: 4px 10px;
    border-radius: 20px;
    background-color: #f0f0f0;
    color: #777;
    margin-bottom: 21px;
}

#addtext a#addtext-btn.btn {
    font-size: 15px;
    padding: 12px 26px;
}

#addtext h3 {
    text-align: left;
    margin-top: 36px;
    margin-bottom: 10px;
    color: #666;
}

/* textos anteriores (tabela ordenável dentro do #addtext) */
#addtext table#table-ranking-list.sortable-table a.previous-text {
    color: #0066cc;
    font-weight: 600;
    text-decoration: none;
}

#addtext table#table-ranking-list.sortable-table a.previous-text:hover {
    text-decoration: underline;
}

@media (max-width: 700px) {
    #addtext {
        padding: 16px;
    }
}


/* =============================================================================
   10. TELA: VÍDEOS — introdução ao curso (videos.php)
   Documentação: documentation/videos.md
   Tela autocontida sob .vd-page: os seletores são escopados para vencer as regras
   globais de h1/h2/p (centralizados, padding lateral), ul (sem margem), button
   (min-width 150px, hover laranja), table/th (cabeçalho rosa) e a:link.
   ============================================================================= */

.vd-page {
    --vd-brand: #ef3b7d;
    --vd-brand-soft: #fde7ef;
    --vd-ink: #2b2b33;
    --vd-muted: #77777f;
    --vd-line: #ececf0;
    --vd-ok: #2b9b41;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px 40px;
    text-align: left;
    color: var(--vd-ink);
    scroll-margin-top: 12px;
}

/* ---- Cabeçalho ---- */

.vd-hero {
    text-align: center;
    padding: 8px 0 20px;
}

.vd-page .vd-hero h1 {
    font-size: 28px;
    color: var(--vd-ink);
    margin-bottom: 8px;
    padding: 10px 0 0;
}

.vd-page .vd-hero p {
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
    color: var(--vd-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* ---- Barra de etapas (uma por aula) + progresso ---- */

.vd-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.vd-page button.vd-step {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 10px 12px;
    background: #f6f6f9;
    color: var(--vd-muted);
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.vd-page button.vd-step:hover {
    background: #eeeef3;
    color: var(--vd-ink);
}

.vd-step__num {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #dcdce3;
    font-weight: 700;
    font-size: 13px;
    color: var(--vd-muted);
}

.vd-step__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* quebra em até 2 linhas em vez de cortar com reticências */
.vd-step__title {
    font-weight: 600;
    line-height: 1.25;
}

.vd-step__time {
    font-size: 11px;
    opacity: 0.8;
}

/* aula atual */
.vd-page button.vd-step.is-active {
    background: var(--vd-brand-soft);
    border-color: var(--vd-brand);
    color: var(--vd-ink);
}

.vd-step.is-active .vd-step__num {
    background: var(--vd-brand);
    border-color: var(--vd-brand);
    color: #fff;
}

/* aulas anteriores à atual */
.vd-step.is-done .vd-step__num {
    background: var(--vd-ok);
    border-color: var(--vd-ok);
    color: #fff;
}

.vd-progress {
    height: 4px;
    margin: 12px 0 8px;
    background: var(--vd-line);
    border-radius: 4px;
    overflow: hidden;
}

.vd-progress__bar {
    display: block;
    width: 25%;
    height: 100%;
    background: var(--vd-brand);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* sem JS: todas as aulas em sequência, sem etapas nem botões */
.vd-page:not(.vd-js) .vd-steps,
.vd-page:not(.vd-js) .vd-progress,
.vd-page:not(.vd-js) .vd-pager button {
    display: none;
}

/* ---- Aula ---- */

.vd-lesson {
    padding-top: 20px;
}

.vd-lesson[hidden] {
    display: none;
}

.vd-kicker {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--vd-brand-soft);
    color: var(--vd-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.vd-page .vd-lesson h2 {
    margin: 10px 0 16px;
    padding: 0;
    font-size: 24px;
    line-height: 1.3;
    color: var(--vd-ink);
    text-align: left;
}

.vd-page .vd-lesson h3 {
    margin: 28px 0 8px;
    padding: 0;
    font-size: 17px;
    color: var(--vd-ink);
    text-align: left;
}

.vd-page .vd-lesson p {
    margin: 0 0 14px;
    padding: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #44444c;
    text-align: left;
}

/* vídeo 16:9 responsivo */
.vd-video {
    position: relative;
    aspect-ratio: 16 / 9;
    margin-bottom: 22px;
    border-radius: 14px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.vd-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* dica em destaque */
.vd-callout {
    margin: 4px 0 20px;
    padding: 14px 16px;
    border-left: 4px solid var(--vd-brand);
    border-radius: 0 10px 10px 0;
    background: #fff6f9;
    font-size: 15px;
    line-height: 1.6;
    color: #44444c;
}

.vd-callout strong {
    display: block;
    margin-bottom: 2px;
    color: var(--vd-ink);
}

/* imagens com legenda */
.vd-figure {
    margin: 0 0 22px;
}

.vd-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--vd-line);
}

.vd-figure--narrow img {
    width: 80%;
    margin: 0 auto;
}

.vd-figure figcaption {
    margin-top: 8px;
    font-size: 13px;
    color: var(--vd-muted);
    text-align: center;
}

/* artigos recomendados (cards de link) */
.vd-page ul.vd-links {
    display: grid;
    gap: 8px;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.vd-page .vd-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--vd-line);
    border-radius: 10px;
    color: var(--vd-ink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.vd-page .vd-links a::after {
    content: '\2197';
    color: var(--vd-brand);
    flex-shrink: 0;
}

.vd-page .vd-links a:hover {
    border-color: var(--vd-brand);
    background: #fff6f9;
}

/* posição dos dedos (Aula 4) */
.vd-hands {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

.vd-hand {
    padding: 14px 16px;
    border: 1px solid var(--vd-line);
    border-radius: 12px;
    background: #fafafc;
}

.vd-hand__label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--vd-muted);
}

.vd-page .vd-hand ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vd-hand li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #44444c;
}

.vd-page kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    box-sizing: border-box;
    border: 1px solid #d6d6de;
    border-bottom-width: 3px;
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--vd-ink);
}

.vd-page .vd-lesson p.vd-note {
    font-size: 14px;
    color: var(--vd-muted);
}

/* legenda TPM/WPM/TL/TB */
.vd-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--vd-line);
    border-radius: 12px;
}

.vd-page table.vd-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 14px;
}

.vd-page .vd-table th {
    padding: 10px 14px;
    background: #f6f6f9;
    color: var(--vd-ink);
    font-weight: 700;
    text-align: left;
    border: 0;
    border-bottom: 1px solid var(--vd-line);
}

.vd-page .vd-table td {
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid var(--vd-line);
    color: #44444c;
    vertical-align: top;
}

.vd-page .vd-table tbody tr:last-child td {
    border-bottom: 0;
}

.vd-page .vd-table tbody tr:nth-child(even) {
    background: #fcfcfd;
}

/* ---- Navegação entre aulas ---- */

.vd-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--vd-line);
}

.vd-page .vd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.vd-page .vd-btn[hidden] {
    display: none;
}

.vd-page button.vd-btn--ghost {
    background: #fff;
    border-color: #dcdce3;
    color: var(--vd-ink);
}

.vd-page button.vd-btn--ghost:hover {
    background: #f6f6f9;
}

/* próxima / começar a treinar: sempre à direita */
.vd-page button.vd-btn--primary,
.vd-page a.vd-btn--finish {
    margin-left: auto;
    color: #fff;
}

.vd-page button.vd-btn--primary {
    background: var(--vd-brand);
    box-shadow: 0 2px 8px rgba(239, 59, 125, 0.3);
}

.vd-page button.vd-btn--primary:hover {
    background: #d92f6e;
}

.vd-page a.vd-btn--finish {
    background: var(--vd-ok);
    box-shadow: 0 2px 8px rgba(43, 155, 65, 0.3);
}

.vd-page a.vd-btn--finish:hover {
    background: #237a34;
}

/* ---- Celular ---- */

@media (max-width: 600px) {
    .vd-page {
        padding: 0 4px 24px;
    }

    .vd-page .vd-hero h1 {
        font-size: 22px;
    }

    /* etapas: só o número + título curto, em 4 colunas */
    .vd-steps {
        gap: 4px;
    }

    .vd-page button.vd-step {
        flex-direction: column;
        gap: 4px;
        padding: 8px 4px;
        text-align: center;
        font-size: 11px;
    }

    .vd-step__text {
        align-items: center;
        max-width: 100%;
    }

    .vd-step__title {
        line-height: 1.2;
    }

    .vd-step__time {
        display: none;
    }

    .vd-page .vd-lesson h2 {
        font-size: 20px;
    }

    .vd-video {
        border-radius: 10px;
    }

    .vd-figure--narrow img {
        width: 100%;
    }

    .vd-hands {
        grid-template-columns: 1fr;
    }

    /* botões ocupam a linha inteira; "próxima" fica em cima */
    .vd-pager {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .vd-page button.vd-btn--primary,
    .vd-page a.vd-btn--finish {
        margin-left: 0;
    }
}


/* =============================================================================
   11. TELA: CERTIFICADO (certificate.php, dashboard.php)
   ============================================================================= */

/* arte do certificado (renderizada fora da tela e exportada como imagem — js/certificate.js) */
#mycertificate {
    background-image: url(../img/certificado-digitacao_certificado-template.png);
    background-color: #FFF;
    width: 2000px;
    height: 1700px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position-x: center;
    background-position-y: center;
    margin: auto;
    position: relative;
    margin-bottom: 23px;
}

#mycertificate span#name,
#mycertificate span#date,
#mycertificate span#tpm,
#mycertificate span#hours,
#mycertificate span#idcertificado,
#mycertificate span#course_period,
#mycertificate span#school_logo,
#mycertificate span#school_issuer {
    position: absolute;
    text-transform: uppercase;
    left: 147px;
    top: 229px;
    text-align: center;
    font-size: 60px;
}

#mycertificate span#certificate_qr {
    position: absolute;
    left: 900px;
    top: 611px;
    width: 145px;
    height: 145px;
    background: #fff;
    padding: 8px;
}

#mycertificate span#school_logo {
    left: 1575px;
    top: 1050px;
    width: 199px;
    background-color: #FFF;
}

#mycertificate span#school_logo img {
    width: 100%;
}

#mycertificate span#school_issuer {
    left: 1555px;
    top: 1010px;
    font-size: 15px;
    text-align: center;
    width: 230px;
    line-height: 17px;
}

#mycertificate span#course_period {
    left: 751px;
    top: 1362px;
    font-size: 20px;
    color: #c3c3c3;
}

#mycertificate span#name {
    top: 900px;
    position: absolute;
    text-transform: uppercase;
    left: 462px;
    width: 1087px;
    text-align: center;
}

#mycertificate span#date {
    top: 1200px;
    left: 430px;
}

#mycertificate span#tpm {
    top: 1200px;
    left: 920px;
}

#mycertificate span#hours {
    left: 1325px;
    top: 1200px;
}

#mycertificate span#idcertificado {
    left: 1400px;
    top: 1400px;
    font-size: 26px;
    color: #a1a1a1;
}

div#hidecertificate {
    display: block;
    overflow: hidden;
    width: 1px;
    height: 1px;
}

/* a.btn é inline por padrão: padding/margin vertical não empurram o
   conteúdo seguinte, então o botão visualmente encavala no texto abaixo. */
.certificate_box #download.btn {
    display: inline-block;
    margin: 15px 0 35px;
}

.certificate_box #certificate-action-message {
    min-height: 1.2em;
    margin: 10px 0;
    font-weight: bold;
    color: #087f4c;
}

.certificate_box h3 {
    margin-top: 30px;
    margin-bottom: 15px;
}


/* =============================================================================
   12. TELA: RELATÓRIOS (reports.php, student-report.php)
   ============================================================================= */

/* nota atingiu / não atingiu a média (controllers/Ranking.php) */
.getAvareage {
    color: #11871f;
}

.didnotGetAverage {
    color: #d80637;
}


/* =============================================================================
   13. FORMULÁRIOS (.center_box / .register_box / .login_box)
   Usados pelo login (login.php) e por quase todo formulário de cadastro/edição
   — inclusive telas de admin e de escola, por isso ficam aqui.
   ============================================================================= */

.center_box {
    text-align: center;
    margin: 40px;
}

.center_box input[type="text"],
.center_box input[type="email"],
.center_box input[type="password"],
.center_box input[type="number"],
.center_box input[type="date"],
.center_box select,
select#estado {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 5px;
    box-sizing: border-box; /* inclui padding e borda na largura */
    font-size: 14px;
    max-width: none;
}

/* campo numérico curto do filtro de relatórios (reports.php, student-report.php) */
.center_box input[type="number"].input-report {
    width: 200px;
}

.register_box,
.login_box {
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 20px auto;
    max-width: 600px;
}

.register_box h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.register_box h4 {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

.register_box p {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.register_box label {
    display: grid; /* label ocupa a largura total */
    list-style: none;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

.register_box input:focus,
.register_box select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* texto de rodapé da caixa */
.register_box span {
    display: block;
    margin-top: 20px;
    font-size: 10px;
    color: #777;
    text-align: center;
}

/* ---- Login (login.php — o resto do visual está em css/login.css) ---- */

button.login_btn {
    background-color: #b16502;
}

/* mesmo hover laranja de button:hover — explícito porque esta regra vem depois dele */
button.login_btn:hover {
    background-color: #ff6600;
}


/* =============================================================================
   14. TELA: COMPRA / PAGAMENTO (buy.php, payment.php)
   ============================================================================= */

.payment_box.center_box {
    text-align: left;
}

a.btn-buy {
    background-color: #0099ff;
    padding: 10px;
    text-align: center;
    margin: 0 0 0 0;
    border-radius: 9px;
    color: #fff;
    text-decoration: none;
    display: inline-block;
}

a.btn-buy:hover {
    background-color: #eb782f;
}

a.btn-buy span {
    font-weight: bolder;
}

/* preço antigo riscado */
span.off {
    text-decoration: line-through;
    color: #E1E286;
}

a span.off-nonbold {
    font-weight: normal;
    font-size: 13px;
}

/* cupom de desconto */
input#off {
    text-transform: uppercase;
}

/* selos de licença do usuário (User::echoLicenses) */
span.license {
    display: inline-block;
    padding: 12px;
    margin: 15px;
    border-radius: 10px;
    color: #FFF;
}

span.license.free {
    background-color: #00cc66;
}

span.license.pro {
    background-color: #668cff;
}

span.license.admin {
    background-color: #000;
}

span.license.partner {
    background-color: #e2891f;
}


/* =============================================================================
   15. TELA: PÁGINAS LEGAIS (politica-de-privacidade.php, termos-de-uso.php)
   Mesmo padrão de override de .payment_box.center_box, mas com largura de
   leitura e espaçamento entre seções.
   ============================================================================= */

.legal-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.legal-content.center_box {
    max-width: 820px;
    margin: 40px auto;
    line-height: 1.6;
}

.legal-content h2,
.legal-content h3,
.legal-content p,
.legal-content li {
    text-align: left;
}

.legal-content h2 {
    margin-top: 32px;
}

.legal-content ul {
    padding-left: 22px;
    margin: 0 0 16px;
}

.legal-content li {
    margin-bottom: 6px;
    font-size: 14px;
}


/* =============================================================================
   99. CELULAR — base de todas as páginas (documentation/mobile_layout.md)
   Fica no FIM de propósito: precisa vir depois de .container (width: 80%),
   .center_box (margin: 40px) e .register_box (padding: 20px) para sobrescrevê-los.
   ============================================================================= */

@media (max-width: 600px) {
    /* sem as faixas vinho (cor do body) nas laterais — nem embaixo, em página curta */
    .container {
        width: 100%;
        min-height: 100vh;
        border-radius: 0;
        box-shadow: none;
    }

    .center_box {
        margin: 20px 12px;
    }

    /* .log_box center_box dentro de center_box somava 2x a margem */
    .center_box .center_box {
        margin: 0 0 16px;
    }

    .register_box {
        padding: 16px 14px;
    }
}
