/* Аудит сайта: хаб, сводный отчёт и модалка пакетного запуска. */
.sa-page {
  --sa-primary: #0287d7;
  --sa-primary-dark: #0270b6;
  --sa-text: #1b1b3a;
  --sa-muted: #828da5;
  --sa-border: #e4e8f2;
  --sa-soft: #f4f6fb;
  --sa-good: #18a957;
  --sa-bad: #e0483d;
  color: var(--sa-text);
  font-size: 14px;
}
.sa-page a { color: var(--sa-primary); text-decoration: none; }
.sa-page a:hover { text-decoration: underline; }

.sa-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  margin-bottom: 18px;
  background: #fff;
  border: 1px solid var(--sa-border);
  border-radius: 12px;
}
.sa-hero h1 { margin: 0 0 6px; font-size: 24px; font-weight: 800; color: var(--sa-text); }
.sa-hero p { margin: 0; color: var(--sa-muted); font-size: 13.5px; line-height: 1.5; }

.sa-card {
  padding: 20px 24px;
  margin-bottom: 18px;
  background: #fff;
  border: 1px solid var(--sa-border);
  border-radius: 12px;
}
.sa-card h2 { margin: 0 0 14px; font-size: 17px; font-weight: 700; }
.sa-card h2 .sa-bundle-back {
  float: right;
  font-size: 13px;
  font-weight: 600;
}

.sa-notice {
  padding: 12px 16px;
  margin-bottom: 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 3px solid #f59e0b;
  border-radius: 10px;
  font-size: 13px;
}

.sa-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--sa-primary);
  color: #fff !important;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
}
.sa-btn:hover { background: var(--sa-primary-dark); }
.sa-btn-ghost {
  background: #fff;
  color: var(--sa-primary) !important;
  border: 1px solid var(--sa-border);
}
.sa-btn-ghost:hover { background: var(--sa-soft); }

.sa-audit-list { margin: 0; padding: 0; list-style: none; }
.sa-audit-list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 4px 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--sa-border);
}
.sa-audit-list-item:before { display: none !important; content: none !important; }
.sa-audit-list-item:last-child { border-bottom: 0; }
.sa-audit-list-title { font-weight: 600; grid-column: 1; }
.sa-audit-list-item.is-off .sa-audit-list-title { color: var(--sa-muted); font-weight: 400; }
.sa-audit-list-blurb {
  display: block;
  grid-column: 1 / -1;
  color: var(--sa-muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
  white-space: normal;
}
.sa-audit-list-price { display: block; grid-column: 1 / -1; font-size: 12.5px; color: var(--sa-text); }
.sa-audit-list-item > a,
.sa-audit-list-note { grid-column: 2; grid-row: 1; white-space: nowrap; }
.sa-audit-list-note { color: var(--sa-muted); font-size: 12.5px; }

.sa-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sa-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--sa-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--sa-border);
}
.sa-table td { padding: 10px; border-bottom: 1px solid var(--sa-border); }
.sa-table tr:last-child td { border-bottom: 0; }

/* Сводный отчёт: внешние вкладки. Внутри отчётов модулей есть свои вкладки,
   поэтому внешний уровень делаем визуально плотнее и с индикатором прогресса. */
.sa-report-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.sa-report-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid var(--sa-border);
  border-radius: 10px 10px 0 0;
  border-bottom-width: 3px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--sa-muted);
}
.sa-report-tab:hover { color: var(--sa-text); }
.sa-report-tab.is-active {
  color: var(--sa-text);
  border-bottom-color: var(--sa-primary);
}
.sa-report-tab.is-done .sa-report-tab-badge { color: var(--sa-good); }
.sa-report-tab-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--sa-muted);
  padding: 2px 7px;
  background: var(--sa-soft);
  border-radius: 20px;
  white-space: nowrap;
}
.sa-report-pane { display: none; }
.sa-report-pane.is-active { display: block; }
.sa-report-loading,
.sa-tab-error {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--sa-border);
  border-radius: 12px;
  color: var(--sa-muted);
  font-size: 13.5px;
}
.sa-tab-error { color: var(--sa-bad); }

/* Модалка пакетного запуска: своё окно, не unibox --------------------------*/
body.sa-bundle-open { overflow: hidden; }
body.sa-bundle-open #ubpreloader-overlay { display: none !important; }

.sa-bundle-overlay {
  position: fixed;
  inset: 0;
  background: #1A2936;
  opacity: 0.8;
  z-index: 100049;
}
.sa-bundle-overlay[hidden] { display: none !important; }

#sa-bundle-window.sa-bundle {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, calc(94vw - 42px));
  max-height: 90vh;
  margin: 0;
  padding: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  z-index: 100050;
  box-sizing: border-box;
  visibility: visible;
  opacity: 1;
}
#sa-bundle-window.sa-bundle[hidden] { display: none !important; }

