/* ===================================================================
   Contracheque Web · Hospital FUNDAJAN
   Layout do sistema — mesma estrutura visual do CCIH/Asclepi:
   barra lateral fixa com grupos recolhíveis, topbar, cartões, KPIs,
   tema claro/escuro e login em tela dividida.

   A paleta segue a marca FUNDAJAN (verde). Para usar o azul do Asclepi,
   basta trocar as variáveis --brand* logo abaixo.
   =================================================================== */

:root {
  --sidebar-w: 250px;
  --brand: #2a6350;        /* verde institucional (ações, item ativo) */
  --brand-dark: #1d3a33;   /* verde escuro da marca */
  --brand-2: #7f9a6e;      /* verde sálvia da marca (acento) */
  --brand-3: #0aa2c0;      /* teal de apoio (KPIs) */
  --brand-soft: #e6efe9;
  --page-bg: #f5f8f6;
  --line: #e4ebe6;

  /* Cores do Bootstrap alinhadas à marca */
  --bs-primary: #2a6350;
  --bs-primary-rgb: 42, 99, 80;
  --bs-link-color: #2a6350;
  --bs-link-color-rgb: 42, 99, 80;
  --bs-link-hover-color: #1d3a33;
  --bs-link-hover-color-rgb: 29, 58, 51;
}

/* ===== Tipografia ===== */
html { font-size: 15px; }
body {
  font-family: 'Figtree Variable', 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--page-bg); color: #414a59;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  font-size: .92rem;
}
h1, h2, h3, h4, h5, h6 { font-weight: 600; letter-spacing: -.01em; }
h1, .h1 { font-size: 1.4rem; }
h2, .h2 { font-size: 1.25rem; }
h3, .h3 { font-size: 1.12rem; }
h4, .h4 { font-size: 1.02rem; }
h5, .h5 { font-size: .94rem; }
h6, .h6 { font-size: .86rem; }
.lead { font-size: 1rem; }

