/* Consulte Sua Nota: tema sobre Bootstrap 5.3.8 (versão fixa, estável).
   Cores tiradas do logotipo (vermelho #C00000, preto) e do fundo bege do site antigo (#F3F2ED). */
:root {
  color-scheme: light;
  --csn-red: #c00000;
  --csn-red-dark: #8f0000;
  --csn-ink: #1c1b19;
  --csn-muted: #5d5a52;
  --csn-paper: #f3f2ed;
  --csn-card: #ffffff;
  --csn-line: #dcd8ca;
  --csn-orange: #f08a00;

  --bs-primary: #c00000;
  --bs-primary-rgb: 192, 0, 0;
  --bs-link-color: #8f0000;
  --bs-link-hover-color: #c00000;
  --bs-link-color-rgb: 143, 0, 0;
  --bs-link-hover-color-rgb: 192, 0, 0;
  --bs-body-font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  background: var(--csn-paper);
  color: var(--csn-ink);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
}
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.01em; color: var(--csn-ink); }
h1 { font-size: clamp(1.9rem, 3.2vw + 1rem, 2.9rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 1.4vw + 1rem, 1.9rem); font-weight: 700; }
a { color: var(--csn-red-dark); }
a:hover { color: var(--csn-red); }
/* Folga lateral de 24 px: as linhas do Bootstrap com g-5 saem 24 px para fora e estouravam a largura da tela */
.wrap { width: 100%; max-width: 1168px; margin-inline: auto; padding-inline: 24px; }

