@charset "UTF-8";
/*!
 * caderno.css — camada de tema do CADERNO (caderno.org)
 * Carregada DEPOIS de default.min.css. Mantém o visual azul original
 * (AdminLTE skin-blue) e corrige tipografia, contraste, foco e responsividade.
 */

/* ========== 1. Variáveis ========== */
:root {
  --c-primary:      #2c7ba8;
  --c-primary-dark: #216084;
  --c-primary-soft: #eaf4fa;
  --c-green:        #00875a;
  --c-aqua:         #0b7fa3;
  --c-yellow:       #b3730a;
  --c-red:          #c0392b;
  --c-ink:          #22303a;
  --c-ink-soft:     #55636d;
  --c-line:         #dfe6ea;
  --c-bg:           #f3f6f8;
  --c-surface:      #ffffff;
  --radius:   6px;
  --shadow:   0 1px 2px rgba(16,32,45,.06), 0 2px 8px rgba(16,32,45,.05);
  --shadow-l: 0 2px 6px rgba(16,32,45,.09), 0 8px 24px rgba(16,32,45,.08);
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
             "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --maxw: 1180px;
}

/* ========== 2. Base e tipografia ========== */
body {
  font-family: var(--font-ui);
  font-size: 16px; line-height: 1.65;
  color: var(--c-ink); background: var(--c-bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1,h2,h3,h4,h5 { font-family: var(--font-ui); font-weight: 700; color: var(--c-ink); line-height: 1.25; margin-top: 0; }
h1 { font-size: 1.95rem; } h2 { font-size: 1.55rem; }
h3 { font-size: 1.25rem; } h4 { font-size: 1.08rem; }
h2 small, h1 small { color: var(--c-ink-soft); font-weight: 400; font-size: .62em; }
p { margin: 0 0 1.05em; }
a { color: var(--c-primary-dark); text-decoration: none; }
a:hover, a:focus { color: var(--c-primary); text-decoration: underline; }
.content .lead, p.lead { font-size: 1.06rem; line-height: 1.7; font-weight: 400; color: var(--c-ink); }
code { background: var(--c-primary-soft); color: var(--c-primary-dark); padding: .12em .45em; border-radius: 4px; font-size: .87em; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--c-primary); outline-offset: 2px; border-radius: 3px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--c-primary-dark); color: #fff;
  padding: .7rem 1.1rem; border-radius: 0 0 var(--radius) 0; font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; text-decoration: none; }

