:root {
  --bg: #0f1419;
  --fg: #e7e9ea;
  --muted: #8b98a5;
  --accent: #1d9bf0;
  --err: #f4212e;
  --warn: #e8a85c;
  --border: #38444d;
}

* { box-sizing: border-box; }
/* .btn задаёт display:inline-flex — без !important скрытие по атрибуту [hidden] может не срабатывать */
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; color: var(--fg); text-decoration: none; }
.brand:hover { color: var(--fg); opacity: 0.92; }
.top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
  margin-left: 1rem;
}
.logout-form {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.current-user {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}
.top-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.nav-app-search {
  position: relative;
  flex: 0 1 16rem;
  min-width: 10rem;
  max-width: 20rem;
}
.nav-app-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.4rem 0.65rem;
  font-size: 0.9rem;
  line-height: 1.35;
  background: #15202b;
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 6px;
}
.nav-app-search-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.nav-app-search-input::placeholder {
  color: var(--muted);
}
/* Индикатор запроса: тонкая полоска под полем (пока грузятся подсказки). */
.nav-app-search-busy-bar {
  position: relative;
  height: 3px;
  margin-top: 2px;
  border-radius: 2px;
  background: #243041;
  overflow: hidden;
}
.nav-app-search-busy-bar[hidden] {
  display: none !important;
}
.nav-app-search-busy-bar-fill {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 38%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #7cc8f8);
  animation: nav-app-search-busy-slide 0.9s ease-in-out infinite;
}
@keyframes nav-app-search-busy-slide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(280%);
  }
}
.nav-app-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  max-height: min(50vh, 20rem);
  overflow-y: auto;
  background: #15202b;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 200;
}
.nav-app-search-loading-hint {
  margin: 0;
  padding: 0.55rem 0.75rem 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.nav-app-search-recent-heading {
  margin: 0;
  padding: 0.45rem 0.75rem 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-app-search-results {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
}
.nav-app-search-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.65rem;
  text-decoration: none;
  color: var(--fg) !important;
  border-bottom: 1px solid #243041;
}
.nav-app-search-item-icon-wrap {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(110deg, #162231 8%, #203146 18%, #162231 33%);
  background-size: 200% 100%;
  animation: progressive-icon-shimmer 1.1s linear infinite;
}
.nav-app-search-item-icon {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  background: #1a2733;
}
.nav-app-search-item-icon--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #1a2733;
  color: var(--muted);
  font-size: 0.75rem;
}
.nav-app-search-item-body {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  flex: 1;
}
.nav-app-search-results li:last-child .nav-app-search-item {
  border-bottom: none;
}
.nav-app-search-item:hover,
.nav-app-search-item:focus {
  background: #1a2733;
}
.nav-app-search-item-title {
  font-weight: 500;
  font-size: 0.9rem;
}
.nav-app-search-item-meta {
  font-size: 0.78rem;
  color: var(--muted);
}
.nav-app-search-empty {
  padding: 0.65rem 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.nav-app-search-err {
  color: var(--err);
}
.container { max-width: 960px; margin: 0 auto; padding: 1.25rem; }
/* /apps — сводная таблица по всем запускам: 10 колонок, длинные email-ы, иконки и пилюли.
   Ограничение 960px на этой странице режет полезное пространство, поэтому расширяем
   контейнер на всю ширину окна (до 1920px как потолок, чтобы на ультрашироких мониторах
   строки не растягивались до нечитаемых «лент»). */
body.page-apps .container {
  max-width: min(100%, 1920px);
  padding: 1.25rem 1.5rem;
}
body.page-analytics .container {
  max-width: min(100%, 1440px);
  padding: 1.25rem 1.5rem 2rem;
}
h1 { font-size: 1.5rem; margin-top: 0; }

.analytics-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.analytics-hero h1 {
  margin-bottom: 0.25rem;
}
.analytics-hero-copy {
  max-width: 760px;
  margin: 0;
}
.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.analytics-kpi,
.analytics-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #15202b 0%, #111a23 100%);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}
.analytics-kpi {
  position: relative;
  padding: 0.9rem 1rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 16%, hsl(var(--kpi-hue), 70%, 48%, 0.28), transparent 34%),
    linear-gradient(180deg, hsl(var(--kpi-hue), 34%, 20%) 0%, #111a23 100%);
  border-color: hsl(var(--kpi-hue), 38%, 32%);
}
.analytics-kpi::after {
  content: "";
  position: absolute;
  inset: auto -1.5rem -2rem auto;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: hsl(var(--kpi-hue), 72%, 52%, 0.12);
  pointer-events: none;
}
.analytics-kpi--runs { --kpi-hue: 204; }
.analytics-kpi--success { --kpi-hue: 138; }
.analytics-kpi--units { --kpi-hue: 265; }
.analytics-kpi--managers { --kpi-hue: 32; }
.analytics-kpi--asc { --kpi-hue: 188; }
.analytics-kpi--locales { --kpi-hue: 312; }
.analytics-kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.55rem;
  border-radius: 10px;
  background: hsl(var(--kpi-hue), 70%, 52%, 0.18);
  color: hsl(var(--kpi-hue), 90%, 82%);
  box-shadow: inset 0 0 0 1px hsl(var(--kpi-hue), 58%, 52%, 0.28);
  font-weight: 800;
  line-height: 1;
}
.analytics-kpi-label {
  display: block;
  color: hsl(var(--kpi-hue), 62%, 82%);
  font-size: 0.82rem;
}
.analytics-kpi strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.55rem;
  line-height: 1.1;
}
.analytics-kpi--success strong {
  color: #7ee787;
}
.analytics-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0f1822;
}
.analytics-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
}
.analytics-tab:hover,
.analytics-tab:focus-visible {
  color: var(--fg);
  border-color: #2f3d4a;
  outline: none;
}
.analytics-tab.is-active {
  color: #d9f1ff;
  background: #152536;
  border-color: #2f81c7;
  box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.14);
}
.analytics-tab-panel[hidden] {
  display: none;
}
.analytics-date-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0f1822;
}
.analytics-date-presets,
.analytics-date-range-form {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.analytics-date-preset {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 650;
}
.analytics-date-preset:hover,
.analytics-date-preset:focus-visible {
  color: var(--fg);
  border-color: #2f3d4a;
}
.analytics-date-preset.is-active {
  color: #d9f1ff;
  background: #152536;
  border-color: #2f81c7;
}
.analytics-date-range-form label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.84rem;
}
.analytics-date-range-form input[type="date"] {
  min-height: 2rem;
  padding: 0.25rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #182638;
  color: var(--fg);
  color-scheme: dark;
  accent-color: var(--accent);
  font: inherit;
  font-size: 0.86rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.analytics-date-range-form input[type="date"]:hover,
.analytics-date-range-form input[type="date"]:focus {
  border-color: #2f81c7;
  outline: none;
  background: #1b2b3f;
}
.analytics-date-range-form input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 1;
  cursor: pointer;
  filter: invert(72%) sepia(44%) saturate(1422%) hue-rotate(174deg) brightness(101%) contrast(92%);
  border-radius: 6px;
  padding: 0.12rem;
}
.analytics-date-range-form input[type="date"]::-webkit-calendar-picker-indicator:hover {
  background: rgba(124, 200, 248, 0.16);
}
.analytics-date-current {
  margin-left: 0.25rem;
  white-space: nowrap;
}
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}
.analytics-grid--time {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.analytics-card {
  padding: 1rem;
}
.analytics-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}
.analytics-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.analytics-card-heading h2 {
  margin-bottom: 0;
}
.analytics-line-max {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}
.analytics-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.1rem 0 0.75rem;
}
.analytics-section-heading h2 {
  margin: 0;
  font-size: 1.15rem;
}
.analytics-section-heading .hint {
  max-width: 620px;
  margin: 0;
}
.analytics-pie-layout {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
}
.analytics-pie {
  width: 8.5rem;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.25);
  position: relative;
}
.analytics-pie::after {
  content: "";
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: #111a23;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.analytics-pie-legend {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.45rem;
}
.analytics-pie-legend-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  border-radius: 8px;
  padding: 0.1rem 0.15rem;
}
.analytics-pie-legend-row:hover,
.analytics-pie-legend-row:focus-visible {
  background: rgba(255, 255, 255, 0.05);
}
.analytics-pie-swatch {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.analytics-drilldown > summary {
  list-style: none;
}
.analytics-drilldown > summary::-webkit-details-marker {
  display: none;
}
.analytics-drilldown-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 16rem;
  overflow: auto;
}
.analytics-drilldown-list li {
  display: grid;
  gap: 0.08rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #253341;
  border-radius: 9px;
  background: rgba(17, 24, 32, 0.82);
}
.analytics-drilldown-list a {
  color: var(--fg);
  font-weight: 700;
  text-decoration: none;
}
.analytics-drilldown-list a:hover,
.analytics-drilldown-list a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}
.analytics-drilldown-list span,
.analytics-drilldown-list small {
  color: var(--muted);
  font-size: 0.78rem;
}
.analytics-drilldown-list em {
  color: #ffb3b3;
  font-size: 0.78rem;
  font-style: normal;
}
.analytics-drilldown-empty {
  margin: 0.45rem 0 0;
}
.analytics-bars,
.analytics-status-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.analytics-bar-meta,
.analytics-status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.analytics-bar-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.analytics-bar-value,
.analytics-status-item strong {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.analytics-bar-track {
  width: 100%;
  height: 0.55rem;
  margin-top: 0.35rem;
  overflow: hidden;
  border-radius: 999px;
  background: #253341;
}
.analytics-bar-fill {
  display: block;
  width: max(0.25rem, var(--bar-pct));
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #7cc8f8);
}
.analytics-line-card {
  min-height: 18rem;
}
.analytics-line-plot {
  position: relative;
  height: 13rem;
  margin-top: 0.5rem;
  padding-left: 2.9rem;
  border: 1px solid #253341;
  border-radius: 12px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 25% 100%,
    #111820;
  overflow: visible;
}
.analytics-line-y-axis {
  position: absolute;
  top: 0.75rem;
  bottom: 0.75rem;
  left: 0;
  width: 2.9rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-right: 0.45rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1;
  text-align: right;
  pointer-events: none;
}
.analytics-line-y-axis span {
  display: block;
  transform: translateY(50%);
}
.analytics-line-y-axis span:first-child {
  transform: translateY(-50%);
}
.analytics-line-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.analytics-line-svg polyline {
  fill: none;
  stroke: #7cc8f8;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 4px 8px rgba(29, 155, 240, 0.22));
}
.analytics-line-point-wrap {
  position: absolute;
  left: var(--point-x);
  top: var(--point-y);
  transform: translate(-50%, -50%);
  z-index: 2;
}
.analytics-line-point-summary {
  cursor: help;
  position: relative;
}
.analytics-line-point {
  display: block;
  width: 0.72rem;
  height: 0.72rem;
  padding: 0;
  border: 2px solid #d9f1ff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(29, 155, 240, 0.16);
}
.analytics-line-point-summary:hover .analytics-line-point,
.analytics-line-point-summary:focus-visible .analytics-line-point {
  outline: none;
  transform: scale(1.18);
}
.analytics-line-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.65rem);
  transform: translateX(-50%);
  width: max-content;
  max-width: min(22rem, 70vw);
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b1117;
  color: var(--fg);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.45);
  font-size: 0.82rem;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  z-index: 20;
}
.analytics-line-tooltip strong,
.analytics-line-tooltip span {
  display: block;
}
.analytics-line-tooltip > span {
  color: var(--muted);
  margin-top: 0.15rem;
}
.analytics-line-point-wrap:hover .analytics-line-tooltip,
.analytics-line-point-summary:focus-visible .analytics-line-tooltip,
.analytics-line-point-wrap[open] .analytics-line-tooltip {
  opacity: 1;
  visibility: visible;
}
.analytics-drilldown-panel {
  position: absolute;
  z-index: 30;
  width: min(24rem, 78vw);
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0b1117;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.5);
}
.analytics-line-drilldown-panel {
  left: 50%;
  top: calc(100% + 0.8rem);
  transform: translateX(-50%);
}
.analytics-line-tooltip-managers {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.5rem;
}
.analytics-line-tooltip-managers span {
  color: var(--fg);
}
.analytics-line-tooltip-managers i {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.3rem;
  border-radius: 50%;
  vertical-align: 0;
}
.analytics-line-axis {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.76rem;
}
.analytics-stacked-card {
  min-height: 18rem;
}
.analytics-stacked-plot {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 13rem;
  padding: 0.75rem 0.75rem 1.8rem;
  border: 1px solid #253341;
  border-radius: 12px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 100% 25%,
    #111820;
}
.analytics-stacked-column-wrap {
  position: relative;
  display: block;
  flex: 1 1 0;
  min-width: 1.1rem;
  height: 100%;
}
.analytics-stacked-summary {
  position: relative;
  display: flex;
  height: 100%;
  align-items: flex-end;
  justify-content: center;
  cursor: pointer;
}
.analytics-stacked-column {
  display: flex;
  flex-direction: column-reverse;
  width: min(100%, 1.8rem);
  height: max(0.3rem, var(--column-height));
  overflow: hidden;
  border-radius: 8px 8px 3px 3px;
  background: #253341;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.analytics-stacked-column-wrap:hover .analytics-stacked-column,
.analytics-stacked-column-wrap:focus-within .analytics-stacked-column {
  transform: translateY(-2px);
  filter: brightness(1.08);
}
.analytics-stacked-segment {
  display: block;
  min-height: 2px;
  height: var(--segment-height);
  background: var(--segment-color);
}
.analytics-stacked-label {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%) rotate(-35deg);
  transform-origin: top left;
  color: var(--muted);
  font-size: 0.68rem;
  white-space: nowrap;
}
.analytics-stacked-tooltip {
  bottom: calc(100% + 0.5rem);
}
.analytics-stacked-column-wrap:hover .analytics-stacked-tooltip,
.analytics-stacked-column-wrap:focus-within .analytics-stacked-tooltip {
  opacity: 1;
  visibility: visible;
}
.analytics-stacked-drilldown-panel {
  left: 50%;
  bottom: calc(100% + 0.65rem);
  transform: translateX(-50%);
}
.analytics-status-card {
  margin-bottom: 0.5rem;
}
.analytics-status-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}
.analytics-status-item .analytics-bar-track {
  grid-column: 1 / -1;
  margin-top: 0;
}
.analytics-units-card {
  overflow: hidden;
}
.analytics-unit-columns {
  display: grid;
  grid-template-columns: repeat(var(--unit-count), minmax(13rem, 1fr));
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
.analytics-unit-column {
  min-width: 13rem;
  padding: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--unit-color), #253341 55%);
  border-radius: 12px;
  background:
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--unit-color), transparent 72%), transparent 32%),
    #111820;
}
.analytics-unit-column-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}
.analytics-unit-column-head h3 {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
}
.analytics-unit-metrics {
  display: grid;
  gap: 0.5rem;
  margin: 0;
}
.analytics-unit-metric {
  display: grid;
  gap: 0.18rem;
  padding: 0.5rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}
