:root {
  --black: #050505;
  --panel: #111111;
  --line: #2c2c2c;
  --text: #f8f8f8;
  --muted: #b8b8b8;
  --paper: #f5f6f8;
  --ink: #161616;
  --accent: #009abb;
  --green: #21a67a;
  --red: #d84c4c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--black);
  color: var(--text);
  font-family: "Poppins", Arial, Helvetica, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 24px;
  scroll-margin-top: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0 28px;
}

.brand-logo {
  width: min(360px, 52vw);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 38px rgba(0, 154, 187, 0.24));
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 900;
}

.reg-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 10px 14px;
  text-decoration: none;
  white-space: nowrap;
}

.reg-badge:hover {
  border-color: var(--accent);
  color: #fff;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

a.topbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.main-flow {
  display: grid;
  gap: 20px;
}

.analysis-panel,
.history-section {
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.section-heading {
  margin-bottom: 26px;
}

.section-heading h2,
.history-section h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 2.2rem);
  font-weight: 900;
}

.analysis-form {
  display: grid;
  gap: 18px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: grid;
  gap: 12px;
  min-height: 142px;
  padding: 18px;
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  background: #fff;
}

.field-wide {
  min-height: 132px;
}

.field span,
.metric-card span,
.status-card span {
  color: #303030;
  font-size: 1.05rem;
  font-weight: 800;
}

.field input,
.field select {
  width: 100%;
  border: 0;
  outline: 0;
  color: #060606;
  background: transparent;
  font-size: clamp(1.28rem, 3vw, 2rem);
  font-weight: 900;
}

.field input[readonly] {
  color: #555;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 52px;
  border-radius: 8px;
  border: 0;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

.analysis-submit {
  font-size: 1.12rem;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.secondary-button {
  border: 1px solid #d0d0d0;
  background: #fff;
  color: #111;
}

.ghost-button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: #fff;
}

.alert {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #fff4e8;
  color: #7a3600;
  font-weight: 700;
}

.alert--success {
  background: #e8f8f2;
  color: #145c3e;
}

.alert--info {
  background: #e8f4fb;
  color: #0a4a6b;
}

.results,
.expected-section {
  margin-top: 28px;
}

.results h3,
.expected-section h3 {
  font-size: 1.45rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.metric-card,
.status-card {
  display: grid;
  gap: 20px;
  min-height: 142px;
  padding: 18px;
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  background: #fff;
}

.metric-card strong,
.status-card strong {
  font-size: clamp(1.25rem, 3vw, 2rem);
}

.status-card {
  margin-top: 18px;
}

.status-card.conforme {
  border-color: rgba(33, 166, 122, 0.7);
}

.status-card.nao-conforme {
  border-color: rgba(216, 76, 76, 0.75);
}

.expected-box {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #d5d5d5;
}

.expected-box dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
}

.expected-box dt {
  color: #555;
  font-size: 0.9rem;
  font-weight: 800;
}

.expected-box dd {
  margin: 2px 0 0;
  font-weight: 600;
}

.expected-box strong {
  font-weight: 800;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.two-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.volume-panel {
  border: 2px solid rgba(255, 106, 42, 0.26);
}

.compact-results {
  margin-top: 22px;
}

.history-section {
  margin-top: 20px;
}

.history-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}

.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1400px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid #e8e8e8;
  text-align: left;
  vertical-align: top;
}

th {
  background: #101010;
  color: #fff;
  font-size: 0.82rem;
}

td {
  color: #222;
}

@media (max-width: 900px) {
  .app-shell {
    padding: 16px;
  }

  .topbar,
  .history-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .reg-badge {
    white-space: normal;
  }

  .field-grid,
  .result-grid,
  .action-row,
  .two-actions {
    grid-template-columns: 1fr;
  }

  .analysis-panel,
  .history-section {
    padding: 18px;
  }
}