/* ===== Componentes do Bootstrap na cor da marca ===== */
.btn-primary {
  --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-border-color: var(--brand-dark);
  --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
}
.btn-outline-primary {
  --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-bg: var(--brand); --bs-btn-active-border-color: var(--brand);
}
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 .2rem rgba(42, 99, 80, .18);
}
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.table { font-size: .9rem; --bs-table-hover-bg: rgba(42, 99, 80, .045); }
.table > :not(caption) > * > * { padding: .6rem .75rem; }
.table > thead th {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .03em;
  color: var(--bs-secondary-color); font-weight: 600; white-space: nowrap;
}
/* Linha que abre um registro (o link real está na célula; ver app.js). */
.linha-clicavel { cursor: pointer; }
.link-ficha { color: inherit; text-decoration: none; font-weight: 600; }
.linha-clicavel:hover .link-ficha { color: var(--brand); text-decoration: underline; }
.form-control, .form-select { font-size: .9rem; }
.form-label { font-size: .82rem; font-weight: 600; color: #566173; margin-bottom: .25rem; }
.btn { font-size: .9rem; }
.btn-sm { font-size: .82rem; }
.badge { font-weight: 600; }
.card { border-color: var(--line); border-radius: .7rem; box-shadow: 0 1px 2px rgba(16,24,40,.03); }
.card-header {
  font-size: .92rem; font-weight: 600; background: transparent;
  border-bottom-color: var(--line); padding: .8rem 1.1rem;
}
code { color: #9c4221; }

/* ===== Layout ===== */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: linear-gradient(180deg, #f4f9f6 0%, #eef5f0 100%);
  color: #56617a; position: fixed; top: 0; bottom: 0; left: 0;
  overflow-y: auto; transition: transform .2s ease; z-index: 1030;
  border-right: 1px solid var(--line);
}
.sidebar-brand {
  display: flex; align-items: center; gap: .6rem; font-weight: 500;
  font-size: 1.05rem; color: var(--brand-dark); padding: .9rem 1.15rem;
  border-bottom: 1px solid rgba(42,99,80,.12); text-decoration: none;
}
.sidebar-brand .brand-txt { line-height: 1.15; }
.sidebar-brand .brand-txt small {
  display: block; font-size: .6rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-2); font-weight: 600;
}
.sidebar-brand img { width: 42px; height: 42px; object-fit: contain; flex-shrink: 0; }
.sidebar-nav { padding: .75rem .5rem 2rem; }
.sidebar .nav-link {
  color: #5c6675; border-radius: .55rem; padding: .58rem .85rem; margin: .12rem 0;
  display: flex; align-items: center; gap: .8rem; font-size: 1.02rem; font-weight: 450;
}
.sidebar .nav-link i { font-size: 1.24rem; width: 1.35rem; text-align: center; color: #97a1b0; }
.sidebar .nav-link:hover { background: var(--brand-soft); color: var(--brand); }
.sidebar .nav-link:hover i { color: var(--brand); }
.sidebar .nav-link.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.sidebar .nav-link.active i { color: var(--brand); }
.sidebar .sidebar-submenu .nav-link { padding-left: 1.45rem; }

/* Grupos recolhíveis — o cabeçalho do grupo é o item principal */
.sidebar-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: none; border: 0; text-align: left; cursor: pointer;
  font-size: 1.07rem; font-weight: 700; color: var(--brand-dark);
  padding: .6rem .85rem;
}
.sidebar-toggle .chev { transition: transform .2s ease; font-size: .9rem; opacity: .9; margin-left: auto; color: var(--brand-dark); }
.sidebar-toggle:hover, .sidebar-toggle:hover .chev { color: var(--brand); }
.sidebar-group.collapsed .sidebar-submenu { display: none; }
.sidebar-group.collapsed .sidebar-toggle .chev { transform: rotate(-90deg); }

.content { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }

/* ===== Topbar ===== */
.topbar {
  height: 62px; display: flex; align-items: center; gap: 1rem; padding: 0 1.25rem;
  background: var(--bs-body-bg); border-bottom: 1px solid var(--bs-border-color);
  position: sticky; top: 0; z-index: 1020;
}
.topbar-title { font-weight: 600; font-size: 1.05rem; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.btn-icon { border: 1px solid var(--bs-border-color); background: transparent; color: var(--bs-body-color); }
.user-btn { display: flex; align-items: center; gap: .55rem; border: 1px solid var(--bs-border-color); background: transparent; color: var(--bs-body-color); }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 700; text-transform: uppercase;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.user-name { font-size: .85rem; font-weight: 600; }
.user-role { font-size: .72rem; color: var(--bs-secondary-color); }

.main { padding: 1.5rem; flex: 1; }
.main > .container-narrow { max-width: 780px; }
.footer { padding: .75rem 1.5rem; border-top: 1px solid var(--bs-border-color); }

/* ===== Cabeçalho de página ===== */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; flex-wrap: wrap; gap: .75rem; }
.page-header h1 { font-size: 1.25rem; font-weight: 600; margin: 0; }
.page-header .page-sub { font-size: .84rem; color: var(--bs-secondary-color); margin: .15rem 0 0; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ===== Cartões de indicador (KPI) ===== */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.kpi-card {
  background: var(--bs-body-bg); border: 1px solid var(--line); border-radius: .85rem;
  padding: 1.1rem 1.25rem; display: flex; align-items: center; gap: 1rem;
  box-shadow: 0 1px 2px rgba(16,24,40,.03); text-decoration: none; color: inherit;
}
a.kpi-card:hover { border-color: var(--brand-2); box-shadow: 0 6px 18px rgba(16,24,40,.08); }
.kpi-icon { width: 48px; height: 48px; border-radius: .65rem; display: grid; place-items: center; font-size: 1.4rem; color: #fff; flex-shrink: 0; }
.kpi-value { font-size: 1.4rem; font-weight: 600; line-height: 1; }
.kpi-label { font-size: .82rem; color: var(--bs-secondary-color); }
.bg-brand { background: var(--brand); } .bg-sage { background: var(--brand-2); }
.bg-danger2 { background: #dc3545; } .bg-warn { background: #d98c1f; }
.bg-teal { background: var(--brand-3); } .bg-green { background: #198754; } .bg-purple { background: #6f42c1; }

/* ===== Blocos de texto (termo, aviso de privacidade) ===== */
.doc-box {
  white-space: pre-wrap; border: 1px solid var(--line); border-radius: .6rem;
  padding: 1rem 1.1rem; max-height: 46vh; overflow: auto;
  background: var(--bs-tertiary-bg); font-size: .88rem; line-height: 1.55;
}
.hash { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .72rem; word-break: break-all; }
.pdf-frame { width: 100%; height: 72vh; border: 1px solid var(--line); border-radius: .6rem; background: var(--bs-tertiary-bg); }

/* ===== Modo escuro ===== */
[data-bs-theme="dark"] body { background: #0e1420; color: #c3ccd8; }
[data-bs-theme="dark"] .sidebar { background: #121a29; color: #b9c3d1; border-right-color: rgba(255,255,255,.06); }
[data-bs-theme="dark"] .sidebar-brand { color: #fff; border-bottom-color: rgba(255,255,255,.06); }
[data-bs-theme="dark"] .sidebar .nav-link, [data-bs-theme="dark"] .sidebar .nav-link i { color: #b9c3d1; }
[data-bs-theme="dark"] .sidebar .nav-link:hover, [data-bs-theme="dark"] .sidebar .nav-link.active { background: rgba(82,201,138,.18); color: #d8f3e3; }
[data-bs-theme="dark"] .sidebar .nav-link:hover i, [data-bs-theme="dark"] .sidebar .nav-link.active i { color: #d8f3e3; }
[data-bs-theme="dark"] .sidebar-toggle, [data-bs-theme="dark"] .sidebar-toggle .chev { color: #93c9b0; }
[data-bs-theme="dark"] .kpi-card, [data-bs-theme="dark"] .card { border-color: rgba(255,255,255,.08); }
[data-bs-theme="dark"] code { color: #f0a882; }

/* ===== Login em tela dividida ===== */
.guest-body { min-height: 100vh; margin: 0; }
.login-split { min-height: 100vh; display: flex; }

.login-hero {
  flex: 1 1 56%; position: relative; overflow: hidden; color: #fff;
  display: flex; align-items: center; padding: 3rem 3.25rem;
  background:
    radial-gradient(ellipse 60% 50% at 28% 24%, rgba(127,154,110,.14), transparent 70%),
    linear-gradient(150deg, #0a1512 0%, #12241e 45%, #17332a 78%, #1d3a33 100%);
}
.login-aurora { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; opacity: .55; will-change: transform; }
.login-aurora--1 {
  width: 620px; height: 620px; left: -160px; top: -180px;
  background: radial-gradient(circle, rgba(127,154,110,.34), rgba(42,99,80,.18) 55%, transparent 72%);
  animation: login-drift 26s ease-in-out infinite alternate;
}
.login-aurora--2 {
  width: 560px; height: 560px; right: -180px; bottom: -220px;
  background: radial-gradient(circle, rgba(10,162,192,.20), rgba(42,99,80,.18) 55%, transparent 72%);
  animation: login-drift 32s ease-in-out infinite alternate-reverse;
}
@keyframes login-drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(90px,60px,0) scale(1.15); }
}
.login-hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 40% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 75% 70% at 40% 40%, #000 30%, transparent 75%);
}
.login-hero-inner { position: relative; z-index: 1; max-width: 560px; margin: auto; }
.login-hero-brand { display: flex; align-items: center; gap: 1rem; font-size: 1.7rem; font-weight: 500; margin-bottom: 1.6rem; animation: login-fadeup .6s .05s both; }
.login-hero-brand img { width: 84px; height: 84px; object-fit: contain; background: #fff; border-radius: .8rem; padding: .45rem; }
.login-hero-brand small { display: block; font-size: .78rem; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.login-hero h2 { font-size: 1.85rem; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; margin-bottom: .8rem; animation: login-fadeup .6s .12s both; }
.login-hero .lead { opacity: .9; font-size: .98rem; margin-bottom: 1.7rem; animation: login-fadeup .6s .2s both; }
.login-hl { color: #a8d5b5; white-space: nowrap; }

.login-mods { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin-bottom: 1.2rem; }
.login-mod {
  display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem;
  border: 1px solid rgba(255,255,255,.10); border-radius: .8rem;
  background: rgba(255,255,255,.055); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: login-fadeup .55s both; animation-delay: calc(.28s + var(--d, 0ms));
}
.login-mod-icon {
  width: 1.95rem; height: 1.95rem; border-radius: .55rem; flex-shrink: 0;
  display: grid; place-items: center; font-size: .95rem; color: #fff;
  background: linear-gradient(135deg, var(--mc, var(--brand-2)), color-mix(in srgb, var(--mc, var(--brand-2)) 65%, #000 20%));
}
.login-mod-text strong { display: block; font-size: .78rem; font-weight: 600; line-height: 1.15; }
.login-mod-text span { font-size: .68rem; opacity: .72; }
.login-hero-foot { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font-size: .76rem; opacity: .72; animation: login-fadeup .6s .9s both; }
.login-hero-foot i { margin-right: .3rem; }
@keyframes login-fadeup {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-form-side {
  flex: 1 1 44%; display: flex; align-items: center; justify-content: center; padding: 2rem;
  background: radial-gradient(ellipse 70% 55% at 70% 20%, rgba(127,154,110,.10), transparent 70%), var(--page-bg);
}
.login-card {
  width: 100%; max-width: 400px; background: var(--bs-body-bg); border-radius: 1.1rem;
  padding: 2.25rem 2rem; border: 1px solid var(--bs-border-color-translucent);
  animation: login-fadeup .55s .15s both;
}
.login-brand { margin-bottom: 1.5rem; }
.login-brand h1 { font-size: 1.6rem; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.login-brand p { color: var(--bs-secondary-color); font-size: .88rem; margin: .3rem 0 0; }
.login-input:focus-within .input-group-text { border-color: var(--brand); color: var(--brand); }
.login-eye { border-color: var(--bs-border-color); color: var(--bs-secondary-color); }
.login-eye:hover { background: var(--bs-tertiary-bg); color: var(--bs-body-color); border-color: var(--bs-border-color); }
.login-submit {
  position: relative; overflow: hidden; font-weight: 500;
  background: linear-gradient(135deg, var(--brand), #35806a); border: 0; color: #fff;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.login-submit:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 8px 20px -8px rgba(42,99,80,.55); color: #fff; }
.login-submit::after {
  content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.28), transparent);
  transform: skewX(-20deg); transition: left .45s ease;
}
.login-submit:hover::after { left: 130%; }
.login-card-foot { margin-top: 1.4rem; text-align: center; font-size: .74rem; color: var(--bs-secondary-color); }
/* Convite ao primeiro acesso: destaque abaixo do Entrar, sem competir com ele.
   Contorno em vez de preenchimento — quem já tem senha não pode confundir qual
   é o botão principal. */
.login-primeiro {
  display: flex; align-items: center; gap: .7rem;
  margin-top: 1rem; padding: .7rem .85rem;
  border: 1px solid var(--brand); border-radius: .7rem;
  background: var(--brand-soft); color: var(--brand-dark);
  text-decoration: none; transition: background .15s, border-color .15s, transform .15s;
}
.login-primeiro:hover, .login-primeiro:focus-visible {
  background: var(--brand); border-color: var(--brand); color: #fff; transform: translateY(-1px);
}
.login-primeiro-ico {
  flex: 0 0 auto; width: 2rem; height: 2rem; border-radius: .5rem;
  display: grid; place-items: center; font-size: 1rem;
  background: rgba(255, 255, 255, .65); color: var(--brand);
}
.login-primeiro:hover .login-primeiro-ico { background: rgba(255, 255, 255, .2); color: #fff; }
.login-primeiro-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.login-primeiro-txt b { font-size: .95rem; font-weight: 600; }
.login-primeiro-txt small { font-size: .76rem; opacity: .85; }
.login-primeiro-seta { margin-left: auto; opacity: .6; }

/* No escuro, o verde da marca — tanto o escuro do texto quanto o sálvia —
   desaparece contra o fundo. O convite se sustenta pelo contorno, e o texto
   passa a ser claro: é um chamado para a ação, precisa ser lido de relance. */
[data-bs-theme="dark"] .login-primeiro {
  background: rgba(42, 99, 80, .28); color: #e9f1eb; border-color: var(--brand-2);
}
[data-bs-theme="dark"] .login-primeiro-txt small { opacity: .78; }
[data-bs-theme="dark"] .login-primeiro-ico { background: rgba(255, 255, 255, .1); color: var(--brand-2); }
[data-bs-theme="dark"] .login-primeiro:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

.login-links { margin-top: 1.1rem; text-align: center; font-size: .8rem; }
.login-links a { color: var(--bs-secondary-color); text-decoration: none; }
.login-links a:hover { color: var(--brand); text-decoration: underline; }
.login-mobile-brand { display: none; }

@media (max-width: 860px) {
  .login-hero { display: none; }
  .login-form-side { flex: 1; }
  .login-mobile-brand { display: flex; align-items: center; justify-content: center; margin-bottom: 1.1rem; }
  .login-mobile-brand img { width: 96px; object-fit: contain; }
}
@media (prefers-reduced-motion: reduce) {
  .login-aurora, .login-hero-brand, .login-hero h2, .login-hero .lead, .login-mod, .login-hero-foot, .login-card { animation: none; }
}

/* ===== Páginas públicas (verificação, privacidade) ===== */
.pub-shell { min-height: 100vh; display: flex; flex-direction: column; }
.pub-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 1.5rem; background: var(--bs-body-bg); border-bottom: 1px solid var(--bs-border-color);
}
.pub-brand { display: flex; align-items: center; gap: .7rem; font-weight: 600; color: var(--brand-dark); text-decoration: none; }
.pub-brand img { width: 40px; height: 40px; object-fit: contain; }
.pub-brand small { display: block; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-2); font-weight: 600; }
.pub-main { flex: 1; width: 100%; max-width: 820px; margin: 0 auto; padding: 2rem 1.25rem; }
[data-bs-theme="dark"] .pub-brand { color: #d8f3e3; }

/* ===== Responsivo ===== */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .content { margin-left: 0; }
  .user-meta { display: none; }
  .main { padding: 1rem; }
}

/* ===== Compatibilidade com as classes antigas =====
   Mantém legível qualquer trecho ainda não migrado para o Bootstrap. */
.muted { color: var(--bs-secondary-color); font-size: .85rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--bs-body-bg); border: 1px solid var(--line); border-radius: .85rem; padding: 1rem 1.15rem; }
.stat .num { font-size: 1.4rem; font-weight: 600; color: var(--brand); }
.stat .lbl { font-size: .82rem; color: var(--bs-secondary-color); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.badge-ok { background: #d1e7dd; color: #0f5132; }
.badge-no { background: #f8d7da; color: #842029; }
.alert-ok    { --bs-alert-color: #0f5132; --bs-alert-bg: #d1e7dd; --bs-alert-border-color: #badbcc; }
.alert-erro  { --bs-alert-color: #842029; --bs-alert-bg: #f8d7da; --bs-alert-border-color: #f5c2c7; }
.alert-info  { --bs-alert-color: #084298; --bs-alert-bg: #cfe2ff; --bs-alert-border-color: #b6d4fe; }
.alert-aviso { --bs-alert-color: #664d03; --bs-alert-bg: #fff3cd; --bs-alert-border-color: #ffecb5; }
.btn:not([class*=" btn-"]):not([class^="btn-"]) {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.btn-azul   { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.btn-cinza  { background: #6c757d; border-color: #6c757d; color: #fff; }
.btn-perigo { background: #dc3545; border-color: #dc3545; color: #fff; }

/* ---- Comprovante de assinatura ---------------------------------------- */
.comprovante .w-35 { width: 35%; }
.comprovante .letra-larga { letter-spacing: .12em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.qr-caixa { display: inline-block; padding: .5rem; background: #fff; border: 1px solid var(--bs-border-color); border-radius: .5rem; }
.qr-caixa svg { display: block; width: 100%; max-width: 190px; height: auto; }

@media print {
  .sidebar, .topbar, .footer, .page-actions, .alert-dismissible { display: none !important; }
  .layout, .content, .main { display: block; margin: 0; padding: 0; }
  .card, .comprovante { border: 1px solid #ccc !important; box-shadow: none !important; }
  a[href]:after { content: ""; }
}

/* ---- Verificação em duas etapas --------------------------------------- */
.letra-larga { letter-spacing: .3em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.chave-manual { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem;
  letter-spacing: .08em; background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color);
  border-radius: .4rem; padding: .6rem .8rem; word-break: break-all; }
.codigos-recuperacao { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .5rem; }
.codigos-recuperacao span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color);
  border-radius: .35rem; padding: .45rem .6rem; text-align: center; letter-spacing: .05em; }

/* ---- Canhotos de primeiro acesso -------------------------------------- */
.canhotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: .75rem; }
.canhoto { border: 1px dashed #999; border-radius: .4rem; padding: .8rem 1rem; background: #fff; color: #111; }
.canhoto-marca { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #666; }
.canhoto-nome { font-weight: 600; margin-top: .2rem; }
.canhoto-sub { font-size: .78rem; color: #666; }
.canhoto-codigo { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.5rem;
  letter-spacing: .18em; text-align: center; margin: .6rem 0; padding: .35rem;
  border: 1px solid #ccc; border-radius: .3rem; background: #f6f6f6; }
.canhoto-texto { font-size: .74rem; color: #333; line-height: 1.35; }
.canhoto-recibo { font-size: .72rem; color: #555; margin-top: .7rem; border-top: 1px solid #ddd; padding-top: .5rem; }
@media print { .canhotos { grid-template-columns: repeat(2, 1fr); } .canhoto { break-inside: avoid; } }