.analytics-unit-metric dt {
  color: var(--muted);
  font-size: 0.74rem;
}
.analytics-unit-metric dd {
  margin: 0;
}
.analytics-unit-metric strong {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: wrap;
  color: var(--fg);
  font-size: 1.18rem;
  line-height: 1.1;
}
.analytics-unit-percent {
  color: var(--percent-color);
  font-size: 0.82rem;
  font-weight: 800;
}
.analytics-unit-metric dd > span {
  display: block;
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}
.analytics-unit-metric--success strong {
  color: #7ee4a1;
}
.analytics-unit-metric--danger strong {
  color: #ff9b9b;
}
.analytics-unit-metric--warning strong {
  color: #ffc978;
}
.analytics-unit-metric--money strong {
  color: #9be7ff;
}

@media (max-width: 1100px) {
  .analytics-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .analytics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .analytics-grid--time {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .analytics-hero,
  .analytics-card-heading,
  .analytics-section-heading {
    flex-direction: column;
    align-items: stretch;
  }
  .analytics-kpis,
  .analytics-grid {
    grid-template-columns: 1fr;
  }
  .analytics-pie-layout {
    grid-template-columns: 1fr;
  }
  .analytics-pie {
    width: min(12rem, 70vw);
    margin: 0 auto;
  }
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
/* таблица: ссылки — через .btn (см. ниже) */
.pill {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: #203047;
  font-size: 0.85rem;
}
.form label {
  display: block;
  margin-bottom: 0.75rem;
}
.form input, .form textarea, .form select {
  width: 100%;
  max-width: 40rem;
  margin-top: 0.25rem;
  padding: 0.4rem 0.5rem;
  background: #15202b;
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 4px;
}
/* Только «голые» кнопки без class — основной стиль задаётся .btn-* */
.form button:not([class]) {
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  border: none;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
}
.form .btn-primary,
.form .btn-secondary {
  margin-top: 0.5rem;
}
.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 20%, rgba(29, 155, 240, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 10%, rgba(0, 186, 124, 0.14), transparent 24rem),
    var(--bg);
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}
.login-card {
  width: min(26rem, 100%);
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #15202b;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}
.login-card h1 {
  margin: 0.35rem 0 0.5rem;
}
.login-form {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.25rem;
}
.login-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
}
.login-form input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: #0f1419;
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 8px;
}
.alert {
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.alert-error {
  border-color: rgba(244, 33, 46, 0.5);
  background: rgba(244, 33, 46, 0.12);
  color: #ffb3ba;
}
.error { color: var(--err); }
.hidden { display: none !important; }
.verify-gitlab-status { margin-top: 0.5rem; font-size: 0.9rem; }
.verify-gitlab-status.ok { color: #00ba7c; }
.verify-gitlab-status.err { color: var(--err); }
.verify-gitlab-status .gitlab-instruction-steps,
.gitlab-instruction-steps {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  max-width: 42rem;
}
.verify-gitlab-status .gitlab-instruction-steps li,
.gitlab-instruction-steps li { margin-bottom: 0.75rem; }
.account-gitlab-hint-steps { margin-top: 0.25rem; max-width: 42rem; }

.form-account-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.account-save-status {
  flex-basis: 100%;
  margin: 0 0 0.25rem 0;
  font-size: 0.95rem;
  color: var(--muted);
  min-height: 1.35em;
}
.account-save-status--active {
  color: var(--fg);
}
.account-save-status--active::before {
  content: "";
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-right: 0.45em;
  vertical-align: -0.12em;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: account-save-spin 0.65s linear infinite;
}
@keyframes account-save-spin {
  to { transform: rotate(360deg); }
}
.form-account--submitting .btn-primary {
  cursor: wait;
}
.hint { color: var(--muted); font-size: 0.9rem; }
.draft-status {
  font-size: 0.85rem;
  margin: 0 0 0.75rem 0;
}
.draft-status.error {
  color: var(--err);
}
.toolbar-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}
pre.yaml {
  white-space: pre-wrap;
  word-break: break-word;
  background: #15202b;
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
}

/* Страница запуска: блок YAML (details), правка в textarea */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.run-detail-config-section {
  margin-bottom: 1rem;
}
.run-detail-config-yaml-inner {
  padding: 0 1rem 1rem;
}
.run-detail-config-yaml-inner .hint {
  margin-top: 0;
  margin-bottom: 0.65rem;
}
.run-detail-config-yaml-inner .yaml {
  margin: 0;
  max-height: min(70vh, 32rem);
  overflow: auto;
}
.run-config-yaml-bar {
  margin: 0.5rem 0 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}
.run-config-yaml-textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 12rem;
  max-height: min(70vh, 40rem);
  box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.45;
  padding: 0.75rem 1rem;
  color: var(--fg);
  background: #15202b;
  border: 1px solid var(--border);
  border-radius: 6px;
  resize: vertical;
}
.run-config-yaml-textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.run-config-yaml-status.run-config-yaml-status--err {
  color: var(--err);
}
.meta { color: var(--muted); }
.steps li { margin-bottom: 0.5rem; }

.intro-panel {
  background: #15202b;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.intro-heading { font-size: 1.1rem; margin: 0 0 0.75rem 0; }
.intro-steps {
  margin: 0;
  padding-left: 1.25rem;
}
.intro-steps li { margin-bottom: 0.6rem; }
.intro-steps a { margin: 0 0.15rem; vertical-align: baseline; }

.fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.fieldset legend {
  padding: 0 0.35rem;
  font-weight: 600;
}
.field { margin-bottom: 1rem; }
.field:last-child { margin-bottom: 0; }

.field-label-row {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}
.field-title { font-weight: 500; }

.field-help {
  display: inline-block;
  margin: 0;
  vertical-align: middle;
}
.field-help > summary {
  list-style: none;
  cursor: help;
}
.field-help > summary::-webkit-details-marker { display: none; }
.field-help-q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: #38444d;
  color: var(--fg);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}
.field-help-q.inline { display: inline-flex; vertical-align: middle; }
.field-help-q:hover { background: #4a5c6a; }
.field-help-text {
  margin-top: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: #1a2733;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 42rem;
  white-space: pre-line;
}

.form textarea.mono {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  max-width: 48rem;
}

details.advanced summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.35rem 0;
}
details.advanced .field { margin-top: 0.75rem; }

/* ----- Кнопки: <button> и <a class="btn"> ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.35;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
  box-sizing: border-box;
  font-family: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
/* Касание: достаточная зона для CI и основных действий (≈ Apple HIG 44pt) */
.step-ci-refresh-actions .btn,
.form .btn-primary,
.gen-toolbar .btn-secondary {
  min-height: 44px;
  padding-left: 1rem;
  padding-right: 1rem;
}
.btn--busy {
  opacity: 0.92;
}
a.btn { color: inherit; }

button.btn {
  font-family: inherit;
}

.btn-primary {
  font-size: 1rem;
  padding: 0.6rem 1.25rem;
  background: var(--accent);
  color: #fff !important;
  border-color: #1a8cd8;
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
}
.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  padding: 0.5rem 1rem;
  background: #38444d;
  border-color: var(--border);
  color: var(--fg) !important;
}
.btn-secondary:hover:not(:disabled) {
  background: #4a5c6a;
}

.btn-danger {
  padding: 0.5rem 1rem;
  background: #6b2a2a;
  border-color: #8a3a3a;
  color: #fff !important;
}
.btn-danger:hover:not(:disabled) {
  background: #843030;
}

.step-actions-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0 1.25rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #111a24;
}

.step-actions-bar--store-refresh .step-actions-bar__busy-hint {
  flex: 1 1 12rem;
  margin: 0;
}

.store-refresh-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.step-exec-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* После успеха: «К следующему шагу» — главное; «Повторить» — приглушённый серый */
.step-exec-actions .step-next-btn.btn-primary {
  font-weight: 600;
}

.step-exec-actions #step-repeat-btn.step-repeat-muted,
.step-exec-actions .btn-secondary.step-repeat-muted {
  opacity: 1;
  background: #2c3339 !important;
  color: #8b98a3 !important;
  border-color: #3d4c58 !important;
  font-weight: 500;
}
.step-exec-actions #step-repeat-btn.step-repeat-muted:hover:not(:disabled),
.step-exec-actions .btn-secondary.step-repeat-muted:hover:not(:disabled) {
  background: #343c44 !important;
  color: #a8b4bd !important;
  border-color: #4a5c6a !important;
}

.btn-nav {
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
  background: #1a2733;
  color: var(--fg) !important;
  border-color: var(--border);
}
.btn-nav:hover {
  background: #243041;
  border-color: #4a5c6a;
}

.btn-breadcrumb {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  background: #1a2733;
  color: var(--fg) !important;
  border-color: var(--border);
}
.btn-breadcrumb:hover {
  background: #243041;
  border-color: #4a5c6a;
}

.btn-inline {
  padding: 0.25rem 0.65rem;
  font-size: 0.88rem;
  font-weight: 500;
  background: #1a2733;
  color: var(--fg) !important;
  border-color: var(--border);
  vertical-align: baseline;
}
.btn-inline:hover {
  background: #243041;
  border-color: #4a5c6a;
}

.btn-ghost {
  background: #1a2733;
  color: var(--fg) !important;
  border-color: var(--border);
}
.btn-ghost:hover {
  background: #243041;
  border-color: #4a5c6a;
}

.btn-small {
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}

.btn-table {
  padding: 0.3rem 0.65rem;
  font-size: 0.88rem;
  font-weight: 500;
  background: #1a2733;
  color: var(--fg) !important;
  border-color: var(--border);
}
.btn-table:hover {
  background: #243041;
  border-color: #4a5c6a;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 1rem 0;
}
.breadcrumb .bc-sep {
  color: var(--muted);
  user-select: none;
  font-weight: 400;
}
.breadcrumb .bc-current {
  color: var(--muted);
  font-weight: 500;
  padding: 0.35rem 0;
}

.page-run-detail .container,
.page-step-detail .container,
.page-accounts .container {
  max-width: 1180px;
}

/* Страница шага: поток секций и пер-тематические герои */
.step-detail-flow {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  margin-top: 0.25rem;
}

.step-detail-surface {
  margin: 0;
}

.step-detail-surface__header {
  margin-bottom: 0.85rem;
}

.step-detail-surface__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.step-detail-surface__lead {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 52rem;
}

.step-detail-purpose {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  color: #a8c4dd;
  line-height: 1.45;
  max-width: 44rem;
}

.page-step-detail--docs .detail-hero--step {
  background:
    radial-gradient(circle at 0% 0%, rgba(46, 180, 140, 0.2), transparent 32rem),
    linear-gradient(135deg, #121c1a 0%, #101820 55%, #0d141c 100%);
  border-color: rgba(80, 140, 120, 0.55);
}

.page-step-detail--docs .eyebrow {
  color: #6ed4b0;
}

.page-step-detail--graphics .detail-hero--step {
  background:
    radial-gradient(circle at 100% 0%, rgba(160, 110, 220, 0.22), transparent 28rem),
    linear-gradient(135deg, #151222 0%, #101820 54%, #0d141c 100%);
  border-color: rgba(120, 100, 160, 0.5);
}

.page-step-detail--graphics .eyebrow {
  color: #c4a8f5;
}

.page-step-detail--full .detail-hero--step {
  background:
    radial-gradient(circle at top left, rgba(29, 155, 240, 0.18), transparent 34rem),
    linear-gradient(135deg, #131c27 0%, #101720 54%, #0d141c 100%);
}

.page-step-detail--ci_monitor .detail-hero--step {
  background:
    radial-gradient(circle at 80% 10%, rgba(230, 170, 70, 0.18), transparent 26rem),
    linear-gradient(135deg, #1a1814 0%, #101820 55%, #0d141c 100%);
  border-color: rgba(140, 120, 80, 0.5);
}

.page-step-detail--ci_monitor .eyebrow {
  color: #e8b86a;
}

.page-step-detail--store_refresh .detail-hero--step {
  background:
    radial-gradient(circle at 15% 90%, rgba(220, 100, 130, 0.16), transparent 30rem),
    linear-gradient(135deg, #1a1418 0%, #101820 55%, #0d141c 100%);
  border-color: rgba(140, 90, 110, 0.45);
}

.page-step-detail--store_refresh .eyebrow {
  color: #f0a0b8;
}

.page-step-detail--docs .step-detail-surface--actions {
  border-color: rgba(80, 140, 120, 0.35);
}

.page-step-detail--graphics .step-detail-surface--actions {
  border-color: rgba(120, 100, 160, 0.35);
}

.page-step-detail--ci_monitor .step-detail-surface--actions {
  border-color: rgba(140, 120, 80, 0.35);
}

.page-step-detail--store_refresh .step-detail-surface--actions {
  border-color: rgba(140, 90, 110, 0.35);
}

.step-detail-surface--primary .step-md-block--response {
  margin-top: 0;
}

.step-detail-surface--agent-stream .step-msg-scroll {
  margin-top: 0;
}

.step-detail-surface--ci-phase.step-ci-phase-progress:not(:empty) {
  padding: 1rem 1.1rem;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
  gap: 1rem;
  align-items: stretch;
  margin: 0 0 1.25rem;
  padding: 1.15rem;
  border: 1px solid rgba(82, 100, 118, 0.75);
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(29, 155, 240, 0.18), transparent 34rem),
    linear-gradient(135deg, #131c27 0%, #101720 54%, #0d141c 100%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.detail-hero-main {
  min-width: 0;
}

.detail-hero-breadcrumb {
  margin-bottom: 1rem;
}

.detail-hero h1 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.run-detail-apple-email {
  margin: 0.45rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.35;
}
.run-detail-apple-email-label {
  display: inline-block;
  margin-right: 0.45rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: #7ab8e8;
}
.run-detail-apple-email-copy {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: #9fd6ff;
  word-break: break-word;
  text-align: left;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}
.run-detail-apple-email-copy:hover,
.run-detail-apple-email-copy:focus-visible {
  color: #c9e9ff;
  text-decoration: underline;
}
.run-detail-apple-email-feedback {
  margin-left: 0.35rem;
  font-size: 0.78rem;
  color: #86efac;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: #7ab8e8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-subtitle {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.detail-hero-side {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  align-content: start;
}

.detail-stat-card {
  min-height: 4.7rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(82, 100, 118, 0.75);
  border-radius: 12px;
  background: rgba(12, 18, 26, 0.72);
}

.detail-stat-card--status {
  background: rgba(15, 28, 42, 0.82);
}

.detail-stat-label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-stat-card strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1.1;
}

.detail-hero-action {
  width: 100%;
  min-height: 42px;
}

.detail-status-pill {
  font-weight: 700;
  border: 1px solid transparent;
  text-transform: lowercase;
}

.detail-status-pill--completed,
.detail-status-pill--success,
.detail-status-pill--passed {
  background: #103a24;
  color: #7ee4a1;
  border-color: rgba(126, 228, 161, 0.22);
}

.detail-status-pill--warning {
  background: #3a2a10;
  color: #ffc978;
  border-color: rgba(255, 201, 120, 0.28);
}

.detail-status-pill--running,
.detail-status-pill--in_progress {
  background: #1a2d4a;
  color: #8fc1ff;
  border-color: rgba(143, 193, 255, 0.28);
}

.detail-status-pill--failed,
.detail-status-pill--error,
.detail-status-pill--cancelled {
  background: #3a1010;
  color: #ff9b9b;
  border-color: rgba(255, 155, 155, 0.28);
}

.detail-status-pill--pending,
.detail-status-pill--queued,
.detail-status-pill--not_started {
  background: #2a2f36;
  color: #b6c2cc;
  border-color: rgba(182, 194, 204, 0.16);
}

.detail-alert {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
}
.detail-alert--error {
  border: 1px solid rgba(244, 33, 46, 0.35);
  background: rgba(80, 18, 24, 0.38);
}
.detail-alert--warning {
  border: 1px solid rgba(255, 201, 120, 0.38);
  background: rgba(58, 42, 16, 0.45);
  color: var(--warn);
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.3rem 0 0.75rem;
}

.section-heading-row h2 {
  margin: 0;
}

.run-publication-card {
  margin: 0 0 1.35rem;
  padding: 1rem;
  border: 1px solid rgba(82, 100, 118, 0.72);
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(126, 228, 161, 0.10), transparent 22rem),
    #101822;
}

.run-publication-heading {
  margin: 0 0 0.85rem;
}

.run-publication-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.75rem;
}

.run-link-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  min-height: 8.5rem;
  padding: 0.9rem;
  border: 1px solid rgba(82, 100, 118, 0.68);
  border-radius: 14px;
  background: rgba(12, 18, 26, 0.74);
}

.run-link-card--pages {
  grid-column: span 2;
  background:
    linear-gradient(135deg, rgba(29, 155, 240, 0.18), rgba(12, 18, 26, 0.78)),
    rgba(12, 18, 26, 0.74);
}

.run-link-card-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.run-link-card strong {
  font-size: 1rem;
  line-height: 1.2;
}

.run-link-card-url {
  display: block;
  margin-top: auto;
  padding-top: 0.35rem;
  color: #7ab8e8;
  font-size: 0.86rem;
  line-height: 1.35;
  word-break: break-all;
  text-decoration: none;
}

.run-link-card-url:hover,
.run-link-card-url:focus-visible {
  color: #a8d8ff;
  text-decoration: underline;
}

@media (max-width: 820px) {
  .detail-hero {
    grid-template-columns: 1fr;
    padding: 0.95rem;
  }

  .detail-hero-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-hero-action {
    grid-column: 1 / -1;
  }

  .run-link-card--pages {
    grid-column: span 1;
  }
}

@media (max-width: 560px) {
  .detail-hero-side {
    grid-template-columns: 1fr;
  }
}

.account-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.account-list-item {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(82, 100, 118, 0.72);
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(29, 155, 240, 0.10), transparent 18rem),
    #111a24;
}

