*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --navy: #1e3a5f;
  --navy-title: #243b53;
  --text-muted: #627d98;
  --text-body: #486581;
  --border: #d9e2ec;
  --info-bg: #e8f4fc;
  --info-text: #2c5282;
  --btn-bg: #0055a4;
  --btn-bg-hover: #003d78;
  --trust-green: #059669;
  --card-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --radius: 12px;
  --gov-letter-blue: #0055a4;
  --gov-letter-yellow: #ffcd00;
  --gov-letter-green: #00843d;
  --gov-blue: #003d78;
  --gov-blue-nav: #0055a4;
  --gov-brand: #0055a4;
  --gov-footer-bg: #002d6e;
  --gov-footer-accent: #ffcc00;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-body);
  background-color: #f8fafc;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
}

.site-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-content {
  flex: 1;
}

/* Cabeçalho gov.br / DETRAN */
.gov-header {
  width: 100%;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.gov-header-top {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.gov-header-top-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.gov-brand {
  text-decoration: none;
  flex-shrink: 0;
}

.gov-logo-mark {
  width: 108px;
  height: 32px;
  display: block;
}

.gov-logo-text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gov-c-blue {
  fill: var(--gov-letter-blue);
}

.gov-c-yellow {
  fill: var(--gov-letter-yellow);
}

.gov-c-green {
  fill: var(--gov-letter-green);
}

.gov-header-divider {
  width: 1px;
  height: 36px;
  background: #d1d5db;
  flex-shrink: 0;
}

.gov-header-titles {
  flex: 1;
  min-width: 0;
}

.gov-header-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--gov-blue);
  line-height: 1.3;
}

.gov-header-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.3;
}

.gov-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.gov-icon-btn {
  border: none;
  background: transparent;
  color: #71717a;
  padding: 0.25rem;
  cursor: pointer;
  border-radius: 6px;
  line-height: 0;
}

.gov-icon-btn:hover {
  color: #52525b;
  background: #f4f4f5;
}

.gov-icon-bell {
  display: block;
}

.gov-user-btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: var(--gov-letter-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.gov-icon-user {
  display: block;
}

.gov-header-nav {
  background: var(--gov-blue-nav);
  color: #fff;
}

.gov-header-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 500;
}

.gov-header-nav a {
  color: #fff;
  text-decoration: none;
}

.gov-header-nav a:hover {
  text-decoration: underline;
}

.gov-header-nav span {
  opacity: 0.55;
  user-select: none;
}

/* Rodapé institucional */
.gov-footer {
  background: var(--gov-footer-bg);
  color: #fff;
  margin-top: auto;
}

.gov-footer-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 2rem;
  text-align: center;
}

.gov-footer-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.gov-footer-logo-wrap .gov-logo-mark {
  width: 118px;
  height: 34px;
}

.gov-logo-mark--footer .gov-f-white {
  fill: #ffffff;
}

.gov-logo-mark--footer .gov-f-yellow {
  fill: var(--gov-footer-accent);
}

.gov-footer-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.gov-footer-sub {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  opacity: 0.92;
}

.gov-footer-contact {
  margin: 1.25rem 0 0;
  font-size: 0.75rem;
  line-height: 1.6;
  opacity: 0.85;
}

.gov-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin-top: 1.25rem;
  font-size: 0.75rem;
}

.gov-footer-links a {
  color: #fff;
  text-decoration: none;
  opacity: 0.9;
}

.gov-footer-links a:hover {
  text-decoration: underline;
}

.gov-footer-rule {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 1.5rem 0 1rem;
}

.gov-footer-copy {
  margin: 0;
  font-size: 0.6875rem;
  opacity: 0.75;
}

@media (max-width: 640px) {
  .gov-header-divider {
    display: none;
  }

  .gov-header-top-inner {
    flex-wrap: wrap;
  }

  .gov-header-titles {
    order: 3;
    width: 100%;
    padding-top: 0.25rem;
  }
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--navy);
  text-decoration: underline;
}

.breadcrumb-current {
  color: #334e68;
  font-weight: 500;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 2rem 2rem 1.75rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.card-header h1 {
  margin: 0 0 0.75rem;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--navy-title);
  line-height: 1.35;
}