/* Topo escuro (o logotipo tem contorno preto) */
.topbar { background: #141413; color: #e9e6dc; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.topbar img { height: 52px; width: auto; display: block; }
.topbar .phone { font-size: .95rem; color: #cfcabb; text-align: right; }
.topbar .phone strong { display: block; font-size: 1.2rem; color: #fff; letter-spacing: .02em; }

/* Menu: em telas estreitas vira botão (sem rolagem lateral) */
.menu { background: #fff; border-bottom: 1px solid var(--csn-line); position: sticky; top: 0; z-index: 20; padding: 0; }
.menu-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.menu .navbar-collapse { flex-basis: 100%; }
.menu-toggle { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--csn-line); background: #fff; color: var(--csn-ink); font-weight: 700; padding: 8px 14px; border-radius: 8px; margin-block: 8px; }
.menu-toggle:focus { box-shadow: 0 0 0 .25rem rgba(192, 0, 0, .2); }
.menu-toggle .navbar-toggler-icon { width: 1.2em; height: 1.2em; }
.menu-cta { display: inline-block; padding: 9px 20px; border-radius: 8px; background: var(--csn-red); color: #fff; font-weight: 700; text-decoration: none; }
.menu-cta:hover { background: #a80000; color: #fff; }
.menu-links { display: flex; flex-direction: column; padding-bottom: 10px; }
.menu-links a { display: block; padding: 12px 4px; color: var(--csn-ink); text-decoration: none; font-weight: 600; font-size: .98rem; border-top: 1px solid #eeebe0; }
.menu-links a:hover { color: var(--csn-red); }
.menu-links a[aria-current="page"] { color: var(--csn-red); }
@media (min-width: 768px) {
  .menu-bar { flex-wrap: nowrap; }
  .menu .navbar-collapse { flex-basis: auto; flex-grow: 1; display: flex !important; }
  .menu-links { flex-direction: row; gap: 2px; width: 100%; padding-bottom: 0; }
  .menu-links a { padding: 14px 12px; border-top: 0; border-bottom: 3px solid transparent; white-space: nowrap; font-size: .93rem; }
  .menu-links a[aria-current="page"] { border-bottom-color: var(--csn-red); }
  .menu-links .push { margin-left: auto; }
}

/* Blocos */
.section { padding-block: clamp(32px, 5vw, 64px); }
.section + .section { border-top: 1px solid var(--csn-line); }
.lead { font-size: 1.15rem; color: var(--csn-muted); max-width: 62ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--csn-red); margin-bottom: .5rem; }
.panel { background: var(--csn-card); border: 1px solid var(--csn-line); border-radius: 10px; padding: 24px; }
.panel h2, .panel h3 { margin-top: 0; }

/* Login */
.login .panel { border-top: 4px solid var(--csn-red); box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 12px 28px -18px rgba(0,0,0,.35); }
.login label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: .92rem; }
.login .hint { font-size: .85rem; color: var(--csn-muted); margin-top: 6px; }
.login form .btn { width: 100%; margin-top: 18px; padding-block: 12px; font-weight: 700; }

/* Passos */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; background: var(--csn-card); border: 1px solid var(--csn-line); border-radius: 10px; padding: 16px 18px; }
.steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 50%; background: var(--csn-ink); color: #fff; display: grid; place-items: center; font-weight: 700; }

/* Planos */
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.plan { background: var(--csn-card); border: 1px solid var(--csn-line); border-radius: 10px; padding: 22px; display: flex; flex-direction: column; position: relative; }
.plan.featured { border: 2px solid var(--csn-red); }
.plan .tag { position: absolute; top: -13px; left: 18px; background: var(--csn-orange); color: #1c1b19; font-weight: 800; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; }
.plan h3 { margin: 0 0 4px; font-size: 1.1rem; }
.plan .price { font-size: 2rem; font-weight: 800; color: var(--csn-red); line-height: 1.1; }
.plan .price small { display: block; font-size: .8rem; font-weight: 600; color: var(--csn-muted); }
.plan ul { padding-left: 1.1rem; margin: 14px 0 0; color: var(--csn-ink); }
.plan li { margin-bottom: 6px; }
.plan li.off { color: #8a867a; text-decoration: line-through; }

/* Tabela de notas */
.table-wrap { background: var(--csn-card); border: 1px solid var(--csn-line); border-radius: 10px; overflow-x: auto; }
.nf-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.nf-table th { text-align: left; background: #ece9de; font-weight: 700; padding: 10px 14px; white-space: nowrap; border-bottom: 1px solid var(--csn-line); }
.nf-table td { padding: 10px 14px; border-bottom: 1px solid #eeebe0; white-space: nowrap; }
.nf-table tr:last-child td { border-bottom: 0; }
.nf-table tbody tr:hover { background: #faf8f1; }
.nf-table .num { font-variant-numeric: tabular-nums; }
.nf-table .act a { display: inline-block; padding: 4px 10px; border: 1px solid var(--csn-line); border-radius: 6px; text-decoration: none; font-weight: 600; font-size: .85rem; background: #fff; }
.nf-table .act a:hover { border-color: var(--csn-red); color: var(--csn-red); }
/* Telas estreitas: cada nota vira um cartão, com os botões XML e PDF sempre à vista */
@media (max-width: 640px) {
  .nf-table thead { position: absolute; left: -9999px; }
  .nf-table, .nf-table tbody, .nf-table tr, .nf-table td { display: block; width: 100%; }
  .nf-table tr { padding: 10px 14px; border-bottom: 1px solid var(--csn-line); }
  .nf-table tr:last-child { border-bottom: 0; }
  .nf-table td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; white-space: normal; text-align: right; }
  .nf-table td::before { content: attr(data-label); font-weight: 600; color: var(--csn-muted); text-align: left; }
  .nf-table td.act { justify-content: flex-end; padding-top: 8px; }
  .nf-table td.act::before { content: none; }
}
.filters { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; }
.filters label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 4px; }
.pager { display: flex; gap: 6px; align-items: center; justify-content: space-between; padding: 12px 14px; flex-wrap: wrap; color: var(--csn-muted); font-size: .9rem; }
.pager a { padding: 4px 10px; border: 1px solid var(--csn-line); border-radius: 6px; text-decoration: none; background: #fff; color: var(--csn-ink); }
.pager a[aria-current] { background: var(--csn-ink); color: #fff; border-color: var(--csn-ink); }
.userbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.userbar .who { color: var(--csn-muted); }
.drop { border: 2px dashed #b9b4a3; border-radius: 10px; padding: 28px; text-align: center; background: #fbfaf5; color: var(--csn-muted); }
.note { font-size: .85rem; color: var(--csn-muted); }
.mock-banner { background: #fff4d6; border-bottom: 1px solid #e8d596; color: #5b4a10; text-align: center; font-size: .85rem; padding: 6px 12px; }

/* Vídeo */
.video-frame { border-radius: 10px; overflow: hidden; border: 1px solid var(--csn-line); background: #000; box-shadow: 0 12px 28px -18px rgba(0,0,0,.45); }

/* Rodapé */
.footer { background: #141413; color: #bdb8a8; margin-top: 40px; font-size: .92rem; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; padding-block: 40px 28px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.1fr 1.3fr; } }
.footer h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: #8f8a7a; font-weight: 700; margin: 0 0 12px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.footer a { color: #e9e6dc; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer strong { color: #fff; }
.footer .big { font-size: 1.35rem; letter-spacing: .02em; }
.footer-brand img { height: 46px; width: auto; display: block; margin-bottom: 14px; }
.footer-brand p { margin: 0; max-width: 34ch; }
.footer-bottom { border-top: 1px solid #2a2927; }
.footer-bottom .wrap { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-block: 16px; font-size: .84rem; color: #8f8a7a; }

/* Botão principal na cor do logotipo */
.btn-primary { --bs-btn-bg: #c00000; --bs-btn-border-color: #c00000; --bs-btn-hover-bg: #a80000; --bs-btn-hover-border-color: #a80000; --bs-btn-active-bg: #8f0000; --bs-btn-active-border-color: #8f0000; --bs-btn-disabled-bg: #c00000; --bs-btn-disabled-border-color: #c00000; --bs-btn-focus-shadow-rgb: 192, 0, 0; }
.btn-outline-primary { --bs-btn-color: #a80000; --bs-btn-border-color: #c00000; --bs-btn-hover-bg: #c00000; --bs-btn-hover-border-color: #c00000; --bs-btn-active-bg: #8f0000; --bs-btn-active-border-color: #8f0000; --bs-btn-focus-shadow-rgb: 192, 0, 0; }
.form-control:focus, .form-select:focus { border-color: #d97575; box-shadow: 0 0 0 .25rem rgba(192, 0, 0, .2); }

/* Erro de login e botões do menu que são formulário (Sair) */
.erro-login { background: #fdecec; border: 1px solid #e3a3a3; color: #7a0c0c; border-radius: 8px; padding: 10px 12px; margin: 4px 0 6px; font-weight: 600; font-size: .92rem; }
.menu-sair { display: inline; margin: 0; }
button.menu-cta { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.menu-link { background: none; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: .93rem; padding: 14px 12px; color: var(--csn-ink); }
.menu-link:hover { color: var(--csn-red); }