/* Аватары аккаунтов (инициалы + цвет из имени, в духе GitLab) */
.account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  vertical-align: middle;
  line-height: 0;
}
.account-avatar svg,
svg.account-avatar-svg {
  display: block;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.account-title-with-avatar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0;
}
.account-toolbar-avatar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.account-card-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.account-card-avatar {
  width: 48px;
  height: 48px;
}
.account-card-title {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.account-card-name {
  color: var(--fg);
  font-size: 1.1rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.account-card-name:hover,
.account-card-name:focus-visible {
  color: #a8d8ff;
  text-decoration: underline;
}
.account-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}
.account-delete-form {
  display: inline-flex;
}
.empty-state-card {
  margin-top: 1rem;
  padding: 1.25rem;
  border: 1px dashed rgba(139, 152, 165, 0.55);
  border-radius: 16px;
  background: #101822;
}
.empty-state-card h2 {
  margin: 0 0 0.4rem;
}

.run-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.run-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.run-list li:last-child {
  border-bottom: none;
}
.run-list-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.progressive-icon {
  opacity: 0.55;
  transform: scale(0.97);
  background: linear-gradient(110deg, #162231 8%, #203146 18%, #162231 33%);
  background-size: 200% 100%;
  animation: progressive-icon-shimmer 1.1s linear infinite;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.progressive-icon--loaded {
  opacity: 1;
  transform: scale(1);
  animation: none;
  background: #1a2733;
}
@keyframes progressive-icon-shimmer {
  to {
    background-position-x: -200%;
  }
}
.form-store-refresh .block-label {
  display: block;
  margin: 0.5rem 0;
}
.form-store-refresh .wide {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.store-refresh-product-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  margin: 0.85rem 0 1rem;
  padding: 0.85rem;
  border: 1px solid rgba(70, 84, 98, 0.82);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(247, 250, 252, 0.08), rgba(15, 23, 32, 0.48));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.store-refresh-product-icon {
  display: grid;
  place-items: center;
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(145deg, #f8fafc, #93c5fd 48%, #1d4ed8);
  color: rgba(15, 23, 42, 0.88);
  font-size: 2rem;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}
.store-refresh-product-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.store-refresh-product-main {
  min-width: 0;
}
.store-refresh-product-eyebrow {
  margin: 0 0 0.12rem;
  color: #8fc1ff;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}
.store-refresh-product-main h3 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.2;
}
.store-refresh-product-main p {
  margin: 0.22rem 0 0;
  color: var(--muted);
}
.store-refresh-product-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}
.store-refresh-product-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0 0.55rem;
  border: 1px solid rgba(124, 200, 248, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 32, 0.56);
  color: #dbeafe;
  font-size: 0.78rem;
}
.store-refresh-appstore-panel {
  margin: 0.9rem 0 1rem;
  border: 1px solid rgba(70, 84, 98, 0.86);
  border-radius: 14px;
  background: rgba(11, 18, 26, 0.78);
  overflow: hidden;
}
.store-refresh-tabbar {
  display: flex;
  gap: 0.2rem;
  padding: 0.38rem;
  border-bottom: 1px solid rgba(70, 84, 98, 0.76);
  background: rgba(229, 236, 244, 0.08);
}
.store-refresh-tab {
  flex: 1 1 0;
  min-height: 2.45rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #a9b7c5;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.store-refresh-tab:hover,
.store-refresh-tab:focus-visible {
  color: #eff6ff;
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}
.store-refresh-tab.is-active {
  background: rgba(248, 250, 252, 0.94);
  color: #101828;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}
.store-refresh-tab-panel {
  padding: 0.9rem;
}
.store-refresh-tab-panel[hidden] {
  display: none !important;
}
.store-refresh-panel-head {
  margin: 0 0 0.8rem;
}
.store-refresh-panel-head h3 {
  margin: 0;
  font-size: 1.05rem;
}
.store-refresh-panel-head p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}
.store-refresh-appstore-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.28rem;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(70, 84, 98, 0.58);
  border-radius: 12px;
  background: rgba(8, 13, 19, 0.42);
}
.store-refresh-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  margin: 0;
  padding: 0.25rem 0.72rem;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #aab7c5;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.store-refresh-pill input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.store-refresh-pill::before {
  content: "";
  width: 0.82rem;
  height: 0.82rem;
  border: 1px solid rgba(139, 152, 165, 0.76);
  border-radius: 999px;
  background: rgba(15, 23, 32, 0.95);
  box-shadow: inset 0 0 0 3px rgba(15, 23, 32, 0.95);
}
.store-refresh-pill:has(input:checked) {
  border-color: rgba(29, 155, 240, 0.5);
  background: rgba(29, 155, 240, 0.14);
  color: #d9f0ff;
}
.store-refresh-pill:has(input:checked)::before {
  border-color: #38bdf8;
  background: #38bdf8;
}
.store-refresh-settings-grid,
.store-refresh-inline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.75rem;
}
.store-refresh-settings-grid {
  margin-bottom: 0.75rem;
}
.store-refresh-card-grid {
  display: grid;
  gap: 0.75rem;
}
.store-refresh-card-grid--metadata {
  grid-template-columns: minmax(0, 0.9fr) minmax(18rem, 1.1fr);
  align-items: stretch;
  margin-bottom: 0.75rem;
}
.store-refresh-form-card {
  min-width: 0;
  padding: 0.78rem;
  border: 1px solid rgba(70, 84, 98, 0.62);
  border-radius: 12px;
  background: rgba(8, 13, 19, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.store-refresh-form-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.65rem;
}
.store-refresh-form-card-head h4 {
  margin: 0;
  color: #f2f6fb;
  font-size: 0.95rem;
}
.store-refresh-form-card-head span {
  color: #8b98a5;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}
.store-refresh-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}
.store-refresh-mode-card,
.store-refresh-toggle-card {
  position: relative;
  min-width: 0;
  margin: 0;
  border: 1px solid rgba(70, 84, 98, 0.54);
  border-radius: 10px;
  background: rgba(15, 23, 32, 0.46);
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}
.store-refresh-mode-card {
  display: grid;
  gap: 0.14rem;
  padding: 0.72rem 0.72rem 0.72rem 2.05rem;
}
.store-refresh-mode-card input,
.store-refresh-toggle-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.store-refresh-mode-card::before,
.store-refresh-toggle-card::before {
  content: "";
  position: absolute;
  left: 0.72rem;
  top: 0.82rem;
  width: 0.78rem;
  height: 0.78rem;
  border: 1px solid rgba(139, 152, 165, 0.76);
  background: rgba(7, 12, 18, 0.96);
  box-shadow: inset 0 0 0 2px rgba(7, 12, 18, 0.96);
}
.store-refresh-mode-card::before {
  border-radius: 999px;
}
.store-refresh-toggle-card::before {
  border-radius: 4px;
}
.store-refresh-mode-card span,
.store-refresh-toggle-card span {
  color: #eff6ff;
  font-weight: 800;
}
.store-refresh-mode-card small,
.store-refresh-toggle-card small {
  color: #8b98a5;
  font-size: 0.76rem;
  line-height: 1.25;
}
.store-refresh-mode-card:has(input:checked),
.store-refresh-toggle-card:has(input:checked) {
  border-color: rgba(56, 189, 248, 0.48);
  background: rgba(29, 155, 240, 0.12);
}
.store-refresh-mode-card:has(input:checked)::before,
.store-refresh-toggle-card:has(input:checked)::before {
  border-color: #38bdf8;
  background: #38bdf8;
}
.store-refresh-fixed-terms {
  margin-top: 0.7rem;
  transition: opacity 0.16s ease;
}
.store-refresh-name-localization:not(:has(input[value="partial"]:checked)) .store-refresh-fixed-terms,
.store-refresh-fixed-terms.is-disabled {
  opacity: 0.45;
}
.store-refresh-fixed-terms.is-disabled input {
  cursor: not-allowed;
}
.store-refresh-toggle-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}
.store-refresh-toggle-card {
  display: grid;
  gap: 0.12rem;
  padding: 0.68rem 0.72rem 0.68rem 2.05rem;
}
.store-refresh-toggle-card--wide {
  margin-bottom: 0.65rem;
}
.store-refresh-metadata-fields {
  display: grid;
  gap: 0.65rem;
}
.store-refresh-submit-grid {
  display: grid;
  grid-template-columns: minmax(18rem, 0.9fr) minmax(0, 1.1fr);
  gap: 0.75rem;
}
.store-refresh-form-card--review textarea[disabled] {
  opacity: 0.46;
  cursor: not-allowed;
}
.store-refresh-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.store-refresh-split-card {
  border: 1px solid rgba(70, 84, 98, 0.78);
  border-radius: 12px;
  padding: 0.75rem;
  background: rgba(8, 12, 16, 0.34);
}
.store-refresh-split-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}
.store-refresh-split-card--hard h3 {
  color: #fca5a5;
}
.store-refresh-split-card--light h3 {
  color: #93c5fd;
}
.store-refresh-locale-picker {
  margin: 0.35rem 0 0.65rem;
  border: 1px solid rgba(70, 84, 98, 0.56);
  border-radius: 10px;
  background: rgba(8, 13, 19, 0.54);
  overflow: hidden;
}
.store-refresh-locale-modes {
  display: flex;
  gap: 0.35rem;
  padding: 0.5rem;
  border-bottom: 1px solid rgba(70, 84, 98, 0.52);
}
.store-refresh-locale-mode {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 1.75rem;
  margin: 0;
  padding: 0.16rem 0.62rem;
  border: 1px solid rgba(82, 96, 107, 0.72);
  border-radius: 999px;
  background: rgba(17, 26, 36, 0.88);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.store-refresh-locale-mode input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.store-refresh-locale-mode::before {
  content: "";
  width: 0.78rem;
  height: 0.78rem;
  border: 1px solid rgba(139, 152, 165, 0.76);
  border-radius: 4px;
  background: rgba(15, 23, 32, 0.95);
  box-shadow: inset 0 0 0 2px rgba(15, 23, 32, 0.95);
}
.store-refresh-locale-mode:has(input:checked) {
  border-color: rgba(29, 155, 240, 0.82);
  background: rgba(29, 155, 240, 0.16);
  color: #d9f0ff;
}
.store-refresh-locale-mode:has(input:checked)::before {
  border-color: #38bdf8;
  background: #38bdf8;
}
.store-refresh-locale-mode.is-disabled,
.store-refresh-locale-row.is-disabled {
  cursor: not-allowed;
  opacity: 0.34;
}
.store-refresh-locale-mode.is-disabled:hover,
.store-refresh-locale-row.is-disabled:hover {
  border-color: transparent;
  background: rgba(15, 23, 32, 0.28);
}
.store-refresh-locale-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.28rem;
  max-height: 16rem;
  overflow: auto;
  padding: 0.5rem;
}
.store-refresh-locale-row {
  display: grid;
  grid-template-columns: 0.9rem 4.7rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  min-height: 2rem;
  margin: 0;
  padding: 0.28rem 0.48rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(15, 23, 32, 0.28);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.store-refresh-locale-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.store-refresh-locale-row::before {
  content: "";
  width: 0.82rem;
  height: 0.82rem;
  border: 1px solid rgba(139, 152, 165, 0.72);
  border-radius: 4px;
  background: rgba(7, 12, 18, 0.94);
  box-shadow: inset 0 0 0 2px rgba(7, 12, 18, 0.94);
}
.store-refresh-locale-row:hover {
  border-color: rgba(56, 189, 248, 0.26);
  background: rgba(29, 155, 240, 0.08);
}
.store-refresh-locale-row:has(input:checked) {
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(29, 155, 240, 0.12);
}
.store-refresh-locale-row:has(input:checked)::before {
  border-color: #38bdf8;
  background: #38bdf8;
}
.store-refresh-locale-code {
  font-family: ui-monospace, monospace;
  color: rgba(165, 215, 252, 0.95);
  white-space: nowrap;
  letter-spacing: 0;
}
.store-refresh-locale-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.form-store-refresh .store-refresh-pill,
.form-store-refresh .store-refresh-locale-mode,
.form-store-refresh .store-refresh-mode-card,
.form-store-refresh .store-refresh-toggle-card {
  display: inline-flex;
  margin-bottom: 0;
}
.form-store-refresh .store-refresh-mode-card,
.form-store-refresh .store-refresh-toggle-card {
  display: grid;
}
.form-store-refresh .store-refresh-locale-row {
  display: grid;
  margin-bottom: 0;
}
.store-refresh-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.4rem 0 1rem;
}
.store-refresh-upload-card {
  min-height: 5.2rem;
  padding: 0.7rem;
  border: 1px dashed rgba(124, 200, 248, 0.34);
  border-radius: 12px;
  background: rgba(15, 23, 32, 0.48);
}
.store-refresh-graphics-preview {
  margin: 0.75rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(70, 84, 98, 0.68);
}
.store-refresh-graphics-preview .step-graphics-grid {
  margin-top: 0.35rem;
}
.step-graphics-grid.store-refresh-screenshots-carousel {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.65rem;
  padding-bottom: 0.35rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 200, 248, 0.45) rgba(15, 20, 25, 0.35);
}
.step-graphics-grid.store-refresh-screenshots-carousel::-webkit-scrollbar {
  height: 7px;
}
.step-graphics-grid.store-refresh-screenshots-carousel::-webkit-scrollbar-thumb {
  background: rgba(124, 200, 248, 0.4);
  border-radius: 4px;
}
.step-graphics-grid.store-refresh-screenshots-carousel .step-graphics-item {
  flex: 0 0 auto;
  width: 7.6rem;
  max-width: min(30vw, 8.75rem);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}