@media print {
  body {
    background: #fff;
    color: #111;
  }

  .topbar,
  .analysis-form,
  .action-row,
  .history-actions {
    display: none;
  }

  .app-shell {
    padding: 0;
  }

  .analysis-panel,
  .history-section {
    box-shadow: none;
    border-radius: 0;
  }
}

/* ===== TELA DE LOGIN ===== */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 24px;
  position: fixed;
  inset: 0;
  z-index: 999;
  overflow-y: auto;
}

.login-screen[hidden] {
  display: none !important;
}

.login-card {
  background: var(--black);
  color: var(--text);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 40px 36px;
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
}

.login-card h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 900;
  text-align: center;
  color: var(--text);
}

.login-card .brand-logo {
  width: min(280px, 80%);
  margin: 0 auto;
  display: block;
}

.login-input {
  width: 100%;
  min-height: 52px;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 1rem;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

.login-input:focus {
  border-color: var(--accent);
}

/* ===== TELA DE ACEITE DOS TERMOS =====
   Reaproveita .login-screen, .login-card e .primary-button. O que segue é só
   o checkbox e o texto com links dentro do label. */
.accept-terms-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

.accept-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  cursor: pointer;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Alvo de toque confortável no celular sem inflar a altura da linha de texto. */
.accept-check input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.accept-check a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
}

.accept-check a:hover {
  opacity: 0.85;
}

/* ===== TOGGLE TIPO DE LOGIN ===== */
.login-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  overflow: hidden;
}

.toggle-btn {
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.toggle-btn--active {
  background: var(--accent);
  color: #fff;
}

/* ===== CAMPO DOCUMENTO (CPF/CNPJ) ===== */
.documento-wrap {
  position: relative;
  width: 100%;
}

.documento-wrap .login-input {
  padding-right: 70px;
}

.documento-tipo {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  pointer-events: none;
  letter-spacing: 0.04em;
}

/* ===== CAMPO SENHA (botão olhinho) ===== */
/* Mesmo esquema do .documento-wrap: wrapper relative + elemento posicionado
   à direita + padding-right no input. */
.senha-wrap {
  position: relative;
  width: 100%;
}

.senha-wrap .login-input {
  padding-right: 48px;
}

.senha-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
}

.senha-toggle:hover,
.senha-toggle:focus-visible {
  color: var(--accent);
}

.senha-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Link discreto abaixo dos botões */
.login-signup-link {
  margin: 4px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Botão que parece link */
.link-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-size: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-button:hover {
  color: #fff;
}

/* ===== TELA DE CONFIRMAÇÃO DE E-MAIL ===== */
.confirm-icon {
  display: flex;
  justify-content: center;
  color: var(--accent);
  margin: 4px 0;
}

.confirm-text {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.confirm-text strong {
  color: var(--text);
  font-weight: 700;
  word-break: break-all;
}

#editEmailSection {
  display: grid;
  gap: 10px;
  width: 100%;
}

.confirm-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.confirm-links-divider {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ===== BANNER DE STATUS DE CONEXÃO ===== */
.connection-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  background: #8a1c1c;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
}

.connection-banner[hidden] {
  display: none !important;
}

.connection-banner svg {
  flex-shrink: 0;
}

.connection-banner svg[hidden] {
  display: none !important;
}

.connection-banner--online {
  background: var(--green);
}

/* ===== BANNER DE INSTALAÇÃO DO PWA ===== */
.install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 48px 16px 18px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  background: var(--panel);
  color: var(--text);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.4);
}

.install-banner[hidden] {
  display: none !important;
}

.install-banner-icon {
  flex-shrink: 0;
  color: var(--accent);
}

.install-banner-text {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
}

.install-banner-btn {
  min-height: 44px;
  white-space: nowrap;
  flex-shrink: 0;
}

.install-banner-btn[hidden] {
  display: none !important;
}

.install-banner-close {
  position: absolute;
  top: 6px;
  right: 8px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
}