/* ========== 3. Cabeçalho e barra lateral ========== */
.main-header .navbar, .main-header .logo { background-color: var(--c-primary-dark) !important; }
.main-header .logo:hover { background-color: var(--c-primary) !important; }
.main-header .logo img { max-height: 34px; width: auto; }
.skin-blue .main-sidebar, .skin-blue .left-side { background-color: #21313d; }
.sidebar-menu > li > a { font-size: .95rem; padding: 11px 14px; }
.sidebar-menu > li > a > .fa { width: 20px; }
.sidebar-menu > li.header {
  font-size: .72rem; letter-spacing: .09em; text-transform: uppercase;
  color: #8fa6b4; padding: 14px 14px 6px;
}
.skin-blue .sidebar-menu > li:hover > a,
.skin-blue .sidebar-menu > li.active > a { border-left-color: var(--c-primary); }
.menu-flag { margin-right: 6px; vertical-align: baseline; border-radius: 2px; }
a.lesson-done > span::after { content: " ✓"; color: #59d9a4; font-weight: 700; }
.user-panel > .info > p { font-size: .95rem; margin-bottom: 4px; }

/* ========== 4. Conteúdo ========== */
.content-wrapper { background: var(--c-bg); }
.content-header { padding: 22px 18px 6px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.content-header > h1, .content-header > h2 { margin: 0; flex: 1 1 260px; }
.content-header > h4 { margin: 0; }
.content-header .direct-chat-img { width: 52px; height: 52px; border-radius: var(--radius); }
.content, .content.body { padding: 14px 18px 26px; max-width: var(--maxw); }
.crumbs {
  padding: 8px 18px 0; margin: 0; list-style: none;
  font-size: .87rem; color: var(--c-ink-soft); display: flex; flex-wrap: wrap; gap: .4rem;
}
.crumbs li + li::before { content: "›"; margin-right: .4rem; color: #9fb0bb; }

/* ========== 5. Boxes e callouts ========== */
.box { border-top: 3px solid var(--c-primary); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 22px; }
.box-header { padding: 14px 16px; border-bottom: 1px solid var(--c-line); }
.box-header .box-title { font-size: 1.08rem; font-weight: 700; }
.box-body { padding: 14px 16px; }
.callout { border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; border-left: 5px solid; }
.callout h2, .callout h4 { margin-bottom: .5rem; font-size: 1.15rem; }
.callout p:last-child, .callout ol:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout.callout-info    { background: #eef7fb; border-color: var(--c-aqua);   color: var(--c-ink); }
.callout.callout-success { background: #ecf7f2; border-color: var(--c-green);  color: var(--c-ink); }
.callout.callout-warning { background: #fdf5e8; border-color: var(--c-yellow); color: var(--c-ink); }
.callout.callout-danger  { background: #fdeeec; border-color: var(--c-red);    color: var(--c-ink); }
.callout a { color: var(--c-primary-dark); text-decoration: underline; }
.callout ol, .callout ul { padding-left: 1.3rem; }
.callout li { margin-bottom: .55rem; }
.info-box { border-radius: var(--radius); box-shadow: var(--shadow); min-height: 78px; margin-bottom: 16px; }
.info-box-icon { width: 72px; height: 78px; line-height: 78px; border-radius: var(--radius) 0 0 var(--radius); }
.info-box-content { margin-left: 72px; padding: 12px 10px; }
.info-box-number { font-size: 1rem; font-weight: 700; }
.info-box-number a { color: inherit; }
.info-box-text { font-size: .78rem; letter-spacing: .05em; }

/* ========== 6. Tabelas de vocabulário ========== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table > thead > tr > th {
  background: #f7fafb; border-bottom: 2px solid var(--c-line);
  font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--c-ink-soft); white-space: nowrap;
}
.table > tbody > tr > td { vertical-align: middle; padding: 10px 12px; }
.table-striped > tbody > tr:nth-of-type(odd) { background: #fafcfd; }
.table-hover > tbody > tr:hover { background: var(--c-primary-soft); }
.table td strong { font-size: 1.05rem; font-weight: 700; color: var(--c-ink); }

/* ========== 7. Botão de áudio ========== */
.audio-btn { background: none; border: 0; padding: 2px; cursor: pointer; line-height: 1; border-radius: 50%; }
.audio-btn .badge {
  display: inline-block; min-width: 30px; height: 30px; line-height: 30px;
  padding: 0; border-radius: 50%; font-size: .85rem;
  transition: transform .12s ease, box-shadow .12s ease;
}
.audio-btn:hover .badge { transform: scale(1.12); box-shadow: var(--shadow); }
.audio-btn.is-playing .badge { animation: caderno-pulse 1s ease-in-out infinite; }
.audio-btn[data-missing], .audio-btn.is-missing { cursor: not-allowed; opacity: .32; }
.audio-btn[data-missing]:hover .badge { transform: none; box-shadow: none; }
@keyframes caderno-pulse {
  0%,100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(0,135,90,.45); }
  50%     { transform: scale(1.12); box-shadow: 0 0 0 7px rgba(0,135,90,0); }
}
@media (prefers-reduced-motion: reduce) {
  .audio-btn.is-playing .badge { animation: none; }
  * { scroll-behavior: auto !important; }
}
.badge.bg-green { background-color: var(--c-green) !important; }
.badge.bg-aqua  { background-color: var(--c-aqua)  !important; }
.badge.bg-yellow{ background-color: var(--c-yellow)!important; }

/* ========== 8. Componentes novos ========== */
.table-filter { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.table-filter input {
  flex: 1 1 240px; max-width: 420px; padding: 9px 13px; font-size: .97rem;
  border: 1px solid var(--c-line); border-radius: var(--radius);
  background: var(--c-surface); color: var(--c-ink);
}
.table-filter input:focus { border-color: var(--c-primary); }
.filter-empty { color: var(--c-ink-soft); font-style: italic; padding: 12px 2px; }

.mark-done {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: 9px 16px; font-size: .95rem; font-weight: 600;
  border: 1px solid var(--c-primary); border-radius: 999px;
  background: var(--c-surface); color: var(--c-primary-dark); cursor: pointer;
}
.mark-done:hover { background: var(--c-primary-soft); }
.mark-done.is-done { background: var(--c-green); border-color: var(--c-green); color: #fff; }

.pager-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 26px 0 8px; }
.pager-nav a {
  flex: 1 1 220px; display: block; padding: 13px 16px;
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--c-ink);
}
.pager-nav a:hover { border-color: var(--c-primary); text-decoration: none; box-shadow: var(--shadow-l); }
.pager-nav .pager-dir { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--c-ink-soft); margin-bottom: 3px; }
.pager-nav .pager-name { font-weight: 700; color: var(--c-primary-dark); }
.pager-nav .pager-next { text-align: right; }

.card-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin: 0 0 24px; padding: 0; list-style: none; }
.card-grid > li { margin: 0; }
.card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 17px; text-decoration: none; color: var(--c-ink);
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
a.card:hover { box-shadow: var(--shadow-l); transform: translateY(-2px); border-color: var(--c-primary); text-decoration: none; }
.card-flag { width: 34px; height: auto; border-radius: 3px; margin-bottom: 9px; }
.card-title { font-size: 1.05rem; font-weight: 700; color: var(--c-primary-dark); margin: 0 0 5px; display: block; }
.card-text { font-size: .9rem; color: var(--c-ink-soft); margin: 0; display: block; }
.card-meta { margin-top: auto; padding-top: 11px; font-size: .8rem; color: var(--c-ink-soft); }

/* Artigos */
.article-body { max-width: 74ch; }
.article-body h2 { margin: 2em 0 .6em; padding-bottom: .3em; border-bottom: 1px solid var(--c-line); }
.article-body h3 { margin: 1.6em 0 .5em; color: var(--c-primary-dark); }
.article-body ul, .article-body ol { padding-left: 1.4rem; margin-bottom: 1.1em; }
.article-body li { margin-bottom: .5rem; }
.article-body blockquote { border-left: 4px solid var(--c-primary); background: var(--c-primary-soft); padding: 12px 18px; margin: 1.3em 0; border-radius: 0 var(--radius) var(--radius) 0; }
.article-body s { color: var(--c-red); }
.article-meta { color: var(--c-ink-soft); font-size: .88rem; margin-bottom: 1.4em; }
.article-toc { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 1.8em; }
.article-toc h2 { font-size: .95rem; margin: 0 0 .5rem; border: 0; padding: 0; text-transform: uppercase; letter-spacing: .06em; color: var(--c-ink-soft); }
.article-toc ol { margin: 0; padding-left: 1.2rem; }
.article-toc li { margin-bottom: .3rem; }
.article-body table { width: 100%; margin: 1.3em 0; border-collapse: collapse; display: block; overflow-x: auto; }
.article-body th, .article-body td { border: 1px solid var(--c-line); padding: 9px 12px; text-align: left; vertical-align: top; }
.article-body th { background: #f7fafb; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--c-ink-soft); }

/* ========== 9. Rodapé ========== */
.main-footer { background: #21313d; color: #b9c8d2; border-top: 0; padding: 0; margin-left: 230px; }
.footer-grid { display: grid; gap: 26px; padding: 34px 26px 24px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); max-width: var(--maxw); }
.footer-logo img { max-width: 120px; height: auto; margin-bottom: 12px; }
.footer-about { font-size: .88rem; line-height: 1.6; color: #93a7b4; margin: 0; }
.footer-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: #fff; margin: 0 0 11px; font-weight: 700; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: 7px; }
.footer-list a { color: #b9c8d2; font-size: .89rem; }
.footer-list a:hover { color: #fff; text-decoration: underline; }
.footer-list-2col { columns: 2; column-gap: 18px; }
.footer-base { border-top: 1px solid #2f4352; padding: 15px 26px; font-size: .85rem; color: #8b9fad; }
.footer-base a { color: #cfdde6; }

/* ========== 10. Consentimento e voltar ao topo ========== */
.consent-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1600;
  background: #21313d; color: #dbe6ed; padding: 14px 18px;
  box-shadow: 0 -2px 14px rgba(0,0,0,.2);
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
}
.consent-bar p { margin: 0; font-size: .89rem; max-width: 70ch; }
.consent-bar a { color: #8fd0ef; text-decoration: underline; }
.consent-actions { display: flex; gap: 9px; flex-shrink: 0; }
.back-to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 1400;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--c-primary-dark); color: #fff; cursor: pointer;
  box-shadow: var(--shadow-l); font-size: 1rem;
}
.back-to-top:hover { background: var(--c-primary); }
.back-to-top[hidden] { display: none; }

/* ========== 11. Responsivo ========== */
@media (max-width: 991px) { .main-footer { margin-left: 0; } }
@media (max-width: 767px) {
  body { font-size: 15.5px; }
  h1 { font-size: 1.6rem; } h2 { font-size: 1.32rem; }
  .content, .content.body { padding: 12px 13px 22px; }
  .content-header { padding: 16px 13px 4px; }
  .main-footer { margin-left: 0; }
  .footer-grid { padding: 26px 16px 18px; gap: 20px; }
  .footer-base { padding: 14px 16px; }
  .consent-bar { justify-content: flex-start; }
  .consent-bar p { font-size: .85rem; }
  .table > tbody > tr > td { padding: 9px 8px; }
  .content-header .direct-chat-img { width: 42px; height: 42px; }
}

/* ========== 12. Impressão ========== */
@media print {
  .main-sidebar, .main-header, .main-footer, .consent-bar, .back-to-top,
  .adsbygoogle, .table-filter, .mark-done, .pager-nav, .a2a_kit, .crumbs { display: none !important; }
  .content-wrapper { margin-left: 0 !important; }
  body { background: #fff; font-size: 12pt; }
  .box, .callout { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}

/* ==========================================================================
   13. Ferramentas (busca, flashcards, quiz, progresso)
   ========================================================================== */
.page-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: var(--radius);
  background: var(--c-primary-soft); color: var(--c-primary-dark); font-size: 1.3rem;
}

.tool-controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; margin-bottom: 22px;
}
.tool-controls label { font-size: .82rem; font-weight: 600; color: var(--c-ink-soft); margin: 0; }
.tool-controls select {
  padding: 8px 11px; font-size: .95rem; border: 1px solid var(--c-line);
  border-radius: var(--radius); background: var(--c-surface); color: var(--c-ink);
}
.tool-status { font-size: .92rem; color: var(--c-ink-soft); margin-bottom: 12px; }
.tool-meta { margin-top: 18px; }
.tool-meta .btn-link { padding: 0; color: var(--c-ink-soft); font-size: .88rem; }

/* Busca */
.search-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.search-form input[type="search"] {
  flex: 1 1 320px; padding: 11px 15px; font-size: 1rem;
  border: 1px solid var(--c-line); border-radius: var(--radius);
  background: var(--c-surface); color: var(--c-ink);
}
.search-form input:focus { border-color: var(--c-primary); }
.search-results { list-style: none; margin: 0 0 26px; padding: 0; }
.search-results li {
  padding: 13px 0; border-bottom: 1px solid var(--c-line);
}
.search-title { font-size: 1.05rem; font-weight: 700; }
.search-kind {
  display: inline-block; margin-left: 8px; padding: 1px 8px;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  background: var(--c-primary-soft); color: var(--c-primary-dark); border-radius: 999px;
}
.search-desc { margin: 4px 0 0; font-size: .9rem; color: var(--c-ink-soft); }

/* Flashcards */
.flashcard {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); box-shadow: var(--shadow-l);
  padding: 40px 24px; text-align: center; cursor: pointer;
  min-height: 210px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
}
.flashcard:hover { border-color: var(--c-primary); }
.flashcard-face { font-size: 1.85rem; font-weight: 700; line-height: 1.3; }
.flashcard-back { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.flashcard-answer {
  font-size: 1.6rem; font-weight: 700; color: var(--c-primary-dark); line-height: 1.3;
}
.flashcard-translit { font-size: 1rem; color: var(--c-ink-soft); }
.flashcard-hint { font-size: .82rem; color: var(--c-ink-soft); margin: 0; font-style: italic; }
.flashcard-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }

/* Quiz */
.quiz-progress {
  height: 7px; background: var(--c-line); border-radius: 999px;
  overflow: hidden; margin-bottom: 20px;
}
.quiz-progress-bar { height: 100%; background: var(--c-primary); transition: width .25s ease; }
.quiz-question { font-size: 1.5rem; margin-bottom: 18px; }
.quiz-options { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.quiz-option {
  width: 100%; text-align: left; padding: 13px 16px; font-size: 1rem;
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); cursor: pointer; color: var(--c-ink);
}
.quiz-option:hover:not(:disabled) { border-color: var(--c-primary); background: var(--c-primary-soft); }
.quiz-option:disabled { cursor: default; }
.quiz-option.is-right { background: #e7f6ef; border-color: var(--c-green); font-weight: 700; }
.quiz-option.is-wrong { background: #fdeeec; border-color: var(--c-red); }
.quiz-feedback { font-weight: 600; min-height: 1.5em; }
.quiz-feedback.is-right { color: var(--c-green); }
.quiz-feedback.is-wrong { color: var(--c-red); }

/* Progresso */
.progress-lessons { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 0; padding: 0; }
.progress-lessons li { margin: 0; }
.progress-lessons a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius);
  border: 1px solid var(--c-line); background: var(--c-surface);
  font-size: .9rem; font-weight: 600; color: var(--c-ink-soft); text-decoration: none;
}
.progress-lessons a:hover { border-color: var(--c-primary); text-decoration: none; }
.progress-lessons a.is-done { background: var(--c-green); border-color: var(--c-green); color: #fff; }

@media (max-width: 767px) {
  .flashcard { padding: 30px 16px; min-height: 180px; }
  .flashcard-face { font-size: 1.5rem; }
  .flashcard-answer { font-size: 1.35rem; }
  .quiz-question { font-size: 1.25rem; }
  .tool-controls { padding: 12px; }
}
