:root {
  --ahc-ink: #0f172a;
  --ahc-muted: #64748b;
  --ahc-line: #dbe7e6;
  --ahc-line-strong: #c7d7d5;
  --ahc-soft: #f7fbfa;
  --ahc-accent: #0f766e;
  --ahc-accent-strong: #115e59;
  --ahc-blue: #2563eb;
  --ahc-danger: #dc2626;
  --ahc-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.auto-help-shell {
  min-height: calc(100vh - 1px);
  padding: 24px;
  background: #f7fbfa;
  color: var(--ahc-ink);
}

.auto-help-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.auto-help-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--ahc-accent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auto-help-hero h1 {
  margin: 0;
  color: var(--ahc-ink);
  font-size: 1.52rem;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: 0;
}

.auto-help-hero p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--ahc-muted);
  font-size: .94rem;
  line-height: 1.55;
  font-weight: 500;
}

.auto-help-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  margin-bottom: 18px;
}

.auto-help-search {
  position: relative;
}

.auto-help-search input,
.auto-help-form input,
.auto-help-form textarea,
.auto-help-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--ahc-line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ahc-ink);
  font-size: .92rem;
  outline: none;
  box-shadow: none;
}

.auto-help-search input {
  padding: 0 14px 0 42px;
}

.auto-help-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  color: #94a3b8;
  transform: translateY(-50%);
}

.auto-help-search input:focus,
.auto-help-form input:focus,
.auto-help-form textarea:focus,
.auto-help-form select:focus {
  border-color: var(--ahc-accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .12);
}

.auto-help-support {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(15, 118, 110, .18);
  border-radius: 8px;
  background: var(--ahc-accent);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(15, 118, 110, .16);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.auto-help-support:hover {
  background: var(--ahc-accent-strong);
  color: #fff;
  transform: translateY(-1px);
}

.auto-help-support[aria-disabled="true"] {
  border-color: var(--ahc-line);
  background: #eef4f3;
  color: #94a3b8;
  box-shadow: none;
  pointer-events: none;
}

.auto-help-grid {
  display: grid;
  gap: 10px;
}

.auto-help-category {
  overflow: hidden;
  border: 1px solid var(--ahc-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.auto-help-category.is-open {
  box-shadow: var(--ahc-shadow);
}

.auto-help-category-button,
.auto-help-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 15px 16px;
  border: 0;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.auto-help-category.is-open .auto-help-category-button {
  border-bottom: 1px solid var(--ahc-line);
  background: #fbfefd;
}

.auto-help-category-button:hover {
  background: #f8fcfb;
}

.auto-help-category-header h2,
.auto-help-category-header h3,
.auto-help-category-title {
  margin: 0;
  color: var(--ahc-ink);
  font-size: .96rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0;
}

.auto-help-count {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e6f5f2;
  color: var(--ahc-accent);
  font-size: .74rem;
  font-weight: 700;
  white-space: nowrap;
}

.auto-help-videos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.auto-help-video-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--ahc-line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.auto-help-video-card:hover {
  border-color: rgba(15, 118, 110, .32);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
  transform: translateY(-2px);
}

.auto-help-thumb {
  position: relative;
  flex: 0 0 148px;
  width: 148px;
  min-height: 84px;
  overflow: hidden;
  background: #e2ecea;
}

.auto-help-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.auto-help-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, .84);
  color: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .24);
}

.auto-help-video-body {
  display: grid;
  align-content: center;
  gap: 7px;
  min-width: 0;
  padding: 12px 14px;
}

.auto-help-video-body strong {
  color: var(--ahc-ink);
  font-size: .94rem;
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: 0;
}

.auto-help-video-body p {
  margin: 0;
  color: var(--ahc-muted);
  font-size: .83rem;
  line-height: 1.45;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.auto-help-empty,
.auto-help-loading,
.auto-help-error {
  border: 1px solid var(--ahc-line);
  border-radius: 8px;
  background: #fff;
  padding: 24px;
  color: var(--ahc-muted);
  font-weight: 700;
  text-align: center;
}

.auto-help-empty.compact {
  margin: 12px;
  padding: 16px;
}

.auto-help-error {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff7f7;
}

.auto-help-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: transparent;
  pointer-events: none;
}

