.siged-help-launcher {
  position: fixed;
  right: max(76px, calc(env(safe-area-inset-right) + 76px));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 24990;
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #1f6855;
  color: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
  font-size: 1.35rem;
  font-weight: 900;
  cursor: pointer;
}

.siged-help-modal {
  position: fixed;
  inset: 0;
  z-index: 26000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 15, 24, .82);
  backdrop-filter: blur(4px);
}

.siged-help-dialog {
  width: min(1120px, 100%);
  max-height: min(920px, 94dvh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  color: var(--text, #172b38);
  background: var(--card, #fff);
  border: 1px solid var(--border, #dce4e8);
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .42);
}

.siged-help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 17px 20px;
  color: #fff;
  background: linear-gradient(135deg, #173b5e, #1f6855 68%, #a97d1e);
}

.siged-help-header h2,
.siged-help-header p {
  margin: 0;
}

.siged-help-header p {
  margin-top: 3px;
  font-size: .84rem;
  opacity: .88;
}

.siged-help-close {
  min-width: 44px;
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 11px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
}

.siged-help-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.siged-help-sidebar {
  min-width: 0;
  overflow: auto;
  padding: 14px;
  border-right: 1px solid var(--border, #dce4e8);
  background: var(--input, #f7f9fa);
}

.siged-help-search {
  width: 100%;
  min-height: 44px;
  margin: 0 0 10px;
}

.siged-help-list {
  display: grid;
  gap: 5px;
}

.siged-help-item {
  width: 100%;
  min-height: 44px;
  padding: 10px 11px;
  text-align: left;
  color: var(--text, #172b38);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
}

.siged-help-item:hover {
  background: rgba(31, 104, 85, .09);
}

.siged-help-item.active {
  color: #fff;
  background: #1f6855;
  border-color: #1f6855;
}

.siged-help-content {
  min-width: 0;
  overflow: auto;
  padding: 22px;
}

.siged-help-hero {
  padding: 18px;
  color: #fff;
  background: linear-gradient(135deg, #173b5e, #2e6573);
  border-radius: 17px;
}

.siged-help-hero h3 {
  margin: 0 0 6px;
  font-size: 1.42rem;
}

.siged-help-hero p {
  margin: 0;
  line-height: 1.55;
  opacity: .92;
}

.siged-help-section {
  margin-top: 17px;
  padding: 17px;
  border: 1px solid var(--border, #dce4e8);
  border-radius: 15px;
  background: var(--card, #fff);
}

.siged-help-section h4 {
  margin: 0 0 11px;
  color: var(--primary, #173b5e);
}

.siged-help-section ol,
.siged-help-section ul {
  margin: 0;
  padding-left: 22px;
}

.siged-help-section li {
  margin: 8px 0;
  line-height: 1.5;
}

.siged-help-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.siged-help-role {
  padding: 11px;
  border-left: 4px solid #b58b28;
  border-radius: 10px;
  background: var(--input, #f5f8f9);
}

.siged-help-role strong {
  display: block;
  margin-bottom: 3px;
}

.siged-help-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 17px;
}

.siged-help-actions button {
  min-height: 44px;
}

.siged-help-note {
  margin-top: 15px;
  padding: 12px;
  border-left: 4px solid #b58b28;
  border-radius: 10px;
  color: #493a13;
  background: #fff7d8;
}

body.modo-kiosco-visitas .siged-help-launcher {
  display: none !important;
}

.siged-help-faq details {
  padding: 10px 0;
  border-bottom: 1px solid var(--border, #dce4e8);
}

.siged-help-faq details:last-child {
  border-bottom: 0;
}

.siged-help-faq summary {
  cursor: pointer;
  font-weight: 800;
}

.siged-help-faq p {
  margin: 8px 0 0;
  line-height: 1.5;
  color: var(--muted, #637582);
}

.siged-help-empty {
  padding: 35px 10px;
  text-align: center;
  color: var(--muted, #637582);
}

html.siged-high-contrast .siged-help-dialog,
html.siged-high-contrast .siged-help-sidebar,
html.siged-high-contrast .siged-help-content,
html.siged-high-contrast .siged-help-section,
html.siged-high-contrast .siged-help-role {
  color: #fff !important;
  background: #000 !important;
  border-color: #fff !important;
}

html.siged-high-contrast .siged-help-note {
  color: #000 !important;
  background: #ffdf00 !important;
}

html.siged-high-contrast .siged-help-faq p {
  color: #fff !important;
}

@media (max-width: 760px) {
  .siged-help-modal {
    align-items: end;
    padding: 0;
  }

  .siged-help-dialog {
    max-height: 96dvh;
    border-radius: 18px 18px 0 0;
  }

  .siged-help-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .siged-help-sidebar {
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--border, #dce4e8);
  }

  .siged-help-list {
    display: flex;
    width: max-content;
    max-width: none;
  }

  .siged-help-item {
    width: auto;
    white-space: nowrap;
  }

  .siged-help-content {
    padding: 14px;
  }

  .siged-help-role-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .siged-help-launcher {
    right: max(70px, calc(env(safe-area-inset-right) + 70px));
    bottom: max(10px, env(safe-area-inset-bottom));
  }

  .siged-help-header {
    padding: 13px 14px;
  }

  .siged-help-header p {
    display: none;
  }
}

@media print {
  body.siged-help-print > :not(.siged-help-modal) {
    display: none !important;
  }

  body.siged-help-print .siged-help-modal {
    position: static;
    display: block;
    padding: 0;
    background: #fff;
  }

  body.siged-help-print .siged-help-dialog {
    width: 100%;
    max-height: none;
    display: block;
    color: #000;
    background: #fff;
    border: 0;
    box-shadow: none;
  }

  body.siged-help-print .siged-help-header,
  body.siged-help-print .siged-help-sidebar,
  body.siged-help-print .siged-help-actions {
    display: none !important;
  }

  body.siged-help-print .siged-help-content {
    overflow: visible;
  }
}
