/* CNH do Brasil — UI profissional (gov.br / CDT), sem emoji */
:root {
  --navy: #0a2540;
  --navy2: #0d3a6e;
  --blue: #1351b4;
  --blue-btn: #1351b4;
  --green: #1db954;
  --green2: #2fd36a;
  --yellow: #f0b429;
  --yellow2: #f7c84a;
  --inf: #1e5ad7;
  --edu: #4aa8eb;
  --light: #f0f1f3;
  --sheet: #ffffff;
  --txt: #1a1a1a;
  --muted: #6b7280;
  --mint: #e8f5e9;
  --mint2: #eaf7ee;
  --line: #e8eaee;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --r-card: 16px;
  --r-pill: 999px;
  --shadow: 0 4px 16px rgba(10, 37, 64, .07);
  --shadow-lg: 0 12px 32px rgba(10, 37, 64, .12);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--light);
  color: var(--txt);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button, input { font: inherit; }
button { cursor: pointer; border: 0; background: none; touch-action: manipulation; }
a { color: var(--blue); }
img { max-width: 100%; display: block; }
#app {
  min-height: 100dvh; min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--light);
  position: relative;
  overflow-x: hidden;
}
/* NÃO animar #app > * — quebra transform do drawer e trava a tela */
#app > .login-screen,
#app > .gov-login,
#app > .home,
#app > .page,
#app > .hab-page,
#app > .infracoes-page,
#app > .tb + main,
#app > main {
  animation: screenIn .24s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes screenIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(28px + var(--safe-b));
  transform: translateX(-50%) translateY(140%);
  background: #111827; color: #fff; padding: .7rem 1.2rem; border-radius: var(--r-pill);
  font-size: .84rem; font-weight: 600; z-index: 9999; opacity: 0;
  transition: .28s cubic-bezier(.2,.8,.2,1); pointer-events: none;
  max-width: 88vw; text-align: center; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ════════ LOGIN — idêntico beta lab (vídeo) ════════ */
.login-splash {
  height: 100dvh; height: 100svh;
  background: #fff;
  display: grid; place-items: center;
  padding: 2rem;
}
.login-splash-logo {
  width: min(220px, 62vw);
  height: auto;
  object-fit: contain;
  animation: splashIn .55s cubic-bezier(.2,.8,.2,1);
  filter: drop-shadow(0 8px 24px rgba(19,81,180,.12));
}
@keyframes splashIn {
  from { opacity: 0; transform: scale(.88); }
  to { opacity: 1; transform: none; }
}