.sa-bundle-close {
  position: absolute;
  top: 10px;
  right: -37px;
  z-index: 100051;
  width: 37px;
  height: 37px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff url('../../../../libraries/js/jQuery/plugins/unibox/close.png') -20px 0 no-repeat;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
  cursor: pointer;
}
.sa-bundle-close:hover { background-color: #fff; }

.sa-bundle-inner {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 22px 24px 18px;
  box-sizing: border-box;
}

.sa-bundle-form {
  position: relative;
  color: #1b1b3a;
  font-size: 14px;
  text-align: left;
  max-width: 100%;
  min-width: 0;
}
.sa-bundle-select-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.sa-bundle-select-wrap select,
.sa-bundle-form .chosen-container {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}
.sa-bundle-head { margin-bottom: 18px; }
.sa-bundle-title { display: block; font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.sa-bundle-sub { display: block; color: #828da5; font-size: 13px; line-height: 1.5; }

.sa-bundle-step { margin-bottom: 16px; }
.sa-bundle-label {
  display: block;
  margin: 12px 0 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #1b1b3a;
}
.sa-bundle-label:first-child { margin-top: 0; }
#sa-bundle-window.sa-bundle .sa-bundle-form input[type="text"],
#sa-bundle-window.sa-bundle .sa-bundle-form input[type="number"],
#sa-bundle-window.sa-bundle .sa-bundle-form textarea,
#sa-bundle-window.sa-bundle .sa-bundle-form select,
.sa-bundle-form input[type="text"],
.sa-bundle-form input[type="number"],
.sa-bundle-form textarea,
.sa-bundle-form select {
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  height: auto !important;
  box-sizing: border-box;
  padding: 9px 12px !important;
  border: 1px solid #e4e8f2;
  border-radius: 8px;
  font-size: 14px !important;
  line-height: 1.4 !important;
  color: #1b1b3a;
  background: #fff;
  font-family: inherit !important;
  font-weight: 400 !important;
}
.sa-bundle-form textarea { resize: vertical; min-height: 76px; }
.sa-bundle-form textarea[data-sa-keywords] {
  min-height: 52px;
  height: 52px;
}
.sa-bundle-form input:focus,
.sa-bundle-form textarea:focus,
.sa-bundle-form select:focus {
  outline: none;
  border-color: #0287d7;
  box-shadow: 0 0 0 2px rgba(2, 135, 215, 0.15);
}
.sa-bundle-form .sa-bundle-project { margin-bottom: 8px; max-width: 100%; }
.sa-bundle-hint {
  display: block;
  margin-top: 5px;
  color: #828da5;
  font-size: 12px;
  line-height: 1.45;
}

.sa-bundle-region { position: relative; display: block; }
.sa-bundle-region-input { width: 100%; }
.sa-bundle-region-picked {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(2, 135, 215, 0.1);
  color: #0287d7;
  font-weight: 600;
  font-size: 13px;
}
.sa-bundle-region-picked a { color: #828da5; font-weight: 700; line-height: 1; text-decoration: none; }
.sa-bundle-region-picked a:hover { color: #e0483d; }
.sa-bundle-region-list {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid #e4e8f2;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 200px;
  overflow: auto;
}
.sa-bundle-region-list li {
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.sa-bundle-region-list li:hover { background: #f4f6fb; }
.sa-bundle-region-list li.sa-bundle-region-msg { color: #828da5; cursor: default; }
.sa-bundle-region-list li.sa-bundle-region-msg:hover { background: transparent; }

.sa-bundle-audits { display: flex; flex-direction: column; gap: 8px; }
.sa-bundle-audit {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e4e8f2;
  border-radius: 8px;
  cursor: pointer;
}
.sa-bundle-audit:hover { border-color: #0287d7; }
.sa-bundle-audit input { width: 18px; height: 18px; margin: 4px 0 0; flex: 0 0 auto; accent-color: #0287d7; }
.sa-bundle-audit-body { flex: 1; min-width: 0; }
.sa-bundle-audit-title { display: block; font-weight: 600; font-size: 13.5px; }
.sa-bundle-audit-blurb { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; color: #828da5; line-height: 1.4; }
.sa-bundle-audit-price { display: block; margin-top: 4px; font-size: 12px; color: #1b1b3a; }
.sa-bundle-audit-note {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  color: #b45309;
  background: #fffbeb;
  border-radius: 20px;
  padding: 2px 8px;
  flex: 0 0 auto;
}

.sa-bundle-settings-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #1b1b3a;
}
.sa-bundle-settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 14px;
  border-bottom: 2px solid #e4e8f2;
}
.sa-bundle-settings-tab {
  padding: 10px 16px;
  margin: 0 0 -2px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  color: #828da5;
  cursor: pointer;
}
.sa-bundle-settings-tab.is-active {
  color: #0287d7;
  border-bottom-color: #0287d7;
}
.sa-bundle-settings-pane { display: none; }
.sa-bundle-settings-pane.is-active { display: block; }
.sa-bundle-settings-pane[hidden] { display: none !important; }
.sa-bundle-pane-cost {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f4f6fb;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.45;
}

.sa-bundle-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  cursor: pointer;
  font-size: 13.5px;
}
.sa-bundle-check input { width: 16px; height: 16px; margin: 0; accent-color: #0287d7; }

.sa-bundle-engines { display: flex; flex-wrap: wrap; gap: 10px; }
.sa-bundle-engine {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid #e4e8f2;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
}
.sa-bundle-engine input { width: 16px; height: 16px; margin: 0; accent-color: #0287d7; }

.sa-bundle-cost {
  padding: 11px 14px;
  margin-bottom: 16px;
  background: #f4f6fb;
  border: 1px solid #e4e8f2;
  border-left: 3px solid #0287d7;
  border-radius: 8px;
  font-size: 13px;
}
.sa-bundle-cost-break { display: block; margin-top: 6px; color: #828da5; font-size: 12.5px; }

.sa-bundle-actions { display: flex; flex-direction: column; gap: 8px; }
/* display: inline-block у кнопки перебивает UA [hidden] { display: none }. */
.sa-bundle [hidden] { display: none !important; }
.sa-bundle-btn {
  display: inline-block;
  box-sizing: border-box;
  width: 100%;
  padding: 12px 20px;
  background: #0287d7;
  color: #fff !important;
  border: 1px solid #0287d7;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none !important;
  line-height: 1.25;
}
.sa-bundle-btn:hover { background: #0270b6; border-color: #0270b6; }
.sa-bundle-btn-ghost {
  background: #fff;
  color: #0287d7 !important;
  border: 1px solid #0287d7;
  margin-top: 8px;
}
.sa-bundle-btn-ghost:hover {
  background: #f3f8fc;
  color: #0270b6 !important;
  border-color: #0270b6;
}
.sa-bundle-error {
  display: none;
  color: #e0483d;
  font-size: 12.5px;
  line-height: 1.45;
}

/* Вкладки прогресса внутри модалки. */
.sa-bundle-progress { margin-top: 16px; }
.sa-bundle-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sa-bundle-tab {
  padding: 7px 13px;
  border: 1px solid #e4e8f2;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  color: #828da5;
  cursor: pointer;
}
.sa-bundle-tab.is-active { color: #1b1b3a; border-color: #0287d7; }
.sa-bundle-tab.is-done { color: #18a957; }
.sa-bundle-tab.is-failed { color: #e0483d; }
.sa-bundle-pane { display: none; }
.sa-bundle-pane.is-active { display: block; }
.sa-bundle-pane-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.sa-bundle-bar {
  height: 8px;
  background: #eef0f5;
  border-radius: 20px;
  overflow: hidden;
}
.sa-bundle-bar span {
  display: block;
  height: 100%;
  background: #0287d7;
  border-radius: 20px;
  transition: width .3s ease;
}
.sa-bundle-pane-status { margin-top: 7px; font-size: 12.5px; color: #828da5; }
.sa-bundle-pane-msg { margin-top: 5px; font-size: 12.5px; color: #b45309; }

/* Кнопка пакетного аудита на публичных инструментах ------------------------*/
.sa-tool-promo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: 18px 0 10px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #f3f8ff 0%, #eef6fb 52%, #fff6eb 100%);
  border: 1px solid #d7e6f5;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(2, 87, 179, 0.08);
}
.sa-tool-promo-mark {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #0287d7;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  box-shadow: 0 8px 18px rgba(2, 135, 215, 0.35);
}
.sa-tool-promo-body { flex: 1; min-width: 0; }
.sa-tool-promo-title {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: #1b1b3a;
  margin-bottom: 4px;
}
.sa-tool-promo-text {
  display: block;
  font-size: 13.5px;
  line-height: 1.45;
  color: #4a5568;
}
.sa-tool-promo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.sa-tool-promo-tags span {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #d7e6f5;
  font-size: 11.5px;
  font-weight: 600;
  color: #0257b3;
}
.sa-tool-promo-btn {
  display: inline-block;
  padding: 11px 18px;
  background: #0287d7;
  color: #fff;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 16px rgba(2, 135, 215, 0.28);
}
.sa-tool-promo-btn:hover { background: #0270b6; color: #fff; }

@media (max-width: 640px) {
  .sa-hero { flex-direction: column; align-items: flex-start; }
  .sa-report-tab { flex: 1 1 auto; justify-content: center; }
  .sa-tool-promo { flex-direction: column; align-items: flex-start; }
  .sa-tool-promo-btn { width: 100%; text-align: center; }
}