.lead {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.info-box {
  margin-top: 1.5rem;
  padding: 1rem 1.125rem;
  background: var(--info-bg);
  border-radius: 8px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--info-text);
}

.info-box strong {
  font-weight: 600;
}

.form-consulta {
  margin-top: 1.75rem;
}

.field-label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #243b53;
  margin-bottom: 0.5rem;
}

.field-input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #243b53;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field-input::placeholder {
  color: #9fb3c8;
}

.field-input:focus {
  outline: none;
  border-color: #7b93b3;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25);
}

.field-erro {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  color: #b91c1c;
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.9375rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--btn-bg);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover:not(:disabled) {
  background: var(--btn-bg-hover);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-icon {
  flex-shrink: 0;
}

.trust-badges {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--trust-green);
}

.trust-badges li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.trust-badges svg {
  stroke: currentColor;
  flex-shrink: 0;
}

.card-footer {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #eef2f6;
  text-align: center;
}

.card-footer p {
  margin: 0.25rem 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #829ab1;
}

.card-footer strong {
  font-weight: 600;
  color: #627d98;
}

.page-wide {
  max-width: 640px;
}

.card-wide {
  padding: 2rem 2rem 2.25rem;
}

.data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.5rem;
  margin-top: 1.5rem;
}

.data-grid-tight {
  margin-top: 1rem;
  gap: 1rem 1.25rem;
}

.data-field-full {
  grid-column: 1 / -1;
}

.data-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #829ab1;
  margin-bottom: 0.25rem;
}

.data-value {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #243b53;
  line-height: 1.4;
}

.text-danger {
  color: #dc2626 !important;
}

.infracao-box {
  margin-top: 1.75rem;
  padding: 1.25rem 1.25rem 1.125rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}

.infracao-title {
  margin: 0 0 0.25rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #243b53;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.warn-icon {
  color: #d97706;
  font-size: 1rem;
}

.quote-box {
  margin-top: 1.25rem;
  padding: 1rem 1.125rem;
  background: #f0f9ff;
  border-radius: 8px;
  font-size: 0.8125rem;
  color: #486581;
  line-height: 1.55;
}

.quote-box strong {
  display: block;
  color: #334e68;
  margin-bottom: 0.35rem;
}

.quote-muted {
  background: #f1f5f9;
}

.quote-text {
  margin: 0;
}

.quote-text em {
  display: block;
  margin-top: 0.35rem;
  font-style: italic;
  color: #627d98;
}

.alert-box {
  margin-top: 1rem;
  padding: 1rem 1.125rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.alert-warning {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #78350f;
}

.alert-warning ul {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
}

.alert-warning li {
  margin: 0.25rem 0;
}

.valores {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #eef2f6;
}

.valores-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.total-label {
  margin: 1.25rem 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #829ab1;
}

.total-value {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #059669;
}

.btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.9375rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--gov-letter-blue);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-action:hover {
  background: var(--gov-blue);
}

.btn-outline {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--gov-letter-blue);
  background: #fff;
  border: 2px solid var(--gov-letter-blue);
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

.btn-outline:hover {
  background: #eff6ff;
}

.page-erro {
  text-align: center;
  margin-top: 2rem;
}

.pix-valor-label {
  margin: 0.5rem 0 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #829ab1;
}

.pix-qr-caption {
  margin: 1rem 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #486581;
  text-align: center;
}

.pix-qr-box {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1.25rem;
  padding: 1rem;
  width: fit-content;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

.pix-qr-box img,
.pix-qr-box canvas {
  display: block;
  border-radius: 4px;
}

.pix-copy-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.pix-copy-row .field-input {
  flex: 1;
  font-size: 0.8125rem;
}

.btn-copy {
  flex-shrink: 0;
  padding: 0 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  cursor: pointer;
}

.btn-copy:hover {
  background: #dbeafe;
}

.pix-aviso {
  margin: 1rem 0 0;
  font-size: 0.75rem;
  color: #829ab1;
  line-height: 1.5;
}

.pix-status {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #2563eb;
  text-align: center;
}

@media (max-width: 480px) {
  .card {
    padding: 1.5rem 1.25rem;
  }

  .trust-badges {
    flex-direction: column;
    align-items: center;
  }

  .data-grid,
  .valores-row {
    grid-template-columns: 1fr;
  }
}