.install-banner-close:hover {
  color: #fff;
}

/* ===== MODAL DE SALVAR ANÁLISE ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-card {
  background: var(--black);
  color: var(--text);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 32px 28px;
  width: min(420px, 100%);
  display: grid;
  gap: 20px;
}

.modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
  text-align: center;
}

.modal-field {
  display: grid;
  gap: 8px;
}

.modal-field span {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

/* ===== BOAS-VINDAS AO TRIAL =====
   Reaproveita .modal-overlay como fundo. Card informativo: mais leve que a
   tela de aceite (sem checkbox), com o ciano só no ícone e no botão. */
.trial-welcome-card {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 32px 28px;
  width: min(440px, 100%);
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.trial-welcome-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 154, 187, 0.14);
  border: 1px solid rgba(0, 154, 187, 0.45);
  color: var(--accent);
}

.trial-welcome-title {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 900;
  line-height: 1.3;
}

.trial-welcome-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.trial-welcome-card .primary-button {
  width: 100%;
  margin-top: 4px;
}

/* ===== LAYOUT COM SIDEBAR ===== */

.app-layout {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.sidebar-logo {
  width: 130px;
  height: auto;
  object-fit: contain;
}

.sidebar-close-btn {
  display: none;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  gap: 2px;
}

.sidebar-footer {
  border-top: 1px solid var(--line);
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 20px;
  background: none;
  border: none;
  border-radius: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}

.nav-item[hidden] {
  display: none !important;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.nav-item--active {
  background: rgba(0, 154, 187, 0.18);
  color: var(--accent);
}

.nav-item svg {
  flex-shrink: 0;
}

/* Content area */
.app-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* Mobile topbar (hidden on desktop) */
.mob-topbar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.hamburger-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  line-height: 1;
}

.mob-topbar-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.mob-topbar-anp {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

/* App main */
.app-main {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Pages */
.page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.page[hidden] {
  display: none !important;
}

/* ===== PAGE: ANÁLISES ===== */

.page-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.toolbar-search-input {
  flex: 1;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--black);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
}

.toolbar-search-input:focus {
  border-color: var(--accent);
}

.toolbar-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.toolbar-btns .secondary-button,
.toolbar-btns .ghost-button {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.85rem;
}

.analises-table-wrap {
  flex: 1;
  overflow: auto;
  min-height: 0;
}

.analises-table-wrap table {
  min-width: 1100px;
  border-radius: 0;
}

.history-row {
  cursor: pointer;
  transition: background 0.1s;
}

.history-row:hover {
  background: #e8f6fc;
}

.history-row.row--selected {
  background: #c5e8f5;
}

.page-fab {
  display: flex;
  justify-content: center;
  padding: 16px;
  border-top: 1px solid #e8e8e8;
  background: var(--paper);
  flex-shrink: 0;
}

/* ===== ACTION BAR ===== */

.action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.action-bar[hidden] {
  display: none !important;
}

.action-bar-label {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-bar-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.action-bar-btns .primary-button,
.action-bar-btns .secondary-button,
.action-bar-btns .ghost-button {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.85rem;
}

/* ===== PAGE: NOVA ANÁLISE ===== */

#page-nova-analise {
  overflow-y: auto;
}

.page-inner {
  padding: 24px;
  display: grid;
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
}

/* ===== PAGE: DETALHES ===== */

#page-detalhes {
  overflow: hidden;
}

.details-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.details-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text);
}

.details-topbar .ghost-button {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.details-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.details-card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.details-card h3 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
}

.details-card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 20px;
  margin: 0;
}

.details-card dt {
  font-size: 0.85rem;
  font-weight: 700;
  color: #555;
  white-space: nowrap;
}

