body {
  margin: 0;
  font-family: "Quicksand", "Segoe UI", sans-serif;
  font-size: 16px;
  color: #1a2b4a;
  background: #f4f7fb;
}

#menu,
#app {
  margin: 0;
  line-height: 1.5;
}

.dh-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.dh-brand {
  font-weight: 700;
  color: #0d6efd;
  text-decoration: none;
}

.dh-shell {
  display: block;
}

.dh-sidebar {
  display: none;
}

.dh-page {
  width: min(1120px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.dh-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.dh-card,
.certidao-card,
.service-card .card-inner {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.dh-card {
  padding: 24px;
}

.dh-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: #0d6efd;
  text-align: center;
}

.dh-lead {
  color: #64748b;
  text-align: center;
  margin-bottom: 20px;
}

.dh-field,
.form-control-lg {
  min-height: 52px;
  border-radius: 12px;
}

.dh-btn,
.btn-primary {
  border-radius: 12px;
  font-weight: 700;
  min-height: 48px;
}

.dh-alert {
  border-radius: 12px;
}

.dh-family {
  margin-top: 28px;
}

.dh-family h2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

@media (min-width: 720px) {
  .dh-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .dh-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 57px);
  }

  .dh-sidebar {
    display: block;
    background: #0f172a;
    color: #fff;
    padding: 20px 12px;
  }

  .dh-sidebar a {
    display: block;
    color: #e2e8f0;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 10px;
  }

  .dh-sidebar a:hover,
  .dh-sidebar a.active {
    background: rgba(255, 255, 255, 0.08);
  }

  .dh-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

#pdfViewer,
#pdfCard iframe {
  width: 100%;
  height: 80vh;
  border: none;
  border-radius: 12px;
  background: #fff;
  display: block;
  margin-bottom: 16px;
}

.city-crest {
  display: block;
  width: 84px;
  height: auto;
  max-height: 96px;
  margin: 0 auto 14px;
  object-fit: contain;
}

.service-screen {
  width: 100%;
  max-width: 520px;
  margin: 24px auto 48px;
  padding: 0 16px;
  box-sizing: border-box;
}

.service-screen .city-crest,
.service-screen .certidao-card .city-crest {
  width: 148px;
  max-height: 168px;
  margin-bottom: 8px;
}

.service-screen .dh-card,
.service-screen .certidao-card {
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.card-title {
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  line-height: 1.25;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: anywhere;
  margin: 14px 8px 0;
}

.card-text {
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
  margin: 8px 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.service-icon {
  font-size: clamp(2rem, 5vw, 2.6rem);
  line-height: 1;
}

@media (max-width: 600px) {
  .service-card {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
  }
}