.login-screen {
  height: 100dvh;
  height: 100svh;
  max-height: 100dvh;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.login-hero {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #1c2d40;
}
.login-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}
.login-sheet {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  margin-top: -28px;
  background: #ffffff;
  border-radius: 28px 28px 0 0;
  box-shadow: none;
  padding: 1.65rem 1.65rem calc(2rem + var(--safe-b));
  display: flex;
  flex-direction: column;
  align-items: center;
}
.login-logo-oficial {
  width: min(168px, 48vw);
  height: auto;
  margin: 0 0 1.1rem;
  object-fit: contain;
}
.login-terms {
  text-align: center;
  font-size: .93rem;
  line-height: 1.55;
  color: #1a1a1a;
  margin: 0 0 1.35rem;
  max-width: 290px;
  font-weight: 400;
}
.login-terms a {
  color: #1351b4;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.btn-login-gov {
  width: 100%;
  max-width: 400px;
  min-height: 52px;
  margin-top: 0;
  border-radius: 999px;
  background: #1351b4;
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  transition: transform .12s ease, opacity .12s, filter .12s;
  -webkit-appearance: none;
  appearance: none;
}
.btn-login-gov:active {
  transform: scale(.98);
  filter: brightness(.96);
}
.btn-login-gov:disabled { opacity: .55; }
.govbr-mark {
  font-weight: 800;
  letter-spacing: -.01em;
  display: inline-flex;
  align-items: baseline;
}
.govbr-mark .govbr-br,
.govbr-logo-text .govbr-br {
  color: #f0ad4e;
}
.btn-login-gov .govbr-mark { color: #fff; }
.btn-login-gov .govbr-mark .govbr-br { color: #ffcd07; }
.govbr-logo-text {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1351b4;
  letter-spacing: -.02em;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* gov.br steps (CPF + senha) */
.gov-login {
  min-height: 100dvh;
  min-height: 100svh;
  background: #f5f6f8;
  display: flex;
  flex-direction: column;
}
.gov-login-bar {
  background: #0c326f;
  color: #fff;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1rem;
  padding-top: calc(.85rem + var(--safe-t, 0px));
}
.gov-login-bar h1 {
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .04em;
  margin: 0;
}
.gov-back {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  display: grid; place-items: center;
}
.gov-login-body {
  flex: 1;
  padding: 1.1rem 1rem calc(1.5rem + var(--safe-b));
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}
.gov-logo-row { margin: .35rem 0 1rem; }
.gov-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.15rem 1.05rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border: 1px solid #e8eaee;
  /* sem animation both — evita bug de transform em mobile */
}
.gov-card h2 {
  margin: 0 0 .9rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1b1b1b;
}
.gov-id-opt {
  display: flex;
  gap: .75rem;
  margin-bottom: 1.05rem;
  color: #333;
  align-items: flex-start;
}
.gov-id-opt b { display: block; font-size: .95rem; margin-bottom: .2rem; font-weight: 700; color: #1a1a1a; }
.gov-id-opt p { margin: 0; font-size: .82rem; color: #555; line-height: 1.45; }
.gov-id-opt a { color: #1351b4; font-weight: 600; text-decoration: none; }
.gov-id-opt a:active { text-decoration: underline; }
.gov-id-ic {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: #eef3fb;
  color: #1351b4;
  display: grid; place-items: center;
}
.gov-id-svg { display: block; }
.gov-field {
  display: block;
  margin-bottom: .85rem;
}
.gov-field > span {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  color: #444;
  margin-bottom: .35rem;
}
.gov-field input {
  width: 100%;
  min-height: 48px;
  padding: .7rem .9rem;
  border: 1.5px solid #cfd4dc;
  border-radius: 8px;
  font-size: 16px;
  background: #fff;
  color: #111;
}
.gov-field input:focus {
  outline: none;
  border-color: #1351b4;
  box-shadow: 0 0 0 3px rgba(19,81,180,.15);
  background: #fffef5;
}
.gov-cpf-show {
  margin-bottom: .85rem;
  padding: .55rem .7rem;
  background: #f3f5f8;
  border-radius: 8px;
}
.gov-cpf-show span {
  display: block;
  font-size: .72rem;
  color: #666;
  font-weight: 600;
}
.gov-cpf-show b {
  font-size: 1rem;
  color: #111;
  font-weight: 700;
  letter-spacing: .02em;
}
.gov-other {
  margin-top: 1.35rem;
  padding: 0;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.gov-other-title {
  font-size: .78rem;
  font-weight: 700;
  color: #5a6270;
  margin: 0;
  padding: .75rem 1rem .35rem;
  letter-spacing: .01em;
}
.gov-other-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .8rem;
  text-align: left;
  padding: .8rem 1rem;
  border: 0;
  border-top: 1px solid #f0f1f4;
  font-size: .9rem;
  font-weight: 600;
  color: #1a1a1a;
  background: transparent;
  min-height: 52px;
}
.gov-other-row:first-of-type { border-top: 0; }
.gov-other-row:active { background: #f7f8fa; }
.gov-opt-ic {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: #f0f3f8;
  color: #1351b4;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.gov-opt-svg { display: block; }

.login-pass-wrap { position: relative; }
.login-pass-wrap input { padding-right: 3.1rem; width: 100%; }
.login-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; display: grid; place-items: center;
  color: #6b7280; opacity: .9;
}
.login-eye:active { opacity: 1; color: #1351b4; }
.login-eye .eye-svg { display: block; }
.login-err {
  display: none; margin-top: .75rem; padding: .65rem .75rem; border-radius: 12px;
  background: #fef2f2; color: #b91c1c; font-size: .84rem; text-align: center; font-weight: 600;
}
.login-err.show { display: block; }

/* ════════ TOPBAR ════════ */
.tb {
  background: linear-gradient(180deg, #0a2540 0%, #0c2d4f 100%);
  color: #fff;
  padding: calc(12px + var(--safe-t)) 10px 14px;
  display: flex; align-items: center; gap: 6px;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 4px 18px rgba(10,37,64,.2);
  position: sticky; top: 0; z-index: 20;
}
.tb-home { gap: 2px; }
.tb-title {
  flex: 1; font-size: 1.05rem; font-weight: 700; text-align: center;
  letter-spacing: .015em;
  white-space: nowrap;
}
.tb-ico {
  width: 42px; height: 42px; border-radius: 50%; color: #fff;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.tb-ico:active { background: rgba(255,255,255,.12); }
.tb-svg { display: block; color: inherit; }
.tb-bell { color: #f5c518; }
.tb-bell .tb-svg-bell { color: #f5c518; }
.tb-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.12);
  display: grid; place-items: center; font-weight: 800; font-size: .78rem;
  border: 1.5px solid rgba(255,255,255,.5); color: #fff;
  overflow: hidden; flex-shrink: 0;
  letter-spacing: .02em;
}
.tb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tb-sub { gap: 10px; }
.tb-back {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: #fff; font-size: 1.55rem; line-height: 1;
  display: grid; place-items: center; flex-shrink: 0;
}
.tb-back:active { background: rgba(255,255,255,.22); }
.tb-sub-txt { min-width: 0; }
.tb-sub-title {
  font-size: .95rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.tb-sub-desc { font-size: .7rem; opacity: .88; margin-top: 2px; font-weight: 500; }

/* ════════ HOME ════════ */
.home {
  padding: 16px 16px calc(20px + var(--safe-b));
  display: flex; flex-direction: column; gap: 13px;
  background: var(--light); flex: 1;
}
.hcard {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 108px; padding: 1.12rem 1.15rem 1.12rem 1.28rem;
  border-radius: 18px; color: #fff; text-align: left;
  box-shadow: 0 8px 22px rgba(0,0,0,.1);
  position: relative; overflow: hidden;
  transition: transform .14s cubic-bezier(.2,.8,.2,1), box-shadow .14s;
  will-change: transform;
  border: 0;
}
.hcard:active { transform: scale(.982); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
/* entrada escalonada dos cards (premium) */
/* cards da home: entrada leve só em opacity (não mexe em transform permanente) */
.home .hcard:nth-child(1) { animation: fadeUp .3s .02s both ease; }
.home .hcard:nth-child(2) { animation: fadeUp .3s .06s both ease; }
.home .hcard:nth-child(3) { animation: fadeUp .3s .1s both ease; }
.home .hcard:nth-child(4) { animation: fadeUp .3s .14s both ease; }
.home .home-brands { animation: fadeUp .3s .18s both ease; }
@keyframes fadeUp {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes cardPop {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* curvas de pista beta lab */
.hcard::before {
  content: ""; position: absolute; right: -12%; top: 0%; width: 78%; height: 160%;
  border-radius: 50%; border: 20px solid rgba(255,255,255,.13);
  pointer-events: none;
}
.hcard::after {
  content: ""; position: absolute; right: 4%; bottom: -48%; width: 62%; height: 130%;
  border-radius: 50%; border: 16px solid rgba(255,255,255,.1);
  pointer-events: none;
}
.hcard-txt { position: relative; z-index: 1; max-width: 64%; }
.hcard h2 {
  font-size: 1.14rem; font-weight: 800; letter-spacing: .05em;
  margin-bottom: .3rem; text-transform: uppercase;
}
.hcard p { font-size: .8rem; opacity: .97; line-height: 1.3; font-weight: 500; }
.hcard-ic {
  width: 74px; height: 74px; object-fit: contain; position: relative; z-index: 1;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,.14));
  flex-shrink: 0;
}
.hcard.condutor { background: linear-gradient(105deg, #17a34a 0%, #28c45a 48%, #4ed875 100%); }
.hcard.veiculos { background: linear-gradient(105deg, #e59a0c 0%, #f0b429 48%, #f7cb55 100%); }
.hcard.infracoes { background: linear-gradient(105deg, #184fc0 0%, #2762d9 48%, #3d7aef 100%); }
.hcard.educacao { background: linear-gradient(105deg, #3f9fe6 0%, #5bb4f0 48%, #7ec6f6 100%); }
.home-brands {
  display: flex; align-items: center; justify-content: center;
  margin-top: .35rem; padding: .55rem .15rem .15rem;
  background: transparent;
  border: 0;
  /* evita “risca” branca de imagem vazia / faixa residual */
  min-height: 0;
  box-shadow: none;
}
.home-brands .brands-strip {
  display: none; /* PNG antigo vinha em branco e gerava a risca */
}
.brands-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .35rem .45rem;
  max-width: 100%;
  padding: 0;
  background: transparent;
}
.br-item {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: #8b93a1;
  text-transform: none;
  line-height: 1.2;
  white-space: nowrap;
}
.br-item b {
  font-weight: 800;
  color: #6b7280;
  letter-spacing: .04em;
}
.br-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: #c5cad3;
  flex-shrink: 0;
}

/* ════════ CONDUTOR ════════ */
.page { padding: 14px 14px calc(24px + var(--safe-b)); flex: 1; }
.cond-info {
  background: #fff; border-radius: 16px; padding: 1.15rem 1.15rem 1.05rem;
  box-shadow: var(--shadow); margin-bottom: 14px;
}
.cond-info h3 {
  font-size: 1.02rem; font-weight: 800; color: #111; margin-bottom: .8rem;
  padding-bottom: .6rem; border-bottom: 1px solid #e8eaed;
}
.cond-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem 1.1rem; }
.cond-grid .cond-full { grid-column: 1 / -1; }
.cond-grid span {
  display: block; font-size: .74rem; color: #6b7280; margin-bottom: .18rem; font-weight: 500;
}
.cond-grid b { font-size: .94rem; color: #111; font-weight: 700; word-break: break-word; }
.cond-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cond-tile {
  background: #fff; border-radius: 14px; min-height: 112px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .55rem; padding: .9rem .5rem;
  box-shadow: var(--shadow);
  font-size: .68rem; font-weight: 800; letter-spacing: .04em; color: #0d3a6e;
  text-align: center; transition: transform .12s, box-shadow .12s;
}
.cond-tile:active { transform: scale(.97); }
.cond-tile.wide { grid-column: 1 / -1; min-height: 98px; }
.cond-tile .ct-ic { width: 38px; height: 38px; color: #1351b4; }
.cond-tile .ct-ic svg { width: 38px; height: 38px; }

.empty-page {
  min-height: 52vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 14px; color: #1a1a1a; padding: 1.5rem;
}
.empty-page h3 {
  font-size: 1.05rem; font-weight: 700; max-width: 280px; line-height: 1.4; color: #111;
}
.link-refresh {
  display: inline-flex; align-items: center; gap: .4rem; color: #1351b4;
  font-weight: 600; font-size: .92rem;
}
.link-refresh svg { flex-shrink: 0; }

/* ════════ DRAWER — isolado (nunca herda animation transform) ════════ */
.drawer-bg {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, .45);
  z-index: 200 !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
  animation: none !important;
  transform: none !important;
  -webkit-tap-highlight-color: transparent;
}
.drawer-bg.open {
  opacity: 1;
  pointer-events: auto;
}
.drawer {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: min(86vw, 320px);
  max-width: 320px;
  background: #fff;
  z-index: 210 !important;
  /* translate3d evita bug de compositing no WebView Android */
  transform: translate3d(-102%, 0, 0) !important;
  transition: transform .26s cubic-bezier(.2, .8, .2, 1);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 8px 0 32px rgba(0, 0, 0, .18);
  padding-top: var(--safe-t);
  padding-bottom: var(--safe-b);
  animation: none !important;
  will-change: transform;
  touch-action: pan-y;
}
.drawer.open {
  transform: translate3d(0, 0, 0) !important;
}
body.drawer-open,
body.drawer-open #app {
  overflow: hidden !important;
  touch-action: none;
}
.drawer-head {
  padding: 1.15rem 1.2rem 1rem;
  border-bottom: 1px solid #eef0f3;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.drawer-logo { height: 34px; width: auto; margin-bottom: .85rem; object-fit: contain; }
.drawer-name {
  font-weight: 800; color: #0a2540; font-size: .86rem; line-height: 1.3;
  text-transform: uppercase; letter-spacing: .02em;
  word-break: break-word;
}
.drawer-cpf { color: #6b7280; font-size: .84rem; margin-top: .25rem; font-weight: 500; }
.drawer-nav { padding: .25rem 0 calc(1.2rem + var(--safe-b)); }
.drawer-nav button {
  width: 100%; display: flex; align-items: center; gap: .85rem;
  padding: .85rem 1.2rem; text-align: left; font-size: .92rem; color: #1f2937; font-weight: 500;
  background: transparent;
  border: 0;
  min-height: 48px;
}
.drawer-nav button:active { background: #f3f4f6; }
.drawer-nav .di-svg { width: 22px; height: 22px; flex-shrink: 0; color: #6b7280; }
.drawer-nav hr { border: 0; border-top: 1px solid #eef0f3; margin: .4rem 0; }
.drawer-nav .out { color: #374151; font-weight: 600; }

/* ════════ MODAL ════════ */
.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,.48); z-index: 80;
  display: flex; align-items: center; justify-content: center; padding: 22px;
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: #fff; border-radius: 18px; padding: 1.5rem 1.25rem 1.2rem;
  max-width: 340px; width: 100%; text-align: center; position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,.22);
  animation: popIn .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes popIn {
  from { opacity: 0; transform: scale(.94) translateY(8px); }
  to { opacity: 1; transform: none; }
}
.modal-bang {
  width: 48px; height: 48px; border-radius: 50%; background: #f5c518; color: #1a1a1a;
  display: grid; place-items: center;
  margin: -2.4rem auto .85rem; border: 3px solid #fff; box-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.modal-bang .modal-warn-svg { display: block; color: #1a1a1a; }
.modal-card p { font-size: .9rem; line-height: 1.5; color: var(--navy); margin-bottom: 1.15rem; font-weight: 500; }
.modal-actions { display: flex; gap: .6rem; }
.btn-outline, .btn-solid {
  flex: 1; min-height: 46px; border-radius: var(--r-pill); font-weight: 700; font-size: .88rem; letter-spacing: .02em;
}
.btn-outline { border: 1.5px solid var(--blue); color: var(--blue); background: #fff; }
.btn-solid { background: var(--blue); color: #fff; box-shadow: 0 4px 14px rgba(19,81,180,.26); }
.btn-solid.full { width: 100%; flex: none; margin-top: .85rem; }
.btn-solid:active, .btn-outline:active { transform: scale(.98); }

/* ════════ HABILITAÇÃO — layout CDT / beta lab + polish ════════ */
.hab-page {
  padding: 10px 12px calc(22px + var(--safe-b));
  background: #f0f1f3;
  flex: 1;
}
#hab-body {
  animation: habSlide .26s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes habSlide {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: none; }
}
.vio-hint {
  text-align: center;
  font-size: .82rem;
  color: #1351b4;
  margin: 0 0 .7rem;
  font-weight: 500;
  line-height: 1.35;
}
.vio-hint a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Stage + faces oficiais (encaixe beta lab) */
.hab-stage {
  width: 100%;
  margin: 0 0 .15rem;
}
.hab-face-wrap {
  background: #eaf7ee;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(10, 37, 64, .08);
  line-height: 0;
  width: 100%;
  padding: 0;
  margin: 0;
  display: block;
  border: 1px solid rgba(10, 37, 64, .06);
}
.hab-face-wrap.official .hab-face {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: min(58vh, 520px) !important;
  object-fit: contain;
  object-position: center center;
  background: #eaf7ee;
  display: block;
  margin: 0 auto;
  vertical-align: top;
}
.hab-face-wrap.official.mrz-face {
  background: #eaf7ee;
  min-height: min(48vh, 420px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hab-face-wrap.official.mrz-face .hab-face {
  width: 100% !important;
  max-height: min(56vh, 500px) !important;
  object-fit: contain;
  object-position: center center;
}
.hab-face-wrap.official.qr-face {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1rem .85rem;
  min-height: 280px;
  overflow: visible; /* nunca clipa o QR */
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(10, 37, 64, .06);
}
.hab-face-wrap.official.qr-face .hab-face {
  width: min(100%, 320px) !important;
  max-width: min(100%, 320px) !important;
  max-height: min(52vh, 360px) !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
  background: #fff;
  object-fit: contain; /* QR inteiro, sem crop */
  object-position: center center;
  image-rendering: auto;
  border-radius: 0;
}
.qr-caption {
  text-align: center;
  font-size: .72rem;
  color: #4b5563;
  line-height: 1.4;
  margin: .55rem .5rem 0;
  font-weight: 500;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}
.qr-hidden-mount {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}
.hab-face {
  width: 100%;
  height: auto;
  display: block;
  background: #eaf7ee;
  object-fit: contain;
}

/* ── Cartão digital CNH (frente) — fallback HTML ── */
.cdt-card {
  background: #eaf7ee;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  width: 100%;
}
.cdt-card.front {
  display: grid;
  grid-template-columns: 1fr 48px;
  min-height: 420px;
  background: linear-gradient(180deg, #e8f6ea 0%, #eaf7ee 100%);
}
.cdt-main {
  padding: .55rem .5rem .6rem .65rem;
  min-width: 0;
}
.cdt-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .35rem;
  margin-bottom: .2rem;
}
.cdt-banner {
  font-size: .52rem;
  font-weight: 800;
  letter-spacing: .03em;
  color: #1a3320;
  text-transform: uppercase;
  max-width: 70%;
  line-height: 1.2;
}
.cdt-map {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  opacity: .9;
}
.cdt-renach {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: .03em;
  color: #0a0a0a;
  margin-bottom: .4rem;
  font-variant-numeric: tabular-nums;
}
.cdt-mid {
  display: grid;
  grid-template-columns: 102px 1fr;
  gap: .45rem .5rem;
  align-items: start;
}
.cdt-foto-block {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.cdt-foto {
  width: 100px;
  height: 126px;
  object-fit: cover;
  background: #c8d5c8;
  border: 1px solid #a8b8a0;
  display: block;
}
.cdt-foto.empty {
  display: grid;
  place-items: center;
  font-size: .58rem;
  font-weight: 800;
  color: #6b7280;
}
.cdt-sign-lab {
  font-size: .38rem;
  font-weight: 700;
  color: #555;
  letter-spacing: .03em;
  margin-top: .2rem;
  text-transform: uppercase;
}
.cdt-sign {
  height: 28px;
  background: #fff;
  border: 1px solid #c5d4c5;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.cdt-sign img {
  max-height: 24px;
  max-width: 100%;
}
.cdt-sign-empty {
  display: block;
  width: 70%;
  height: 1px;
  background: #d1d5db;
}
.cdt-acc-bars {
  display: block;
  width: 30px;
  height: 11px;
  margin-top: 2px;
  border-radius: 1px;
  background: repeating-linear-gradient(
    90deg,
    #1a1a1a 0 1.4px,
    transparent 1.4px 2.6px
  );
  border: 1px solid #333;
  box-sizing: border-box;
}
.cdt-f b.acc-sim {
  font-size: .62rem;
  font-weight: 800;
  color: #111;
}
.cdt-fields {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .28rem;
}
.cdt-name-block .cdt-lab {
  display: block;
  font-size: .42rem;
  font-weight: 700;
  color: #555;
  letter-spacing: .02em;
}
.cdt-name {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  color: #0a0a0a;
  line-height: 1.2;
  text-transform: uppercase;
  word-break: break-word;
}
.cdt-row {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .35rem;
  align-items: flex-end;
}
.cdt-f {
  min-width: 0;
  flex: 1 1 auto;
}
.cdt-f.grow {
  flex: 1 1 100%;
}
.cdt-f span {
  display: block;
  font-size: .4rem;
  font-weight: 700;
  color: #555;
  letter-spacing: .02em;
  margin-bottom: 1px;
  text-transform: uppercase;
}
.cdt-f b {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  color: #111;
  word-break: break-word;
  line-height: 1.15;
}
.cdt-f b.red { color: #c41e1e; }
.cdt-f b.cat { font-size: .95rem; letter-spacing: .04em; }
.cdt-f b.fil { font-size: .62rem; }
.cdt-f.acc { flex: 0 0 auto; max-width: 52px; }
.cdt-tipo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0a0a0a;
  line-height: 1;
  padding: 0 .1rem .05rem;
  font-family: Georgia, "Times New Roman", serif;
  min-width: 1.1em;
  text-align: center;
}
.cdt-side {
  background: linear-gradient(180deg, #061220 0%, #0c2440 45%, #061220 100%);
  color: #f0d878;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: .5rem .1rem .4rem;
}
.cdt-seal {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(240, 216, 120, .55);
  background: radial-gradient(circle at 40% 35%, rgba(240,216,120,.35), transparent 65%);
  margin-bottom: .2rem;
}
.cdt-side-txt {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: .42rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: center;
  line-height: 1.25;
  opacity: .95;
  max-height: 62%;
  overflow: hidden;
}
.cdt-br {
  font-size: 1.25rem;
  font-weight: 900;
  color: #e8d48a;
  letter-spacing: .06em;
  margin-top: .2rem;
}

/* ── Verso digital ── */
.cdt-card.back {
  padding: .75rem .7rem .85rem;
  min-height: 380px;
  background: #eaf7ee;
}
.cdt-back-renach {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: .03em;
  margin-bottom: .55rem;
  color: #0a0a0a;
}
.cdt-back-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: .55rem;
  align-items: start;
}
.cdt-back-left {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  min-width: 0;
}
.cdt-obs {
  border: 1.5px solid #222;
  border-radius: 2px;
  min-height: 88px;
  padding: .35rem .4rem;
  background: #f7faf7;
}
.cdt-obs span {
  display: block;
  font-size: .5rem;
  font-weight: 800;
  color: #333;
  margin-bottom: .2rem;
}
.cdt-obs b,
.cdt-obs .cdt-obs-val {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  color: #111;
  line-height: 1.25;
  margin-top: .15rem;
  text-align: left;
  /* EAR / obs no topo do quadro (igual molde) */
  min-height: 1.2em;
}
.cdt-local-box span {
  display: block;
  font-size: .48rem;
  font-weight: 700;
  color: #555;
}
.cdt-local-box b {
  font-size: .78rem;
  font-weight: 700;
}
.cdt-uf-big {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: .08em;
  color: #0a2540;
  text-transform: uppercase;
  line-height: 1.1;
  margin-top: .15rem;
}
.cdt-assina {
  font-size: .52rem;
  font-weight: 600;
  color: #333;
  line-height: 1.35;
  margin-top: .2rem;
}
.cdt-codes {
  display: block;
  margin-top: .2rem;
  font-size: .55rem;
  font-weight: 700;
  color: #111;
}
.cdt-back-right {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.cdt-cat {
  width: 100%;
  border-collapse: collapse;
  font-size: .52rem;
  background: #f7faf7;
  border: 1.5px solid #222;
}
.cdt-cat th,
.cdt-cat td {
  border: 1px solid #222;
  padding: .2rem .12rem;
  text-align: center;
  min-width: 1.4rem;
}
.cdt-cat th {
  background: #e8eee8;
  font-weight: 800;
}
.cdt-cat td.lab {
  font-weight: 800;
  background: #eef2ee;
  text-align: left;
  padding-left: .25rem;
  width: 2rem;
}
.cdt-cat td.on {
  font-weight: 800;
  font-size: .48rem;
  color: #0a0a0a;
}

/* ── MRZ ── */
.cdt-card.mrz {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: .5rem;
  min-height: 300px;
  padding: .85rem .7rem;
  background: #eaf7ee;
  align-items: center;
}
.cdt-mrz-code {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 260px;
}
.cdt-mrz-code pre {
  margin: 0;
  font-family: "Courier New", Courier, monospace;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: .06em;
  color: #0a0a0a;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: pre;
}
.cdt-mrz-legend {
  font-size: .52rem;
  color: #4b5563;
  line-height: 1.4;
  font-weight: 500;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  max-height: 280px;
  overflow: hidden;
  text-align: left;
}

/* dots + lista */
.hab-page .dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  margin: .95rem 0 .85rem;
}
.hab-page .hab-list {
  margin-top: 0;
  gap: 9px;
}
.hab-page .hab-row.solo {
  margin-top: 0;
}
.qr-wrap.qr-full {
  background: #fff;
  border-radius: 0;
  padding: .5rem 0 0;
  min-height: 280px;
  box-shadow: none;
  margin-bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.qr-wrap.qr-full canvas,
.qr-wrap.qr-full img {
  width: min(300px, 84vw) !important;
  height: auto !important;
  max-width: 100%;
}

/* Cartão digital CNH (layout plástico CDT — idêntico beta lab) */
.cnh-plastic {
  background: var(--mint2);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,.09);
  border: 1px solid #d4e8d8;
  position: relative;
  line-height: 1.15;
}
.cnh-plastic.front {
  display: grid;
  grid-template-columns: 1fr 46px;
  min-height: 440px;
  background: linear-gradient(180deg, #eaf7ee 0%, #e8f5e9 100%);
}
.cnh-pl-main { padding: .65rem .4rem .7rem .7rem; min-width: 0; }
.cnh-pl-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .35rem;
  margin-bottom: .28rem;
}
.cnh-pl-banner {
  font-size: .55rem; font-weight: 800; letter-spacing: .04em; color: #1a3320;
  text-transform: uppercase; max-width: 72%; line-height: 1.25;
}
.cnh-pl-map {
  width: 34px; height: 34px; opacity: .88; flex-shrink: 0;
}
.cnh-pl-renach {
  font-size: 1.22rem; font-weight: 800; letter-spacing: .03em; color: #0a0a0a;
  margin-bottom: .5rem; font-variant-numeric: tabular-nums;
}
.cnh-pl-body {
  display: grid;
  grid-template-columns: 100px 1fr 22px;
  gap: .4rem .35rem;
  align-items: start;
}
.cnh-pl-foto-col { display: flex; flex-direction: column; gap: .3rem; }
.cnh-pl-foto {
  width: 100px; height: 128px; object-fit: cover; background: #c8d5c8;
  border: 1px solid #a8bba8; border-radius: 2px;
}
.cnh-pl-foto.empty {
  display: grid; place-items: center; font-size: .58rem; font-weight: 800;
  color: #6b7280; background: #d5e0d5;
}
.cnh-pl-sign {
  height: 30px; background: #fff; border: 1px solid #c5d4c5;
  border-radius: 2px; display: grid; place-items: center; overflow: hidden;
}
.cnh-pl-sign img { max-height: 26px; max-width: 100%; }
.cnh-pl-sign span { font-size: .48rem; color: #9ca3af; font-weight: 600; }
.cnh-pl-fields { min-width: 0; }
/* nome vertical entre campos e faixa preta (como CDT) */
.cnh-pl-name-vert {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: #0a0a0a;
  text-transform: uppercase;
  line-height: 1.15;
  max-height: 280px;
  overflow: hidden;
  align-self: stretch;
  text-align: center;
  padding: .15rem 0;
}
.cnh-pl-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .28rem .32rem;
}
.cnh-pl-grid .full { grid-column: 1 / -1; }
.cnh-pl-f span {
  display: block; font-size: .48rem; font-weight: 700; color: #4b5563;
  text-transform: uppercase; letter-spacing: .02em; margin-bottom: 1px;
}
.cnh-pl-f b {
  font-size: .68rem; font-weight: 700; color: #111; word-break: break-word;
}
.cnh-pl-f b.val { color: #c41e1e; }
.cnh-pl-f b.cat {
  font-size: 1rem; color: #c41e1e; letter-spacing: .05em;
}
.cnh-pl-side {
  background: linear-gradient(180deg, #071525 0%, #0c2440 50%, #071525 100%);
  color: #f5e6a8;
  display: flex; flex-direction: column; align-items: center;
  justify-content: space-between;
  padding: .5rem .12rem .45rem;
  position: relative;
}
.cnh-pl-side-title {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: .48rem; font-weight: 700; letter-spacing: .05em;
  text-align: center; line-height: 1.15; opacity: .95;
  max-height: 58%; overflow: hidden;
}
.cnh-pl-br {
  font-size: 1.28rem; font-weight: 900; color: #e8d48a;
  letter-spacing: .04em; margin-top: .25rem;
}
.cnh-pl-side-seal {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid rgba(232,212,138,.55);
  margin-bottom: .2rem; opacity: .9;
  background: radial-gradient(circle, rgba(232,212,138,.25), transparent 70%);
}

/* Verso plástico */
.cnh-plastic.back {
  padding: .85rem .8rem 1rem;
  min-height: 380px;
  background: var(--mint2);
}
.cnh-back-renach {
  font-size: 1.15rem; font-weight: 800; letter-spacing: .03em; margin-bottom: .65rem; color: #111;
}
.cnh-cats {
  display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .7rem;
}
.cnh-cat-table {
  border: 1.5px solid #2a2a2a; border-radius: 3px; overflow: hidden;
  font-size: .58rem; background: #f7faf7;
}
.cnh-cat-table .head {
  display: grid; grid-template-columns: 28px 1fr 1fr 1fr;
  background: #e8eee8; font-weight: 800; border-bottom: 1px solid #2a2a2a;
}
.cnh-cat-table .head span, .cnh-cat-table .row span {
  padding: .28rem .15rem; text-align: center; border-right: 1px solid #2a2a2a;
}
.cnh-cat-table .head span:last-child, .cnh-cat-table .row span:last-child { border-right: 0; }
.cnh-cat-table .row {
  display: grid; grid-template-columns: 28px 1fr 1fr 1fr;
  border-bottom: 1px solid #2a2a2a; min-height: 22px;
}
.cnh-cat-table .row:last-child { border-bottom: 0; }
.cnh-cat-table .row .lab {
  font-weight: 800; background: #eef2ee; text-align: left; padding-left: .25rem;
}
.cnh-cat-table .row .on { font-weight: 800; color: #0a0a0a; }
.cnh-obs-box {
  border: 1.5px solid #2a2a2a; border-radius: 3px; min-height: 72px;
  padding: .4rem .5rem; margin-bottom: .55rem; background: #f7faf7;
}
.cnh-obs-box span {
  display: block; font-size: .55rem; font-weight: 800; color: #333; margin-bottom: .25rem;
}
.cnh-obs-box b { font-size: .78rem; font-weight: 600; color: #111; }
.cnh-back-foot {
  display: flex; justify-content: space-between; align-items: flex-end; gap: .5rem;
  margin-top: .4rem;
}
.cnh-back-local span {
  display: block; font-size: .55rem; font-weight: 700; color: #555;
}
.cnh-back-local b { font-size: .8rem; font-weight: 700; }
.cnh-back-uf {
  font-size: 1.5rem; font-weight: 900; letter-spacing: .1em; color: #0a2540;
  text-transform: uppercase;
}
.cnh-back-sign {
  font-size: .58rem; color: #333; text-align: right; line-height: 1.3; font-weight: 600;
}

/* MRZ */
.cnh-mrz-page {
  background: var(--mint2); border-radius: 6px; padding: 1rem .85rem;
  box-shadow: 0 4px 18px rgba(0,0,0,.08); border: 1px solid #d4e8d8;
  min-height: 280px;
}
.cnh-mrz-legend {
  font-size: .58rem; color: #4b5563; line-height: 1.4; margin-bottom: 1rem;
  font-weight: 500;
}
.cnh-mrz-code {
  font-family: "Courier New", Courier, monospace;
  font-size: .78rem; line-height: 1.55; color: #0a0a0a; font-weight: 700;
  letter-spacing: .04em; white-space: pre-wrap; word-break: break-all;
  writing-mode: horizontal-tb;
}

/* QR */
.qr-wrap {
  background: #fff; border-radius: 12px; padding: 1.15rem;
  display: flex; justify-content: center; align-items: center;
  box-shadow: var(--shadow); margin-bottom: .75rem; min-height: 260px;
}
.qr-wrap canvas, .qr-wrap img {
  display: block; margin: 0 auto; max-width: 100%; width: min(280px, 78vw); height: auto;
}
.qr-fail { color: #6b7280; font-size: .88rem; text-align: center; padding: 1rem; font-weight: 500; }

.dots {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  margin: 1rem 0 .85rem;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%; background: #c5cdd8; padding: 0;
  transition: background .18s, transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s;
}
.dot.on {
  background: #0a2540;
  transform: scale(1.28);
  box-shadow: 0 0 0 3px rgba(10,37,64,.12);
}
.dot:active { transform: scale(1.35); }

.hab-list { display: flex; flex-direction: column; gap: 10px; }
.hab-row, .hab-row.solo {
  display: flex; align-items: center; gap: .75rem; width: 100%;
  background: #fff; border-radius: 14px; padding: 1rem 1.1rem; text-align: left;
  font-size: .93rem; font-weight: 600; color: var(--navy);
  box-shadow: 0 4px 14px rgba(10,37,64,.06);
  transition: transform .14s cubic-bezier(.2,.8,.2,1), box-shadow .14s;
}
.hab-row:active, .hab-row.solo:active {
  transform: scale(.978);
  box-shadow: 0 2px 8px rgba(10,37,64,.05);
}
.hab-row .hi {
  display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center;
  opacity: .9; flex-shrink: 0;
}
.hab-row .hi svg { display: block; }

/* ════════ INFRAÇÕES ════════ */
.infracoes-page { padding-top: .25rem; }
.list-link {
  display: flex; align-items: center; width: 100%; padding: 1.1rem .2rem;
  border-bottom: 1px solid #e8eaed; font-size: .98rem; font-weight: 500; color: #1a1a1a;
  background: transparent;
}
.list-link:active { background: rgba(0,0,0,.02); }
.list-link .ll-ic {
  margin-right: .8rem; width: 28px; height: 28px; display: grid; place-items: center;
}
.list-link .ll-ic.blue { color: #1351b4; }
.list-link .chev { margin-left: auto; color: #1351b4; font-size: 1.3rem; font-weight: 300; }

.inf-filter-bar {
  background: #0d3a6e; color: #fff; margin: -14px -14px 0; padding: .85rem 1rem;
  font-size: .82rem; line-height: 1.35;
}
.inf-filter-bar strong { display: block; font-weight: 700; margin-bottom: .15rem; }
.inf-filter-bar span { opacity: .88; font-size: .76rem; }
.inf-sne {
  background: #f5c518; color: #1a1a1a; margin: 0 -14px 1rem;
  padding: 1rem 1.1rem; font-size: .88rem; line-height: 1.4; font-weight: 500;
}
.inf-sne a {
  display: inline-block; margin-top: .55rem; color: #1351b4; font-weight: 700;
  text-decoration: underline;
}
.inf-sne-ic {
  display: inline-flex; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,.1); align-items: center; justify-content: center;
  font-weight: 800; font-size: .75rem; margin-right: .4rem; vertical-align: middle;
}

/* ════════ EDUCAÇÃO ════════ */
.edu-photo-card {
  border-radius: 16px; overflow: hidden; margin-bottom: .9rem;
  box-shadow: var(--shadow-lg);
}
.edu-photo-card img { width: 100%; height: auto; display: block; }
.edu-link {
  display: flex; align-items: flex-start; gap: .7rem; width: 100%;
  background: #fff; border-radius: 14px; padding: 1rem 1.05rem; font-size: .86rem;
  color: #374151; line-height: 1.38; box-shadow: var(--shadow);
  text-align: left; font-weight: 500;
}
.edu-search {
  width: 32px; height: 32px; border-radius: 50%; background: #eef2ff; color: #1351b4;
  display: grid; place-items: center; flex-shrink: 0;
}
.edu-search svg { display: block; }

/* ════════ HIST / EXPORT ════════ */
.hist-card {
  background: #fff; border-radius: 14px; padding: 1.05rem; box-shadow: var(--shadow);
}
.hist-card h3 { font-size: .98rem; color: var(--navy); margin-bottom: .8rem; font-weight: 800; }
.hist-row {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  text-align: left; padding: .55rem 0; border-top: 1px solid #eef0f3;
}
.hist-em { font-size: .9rem; color: #374151; margin-bottom: .22rem; font-weight: 500; }
.hist-num { font-size: .84rem; color: var(--blue); font-weight: 700; }
.hist-row .chev { color: #1351b4; font-size: 1.25rem; }

.export-card {
  background: #fff; border-radius: 14px; padding: 1.2rem; box-shadow: var(--shadow);
  font-size: .9rem; line-height: 1.55; color: #1f2937; font-weight: 500;
}
.export-card p { margin-bottom: .8rem; }
.export-link { color: var(--blue); word-break: break-all; font-size: .82rem; font-weight: 600; }

/* skeleton / loading */
.skel {
  background: linear-gradient(90deg, #e8eaed 25%, #f3f4f6 50%, #e8eaed 75%);
  background-size: 200% 100%; animation: skel 1.2s ease infinite;
  border-radius: 8px;
}
@keyframes skel { to { background-position: -200% 0; } }

/* ════════ Módulos extras (tudo ON) ════════ */
.info-card {
  background: #fff; border-radius: 14px; padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow); margin-bottom: .75rem;
}
.info-card h3 { font-size: 1rem; color: var(--navy); margin: 0 0 .55rem; font-weight: 800; }
.info-p { font-size: .9rem; line-height: 1.5; color: #1f2937; margin: 0 0 .55rem; font-weight: 500; }
.info-p.muted, .info-p.muted { color: #6b7280; font-weight: 400; font-size: .82rem; }

.status-list {
  background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
}
.status-row {
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  padding: .85rem 1rem; border-bottom: 1px solid #eef0f3; font-size: .88rem;
}
.status-row:last-child { border-bottom: 0; }
.status-row span { color: #6b7280; font-weight: 500; flex-shrink: 0; }
.status-row b { color: #111827; font-weight: 700; text-align: right; word-break: break-word; }

.msg-card {
  background: #fff; border-radius: 14px; padding: 1rem 1.1rem; margin-bottom: .75rem;
  box-shadow: var(--shadow);
}
.msg-card h3 { font-size: .95rem; color: var(--navy); margin: 0 0 .4rem; font-weight: 800; }
.msg-card p { font-size: .88rem; color: #374151; margin: 0; line-height: 1.45; font-weight: 500; }
.msg-when { font-size: .72rem; color: #9ca3af; font-weight: 600; margin-bottom: .35rem; text-transform: uppercase; letter-spacing: .03em; }

.perfil-head { text-align: center; padding: .5rem 0 1.1rem; }
.perfil-foto {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover; margin: 0 auto .75rem;
  display: grid; place-items: center; background: #e8eef8; color: #0a2a5c;
  font-weight: 800; font-size: 1.5rem; border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(10,42,92,.15);
}
.perfil-foto.empty { display: grid; }
.perfil-head h2 { font-size: 1.1rem; color: var(--navy); margin: 0 0 .25rem; font-weight: 800; }
.perfil-head p { margin: 0; color: #6b7280; font-weight: 600; font-size: .9rem; }

.pref-list {
  background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
}
.pref-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 1rem 1.1rem; border-bottom: 1px solid #eef0f3; font-size: .92rem;
  font-weight: 600; color: #1f2937; cursor: pointer;
}
.pref-row:last-child { border-bottom: 0; }
.pref-row input[type=checkbox] {
  width: 22px; height: 22px; accent-color: #1351b4; flex-shrink: 0;
}

.rate-stars { display: flex; gap: .35rem; justify-content: center; margin: 1rem 0 .25rem; }
.rate-star {
  font-size: 2rem; line-height: 1; color: #d1d5db; background: transparent; border: 0;
  padding: .15rem; cursor: pointer; transition: color .15s, transform .12s;
}
.rate-star.on, .rate-star:hover { color: #f5c518; }
.rate-star:active { transform: scale(1.12); }

.btn-solid.full, .btn-outline.full { width: 100%; justify-content: center; }
.btn-solid:disabled, .btn-outline:disabled { opacity: .55; pointer-events: none; }

.sheet-card { max-height: 78vh; overflow: auto; text-align: left; }
.sheet-card p { margin-bottom: 1rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
)