.step-graphics-grid.store-refresh-screenshots-carousel .step-graphics-item a {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d1218;
}
.step-graphics-grid.store-refresh-screenshots-carousel .step-graphics-item img {
  width: 100%;
  height: auto;
  max-height: 11.5rem;
  object-fit: contain;
}
.step-graphics-grid.store-refresh-screenshots-carousel .step-graphics-caption {
  flex-shrink: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 760px) {
  .store-refresh-product-card {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .store-refresh-product-meta {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .store-refresh-tabbar {
    overflow-x: auto;
  }
  .store-refresh-tab {
    flex-basis: 8rem;
  }
  .store-refresh-split-grid {
    grid-template-columns: 1fr;
  }
  .store-refresh-card-grid--metadata,
  .store-refresh-submit-grid,
  .store-refresh-toggle-row,
  .store-refresh-mode-grid {
    grid-template-columns: 1fr;
  }
  .store-refresh-upload-grid {
    grid-template-columns: 1fr;
  }
}

.run-list-store-preview {
  flex: 1 0 100%;
  margin: 0.2rem 0 0;
  max-width: 100%;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#step-progress-root[data-step-progress-state="loading"] .step-msg-scroll {
  border-color: var(--accent);
  opacity: 0.95;
}

.step-msg--loading {
  padding: 0.65rem 0.85rem 0.75rem;
  border-bottom: none;
}

.step-progress-indeterminate {
  height: 5px;
  border-radius: 3px;
  background: #203047;
  overflow: hidden;
  position: relative;
  margin-bottom: 0.45rem;
}

.step-progress-indeterminate::after {
  content: "";
  position: absolute;
  left: -35%;
  top: 0;
  height: 100%;
  width: 38%;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: step-progress-slide 1.15s ease-in-out infinite;
}

@keyframes step-progress-slide {
  0% {
    left: -38%;
  }
  100% {
    left: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .step-progress-indeterminate::after {
    animation: none;
    left: 0;
    width: 100%;
    background: var(--accent);
    opacity: 0.35;
  }
}

.step-progress-loading-label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Прогресс-бар «n из N готово» для шага иконки и AI-скриншотов. */
.step-progress-bar {
  margin: 0.5rem 0 0.75rem;
  display: block;
}

.step-progress-bar__label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.step-progress-bar__track {
  height: 6px;
  border-radius: 3px;
  background: #203047;
  overflow: hidden;
  position: relative;
}

.step-progress-bar__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease-out;
  width: 0;
}

/* CI wait: GitLab + Codemagic weighted progress */
.step-ci-phase-progress {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: #15202b;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.step-ci-phase-progress__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}
.step-ci-phase-progress__hint {
  margin: 0 0 0.65rem !important;
}
.step-ci-phase-progress__total {
  margin-bottom: 0.85rem;
}
.step-ci-phase-progress__total-track {
  height: 10px;
  border-radius: 5px;
  background: #203047;
  overflow: hidden;
}
.step-ci-phase-progress__total-fill {
  height: 100%;
  background: linear-gradient(90deg, #3d8bfd, var(--accent));
  border-radius: 5px;
  transition: width 0.35s ease-out;
}
.step-ci-phase-progress__total-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.35rem;
}
.step-ci-phase-progress__track {
  margin-bottom: 0.75rem;
}
.step-ci-phase-progress__track:last-child {
  margin-bottom: 0;
}
.step-ci-phase-progress__track-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.84rem;
  margin-bottom: 0.25rem;
}
.step-ci-phase-progress__track-title {
  font-weight: 600;
}
.step-ci-phase-progress__track-meta {
  color: var(--muted);
  font-size: 0.78rem;
}
.step-ci-phase-progress__track-bar {
  height: 5px;
  border-radius: 3px;
  background: #203047;
  overflow: hidden;
  margin-bottom: 0.35rem;
}
.step-ci-phase-progress__track-fill {
  height: 100%;
  background: rgba(61, 139, 253, 0.85);
  transition: width 0.3s ease-out;
}
.step-ci-phase-progress__subs {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.78rem;
}
.step-ci-phase-progress__sub {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.step-ci-phase-progress__sub:last-child {
  border-bottom: none;
}
.step-ci-sub--pending .step-ci-phase-progress__sub-state {
  color: var(--muted);
}
.step-ci-sub--running .step-ci-phase-progress__sub-state {
  color: #ffc107;
}
.step-ci-sub--success .step-ci-phase-progress__sub-state {
  color: #6bcf7f;
}
.step-ci-sub--warning .step-ci-phase-progress__sub-state {
  color: #ffc978;
}
.step-ci-sub--failed .step-ci-phase-progress__sub-state {
  color: #f87171;
}
.step-ci-sub--skipped .step-ci-phase-progress__sub-state {
  color: #94a3b8;
}

.step-msg-scroll {
  background: #15202b;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 1rem;
}
.step-msg-list.step-msg-scroll-inner {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: min(28rem, 72vh);
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}
.step-msg {
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  line-height: 1.45;
}
.step-msg--phase {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
}
.step-msg:last-child {
  border-bottom: none;
}
.step-msg-md {
  min-height: 0;
}
.step-msg-md p {
  margin: 0 0 0.5rem;
}
.step-msg-md p:last-child {
  margin-bottom: 0;
}
.step-msg-md pre,
.step-md-block pre {
  margin: 0.5rem 0;
  padding: 0.65rem 0.75rem;
  background: #0d1218;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.35;
}
.step-msg-md code {
  font-family: ui-monospace, monospace;
  font-size: 0.88em;
  padding: 0.12rem 0.28rem;
  background: #0d1218;
  border-radius: 4px;
}
.step-msg-md pre code {
  padding: 0;
  background: none;
}
.step-msg-md ul,
.step-msg-md ol,
.step-md-block ul,
.step-md-block ol {
  margin: 0.35rem 0 0.5rem;
  padding-left: 1.35rem;
}
.step-msg-md li,
.step-md-block li {
  margin: 0.2rem 0;
}
.step-md-empty {
  color: var(--muted);
  font-style: italic;
  margin: 0;
}
.step-md-fallback {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.step-md-block {
  padding: 0.75rem 1rem;
  background: #15202b;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.step-md-block h1,
.step-md-block h2,
.step-md-block h3 {
  font-size: 1rem;
  margin: 0.75rem 0 0.4rem;
}
.step-md-block h1:first-child,
.step-md-block h2:first-child,
.step-md-block h3:first-child {
  margin-top: 0;
}
.step-fold {
  margin: 1rem 0 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #121820;
}
.step-fold-summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.65rem 1rem;
  list-style: none;
  user-select: none;
}
.step-fold-summary::-webkit-details-marker {
  display: none;
}
.step-fold-summary::before {
  content: "▸ ";
  opacity: 0.7;
}
.step-fold[open] .step-fold-summary::before {
  content: "▾ ";
}
.step-fold--prompt .step-md-block {
  margin: 0 1rem 1rem;
  border-radius: 6px;
}
.step-fold--edit .form-step-edit {
  padding: 0 1rem 1rem;
}
.form-step-edit label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}
.form-step-edit .step-edit-textarea {
  width: 100%;
  max-width: 40rem;
  min-height: 7rem;
  padding: 0.5rem 0.6rem;
  background: #15202b;
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  resize: vertical;
}
.step-flash-ok {
  color: #00ba7c;
}
.step-md-block--response {
  max-height: min(36rem, 80vh);
  overflow: auto;
}

.step-docs-hint {
  margin-bottom: 0.75rem;
}

.step-doc-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.step-doc-links-grid--reference {
  margin-top: 0.35rem;
}

.step-doc-card {
  border: 1px solid rgba(82, 100, 118, 0.75);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: rgba(12, 18, 26, 0.88);
}

.step-doc-card--pending {
  border-style: dashed;
  background: rgba(15, 22, 30, 0.55);
}

.step-doc-card__title {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 650;
}

.step-doc-card__path {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.step-doc-card__placeholder {
  margin: 0;
  font-size: 0.88rem;
  color: #9aa8b3;
  line-height: 1.45;
}

.step-doc-card__link {
  margin-top: 0.2rem;
}

.step-url-patch-panel {
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(29, 155, 240, 0.32);
  border-radius: 14px;
  background: rgba(12, 28, 45, 0.4);
}

.step-detail-surface--nested {
  margin-bottom: 0;
}

.step-graphics-mount {
  margin-top: 0.35rem;
}

.step-graphics-icon-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 1rem;
  border: 1px solid rgba(160, 110, 220, 0.35);
  border-radius: 14px;
  background: rgba(25, 18, 40, 0.42);
  margin-bottom: 1rem;
}

.step-graphics-icon-hero .step-graphics-item {
  max-width: 15rem;
  flex: 1 1 10rem;
}

.step-graphics-subblock {
  margin-top: 0.25rem;
}

.step-graphics-subhead {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
}

.step-graphics-subhint {
  margin: 0;
  text-align: center;
  width: 100%;
}

.step-graphics-grid--secondary .step-graphics-item img {
  max-height: 12rem;
  object-fit: contain;
}

.step-graphics-split {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .step-graphics-split {
    flex-direction: row;
    align-items: flex-start;
  }

  .step-graphics-split .step-graphics-panel {
    flex: 1 1 0;
    min-width: 0;
  }
}

.step-graphics-panel {
  border-radius: 12px;
  padding: 0.85rem 1rem 1rem;
  border: 1px solid var(--border);
}

.step-graphics-panel--marketing {
  background: rgba(14, 38, 30, 0.4);
  border-color: rgba(70, 150, 110, 0.38);
}

.step-graphics-panel--archive {
  background: rgba(38, 30, 22, 0.55);
  border-color: rgba(140, 100, 65, 0.42);
}

.step-graphics-panel-hint {
  margin: 0 0 0.75rem !important;
  font-size: 0.86rem !important;
}

.step-graphics-grid--archived .step-graphics-item {
  opacity: 0.72;
  filter: grayscale(0.3);
  position: relative;
}

.step-graphics-grid--archived .step-graphics-item::after {
  content: "архив";
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.12rem 0.38rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.58);
  color: #c8c8c8;
}

.step-graphics-item--screenshot_raw img {
  opacity: 0.88;
}

.step-doc-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.step-doc-links li {
  margin: 0.4rem 0;
}
.step-doc-links a {
  font-weight: 500;
}

.step-graphics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 1rem 1rem;
  margin-top: 0.75rem;
}
.step-graphics-item {
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #15202b;
}
.step-graphics-item img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 14rem;
  object-fit: contain;
  background: #0d1218;
}
.step-graphics-item a {
  display: block;
}
.step-graphics-caption {
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.35rem 0.45rem;
  word-break: break-all;
  line-height: 1.3;
}
.step-graphics-item a[data-lightbox-trigger] {
  cursor: zoom-in;
}

/* Встроенный просмотрщик графики (lightbox с prev/next и клавиатурой) */
.step-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.step-lightbox-overlay[hidden] { display: none !important; }
.step-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 11, 16, 0.92);
  backdrop-filter: blur(2px);
}
.step-lightbox-figure {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(92vw, 1100px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.step-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 3rem);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  background: #0d1218;
}
.step-lightbox-caption {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--fg);
  background: rgba(0, 0, 0, 0.55);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  max-width: 100%;
}
.step-lightbox-counter {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}
.step-lightbox-label {
  word-break: break-all;
  line-height: 1.25;
}
.step-lightbox-close,
.step-lightbox-nav {
  position: absolute;
  z-index: 2;
  background: rgba(20, 25, 32, 0.7);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, transform 0.12s ease;
}
.step-lightbox-close:hover,
.step-lightbox-nav:hover {
  background: rgba(40, 50, 60, 0.9);
}
.step-lightbox-close:focus-visible,
.step-lightbox-nav:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.step-lightbox-close {
  top: 1rem;
  right: 1rem;
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.7rem;
}
.step-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
}
.step-lightbox-nav--prev { left: 1rem; }
.step-lightbox-nav--next { right: 1rem; }
@media (max-width: 640px) {
  .step-lightbox-overlay { padding: 0.5rem; }
  .step-lightbox-nav {
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1.3rem;
  }
  .step-lightbox-nav--prev { left: 0.4rem; }
  .step-lightbox-nav--next { right: 0.4rem; }
  .step-lightbox-close {
    top: 0.4rem;
    right: 0.4rem;
    width: 2rem;
    height: 2rem;
  }
}
body.body-lightbox-open {
  overflow: hidden;
}
.inline-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, monospace;
}

.run-assets-links {
  margin: 0;
  padding-left: 1.25rem;
}

.run-list-item--highlight {
  background: rgba(29, 155, 240, 0.1);
  border-radius: 6px;
  padding-left: 0.5rem !important;
  margin-left: -0.5rem;
  border-bottom-color: transparent !important;
}

/* Подсветка только что созданного запуска в таблице /apps и /accounts/{id}/runs
   (см. ?highlight=<run_id>). Используем мягкий синий фон на всю строку и лёгкий
   левый бордер-акцент, чтобы не перекрасить колонки. */
