:root {
  color-scheme: light;
  --ink: #172033;
  --ink-2: #344054;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #e6eaf0;
  --line-strong: #d7dde7;
  --page: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --navy: #132746;
  --navy-2: #1c365f;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eaf1ff;
  --teal: #0f9f93;
  --teal-soft: #e7f8f5;
  --green: #1f9d62;
  --green-soft: #eaf8f1;
  --orange: #d97706;
  --orange-soft: #fff4e5;
  --red: #d92d20;
  --red-soft: #fff0ee;
  --purple: #7357d6;
  --purple-soft: #f1edff;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 10px 30px rgba(17, 24, 39, 0.10);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --sidebar-width: 238px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.page h1[tabindex="-1"]:focus,
#confirm-title:focus {
  outline: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}

#auth-root > .entry-loading[role="status"] {
  display: grid;
  place-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  color: #1f555a;
  background: #faf9f7;
  text-align: center;
}

#auth-root[data-entry-pending="true"] {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: auto;
  background: #faf9f7;
}

#app-shell[data-entry-pending="true"] {
  visibility: hidden;
  pointer-events: none;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  color: #e7eef9;
  background:
    radial-gradient(circle at 12% 0%, rgba(204, 83, 184, 0.13), transparent 30%),
    linear-gradient(180deg, #211827 0%, #17233a 48%, #132746 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 106px;
  margin: 0;
  padding: 0 18px;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(38, 22, 34, 0.1);
  border-radius: 0;
  box-shadow: none;
}

.brand-lockup {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
}

.brand-signature-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 18px;
  white-space: nowrap;
}

.brand-wordmark {
  display: block;
  width: 128px;
  height: 11px;
  flex: 0 0 128px;
  background: #d400b2;
  -webkit-mask: url("/wavytalk-wordmark.svg") center / contain no-repeat;
  mask: url("/wavytalk-wordmark.svg") center / contain no-repeat;
}

.brand-cross {
  color: #f6c453;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.brand-yingxi {
  color: #d400b2;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.06em;
  line-height: 1;
}

.brand-descriptor {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  color: #ff6fff;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.brand-descriptor::before {
  width: 22px;
  height: 1px;
  flex: 0 0 22px;
  background: linear-gradient(90deg, #d400b2, #ff6fff);
  border-radius: 999px;
  content: "";
}

.login-wavytalk-mark {
  display: grid;
  overflow: hidden;
  place-items: center;
  background: #f35cf1;
}

.login-wavytalk-wordmark {
  position: relative;
  display: block;
  overflow: hidden;
  background: transparent;
}

.login-wavytalk-wordmark img,
.login-wavytalk-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.main-nav {
  display: grid;
  gap: 6px;
  padding: 18px 13px;
}

.nav-item {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  color: #b9c7da;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease, color 160ms ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgba(235, 104, 213, 0.18), rgba(132, 126, 220, 0.12));
  box-shadow: inset 3px 0 0 #e97ed6;
}

.nav-dashboard-group {
  display: grid;
  gap: 3px;
}

.nav-group-label {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  color: #d6e1f1;
  font-size: 13px;
  font-weight: 700;
}

.nav-submenu {
  display: grid;
  gap: 2px;
  padding-left: 31px;
}

.nav-subitem {
  min-height: 36px;
  gap: 8px;
  padding: 0 12px;
  font-size: 13px;
}

.nav-subitem > span:first-child {
  color: #7790b2;
  font-size: 18px;
  line-height: 1;
}

.nav-subitem.is-active > span:first-child {
  color: #e5a1dc;
}

.nav-icon {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
}

.nav-icon svg,
.topbar svg,
.button svg,
.search-field svg,
.privacy-note svg,
.mode-tab svg,
.drop-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-icon svg {
  width: 19px;
  height: 19px;
}

.nav-state {
  display: inline-flex;
  margin-left: auto;
  align-items: center;
  gap: 6px;
  color: #aebdd3;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-state::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: currentColor;
  border-radius: 50%;
  content: "";
}

.nav-state.is-connected {
  color: #69d5a5;
}

.nav-state.is-processing {
  color: #84aaf9;
}

.nav-state.is-attention {
  color: #f2bb66;
}

.nav-state.is-muted {
  color: #8494ac;
}

.nav-state[hidden] {
  display: none;
}

.sidebar-foot {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding: 14px;
}

.help-box {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 12px;
  color: inherit;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.help-box:hover {
  background: rgba(255, 255, 255, 0.09);
}

.help-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: #bcd0ff;
  border: 1px solid rgba(188, 208, 255, 0.35);
  border-radius: 50%;
  font-weight: 700;
}

.help-box strong,
.help-box span,
.user-chip strong,
.user-chip span {
  display: block;
}

.help-box strong,
.user-chip strong {
  color: #f5f8fd;
  font-size: 12px;
}

.help-box span,
.user-chip span {
  margin-top: 2px;
  color: #91a3bc;
  font-size: 11px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: #3c6cc1;
  border-radius: 50%;
  font-weight: 700;
}

.user-chip button {
  margin-left: auto;
  color: #91a3bc;
  background: none;
  border: 0;
  cursor: pointer;
}

.app-main {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  background: rgba(255, 255, 255, 0.93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.topbar-title span {
  color: var(--muted);
}

.topbar-title span::after {
  content: "/";
  margin-left: 9px;
  color: var(--line-strong);
}

.topbar-title strong {
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.release-history-trigger {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  font-size: 11px;
  white-space: nowrap;
}

.release-history-trigger svg {
  width: 15px;
  height: 15px;
}

.release-history-count {
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 9px;
  font-size: 9px;
  line-height: 1;
}

.prototype-note {
  padding: 5px 9px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
}

.prototype-note .cumulative-count {
  display: inline-block;
  min-width: 1.1ch;
  color: #d24b2f;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  text-align: center;
}

.prototype-note .cumulative-count.is-counting {
  animation: cumulative-count-pop 900ms ease-out;
}

@keyframes cumulative-count-pop {
  0% { filter: brightness(1.35); transform: translateY(2px) scale(0.94); }
  55% { filter: brightness(1.08); transform: translateY(-1px) scale(1.06); }
  100% { filter: brightness(1); transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .prototype-note .cumulative-count.is-counting {
    animation: none;
  }
}

.icon-button,
.mobile-menu {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 6px;
  height: 6px;
  background: var(--red);
  border: 1px solid #fff;
  border-radius: 50%;
}

.mobile-menu {
  display: none;
}

.analysis-scope-bar {
  position: sticky;
  top: 64px;
  z-index: 26;
  padding: 12px 30px;
  background: rgba(245, 247, 251, 0.88);
  border-bottom: 1px solid rgba(215, 221, 231, 0.8);
  backdrop-filter: blur(14px);
}

.analysis-scope-bar[hidden] {
  display: none;
}

.analysis-scope-shell {
  max-width: 1440px;
  margin: 0 auto;
  overflow: visible;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #dfe5ef;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(25, 45, 78, 0.08);
}

.analysis-scope-inner {
  display: grid;
  grid-template-columns: minmax(205px, 0.75fr) minmax(320px, 1.25fr) minmax(250px, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 12px 14px;
}

.analysis-scope-identity,
.analysis-scope-field,
.analysis-scope-summary-card {
  min-width: 0;
}

.analysis-scope-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.analysis-scope-identity > div,
.analysis-scope-field,
.analysis-scope-summary-card {
  display: grid;
  gap: 3px;
}

.analysis-scope-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #356fe5, #214db1);
  border-radius: 11px;
  box-shadow: 0 7px 16px rgba(37, 99, 235, 0.22);
}

.analysis-scope-icon svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.analysis-scope-identity span:not(.analysis-scope-icon),
.analysis-scope-field > span,
.analysis-scope-summary-card > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.analysis-scope-identity strong {
  font-size: 13px;
  line-height: 1.25;
}

.analysis-scope-identity small {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-scope-field > small {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-scope-field .searchable-filter-trigger {
  height: 42px;
  padding: 0 12px;
  background: #f9fbff;
  border-color: #cfd9ea;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
}

.analysis-scope-field .searchable-filter-trigger:hover {
  border-color: #9fb7e7;
  background: #f4f8ff;
}

.analysis-scope-field .searchable-filter-panel {
  width: max(100%, 380px);
}

.analysis-scope-field .batch-scope-panel {
  right: 0;
  left: auto;
  width: min(720px, calc(100vw - 90px));
  padding: 0;
  overflow: hidden;
}

.analysis-scope-field .searchable-filter-option {
  min-height: 40px;
  padding: 9px 10px;
}

#analysis-scope-summary {
  margin: 0;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-scope-summary-card {
  padding: 9px 11px;
  background: #f7f9fc;
  border: 1px solid #edf0f5;
  border-radius: 9px;
}

.analysis-scope-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.analysis-scope-actions .button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  font-size: 10px;
  white-space: nowrap;
}

.analysis-scope-actions .button svg,
#reset-analysis-scope svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.analysis-scope-actions .button.is-active {
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-color: #b9cdf5;
}

#reset-analysis-scope {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  padding: 0 5px;
  white-space: nowrap;
}

.analysis-scope-filters {
  padding: 14px;
  background: #f8fafd;
  border-top: 1px solid #e7ebf2;
  border-radius: 0 0 14px 14px;
}

.analysis-scope-filters[hidden] {
  display: none;
}

.analysis-scope-filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 11px;
}

.analysis-scope-filter-heading > div {
  display: grid;
  gap: 2px;
}

.analysis-scope-filter-heading strong {
  color: var(--ink-2);
  font-size: 11px;
}

.analysis-scope-filter-heading > div span {
  color: var(--muted);
  font-size: 9px;
}

.analysis-scope-result-pill {
  padding: 6px 9px;
  color: #1d5d45;
  background: var(--green-soft);
  border: 1px solid #ccebdc;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.analysis-scope-filters .dashboard-filter-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.analysis-scope-filters .dashboard-filter-grid label {
  gap: 3px;
}

.analysis-scope-filters .dashboard-filter-grid label > span {
  color: #58667b;
  font-size: 9px;
  font-weight: 700;
}

.analysis-scope-filters .dashboard-filter-grid input,
.analysis-scope-filters .dashboard-filter-grid select,
.analysis-scope-filters .searchable-filter-trigger {
  height: 38px;
  background: #fff;
  border-color: #dbe2ed;
  border-radius: 8px;
  font-size: 10px;
}

.analysis-scope-filters .filter-summary-row {
  margin-top: 11px;
  padding: 11px 2px 0;
  font-size: 10px;
}

.analysis-scope-sync-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.analysis-scope-sync-note i {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(31, 157, 98, 0.10);
}

.page-container {
  padding: 26px 30px 44px;
}

.page {
  max-width: 1440px;
  margin: 0 auto;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 5px;
  font-size: 18px;
  line-height: 1.35;
}

h3 {
  margin-bottom: 5px;
  font-size: 15px;
  line-height: 1.4;
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-panel {
  position: relative;
  display: grid;
  min-height: 286px;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 85% 25%, rgba(108, 154, 255, 0.22), transparent 32%),
    linear-gradient(122deg, #142b4e 0%, #1a3966 58%, #244a7b 100%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.hero-panel::after {
  position: absolute;
  right: -90px;
  bottom: -125px;
  width: 320px;
  height: 320px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: 42px 50px;
}

.hero-copy .eyebrow {
  color: #a9c5ff;
}

.hero-copy h1 {
  font-size: clamp(30px, 3.5vw, 42px);
}

.hero-copy p {
  max-width: 590px;
  margin-bottom: 24px;
  color: #c8d7e9;
  font-size: 15px;
  line-height: 1.8;
}

.hero-actions,
.result-actions,
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 120ms ease, background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.20);
}

.button-primary:hover:not(:disabled) {
  background: var(--blue-dark);
}

.button-secondary {
  color: var(--ink-2);
  background: var(--surface);
  border-color: var(--line-strong);
}

.hero-panel .button-secondary {
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

.button-tertiary {
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-color: transparent;
}

.button-block {
  width: 100%;
}

.button:disabled {
  color: #a4acb9;
  background: #edf0f4;
  border-color: #edf0f4;
  box-shadow: none;
  cursor: not-allowed;
}

.hero-visual {
  position: relative;
  min-height: 286px;
}

.floating-report {
  position: absolute;
  width: 240px;
  height: 170px;
  background: #f8fbff;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 13px;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.22);
}

.report-main {
  z-index: 2;
  top: 47px;
  right: 70px;
  padding: 20px;
  transform: rotate(1.5deg);
}

.report-back {
  top: 72px;
  right: 128px;
  opacity: 0.55;
  transform: rotate(-7deg);
}

.report-back span {
  display: block;
  width: 68%;
  height: 8px;
  margin: 24px 20px -13px;
  background: #dbe5f3;
  border-radius: 5px;
}

.mini-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-report-head span {
  width: 90px;
  height: 8px;
  background: #d4dfef;
  border-radius: 5px;
}

.mini-report-head b {
  display: grid;
  width: 40px;
  height: 34px;
  place-items: center;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 7px;
}

.mini-bars {
  display: flex;
  height: 65px;
  align-items: end;
  gap: 11px;
  margin: 19px 0 15px;
  padding: 0 6px;
  border-bottom: 1px solid #dfe6f0;
}

.mini-bars i {
  display: block;
  width: 20px;
  background: #7da6fa;
  border-radius: 4px 4px 0 0;
}

.mini-bars i:nth-child(1) { height: 31%; }
.mini-bars i:nth-child(2) { height: 56%; }
.mini-bars i:nth-child(3) { height: 42%; }
.mini-bars i:nth-child(4) { height: 82%; }
.mini-bars i:nth-child(5) { height: 68%; }

.mini-list {
  display: grid;
  gap: 7px;
}

.mini-list span {
  display: block;
  width: 92%;
  height: 6px;
  background: #e2e8f1;
  border-radius: 3px;
}

.mini-list span:nth-child(2) { width: 72%; }
.mini-list span:nth-child(3) { width: 84%; }

.floating-badge {
  position: absolute;
  z-index: 3;
  right: 35px;
  bottom: 46px;
  padding: 10px 14px;
  color: #255dbb;
  background: #fff;
  border-radius: 9px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
  font-size: 12px;
  font-weight: 700;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 13px;
}

.section-heading h2,
.section-heading p {
  margin: 0;
}

.section-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.text-button,
.row-action,
.recent-card-foot button,
.recent-link,
.icon-text-button {
  padding: 0;
  color: var(--blue);
  background: none;
  border: 0;
  cursor: pointer;
  font-weight: 600;
}

.text-button:disabled {
  color: var(--muted-2);
  cursor: not-allowed;
  opacity: 0.7;
}

.active-task-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.task-product-icon,
.result-product-mark {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #2b66da, #1d4da7);
  border-radius: 11px;
  font-size: 20px;
  font-weight: 700;
}

.task-main-info {
  min-width: 0;
  flex: 1;
}

.task-title-line,
.file-result-head,
.task-detail-head,
.result-header,
.sheet-title-row,
.table-toolbar,
.profile-row,
.metric-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.task-title-line h3 {
  margin: 0;
}

.task-title-line span,
.task-footer-line,
.recent-card p,
.recent-card-foot,
.task-history-table td span,
.task-detail-head p,
.result-header > div > p,
.sheet-description {
  color: var(--muted);
  font-size: 12px;
}

.status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.status-processing {
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.repair-status-note {
  display: block;
  margin-top: 6px;
  color: var(--color-text-secondary, #68758a);
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
}

.status-complete {
  color: #177b4c;
  background: var(--green-soft);
}

.status-warning {
  color: #a15c00;
  background: var(--orange-soft);
}

.status-neutral {
  color: var(--ink-2);
  background: #eef1f5;
}

.progress-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.progress-track,
.large-progress {
  overflow: hidden;
  height: 7px;
  flex: 1;
  background: #e8edf4;
  border-radius: 10px;
}

.progress-track span,
.large-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2e6ce4, #5c8ef0);
  border-radius: inherit;
  transition: width 500ms ease;
}

.progress-line strong {
  min-width: 38px;
  color: var(--blue-dark);
  font-size: 12px;
}

.task-footer-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
}

.task-footer-line > span,
.task-safe-note {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: var(--blue);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.recent-heading {
  margin-top: 32px;
}

.recent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.recent-card,
.new-analysis-card {
  min-height: 205px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.recent-card {
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.recent-card-button {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
}

.recent-card:hover {
  transform: translateY(-2px);
  border-color: #cbd8ef;
  box-shadow: 0 9px 24px rgba(25, 47, 86, 0.09);
}

.recent-card-top,
.recent-card-foot,
.recent-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.file-type-icon,
.file-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: #24724c;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
}

.file-type-icon.teal {
  background: #188d92;
}

.recent-card h3 {
  margin: 18px 0 3px;
  font-size: 16px;
}

.recent-metrics {
  justify-content: flex-start;
  margin: 19px 0;
}

.recent-metrics span {
  padding-right: 17px;
  color: var(--muted);
  border-right: 1px solid var(--line);
  font-size: 11px;
}

.recent-metrics span:last-child {
  border: 0;
}

.recent-metrics strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 14px;
}

.recent-card-foot {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.muted-card {
  opacity: 0.92;
}

.new-analysis-card {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--blue);
  background: transparent;
  border: 1.5px dashed #bac9e1;
  cursor: pointer;
}

.new-analysis-card span {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
  place-items: center;
  background: var(--blue-soft);
  border-radius: 50%;
  font-size: 24px;
}

.new-analysis-card small {
  margin-top: 4px;
  color: var(--muted);
}

.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.compact-intro h1 {
  margin-bottom: 7px;
  font-size: 28px;
}

.simple-steps {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.simple-steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-2);
  font-size: 12px;
}

.simple-steps li:not(:last-child)::after {
  width: 34px;
  height: 1px;
  margin: 0 10px;
  background: var(--line-strong);
  content: "";
}

.simple-steps span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  background: #e9edf3;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}

.simple-steps li.is-current {
  color: var(--blue-dark);
  font-weight: 700;
}

.simple-steps li.is-current span {
  color: #fff;
  background: var(--blue);
}

.create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: start;
}

.create-card,
.setup-card,
.task-detail-card,
.table-shell,
.sheet-panel,
.insight-card,
.chart-panel,
.summary-callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.create-card {
  min-height: 520px;
  padding: 22px;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  background: #f1f4f8;
  border-radius: 9px;
}

.hashtag-import-panel textarea {
  min-height: 132px;
}

.hashtag-platform-note {
  padding: 13px 15px;
  color: #184fae;
  background: var(--blue-soft);
  border-radius: 9px;
}

.hashtag-platform-note strong,
.hashtag-platform-note p {
  display: block;
}

.hashtag-platform-note strong {
  font-size: 12px;
}

.hashtag-platform-note p {
  margin: 4px 0 0;
  color: #4f6e9c;
  font-size: 11px;
  line-height: 1.6;
}

.hashtag-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}

.hashtag-form-grid .field-label {
  margin-top: 14px;
}

.hashtag-number-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hashtag-number-field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.hashtag-number-field span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
}

.hashtag-validation,
.hashtag-strict-note {
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
}

