/* Central de Ajuda — camada clara sobre o Mini App, sem visual neon. */

.screen-help {
  --help-page-bg: #ffffff;
  --help-card-bg: #f5f9fd;
  --help-card-bg-active: #ebf2fa;
  --help-card-border: #e6edf6;

  z-index: 40;
  padding: 0 !important;
  background: var(--help-page-bg);
  color: #1c1c1e;
  user-select: text;
  -webkit-user-select: text;
}
.screen-help .help-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--help-page-bg);
}
.help-top {
  position: sticky;
  top: 0;
  z-index: 2;
  flex: 0 0 auto;
  padding: calc(10px + var(--safe-top, 0px)) 16px 12px;
  background: #fff;
  border-bottom: 1px solid #efefef;
}
.help-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}
.help-back {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: #f3f3f4;
  color: #1c1c1e;
  cursor: pointer;
}
.help-back svg { width: 20px; height: 20px; }
.help-back:active { background: #e8e8ea; }
.help-top-title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 800;
  color: #1c1c1e;
  letter-spacing: -.02em;
}
.help-top-link {
  border: 0;
  background: none;
  color: var(--pink);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  padding: 8px 4px;
}
.help-progress {
  margin-top: 10px;
}
.help-progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: #8e8e93;
  font-size: 11px;
  font-weight: 700;
}
.help-progress-track {
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: #ececef;
}
.help-progress-track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--pink);
  transition: width .28s ease;
}
.help-body {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px calc(24px + var(--safe-bottom, 0px));
  background: var(--help-page-bg);
}
.help-step {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding-top: 8px;
  animation: help-in .22s ease;
}
body.animations-off .help-step { animation: none; }
@keyframes help-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: none; }
}

.help-hero h1 {
  margin: 4px 0 6px;
  font-family: var(--font-ui);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.15;
  color: #111;
}
.help-hero p {
  margin: 0 0 16px;
  color: #6e6e73;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.help-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 0 16px;
  height: 52px;
  border: 1px solid var(--help-card-border);
  border-radius: 14px;
  background: var(--help-card-bg);
  box-shadow: none;
}
.help-search svg { width: 18px; height: 18px; color: #8e8e93; flex: 0 0 auto; }
.help-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: #1c1c1e;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  outline: none;
}
.help-search input::placeholder { color: #a1a1a6; font-weight: 650; }

.help-section-label {
  margin: 0 0 8px 4px;
  color: #8e8e93;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* Lista agrupada — estilo TikTok / iOS Settings */
.help-list-group {
  margin-bottom: 20px;
}
.help-list-group + .help-list-group {
  margin-top: 4px;
}
.help-list {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: var(--help-card-bg);
  border: 1px solid var(--help-card-border);
  box-shadow: none;
}
.help-list-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--help-card-border);
  background: var(--help-card-bg);
  text-align: left;
  color: inherit;
  font-family: var(--font-ui);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s ease;
}
.help-list-item:last-child {
  border-bottom: 0;
}
.help-list-item:active {
  background: var(--help-card-bg-active);
}
.help-list-item.is-selected {
  background: rgba(255, 77, 154, .06);
}
.help-list-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 77, 154, .1);
  color: var(--pink);
}
.help-list-icon svg {
  width: 22px;
  height: 22px;
}
.help-list-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.help-list-copy strong {
  display: block;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.25;
  color: #1c1c1e;
  letter-spacing: -.01em;
}
.help-list-copy small {
  display: block;
  overflow: hidden;
  color: #8e8e93;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.help-list-go {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: #c7c7cc;
}
.help-list-go svg {
  width: 20px;
  height: 20px;
}

/* Cards legados — tickets e resultados */
.help-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--help-card-bg);
  border: 1px solid var(--help-card-border);
  box-shadow: none;
}
.help-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--help-card-border);
  border-radius: 0;
  background: var(--help-card-bg);
  box-shadow: none;
  text-align: left;
  color: inherit;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: background .12s ease;
}
.help-card:last-child {
  border-bottom: 0;
}
.help-card:active {
  background: var(--help-card-bg-active);
  transform: none;
}
.help-card.is-selected {
  background: rgba(255, 77, 154, .06);
}
.help-card-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 77, 154, .1);
  color: var(--pink);
}
.help-card-icon svg { width: 22px; height: 22px; }
.help-card-copy { flex: 1; min-width: 0; }
.help-card-copy strong {
  display: block;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.25;
  color: #1c1c1e;
}
.help-card-copy small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #8e8e93;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.help-card-go {
  width: 20px;
  height: 20px;
  color: #c7c7cc;
  flex: 0 0 auto;
}

.help-quick-action {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--help-card-border);
  border-radius: 16px;
  background: var(--help-card-bg);
  box-shadow: none;
  text-align: left;
  color: inherit;
  font-family: var(--font-ui);
  cursor: pointer;
}
.help-quick-action:active {
  background: var(--help-card-bg-active);
}
.help-quick-action .help-list-icon {
  background: rgba(59, 130, 246, .12);
  color: #2563eb;
}