.apps-row--highlight > td {
  background: rgba(29, 155, 240, 0.10);
}
.apps-row--highlight > td:first-child {
  box-shadow: inset 3px 0 0 0 rgb(29, 155, 240);
}

.form-run-execute-all {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}

.steps-phases .step-row {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  padding: 0.75rem;
  border: 1px solid rgba(82, 100, 118, 0.65);
  border-radius: 14px;
  background: #111a24;
}
.steps-phases .step-row:last-child {
  margin-bottom: 0;
}
.steps-phases .step-row--completed {
  border-color: rgba(126, 228, 161, 0.22);
}
.steps-phases .step-row--running {
  border-color: rgba(143, 193, 255, 0.42);
  background: linear-gradient(90deg, rgba(29, 155, 240, 0.12), #111a24 38%);
}
.steps-phases .step-row--failed {
  border-color: rgba(255, 155, 155, 0.34);
}
.steps-phases .step-row--warning {
  border-color: rgba(255, 201, 120, 0.32);
}
.step-row-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: #1a2733;
  color: #b6c2cc;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.step-row-main {
  min-width: 0;
}
.steps-phases .step-phase-title {
  display: inline-block;
  font-weight: 600;
  line-height: 1.25;
}
.steps-phases a.step-phase-title--link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.steps-phases a.step-phase-title--link:hover {
  border-bottom-color: var(--accent);
}
.step-row-error {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.86rem;
  line-height: 1.35;
}
.step-row-error--warning {
  color: var(--warn);
}
.steps-phases .step-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  justify-content: flex-end;
}
@media (max-width: 760px) {
  .steps-phases .step-row {
    grid-template-columns: 2.25rem minmax(0, 1fr);
  }

  .steps-phases .step-row > .pill,
  .steps-phases .step-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

.steps a.btn {
  margin-right: 0.35rem;
}

.field-email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1rem;
}
.field-email-row .field-pair {
  flex: 1 1 220px;
  min-width: min(100%, 220px);
}
.btn-email-chain {
  flex: 0 0 auto;
  align-self: center;
  margin-top: 1.45rem;
  padding: 0.15rem 0.3rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  line-height: 0;
  opacity: 0.55;
  transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-email-chain:hover,
.btn-email-chain:focus-visible {
  opacity: 1;
  color: var(--fg);
  background: rgba(26, 39, 51, 0.55);
  border-color: var(--border);
  outline: none;
}
.btn-email-chain[aria-pressed="false"] {
  opacity: 0.45;
}
.btn-email-chain svg {
  display: block;
}
.field-email-row:not(.is-unlinked) .icon-chain-broken {
  display: none;
}
.field-email-row.is-unlinked .icon-chain {
  display: none;
}
.field-email-row.is-unlinked .icon-chain-broken {
  display: block;
}

.gen-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.gen-live-log {
  margin-bottom: 1rem;
  max-height: 14rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.82rem;
  line-height: 1.35;
  background: #0d1218;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  color: var(--muted);
}

.gen-details {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  background: #15202b;
}
.gen-details summary { cursor: pointer; font-weight: 600; }
.gen-details .yaml { margin-top: 0.5rem; }

/* Step 2 idea-mode tabs (Поля-подсказки / Свой промпт). */
.idea-mode-tabs {
  display: flex;
  gap: 0.25rem;
  margin: 0.5rem 0 1rem;
  border-bottom: 1px solid var(--border);
}
.idea-mode-tab {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  padding: 0.5rem 0.95rem;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -1px;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.idea-mode-tab:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.04);
}
.idea-mode-tab:focus-visible {
  outline: 2px solid var(--accent, #4c6ef5);
  outline-offset: 2px;
}
.idea-mode-tab--active {
  color: var(--fg);
  background: var(--bg, #15202b);
  border-color: var(--border);
  border-bottom: 1px solid var(--bg, #15202b);
  font-weight: 600;
}
.idea-mode-pane {
  margin-bottom: 0.5rem;
}
.idea-mode-pane--hidden {
  display: none !important;
}
#field-user-full-prompt {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.45;
}
#user-full-prompt-counter.error {
  color: var(--danger, #c75252);
}

.ssh-guide-body {
  margin-top: 0.75rem;
  font-size: 0.92rem;
  color: var(--fg);
}
.ssh-guide-short p {
  margin: 0.55rem 0;
  line-height: 1.45;
}
.ssh-guide-short p:first-child {
  margin-top: 0;
}
.ssh-guide-code {
  margin: 0.4rem 0;
  padding: 0.65rem 0.85rem;
  background: #0d1218;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.35;
}
.ssh-guide-code code {
  font-family: ui-monospace, monospace;
  font-size: inherit;
}
.ssh-guide-body code {
  font-family: ui-monospace, monospace;
  font-size: 0.88em;
  padding: 0.1rem 0.25rem;
  background: #15202b;
  border-radius: 4px;
}
.field-ssh-codemagic .gen-details {
  margin-top: 0.75rem;
}
.field-ssh-codemagic .ssh-guide-block {
  margin-bottom: 1rem;
}

.gen-toolbar .btn-secondary {
  margin-top: 0;
}

.run-create-overlay,
.factory-busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 20, 25, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.run-create-overlay[hidden] {
  display: none !important;
}
.run-create-overlay-inner {
  background: #15202b;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  max-width: 22rem;
  text-align: center;
}
.run-create-overlay-title {
  font-weight: 600;
  margin: 0 0 0.35rem 0;
}
.factory-busy-spinner {
  width: 2.25rem;
  height: 2.25rem;
  margin: 0.75rem auto;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent, #1d9bf0);
  border-radius: 50%;
  animation: factory-busy-spin 0.75s linear infinite;
}
@keyframes factory-busy-spin {
  to {
    transform: rotate(360deg);
  }
}
.factory-busy-hint {
  margin: 0.5rem 0 0 0;
  max-width: 22rem;
}

/* Шаг «Пуш и статус GitLab / Codemagic» — кнопки обновления JSON */
.step-ci-refresh {
  margin: 1.5rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}
.step-ci-refresh h2 {
  font-size: 1.1rem;
  margin: 0 0 0.35rem 0;
}
.step-ci-refresh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}
.step-ci-retry-hint {
  margin: -0.35rem 0 1rem;
  font-size: 0.88rem;
}
.step-ci-refresh-panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 720px) {
  .step-ci-refresh-panels {
    grid-template-columns: 1fr 1fr;
  }
}
.step-ci-refresh-h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.35rem 0;
  color: var(--muted);
}
.step-ci-json {
  margin: 0;
  padding: 0.75rem;
  max-height: 22rem;
  overflow: auto;
  font-size: 0.78rem;
  line-height: 1.4;
  background: #15202b;
  border: 1px solid var(--border);
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.ci-refresh-panel {
  min-height: 2rem;
}
.ci-gitlab-wrap,
.ci-cm-wrap {
  font-size: 0.9rem;
}
.ci-pipeline-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
  margin: 0 0 0.75rem 0;
  align-items: baseline;
}
.ci-pipeline-dl dt {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}
.ci-pipeline-dl dd {
  margin: 0;
  word-break: break-word;
}
.ci-subh {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0.75rem 0 0.35rem 0;
}

.ci-job-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
}
.ci-job-table th,
.ci-job-table td {
  border: 1px solid var(--border);
  padding: 0.35rem 0.5rem;
  text-align: left;
}
.ci-job-table thead th {
  background: #15202b;
  color: var(--muted);
  font-weight: 600;
}
.step-ci-log {
  margin: 0;
  padding: 0.75rem;
  max-height: min(70vh, 28rem);
  overflow: auto;
  font-size: 0.75rem;
  line-height: 1.35;
  background: #0a0e12;
  border: 1px solid var(--border);
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}
.ci-warn {
  color: #e7ae4a;
}
.ci-json-details {
  margin-top: 0.75rem;
}
.ci-json-details summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.9rem;
}
.step-ci-json-inner {
  margin: 0.5rem 0 0 0;
  padding: 0.75rem;
  max-height: 16rem;
  overflow: auto;
  font-size: 0.72rem;
  background: #15202b;
  border: 1px solid var(--border);
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}
.ci-cm-source {
  margin: 0 0 0.5rem 0;
}

.step-icon-upload {
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid rgba(82, 100, 118, 0.72);
  border-radius: 14px;
  background: #111a24;
}
.step-icon-upload h2 {
  margin-top: 0;
}
.form-icon-upload .btn {
  min-height: 44px;
}

/* Codemagic: collapsible JSON tree */
.json-tree-root {
  font-size: 0.8rem;
  line-height: 1.45;
  max-height: min(70vh, 32rem);
  overflow: auto;
  padding: 0.5rem 0.75rem;
  background: #0a0e12;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 0.35rem;
}
.json-tree-node {
  margin: 0.15rem 0 0.15rem 0.5rem;
  border-left: 1px solid #2f3d4a;
  padding-left: 0.45rem;
}
.json-tree-node > summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 500;
  list-style: none;
}
.json-tree-node > summary::-webkit-details-marker {
  display: none;
}
.json-tree-node > summary::before {
  content: "▸ ";
  display: inline-block;
  width: 0.9em;
  color: var(--muted);
}
.json-tree-node[open] > summary::before {
  content: "▾ ";
}
.json-tree-children {
  margin-top: 0.25rem;
}
.json-tree-row {
  margin: 0.1rem 0;
  padding-left: 0.25rem;
}
.json-tree-key {
  color: #7ab8e8;
  font-weight: 500;
}
.json-str {
  color: #9ee6a8;
  word-break: break-word;
}
.json-num {
  color: #e7ae4a;
}
.json-bool,
.json-null {
  color: #c49ee6;
}
.json-empty {
  color: var(--muted);
}
.json-tree-max {
  color: var(--muted);
}

.ci-cm-log-steps {
  margin: 0.5rem 0 1rem 0;
}
.ci-cm-log-step {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.ci-cm-log-step:last-child {
  border-bottom: none;
}
.ci-cm-log-step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
}
.ci-cm-log-step--clickable {
  cursor: pointer;
  border-radius: 6px;
  padding: 0.25rem 0.35rem;
  margin-left: -0.35rem;
  margin-right: -0.35rem;
}
.ci-cm-log-step--clickable:hover {
  background: rgba(255, 255, 255, 0.04);
}
.ci-cm-step-status {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  min-width: 4.5rem;
  text-align: center;
  flex-shrink: 0;
}
.ci-cm-step-status--unknown {
  background: #2a3540;
  color: var(--muted);
}
.ci-cm-step-status--ok {
  background: #1e3d2e;
  color: #8fd9a8;
}
.ci-cm-step-status--fail {
  background: #3d1e24;
  color: #f0a8a8;
}
.ci-cm-step-status--run {
  background: #2a3040;
  color: #9ec5ff;
}
.ci-cm-step-status--queued {
  background: #353028;
  color: #e7c98a;
}
.ci-cm-step-name {
  font-weight: 500;
  flex: 1;
  min-width: 8rem;
}
.ci-cm-step-name--sub {
  padding-left: 0.65rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 400;
}
.ci-cm-no-log {
  font-size: 0.82rem;
  white-space: nowrap;
}
.ci-cm-step-log-pre {
  margin: 0.35rem 0 0 0;
  padding: 0.65rem;
  max-height: min(60vh, 24rem);
  overflow: auto;
  font-size: 0.75rem;
  line-height: 1.35;
  background: #0a0e12;
  border: 1px solid var(--border);
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Пошаговые формы (новый аккаунт, новый запуск) */
.wizard-progress-line {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 0.5rem 0;
}
.wizard-progress-track {
  height: 4px;
  background: #203047;
  border-radius: 2px;
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.wizard-progress-bar {
  height: 100%;
  width: 25%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.2s ease;
}
.wizard-step[hidden] {
  display: none !important;
}
.wizard-inline-error {
  margin: 0 0 0.75rem 0;
}
.wizard-account-summary {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
  line-height: 1.5;
  list-style: disc;
}
.wizard-account-summary li {
  margin: 0.4rem 0;
  word-break: break-word;
}
.wizard-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.wizard-nav-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.wizard-nav-actions .btn {
  min-height: 44px;
  padding: 0.6rem 1.25rem;
  font-size: 1rem;
  line-height: 1.25;
}
.wizard-nav-actions .btn-secondary {
  padding: 0.6rem 1.25rem;
}

.gitlab-pat-scopes-figure {
  margin: 0.75rem 0 0 0;
  max-width: min(100%, 28rem);
}
.gitlab-pat-scopes-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.gitlab-pat-scopes-figure figcaption {
  margin-top: 0.35rem;
}
.wizard-gitlab-instructions {
  margin-top: 0.75rem;
}

details.codemagic-settings-help {
  margin: 0.75rem 0 1rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  background: #15202b;
}
details.codemagic-settings-help[open] {
  padding-bottom: 0.75rem;
}
.codemagic-settings-help-summary {
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0;
  color: var(--accent);
}
.codemagic-settings-help-summary::-webkit-details-marker {
  display: none;
}
.codemagic-settings-help-summary::before {
  content: "❯";
  display: inline-block;
  font-size: 0.75rem;
  transition: transform 0.15s ease;
  opacity: 0.85;
}
details.codemagic-settings-help[open] .codemagic-settings-help-summary::before {
  transform: rotate(90deg);
}
.codemagic-help-steps {
  margin-top: 0.5rem;
}


/* ── /apps — сводная таблица всех запусков ────────────────────────────── */
.apps-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #111a24;
}
.apps-totals {
  margin-bottom: 1rem;
}
.apps-totals strong {
  color: var(--fg);
}
.apps-page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}
.apps-page-toolbar .hint {
  margin: 0;
}
.apps-new-run-menu {
  position: relative;
}
.apps-new-run-menu summary {
  list-style: none;
  cursor: pointer;
}
.apps-new-run-menu summary::-webkit-details-marker {
  display: none;
}
.apps-new-run-menu-list {
  position: absolute;
  right: 0;
  z-index: 20;
  min-width: 240px;
  margin-top: 0.45rem;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #111a24;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
}
.apps-new-run-menu-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  color: var(--fg);
  text-decoration: none;
}
.apps-new-run-menu-item:hover {
  background: #172433;
}
.apps-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}
.apps-pagination-summary {
  margin: 0;
}
.apps-pagination-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.apps-table {
  min-width: 960px;
}
.apps-table td, .apps-table th {
  vertical-align: top;
  white-space: nowrap;
}
.apps-table th.num, .apps-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.delete-app-status {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  line-height: 1.25;
  white-space: normal;
}
.delete-app-status[data-kind="running"] {
  color: #8fc1ff;
}
.delete-app-status[data-kind="running"]::before {
  content: "";
  display: inline-block;
  width: 0.72em;
  height: 0.72em;
  margin-right: 0.35em;
  border: 2px solid rgba(143, 193, 255, 0.32);
  border-top-color: #8fc1ff;
  border-radius: 50%;
  vertical-align: -0.12em;
  animation: factory-busy-spin 0.75s linear infinite;
}
.delete-app-status[data-kind="ok"] {
  color: #7ee4a1;
}
.delete-app-status[data-kind="error"] {
  color: #ff9b9b;
}
.apps-table td.apps-problems {
  white-space: normal;
  max-width: 320px;
}
.apps-subline {
  margin-top: 0.2rem;
  font-size: 0.82rem;
}
.apps-icon {
  display: inline-block;
}
.apps-icon--empty {
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  color: var(--muted);
  background: #0f1822;
  border: 1px dashed var(--border);
  border-radius: 8px;
}
.apps-steps-sep {
  color: var(--muted);
  margin: 0 0.15rem;
}
.account-avatar--xs {
  width: 24px;
  height: 24px;
  display: inline-flex;
  vertical-align: middle;
  margin-right: 0.3rem;
}
.pill--success {
  background: #103a24;
  color: #7ee4a1;
}
.pill--failed {
  background: #3a1010;
  color: #ff9b9b;
}
.pill--running {
  background: #1a2d4a;
  color: #8fc1ff;
}
.pill--neutral {
  background: #2a2f36;
  color: var(--muted);
}
/* Пилюля для «на рассмотрении» — тёплый янтарный: между run/success/fail. */
.pill--warning {
  background: #3a2a10;
  color: #ffc978;
}
/* Пилюля юнита: каждый юнит получает свой стабильный оттенок через CSS-переменную
   --unit-hue (выставляется inline-стилем из шаблона, фильтр `unit_hue` в Python
   хэширует имя юнита в 0..359). Все цвета строятся как hsl(var(--unit-hue), …),
   поэтому при добавлении нового юнита никаких правок в палитре не требуется.

   Фоллбэк: если --unit-hue не задан (старая вёрстка / кеш браузера) — остаётся
   прежний приглушённо-фиолетовый (265).
   Пилюля — ссылка на URL фильтра ?unit=<id>: hover-подсветка должна дать понять, что
   кликабельно. */