.details-card dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.details-card p {
  margin: 12px 0 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.details-card--conforme {
  border: 2px solid rgba(33, 166, 122, 0.5);
}

.details-card--nao-conforme {
  border: 2px solid rgba(216, 76, 76, 0.5);
}

.details-status-text {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 !important;
}

.details-export-row {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  flex-shrink: 0;
}

/* ===== PLACEHOLDER PAGES ===== */

.page-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1;
  padding: 40px 24px;
  color: var(--muted);
  text-align: center;
}

.page-placeholder p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.page-placeholder-sub {
  font-size: 0.9rem !important;
  font-weight: 400 !important;
  color: var(--muted) !important;
  max-width: 380px;
}

/* ===== MOBILE (≤ 900px) ===== */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .sidebar--open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
  }

  .sidebar-close-btn {
    display: flex;
    align-items: center;
  }

  .mob-topbar {
    display: flex;
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.5);
  }

  .sidebar-overlay[hidden] {
    display: none !important;
  }

  .page-inner {
    padding: 16px;
  }

  .details-content {
    padding: 14px;
  }

  .page-toolbar {
    flex-wrap: wrap;
  }

  .toolbar-search-input {
    min-width: 0;
  }

  .toolbar-btns {
    width: 100%;
    justify-content: flex-end;
  }

  .action-bar {
    flex-wrap: wrap;
  }

  .action-bar-btns {
    flex-wrap: wrap;
  }

  .details-export-row {
    flex-direction: column;
  }

  .field-grid,
  .result-grid,
  .action-row,
  .two-actions {
    grid-template-columns: 1fr;
  }

  .analysis-panel,
  .history-section {
    padding: 18px;
  }
}

/* ===== LIXEIRA ===== */

.trash-container {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.trash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.trash-header-count {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
}

.trash-header .ghost-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.trash-list {
  list-style: none;
  margin: 0;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trash-item {
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.trash-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.trash-item-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trash-item-code {
  font-size: 0.72rem;
  font-weight: 700;
  color: #888;
  white-space: nowrap;
}

.trash-item-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #161616;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trash-item-fuel {
  font-size: 0.82rem;
  color: #555;
}

.trash-item-date {
  font-size: 0.78rem;
  color: #888;
}

.trash-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.trash-countdown {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--red);
  white-space: nowrap;
}

.trash-item-actions {
  display: flex;
  gap: 6px;
}

.trash-item-actions .secondary-button,
.trash-item-actions .ghost-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  /* No celular os 5 botões não cabem em uma linha. O flex-wrap sozinho não
     resolvia: com flex-shrink: 0 a caixa fica travada na largura max-content
     dos botões, então ela transbordava a tela em vez de quebrar (a Lixeira
     ficava fora da área visível, sem rolagem que a alcançasse). Dando largura
     definida e permitindo encolher, os botões quebram em 2 por linha. */
  .action-bar-btns {
    width: 100%;
    flex-shrink: 1;
  }

  .action-bar-btns button {
    flex: 1 1 calc(50% - 4px);
    min-height: 44px;
  }

  .trash-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .trash-item-right {
    align-items: flex-start;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ===== RELATÓRIOS ===== */

.relatorios-filters {
  padding: 14px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 140px;
  flex: 1;
}

.filter-field--wide {
  min-width: 220px;
  flex: 2;
}

.filter-field span {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--black);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  outline: none;
  color-scheme: dark;
}

.filter-input:focus {
  border-color: var(--accent);
}

.relatorios-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.relatorios-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-card--conforme {
  border-left: 4px solid var(--green);
}

.stat-card--nao-conforme {
  border-left: 4px solid var(--red);
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
}

.stat-pct {
  font-size: 0.88rem;
  font-weight: 700;
  color: #666;
}

.relatorios-charts {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 12px;
}

.chart-card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
  padding: 16px;
}

.chart-title {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #777;
}

.chart-wrap {
  position: relative;
  height: 260px;
}

.chart-wrap--pie {
  height: 240px;
}