.hashtag-validation.is-valid { color: #18784b; }
.hashtag-validation.is-error { color: #b33a3a; }

.hashtag-strict-note {
  padding-left: 10px;
  border-left: 3px solid var(--orange);
  line-height: 1.55;
}

.mode-tab {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.mode-tab.is-active {
  color: var(--blue-dark);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

.import-panel {
  padding-top: 24px;
}

.drop-zone {
  position: relative;
  display: flex;
  min-height: 362px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 30px;
  text-align: center;
  background: #fbfcfe;
  border: 1.5px dashed #b9c6da;
  border-radius: 12px;
  transition: border-color 160ms ease, background 160ms ease;
}

.drop-zone.is-dragging {
  background: var(--blue-soft);
  border-color: var(--blue);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.drop-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 16px;
  place-items: center;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 15px;
}

.drop-icon svg {
  width: 25px;
  height: 25px;
}

.drop-zone h3 {
  margin-bottom: 7px;
  font-size: 17px;
}

.drop-zone p {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 12px;
}

.file-result {
  min-height: 362px;
  padding: 28px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.file-name-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-name-wrap strong,
.file-name-wrap span {
  display: block;
}

.file-name-wrap span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.scan-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 34px 0 20px;
}

.scan-summary > div {
  position: relative;
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.scan-summary strong,
.scan-summary small {
  display: block;
}

.scan-summary strong {
  margin: 7px 0 4px;
  font-size: 21px;
}

.scan-summary small {
  color: var(--muted);
  font-size: 11px;
}

.summary-dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.summary-dot.success { background: var(--green); }
.summary-dot.warning { background: var(--orange); }
.summary-dot.neutral { background: var(--muted-2); }

.friendly-tip {
  padding: 12px 14px;
  color: #226344;
  background: var(--green-soft);
  border-radius: 8px;
  font-size: 12px;
}

.field-label {
  display: block;
  margin: 18px 0 7px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
}

.field-label:first-child {
  margin-top: 0;
}

.field-help {
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 12px;
}

input[type="text"],
input[type="search"],
textarea,
select {
  width: 100%;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

input[type="text"],
input[type="search"],
select {
  height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 240px;
  padding: 13px;
  resize: vertical;
  line-height: 1.7;
}

.textarea-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.link-preview {
  display: grid;
  max-height: 145px;
  gap: 7px;
  overflow: auto;
  margin-top: 14px;
  padding: 12px;
  background: var(--surface-soft);
  border-radius: 8px;
}

.link-preview-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--ink-2);
  font-size: 11px;
}

.link-preview-row span:first-child {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  place-items: center;
  color: #18784b;
  background: var(--green-soft);
  border-radius: 50%;
  font-size: 10px;
}

.link-preview-row code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-card {
  position: sticky;
  top: 88px;
  padding: 22px;
}

.setup-card h2 {
  margin-bottom: 16px;
}

.output-note {
  display: flex;
  gap: 10px;
  margin: 24px 0 17px;
  padding: 13px;
  background: var(--blue-soft);
  border-radius: 9px;
}

.output-note-icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 50%;
  font-size: 11px;
}

.output-note strong {
  display: block;
  color: #184fae;
  font-size: 12px;
}

.output-note p {
  margin: 4px 0 0;
  color: #4f6e9c;
  font-size: 11px;
  line-height: 1.65;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 11px;
}

.privacy-note svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.task-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 18px;
}

.task-stats > div {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.task-stats span,
.task-stats strong,
.task-stats small {
  display: block;
}

.batch-monitor {
  margin: 18px 0;
  padding: 18px;
  background: linear-gradient(145deg, #f7faff, #ffffff 58%);
  border: 1px solid #dfe7f3;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.batch-monitor-heading,
.batch-monitor-card-head,
.batch-monitor-card-foot,
.batch-monitor-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.batch-monitor-heading h2 {
  margin: 3px 0 4px;
  font-size: 18px;
}

.batch-monitor-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.batch-monitor-summary {
  padding: 7px 10px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.batch-monitor-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.batch-monitor-card {
  min-width: 0;
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.batch-number {
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 800;
}

.batch-monitor-card h3 {
  margin: 11px 0 5px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-monitor-card > p {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.batch-workflow-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.batch-workflow-rail li {
  position: relative;
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 7px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.batch-workflow-rail li:not(:last-child)::after {
  position: absolute;
  z-index: 0;
  top: 13px;
  left: calc(50% + 16px);
  width: calc(100% - 32px);
  height: 2px;
  background: #e5eaf2;
  content: "";
}

.batch-workflow-rail i {
  position: relative;
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  background: #eef1f5;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #dce2eb;
  font-size: 10px;
  font-style: normal;
}

.batch-workflow-rail li.is-complete,
.batch-workflow-rail li.is-current {
  color: var(--blue-dark);
}

.batch-workflow-rail li.is-complete i {
  color: #fff;
  background: #5b8cdf;
  box-shadow: 0 0 0 1px #5b8cdf;
}

.batch-workflow-rail li.is-complete::after {
  background: #8eb1ed;
}

.batch-workflow-rail li.is-current i {
  color: #fff;
  background: var(--blue-dark);
  box-shadow: 0 0 0 4px var(--blue-soft);
}

.batch-workflow-rail.is-compact {
  margin: 14px 0 9px;
}

.batch-workflow-rail.is-compact li {
  gap: 5px;
  font-size: 8px;
}

.batch-workflow-rail.is-compact li:not(:last-child)::after {
  top: 10px;
  left: calc(50% + 12px);
  width: calc(100% - 24px);
}

.batch-workflow-rail.is-compact i {
  width: 21px;
  height: 21px;
  font-size: 8px;
}

.batch-next-action {
  margin-top: 12px;
  padding: 10px 11px;
  background: #f5f8fd;
  border-left: 3px solid #5b8cdf;
  border-radius: 0 7px 7px 0;
}

.batch-next-action > span,
.batch-next-action > strong {
  display: block;
}

.batch-next-action > span {
  color: var(--blue-dark);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
}

.batch-next-action > strong {
  margin-top: 3px;
  font-size: 11px;
}

.batch-next-action > p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.batch-monitor-progress {
  margin-top: 12px;
}

.batch-monitor-progress > div {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
}

.batch-monitor-progress > div strong {
  color: var(--ink-2);
  font-size: 10px;
}

.batch-monitor-progress > i {
  display: block;
  height: 5px;
  overflow: hidden;
  background: #edf1f7;
  border-radius: 999px;
}

.batch-monitor-progress > i b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #3b73df, #63a0f3);
  border-radius: inherit;
}

.batch-monitor-card-foot {
  margin-top: 12px;
  padding-top: 10px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 9px;
}

.repair-monitor {
  margin: 18px 0 24px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.repair-monitor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.repair-monitor-heading h2 {
  margin: 3px 0 4px;
  font-size: 18px;
}

.repair-monitor-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.repair-monitor-summary {
  padding: 7px 10px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.repair-monitor-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.repair-monitor-stats > div {
  padding: 11px 13px;
  background: #f7f9fc;
  border: 1px solid #e7ebf2;
  border-radius: 9px;
}

.repair-monitor-stats span,
.repair-monitor-stats strong {
  display: block;
}

.repair-monitor-stats span {
  color: var(--muted);
  font-size: 10px;
}

.repair-monitor-stats strong {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 20px;
}

.repair-monitor-table {
  margin-top: 0;
}

.repair-monitor-table .data-table {
  min-width: 1660px;
}

.repair-monitor-table .data-table td {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.repair-monitor-table .data-table th:nth-child(1) { min-width: 150px; }
.repair-monitor-table .data-table th:nth-child(2) { min-width: 90px; }
.repair-monitor-table .data-table th:nth-child(3) { min-width: 105px; }
.repair-monitor-table .data-table th:nth-child(4) { min-width: 180px; }
.repair-monitor-table .data-table th:nth-child(5) { min-width: 130px; }
.repair-monitor-table .data-table th:nth-child(6) { min-width: 105px; }
.repair-monitor-table .data-table th:nth-child(11) { min-width: 230px; }

.repair-video-link,
.repair-source-cell,
.repair-source-link,
.repair-shop-list {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.repair-video-link,
.repair-source-link {
  color: var(--blue);
  text-decoration: none;
}

.repair-video-link small,
.repair-source-cell small,
.repair-source-link small,
.repair-shop-list small,
.repair-time-cell small {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 500;
}

.repair-video-link:not(.is-disabled):hover code,
.repair-source-link:hover strong {
  text-decoration: underline;
}

.repair-video-link.is-disabled {
  color: var(--ink-2);
}

.repair-source-link {
  max-width: 210px;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.repair-source-link small,
.repair-source-cell small {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repair-shop-list {
  gap: 6px;
}

.repair-shop-list > span {
  display: flex;
  flex-direction: column;
}

.repair-shop-list.is-empty strong {
  color: var(--muted);
  font-weight: 600;
}

.repair-stage {
  white-space: nowrap;
}

.repair-time-cell > span {
  display: grid;
  grid-template-columns: 28px auto;
  gap: 4px;
  white-space: nowrap;
}

.repair-reason-cell {
  min-width: 220px;
  max-width: 340px;
}

.repair-reason-cell > span,
.repair-reason-cell > small {
  display: block;
}

.repair-reason-cell > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repair-reason-cell > small {
  margin-top: 3px;
  color: var(--muted-2);
}

.repair-resolved-mark {
  color: #23845c;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

/* Operations console */
.task-center .task-hero {
  padding-bottom: 8px;
}

.task-center .task-hero h1 {
  letter-spacing: -.035em;
}

.task-center .task-stats > div.is-warning {
  border-color: #f0cbb5;
  background: linear-gradient(145deg, #fffaf7, #fff3eb);
}

.task-center .task-stats > div.is-warning strong {
  color: #b65325;
}

.task-ops-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.task-ops-toolbar h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.task-ops-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.task-ops-filters {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.task-ops-filters label {
  display: grid;
  gap: 4px;
}

.task-ops-filters label > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.task-ops-filters input,
.task-ops-filters select {
  min-width: 150px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: 10px;
}

.task-ops-filters select {
  min-width: 138px;
}

.batch-table tbody tr.is-selected {
  background: #f5f8ff;
  box-shadow: inset 3px 0 #3267d6;
}

.batch-table td:first-child > small,
.batch-table td:nth-child(2) > small,
.batch-table td:nth-child(4) > small,
.batch-table td:nth-child(5) > small,
.ops-failure-table td:first-child > small {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 9px;
}

.batch-table-progress em {
  color: #b65325;
  font-style: normal;
  font-weight: 700;
}

.task-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.row-action.is-danger {
  color: #ad4a22;
  border-color: #efc7b3;
  background: #fff8f4;
}

.ops-card-stage {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid #e6ebf4;
  border-radius: 10px;
  background: #f8faff;
}

.ops-card-stage span,
.ops-card-stage small {
  color: var(--muted);
  font-size: 9px;
}

.ops-card-stage strong {
  justify-self: end;
  color: var(--ink-2);
  font-size: 12px;
}

.ops-card-stage small {
  grid-column: 1 / -1;
}

.ops-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 12px;
}

.ops-progress i {
  flex: 1;
  height: 5px;
  overflow: hidden;
  background: #e9edf5;
  border-radius: 999px;
}

.ops-progress i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3369db, #6c9ff2);
}

.ops-progress span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.ops-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.ops-card-metrics > div {
  padding: 8px;
  border-radius: 8px;
  background: #f7f8fb;
}

.ops-card-metrics dt {
  color: var(--muted);
  font-size: 8px;
}

.ops-card-metrics dd {
  margin: 3px 0 0;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 750;
}

.ops-card-metrics dd.is-danger {
  color: #b65325;
}

.ops-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.ops-detail-header h2 {
  margin: 5px 0 6px;
  font-size: 20px;
}

.ops-detail-header p,
.ops-detail-status small {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.ops-detail-status {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.ops-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 16px 0;
  padding: 13px 14px;
  border: 1px solid #dce4f2;
  border-radius: 11px;
  background: linear-gradient(135deg, #f7f9fe, #fff);
}

.ops-command-bar > div:first-child {
  display: grid;
  gap: 3px;
}

.ops-command-bar strong {
  color: var(--ink-2);
  font-size: 11px;
}

.ops-command-bar span {
  color: var(--muted);
  font-size: 9px;
}

.ops-command-bar > div:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.ops-danger-button {
  color: #a94a25;
  border-color: #ecc8b7;
}

.ops-run-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}

.ops-run-kpis > div {
  padding: 12px;
  border: 1px solid #e5e9f1;
  border-radius: 10px;
  background: #fff;
}

.ops-run-kpis span,
.ops-run-kpis strong {
  display: block;
}

.ops-run-kpis span {
  color: var(--muted);
  font-size: 9px;
}

.ops-run-kpis strong {
  margin-top: 5px;
  color: var(--ink-2);
  font-size: 13px;
}

.batch-worker-card dl {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.batch-subtask-error-detail {
  margin-top: 12px;
  padding: 10px 11px;
  border: 1px solid #efd0c1;
  border-radius: 8px;
  background: #fff8f4;
}

.batch-subtask-error-detail summary {
  color: #a94a25;
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
}

.batch-subtask-error-detail p {
  margin: 7px 0 0;
  color: #875139;
  font-size: 9px;
  line-height: 1.55;
}

.ops-failure-panel {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid #eccdbd;
  border-radius: 12px;
  background: #fffaf7;
}

.ops-section-head h3 {
  margin: 4px 0;
  color: #8f4524;
  font-size: 14px;
}

.ops-section-head p {
  margin: 0 0 12px;
  color: #98644b;
  font-size: 9px;
}

.ops-failure-table {
  min-width: 780px;
}

.root-cause-badge,
.affected-badge {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 8px;
  white-space: nowrap;
}

.root-cause-badge {
  color: #a74620;
  background: #ffeadf;
}

.affected-badge {
  color: #6f645e;
  background: #f0ece9;
}

.ops-error-cell {
  max-width: 520px;
}

.ops-error-cell span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-secondary-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.ops-secondary-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.ops-secondary-panel > summary span,
.ops-secondary-panel > summary strong,
.ops-secondary-panel > summary small {
  display: block;
}

.ops-secondary-panel > summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.ops-secondary-panel > div {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 14px 14px;
}

.ops-secondary-panel dl {
  display: flex;
  gap: 28px;
  margin: 0;
}

.ops-secondary-panel dt {
  color: var(--muted);
  font-size: 8px;
}

.ops-secondary-panel dd {
  margin: 3px 0 0;
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .task-ops-toolbar,
  .ops-command-bar,
  .ops-detail-header {
    align-items: stretch;
    flex-direction: column;
  }

  .task-ops-filters {
    flex-wrap: wrap;
  }

  .ops-detail-status {
    justify-items: start;
  }

  .ops-command-bar > div:last-child {
    justify-content: flex-start;
  }

  .ops-run-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .release-banner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin: 8px 12px 0;
    padding: 10px 11px;
  }

  .release-banner time { display: none; }
  .release-banner-copy p { display: -webkit-box; overflow: hidden; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

  .release-history-dialog {
    max-height: calc(100vh - 20px);
    padding: 22px 17px;
  }

  .release-history-heading h2 {
    font-size: 20px;
  }

  .release-history-summary {
    flex-wrap: wrap;
  }

  .release-history-summary > span {
    flex: 1 1 120px;
    min-width: 0;
  }

  .release-history-entry header {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .task-ops-filters,
  .task-ops-filters label,
  .task-ops-filters input,
  .task-ops-filters select,
  .task-ops-filters button {
    width: 100%;
  }

  .ops-run-kpis,
  .batch-worker-card dl {
    grid-template-columns: 1fr 1fr;
  }

  .ops-secondary-panel > div,
  .ops-secondary-panel dl {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 1180px) {
  .batch-monitor-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .batch-monitor-heading,
  .repair-monitor-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .batch-monitor-list {
    grid-template-columns: 1fr;
  }

  .repair-monitor-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.task-stats span {
  color: var(--muted);
  font-size: 12px;
}

.task-stats strong {
  margin: 5px 0 2px;
  font-size: 25px;
}

.task-stats small {
  color: var(--muted-2);
  font-size: 10px;
}

.task-detail-card {
  padding: 24px;
}

.task-detail-head h2 {
  margin: 9px 0 4px;
  font-size: 20px;
}

.task-detail-head p {
  margin: 0;
}

.task-percent {
  text-align: right;
}

.task-percent strong,
.task-percent span {
  display: block;
}

.task-percent strong {
  color: var(--blue-dark);
  font-size: 28px;
}

.task-percent span {
  color: var(--muted);
  font-size: 11px;
}

.large-progress {
  height: 9px;
  margin: 20px 0 28px;
}

.business-progress {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.business-progress li {
  position: relative;
  display: flex;
  gap: 10px;
  min-width: 0;
  padding-right: 12px;
}

.business-progress li::after {
  position: absolute;
  z-index: 0;
  top: 15px;
  right: 0;
  left: 32px;
  height: 2px;
  background: #e4e8ef;
  content: "";
}

.business-progress li:last-child::after {
  display: none;
}

.business-progress li > span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--muted-2);
  background: #eef1f5;
  border: 3px solid var(--surface);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 0 0 1px #e2e7ee;
}

.business-progress li.is-complete > span {
  color: #fff;
  background: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}

.business-progress li.is-complete::after {
  background: #70c59b;
}

.business-progress li.is-current > span {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}

.business-progress strong,
.business-progress small {
  display: block;
}

.business-progress strong {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-top: 5px;
  padding-right: 6px;
  background: var(--surface);
  font-size: 12px;
}

.business-progress small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.task-safe-note {
  margin-top: 28px;
  padding: 12px 14px;
  color: var(--ink-2);
  background: var(--surface-soft);
  border-radius: 8px;
  font-size: 11px;
}

.task-safe-note > span:not(.pulse-dot) {
  color: var(--muted);
}

.task-eta {
  margin-left: auto;
}

.search-field {
  display: flex;
  height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.search-field svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--muted);
}

.search-field input {
  height: 34px;
  padding: 0;
  border: 0;
  outline: 0;
}

.compact-search {
  width: 220px;
}

.table-shell {
  overflow: hidden;
}

.table-scroll {
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.compact-video-table {
  min-width: 920px;
}

.data-table th,
.data-table td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table th {
  color: #596579;
  background: #f7f9fc;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.data-table td {
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.6;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover td {
  background: #fbfcfe;
}

.task-history-table td strong,
.task-history-table td span {
  display: block;
}

.task-history-table td span {
  margin-top: 2px;
}

.result-header {
  align-items: center;
  margin-bottom: 18px;
}

.result-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.result-title-row h1 {
  margin: 0;
  font-size: 26px;
}

.result-title-row .eyebrow {
  margin-bottom: 2px;
}

.result-header > div > p {
  margin: 8px 0 0 58px;
}

.result-back {
  margin-bottom: 12px;
}

.result-product-mark {
  width: 46px;
  height: 46px;
  border-radius: 10px;
}

.result-workspace {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  min-height: 720px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.sheet-sidebar {
  background: #f8fafc;
  border-right: 1px solid var(--line);
}

.sheet-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 15px 13px;
  border-bottom: 1px solid var(--line);
}

.sheet-sidebar-head strong {
  font-size: 13px;
}

.sheet-sidebar-head span {
  color: var(--muted);
  font-size: 10px;
}

.sheet-group-label {
  display: block;
  padding: 17px 15px 6px;
  color: #9099a8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.sheet-nav-button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 47px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  padding: 7px 15px;
  color: #596579;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
}

.sheet-nav-name {
  display: block;
  line-height: 1.35;
}

.sheet-nav-hint {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.3;
}

.sheet-nav-button.is-active .sheet-nav-hint {
  color: #5874a0;
}

.sheet-nav-button:hover {
  color: var(--blue-dark);
  background: #f0f5ff;
}

.sheet-nav-button.is-active {
  color: var(--blue-dark);
  background: #eaf1ff;
  font-weight: 700;
}

.sheet-nav-button.is-active::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--blue);
  content: "";
}

.sheet-content-area {
  min-width: 0;
  padding: 23px;
  background: #fff;
}

.sheet-mobile-select-wrap {
  display: none;
}

.empty-table-message {
  padding: 28px !important;
  color: var(--muted);
  text-align: center !important;
}

.mobile-scroll-hint {
  display: none;
}

.sheet-title-row {
  align-items: flex-end;
  margin-bottom: 18px;
}

.sheet-title-row h2 {
  margin: 0;
  font-size: 21px;
}

.sheet-description {
  max-width: 690px;
  margin: 5px 0 0;
  line-height: 1.7;
}

.sheet-tag {
  padding: 5px 8px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 10px;
  white-space: nowrap;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}

.kpi-card {
  min-width: 0;
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.kpi-card span,
.kpi-card strong,
.kpi-card small {
  display: block;
}

.kpi-card span {
  color: var(--muted);
  font-size: 10px;
}

.kpi-card strong {
  margin: 8px 0 3px;
  font-size: clamp(17px, 2vw, 23px);
  white-space: nowrap;
}

.kpi-card small {
  color: var(--muted-2);
  font-size: 9px;
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 14px;
  margin-top: 14px;
}

.chart-panel,
.insight-card,
.summary-callout {
  padding: 17px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.panel-head h3 {
  margin: 0;
}

.panel-head span {
  color: var(--muted);
  font-size: 10px;
}

.bar-chart {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(90px, 130px) minmax(120px, 1fr) 70px;
  align-items: center;
  gap: 9px;
  font-size: 10px;
}

.bar-row > span:first-child {
  overflow: hidden;
  color: var(--ink-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 9px;
  overflow: hidden;
  background: #eef2f7;
  border-radius: 5px;
}

.bar-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4f82e8, #83a8f3);
  border-radius: inherit;
}

.bar-row strong {
  text-align: right;
  font-size: 10px;
}

.conclusion-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.conclusion-list li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
}

.conclusion-list b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-radius: 6px;
  font-size: 10px;
}

.conclusion-list strong,
.conclusion-list span {
  display: block;
}

.conclusion-list strong {
  margin-bottom: 3px;
  font-size: 11px;
}

.conclusion-list span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.theme-bars {
  display: grid;
  gap: 11px;
}

.metric-row-head {
  margin-bottom: 5px;
  color: var(--ink-2);
  font-size: 10px;
}

.metric-row-head span:last-child {
  color: var(--muted);
}

.theme-track {
  height: 7px;
  overflow: hidden;
  background: #eef2f7;
  border-radius: 4px;
}

.theme-track span {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
}

.summary-callout {
  margin-top: 14px;
  color: #63512c;
  background: #fffbef;
  border-color: #f2e7bf;
  box-shadow: none;
  font-size: 11px;
  line-height: 1.7;
}

.table-toolbar {
  align-items: center;
  margin-bottom: 12px;
}

.toolbar-left,
.toolbar-right,
.view-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-left .search-field {
  width: 250px;
}

.view-switch {
  padding: 3px;
  background: #f1f4f8;
  border-radius: 7px;
}

.view-switch button {
  min-height: 30px;
  padding: 0 9px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  font-size: 10px;
}

.view-switch button.is-active {
  color: var(--blue-dark);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

.fields-preserved {
  color: #226344;
  background: var(--green-soft);
  padding: 6px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
}

.detail-field-customizer {
  position: relative;
}

.detail-field-customizer > summary {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  cursor: pointer;
  list-style: none;
  font-size: 10px;
  font-weight: 700;
}

.detail-field-customizer > summary::-webkit-details-marker {
  display: none;
}

.detail-field-customizer > summary::after {
  content: "⌄";
  color: var(--muted);
}

.detail-field-customizer[open] > summary::after {
  transform: rotate(180deg);
}

.detail-field-customizer > summary span {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-radius: 999px;
}

.detail-field-picker {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: min(680px, calc(100vw - 48px));
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.detail-field-picker-heading,
.detail-field-picker-actions,
.detail-field-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.detail-field-picker-heading > div {
  display: grid;
  gap: 3px;
}

.detail-field-picker-heading strong {
  font-size: 12px;
}

.detail-field-picker-heading span,
.detail-field-picker-footer > span {
  color: var(--muted);
  font-size: 9px;
}

.detail-field-picker-heading b {
  color: var(--blue-dark);
  font-size: 10px;
}

.detail-field-picker-actions {
  justify-content: flex-start;
  margin: 12px 0 10px;
}

.detail-field-picker-actions button {
  padding: 0;
  color: var(--blue);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 10px;
}

.detail-field-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.detail-field-groups fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-field-groups legend {
  padding: 0 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.detail-field-groups label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  cursor: pointer;
  font-size: 10px;
}

.detail-field-groups label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-field-groups input {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  accent-color: var(--blue);
}

.detail-field-picker-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.detail-video-id {
  color: var(--ink-2);
  font-size: 10px;
  white-space: nowrap;
}

.detail-clickable-row {
  cursor: pointer;
}

.detail-clickable-row:hover td {
  background: #f6f9ff;
}

.detail-clickable-row:focus {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.video-cell {
  min-width: 240px;
}

.video-cell strong,
.video-cell span {
  display: block;
}

.video-cell span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tiny-tag {
  display: inline-flex;
  padding: 3px 6px;
  color: #435b7e;
  background: #edf3fc;
  border-radius: 4px;
  font-size: 9px;
  white-space: nowrap;
}

.wide-table {
  min-width: 7600px;
}

.wide-table th,
.wide-table td {
  min-width: 135px;
  max-width: 220px;
}

.wide-table th:first-child,
.wide-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 240px;
  background: #fff;
  box-shadow: 1px 0 0 var(--line);
}

.wide-table th:first-child {
  z-index: 3;
  background: #f7f9fc;
}

.truncate-cell {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-block {
  padding: 15px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.profile-block h3 {
  margin-bottom: 12px;
}

.profile-rows {
  display: grid;
  gap: 9px;
}

.profile-row {
  align-items: center;
  font-size: 10px;
}

.profile-row span:last-child {
  color: var(--muted);
}

.empty-data-note {
  padding: 12px;
  color: #715a2b;
  background: #fff9e9;
  border: 1px solid #f1e3b8;
  border-radius: 8px;
  font-size: 10px;
  line-height: 1.6;
}

.modal-backdrop,
.drawer-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
}

.modal-backdrop {
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  position: relative;
  width: min(480px, 100%);
  padding: 28px;
  background: #fff;
  border-radius: 15px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.modal-close,
.drawer-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--muted);
  background: #f4f6f8;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 22px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.modal-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 4px auto 15px;
  place-items: center;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 700;
}

.success-icon {
  color: #19784b;
  background: var(--green-soft);
}

.process-icon {
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.modal h2 {
  font-size: 21px;
}

.modal > p {
  margin: 0 auto 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.confirm-list {
  margin: 0 0 22px;
  padding: 3px 15px;
  background: var(--surface-soft);
  border-radius: 9px;
  text-align: left;
}

.confirm-list > div {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.confirm-list > div:last-child {
  border-bottom: 0;
}

.confirm-list dt {
  color: var(--muted);
}

.confirm-list dd {
  margin: 0;
  font-weight: 600;
}

.modal-actions {
  justify-content: flex-end;
}

.drawer-backdrop {
  display: flex;
  justify-content: flex-end;
}

.detail-drawer {
  width: min(680px, 92vw);
  height: 100%;
  overflow: auto;
  background: #fff;
  box-shadow: -12px 0 35px rgba(15, 23, 42, 0.18);
  animation: drawer-in 180ms ease-out;
}

@keyframes drawer-in {
  from { transform: translateX(18px); opacity: 0.5; }
  to { transform: translateX(0); opacity: 1; }
}

.drawer-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding: 22px 25px 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 {
  margin: 0;
  font-size: 20px;
}

.drawer-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.drawer-body {
  padding: 22px 25px 40px;
}

.field-section {
  margin-bottom: 25px;
}

.field-section h3 {
  margin-bottom: 12px;
  padding-bottom: 8px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.field-item {
  min-width: 0;
  padding: 9px 0;
}

.field-item.is-wide {
  grid-column: 1 / -1;
}

.field-item dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
}

.field-item dd {
  margin: 0;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.7;
  word-break: break-word;
}

.field-item a {
  color: var(--blue);
  text-decoration: none;
}

.toast {
  position: fixed;
  z-index: 200;
  right: 24px;
  bottom: 24px;
  max-width: min(380px, calc(100vw - 40px));
  padding: 12px 15px;
  color: #fff;
  background: #1c2c44;
  border-radius: 9px;
  box-shadow: var(--shadow-md);
  font-size: 12px;
}

.overlay {
  position: fixed;
  z-index: 35;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

/* Data-first workspace */

.topbar-import {
  min-height: 36px;
  padding: 0 13px;
  font-size: 12px;
}

.dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.dashboard-heading > div:first-child {
  min-width: 0;
}

.dashboard-heading h1 {
  margin-bottom: 7px;
  font-size: 28px;
}

.dashboard-heading p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.dashboard-heading-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.metric-refresh-control {
  display: grid;
  justify-items: stretch;
  gap: 5px;
}

.metric-refresh-button {
  min-width: 150px;
  justify-content: center;
  white-space: nowrap;
}

.metric-refresh-feedback {
  max-width: 220px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
  text-align: center;
}

.metric-refresh-feedback.is-running {
  color: var(--blue-dark);
}

.metric-refresh-feedback.is-success {
  color: #226344;
}

.metric-refresh-feedback.is-error {
  color: #a43f3f;
}

button.is-loading {
  cursor: not-allowed;
}

button.is-loading::before {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: metric-refresh-spin 0.7s linear infinite;
}

@keyframes metric-refresh-spin {
  to { transform: rotate(360deg); }
}

.dashboard-filter-panel,
.data-layer-card,
.dashboard-kpi-grid > article,
.dashboard-panel,
.archive-model-strip,
.library-toolbar,
.batch-detail-panel,
.refresh-policy-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.dashboard-filter-panel {
  margin-bottom: 14px;
  padding: 16px;
}

.dashboard-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.dashboard-filter-grid label,
.library-toolbar > label:not(.search-field) {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.dashboard-filter-grid label > span,
.library-toolbar > label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.dashboard-filter-grid input,
.dashboard-filter-grid select,
.library-toolbar select {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.searchable-filter {
  position: relative;
  min-width: 0;
}

.searchable-filter.is-open {
  z-index: 30;
}

.searchable-filter-trigger {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.searchable-filter-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.searchable-filter-trigger b {
  color: var(--muted);
  font-size: 13px;
}

.searchable-filter.is-open .searchable-filter-trigger {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 116, 224, 0.12);
}

.searchable-filter-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: max(100%, 260px);
  padding: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}

.searchable-filter-panel input {
  width: 100%;
  height: 36px;
  margin-bottom: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.searchable-filter-options {
  display: grid;
  max-height: 240px;
  gap: 2px;
  overflow-y: auto;
}

.searchable-filter-option {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px;
  color: var(--ink-2);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.searchable-filter-option.is-product-option {
  grid-template-columns: 16px 8px minmax(0, 1fr) auto;
}

.product-filter-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.searchable-filter-option:hover,
.searchable-filter-option.is-selected {
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.searchable-filter-option i {
  width: 14px;
  height: 14px;
  border: 1px solid #a9b5c6;
  border-radius: 50%;
}

.searchable-filter-option.is-selected i {
  border: 4px solid var(--blue);
}

.searchable-filter.is-multi .searchable-filter-option i {
  position: relative;
  border-radius: 4px;
}

.searchable-filter.is-multi .searchable-filter-option.is-selected i {
  border: 1px solid var(--blue);
  background: var(--blue);
}

.searchable-filter.is-multi .searchable-filter-option.is-selected i::after {
  position: absolute;
  top: 1px;
  left: 4px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  content: "";
  transform: rotate(45deg);
}

.searchable-filter-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.searchable-filter-option small {
  color: var(--muted);
}

.searchable-filter-empty {
  padding: 16px 8px;
  color: var(--muted);
  text-align: center;
}

.batch-scope-builder {
  padding: 15px;
  background: linear-gradient(145deg, #f4f8ff, #fbfcff);
  border-bottom: 1px solid #e1e8f3;
}

.batch-scope-builder-heading,
.batch-scope-builder-actions,
.batch-scope-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.batch-scope-builder-heading > div,
.batch-scope-builder-heading strong,
.batch-scope-builder-heading small {
  display: block;
}

.batch-scope-builder-heading strong {
  color: var(--ink-2);
  font-size: 12px;
}

.batch-scope-builder-heading small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.batch-scope-builder-heading > span {
  flex: 0 0 auto;
  padding: 6px 9px;
  color: #1d5d45;
  background: var(--green-soft);
  border: 1px solid #ccebdc;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.batch-scope-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 13px;
}

.batch-scope-grid label,
.batch-scope-list-heading label {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.batch-scope-grid label > span,
.batch-scope-list-heading label > span {
  color: #58667b;
  font-size: 9px;
  font-weight: 700;
}

.batch-scope-panel .batch-scope-grid input,
.batch-scope-panel .batch-scope-grid select,
.batch-scope-panel .batch-scope-list-heading input {
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 0 9px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d7dfeb;
  border-radius: 7px;
  font: inherit;
  font-size: 10px;
}

.batch-scope-builder-actions {
  align-items: flex-end;
  margin-top: 12px;
  padding-top: 11px;
  color: var(--muted);
  border-top: 1px solid #e1e8f3;
  font-size: 9px;
}

.batch-scope-builder-actions > div {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.batch-scope-builder-actions .button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 9px;
}

.batch-scope-list-heading {
  padding: 11px 12px 8px;
}

.batch-scope-list-heading label {
  width: min(360px, 70%);
}

.batch-scope-list-heading > span {
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.batch-scope-panel .searchable-filter-options {
  max-height: 310px;
  padding: 0 8px 9px;
}

.batch-scope-select-all {
  margin-bottom: 4px;
  border: 1px solid #dce6f6;
}

.batch-scope-option small {
  max-width: 230px;
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  padding-top: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.include-undated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--ink-2);
  font-size: 11px;
  cursor: pointer;
}

.include-undated input {
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
}

.data-layer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.data-layer-card {
  min-width: 0;
  padding: 17px 18px 15px;
}

.data-layer-card > div:first-child {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.data-layer-card strong,
.data-layer-card p {
  display: block;
}

.data-layer-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.layer-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
}

.metric-layer .layer-icon {
  color: #177b4c;
  background: var(--green-soft);
}

.data-layer-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 15px 0 12px;
}

.data-layer-card dl > div {
  min-width: 0;
  padding: 9px 10px;
  background: var(--surface-soft);
  border-radius: 7px;
}

.data-layer-card dt,
.data-layer-card dd {
  overflow-wrap: anywhere;
}

.data-layer-card dt {
  color: var(--muted);
  font-size: 10px;
}

.data-layer-card dd {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
}

.layer-rule {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 14px;
}

.dashboard-kpi-grid > article {
  min-width: 0;
  padding: 16px;
}

.dashboard-kpi-grid span,
.dashboard-kpi-grid strong,
.dashboard-kpi-grid small {
  display: block;
}

.dashboard-kpi-grid span {
  color: var(--muted);
  font-size: 11px;
}

.dashboard-kpi-grid strong {
  overflow: hidden;
  margin: 7px 0 3px;
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-kpi-grid small {
  color: var(--muted-2);
  font-size: 10px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 14px;
}

.dashboard-panel {
  min-width: 0;
  padding: 19px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-heading h2,
.panel-heading p {
  margin: 0;
}

.panel-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.panel-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.panel-controls select {
  width: auto;
  min-width: 92px;
  height: 34px;
  padding: 0 28px 0 9px;
  font-size: 11px;
}

.chart-wrap {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.chart-wrap svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 230px;
}

.chart-grid-line {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-axis-label,
.chart-axis-title,
.chart-empty {
  fill: var(--muted);
  font-size: 10px;
}

.chart-axis-title {
  font-weight: 700;
}

.chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-point {
  fill: var(--surface);
  stroke: var(--blue);
  stroke-width: 3;
}

.snapshot-empty {
  display: flex;
  min-height: 252px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 18px;
  text-align: center;
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
}

.snapshot-axis {
  position: relative;
  width: min(220px, 80%);
  height: 2px;
  margin: 14px 0 18px;
  background: var(--line-strong);
}

.snapshot-point {
  display: block;
  width: 12px;
  height: 12px;
  background: var(--blue);
  border: 3px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.snapshot-axis .snapshot-point {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.snapshot-empty > strong {
  font-size: 12px;
}

.snapshot-empty p {
  max-width: 390px;
  margin: 8px 0 15px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.metric-growth-chart-wrap {
  min-height: 252px;
  padding: 8px 6px 0;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.metric-growth-chart-wrap svg {
  display: block;
  width: 100%;
  height: 218px;
}

.metric-growth-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px 12px;
  color: var(--muted);
  font-size: 11px;
}

.metric-growth-summary strong {
  color: var(--blue-dark);
  font-size: 12px;
}

.horizontal-bars {
  display: grid;
  min-width: 0;
  gap: 13px;
}

.bar-item,
.bar-item > div {
  min-width: 0;
}

.shop-workbench {
  display: grid;
  gap: 14px;
}

.shop-selector-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(120px, 0.7fr));
  align-items: end;
  gap: 14px;
}

.shop-selector-panel label,
.shop-selector-panel > div {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.shop-selector-panel span {
  color: var(--muted);
  font-size: 11px;
}

.shop-selector-panel small {
  color: var(--muted-2);
  font-size: 10px;
}

.shop-selector-panel select {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.shop-video-table {
  min-width: 1320px;
}

.shop-video-toolbar {
  margin-top: 14px;
}

.shop-video-toolbar .toolbar-left .search-field {
  width: 310px;
}

.shop-bulk-tools {
  color: var(--muted);
  font-size: 10px;
}

.shop-select-all-control {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  color: var(--ink-2);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  font-weight: 600;
}

.shop-select-all-control input,
.shop-video-table input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
  cursor: pointer;
}

.shop-select-all-control:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.55;
}

.shop-video-filter-panel {
  margin-bottom: 14px;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.shop-video-filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shop-video-filter-heading > div {
  display: grid;
  gap: 3px;
}

.shop-video-filter-actions {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.shop-video-filter-actions .button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  font-size: 10px;
  white-space: nowrap;
}

.shop-video-filter-actions .button svg,
.shop-video-filter-actions .text-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.shop-video-filter-actions .text-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  padding: 0 5px;
  color: var(--blue);
  white-space: nowrap;
}

.shop-video-filter-actions span {
  color: inherit;
  font-size: inherit;
}

.shop-video-filter-heading strong {
  color: var(--ink-2);
  font-size: 11px;
}

.shop-video-filter-heading span {
  color: var(--muted);
  font-size: 9px;
}

.shop-video-filter-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.shop-video-filter-grid label {
  gap: 4px;
}

.shop-video-filter-grid label > span {
  color: #58667b;
  font-size: 9px;
}

.shop-video-filter-grid input,
.shop-video-filter-grid select {
  height: 38px;
  background: #fff;
  border-color: #dbe2ed;
}

.shop-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.shop-pagination-summary,
.shop-pagination-controls label {
  color: var(--muted);
  font-size: 10px;
}

.shop-pagination-controls,
.shop-pagination-controls label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.shop-pagination-controls {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.shop-pagination select,
.shop-pagination input {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.shop-pagination select {
  width: 72px;
  padding: 0 7px;
}

.shop-pagination input {
  width: 64px;
  padding: 0 6px;
  text-align: center;
}

.shop-pagination .button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 10px;
}

.shop-video-table .video-cell span {
  max-width: 520px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-sync-status {
  margin: 0;
}

.shop-sync-status .shop-sync-error span {
  max-width: 420px;
  color: #b33d55;
  line-height: 1.45;
}

.shop-kpi-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shop-kpi-heading > div:first-child {
  display: grid;
  gap: 3px;
}

.shop-kpi-heading span {
  color: var(--muted);
  font-size: 11px;
}

.segmented-control {
  display: inline-flex;
  padding: 3px;
  background: #eaf0f8;
  border-radius: 8px;
}

.segmented-control button {
  padding: 6px 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.segmented-control button.is-active {
  color: var(--blue-dark);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.creator-cell {
  min-width: 160px;
}

.creator-cell strong,
.creator-cell span {
  display: block;
}

.creator-cell span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.video-id-cell {
  min-width: 150px;
}

.video-id-cell .data-id {
  display: inline-block;
}

.description-cell {
  min-width: 320px;
  max-width: 440px;
}

.description-cell span {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-mapping-cell {
  min-width: 250px;
  max-width: 340px;
}

.product-pill-list {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.product-pill {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 6px 8px;
  background: #f8fafc;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
}

.product-pill > i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.product-pill-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-pill small {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.product-pill-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.product-copy-button {
  padding: 2px 5px;
  color: var(--blue-dark);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
  background: #fff;
  border: 1px solid #cad8eb;
  border-radius: 5px;
  cursor: pointer;
}

.product-copy-button:hover,
.product-copy-button:focus-visible {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.product-pill-more,
.product-empty {
  color: var(--muted);
  font-size: 10px;
}

.product-tone-0 > i, .product-filter-swatch.product-tone-0 { background: #2563eb; }
.product-tone-1 > i, .product-filter-swatch.product-tone-1 { background: #0f766e; }
.product-tone-2 > i, .product-filter-swatch.product-tone-2 { background: #7c3aed; }
.product-tone-3 > i, .product-filter-swatch.product-tone-3 { background: #c2410c; }
.product-tone-4 > i, .product-filter-swatch.product-tone-4 { background: #be185d; }
.product-tone-5 > i, .product-filter-swatch.product-tone-5 { background: #4d7c0f; }

.table-link {
  color: var(--blue-dark);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.table-link:hover {
  text-decoration: underline;
}

.data-id {
  color: var(--ink-2);
  font-size: 11px;
  white-space: nowrap;
}

.media-identifier {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin: 0 !important;
  color: inherit !important;
  font-size: inherit !important;
}

.video-cell > .media-identifier {
  margin-top: 3px !important;
}

.media-type-badge {
  display: inline-flex !important;
  align-items: center;
  min-height: 18px;
  margin: 0 !important;
  padding: 1px 6px;
  color: #6941a5 !important;
  background: #f4effb;
  border: 1px solid #ded0f0;
  border-radius: 999px;
  font-size: 9px !important;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .02em;
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1180px) {
  .shop-selector-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .shop-selector-panel {
    grid-template-columns: 1fr;
  }
}

.bar-item > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
  font-size: 11px;
}

.bar-item > div:first-child span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-item > div:first-child strong {
  flex: 0 0 auto;
  font-size: 10px;
}

.bar-item .bar-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4f82e8, #83a8f3);
  border-radius: inherit;
}

.category-panel:nth-of-type(4) .bar-item .bar-track span {
  background: linear-gradient(90deg, #15978d, #60c3ba);
}

.chart-empty-copy {
  margin: 42px 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.top-videos-panel {
  margin-top: 14px;
}

.top-videos-panel .table-scroll {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.dashboard-video-table,
.video-library-table,
.batch-table,
.refresh-table {
  min-width: 920px;
}

.video-library-table { min-width: 1180px; }
.task-center .batch-table { min-width: 1780px; }

.dashboard-video-table .video-cell,
.video-library-table .video-cell,
.video-library-table .video-id-cell {
  min-width: 190px;
}

.video-library-table .creator-cell { min-width: 135px; }

.archive-model-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 17px 18px;
}

.archive-model-strip > div {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 9px;
}

.archive-model-strip strong {
  font-size: 12px;
}

.archive-model-strip p {
  grid-column: 2;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.model-dot {
  width: 10px;
  height: 10px;
  margin-top: 3px;
  background: var(--blue);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--blue-soft);
}

.model-dot.metric {
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.model-link {
  padding: 5px 9px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  white-space: nowrap;
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) repeat(3, minmax(150px, 0.7fr));
  align-items: end;
  gap: 12px;
  padding: 15px;
}

.library-search {
  width: 100%;
  height: 40px;
}

.library-heading {
  align-items: center;
  margin-top: 20px;
}

.snapshot-asof {
  color: var(--muted);
  font-size: 11px;
}

.video-library-table td small,
.batch-table td span,
.refresh-table td span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.load-more-row {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.add-paste-source {
  width: 100%;
  margin-top: 14px;
}

.batch-source-summary {
  margin-top: 20px;
  padding: 13px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.batch-source-summary strong {
  display: block;
  font-size: 12px;
}

.batch-source-summary p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.batch-source-list {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.batch-source-list li {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.batch-source-list span,
.batch-source-list em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.batch-source-list b {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-source-list button {
  padding: 0;
  color: var(--blue);
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.file-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.management-tabs,
.archive-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #edf1f6;
  border-radius: 9px;
}

.management-tabs {
  margin-bottom: 2px;
}

.management-tabs button,
.archive-tabs button {
  min-height: 36px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
}

.management-tabs button.is-active,
.archive-tabs button.is-active {
  color: var(--blue-dark);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

.batch-detail-panel {
  margin-top: 18px;
  padding: 21px;
}

.batch-detail-head,
.archive-version-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.batch-detail-head h2 {
  margin: 0 0 4px;
  font-size: 19px;
}

.batch-detail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.batch-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 20px 0;
}

.batch-stage-explanation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.batch-stage-explanation > div {
  padding: 15px 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.batch-stage-explanation > div.is-next {
  background: #f5f8fd;
  border-color: #cfddf3;
}

.batch-stage-explanation span,
.batch-stage-explanation strong {
  display: block;
}

.batch-stage-explanation span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.batch-stage-explanation strong {
  font-size: 12px;
  line-height: 1.55;
}

.batch-stage-explanation p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.batch-detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.batch-detail-actions > div:first-child {
  min-width: 0;
}

.batch-detail-actions strong,
.batch-detail-actions span {
  display: block;
}

.batch-detail-actions strong {
  font-size: 11px;
}

.batch-detail-actions span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.batch-detail-actions > div:last-child {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.batch-metadata-card {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .9fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
  padding: 17px 18px;
  background: linear-gradient(135deg, #f7fbff, #fff);
  border: 1px solid #d8e5f5;
  border-radius: 11px;
}

.batch-metadata-card h3 {
  margin: 3px 0 5px;
  font-size: 15px;
}

.batch-metadata-card p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.batch-metadata-card dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.batch-metadata-card dl > div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
}

.batch-metadata-card dt {
  color: var(--muted);
  font-size: 9px;
}

.batch-metadata-card dd {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
}

.batch-metadata-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.batch-flow > div {
  min-width: 0;
  padding: 14px 10px;
  text-align: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.batch-flow strong,
.batch-flow span {
  display: block;
}

.batch-flow strong {
  font-size: 20px;
}

.batch-flow span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.batch-flow b {
  color: var(--muted-2);
  font-size: 16px;
}

.batch-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.batch-detail-grid > section {
  min-width: 0;
  padding: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.batch-detail-grid h3 {
  margin-bottom: 13px;
}

.source-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.source-row:last-child {
  border-bottom: 0;
}

.source-row > div {
  min-width: 0;
}

.source-row strong,
.source-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-row strong {
  font-size: 11px;
}

.source-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.source-type {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: #177b4c;
  background: var(--green-soft);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
}

.source-type.paste {
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.batch-data-rules {
  margin: 0;
}

.batch-data-rules > div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.batch-data-rules > div:last-child {
  border-bottom: 0;
}

.batch-data-rules dt {
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
}

.batch-data-rules dd {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.refresh-policy-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 17px 18px;
}

.refresh-policy-card > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.refresh-policy-card strong {
  display: block;
  font-size: 12px;
}

.refresh-policy-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

/* Video archive drawer */

.archive-tabs {
  display: flex;
  margin-bottom: 18px;
}

.archive-tabs button {
  flex: 1;
}

.archive-version-line {
  align-items: center;
  margin-bottom: 15px;
  padding: 12px 13px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.archive-version-line strong,
.archive-version-line span {
  display: block;
}

.archive-version-line > div > strong {
  font-size: 12px;
}

.archive-version-line > div > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.archive-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.archive-field-grid > div {
  min-width: 0;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.archive-field-grid > div.is-wide {
  grid-column: 1 / -1;
}

.archive-field-grid dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
}

.archive-field-grid dd {
  margin: 0;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.archive-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.archive-metric-grid > div {
  min-width: 0;
  padding: 13px 9px;
  text-align: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.archive-metric-grid span,
.archive-metric-grid strong {
  display: block;
}

.archive-metric-grid span {
  color: var(--muted);
  font-size: 10px;
}

.archive-metric-grid strong {
  overflow: hidden;
  margin-top: 5px;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-history-empty {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  background: #fffbef;
  border: 1px solid #f2e7bf;
  border-radius: 9px;
}

.metric-history-empty .snapshot-point {
  margin-top: 4px;
  flex: 0 0 auto;
}

.metric-history-empty strong {
  font-size: 12px;
}

.metric-history-empty p {
  margin: 4px 0 0;
  color: #715f37;
  font-size: 11px;
  line-height: 1.6;
}

.metric-history-empty.is-neutral {
  margin-bottom: 12px;
  background: var(--surface-soft);
  border-color: var(--line);
}

.metric-history-empty.is-neutral p {
  color: var(--muted);
}

.archive-history-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.archive-history-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 10px;
}

.archive-history-table th,
.archive-history-table td {
  padding: 10px 9px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

.archive-history-table th {
  color: var(--muted);
  background: var(--surface-soft);
  font-weight: 600;
}

.archive-history-table th:first-child,
.archive-history-table td:first-child {
  text-align: left;
}

.archive-history-table tbody tr:last-child td {
  border-bottom: 0;
}

.archive-history-table td strong,
.archive-history-table td small {
  display: block;
}

.archive-history-table td small {
  margin-top: 3px;
  color: var(--muted);
}

.archive-history-table .metric-delta {
  color: var(--brand-strong);
  font-weight: 600;
}

.archive-source-link {
  display: inline-block;
  margin-top: 18px;
  text-decoration: none;
}

.archive-full-record {
  width: 100%;
  margin-top: 12px;
}

.archive-batch-list {
  display: grid;
  gap: 9px;
}

.archive-batch-list article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 11px;
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.archive-batch-list strong {
  font-size: 11px;
}

.archive-batch-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.data-health-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  padding: 13px 16px;
  background: #f8fbff;
  border: 1px solid #dfe8f7;
  border-radius: var(--radius-md);
}

.data-health-strip > div {
  display: grid;
  gap: 3px;
}

.data-health-strip strong {
  font-size: 11px;
}

.data-health-strip span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.data-health-strip b {
  color: var(--ink-2);
}

.dashboard-decisions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.dashboard-decisions article {
  min-width: 0;
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.dashboard-decisions span,
.dashboard-decisions strong {
  display: block;
}

.dashboard-decisions span {
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}

.dashboard-decisions strong {
  margin-top: 7px;
  font-size: 15px;
}

.dashboard-decisions p {
  min-height: 34px;
  margin: 7px 0 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.board-index-page #board-index {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.board-index-group {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.board-group-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.board-group-heading span,
.board-group-heading small {
  color: var(--muted);
  font-size: 10px;
}

.board-group-heading h2 {
  margin: 3px 0 0;
  font-size: 17px;
}

.board-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.board-card {
  display: grid;
  min-height: 178px;
  align-content: start;
  gap: 6px;
  padding: 16px;
  color: var(--ink);
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.board-card:hover {
  border-color: #a9c1ef;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .09);
  transform: translateY(-1px);
}

.board-card-label {
  color: var(--muted);
  font-size: 10px;
}

.board-card strong {
  font-size: 15px;
  line-height: 1.4;
}

.board-card b {
  margin-top: 2px;
  color: var(--blue-dark);
  font-size: 18px;
}

.board-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.board-card em {
  align-self: end;
  margin-top: auto;
  color: var(--blue-dark);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.board-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.board-kpi-grid article {
  min-width: 0;
  padding: 14px 15px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.board-kpi-grid span,
.board-kpi-grid strong,
.board-kpi-grid small {
  display: block;
}

.board-kpi-grid span {
  color: var(--muted);
  font-size: 10px;
}

.board-kpi-grid strong {
  overflow: hidden;
  margin: 7px 0 3px;
  font-size: 19px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-kpi-grid small {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.board-chart-wide {
  margin-bottom: 14px;
}

.board-bar-chart .bar-row {
  grid-template-columns: minmax(110px, 170px) minmax(100px, 1fr) 74px;
}

.evidence-card {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(145deg, #f7faff, #eef4ff);
  border-color: #dae6fa;
}

.evidence-card .evidence-ratio {
  color: var(--blue-dark);
  font-size: 32px;
  font-weight: 800;
}

.evidence-card h3 {
  margin: 7px 0 8px;
}

.evidence-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.evidence-card > strong {
  color: var(--ink-2);
  font-size: 10px;
}

.insight-board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.insight-board-card {
  min-width: 0;
  padding: 15px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.insight-board-card > span {
  display: inline-flex;
  padding: 3px 7px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
}

.insight-board-card h3 {
  margin: 9px 0 7px;
  font-size: 13px;
  line-height: 1.45;
}

.insight-board-card p {
  margin: 0 0 9px;
  color: var(--ink-2);
  font-size: 10px;
  line-height: 1.65;
}

.insight-board-card small {
  display: block;
  padding-top: 8px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 9px;
  line-height: 1.55;
}

.product-canvas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.product-canvas article {
  min-width: 0;
  padding: 16px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.product-canvas > article > span {
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 700;
}

.product-canvas h3 {
  margin: 7px 0 10px;
  font-size: 14px;
  line-height: 1.5;
}

.product-canvas p,
.product-canvas small {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.product-canvas small {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.product-canvas b {
  margin-right: 5px;
  color: var(--ink-2);
}

.source-data-section {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.source-data-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.source-data-heading h3,
.source-data-heading p {
  margin: 0;
}

.source-data-heading h3 {
  font-size: 15px;
}

.source-data-heading p,
.source-data-heading > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.source-data-table {
  min-width: 860px;
}

.source-filter-controls {
  align-items: flex-end;
}

.source-filter-controls label {
  display: grid;
  gap: 4px;
}

.source-filter-controls label > span {
  color: var(--muted);
  font-size: 9px;
}

.source-filter-controls select {
  width: 155px;
  height: 38px;
  padding: 0 28px 0 9px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 10px;
}

.source-filter-controls select:disabled {
  color: var(--muted-2);
  background: var(--surface-soft);
}

.detail-table-workbench {
  margin-top: 18px;
}

.table-result-count {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.table-result-count b {
  color: var(--ink-2);
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.table-pagination-summary,
.table-pagination-controls label {
  color: var(--muted);
  font-size: 10px;
}

.table-pagination-controls,
.table-pagination-controls label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.table-pagination-controls {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.table-pagination select,
.table-pagination input {
  height: 32px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
}

.table-pagination select {
  width: 72px;
  padding: 0 7px;
}

.table-pagination input {
  width: 58px;
  padding: 0 6px;
  text-align: center;
}

.table-pagination .button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 10px;
}

@media (max-width: 720px) {
  .table-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-pagination-controls {
    width: 100%;
    justify-content: flex-start;
  }
}

.multi-filter-panel {
  margin: 0 0 12px;
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.multi-filter-heading,
.multi-filter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.multi-filter-heading > div:first-child {
  display: grid;
  gap: 2px;
}

.multi-filter-heading strong {
  color: var(--ink-2);
  font-size: 11px;
}

.multi-filter-heading span {
  color: var(--muted);
  font-size: 9px;
}

.compact-button.button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 10px;
}

.filter-condition-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.filter-condition-row {
  display: grid;
  grid-template-columns: 42px minmax(140px, 0.9fr) minmax(112px, 0.55fr) minmax(170px, 1.4fr) 30px;
  align-items: end;
  gap: 8px;
}

.filter-join-label {
  align-self: center;
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.filter-condition-row label {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.filter-condition-row label > span {
  color: var(--muted);
  font-size: 9px;
}

.filter-condition-row select,
.filter-condition-row input {
  width: 100%;
  height: 34px;
  padding: 0 9px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: 0;
  font: inherit;
  font-size: 10px;
}

.filter-condition-row select {
  padding-right: 28px;
}

.filter-condition-row select:focus,
.filter-condition-row input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45, 103, 216, 0.12);
}

.filter-value-field.is-disabled {
  opacity: 0.55;
}

.filter-remove-button {
  display: grid;
  width: 30px;
  height: 34px;
  place-items: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  cursor: pointer;
  font-size: 18px;
}

.filter-remove-button:hover {
  color: #a43f3f;
  border-color: #e0aaaa;
}

.data-table th.sortable-column {
  padding: 0;
}

.sort-header-button {
  display: flex;
  width: 100%;
  min-height: 43px;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 11px 15px;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  white-space: nowrap;
}

.sort-header-button:hover {
  color: var(--blue-dark);
  background: #eef3fb;
}

.sort-header-button i {
  color: #9aa6b7;
  font-size: 12px;
  font-style: normal;
}

.sortable-column[aria-sort="ascending"] .sort-header-button,
.sortable-column[aria-sort="descending"] .sort-header-button,
.sortable-column[aria-sort="ascending"] .sort-header-button i,
.sortable-column[aria-sort="descending"] .sort-header-button i {
  color: var(--blue-dark);
}

@media (max-width: 1180px) {
  .analysis-scope-inner {
    grid-template-columns: minmax(190px, 0.7fr) minmax(280px, 1.3fr) auto;
    gap: 12px;
  }

  .analysis-scope-summary-card {
    grid-column: 1 / -1;
  }

  .analysis-scope-filters .dashboard-filter-grid {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
  }

  .board-card-grid,
  .insight-board-grid,
  .product-canvas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-health-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-health-strip .text-button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .dashboard-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .library-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-search {
    grid-column: 1 / -1;
  }

  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

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

  .new-analysis-card {
    min-height: 150px;
  }

  .business-progress {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .business-progress li::after {
    top: 30px;
    bottom: -13px;
    left: 14px;
    width: 2px;
    height: auto;
  }

  .business-progress li > div {
    padding-bottom: 4px;
  }
}

@media (max-width: 980px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .app-main {
    margin-left: 0;
  }

  .analysis-scope-inner {
    grid-template-columns: minmax(180px, 0.7fr) minmax(280px, 1.3fr) auto;
  }

  .mobile-menu {
    display: grid;
  }

  .topbar-title {
    min-width: 0;
    margin-right: auto;
    margin-left: 12px;
  }

  .topbar-title strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .dashboard-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-heading-actions {
    justify-content: flex-start;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-video-table,
  .video-library-table,
  .batch-table,
  .refresh-table {
    min-width: 860px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: none;
  }

  .create-layout {
    grid-template-columns: 1fr;
  }

  .setup-card {
    position: static;
  }

  .result-workspace {
    grid-template-columns: 1fr;
  }

  .sheet-sidebar {
    display: none;
  }

  .sheet-mobile-select-wrap {
    display: grid;
    grid-template-columns: 80px 1fr;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
  }

  .sheet-mobile-select-wrap label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
  }
}

@media (max-width: 720px) {
  .analysis-scope-filters .dashboard-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-scope-field .batch-scope-panel {
    width: calc(100vw - 48px);
  }

  .batch-scope-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .batch-scope-builder-heading,
  .batch-scope-builder-actions,
  .batch-scope-list-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .batch-scope-builder-actions > div,
  .batch-scope-list-heading label {
    width: 100%;
  }

  .batch-scope-builder-actions > div .button {
    flex: 1;
  }

  .batch-scope-list-heading > span {
    text-align: left;
  }

  .analysis-scope-actions {
    align-items: center;
    align-self: center;
    flex-direction: row;
    gap: 7px;
  }

  .analysis-scope-actions .button {
    min-height: 30px;
  }

  .shop-video-toolbar .toolbar-left .search-field,
  .shop-bulk-tools,
  .shop-select-all-control {
    width: 100%;
  }

  .shop-bulk-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .multi-filter-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .multi-filter-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .filter-condition-row {
    grid-template-columns: 40px minmax(0, 1fr) 30px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }

  .filter-condition-row label {
    grid-column: 2;
  }

  .filter-join-label {
    grid-column: 1;
    grid-row: 1;
  }

  .filter-remove-button {
    grid-column: 3;
    grid-row: 1;
  }

  .analysis-scope-bar {
    padding: 9px 14px;
  }

  .analysis-scope-inner {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 11px;
  }

  .analysis-scope-identity small {
    display: none;
  }

  .analysis-scope-field,
  .analysis-scope-summary-card {
    grid-column: 1 / -1;
  }

  .analysis-scope-field .searchable-filter-panel {
    width: 100%;
  }

  .analysis-scope-filter-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .data-health-strip,
  .dashboard-decisions,
  .board-card-grid,
  .board-visual-grid,
  .insight-board-grid,
  .product-canvas {
    grid-template-columns: 1fr;
  }

  .data-health-strip {
    gap: 11px;
  }

  .board-index-group {
    padding: 14px;
  }

  .board-card {
    min-height: 154px;
  }

  .board-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .board-bar-chart .bar-row {
    grid-template-columns: 82px minmax(80px, 1fr) 64px;
  }

  .source-data-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .source-filter-controls label,
  .source-filter-controls select {
    width: 100%;
  }

  .page-container {
    padding: 20px 16px 36px;
  }

  .topbar {
    padding: 0 15px;
  }

  .topbar-title > span {
    display: none;
  }

  .topbar-title strong {
    max-width: 88px;
  }

  .topbar-actions {
    gap: 7px;
  }

  .topbar-import {
    min-height: 36px;
    padding: 0 9px;
    font-size: 11px;
  }

  .release-history-trigger {
    padding: 0 8px;
  }

  .prototype-note {
    display: none;
  }

  .dashboard-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 15px;
  }

  .dashboard-heading h1 {
    font-size: 25px;
  }

  .dashboard-heading-actions,
  .dashboard-heading-actions .button,
  .metric-refresh-control {
    width: 100%;
  }

  .metric-refresh-feedback {
    max-width: none;
    text-align: left;
  }

  .dashboard-filter-grid,
  .data-layer-grid,
  .library-toolbar,
  .batch-detail-grid {
    grid-template-columns: 1fr;
  }

  .library-search {
    grid-column: auto;
  }

  .filter-summary-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .include-undated {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .data-layer-card dl {
    gap: 6px;
  }

  .data-layer-card dl > div {
    padding: 8px;
  }

  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-kpi-grid > article:last-child {
    grid-column: 1 / -1;
  }

  .dashboard-panel {
    padding: 15px;
  }

  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-controls select {
    width: 100%;
  }

  .chart-wrap {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .chart-wrap svg {
    width: 650px;
    max-width: none;
    min-height: 0;
  }

  .snapshot-empty {
    min-height: 230px;
  }

  .archive-model-strip {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .model-link {
    width: fit-content;
    margin-left: 19px;
  }

  .library-heading {
    align-items: flex-start;
  }

  .snapshot-asof {
    margin-top: 4px;
  }

  .management-tabs {
    display: flex;
    width: 100%;
  }

  .management-tabs button {
    min-width: 0;
    flex: 1;
    padding: 0 8px;
  }

  .batch-detail-panel {
    padding: 16px;
  }

  .batch-detail-head,
  .archive-version-line,
  .refresh-policy-card {
    align-items: stretch;
    flex-direction: column;
  }

  .batch-detail-head .button,
  .refresh-policy-card .button,
  .archive-version-line .button {
    width: 100%;
  }

  .batch-flow {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .batch-stage-explanation {
    grid-template-columns: 1fr;
  }

  .batch-detail-actions,
  .batch-detail-actions > div:last-child {
    align-items: stretch;
    flex-direction: column;
  }

  .batch-detail-actions .button {
    width: 100%;
  }

  .batch-metadata-card {
    grid-template-columns: 1fr;
  }

  .batch-metadata-actions .button {
    width: 100%;
  }

  .batch-workflow-rail span {
    font-size: 8px;
  }

  .batch-flow b {
    justify-self: center;
    transform: rotate(90deg);
  }

  .batch-data-rules > div {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .refresh-policy-card > div {
    align-items: flex-start;
  }

  .archive-version-line {
    gap: 11px;
  }

  .archive-field-grid {
    grid-template-columns: 1fr;
  }

  .archive-field-grid > div.is-wide {
    grid-column: auto;
  }

  .archive-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-metric-grid > div:last-child {
    grid-column: 1 / -1;
  }

  .archive-tabs {
    overflow-x: auto;
  }

  .archive-tabs button {
    min-width: 108px;
  }

  .archive-batch-list article {
    grid-template-columns: 1fr;
  }

  .detail-drawer {
    width: 100vw;
    max-width: 100%;
    overflow-x: hidden;
  }

  .drawer-head,
  .drawer-body {
    padding-right: 17px;
    padding-left: 17px;
  }

  .dashboard-video-table,
  .video-library-table,
  .batch-table,
  .refresh-table {
    min-width: 820px;
  }

  .hero-copy {
    padding: 32px 24px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .active-task-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .task-main-info {
    width: calc(100% - 65px);
    flex: auto;
  }

  .active-task-card > .button {
    width: 100%;
  }

  .task-footer-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .recent-grid,
  .task-stats,
  .scan-summary,
  .profile-grid,
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .page-intro,
  .result-header,
  .sheet-title-row,
  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .simple-steps {
    width: 100%;
    justify-content: space-between;
  }

  .simple-steps li {
    flex-direction: column;
    text-align: center;
  }

  .simple-steps li:not(:last-child)::after {
    position: absolute;
    top: 12px;
    left: calc(50% + 20px);
    width: calc(100vw / 3 - 45px);
    margin: 0;
  }

  .result-actions .button,
  .toolbar-left,
  .toolbar-left .search-field,
  .toolbar-right {
    width: 100%;
  }

  .task-history-table th:nth-child(2),
  .task-history-table td:nth-child(2),
  .task-history-table th:nth-child(3),
  .task-history-table td:nth-child(3) {
    display: none;
  }

  .toolbar-right {
    flex-wrap: wrap;
  }

  .sheet-content-area {
    padding: 17px 13px;
  }

  .mobile-scroll-hint {
    display: block;
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 12px;
  }

  .result-header > div > p {
    margin-left: 0;
  }

  .bar-row {
    grid-template-columns: 86px minmax(90px, 1fr) 56px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .field-item.is-wide {
    grid-column: auto;
  }

  .task-safe-note {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .task-eta {
    width: 100%;
    margin-left: 14px;
  }

  .table-shell {
    overflow-x: auto;
  }

  .task-history-table {
    min-width: 720px;
  }

  .modal-actions .button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 18%, rgba(116, 91, 255, 0.2), transparent 34%),
    radial-gradient(circle at 84% 82%, rgba(46, 204, 153, 0.14), transparent 30%),
    #f4f5f9;
}

.login-page[hidden] { display: none; }

.login-card {
  width: min(430px, 100%);
  padding: 42px;
  border: 1px solid rgba(28, 25, 43, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 80px rgba(31, 25, 70, 0.14);
  backdrop-filter: blur(16px);
}

.login-brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 18px;
  font-weight: 760;
}

.login-wavytalk-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(243, 92, 241, 0.2);
}

.login-brand-copy {
  display: grid;
  gap: 5px;
}

.login-wavytalk-wordmark {
  width: 142px;
  height: 28px;
  border-radius: 6px;
}

.login-brand-x {
  display: grid;
  width: 22px;
  height: 18px;
  margin: 0 auto;
  place-items: center;
  color: #b7791f;
  background: transparent;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.login-brand-product-name {
  display: block;
  width: 142px;
  color: #d400b2;
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
}

.login-brand-copy small {
  margin: 0;
  width: 142px;
  color: #a94b91;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: nowrap;
}

.login-eyebrow {
  margin: 34px 0 10px;
  color: #6b5ce7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.login-card h1 { margin: 0; font-size: 30px; letter-spacing: -0.04em; }
.login-copy { margin: 12px 0 28px; color: #747182; line-height: 1.65; }
.login-card form { display: grid; gap: 18px; }
.login-card label { display: grid; gap: 8px; color: #403d4c; font-size: 13px; font-weight: 700; }
.login-card input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #dcd9e8;
  border-radius: 11px;
  outline: none;
  background: #fff;
  color: #211f2c;
  font: inherit;
  font-weight: 500;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.login-card input:focus { border-color: #7563eb; box-shadow: 0 0 0 4px rgba(117, 99, 235, 0.12); }
.login-submit {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #5e4be0, #7a67f1);
  font: inherit;
  font-weight: 760;
  box-shadow: 0 12px 24px rgba(94, 75, 224, 0.22);
  cursor: pointer;
  text-decoration: none;
}
.dingtalk-login { background: linear-gradient(135deg, #1688f0, #0b6fd3); box-shadow: 0 12px 24px rgba(22, 136, 240, 0.22); }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: #9995a5; font-size: 12px; }
.login-divider::before,
.login-divider::after { content: ""; flex: 1; height: 1px; background: #e8e6ee; }
.login-submit:disabled { cursor: wait; opacity: 0.7; }
.login-error { margin: -4px 0 0; color: #c53a52; font-size: 13px; }
.login-card small { display: block; margin-top: 22px; color: #94909f; text-align: center; }

@media (max-width: 520px) {
  .login-page { padding: 18px; }
  .login-card { padding: 30px 24px; border-radius: 20px; }
  .batch-scope-grid { grid-template-columns: 1fr; }
  .batch-scope-builder-heading > span { align-self: flex-start; white-space: normal; }
}

/* Executive dashboard */

.executive-dashboard-page {
  --executive-violet: #6757d9;
  --executive-violet-soft: #f0edff;
  --executive-mint: #188867;
}

.executive-heading {
  margin-bottom: 14px;
}

.executive-status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 11px 15px;
  color: #556176;
  background: linear-gradient(90deg, #f7f8ff, #f7fbfa);
  border: 1px solid #e2e6f0;
  border-radius: 11px;
}

.executive-status-strip > div,
.executive-status-strip > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.executive-status-strip span,
.executive-status-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.executive-status-strip strong {
  color: var(--ink-2);
  font-size: 11px;
}

.live-indicator {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: #28a978;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(40, 169, 120, 0.13);
}

.executive-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 14px;
}

.executive-kpi-grid article {
  position: relative;
  min-width: 0;
  padding: 17px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.executive-kpi-grid article::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #dfe4ed;
  content: "";
}

.executive-kpi-grid article.is-accent {
  background: linear-gradient(145deg, #302d55, #454174);
  border-color: transparent;
}

.executive-kpi-grid article.is-accent::before {
  background: linear-gradient(90deg, #8c7fff, #5fdbc0);
}

.executive-kpi-grid span,
.executive-kpi-grid strong,
.executive-kpi-grid small {
  display: block;
}

.executive-kpi-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.executive-kpi-grid strong {
  margin: 8px 0 5px;
  overflow: hidden;
  font-size: clamp(22px, 2vw, 29px);
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.executive-kpi-grid small {
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.45;
}

.executive-kpi-grid .is-accent span,
.executive-kpi-grid .is-accent small {
  color: #c8c5df;
}

.executive-kpi-grid .is-accent strong {
  color: #fff;
}

.executive-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
  gap: 14px;
}

.executive-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.executive-legend i {
  width: 9px;
  height: 9px;
  background: var(--executive-violet);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(103, 87, 217, 0.13);
}

.opportunity-chart-wrap {
  min-width: 0;
  overflow-x: auto;
}

.opportunity-chart-wrap svg {
  display: block;
  width: 100%;
  min-width: 600px;
  height: auto;
}

.opportunity-quadrant {
  fill: rgba(67, 176, 137, 0.07);
}

.opportunity-quadrant-label {
  fill: #2c8064;
  font-size: 9px;
  font-weight: 700;
}

.opportunity-divider {
  stroke: #cbd3df;
  stroke-dasharray: 5 5;
  stroke-width: 1;
}

.opportunity-bubble circle {
  fill: rgba(103, 87, 217, 0.16);
  stroke: #7769df;
  stroke-width: 2;
}

.opportunity-bubble.is-engaging circle {
  fill: rgba(39, 163, 126, 0.14);
  stroke: #2c9a78;
}

.opportunity-bubble.is-star circle {
  fill: rgba(240, 166, 62, 0.18);
  stroke: #dc9130;
}

.opportunity-bubble > text:not(.opportunity-label) {
  fill: var(--ink-2);
  font-size: 9px;
  font-weight: 800;
}

.opportunity-label {
  fill: #59677a;
  font-size: 9px;
  font-weight: 700;
}

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

.attention-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  background: #fafbfe;
  border: 1px solid #edf0f5;
  border-radius: 9px;
}

.attention-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: #93601f;
  background: #fff3de;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
}

.attention-item.is-high .attention-icon {
  color: #a8434d;
  background: #fff0f1;
}

.attention-item.is-ok .attention-icon {
  color: #237657;
  background: #e9f8f1;
}

.attention-item strong,
.attention-item p {
  display: block;
  margin: 0;
}

.attention-item strong {
  font-size: 11px;
}

.attention-item p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.attention-item > b {
  color: var(--ink-2);
  font-size: 16px;
}

.health-funnel {
  display: grid;
  gap: 12px;
}

.funnel-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(150px, 1.2fr) 42px;
  align-items: center;
  gap: 12px;
}

.funnel-row > div {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.funnel-row > div span {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  color: #6658c8;
  background: var(--executive-violet-soft);
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
}

.funnel-row strong,
.funnel-row b {
  font-size: 10px;
}

.funnel-row > i {
  height: 8px;
  overflow: hidden;
  background: #eef0f5;
  border-radius: 999px;
}

.funnel-row > i em {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7568d9, #63b8a1);
  border-radius: inherit;
}

.funnel-row small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-align: right;
}

.momentum-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.momentum-grid article {
  min-width: 0;
  padding: 14px 12px;
  background: #f7f9fc;
  border: 1px solid #edf0f5;
  border-radius: 9px;
}

.momentum-grid span,
.momentum-grid strong,
.momentum-grid small {
  display: block;
}

.momentum-grid span {
  color: var(--muted);
  font-size: 9px;
}

.momentum-grid strong {
  margin: 8px 0 4px;
  overflow: hidden;
  color: #247458;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.momentum-grid strong.is-negative {
  color: #b34b55;
}

.momentum-grid small {
  color: var(--muted-2);
  font-size: 9px;
}

.momentum-empty {
  grid-column: 1 / -1;
  min-height: 108px;
  padding: 20px;
  text-align: center;
  background: #fafbfe;
  border: 1px dashed #d9dee8;
  border-radius: 9px;
}

.momentum-empty strong {
  color: var(--ink-2);
  font-size: 12px;
}

.momentum-empty p {
  max-width: 420px;
  margin: 7px auto 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.theme-leaderboard-panel {
  margin-top: 14px;
}

.executive-theme-table {
  min-width: 760px;
}

.theme-rank {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--muted);
  background: #f1f3f7;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
}

.theme-rank.is-top {
  color: #5d4fc0;
  background: var(--executive-violet-soft);
}

.executive-actions-section {
  margin-top: 18px;
  padding: 20px;
  color: #fff;
  background: linear-gradient(135deg, #2f2d4f, #3d4964);
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(38, 42, 70, 0.14);
}

.executive-actions-heading {
  margin-bottom: 14px;
}

.executive-actions-heading .eyebrow {
  color: #aeb7ff;
}

.executive-actions-heading h2 {
  margin: 4px 0 0;
  color: #fff;
  font-size: 17px;
}

.executive-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.executive-action-grid article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.executive-action-grid article > span {
  color: #9fe0ce;
  font-size: 18px;
  font-weight: 800;
}

.executive-action-grid small,
.executive-action-grid strong {
  display: block;
}

.executive-action-grid small {
  color: #aeb7c9;
  font-size: 9px;
  font-weight: 700;
}

.executive-action-grid strong {
  margin-top: 5px;
  color: #fff;
  font-size: 12px;
}

.executive-action-grid p {
  margin: 6px 0 0;
  color: #c9ceda;
  font-size: 9px;
  line-height: 1.55;
}

@media (max-width: 1180px) {
  .executive-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .executive-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .executive-status-strip,
  .executive-status-strip > div,
  .executive-status-strip > div:first-child {
    align-items: flex-start;
    flex-direction: column;
  }

  .executive-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .executive-kpi-grid article.is-accent {
    grid-column: 1 / -1;
  }

  .funnel-row {
    grid-template-columns: 1fr 42px;
  }

  .funnel-row > i {
    grid-column: 1;
    grid-row: 2;
  }

  .funnel-row > small {
    grid-column: 2;
    grid-row: 2;
  }

  .momentum-grid,
  .executive-action-grid {
    grid-template-columns: 1fr;
  }

  .executive-actions-section {
    padding: 16px;
  }
}

/* Component-wall dashboard */

.dashboard-board-page {
  max-width: 1560px;
}

.dashboard-board-shell {
  overflow: visible;
  background: transparent;
}

.dashboard-board-toolbar {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.dashboard-board-title,
.dashboard-board-tools,
.dashboard-board-summary,
.dashboard-board-summary > div,
.dashboard-board-metrics {
  display: flex;
  align-items: center;
}

.dashboard-board-title {
  min-width: 0;
  gap: 11px;
}

.dashboard-board-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--blue), #4f86ee);
  border: 1px solid transparent;
  border-radius: 9px;
  box-shadow: 0 7px 16px rgba(37, 99, 235, 0.2);
  font-size: 22px;
  font-weight: 800;
}

.dashboard-board-title > div {
  min-width: 0;
}

.dashboard-board-title span:not(.dashboard-board-mark) {
  display: block;
  max-width: 420px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-board-title h1 {
  margin: 3px 0 0;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.dashboard-board-tools {
  flex: 0 0 auto;
  gap: 8px;
}

.dashboard-widget-customizer {
  position: relative;
}

.dashboard-widget-customizer > summary {
  list-style: none;
}

.dashboard-widget-customizer > summary::-webkit-details-marker {
  display: none;
}

.dashboard-widget-customizer > summary b {
  color: var(--blue-dark);
  font-size: 9px;
}

.dashboard-widget-customizer[open] > summary {
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-color: #b9cdf5;
}

.dashboard-widget-customizer-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  width: 280px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(28, 44, 68, 0.16);
}

.dashboard-widget-customizer-panel > div {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  padding: 2px 3px 8px;
  border-bottom: 1px solid var(--line);
}

.dashboard-widget-customizer-panel strong {
  font-size: 11px;
}

.dashboard-widget-customizer-panel button,
.dashboard-quick-filter-heading button {
  padding: 0;
  color: var(--blue-dark);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.dashboard-widget-customizer-panel label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px;
  color: var(--ink-2);
  border-radius: 6px;
  cursor: pointer;
  font-size: 10px;
}

.dashboard-widget-customizer-panel label:hover {
  background: var(--surface-soft);
}

.board-tool-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.board-tool-button:hover:not(:disabled) {
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-color: #b9cdf5;
}

.board-tool-button:disabled {
  color: #a4acb9;
  background: #edf0f4;
  border-color: #edf0f4;
  cursor: not-allowed;
}

.board-tool-button.is-primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.dashboard-board-summary {
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  margin-bottom: 14px;
  padding: 9px 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.dashboard-board-summary > div {
  min-width: 0;
  gap: 8px;
}

.dashboard-board-summary p,
.dashboard-board-summary span {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.dashboard-board-summary strong {
  color: var(--ink-2);
  font-size: 10px;
}

.dashboard-quick-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(4, minmax(150px, 0.8fr));
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.dashboard-quick-filter-heading {
  align-self: center;
}

.dashboard-quick-filter-heading > div,
.dashboard-quick-filters label {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.dashboard-quick-filter-heading strong {
  font-size: 12px;
}

.dashboard-quick-filter-heading span,
.dashboard-quick-filters label > span {
  color: var(--muted);
  font-size: 9px;
}

.dashboard-quick-filter-heading button {
  margin-top: 7px;
}

.dashboard-quick-filters select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 9px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  font: inherit;
  font-size: 10px;
}

.dashboard-board-metrics {
  justify-content: center;
  gap: 5px;
}

.dashboard-board-metrics span {
  padding: 6px 9px;
  color: var(--muted);
  background: var(--surface-soft);
  border-radius: 7px;
  white-space: nowrap;
}

.dashboard-board-metrics b {
  margin-right: 3px;
  color: var(--ink-2);
  font-size: 11px;
}

.dashboard-widget-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
}

.dashboard-widget {
  min-width: 0;
  min-height: 350px;
  padding: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.dashboard-widget[hidden] {
  display: none;
}

.dashboard-widget-grid.is-empty::before {
  display: grid;
  min-height: 220px;
  grid-column: 1 / -1;
  place-items: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  content: "当前所选图表暂无可展示的数据，可调整筛选或自定义图表";
  font-size: 11px;
}

.dashboard-widget-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.dashboard-widget-heading h2,
.dashboard-widget-heading p {
  margin: 0;
}

.dashboard-widget-heading h2 {
  color: var(--ink);
  font-size: 15px;
}

.dashboard-widget-heading p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.dashboard-widget-heading-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
}

.dashboard-widget-heading-actions > span {
  flex: 0 0 auto;
  padding: 5px 7px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-radius: 6px;
  font-size: 9px;
  font-weight: 700;
}

.dashboard-widget-heading-actions button {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.dashboard-widget-heading-actions button:hover,
.dashboard-widget-heading-actions button:focus-visible {
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-color: #b9cdf5;
}

.dashboard-widget-chart {
  display: grid;
  min-height: 255px;
  align-items: center;
  border-radius: 8px;
  cursor: zoom-in;
  transition: background 150ms ease;
}

.dashboard-widget-chart:hover,
.dashboard-widget-chart:focus-visible {
  background: #fbfcff;
  outline: 2px solid rgba(37, 99, 235, 0.1);
}

.dashboard-chart-modal {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(20, 31, 48, 0.56);
  backdrop-filter: blur(4px);
}

.dashboard-chart-modal[hidden] {
  display: none;
}

.dashboard-chart-modal > section {
  width: min(1100px, 94vw);
  max-height: 90vh;
  overflow: auto;
  padding: 22px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(13, 28, 49, 0.28);
}

.dashboard-chart-modal header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.dashboard-chart-modal header span {
  color: var(--blue-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.dashboard-chart-modal h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.dashboard-chart-modal header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.dashboard-chart-modal header button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--muted);
  background: var(--surface-soft);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 22px;
}

.dashboard-chart-modal-body {
  min-height: 480px;
  padding: 24px 12px 6px;
}

.dashboard-chart-modal-body .dashboard-donut-layout {
  max-width: 900px;
  grid-template-columns: minmax(300px, 0.9fr) minmax(260px, 1.1fr);
  margin: 0 auto;
}

.dashboard-chart-modal-body .dashboard-column-chart {
  max-height: 540px;
}

.dashboard-chart-modal-body .dashboard-distribution-bars {
  max-width: 900px;
  min-height: 450px;
  margin: 0 auto;
}

.dashboard-chart-modal-body .dashboard-chart-legend li,
.dashboard-chart-modal-body .dashboard-distribution-bars span {
  font-size: 12px;
}

.dashboard-chart-modal-body .dashboard-chart-legend strong,
.dashboard-chart-modal-body .dashboard-distribution-bars strong {
  font-size: 13px;
}

.dashboard-donut-layout {
  display: grid;
  grid-template-columns: minmax(125px, 0.9fr) minmax(120px, 1.1fr);
  align-items: center;
  gap: 10px;
}

.dashboard-donut-layout svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.dashboard-donut-total {
  fill: var(--ink);
  font-size: 26px;
  font-weight: 800;
}

.dashboard-donut-caption {
  fill: var(--muted);
  font-size: 10px;
}

.dashboard-chart-legend {
  display: grid;
  align-content: center;
  gap: 9px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dashboard-chart-legend li {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 9px;
}

.dashboard-chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dashboard-chart-legend span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-chart-legend strong {
  color: var(--ink-2);
  font-size: 10px;
}

.dashboard-chart-legend small {
  min-width: 26px;
  color: var(--muted-2);
  font-size: 8px;
  text-align: right;
}

.dashboard-column-chart {
  display: block;
  width: 100%;
  height: auto;
}

.dashboard-widget-grid-line {
  stroke: var(--line);
  stroke-width: 1;
}

.dashboard-widget-axis {
  fill: var(--muted-2);
  font-size: 9px;
}

.dashboard-widget-value {
  fill: var(--blue-dark);
  font-size: 10px;
  font-weight: 700;
}

.dashboard-distribution-bars {
  display: grid;
  align-content: center;
  gap: 13px;
  min-height: 250px;
}

.dashboard-distribution-bars > div {
  display: grid;
  grid-template-columns: minmax(82px, 0.9fr) minmax(90px, 1.4fr) 28px;
  align-items: center;
  gap: 8px;
}

.dashboard-distribution-bars span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-distribution-bars i {
  height: 12px;
  overflow: hidden;
  background: #edf1f7;
  border-radius: 3px;
}

.dashboard-distribution-bars em {
  display: block;
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
}

.dashboard-distribution-bars strong {
  color: var(--blue-dark);
  font-size: 10px;
  text-align: right;
}

.dashboard-chart-empty {
  margin: 0;
  color: var(--muted-2);
  font-size: 10px;
  text-align: center;
}

@media (max-width: 1280px) {
  .dashboard-quick-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-quick-filter-heading {
    grid-column: 1 / -1;
  }

  .dashboard-widget-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .dashboard-board-toolbar,
  .dashboard-board-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-board-tools {
    width: 100%;
    flex-wrap: wrap;
  }

  .dashboard-board-metrics {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .dashboard-quick-filters {
    grid-template-columns: 1fr;
  }

  .dashboard-quick-filter-heading {
    grid-column: auto;
  }

  .dashboard-widget-customizer {
    flex: 1 1 auto;
  }

  .dashboard-widget-customizer > summary {
    justify-content: center;
  }

  .dashboard-widget-customizer-panel {
    right: auto;
    left: 0;
    width: min(280px, calc(100vw - 42px));
  }

  .dashboard-widget-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .dashboard-board-toolbar {
    padding: 14px;
  }

  .board-tool-button {
    flex: 1 1 auto;
    justify-content: center;
  }

  .dashboard-widget {
    min-height: 330px;
    padding: 16px;
  }

  .dashboard-chart-modal {
    padding: 12px;
  }

  .dashboard-chart-modal > section {
    width: 100%;
    padding: 16px;
  }

  .dashboard-chart-modal-body {
    min-height: 360px;
    padding: 16px 0 0;
  }

  .dashboard-chart-modal-body .dashboard-donut-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .dashboard-donut-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-donut-layout svg {
    width: min(190px, 72%);
    margin: 0 auto;
  }
}

/* Current release announcement */
.release-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 13px;
  margin: 12px 24px 0;
  padding: 11px 14px;
  color: #29456f;
  background: linear-gradient(100deg, #edf4ff, #f7faff 62%, #fff);
  border: 1px solid #d2dff3;
  border-radius: 12px;
  box-shadow: 0 5px 16px rgba(45, 83, 145, .07);
}

.release-banner[hidden] { display: none; }

.release-banner-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: #fff;
  background: #467ee5;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 5px 12px rgba(70, 126, 229, .22);
}

.release-banner-copy { min-width: 0; }
.release-banner-copy > div { display: flex; align-items: center; gap: 8px; }
.release-banner-copy strong { color: #1d3458; font-size: 12px; }
.release-banner-copy span { color: #6681aa; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 9px; }

.release-banner-copy p {
  margin: 3px 0 0;
  overflow: hidden;
  color: #59708f;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.release-banner time { color: #8190a6; font-size: 9px; white-space: nowrap; }

#dismiss-release-banner {
  display: grid;
  width: 26px;
  height: 26px;
  padding: 0;
  place-items: center;
  color: #7890b3;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-size: 18px;
}

#dismiss-release-banner:hover { color: #315f9e; background: rgba(70, 126, 229, .09); }

.release-history-modal {
  z-index: 130;
}

.release-history-dialog {
  display: flex;
  width: min(680px, 100%);
  max-height: min(820px, calc(100vh - 32px));
  flex-direction: column;
  padding: 30px;
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 213, 137, .28), transparent 25%),
    linear-gradient(180deg, #fffdf8 0%, #fff 34%);
  text-align: left;
}

.release-history-icon {
  width: 54px;
  height: 54px;
  margin: 0 0 12px;
  color: #c75b26;
  background: linear-gradient(135deg, #fff1c8, #ffe0c2);
  border: 1px solid #f8d79b;
  border-radius: 16px;
  font-size: 27px;
  box-shadow: 0 8px 18px rgba(220, 135, 46, .16);
}

.release-history-heading h2,
.release-history-heading p {
  margin: 0;
}

.release-history-heading h2 {
  margin-top: 4px;
  color: var(--ink);
  font-size: 23px;
  letter-spacing: -.02em;
}

.release-history-heading p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.release-history-summary {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.release-history-summary > span {
  display: flex;
  min-width: 130px;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  color: #845b2d;
  background: rgba(255, 247, 226, .85);
  border: 1px solid #f6e3b6;
  border-radius: 10px;
}

.release-history-summary strong {
  color: #c75b26;
  font-size: 16px;
}

.release-history-summary small {
  color: #8e775b;
  font-size: 10px;
}

.release-history-list {
  display: grid;
  max-height: 510px;
  gap: 12px;
  margin: 16px 0 0;
  padding: 2px 6px 2px 1px;
  overflow: auto;
}

.release-history-entry {
  position: relative;
  padding: 16px 17px 14px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid #e8eaf0;
  border-radius: 13px;
  box-shadow: 0 5px 15px rgba(41, 55, 85, .06);
}

.release-history-entry header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.release-history-entry-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.release-history-entry-emoji {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  background: #fff5df;
  border: 1px solid #f7e2b7;
  border-radius: 10px;
  font-size: 18px;
}

.release-history-entry-heading > div {
  display: grid;
  gap: 2px;
}

.release-history-entry-category {
  color: #c36a32;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
}

.release-history-entry strong {
  color: var(--ink);
  font-size: 14px;
}

.release-history-entry code {
  padding: 2px 5px;
  color: #6681aa;
  background: #edf3ff;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9px;
}

.release-history-entry time {
  flex: 0 0 auto;
  color: var(--muted-2);
  font-size: 10px;
}

.release-history-entry p {
  margin: 0;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.55;
}

.release-history-entry-summary {
  margin: 12px 0 0 !important;
  color: var(--ink-2) !important;
  font-size: 12px !important;
  font-weight: 600;
  line-height: 1.6 !important;
}

.release-history-entry-impact {
  margin-top: 11px;
  padding: 9px 11px;
  background: #fff9ec;
  border: 1px solid #f7e6bd;
  border-radius: 9px;
}

.release-history-entry-impact > span,
.release-history-entry-action > span {
  display: block;
  margin-bottom: 3px;
  color: #bf672c;
  font-size: 9px;
  font-weight: 800;
}

.release-history-entry-impact p {
  color: #765f43;
  font-size: 10px;
}

.release-history-entry ul {
  display: grid;
  gap: 4px;
  margin: 11px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.release-history-entry-action {
  margin-top: 10px;
  color: #53657f;
  font-size: 10px;
  line-height: 1.5;
}

.release-history-commit {
  display: block;
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 9px;
}

.release-history-empty {
  padding: 28px 12px;
  color: var(--muted);
  text-align: center;
}

.release-history-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

/* Batch processing workbench */
.processing-overview {
  max-width: 1280px;
  margin: 0 auto;
}

.processing-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding: 4px 2px 0;
}

.processing-hero h1 { margin: 5px 0 7px; font-size: 30px; }

.processing-hero p,
.processing-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.processing-live-note,
.processing-section-heading > span {
  padding: 7px 11px;
  color: #56709a;
  background: #f5f8fd;
  border: 1px solid #dce5f2;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.processing-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.processing-stats article {
  position: relative;
  min-height: 108px;
  padding: 18px 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e3e8f0;
  border-radius: 13px;
  box-shadow: 0 5px 16px rgba(29, 50, 82, .045);
}

.processing-stats article::after {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 8px;
  height: 8px;
  background: #cfd8e6;
  border-radius: 50%;
  content: "";
}

.processing-stats article.is-active { background: linear-gradient(145deg, #eef4ff, #fff 76%); border-color: #cfddf6; }
.processing-stats article.is-active::after { background: #467ee5; box-shadow: 0 0 0 5px rgba(70, 126, 229, .1); }
.processing-stats article.is-complete::after { background: #35a66f; box-shadow: 0 0 0 5px rgba(53, 166, 111, .1); }
.processing-stats article.is-duration::after { background: #8a6bd8; box-shadow: 0 0 0 5px rgba(138, 107, 216, .1); }

.processing-stats span,
.processing-stats strong,
.processing-stats small { display: block; }
.processing-stats span { color: #64728a; font-size: 11px; font-weight: 700; }
.processing-stats strong { margin: 9px 0 4px; color: #16233a; font-size: 29px; line-height: 1; }
.processing-stats small { color: #97a1b1; font-size: 10px; }

.processing-batches {
  padding: 22px 22px 18px;
  background: #fff;
  border: 1px solid #e1e7f0;
  border-radius: 15px;
  box-shadow: 0 8px 26px rgba(35, 62, 101, .055);
}

.processing-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.processing-section-heading h2 { margin: 0 0 5px; color: #17243a; font-size: 18px; }

.processing-toolbar {
  display: grid;
  grid-template-columns: minmax(300px, 1.8fr) minmax(145px, .65fr) minmax(165px, .75fr) auto;
  align-items: end;
  gap: 10px;
  margin: 19px 0 15px;
  padding: 14px;
  background: #f8fafd;
  border: 1px solid #e5eaf2;
  border-radius: 11px;
}

.processing-toolbar label > span {
  display: block;
  margin: 0 0 6px;
  color: #65738a;
  font-size: 10px;
  font-weight: 700;
}

.processing-toolbar input,
.processing-toolbar select {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  color: #243650;
  background: #fff;
  border: 1px solid #d7dfeb;
  border-radius: 8px;
  outline: none;
  font: inherit;
  font-size: 11px;
}

.processing-toolbar input:focus,
.processing-toolbar select:focus {
  border-color: #6c94dd;
  box-shadow: 0 0 0 3px rgba(70, 126, 229, .1);
}

.processing-search > div { position: relative; }
.processing-search svg {
  position: absolute;
  top: 11px;
  left: 11px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #8a97a9;
  stroke-linecap: round;
  stroke-width: 1.7;
}
.processing-search input { padding-left: 35px; }
.processing-search input::placeholder { color: #9ba5b3; }

.processing-toolbar-actions {
  display: flex;
  gap: 7px;
}

.processing-toolbar-actions .button {
  min-width: 64px;
  height: 38px;
  padding: 0 13px;
}

.processing-table-wrap {
  overflow-x: auto;
  border: 1px solid #e3e8f0;
  border-radius: 10px;
}

.processing-table {
  width: 100%;
  min-width: 1240px;
  border-collapse: collapse;
  table-layout: auto;
}

.processing-table th {
  padding: 11px 13px;
  color: #65738a;
  background: #f7f9fc;
  border-bottom: 1px solid #e3e8f0;
  font-size: 10px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.processing-table th:first-child { width: 100px; }
.processing-table th:nth-child(2) { width: 190px; }
.processing-table th:nth-child(3) { width: 110px; }
.processing-table th:nth-child(4) { width: 130px; }
.processing-table th:nth-child(5) { width: 145px; }
.processing-table th:nth-child(6),
.processing-table th:nth-child(7),
.processing-table th:nth-child(10),
.processing-table th:nth-child(11) { width: 80px; }
.processing-table th:nth-child(8) { width: 120px; }
.processing-table th:nth-child(9) { width: 100px; }

.processing-table td {
  padding: 13px;
  color: #4d5d73;
  border-bottom: 1px solid #edf0f5;
  font-size: 11px;
  vertical-align: middle;
}

.processing-table tbody tr:last-child td { border-bottom: 0; }
.processing-table tbody tr:hover td { background: #fbfcff; }

.processing-batch-cell strong,
.processing-batch-cell span,
.processing-source-cell strong,
.processing-source-cell span,
.processing-batch-name-cell {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.processing-batch-cell strong { color: #253958; font-size: 11px; }
.processing-batch-cell span { margin-top: 4px; color: #8390a2; font-size: 10px; }
.processing-batch-cell strong em {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 5px;
  color: #426ea9;
  background: #edf3fd;
  border-radius: 4px;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
  vertical-align: 1px;
}
.processing-source-cell strong { color: #465a78; font-weight: 650; }
.processing-source-cell span { margin-top: 3px; color: #929cab; font-size: 9px; }
.processing-batch-name-cell { max-width: 220px; color: #465a78; }

.processing-count { color: #273b5b; font-weight: 700; font-variant-numeric: tabular-nums; }
.processing-duration { color: #435873; font-variant-numeric: tabular-nums; white-space: nowrap; }

.processing-table-progress {
  display: grid;
  grid-template-columns: minmax(56px, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.processing-table-progress > span {
  display: block;
  height: 6px;
  overflow: hidden;
  background: #e8edf5;
  border-radius: 999px;
}

.processing-table-progress > span i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #467ee5, #75a1ed);
  border-radius: inherit;
}

.processing-table-progress > b { color: #526882; font-size: 10px; font-variant-numeric: tabular-nums; }
.processing-table-progress.is-completed > span i { background: linear-gradient(90deg, #31946a, #5db98d); }

.processing-status {
  display: inline-flex;
  min-width: 58px;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  color: #68768a;
  background: #f1f3f7;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.processing-status.is-processing { color: #3567b8; background: #eaf1ff; }
.processing-status.is-completed { color: #267c58; background: #e7f6ef; }
.processing-status.is-waiting { color: #6d7180; background: #f0f1f4; }
.processing-status.is-stopped { color: #765f45; background: #f6f0e8; }

.processing-table-state {
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  color: #748197;
  text-align: center;
}

.processing-table-state strong { color: #53637a; font-size: 12px; }
.processing-table-state div p { margin: 5px 0 0; color: #8a95a5; font-size: 10px; }

.processing-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #dbe4f2;
  border-top-color: #467ee5;
  border-radius: 50%;
  animation: processing-spin .75s linear infinite;
}

@keyframes processing-spin { to { transform: rotate(360deg); } }

.processing-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  color: #748197;
  font-size: 10px;
}

.processing-pagination[hidden] { display: none; }
.processing-pagination > div,
.processing-pagination label { display: flex; align-items: center; gap: 8px; }
.processing-pagination select {
  height: 31px;
  color: #4f6076;
  background: #fff;
  border: 1px solid #d9e0e9;
  border-radius: 7px;
  font: inherit;
}
.processing-pagination .button { height: 31px; padding: 0 11px; font-size: 10px; }
.processing-pagination button:disabled { cursor: not-allowed; opacity: .45; }

/* Administrator task center */
.task-center {
  max-width: 1280px;
}

.task-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
  padding: 4px 2px 0;
}

.task-hero h1 {
  margin: 5px 0 7px;
  font-size: 30px;
}

.task-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.task-center .task-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.task-center .task-stats > div {
  position: relative;
  min-height: 102px;
  padding: 17px 19px;
  overflow: hidden;
  border-color: #e3e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(29, 50, 82, 0.04);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.task-center .task-stats > div:hover {
  border-color: #bdcce4;
  box-shadow: 0 8px 20px rgba(45, 83, 145, .09);
  transform: translateY(-1px);
}

.task-center .task-stats > div:focus-visible {
  outline: 3px solid rgba(70, 126, 229, .2);
  outline-offset: 2px;
}

.task-center .task-stats > div::after {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 7px;
  height: 7px;
  background: #d7deea;
  border-radius: 50%;
  content: "";
}

.task-center .task-stats > div.is-accent {
  background: linear-gradient(140deg, #eef4ff, #fff 75%);
  border-color: #cfddf6;
}

.task-center .task-stats > div.is-accent::after {
  background: #467ee5;
  box-shadow: 0 0 0 5px rgba(70, 126, 229, 0.1);
}

.task-center .task-stats span {
  color: #64728a;
  font-size: 11px;
  font-weight: 700;
}

.task-center .task-stats strong {
  margin: 8px 0 3px;
  color: #16233a;
  font-size: 27px;
  line-height: 1;
}

.task-center .task-stats small {
  color: #97a1b1;
  font-size: 10px;
}

.task-center .batch-monitor {
  margin: 0 0 16px;
  padding: 21px;
  background: linear-gradient(145deg, #f4f8ff, #fbfdff 48%, #fff);
  border-color: #dbe5f4;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(35, 62, 101, 0.06);
  scroll-margin-top: 74px;
}

.task-center .batch-monitor-heading {
  align-items: flex-start;
}

.task-center .batch-monitor-heading h2,
.task-workspace-heading h2 {
  margin: 3px 0 5px;
  color: #17243a;
  font-size: 18px;
}

.task-center .batch-monitor-heading p,
.task-workspace-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.task-center .batch-monitor-summary {
  padding: 7px 11px;
  border: 1px solid #dce7f9;
}

.task-center .batch-monitor-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.task-center .batch-monitor-card {
  padding: 15px 16px 13px;
  border-color: #e0e6ef;
  border-radius: 11px;
  box-shadow: 0 3px 10px rgba(36, 54, 82, 0.035);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.task-center .batch-monitor-card:hover {
  border-color: #b9cbea;
  box-shadow: 0 8px 20px rgba(45, 83, 145, .1);
  transform: translateY(-1px);
}

.task-center .batch-monitor-card:focus-visible {
  outline: 3px solid rgba(70, 126, 229, .2);
  outline-offset: 2px;
}

.task-center .batch-monitor-card h3 {
  margin: 10px 0 4px;
  font-size: 13px;
}

.task-center .batch-monitor-card > p {
  min-height: auto;
  font-size: 9px;
}

.task-center .batch-workflow-rail.is-compact {
  margin: 15px 0 12px;
}

.task-center .batch-monitor-card-foot {
  align-items: center;
  margin-top: 0;
  padding-top: 11px;
}

.task-center .batch-monitor-card-foot > span b {
  color: var(--ink-2);
}

.task-center .batch-monitor-card-foot > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.task-center .batch-monitor-card-foot small {
  max-width: 180px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-monitor-empty {
  display: flex;
  grid-column: 1 / -1;
  min-height: 100px;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border: 1px dashed #ccd7e8;
  border-radius: 11px;
}

.task-monitor-empty > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: #4c83e5;
  border-radius: 50%;
}

.task-monitor-empty > div {
  min-width: 0;
  flex: 1;
}

.task-monitor-empty strong,
.task-monitor-empty p {
  display: block;
}

.task-monitor-empty p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.task-workspace {
  padding: 21px;
  background: var(--surface);
  border: 1px solid #e0e5ed;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(35, 52, 80, 0.05);
}

.task-workspace-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}

.task-center .management-tabs {
  flex: 0 0 auto;
  margin: 0;
  padding: 4px;
  background: #f0f3f7;
  border: 1px solid #e5e9ef;
  border-radius: 10px;
}

.task-center .management-tabs button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  font-size: 11px;
}

.task-center .management-tabs button small {
  display: grid;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  place-items: center;
  color: #6d7b90;
  background: #dfe5ee;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
}

.task-center .management-tabs button.is-active small {
  color: #fff;
  background: #4f7fd8;
}

.task-workspace-panel > .section-heading {
  margin-bottom: 11px;
}

.task-workspace-panel {
  scroll-margin-top: 74px;
}

.task-workspace-panel > .section-heading h3 {
  margin-bottom: 4px;
  font-size: 14px;
}

.task-workspace-panel > .section-heading p {
  font-size: 10px;
}

.task-center .batch-table th {
  padding-top: 10px;
  padding-bottom: 10px;
  background: #f7f9fc;
  font-size: 9px;
}

.task-center .batch-table td {
  padding-top: 12px;
  padding-bottom: 12px;
  vertical-align: middle;
}

.task-center .batch-table td:first-child {
  min-width: 90px;
}

.task-center .batch-table td:first-child strong,
.task-center .batch-table td:first-child span,
.task-center .batch-table td:nth-child(4) strong,
.task-center .batch-table td:nth-child(4) small,
.task-center .batch-table td:nth-child(5) small {
  display: block;
}

.task-center .batch-table td:first-child span {
  max-width: 330px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-center .batch-table td:nth-child(2) {
  min-width: 190px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-center .batch-table td:nth-child(4) {
  min-width: 125px;
}

.task-center .batch-table td:nth-child(n+5):nth-child(-n+16) {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.task-center .batch-table td:nth-child(11) {
  min-width: 115px;
}

.task-center .batch-table td:nth-child(4) small,
.task-center .batch-table td:nth-child(5) small {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 8px;
}

.batch-table-progress {
  min-width: 116px;
}

.batch-table-progress > span {
  color: var(--muted);
  font-size: 9px;
}

.batch-table-progress > span b {
  color: var(--ink-2);
}

.batch-table-progress > span small {
  display: block;
  margin-bottom: 2px;
  color: var(--muted-2);
  font-size: 8px;
}

.batch-table-progress > i {
  display: block;
  width: 100%;
  height: 4px;
  margin-top: 6px;
  overflow: hidden;
  background: #e9edf3;
  border-radius: 999px;
}

.batch-table-progress > i b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #5084e6, #7aa5f0);
  border-radius: inherit;
}

.batch-detail-disclosure {
  margin-top: 12px;
  overflow: hidden;
  background: #fafbfd;
  border: 1px solid #e4e8ef;
  border-radius: 10px;
}

.batch-detail-disclosure > summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  cursor: pointer;
  list-style: none;
}

.batch-detail-disclosure > summary::-webkit-details-marker {
  display: none;
}

.batch-detail-disclosure > summary span,
.batch-detail-disclosure > summary strong,
.batch-detail-disclosure > summary small {
  display: block;
}

.batch-detail-disclosure > summary strong {
  color: var(--ink-2);
  font-size: 11px;
}

.batch-detail-disclosure > summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.batch-detail-disclosure > summary i {
  color: #738099;
  font-size: 18px;
  font-style: normal;
  transition: transform 0.2s ease;
}

.batch-detail-disclosure[open] > summary i {
  transform: rotate(180deg);
}

.task-center .batch-detail-panel {
  margin: 0;
  padding: 19px;
  background: #fff;
  border: 0;
  border-top: 1px solid #e4e8ef;
  border-radius: 0;
  box-shadow: none;
}

.batch-runtime-panel {
  margin: 16px 0 18px;
  padding: 17px;
  background: #fbfcfe;
  border: 1px solid #dce4ef;
  border-radius: 12px;
}

.batch-runtime-panel.is-loading {
  min-height: 94px;
  background: linear-gradient(100deg, #f8fafc 25%, #fff 42%, #f8fafc 60%);
  background-size: 220% 100%;
  animation: runtime-loading 1.6s linear infinite;
}

@keyframes runtime-loading {
  to { background-position: -120% 0; }
}

.batch-runtime-heading,
.batch-workers-heading,
.batch-worker-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.batch-runtime-heading h3 {
  margin: 2px 0 3px;
  font-size: 15px;
}

.batch-runtime-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.batch-runtime-updated {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: #356ac3;
  background: #edf4ff;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
}

.batch-runtime-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.batch-runtime-summary > div {
  min-width: 0;
  padding: 11px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
}

.batch-runtime-summary span,
.batch-runtime-summary strong {
  display: block;
}

.batch-runtime-summary > div > span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.batch-runtime-summary strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-duration {
  color: #263a59;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  white-space: nowrap;
}

.batch-duration.is-live::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  background: #3f7de0;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(63, 125, 224, .12);
  content: "";
}

.batch-duration.is-unavailable {
  color: #97a1af;
  font-weight: 600;
}

.batch-stage-timeline {
  margin: 16px 0 0;
  padding: 0;
  background: #fff;
  border: 1px solid #e1e7ef;
  border-radius: 10px;
  list-style: none;
}

.batch-stage-timeline > li {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 67px;
  padding: 10px 13px;
}

.batch-stage-timeline > li + li {
  border-top: 1px solid #edf0f4;
}

.batch-stage-timeline > li > i {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #fff;
  background: #d9dfe8;
  border-radius: 50%;
  font-size: 9px;
  font-style: normal;
}

.batch-stage-timeline > li.is-complete > i { background: #4d82df; }
.batch-stage-timeline > li.is-running > i { background: #2f6fd7; box-shadow: 0 0 0 4px #e7f0ff; }
.batch-stage-timeline > li.is-failed > i { background: #d0713e; }

.batch-stage-timeline > li > div > span,
.batch-stage-timeline > li > div > strong,
.batch-stage-timeline > li > div > small {
  display: block;
}

.batch-stage-timeline > li > div > span {
  color: #637089;
  font-size: 9px;
  font-weight: 800;
}

.batch-stage-timeline > li > div > strong {
  margin-top: 2px;
  font-size: 11px;
}

.batch-stage-timeline > li > div > small {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 8px;
}

.batch-workers {
  margin-top: 13px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e1e7ef;
  border-radius: 10px;
}

.batch-workers-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 13px;
}

.batch-workers-heading strong,
.batch-workers-heading small { display: block; }
.batch-workers-heading strong { font-size: 11px; }
.batch-workers-heading small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.batch-workers-heading > span {
  padding: 4px 7px;
  color: #356ac3;
  background: #edf4ff;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
}

.batch-worker-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  background: #f5f7fa;
  border-top: 1px solid #e8ecf2;
}

.batch-worker-pool + .batch-worker-pool { border-top: 1px solid #e8ecf2; }
.batch-worker-pool-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 13px;
  color: var(--muted);
  background: #fafbfd;
  border-top: 1px solid #e8ecf2;
  font-size: 9px;
}
.batch-worker-pool-heading strong { color: var(--text); font-size: 10px; }
.batch-worker-pool .batch-worker-list { border-top: 0; }

.batch-worker-card {
  min-width: 0;
  padding: 13px;
  background: #fff;
  border: 1px solid #e0e6ee;
  border-radius: 9px;
}

.batch-worker-card.is-busy { border-color: #cbdcf8; box-shadow: inset 0 3px #4c83df; }
.batch-worker-card.is-idle { background: #fafbfc; }
.batch-worker-card > header span:first-child,
.batch-worker-card > header strong { display: block; }
.batch-worker-card > header span:first-child { color: var(--muted); font-size: 8px; font-weight: 800; }
.batch-worker-card > header strong { margin-top: 2px; font-size: 11px; }

.batch-worker-card > dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 11px 0 0;
}

.batch-worker-card > dl > div { min-width: 0; }
.batch-worker-card dt { color: var(--muted-2); font-size: 8px; }
.batch-worker-card dd { margin: 3px 0 0; overflow: hidden; font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }

.batch-timing-empty {
  margin: 8px 0 0;
  color: var(--muted-2);
  font-size: 8px;
}

.batch-timing-empty.is-block { padding: 12px; background: #fff; border: 1px dashed #dce2ea; border-radius: 8px; }

.batch-failure-summary {
  margin: 16px 0;
  padding: 15px 16px;
  background: #fff8f3;
  border: 1px solid #f1d5c1;
  border-left: 4px solid #d97a3f;
  border-radius: 10px;
}

.batch-failure-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.batch-failure-summary-head span,
.batch-failure-summary-head strong,
.batch-failure-summary-head p {
  display: block;
}

.batch-failure-summary-head span {
  margin-bottom: 4px;
  color: #b35d2c;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
}

.batch-failure-summary-head strong {
  color: #59311d;
  font-size: 13px;
}

.batch-failure-summary-head p {
  margin: 4px 0 0;
  color: #88604a;
  font-size: 10px;
}

.batch-failure-summary-head > b {
  color: #b35d2c;
  font-size: 22px;
}

.batch-failure-summary ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 11px 0 0;
  border-top: 1px solid #f0dccf;
  list-style: none;
}

.batch-failure-summary li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  color: #79543f;
  background: rgba(255, 255, 255, .7);
  border: 1px solid #edd6c7;
  border-radius: 7px;
  font-size: 9px;
}

.batch-failure-summary li strong {
  color: #a9582d;
}

.task-center .repair-monitor {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.task-center .repair-monitor-heading h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.task-center .repair-monitor-stats {
  margin: 14px 0;
}

.task-center .repair-monitor-stats > div {
  background: #f7f9fc;
}

.task-center .repair-monitor-stats strong {
  font-size: 21px;
}

.task-center .refresh-policy-card {
  margin: 0 0 16px;
  background: linear-gradient(135deg, #f3f7ff, #fff);
  box-shadow: none;
}

@media (max-width: 1040px) {
  .processing-toolbar {
    grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(140px, .7fr));
  }

  .processing-toolbar-actions { grid-column: 1 / -1; }

  .task-workspace-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .task-center .management-tabs {
    display: flex;
    width: 100%;
  }

  .task-center .management-tabs button {
    min-width: 0;
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 820px) {
  .processing-stats,
  .task-center .task-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-center .batch-monitor-list {
    grid-template-columns: 1fr;
  }

  .processing-toolbar { grid-template-columns: 1fr 1fr; }
  .processing-search { grid-column: 1 / -1; }

  .batch-runtime-summary,
  .batch-worker-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .processing-hero,
  .task-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .processing-live-note { align-self: flex-start; }

  .processing-stats { gap: 8px; }
  .processing-stats article { min-height: 96px; padding: 14px; }

  .processing-batches { padding: 15px; }
  .processing-section-heading { align-items: flex-start; flex-direction: column; }
  .processing-section-heading > span { white-space: normal; }

  .processing-toolbar { grid-template-columns: 1fr; }
  .processing-search,
  .processing-toolbar-actions { grid-column: auto; }
  .processing-toolbar-actions .button { flex: 1; }

  .processing-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .processing-pagination > div {
    flex-wrap: wrap;
  }

  .task-center .task-stats {
    gap: 8px;
  }

  .task-center .task-stats > div {
    min-height: 94px;
    padding: 14px;
  }

  .task-center .batch-monitor,
  .task-workspace {
    padding: 15px;
  }

  .task-center .batch-monitor-heading,
  .task-center .repair-monitor-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-center .batch-monitor-summary,
  .task-center .repair-monitor-summary {
    white-space: normal;
  }

  .task-center .batch-monitor-card-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-center .batch-monitor-card-foot > div {
    width: 100%;
    justify-content: space-between;
  }

  .task-center .management-tabs button {
    padding: 0 7px;
    font-size: 10px;
  }

  .task-center .management-tabs button small {
    display: none;
  }

  .task-center .repair-monitor-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .batch-runtime-panel {
    padding: 13px;
  }

  .batch-runtime-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .batch-runtime-summary,
  .batch-worker-list {
    grid-template-columns: 1fr;
  }

  .batch-stage-timeline > li {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .batch-stage-timeline > li > .batch-duration {
    grid-column: 2;
    justify-self: start;
  }

  .batch-failure-summary-head {
    align-items: flex-start;
  }
}
.date-time-value {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Branded visual shell: analysis launcher and release history drawer */
.changelog-trigger {
  position: relative;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  color: #40516c;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.changelog-trigger:hover {
  color: #9a632c;
  background: #fff8e8;
  border-color: #efd79f;
}

.changelog-trigger svg { width: 17px; height: 17px; }

.changelog-trigger .release-history-count {
  position: absolute;
  top: 6px;
  right: 6px;
  display: block;
  width: 6px;
  min-width: 0;
  height: 6px;
  padding: 0;
  overflow: hidden;
  color: transparent;
  background: #e0a33a;
  border: 2px solid #fff;
  border-radius: 50%;
  box-sizing: content-box;
  font-size: 0;
}

.analysis-launch-heading { align-items: center; }

.analysis-launcher {
  overflow: hidden;
  margin-bottom: 18px;
  background: #fff;
  border: 1px solid #dfe5ee;
  border-radius: 16px;
  box-shadow: 0 8px 26px rgba(31, 54, 92, .07);
}

.analysis-launcher-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 23px 25px 20px;
  background: linear-gradient(110deg, #f8fbff, #fff 64%);
  border-bottom: 1px solid #edf0f5;
}

.analysis-launcher-kicker {
  display: block;
  margin-bottom: 5px;
  color: #4d75b8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.analysis-launcher-heading h2 { margin: 0; color: #1f3150; font-size: 20px; }
.analysis-launcher-heading p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }

.analysis-launcher-steps {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.analysis-launcher-steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.analysis-launcher-steps li:not(:last-child)::after {
  position: absolute;
  top: 14px;
  left: calc(100% + 9px);
  width: 13px;
  height: 1px;
  background: #dce3ee;
  content: "";
}

.analysis-launcher-steps li > span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  color: #6b7b91;
  background: #f3f5f8;
  border: 1px solid #e1e5eb;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
}

.analysis-launcher-steps li.is-complete > span { color: #fff; background: #497ee0; border-color: #497ee0; }
.analysis-launcher-steps strong,
.analysis-launcher-steps small { display: block; white-space: nowrap; }
.analysis-launcher-steps strong { color: #35445b; font-size: 10px; }
.analysis-launcher-steps small { margin-top: 2px; color: #9aa4b3; font-size: 8px; }

.analysis-choice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: 22px;
  padding: 23px 25px;
}

.analysis-choice-group { min-width: 0; margin: 0; padding: 0; border: 0; }

.analysis-choice-group legend {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  padding: 0;
}

.analysis-choice-group legend > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #3d6fc4;
  background: #edf4ff;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
}

.analysis-choice-group legend strong,
.analysis-choice-group legend small { display: block; }
.analysis-choice-group legend strong { color: #253650; font-size: 12px; }
.analysis-choice-group legend small { margin-top: 2px; color: #8a95a6; font-size: 9px; font-weight: 400; }

.analysis-method-options,
.channel-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.analysis-method-card,
.channel-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 102px;
  align-items: center;
  gap: 12px;
  padding: 15px;
  color: #43516a;
  background: #fff;
  border: 1px solid #dfe5ec;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.analysis-method-card:hover,
.channel-card:hover { transform: translateY(-1px); border-color: #adc6f2; box-shadow: 0 7px 18px rgba(42, 83, 150, .08); }

.analysis-method-card.is-active,
.channel-card.is-active { background: #f6f9ff; border-color: #6f9be9; box-shadow: inset 0 0 0 1px #6f9be9, 0 7px 18px rgba(42, 83, 150, .08); }

.analysis-method-card.is-active::after,
.channel-card.is-active::after {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 50%;
  content: "✓";
  font-size: 9px;
  font-weight: 800;
}

.analysis-method-icon,
.channel-logo {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  font-weight: 800;
}

.analysis-method-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.analysis-method-icon.is-shop { color: #376fcf; background: #eaf2ff; }
.analysis-method-icon.is-hashtag { color: #a0468b; background: #faedf7; font-size: 22px; }
.analysis-method-copy { min-width: 0; }
.analysis-method-copy strong,
.analysis-method-copy small { display: block; }
.analysis-method-copy strong { color: #243752; font-size: 13px; }
.analysis-method-copy small { margin-top: 5px; color: #7d899a; font-size: 10px; line-height: 1.55; }

.analysis-method-meta {
  position: absolute;
  right: 11px;
  bottom: 9px;
  display: flex;
  gap: 5px;
}

.analysis-method-meta b,
.analysis-method-meta i { padding: 3px 5px; border-radius: 4px; font-size: 8px; font-style: normal; font-weight: 700; }
.analysis-method-meta b { color: #51709d; background: #eef3fa; }
.analysis-method-meta i { color: #396ebf; background: #e8f1ff; }

.channel-card { min-height: 70px; padding: 11px 13px; }
.channel-card > span:nth-child(2) { min-width: 0; }
.channel-card strong,
.channel-card small { display: block; }
.channel-card strong { color: #2c3d56; font-size: 12px; }
.channel-card small { margin-top: 3px; color: #8a95a5; font-size: 9px; }
.channel-card > i { margin-left: auto; color: #5378b5; font-size: 8px; font-style: normal; font-weight: 700; white-space: nowrap; }
.channel-logo { width: 36px; height: 36px; border-radius: 10px; font-size: 18px; }
.channel-logo.is-tiktok { color: #fff; background: linear-gradient(145deg, #121821, #283447); box-shadow: inset -4px -4px 0 rgba(47, 214, 201, .28); }
.channel-logo.is-instagram { color: #fff; background: linear-gradient(145deg, #6444c6, #d44185 58%, #ed9b45); }

.channel-compatibility-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 10px;
  padding: 9px 10px;
  color: #65748a;
  background: #f7f9fc;
  border-radius: 8px;
  font-size: 9px;
  line-height: 1.55;
}

.channel-compatibility-note > span { display: grid; width: 15px; height: 15px; flex: 0 0 auto; place-items: center; color: #5d7eae; border: 1px solid #a9bbd4; border-radius: 50%; font-size: 8px; font-weight: 800; }
.channel-compatibility-note p { margin: 0; }

.analysis-flow-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 13px 25px;
  background: #f7f9fc;
  border-top: 1px solid #e9edf3;
}

.analysis-flow-summary div span,
.analysis-flow-summary div strong { display: block; }
.analysis-flow-summary div span { color: #8b96a6; font-size: 8px; font-weight: 700; letter-spacing: .07em; }
.analysis-flow-summary div strong { margin-top: 3px; color: #2b4162; font-size: 12px; }
.analysis-flow-summary > p { margin: 0; color: #68768b; font-size: 10px; }
.analysis-flow-status { display: inline-flex; align-items: center; gap: 6px; color: #47745d; font-size: 9px; font-weight: 700; white-space: nowrap; }
.analysis-flow-status i { width: 6px; height: 6px; background: #3aa16c; border-radius: 50%; box-shadow: 0 0 0 3px rgba(58, 161, 108, .12); }

.analysis-source-panel {
  display: grid;
  gap: 15px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.analysis-source-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 17px;
  border-bottom: 1px solid #edf0f4;
}

.analysis-source-title { display: flex; min-width: 0; align-items: center; gap: 13px; }
.analysis-source-title > div > span { display: block; margin-bottom: 3px; color: #71809a; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.analysis-source-title h2 { margin: 0; color: #263a58; font-size: 17px; }
.analysis-source-title p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.analysis-source-buttons { display: flex; flex: 0 0 auto; gap: 8px; }
.analysis-source-buttons .button { min-height: 38px; font-size: 11px; }
.analysis-source-panel .shop-workbench { margin-top: 0; }

.integration-badge { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; padding: 7px 9px; color: #24704d; background: #eaf7f0; border: 1px solid #cce9d9; border-radius: 7px; font-size: 9px; font-weight: 700; }
.integration-badge i { width: 6px; height: 6px; background: #3aa16c; border-radius: 50%; }

.instagram-discovery-form { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 16px; }
.instagram-config-card,
.instagram-plan-card { padding: 20px; background: #fbfcfe; border: 1px solid #e5e9f0; border-radius: 12px; }
.instagram-config-heading span,
.instagram-config-heading strong,
.instagram-config-heading small { display: block; }
.instagram-config-heading span { color: #6f83a4; font-size: 9px; font-weight: 800; letter-spacing: .07em; }
.instagram-config-heading strong { margin-top: 4px; color: #283b58; font-size: 15px; }
.instagram-config-heading small { margin-top: 5px; color: #8994a4; font-size: 9px; }
.instagram-tag-label { display: block; margin: 18px 0 7px; color: #4d5b70; font-size: 10px; font-weight: 700; }
.instagram-tag-input-row { display: flex; gap: 8px; }
.instagram-tag-input { display: flex; min-width: 0; flex: 1; align-items: center; color: #a34d8e; background: #fff; border: 1px solid #dbe1e9; border-radius: 9px; }
.instagram-tag-input:focus-within { border-color: #839fe0; box-shadow: 0 0 0 3px rgba(61, 111, 196, .10); }
.instagram-tag-input > span { padding-left: 12px; font-weight: 800; }
.instagram-tag-input input { width: 100%; height: 40px; padding: 0 11px 0 5px; background: transparent; border: 0; outline: 0; }
.instagram-tag-input-row .button { min-height: 40px; }

.instagram-tag-chips { display: flex; min-height: 34px; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; }
.instagram-tag-chips > span { color: #9aa4b2; font-size: 9px; }
.instagram-tag-chips button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 7px; color: #79406d; background: #f9edf6; border: 1px solid #efd8e8; border-radius: 6px; cursor: pointer; font-size: 9px; font-weight: 700; }
.instagram-tag-chips button i { color: #aa6c98; font-size: 12px; font-style: normal; line-height: 1; }
.instagram-tag-suggestions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 4px; }
.instagram-tag-suggestions > span { margin-right: 3px; color: #98a1ae; font-size: 8px; }
.instagram-tag-suggestions button { padding: 3px 6px; color: #667892; background: transparent; border: 1px dashed #ccd5e1; border-radius: 5px; cursor: pointer; font-size: 8px; }
.instagram-tag-suggestions button:hover { color: #865078; background: #fcf5fa; border-color: #dcbfd3; }

.instagram-text-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.instagram-text-fields label,
.instagram-filter-grid label { display: grid; min-width: 0; gap: 6px; }
.instagram-text-fields label > span,
.instagram-filter-grid label > span { color: #68768a; font-size: 9px; font-weight: 700; }
.instagram-text-fields input,
.instagram-filter-grid select { width: 100%; height: 38px; padding: 0 9px; color: #34445b; background: #fff; border: 1px solid #dce2ea; border-radius: 8px; font-size: 10px; }
.instagram-text-fields input:focus,
.instagram-filter-grid select:focus { border-color: #839fe0; }
.instagram-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #e9edf2; }

.instagram-plan-card { display: flex; flex-direction: column; background: linear-gradient(150deg, #172e51, #1c3e6d); border: 0; color: #fff; box-shadow: 0 12px 26px rgba(21, 47, 82, .16); }
.instagram-plan-badge { align-self: flex-start; padding: 4px 7px; color: #bcd2fa; background: rgba(121, 164, 239, .16); border: 1px solid rgba(154, 188, 244, .2); border-radius: 5px; font-size: 8px; font-weight: 800; letter-spacing: .06em; }
.instagram-plan-card h3 { margin: 13px 0 5px; color: #fff; font-size: 17px; }
.instagram-plan-card > p { margin: 0; color: #bdcce0; font-size: 10px; line-height: 1.65; }
.instagram-plan-summary { margin: 17px 0 15px; padding: 10px 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); border-radius: 8px; }
.instagram-plan-summary > div { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px; padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.instagram-plan-summary > div:last-child { border-bottom: 0; }
.instagram-plan-summary dt { color: #8fa8ca; font-size: 8px; }
.instagram-plan-summary dd { margin: 0; overflow: hidden; color: #edf3fc; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.instagram-process-steps { display: grid; gap: 11px; margin: 0 0 18px; padding: 0; list-style: none; }
.instagram-process-steps li { display: grid; grid-template-columns: 23px minmax(0, 1fr); align-items: center; gap: 8px; opacity: .64; }
.instagram-process-steps li.is-current { opacity: 1; }
.instagram-process-steps li > span { display: grid; width: 23px; height: 23px; place-items: center; color: #b8cae5; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); border-radius: 50%; font-size: 8px; font-weight: 800; }
.instagram-process-steps li.is-current > span { color: #16315a; background: #d8e6ff; }
.instagram-process-steps strong,
.instagram-process-steps small { display: block; }
.instagram-process-steps strong { color: #edf3fc; font-size: 9px; }
.instagram-process-steps small { margin-top: 2px; color: #9fb3d1; font-size: 8px; }
.instagram-plan-card .button { margin-top: auto; color: #183760; background: #fff; border-color: #fff; box-shadow: none; }
.instagram-plan-card .button:disabled { color: #8596ad; background: #d9e0e9; border-color: #d9e0e9; }
.instagram-plan-footnote { display: block; margin-top: 8px; color: #8fa8ca; font-size: 8px; line-height: 1.5; text-align: center; }

.mode-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.release-history-modal {
  z-index: 130;
  background: rgba(56, 53, 45, .34);
}

.release-history-dialog {
  display: flex;
  width: min(700px, calc(100vw - 32px));
  max-height: min(840px, calc(100vh - 32px));
  flex-direction: column;
  padding: 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at 94% 3%, rgba(255, 211, 118, .32), transparent 27%),
    linear-gradient(180deg, #fffdf8 0%, #fff 42%);
  border: 1px solid rgba(243, 211, 146, .8);
  border-radius: 20px;
  box-shadow: 0 26px 70px rgba(86, 70, 35, .18);
  text-align: left;
  animation: release-modal-in 180ms ease-out;
}

.release-history-modal.is-drawer {
  display: flex;
  justify-content: flex-end;
  padding: 0;
}

.release-history-modal.is-drawer .release-history-dialog {
  width: min(470px, 94vw);
  height: 100%;
  max-height: none;
  padding: 24px 20px 18px;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 18px 0 0 18px;
  box-shadow: -18px 0 48px rgba(86, 70, 35, .18);
  animation: release-drawer-in 180ms ease-out;
}

.release-history-dialog .modal-close {
  color: #64748b;
  background: #f5f6fa;
}

.release-history-dialog .modal-close:hover {
  color: #334155;
  background: #edf0f5;
}

.release-history-icon {
  width: 52px;
  height: 52px;
  margin: 0 0 12px;
  color: #c75b26;
  background: linear-gradient(135deg, #fff1c8, #ffe0c2);
  border: 1px solid #f8d79b;
  border-radius: 16px;
  box-shadow: 0 9px 22px rgba(220, 135, 46, .16);
  font-size: 24px;
}

.release-history-modal.is-drawer .release-history-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 10px;
  font-size: 22px;
}

.release-history-back {
  display: inline-flex;
  margin: -2px 0 11px;
  align-items: center;
  align-self: flex-start;
  gap: 7px;
  padding: 0;
  color: #9a6a34;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.release-history-back:hover { color: #bd5e2b; }
.release-history-back > span { font-size: 15px; line-height: 1; }

.release-history-heading {
  padding: 0;
  border: 0;
}

.release-history-back:not([hidden]) + .release-history-heading { padding-top: 0; }

.release-history-heading-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.release-history-heading .eyebrow {
  color: #3267d9;
  font-size: 9px;
  letter-spacing: .08em;
}

.release-history-heading-meta time { color: #8995a7; font-size: 9px; }

.release-nature,
.release-current-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.release-nature.is-major { color: #a9652e; background: #fff4d9; }
.release-nature.is-regular { color: #66748a; background: #f3f5f8; }
.release-current-badge { color: #a9672e; background: #fff6df; border: 1px solid #f1d89c; }

.release-history-heading h2 {
  margin: 4px 42px 0 0;
  color: #1d2739;
  font-size: 23px;
  line-height: 1.3;
}

.release-history-heading h2:focus { outline: 0; }

.release-history-heading p {
  margin: 7px 42px 0 0;
  color: #68758a;
  font-size: 11px;
  line-height: 1.65;
}

.release-history-list {
  display: block;
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  gap: 0;
  margin: 15px 0 0;
  padding: 2px 6px 2px 1px;
  overflow: auto;
  scrollbar-color: #e2c27b transparent;
  scrollbar-width: thin;
}

.release-history-list.is-overview { background: transparent; }
.release-history-list.is-detail { padding: 18px 20px 20px; background: rgba(255, 255, 255, .84); border: 1px solid #f1ddb0; border-radius: 12px; }
.release-history-list.is-detail:focus-visible { outline: 3px solid rgba(213, 158, 53, .28); outline-offset: 1px; }

.release-overview-list { display: grid; gap: 11px; }
.release-overview-entry { min-width: 0; }

.release-overview-item {
  display: grid;
  width: 100%;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 15px 22px;
  color: inherit;
  background: rgba(255, 255, 255, .96);
  border: 1px solid #e1e7ee;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.release-overview-item:hover {
  border-color: #e7c576;
  box-shadow: 0 10px 26px rgba(177, 124, 36, .12);
  transform: translateY(-1px);
}

.release-overview-item:focus-visible { outline: 3px solid rgba(213, 158, 53, .28); outline-offset: 1px; }

.release-overview-item::before { position: absolute; top: 18px; bottom: 18px; left: 0; width: 3px; background: #f1dfae; border-radius: 0 3px 3px 0; content: ""; }
.release-overview-item.is-current { border-color: #f0d28e; box-shadow: 0 8px 20px rgba(196, 139, 46, .1); }
.release-overview-item.is-current::before { background: #e4b64e; }

.release-overview-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: linear-gradient(135deg, #fff4d7, #ffe8cf);
  border: 1px solid #f4d9a5;
  border-radius: 12px;
  font-size: 20px;
}

.release-overview-body { min-width: 0; }

.release-overview-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.release-history-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.release-importance,
.release-category,
.release-current-badge { min-height: auto; padding: 3px 7px; border-radius: 999px; font-size: 8px; font-weight: 800; }
.release-importance.is-important { color: #a9652e; background: #fff4d9; }
.release-importance.is-regular { color: #66748a; background: #f3f5f8; }
.release-category { color: #997d55; background: #fff8e9; }
.release-overview-meta time { color: #8995a7; font-size: 8px; white-space: nowrap; }
.release-overview-copy { min-width: 0; }
.release-overview-copy strong,
.release-overview-copy small { display: block; }
.release-overview-copy strong { overflow: hidden; margin-top: 10px; color: #233047; font-size: 13px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.release-overview-copy small { display: -webkit-box; margin-top: 4px; overflow: hidden; color: #66748a; font-size: 9px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.release-overview-arrow { align-self: center; color: #c08a44; font-size: 16px; }
.release-overview-item .release-history-cta { display: inline-flex; align-items: center; gap: 5px; margin-top: 9px; color: #b16b2d; font-size: 8px; font-weight: 800; }

.release-note { display: grid; gap: 20px; animation: release-detail-in 150ms ease-out; }
.release-note-section { margin: 0; }
.release-note-section + .release-note-section { padding-top: 18px; border-top: 1px solid #f2e2bd; }

.release-note-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: #6f4b27;
  font-size: 13px;
}

.release-note-section-icon { display: grid; width: 27px; height: 27px; place-items: center; background: #fff4d9; border: 1px solid #f1d89c; border-radius: 8px; font-size: 14px; }
.release-note-section ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.release-note-section li { position: relative; padding-left: 18px; color: #5f6470; font-size: 11px; line-height: 1.7; }
.release-note-section li::before { position: absolute; top: .76em; left: 3px; width: 5px; height: 5px; background: #d49a3d; border-radius: 50%; content: ""; }

.release-note-context {
  display: grid;
  gap: 0;
  overflow: hidden;
  background: #fff9ed;
  border: 1px solid #f1ddb0;
  border-radius: 10px;
}

.release-note-context > div { padding: 13px 15px; }
.release-note-context > div + div { border-top: 1px solid #f1ddb0; }
.release-note-context span { color: #a56530; font-size: 9px; font-weight: 800; letter-spacing: .05em; }
.release-note-context p { margin: 5px 0 0; color: #735f47; font-size: 10px; line-height: 1.65; }

.release-history-empty { padding: 40px 20px; color: #7b8798; text-align: center; }

.release-history-actions {
  display: flex;
  min-height: 0;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin: 14px 0 0;
  padding: 0;
  background: transparent;
  border: 0;
}

.release-history-actions .button {
  min-width: 86px;
  min-height: 38px;
  padding: 0 15px;
}
.release-history-actions .button-primary { background: linear-gradient(135deg, #3562dd, #4c79eb); border-color: #3562dd; box-shadow: 0 7px 17px rgba(53, 98, 221, .2); }
.release-history-actions .button-primary:hover { background: linear-gradient(135deg, #2f57c9, #416bd8); border-color: #2f57c9; }

@keyframes release-modal-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes release-drawer-in {
  from { opacity: .65; transform: translateX(28px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes release-detail-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1180px) {
  .analysis-launcher-heading { align-items: flex-start; }
  .analysis-launcher-steps { display: none; }
  .analysis-choice-grid { grid-template-columns: 1fr; }
  .instagram-discovery-form { grid-template-columns: 1fr; }
  .instagram-plan-card { min-height: 390px; }
}

@media (max-width: 900px) {
  .analysis-launcher-heading,
  .analysis-source-heading { align-items: stretch; flex-direction: column; }
  .analysis-flow-summary { grid-template-columns: 1fr; gap: 7px; }
  .analysis-flow-status { justify-self: start; }
  .integration-badge { align-self: flex-start; }
  .instagram-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .changelog-trigger { width: 36px; padding: 0; justify-content: center; }
  .changelog-trigger > span:not(.release-history-count) { display: none; }
  .analysis-launcher-heading,
  .analysis-choice-grid,
  .analysis-flow-summary { padding-right: 16px; padding-left: 16px; }
  .analysis-method-options,
  .channel-options { grid-template-columns: 1fr; }
  .analysis-source-panel { padding: 15px; }
  .analysis-source-buttons { display: grid; grid-template-columns: 1fr 1fr; }
  .analysis-source-buttons .button { width: 100%; }
  .instagram-text-fields,
  .instagram-filter-grid { grid-template-columns: 1fr; }
  .instagram-tag-input-row { align-items: stretch; flex-direction: column; }
}

@media (max-width: 520px) {
  .analysis-launch-heading .dashboard-heading-actions { width: 100%; }
  .analysis-launch-heading .dashboard-heading-actions .button { width: 100%; }
  .analysis-launcher-heading h2 { font-size: 18px; }
  .analysis-source-title { align-items: flex-start; }
  .analysis-method-card { min-height: 94px; }
  .instagram-config-card,
  .instagram-plan-card { padding: 16px; }
  .release-history-modal { padding: 10px; }
  .release-history-dialog {
    max-height: calc(100vh - 20px);
    padding: 18px;
    border-radius: 14px;
  }
  .release-history-modal.is-drawer .release-history-dialog { width: 100vw; padding: 18px; border-radius: 0; }
  .release-history-heading { padding: 0; }
  .release-history-heading h2 { font-size: 19px; }
  .release-history-heading p { margin-right: 0; }
  .release-history-back { margin: -2px 0 10px; }
  .release-history-list.is-overview { padding: 2px 4px 2px 1px; }
  .release-history-list.is-detail { padding: 16px; }
  .release-overview-item { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; padding: 14px 12px 13px 18px; }
  .release-overview-icon { width: 36px; height: 36px; border-radius: 10px; font-size: 18px; }
  .release-history-actions { min-height: 0; padding: 0; }
  .release-history-actions .button { min-width: 0; flex: 1 1 0; }
}