.pill--unit {
  --unit-hue: 265;
  background: hsl(var(--unit-hue), 38%, 22%);
  color: hsl(var(--unit-hue), 80%, 82%);
  border: 1px solid hsl(var(--unit-hue), 42%, 30%);
  text-decoration: none;
}
.apps-unit-pill:hover,
.apps-unit-pill:focus-visible {
  background: hsl(var(--unit-hue), 44%, 30%);
  color: hsl(var(--unit-hue), 90%, 90%);
  border-color: hsl(var(--unit-hue), 52%, 42%);
  text-decoration: underline;
}
.apps-unit-cell {
  min-width: 7rem;
  white-space: nowrap;
}
.apps-proxy-cell {
  min-width: 7rem;
  white-space: nowrap;
}
.apps-unit-cell--multi-account {
  border-right: 1px solid var(--border);
}
.apps-unit-empty {
  color: var(--muted);
}

/* Инлайн-редактор юнита в ячейке таблицы /apps: скрытая форма раскрывается над
   view-строкой (pill/«Задать юнит») по клику на ✎, появляется поле ввода
   c datalist-подсказками и кнопки Сохранить/Убрать/Отмена. */
.apps-unit-view {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}
.apps-unit-edit-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 0.25rem;
  border-radius: 4px;
  font-size: 0.85rem;
  line-height: 1.4;
}
.apps-unit-edit-btn:hover,
.apps-unit-edit-btn:focus-visible {
  color: var(--text);
  border-color: var(--border);
  background: #111820;
}
.apps-unit-editor[hidden],
.apps-saler-editor[hidden],
.apps-proxy-editor[hidden] { display: none; }
.apps-unit-editor,
.apps-saler-editor,
.apps-proxy-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.apps-unit-editor-input,
.apps-saler-editor-input,
.apps-saler-editor-select,
.apps-proxy-editor-input {
  min-width: 8rem;
  max-width: 14rem;
  padding: 0.25rem 0.4rem;
  font-size: 0.9rem;
}
.apps-saler-editor-select {
  min-width: 10rem;
  color: var(--fg);
  background: #15202b;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.apps-unit-editor-status,
.apps-saler-editor-status,
.apps-proxy-editor-status {
  font-size: 0.8rem;
}
.apps-unit-editor-status[data-kind="error"],
.apps-saler-editor-status[data-kind="error"],
.apps-proxy-editor-status[data-kind="error"] {
  color: #ffb3b3;
}

/* Unit в шапке карточки запуска (страница /runs/{id}) — одна и та же разметка
   `.apps-unit-cell`, но стилизуем как строку метаданных (подпись + pill/кнопки). */
.run-unit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.85rem 0 0;
  flex-wrap: wrap;
}
.run-unit-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.run-proxy {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.85rem 0 0;
  flex-wrap: wrap;
}
.run-proxy-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.apps-proxy-view {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}
.apps-proxy-name {
  font-size: 0.9rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

/* --- /apps: панель фильтра (Unit) над таблицей ------------------------------
   Компактная форма с одним select'ом (автосабмит на change). Кнопка «Сбросить»
   (.apps-filter-reset) появляется, только если фильтр активен.

   Сам select оформляем «с нуля»: убираем нативный вид браузера (-webkit-appearance
   и пр.), рисуем свой контур + кастомную стрелку SVG. Иначе на macOS/Chrome
   дропдаун выглядит как серая системная таблетка — выбивается из тёмной витрины. */
.apps-filter-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
  padding: 0.35rem 0.45rem 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #0f1822;
}
.apps-filter-label {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 600;
}
.apps-filter-select {
  min-width: 13rem;
  max-width: 22rem;
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  background-color: #15202b;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.2;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  /* SVG-стрелка подкрашена в --muted (#8b98a5). Если когда-то решим перекрасить
     — достаточно поменять hex в fill внутри data-URI. */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%238b98a5' d='M6 8 0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 10px 7px;
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}
.apps-filter-select:hover {
  border-color: #4a5a67;
  background-color: #17212b;
}
.apps-filter-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.2);
}
/* Нативный dropdown-список рисует сам браузер — стили применяются ограниченно,
   но тёмный фон опций хотя бы уберёт «белое полотно» на macOS Chrome. */
.apps-filter-select option {
  background: #15202b;
  color: var(--fg);
}
.apps-filter-reset {
  margin-left: 0.1rem;
}

/* --- Витрина /apps: сгруппированная таблица с аккордеоном по аккаунтам --- */
.apps-table--grouped tbody tr.apps-account-header > th {
  padding: 0;
  border-top: 1px solid var(--border);
  background: #111820;
}
.apps-account-cell {
  padding: 0;
}
.apps-account-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.apps-account-toggle:hover {
  background: #17212b;
}
.apps-account-caret {
  display: inline-block;
  width: 1em;
  color: var(--muted);
}
.apps-account-name {
  font-weight: 600;
}
.apps-account-name a {
  color: inherit;
  text-decoration: none;
}
.apps-account-name a:hover {
  text-decoration: underline;
}
.apps-account-count {
  margin-left: 0.5rem;
}
.apps-account-indent {
  display: inline-block;
  width: 1.5rem;
}
/* Первая колонка «Аккаунт (ASC)»: рендерим email всегда в том же стиле, что и у
   соло-строк. Для групп из нескольких приложений используем rowspan — ячейка
   визуально охватывает все строки группы, как «объединение ячеек» в Excel. */
.apps-asc-email-cell {
  min-width: 12rem;
  white-space: nowrap;
  overflow: visible;
}
.apps-asc-email {
  display: inline-block;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  color: var(--muted);
  font-size: 0.95em;
}
.apps-saler-inline {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.25rem;
  margin-top: 0.35rem;
  white-space: normal;
}
.apps-saler-view {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}
.apps-saler-pill {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}
/* Группа из нескольких приложений: email-ячейка выровнена по верху, с лёгким
   фоном и тонким правым бордером — чтобы «слияние» ячеек считывалось как в Excel. */
.apps-asc-email-cell--merged {
  vertical-align: top;
  padding-top: 0.9rem;
  background: #111820;
  border-right: 1px solid var(--border);
}
/* Колонка «Менеджер»: небольшой аватар + имя factory-аккаунта (ответственного за запуск).
   Та же история, что и с .apps-app-cell: flex — на inner-span, сам <td> остаётся table-cell,
   иначе менеджер и приложение «слипаются» в одну визуальную колонку. */
.apps-manager-cell {
  white-space: nowrap;
  min-width: 9rem;
}
.apps-manager-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
}
.apps-manager-name {
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
}
.apps-manager-name:hover {
  text-decoration: underline;
}
/* В ячейке приложения иконка и имя должны стоять в ряд — но flex применяем к внутреннему
   span, а не к самому <td>. Иначе у некоторых браузеров (Safari, WebKit старых версий)
   <td> с display:flex выпадает из колоночной раскладки таблицы и визуально склеивается
   с соседней ячейкой. Держим TD как table-cell, flex — на .apps-app-inner. */