.relatorios-table-section {
  background: var(--paper);
  border-radius: 8px;
  overflow: hidden;
}

.relatorios-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
}

.relatorios-count {
  font-size: 0.88rem;
  font-weight: 700;
  color: #666;
}

.relatorios-export-btns {
  display: flex;
  gap: 8px;
}

.relatorios-export-btns .secondary-button {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.82rem;
}

.relatorios-table-wrap {
  overflow-x: auto;
}

.relatorios-table-wrap table {
  min-width: 1100px;
  border-radius: 0;
}

@media (max-width: 900px) {
  .filter-field,
  .filter-field--wide {
    min-width: calc(50% - 6px);
    flex: none;
    width: calc(50% - 6px);
  }

  .relatorios-body {
    padding: 12px;
    gap: 12px;
  }

  .relatorios-stats {
    grid-template-columns: 1fr 1fr;
  }

  .stat-card:first-child {
    grid-column: 1 / -1;
  }

  .relatorios-charts {
    grid-template-columns: 1fr;
  }

  .relatorios-results-header {
    flex-wrap: wrap;
  }

  .relatorios-export-btns {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ===== MEU PERFIL ===== */

.perfil-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.perfil-card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.perfil-card h3 {
  margin: 0 0 16px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
}

.perfil-card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 20px;
  margin: 0 0 20px;
}

.perfil-card dt {
  font-size: 0.85rem;
  font-weight: 700;
  color: #555;
  white-space: nowrap;
  align-self: center;
}

.perfil-card dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #161616;
  word-break: break-all;
  align-self: center;
}

.perfil-docs-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.perfil-docs-list li + li {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.perfil-doc-link {
  display: block;
  padding: 10px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.perfil-doc-link:hover,
.perfil-doc-link:focus-visible {
  text-decoration: underline;
}

.perfil-plano-badge {
  display: inline-block;
  background: rgba(0, 154, 187, 0.12);
  color: var(--accent);
  border: 1px solid rgba(0, 154, 187, 0.35);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 900px) {
  .perfil-content {
    padding: 16px;
  }
}

/* ===== MODAL DE SUPORTE ===== */

.suporte-modal-box {
  max-width: 400px;
  width: 90%;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.suporte-modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
}

.suporte-modal-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.suporte-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.suporte-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  transition: opacity 0.15s;
}

.suporte-link:hover {
  opacity: 0.85;
}

.suporte-link span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.suporte-link strong {
  font-size: 0.95rem;
}

.suporte-link small {
  font-size: 0.78rem;
  font-weight: 400;
  opacity: 0.75;
}

.suporte-link--email {
  background: #f0f4ff;
  color: #1a4fcc;
}

.suporte-link--whatsapp {
  background: #f0fdf4;
  color: #15803d;
}

/* ===== Registro de Análise - RAQ (Modelo 6) ===== */

#page-registro-analise {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.raq-content {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 24px;
}

.raq-legal {
  margin: 0 0 18px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.raq-section {
  margin-bottom: 22px;
}

.raq-section-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 900;
  color: var(--text);
}

.raq-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.raq-field {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.raq-field--wide,
.raq-span-2 {
  grid-column: span 2;
}

.raq-field span {
  font-size: 0.78rem;
  font-weight: 800;
  color: #303030;
}

.raq-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #060606;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 700;
}

/* O travamento e aplicado dinamicamente por setRaqLocked() (classe raq-locked).
   As variantes --locked/[readonly] cobrem campos travados direto no markup. */
.raq-field input.raq-locked,
.raq-field--locked input,
.raq-field input[readonly] {
  color: #5a5a5a;
}

.raq-field:has(input.raq-locked),
.raq-field:has(input[readonly]),
.raq-field--locked {
  background: #eef0f2;
}

.raq-note {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: #6b6b6b;
}