.auto-help-modal.is-open {
  display: flex;
}

.auto-help-modal-card {
  width: min(1040px, 100%);
  max-height: min(760px, calc(100vh - 32px));
  overflow: hidden;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 10px;
  background: #0f172a;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .42);
}

.auto-help-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  color: #fff;
}

.auto-help-modal-head strong {
  font-size: .98rem;
  line-height: 1.3;
  font-weight: 700;
}

.auto-help-modal-close {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
}

.auto-help-player {
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #020617;
}

.auto-help-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.auto-help-admin-layout {
  display: grid;
  grid-template-columns: minmax(250px, .9fr) minmax(0, 1.5fr);
  gap: 16px;
}

.auto-help-panel {
  overflow: hidden;
  border: 1px solid var(--ahc-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--ahc-shadow);
}

.auto-help-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--ahc-line);
  background: linear-gradient(180deg, #fff 0%, #f8fcfb 100%);
}

.auto-help-panel-head h2 {
  margin: 0;
  color: var(--ahc-ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.auto-help-panel-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.auto-help-form {
  display: grid;
  gap: 10px;
}

.auto-help-form label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: .82rem;
  font-weight: 700;
}

.auto-help-form textarea {
  min-height: 86px;
  resize: vertical;
  padding: 11px 12px;
}

.auto-help-form input,
.auto-help-form select {
  padding: 0 12px;
}

.auto-help-form-row {
  display: grid;
  grid-template-columns: 1fr 120px 120px;
  gap: 10px;
}

.auto-help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auto-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--ahc-line);
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
}

.auto-help-btn:hover {
  transform: translateY(-1px);
}

.auto-help-btn.primary {
  border-color: rgba(15, 118, 110, .18);
  background: var(--ahc-accent);
  color: #fff;
}

.auto-help-btn.danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: var(--ahc-danger);
}

.auto-help-list {
  display: grid;
  gap: 8px;
}

.auto-help-list-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--ahc-line);
  border-radius: 8px;
  background: #fff;
}

.auto-help-list-item.is-selected {
  border-color: rgba(15, 118, 110, .34);
  background: #f2fbf9;
}

.auto-help-list-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.auto-help-list-title strong {
  color: var(--ahc-ink);
  font-size: .9rem;
  line-height: 1.32;
  font-weight: 700;
}

.auto-help-list-title small {
  color: var(--ahc-muted);
  font-size: .76rem;
  font-weight: 600;
}

.auto-help-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e6f5f2;
  color: var(--ahc-accent);
  font-size: .72rem;
  font-weight: 700;
}

.auto-help-pill.off {
  background: #f1f5f9;
  color: #64748b;
}

.auto-help-admin-empty {
  padding: 18px;
  border: 1px dashed var(--ahc-line-strong);
  border-radius: 8px;
  color: var(--ahc-muted);
  font-weight: 700;
  text-align: center;
}

.auto-help-admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auto-help-sidebar-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 8px;
  background: rgba(15, 118, 110, .12);
  color: var(--ahc-accent);
  font-weight: 700;
}

.auto-help-sidebar-icon svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 1180px) {
  .auto-help-videos {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .auto-help-shell {
    padding: 18px 14px 24px;
  }

  .auto-help-hero,
  .auto-help-toolbar {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .auto-help-hero h1 {
    font-size: 1.34rem;
  }

  .auto-help-support {
    width: 100%;
  }

  .auto-help-videos,
  .auto-help-admin-layout,
  .auto-help-form-row {
    grid-template-columns: 1fr;
  }

  .auto-help-videos {
    padding: 12px;
  }

  .auto-help-video-card {
    flex-direction: row;
  }

  .auto-help-thumb {
    flex-basis: 118px;
    width: 118px;
    min-height: 76px;
  }

  .auto-help-play {
    width: 38px;
    height: 38px;
  }

  .auto-help-category-header {
    padding: 15px;
  }

  .auto-help-modal {
    padding: 10px;
    align-items: center;
  }

  .auto-help-modal-card {
    max-height: calc(100vh - 20px);
    border-radius: 10px;
  }

  .auto-help-modal-head {
    padding: 11px 12px;
  }
}