.apps-app-cell { /* table-cell по умолчанию — не перекрываем */ }
.apps-app-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 100%;
}
.apps-app-name-wrap {
  display: inline-flex;
  flex-direction: column;
  min-width: 0;
}
/* ID запуска слева от названия: тот же кегль/жирность, что у .btn-table, цвета как у pill юнита. */
.apps-app-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  max-width: 22rem;
}
.apps-app-id-pill {
  display: inline-block;
  flex-shrink: 0;
  box-sizing: border-box;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.25;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  /* Цвет текста/фона: .apps-app-id-pill--no-unit в CSS; с юнитом — inline hsl в шаблоне. */
}
/* Нет юнита — не подкрашиваем случайным hue; текст ID белый на нейтральном фоне. */
.apps-app-id-pill--no-unit {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.apps-app-title-row .apps-app-name {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.apps-app-name {
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.apps-app-meta {
  display: block;
  font-size: 0.88em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 22rem;
}
.apps-build-status-cell {
  min-width: 7rem;
  width: 1%;
  vertical-align: top;
}
.apps-asc-cell {
  min-width: 18rem;
}
.apps-release-cell {
  min-width: 14rem;
  max-width: 18rem;
  white-space: normal;
}
.apps-release-cell--empty {
  min-width: 5rem;
  text-align: center;
  vertical-align: middle;
}
.apps-release-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.apps-release-statuses {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.apps-asc-status-line {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.apps-asc-meta,
.apps-build-meta {
  margin-top: 0.25rem;
}
.apps-asc-meta > summary,
.apps-build-meta > summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.8em;
  display: inline-block;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
}
.apps-asc-meta > summary::-webkit-details-marker,
.apps-build-meta > summary::-webkit-details-marker {
  display: none;
}
.apps-asc-meta > summary::before,
.apps-build-meta > summary::before {
  content: "▸ ";
  color: var(--muted);
}
.apps-asc-tracking-paused {
  margin-left: 0.25rem;
  color: #ff9b9b;
  font-size: 0.9em;
  vertical-align: middle;
}
.apps-asc-meta[open] > summary::before,
.apps-build-meta[open] > summary::before {
  content: "▾ ";
}
.apps-asc-meta > summary:hover,
.apps-asc-meta > summary:focus-visible,
.apps-build-meta > summary:hover,
.apps-build-meta > summary:focus-visible {
  background: #111820;
}
.apps-asc-meta-list {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  font-size: 0.85em;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.apps-asc-meta-list li {
  white-space: nowrap;
}
.apps-asc-meta-key {
  margin-right: 0.25rem;
}
.apps-asc-refresh-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 0.3rem;
  border-radius: 4px;
  font-size: 0.95rem;
  line-height: 1.4;
}
.apps-asc-refresh-btn:hover,
.apps-asc-refresh-btn:focus-visible {
  color: var(--text);
  border-color: var(--border);
  background: #111820;
}
.apps-asc-refresh-btn:disabled,
.apps-asc-refresh-btn.is-busy {
  cursor: progress;
  opacity: 0.7;
}
.apps-asc-manual-reason {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 24rem;
}
.apps-asc-manual-reason-view {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.pill--asc-manual-reason {
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #2b2138;
  color: #d8c4ff;
  border: 1px solid #46335f;
}
.apps-asc-manual-reason-edit-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 0.25rem;
  border-radius: 4px;
  font-size: 0.85rem;
  line-height: 1.4;
}
.apps-asc-manual-reason-edit-btn:hover,
.apps-asc-manual-reason-edit-btn:focus-visible {
  color: var(--text);
  border-color: var(--border);
  background: #111820;
}
.apps-asc-manual-reason-editor[hidden] { display: none; }
.apps-asc-manual-reason-editor {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.apps-asc-manual-reason-input {
  min-width: 14rem;
  max-width: 24rem;
  padding: 0.25rem 0.4rem;
  font-size: 0.9rem;
}
.apps-asc-manual-reason-status {
  font-size: 0.8rem;
}
.apps-asc-manual-reason-status[data-kind="error"] {
  color: #ffb3b3;
}
.apps-asc-reject {
  margin-top: 0.25rem;
}
.apps-asc-reject-text {
  font-size: 0.85em;
  max-width: 22rem;
  white-space: normal;
  margin-top: 0.25rem;
  color: var(--muted);
}
.apps-problem-details--inline {
  display: block;
  margin-top: 0.2rem;
}
.apps-problem-details summary {
  cursor: pointer;
  list-style: none;
}
.apps-problem-details summary::-webkit-details-marker {
  display: none;
}
.apps-problem-list {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
}
.apps-problem-list li + li {
  margin-top: 0.45rem;
}
.apps-problem-total {
  margin-left: 0.4rem;
}
.apps-problem-item {
  border-left: 2px solid transparent;
  padding: 0.2rem 0 0.2rem 0.6rem;
}
.apps-problem-item--active {
  border-left-color: #ff6b6b;
  color: #ff9b9b;
}
.apps-problem-item--resolved {
  border-left-color: #3a6d4a;
  color: var(--muted);
}
.apps-problem-item--cancelled {
  border-left-color: #c7b26b;
}
.apps-problem-item--reset {
  border-left-color: #8fc1ff;
}
.apps-problem-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: baseline;
}
.apps-problem-kind {
  font-weight: 600;
}
.apps-problem-resolved {
  margin-left: 0.2rem;
  font-size: 0.72rem;
}
.apps-problem-text {
  margin-top: 0.15rem;
  white-space: normal;
  word-break: break-word;
}
.apps-problem-item--resolved .apps-problem-text {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  opacity: 0.78;
}
.run-app-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.factory-app-archive-box {
  margin-top: 0.75rem;
  max-width: 24rem;
}
.factory-app-archive-line {
  margin: 0 0 0.35rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.factory-app-archive-bar {
  display: block;
  width: 100%;
  height: 0.5rem;
  vertical-align: middle;
  accent-color: var(--accent);
}
.factory-app-archive-err {
  color: var(--err);
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* Первый запуск: CTA с инструкцией Apple Developer / ASC */
.first-app-guide-banner {
  margin: 1rem 0 0.5rem 0;
  padding: 1rem 1.1rem 1.1rem;
  border-radius: 10px;
  border: 1px solid rgba(74, 158, 255, 0.45);
  background: linear-gradient(135deg, rgba(25, 80, 140, 0.35) 0%, rgba(12, 28, 48, 0.65) 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2) inset;
}
.first-app-guide-banner__text {
  margin: 0 0 0.9rem 0;
  color: #e8f0ff;
  line-height: 1.45;
  font-size: 0.95rem;
  max-width: 52em;
}
.btn-first-app {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  color: #0a1628;
  background: linear-gradient(180deg, #ffe066 0%, #f5b000 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: filter 0.12s ease, transform 0.1s ease;
}
.btn-first-app:hover {
  filter: brightness(1.06);
  text-decoration: none;
  color: #071018;
  transform: translateY(-1px);
}
.btn-first-app:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Страница-инструкция */
.first-app-guide .lead {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 50em;
  margin: 0.5rem 0 1.25rem 0;
}
.first-app-guide-section {
  margin: 1.5rem 0 1.25rem 0;
  max-width: 52em;
}
.first-app-guide-section h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
}
.first-app-guide-steps {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
  line-height: 1.45;
  color: #dbe6f0;
}
.first-app-guide-steps li {
  margin: 0.4rem 0;
}
.first-app-guide-steps ul {
  margin: 0.35rem 0 0.25rem 0;
  padding-left: 1.1rem;
}
.first-app-guide-figures {
  margin: 1.5rem 0 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.first-app-guide-figure {
  margin: 0;
  max-width: min(100%, 960px);
}
.first-app-guide-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.first-app-guide-figure figcaption {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
}
.first-app-guide-back {
  margin: 1.5rem 0 2rem 0;
}

body.portfolio-modal-open {
  overflow: hidden;
}

/* Доска портфеля (/portfolio) */
body.page-portfolio-board {
  background:
    radial-gradient(ellipse 120% 80% at 15% 0%, rgba(29, 155, 240, 0.14) 0%, transparent 52%),
    radial-gradient(ellipse 90% 60% at 95% 40%, rgba(139, 92, 246, 0.1) 0%, transparent 45%),
    var(--bg);
}

body.page-portfolio-board .container {
  max-width: min(100%, 1920px);
  padding: 1.25rem 1.25rem 2rem;
}

.portfolio-board-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid rgba(124, 200, 248, 0.22);
  background: linear-gradient(135deg, rgba(21, 32, 43, 0.95) 0%, rgba(18, 26, 36, 0.88) 50%, rgba(26, 35, 50, 0.92) 100%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.portfolio-board-hero-text {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  flex: 1 1 280px;
}
.portfolio-board-hero-icon {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(29, 155, 240, 0.35));
}
.portfolio-board-hero h1 {
  margin: 0 0 0.35rem 0;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}
.portfolio-board-hero-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 42rem;
}
.portfolio-board-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  align-self: center;
}
.portfolio-board-btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.portfolio-board-btn-glyph {
  font-size: 1.1rem;
  opacity: 0.9;
}

.portfolio-board-filters-wrap {
  margin-top: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(56, 68, 77, 0.75);
  background: rgba(17, 24, 32, 0.65);
}
.portfolio-board-filters-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
}
.portfolio-board-filters-heading {
  font-weight: 700;
  font-size: 0.88rem;
}
.portfolio-board-filters-heading .portfolio-filter-total-badge {
  margin-left: 0.35rem;
  font-weight: 800;
  font-size: 0.92em;
  font-variant-numeric: tabular-nums;
  color: #fbbf24;
  letter-spacing: 0.02em;
}
.portfolio-board-filter-count {
  font-size: 0.76rem;
  color: #93c5fd;
}
.portfolio-board-text-filter {
  flex: 1 1 19rem;
  min-width: min(100%, 14rem);
  max-width: 34rem;
  border: 1px solid rgba(56, 68, 77, 0.95);
  border-radius: 8px;
  padding: 0.36rem 0.58rem;
  background: rgba(15, 20, 25, 0.65);
  color: var(--fg);
  font: inherit;
  font-size: 0.84rem;
}
.portfolio-board-text-filter:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.portfolio-board-text-filter::placeholder {
  color: var(--muted);
}
.portfolio-filter-drop {
  position: relative;
}
.portfolio-filter-drop summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  background: rgba(29, 155, 240, 0.12);
  border: 1px solid rgba(124, 200, 248, 0.28);
  color: #bae6fd;
}
.portfolio-filter-drop summary::-webkit-details-marker {
  display: none;
}
.portfolio-filter-drop summary::after {
  content: " ▾";
  font-size: 0.7rem;
  opacity: 0.85;
}
.portfolio-filter-drop[open] summary::after {
  content: " ▴";
}
.portfolio-filter-drop--active > summary {
  background: rgba(251, 191, 36, 0.22);
  border-color: rgba(253, 224, 71, 0.55);
  color: #fffbeb;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.portfolio-filter-drop--active[open] > summary {
  background: rgba(251, 191, 36, 0.28);
  border-color: rgba(253, 224, 71, 0.68);
}
.portfolio-filter-body {
  position: absolute;
  z-index: 40;
  left: 0;
  top: calc(100% + 4px);
  min-width: min(320px, 92vw);
  max-height: 280px;
  overflow-y: auto;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(56, 68, 77, 0.95);
  background: rgba(15, 21, 28, 0.98);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.portfolio-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.8rem;
  padding: 0.28rem 0;
  cursor: pointer;
}
.portfolio-filter-row-label {
  flex: 1;
  line-height: 1.35;
  word-break: break-word;
}
.portfolio-filter-drop .portfolio-filter-body .portfolio-filter-cb {
  margin-top: 0.2rem;
}
.portfolio-filters-clear {
  margin-left: auto;
}

.portfolio-board-shell {
  margin-top: 0.35rem;
  min-height: calc(100vh - 14rem);
}

.portfolio-board-columns {
  position: relative;
  display: flex;
  flex-direction: row;
  gap: 0.85rem;
  overflow-x: auto;
  padding: 0.35rem 0.15rem 1rem;
  align-items: stretch;
  scroll-snap-type: x proximity;
  min-height: calc(100vh - 14rem);
}
.portfolio-board-columns.is-dragging-board {
  scroll-snap-type: none;
  scroll-behavior: auto;
}
.portfolio-board-columns.is-auto-scroll-left {
  box-shadow: inset 18px 0 18px -18px rgba(124, 200, 248, 0.7);
}
.portfolio-board-columns.is-auto-scroll-right {
  box-shadow: inset -18px 0 18px -18px rgba(124, 200, 248, 0.7);
}

.portfolio-board-col {
  --col-accent: var(--accent);
  --col-accent-dim: rgba(29, 155, 240, 0.15);
  flex: 0 0 278px;
  max-width: min(278px, 92vw);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 14.5rem);
  border-radius: 14px;
  padding: 0 0 0.65rem;
  border: 1px solid rgba(56, 68, 77, 0.85);
  background: linear-gradient(180deg, rgba(22, 30, 40, 0.92) 0%, rgba(15, 21, 28, 0.85) 100%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.portfolio-board-col[data-column-key="generation"] {
  --col-accent: #6366f1;
  --col-accent-dim: rgba(99, 102, 241, 0.18);
}
.portfolio-board-col[data-column-key="review"] {
  --col-accent: #eab308;
  --col-accent-dim: rgba(234, 179, 8, 0.15);
}
.portfolio-board-col[data-column-key="reject_release"] {
  --col-accent: #f43f5e;
  --col-accent-dim: rgba(244, 63, 94, 0.15);
}
.portfolio-board-col[data-column-key="app_store"] {
  --col-accent: #22c55e;
  --col-accent-dim: rgba(34, 197, 94, 0.15);
}
.portfolio-board-col[data-column-key="webview_in_store"] {
  --col-accent: #a855f7;
  --col-accent-dim: rgba(168, 85, 247, 0.15);
}
.portfolio-board-col[data-column-key="review_update"] {
  --col-accent: #06b6d4;
  --col-accent-dim: rgba(6, 182, 212, 0.15);
}
.portfolio-board-col[data-column-key="reject_update"] {
  --col-accent: #f97316;
  --col-accent-dim: rgba(249, 115, 22, 0.15);
}
.portfolio-board-col[data-column-key="push"] {
  --col-accent: #8b5cf6;
  --col-accent-dim: rgba(139, 92, 246, 0.15);
}
.portfolio-board-col[data-column-key="cash"] {
  --col-accent: #84cc16;
  --col-accent-dim: rgba(132, 204, 22, 0.15);
}
.portfolio-board-col[data-column-key="ban"] {
  --col-accent: #64748b;
  --col-accent-dim: rgba(100, 116, 139, 0.2);
}
.portfolio-board-col[data-column-key="bin"] {
  --col-accent: #ef4444;
  --col-accent-dim: rgba(239, 68, 68, 0.16);
}

.portfolio-board-col-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.65rem 0.75rem 0.55rem;
  margin: 0;
  border-radius: 13px 13px 0 0;
  border-bottom: 1px solid rgba(56, 68, 77, 0.65);
  background: linear-gradient(
    90deg,
    var(--col-accent-dim) 0%,
    rgba(21, 32, 43, 0.35) 65%
  );
  border-left: 3px solid var(--col-accent);
}
.portfolio-board-col-emoji {
  font-size: 1.15rem;
  line-height: 1;
}
.portfolio-board-col-title {
  font-size: 0.93rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  flex: 1 1 auto;
}
.portfolio-board-col-count {
  min-width: 1.55rem;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  color: #e5eef8;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.portfolio-board-auto-tag,
.portfolio-board-manual-tag {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  margin-left: auto;
}
.portfolio-board-auto-tag {
  color: #bfe9ff;
  background: rgba(29, 155, 240, 0.18);
  border: 1px solid rgba(124, 200, 248, 0.35);
}
.portfolio-board-manual-tag {
  color: var(--muted);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}
.portfolio-board-col-collapse {
  width: 100%;
  margin-top: 0.15rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.28rem 0.5rem;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.portfolio-board-col-collapse:hover {
  color: #ffffff;
  border-color: var(--col-accent);
  background: var(--col-accent-dim);
}

.portfolio-board-col-body {
  flex: 1 1 auto;
  min-height: 26rem;
  border-radius: 0 0 10px 10px;
  padding: 0.45rem 0.45rem 0.15rem;
}
.portfolio-board-col.is-collapsed {
  flex-basis: 11rem;
}
.portfolio-board-col.is-collapsed .portfolio-board-col-body {
  min-height: 12rem;
  display: flex;
  align-items: stretch;
}
.portfolio-board-collapsed-placeholder {
  width: 100%;
  min-height: 10rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 0.75rem;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.16);
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.35;
}
.portfolio-board-col.is-drag-over,
.portfolio-board-col-body.is-drag-over {
  outline: 2px dashed var(--col-accent);
  outline-offset: 2px;
  background: var(--col-accent-dim);
}

/* Карточка на доске */
.portfolio-board-card {
  position: relative;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  cursor: grab;
  overflow: hidden;
  border: 1px solid rgba(56, 68, 77, 0.75);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.portfolio-board-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  border-color: rgba(124, 200, 248, 0.35);
}
.portfolio-board-card:active {
  cursor: grabbing;
}
.portfolio-board-card.is-dragging {
  opacity: 0.65;
  transform: scale(0.98);
}
.portfolio-board-card.is-highlighted {
  box-shadow: 0 0 0 2px var(--accent), 0 8px 28px rgba(29, 155, 240, 0.25);
}

.portfolio-board-card-bg {
  position: absolute;
  inset: -12%;
  background-position: center;
  background-size: cover;
  opacity: 0.28;
  filter: saturate(1.15) blur(0.5px);
  transform: scale(1.05);
}
.portfolio-board-card-bg--empty {
  opacity: 1;
  background: radial-gradient(circle at 30% 20%, rgba(29, 155, 240, 0.18), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.12), transparent 45%),
    linear-gradient(145deg, #1a2431 0%, #121920 100%);
}
.portfolio-board-card-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    165deg,
    rgba(15, 20, 25, 0.35) 0%,
    rgba(15, 20, 25, 0.82) 55%,
    rgba(15, 20, 25, 0.94) 100%
  );
  pointer-events: none;
}

.portfolio-board-card-content {
  position: relative;
  z-index: 1;
  padding: 0.55rem 0.6rem 0.45rem;
}
.portfolio-board-card-top {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}
.portfolio-board-card-thumb {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.portfolio-board-card-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.25rem;
  background: rgba(29, 155, 240, 0.12);
  border: 1px dashed rgba(124, 200, 248, 0.35);
}
.portfolio-board-card-text {
  min-width: 0;
  flex: 1;
}
.portfolio-board-card-title {
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.25;
  padding-right: 1.65rem;
}
.portfolio-board-card-id {
  font-family: ui-monospace, monospace;
  font-weight: 600;
  font-size: 0.76rem;
  color: rgba(180, 215, 248, 0.95);
  margin-right: 0.2rem;
}
.portfolio-board-card-meta {
  font-size: 0.74rem;
  margin-top: 0.25rem;
  line-height: 1.35;
  color: var(--muted);
}
.portfolio-board-card-fw {
  color: #7cc8f8;
  font-weight: 600;
}
.portfolio-board-card-coverage {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(139, 152, 165, 0.92);
  font-size: 0.7rem;
}
.portfolio-board-card-store-link {
  position: absolute;
  top: 0.48rem;
  right: 0.5rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  text-decoration: none;
  background: rgba(15, 23, 32, 0.74);
  border: 1px solid rgba(124, 200, 248, 0.28);
  color: #dbeafe;
  font-size: 0.72rem;
  line-height: 1;
}
.portfolio-board-card-store-link:hover,
.portfolio-board-card-store-link:focus-visible {
  background: rgba(29, 155, 240, 0.24);
  border-color: rgba(124, 200, 248, 0.55);
  outline: none;
}
.portfolio-board-card-asc {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.45rem;
}
.portfolio-board-card-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(29, 155, 240, 0.18);
  border: 1px solid rgba(124, 200, 248, 0.28);
  color: #dbeafe;
}
.portfolio-board-card-asc-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border: 1px solid rgba(124, 200, 248, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 32, 0.72);
  color: #dbeafe;
  font-size: 0.78rem;
  line-height: 1;
  cursor: pointer;
}
.portfolio-board-card-asc-refresh:hover:not(:disabled),
.portfolio-board-card-asc-refresh:focus-visible {
  background: rgba(29, 155, 240, 0.24);
  border-color: rgba(124, 200, 248, 0.55);
  outline: none;
}
.portfolio-board-card-asc-refresh:disabled {
  cursor: wait;
  opacity: 0.7;
}
.portfolio-board-card-refresh-status {
  font-size: 0.68rem;
  color: var(--muted);
}
.portfolio-board-card-refresh-status[data-kind="running"] {
  color: #8fc1ff;
}
.portfolio-board-card-refresh-status[data-kind="ok"] {
  color: #7ee4a1;
}
.portfolio-board-card-refresh-status[data-kind="error"] {
  color: #ff9b9b;
}
.portfolio-board-age {
  display: inline-flex;
  align-items: center;
  gap: 0.16rem;
  min-height: 0.65rem;
  margin-left: auto;
}
.portfolio-board-age-dot {
  display: block;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.portfolio-board-age--day-1 {
  color: #22c55e;
}
.portfolio-board-age--day-2 {
  color: #84cc16;
}
.portfolio-board-age--day-3 {
  color: #eab308;
}
.portfolio-board-age--day-4 {
  color: #f97316;
}
.portfolio-board-age--day-5,
.portfolio-board-age--bar {
  color: #ef4444;
}
.portfolio-board-age-bar {
  display: block;
  width: 2.2rem;
  height: 0.32rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.portfolio-board-card[data-asc-status="published"] .portfolio-board-card-pill {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(74, 222, 128, 0.35);
  color: #bbf7d0;
}
.portfolio-board-card[data-asc-status="in_review"] .portfolio-board-card-pill {
  background: rgba(234, 179, 8, 0.18);
  border-color: rgba(253, 224, 71, 0.35);
  color: #fef08a;
}
.portfolio-board-card[data-asc-status="rejected"] .portfolio-board-card-pill,
.portfolio-board-card[data-asc-status="removed"] .portfolio-board-card-pill {
  background: rgba(244, 63, 94, 0.18);
  border-color: rgba(251, 113, 133, 0.35);
  color: #fecdd3;
}
/* Модальное окно карточки (центр экрана) */
.portfolio-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-bottom));
}