@media (max-width: 980px) {
  .raq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .raq-field--wide,
  .raq-span-2 {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .raq-grid {
    grid-template-columns: 1fr;
  }

  .raq-field--wide,
  .raq-span-2 {
    grid-column: span 1;
  }
}

/* ============================================================ */
/* ===== SISTEMA DE PLANOS E PAYWALL ========================== */
/* ============================================================ */

/* ----- Toast reutilizável ----- */
.plan-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  z-index: 4000;
  max-width: min(90vw, 420px);
  background: #1b1b1b;
  color: var(--text);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  text-align: center;
}
.plan-toast--show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ----- Bloqueio de PÁGINA INTEIRA ----- */
.page-locked {
  position: relative;
}
/* Nunca esconde por remoção: o conteúdo é ocultado só visualmente e coberto. */
.page-locked > :not(.plan-lock-overlay) {
  display: none !important;
}
.plan-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.02) 12px,
    rgba(255, 255, 255, 0.04) 12px,
    rgba(255, 255, 255, 0.04) 24px
  ), #171717;
}
.plan-lock-box {
  max-width: 420px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: var(--shadow);
}
.plan-lock-icon {
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(184, 184, 184, 0.12);
  color: var(--muted);
}
.plan-lock-overlay--expired .plan-lock-icon {
  background: rgba(216, 76, 76, 0.14);
  color: var(--red);
}
.plan-lock-text {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.45;
}
.plan-lock-cta {
  min-width: 180px;
}

/* ----- Bloqueio de ELEMENTO (botões salvar/exportar) ----- */
.plan-locked-el {
  position: relative;
  opacity: 0.55;
  filter: grayscale(0.6);
}
.plan-lock-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3a3a3a;
  color: #fff;
  border: 2px solid var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}


/* ----- Perfil: extras do plano ----- */
.perfil-plano-trial {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
}
.perfil-plano-link {
  margin-left: 6px;
}

/* ============================================================ */
/* ===== TELA DE PLANOS ======================================= */
/* ============================================================ */
.planos-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 20px 40px;
}
.planos-header {
  text-align: center;
  margin-bottom: 24px;
}
.planos-title {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 900;
}
.planos-sub {
  margin: 0;
  color: var(--muted);
}
.planos-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 360px));
  gap: 20px;
  justify-content: center;
  align-items: start;
}
.plano-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.plano-card--destaque {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.plano-flag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.plano-card-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}
.plano-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 900;
}
.plano-cycle-toggle {
  display: inline-flex;
  background: var(--black);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.plano-cycle-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.plano-cycle-btn--active {
  background: var(--accent);
  color: #fff;
}
.plano-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.plano-price-value {
  font-size: 2rem;
  font-weight: 900;
}
.plano-price-cycle {
  color: var(--muted);
  font-weight: 700;
}
.plano-free-badge {
  background: rgba(33, 166, 122, 0.14);
  color: var(--green);
  border: 1px solid rgba(33, 166, 122, 0.4);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.76rem;
  font-weight: 800;
}
.plano-free-badge[hidden] {
  display: none;
}
.plano-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plano-feature {
  position: relative;
  padding-left: 26px;
  font-size: 0.92rem;
  line-height: 1.35;
}
.plano-feature::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 900;
}
.plano-feature--on {
  color: var(--text);
}
.plano-feature--on::before {
  content: "✓";
  color: var(--green);
}
.plano-feature--off {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(184, 184, 184, 0.5);
}
.plano-feature--off::before {
  content: "✕";
  color: var(--muted);
  text-decoration: none;
}
.plano-assinar {
  margin-top: auto;
}
.planos-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  margin: 24px 0 0;
}

@media (max-width: 760px) {
  .planos-grid {
    grid-template-columns: minmax(0, 420px);
  }
}

/* ===== TUTORIAL DE INSTALAÇÃO ===== */

.tutorial-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 20px 40px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.tutorial-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1.5rem;
}

.tutorial-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.2s ease;
}