.help-solution h2 {
  margin: 10px 0 8px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.2;
}
.help-solution > p {
  margin: 0 0 20px;
  color: #6e6e73;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}
.help-faq {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}
.help-faq details {
  border: 1px solid #efefef;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.help-faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.help-faq summary::-webkit-details-marker { display: none; }
.help-faq summary svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #8e8e93;
  transition: transform .18s ease;
}
.help-faq details[open] summary svg { transform: rotate(180deg); }
.help-faq-body {
  padding: 0 14px 14px;
  color: #6e6e73;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.help-unresolved {
  margin-top: 8px;
  padding: 16px;
  border: 1px solid #efefef;
  border-radius: 16px;
  background: #fafafa;
}
.help-unresolved h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
}
.help-unresolved p {
  margin: 0 0 14px;
  color: #6e6e73;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.help-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  background: var(--pink);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.help-btn:disabled { opacity: .55; cursor: not-allowed; }
.help-btn-ghost {
  background: transparent;
  color: #1c1c1e;
  border: 1px solid #ececef;
}
.help-btn-row { display: grid; gap: 8px; margin-top: 8px; }

.help-field { display: grid; gap: 6px; margin-bottom: 14px; }
.help-field span {
  color: #6e6e73;
  font-size: 12px;
  font-weight: 800;
}
.help-field input,
.help-field textarea {
  width: 100%;
  border: 1px solid #ececef;
  border-radius: 12px;
  background: #fff;
  color: #1c1c1e;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  padding: 13px 14px;
  outline: none;
}
.help-field textarea { min-height: 140px; resize: vertical; line-height: 1.45; }
.help-field input:focus,
.help-field textarea:focus {
  border-color: rgba(255, 77, 154, .45);
  box-shadow: 0 0 0 3px rgba(255, 77, 154, .12);
}
.help-counter {
  justify-self: end;
  color: #8e8e93;
  font-size: 11px;
  font-weight: 700;
}

.help-upload {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}
.help-upload-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 92px;
  padding: 16px;
  border: 1px dashed #dcdce0;
  border-radius: 14px;
  background: #fafafa;
  color: #6e6e73;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}
.help-upload-drop svg { width: 22px; height: 22px; color: var(--pink); }
.help-upload input { display: none; }
.help-previews { display: grid; gap: 8px; }
.help-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid #efefef;
  border-radius: 12px;
}
.help-file img, .help-file video {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  background: #f3f3f4;
}
.help-file strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.help-file button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: #f3f3f4;
  color: #1c1c1e;
  cursor: pointer;
}

.help-summary {
  display: grid;
  gap: 10px;
  margin: 8px 0 18px;
  padding: 14px;
  border: 1px solid #efefef;
  border-radius: 16px;
}
.help-summary div { display: grid; gap: 2px; }
.help-summary span { color: #8e8e93; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.help-summary strong { font-size: 14px; font-weight: 800; color: #1c1c1e; word-break: break-word; }

.help-success {
  text-align: center;
  padding: 28px 8px 12px;
}
.help-success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ecfdf3;
  color: #16a34a;
  animation: help-pop .35s ease;
}
.help-success-icon svg { width: 36px; height: 36px; }
@keyframes help-pop {
  from { transform: scale(.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.help-success h2 { margin: 0 0 8px; font-size: 26px; font-weight: 900; letter-spacing: -.03em; }
.help-success p { margin: 0 0 10px; color: #6e6e73; font-size: 14px; font-weight: 700; line-height: 1.5; }
.help-protocol {
  display: inline-block;
  margin: 8px 0 18px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f7f7f8;
  font-size: 13px;
  font-weight: 800;
}

.help-list-item .help-status,
.help-ticket-row .help-status {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.help-status-analysis { background: #fff7e6; color: #b45309; }
.help-status-awaiting_reply { background: #eff6ff; color: #1d4ed8; }
.help-status-resolved { background: #ecfdf3; color: #15803d; }
.help-status-closed { background: #fef2f2; color: #b91c1c; }

.help-empty, .help-error, .help-loading {
  padding: 36px 10px;
  text-align: center;
}
.help-empty h2, .help-error h2 { margin: 0 0 8px; font-size: 20px; }
.help-empty p, .help-error p { margin: 0 0 16px; color: #6e6e73; font-weight: 700; }
.help-skel {
  display: grid;
  gap: 10px;
}
.help-skel i {
  display: block;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(90deg, #f3f3f4, #ececef, #f3f3f4);
  background-size: 200% 100%;
  animation: help-skel 1.1s ease infinite;
}
@keyframes help-skel { to { background-position: -200% 0; } }

.help-history { display: grid; gap: 12px; }
.help-history article {
  padding: 14px;
  border: 1px solid #efefef;
  border-radius: 16px;
}
.help-history header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
}
.help-history p { margin: 0; color: #3a3a3c; font-size: 14px; font-weight: 700; line-height: 1.5; white-space: pre-wrap; }
.help-history .is-support { background: #f8fafc; }

.help-attach-list { display: grid; gap: 8px; margin: 12px 0; }
.help-attach-list a { color: var(--pink); font-size: 13px; font-weight: 800; }

.help-meta {
  display: grid;
  gap: 8px;
  margin: 12px 0 18px;
}
.help-meta div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.help-meta span { color: #8e8e93; font-weight: 700; }
.help-meta strong { font-weight: 800; text-align: right; }

.help-ticket-row {
  flex-wrap: nowrap;
  align-items: center;
}
.help-ticket-row .help-list-copy small {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