.portfolio-modal-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(8, 12, 18, 0.88) 0%, rgba(15, 22, 32, 0.92) 45%, rgba(29, 155, 240, 0.06) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.portfolio-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(540px, calc(100vw - 2rem));
  max-height: min(88vh, 860px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #1b2735 0%, #121920 42%, #0f1419 100%);
  border: 1px solid rgba(124, 200, 248, 0.28);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 -20px 60px rgba(29, 155, 240, 0.06) inset;
}

.portfolio-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0;
  flex-shrink: 0;
  position: relative;
  width: 100%;
}
.portfolio-modal-header-main {
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.portfolio-modal-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-position: center;
  background-size: cover;
  filter: saturate(1.1);
}
.portfolio-modal-hero-bg--empty {
  opacity: 1;
  background: radial-gradient(circle at 20% 30%, rgba(29, 155, 240, 0.25), transparent 55%),
    radial-gradient(circle at 90% 70%, rgba(139, 92, 246, 0.18), transparent 50%),
    linear-gradient(165deg, #1e3a5f 0%, #15202b 55%);
}
.portfolio-modal-hero-inner {
  position: relative;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 3rem 1rem 1.1rem;
  background: linear-gradient(180deg, rgba(18, 26, 36, 0.45) 0%, rgba(18, 26, 36, 0.92) 70%, rgba(18, 26, 36, 1) 100%);
}
.portfolio-modal-app-icon {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}
.portfolio-modal-app-icon--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: rgba(29, 155, 240, 0.12);
  border: 2px dashed rgba(124, 200, 248, 0.35);
}
.portfolio-modal-hero-text {
  min-width: 0;
}
.portfolio-modal-title {
  margin: 0 0 0.35rem 0;
  font-size: 1.2rem;
  line-height: 1.25;
}
.portfolio-modal-run-id {
  font-family: ui-monospace, monospace;
  font-weight: 600;
  font-size: 0.92em;
  color: rgba(165, 215, 252, 0.96);
  margin-right: 0.35rem;
}
/* Карусель скриншотов в модалке доски: один ряд, без высокой сетки */
.step-graphics-grid.portfolio-board-screenshots-carousel {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.65rem;
  margin-top: 0.65rem;
  padding-bottom: 0.35rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 200, 248, 0.45) rgba(15, 20, 25, 0.35);
}
.step-graphics-grid.portfolio-board-screenshots-carousel::-webkit-scrollbar {
  height: 7px;
}
.step-graphics-grid.portfolio-board-screenshots-carousel::-webkit-scrollbar-thumb {
  background: rgba(124, 200, 248, 0.4);
  border-radius: 4px;
}
.step-graphics-grid.portfolio-board-screenshots-carousel .step-graphics-item {
  flex: 0 0 auto;
  width: 7.6rem;
  max-width: min(30vw, 8.75rem);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}
.step-graphics-grid.portfolio-board-screenshots-carousel .step-graphics-item a {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d1218;
}
.step-graphics-grid.portfolio-board-screenshots-carousel .step-graphics-item img {
  width: 100%;
  height: auto;
  max-height: 11.5rem;
  object-fit: contain;
}
.step-graphics-grid.portfolio-board-screenshots-carousel .step-graphics-caption {
  flex-shrink: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.25rem 0.35rem;
  font-size: 0.68rem;
}
.portfolio-modal-subtitle {
  margin: 0 0 0.45rem 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}
.portfolio-modal-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
}
.portfolio-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(29, 155, 240, 0.16);
  border: 1px solid rgba(124, 200, 248, 0.28);
  color: #bae6fd;
}
.portfolio-modal-asc-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid rgba(124, 200, 248, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 32, 0.72);
  color: #dbeafe;
  font-size: 0.84rem;
  line-height: 1;
  cursor: pointer;
}
.portfolio-modal-asc-refresh:hover:not(:disabled),
.portfolio-modal-asc-refresh:focus-visible {
  background: rgba(29, 155, 240, 0.24);
  border-color: rgba(124, 200, 248, 0.55);
  outline: none;
}
.portfolio-modal-asc-refresh:disabled {
  cursor: wait;
  opacity: 0.72;
}
.portfolio-modal-refresh-status {
  font-size: 0.74rem;
  color: var(--muted);
}
.portfolio-modal-refresh-status[data-kind="running"] {
  color: #8fc1ff;
}
.portfolio-modal-refresh-status[data-kind="ok"] {
  color: #7ee4a1;
}
.portfolio-modal-refresh-status[data-kind="error"] {
  color: #ff9b9b;
}

.portfolio-modal-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 4;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 20, 25, 0.75);
  color: var(--fg);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.portfolio-modal-close:hover {
  background: rgba(244, 33, 46, 0.25);
  border-color: rgba(251, 113, 133, 0.45);
}

.portfolio-modal-body {
  padding: 0 1.05rem 1.15rem;
  overflow-y: auto;
  flex: 1;
}

.portfolio-modal-loading {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
}

.portfolio-modal-section {
  margin-bottom: 1.15rem;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  background: rgba(21, 32, 43, 0.55);
  border: 1px solid rgba(56, 68, 77, 0.65);
}
.portfolio-modal-section-title {
  margin: 0 0 0.65rem 0;
  font-size: 0.92rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.portfolio-modal-kv {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}
.portfolio-modal-kv > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: baseline;
  font-size: 0.84rem;
}
.portfolio-modal-k {
  color: var(--muted);
  min-width: 7rem;
}
.portfolio-modal-v {
  word-break: break-word;
}
.portfolio-modal-row {
  margin: 0.35rem 0;
}
.portfolio-modal-link-store {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: #7dd3fc;
}
.portfolio-modal-link-store:hover {
  color: #bae6fd;
}

.portfolio-modal-label {
  display: block;
  font-size: 0.78rem;
  margin: 0.45rem 0 0.2rem;
  color: var(--muted);
}
.portfolio-modal-input,
.portfolio-modal-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(56, 68, 77, 0.95);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  font: inherit;
  background: rgba(15, 20, 25, 0.65);
  color: inherit;
}
.portfolio-modal-select {
  min-height: 2.25rem;
}
.portfolio-modal-coverage-row {
  display: grid;
  grid-template-columns: minmax(8rem, 0.42fr) minmax(0, 1fr);
  gap: 0.45rem;
}
.portfolio-modal-coverage-picker {
  border: 1px solid rgba(56, 68, 77, 0.95);
  border-radius: 8px;
  background: rgba(15, 20, 25, 0.48);
  overflow: hidden;
}
.portfolio-modal-coverage-modes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem;
  border-bottom: 1px solid rgba(56, 68, 77, 0.7);
}
.portfolio-modal-coverage-mode {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  min-height: 2rem;
  padding: 0.2rem 0.48rem;
  border: 1px solid rgba(82, 96, 107, 0.85);
  border-radius: 7px;
  background: rgba(29, 155, 240, 0.06);
  font-size: 0.86rem;
  cursor: pointer;
}
.portfolio-modal-coverage-mode:has(input:checked) {
  border-color: rgba(29, 155, 240, 0.82);
  background: rgba(29, 155, 240, 0.16);
  color: #d9f0ff;
}
.portfolio-modal-coverage-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.2rem;
}
.portfolio-modal-coverage-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid rgba(82, 96, 107, 0.85);
  border-radius: 7px;
  background: rgba(15, 20, 25, 0.62);
  color: #c8d7e2;
  cursor: pointer;
}
.portfolio-modal-coverage-icon-btn:hover,
.portfolio-modal-coverage-icon-btn:focus-visible {
  border-color: rgba(29, 155, 240, 0.82);
  background: rgba(29, 155, 240, 0.16);
  color: #d9f0ff;
  outline: none;
}
.portfolio-modal-coverage-icon-btn svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.portfolio-modal-coverage-regions {
  max-height: 17.5rem;
  overflow: auto;
  padding: 0.45rem;
}
.portfolio-modal-coverage-regions.is-disabled {
  opacity: 0.48;
}
.portfolio-modal-country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.25rem 0.4rem;
  padding: 0.05rem 0.1rem 0.1rem;
}
.portfolio-modal-country-row {
  display: grid;
  grid-template-columns: 0.9rem 4.7rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  min-height: 2rem;
  margin: 0;
  padding: 0.28rem 0.48rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(15, 23, 32, 0.28);
  font-size: 0.84rem;
  cursor: pointer;
}
.portfolio-modal-country-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.portfolio-modal-country-row::before {
  content: "";
  width: 0.82rem;
  height: 0.82rem;
  border: 1px solid rgba(139, 152, 165, 0.72);
  border-radius: 4px;
  background: rgba(7, 12, 18, 0.94);
  box-shadow: inset 0 0 0 2px rgba(7, 12, 18, 0.94);
}
.portfolio-modal-country-row:hover {
  border-color: rgba(56, 189, 248, 0.26);
  background: rgba(29, 155, 240, 0.08);
}
.portfolio-modal-country-row:has(input:checked) {
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(29, 155, 240, 0.12);
}
.portfolio-modal-country-row:has(input:checked)::before {
  border-color: #38bdf8;
  background: #38bdf8;
}
.portfolio-modal-country-code {
  font-family: ui-monospace, monospace;
  color: rgba(165, 215, 252, 0.95);
  white-space: nowrap;
}
.portfolio-modal-country-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.portfolio-modal-country-row {
  display: grid;
}
@media (max-width: 640px) {
  .portfolio-modal-coverage-row {
    grid-template-columns: 1fr;
  }
  .portfolio-modal-country-grid {
    grid-template-columns: 1fr;
  }
}
.portfolio-modal-textarea {
  resize: vertical;
}
.portfolio-modal-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.portfolio-toast {
  position: fixed;
  z-index: 12000;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  max-width: min(28rem, calc(100vw - 2rem));
  padding: 0.55rem 1rem;
  border-radius: 8px;
  background: rgba(22, 32, 42, 0.96);
  border: 1px solid rgba(125, 211, 252, 0.35);
  color: #e8f4ff;
  font-size: 0.88rem;
  line-height: 1.35;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.portfolio-modal-secret {
  font-family: ui-monospace, monospace;
  word-break: break-all;
  font-size: 0.82rem;
}

.portfolio-activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.portfolio-activity-item {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.81rem;
  line-height: 1.35;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(56, 68, 77, 0.55);
}
.portfolio-activity-glyph {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.2;
  opacity: 0.95;
}
.portfolio-activity-body {
  min-width: 0;
}
.portfolio-activity-ts {
  color: var(--muted);
  font-size: 0.72rem;
}
.portfolio-activity-kind {
  font-weight: 600;
}
.portfolio-activity-text {
  margin-top: 0.15rem;
}

.run-board-link-row {
  margin: 0.25rem 0 0.75rem;
}

/* WebView интеграция — пост-пайплайновое действие. Цвет совпадает с колонкой
   `webview_in_store` доски портфеля, чтобы интеграция считывалась как одна сущность. */
.run-webview-integration {
  --webview-accent: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  background: rgba(168, 85, 247, 0.06);
}
.run-webview-integration h2 {
  margin-top: 0;
  color: var(--webview-accent);
}
.run-webview-integration .webview-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.run-webview-integration .webview-link-view,
.run-webview-integration .webview-link-editor {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.run-webview-integration .webview-link-input {
  flex: 1 1 320px;
  min-width: 0;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(168, 85, 247, 0.4);
  font-family: inherit;
  font-size: 0.95rem;
}
.run-webview-integration .webview-error {
  color: #c0392b;
}
.run-webview-integration .webview-bundle-sample-row {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  max-width: 100%;
}
.run-webview-integration .webview-bundle-sample-row > .hint:first-child {
  margin: 0;
}
.run-webview-integration .webview-bundle-sample-copy {
  display: inline-block;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: #6d28d9;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  text-align: left;
  word-break: break-all;
  max-width: 100%;
}
.run-webview-integration .webview-bundle-sample-copy:hover,
.run-webview-integration .webview-bundle-sample-copy:focus {
  color: #5b21b6;
}
.run-webview-integration .webview-bundle-sample-feedback {
  min-height: 1.25em;
  margin: 0;
}

/* Пилюля «WebView» в /apps и portfolio-board. Использует тот же фиолетовый акцент. */
.pill--webview {
  background: rgba(168, 85, 247, 0.12);
  color: #6d28d9;
  border: 1px solid rgba(168, 85, 247, 0.35);
  cursor: default;
  position: relative;
}
.pill--webview[data-webview-link]:hover,
.pill--webview[data-webview-link]:focus {
  background: rgba(168, 85, 247, 0.18);
}
.apps-webview-popover {
  position: absolute;
  z-index: 50;
  background: var(--bg, #fff);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  min-width: 280px;
  max-width: 480px;
  font-size: 0.9rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  display: none;
}
.apps-webview-popover.is-open {
  display: block;
}
.apps-webview-popover code {
  word-break: break-all;
  display: block;
  margin: 0.2rem 0;
}
.apps-webview-popover .apps-webview-input {
  width: 100%;
  padding: 0.3rem 0.5rem;
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 6px;
  margin-top: 0.3rem;
}