.tutorial-block--highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 154, 187, 0.25);
}

.tutorial-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tutorial-icon {
  font-size: 1.2rem;
}

.tutorial-steps {
  padding-left: 1.25rem;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tutorial-steps li {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.tutorial-video-wrapper {
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 9 / 16;
  max-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tutorial-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.tutorial-note {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
}

/* ===== SOBRE NÓS ===== */

.sobre-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 20px 40px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.sobre-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1rem;
}

.sobre-texto {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 1.75rem;
}

.sobre-identidade {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
  margin: 0 0 1.75rem;
}

.sobre-identidade-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.sobre-identidade-foto {
  flex: 0 0 auto;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--line);
  border: 1px solid var(--line);
}

.sobre-identidade-info {
  min-width: 0;
}

.sobre-identidade-nome {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.2rem;
}

.sobre-identidade-papel {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--accent);
  margin: 0;
}

.sobre-identidade-bio {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 1rem 0 0;
}

.sobre-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .sobre-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sobre-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sobre-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 154, 187, 0.18);
}

.sobre-card--soon {
  opacity: 0.6;
}

.sobre-card--soon:hover {
  border-color: var(--line);
  box-shadow: none;
}

.sobre-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(0, 154, 187, 0.12);
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.sobre-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.4rem;
}

.sobre-card-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 1.1rem;
}

.sobre-card-btn {
  margin-top: auto;
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: filter 0.2s ease;
}

.sobre-card-btn:hover {
  filter: brightness(1.12);
}

.sobre-card-btn--disabled {
  background: var(--line);
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

.sobre-card-btn--disabled:hover {
  filter: none;
}

.sobre-livro {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sobre-livro:hover,
.sobre-livro:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 154, 187, 0.18);
}

.sobre-livro-capa {
  flex: 0 0 auto;
  width: 46px;
  height: 62px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--line);
}

.sobre-livro-info {
  flex: 1;
  min-width: 0;
}

.sobre-livro-titulo {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.sobre-livro-sub {
  display: block;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.sobre-livro-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

/* ===== PÁGINA DE CONFIGURAÇÕES ===== */
/* Segue o mesmo padrão de container das outras páginas (ver .sobre-container):
   rolagem própria, largura máxima e centralizado. */

.settings-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 20px 40px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.settings-group {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  margin-bottom: 18px;
}

.settings-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  padding: 12px 14px 8px;
}

/* Texto dos grupos ainda sem funcionalidade (Lembretes e Segurança). */
.settings-empty {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
  padding: 2px 14px 12px;
  opacity: 0.75;
}

/* Linha clicável. Vale para <button> e para <a> — daí o reset de aparência. */
.settings-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  background: none;
  border: none;
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.settings-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.settings-item:active {
  background: rgba(255, 255, 255, 0.08);
}

.settings-item-icon {
  flex: 0 0 auto;
  color: var(--accent);
}

/* Empurra o chevron para a direita da linha. */
.settings-item-label {
  flex: 1;
  min-width: 0;
}

.settings-item-chevron {
  flex: 0 0 auto;
  color: var(--muted);
  opacity: 0.6;
}

.settings-item--danger,
.settings-item--danger .settings-item-icon {
  color: var(--red);
}

.settings-item--danger:hover {
  background: rgba(216, 76, 76, 0.1);
}

/* Suporte: linha informativa, não navega para lugar nenhum. */
.settings-support {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
}

.settings-support-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted);
  word-break: break-word;
}

.settings-support-text a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.settings-support-text a:hover {
  text-decoration: underline;
}

.settings-version {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin: 0;
  padding: 14px 14px 10px;
  opacity: 0.7;
}

/* REG-003: nota de rodape das linhas de conferencia do laudo */
.details-nota {
  display: block;
  font-size: 0.78rem;
  color: var(--muted, #6b7280);
  line-height: 1.35;
  margin-top: 2px;
}
