body {
  margin: 0;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #f8fafc;
  color: #0f172a;
}
.factory-shell {
  display: grid;
  gap: 20px;
}
.factory-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: 18px;
  background: linear-gradient(135deg, #101826, #27364d);
  color: #fff;
}
.factory-hero h1 {
  margin: 5px 0 8px;
  font-size: 30px;
}
.factory-hero p,
.factory-batch-head p {
  margin: 0;
  color: #94a3b8;
}
.factory-launch {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 420px;
}
.factory-launch select {
  flex: 1;
}
.factory-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.factory-metrics div {
  background: #fff;
  border: 1px solid #e5e9f0;
  border-radius: 12px;
  padding: 18px;
}
.factory-metrics b {
  display: block;
  font-size: 28px;
}

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

.factory-profile-grid label {
  display: grid;
  gap: 5px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
}

.factory-profile-grid label.wide {
  grid-column: span 1;
}

.factory-profile-grid input,
.factory-profile-grid textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.factory-profile-grid textarea {
  min-height: 82px;
  resize: vertical;
}

.factory-profile-identifiers {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: #64748b;
  font-size: 10px;
}

.factory-profile-identifiers > span {
  padding: 4px 7px;
  border-radius: 6px;
  background: #eef2ff;
  color: #4338ca;
}

.factory-profile-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.factory-profile-actions small {
  color: #64748b;
}
.factory-metrics span {
  color: #64748b;
}
.factory-batch {
  display: grid;
  gap: 18px;
}
.factory-batch-head,
.factory-creative-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}
.factory-batch-head h2,
.factory-creative-head h3 {
  margin: 4px 0;
}
.factory-badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.factory-badge.ok {
  background: #dcfce7;
  color: #166534;
}
.factory-badge.wait {
  background: #fff7ed;
  color: #9a3412;
}
.factory-badge.bad {
  background: #fee2e2;
  color: #991b1b;
}
.factory-stages {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.factory-stage {
  min-width: 126px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
}
.factory-stage span {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f59e0b;
  margin-bottom: 6px;
}
.factory-stage.done span {
  background: #22c55e;
}
.factory-stage b,
.factory-stage small {
  display: block;
}
.factory-stage b {
  text-transform: capitalize;
  font-size: 12px;
}
.factory-stage small {
  color: #64748b;
  margin-top: 3px;
}
.factory-prediction {
  display: flex;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 10px;
  background: #f5f3ff;
  color: #4c1d95;
}
.factory-creatives {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.factory-creative {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  min-width: 0;
}
.factory-creative.predicted-winner {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 2px #ede9fe;
}
.factory-winner {
  display: block;
  margin-bottom: 6px;
  color: #6d28d9;
  font-size: 12px;
  font-weight: 800;
}
.factory-video {
  display: block;
  width: 100%;
  aspect-ratio: 9/16;
  max-height: 510px;
  background: #0f172a;
  border-radius: 10px;
  margin: 12px 0;
}
.factory-render-placeholder {
  display: grid;
  place-content: center;
  aspect-ratio: 9/16;
  max-height: 510px;
  background: #0f172a;
  color: #fff;
  border-radius: 10px;
  margin: 12px 0;
  text-align: center;
}
.factory-render-placeholder span {
  font-size: 36px;
}
.factory-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.factory-meta span {
  font-size: 12px;
  padding: 4px 7px;
  background: #f1f5f9;
  border-radius: 6px;
}
.factory-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.button-link {
  text-decoration: none;
}
.factory-qa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px 0;
  font-size: 12px;
}
.factory-creative pre {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 260px;
  font-size: 11px;
}
.factory-platforms {
  display: grid;
  gap: 7px;
  padding-top: 10px;
}
.factory-platform-row {
  display: grid;
  grid-template-columns: 90px auto 1fr;
  gap: 7px;
  align-items: center;
  font-size: 12px;
}
.factory-accounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.factory-account-create {
  margin-bottom: 12px;
  padding: 9px 11px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fafc;
}

.factory-account-create > summary {
  color: #4338ca;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.factory-account-create > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 8px;
  align-items: end;
  padding-top: 10px;
}

.factory-account-create label {
  display: grid;
  gap: 4px;
  color: #64748b;
  font-size: 9px;
  font-weight: 800;
}

.factory-account-create input,
.factory-account-create select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.factory-account-create > div > small {
  grid-column: 1 / -1;
  color: #64748b;
}
.factory-account {
  display: grid;
  gap: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}
.factory-account small {
  color: #64748b;
}
.factory-empty {
  text-align: center;
  padding: 42px;
}
@media (max-width: 1100px) {
  .factory-creatives {
    grid-template-columns: 1fr 1fr;
  }
  .factory-accounts {
    grid-template-columns: 1fr 1fr;
  }

  .factory-account-create > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .factory-hero,
  .factory-launch {
    flex-direction: column;
    min-width: 0;
  }
  .factory-metrics,
  .factory-creatives,
  .factory-accounts {
    grid-template-columns: 1fr;
  }

  .factory-account-create > div {
    grid-template-columns: 1fr;
  }
  .factory-platform-row {
    grid-template-columns: 1fr;
  }
  .factory-prediction {
    flex-direction: column;
  }
}

.planning-workspace {
  display: grid;
  gap: 16px;
}

.planning-capture input {
  min-width: 260px;
  flex: 1;
}

.planning-location-consent {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.planning-location-consent input {
  min-width: auto;
  flex: 0 0 auto;
}

.planning-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.planning-stats .card {
  display: grid;
  gap: 4px;
  padding: 14px;
}

.planning-stats b {
  font-size: 24px;
}

.planning-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.planning-tabs button {
  flex: 0 0 auto;
}

.planning-tab.active {
  background: #0f172a;
  color: white;
}

.planning-panel[hidden] {
  display: none;
}

.planning-kanban {
  display: grid;
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  align-items: start;
}

.planning-kanban-column {
  min-height: 180px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f1f5f9;
}

.planning-kanban-column h3 {
  display: flex;
  justify-content: space-between;
  margin-top: 0;
}

.planning-kanban-card,
.planning-list-row,
.planning-workload-row {
  display: grid;
  gap: 5px;
  padding: 12px;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
}

.planning-kanban-card small,
.planning-list-row small,
.planning-workload-row small {
  color: var(--muted);
}

.planning-unread {
  border-left: 4px solid #7c3aed;
}

.planning-task-list,
.planning-goal,
.planning-risk {
  display: grid;
}

.planning-risk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.planning-risk-action-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.planning-risk-actions button,
.planning-risk-actions select {
  height: 34px;
  min-height: 34px;
  font-size: 13px;
}

.planning-task-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.planning-task-row small,
.planning-risk small,
.planning-goal small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.planning-task-done {
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border-radius: 50%;
  background: white;
  color: var(--muted);
}

.planning-goal,
.planning-risk {
  gap: 6px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.planning-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.planning-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #7c3aed;
}

.pill.danger {
  background: #fee2e2;
  color: #b91c1c;
}

@media (max-width: 1100px) {
  .planning-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .planning-main,
  .planning-panel .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .planning-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .planning-capture .row {
    align-items: stretch;
  }

  .planning-capture input,
  .planning-capture button {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .planning-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .planning-capture .row {
    align-items: stretch;
    flex-direction: column;
  }

  .planning-capture input {
    min-width: 0;
  }
}
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
}
aside {
  background: white;
  border-right: 1px solid #e2e8f0;
}
.brand {
  height: 64px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
}
.brand b {
  display: block;
  font-size: 14px;
}
.brand span {
  color: #64748b;
  font-size: 12px;
}
.brand-copy {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  min-width: 0;
  gap: 4px;
  text-align: center;
}
.brand .brand-title {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
}
.brand .brand-title span {
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.brand .brand-subtitle {
  color: #64748b;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}
nav {
  padding: 12px 8px;
  display: grid;
  gap: 4px;
}
nav a {
  color: #334155;
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 14px;
  flex: 1;
  min-width: 0;
}
nav a.active {
  background: #020617;
  color: white;
}
.side-tools {
  padding: 10px 8px;
  border-top: 1px solid #e2e8f0;
  display: grid;
  gap: 6px;
}
.side-tools button {
  width: 100%;
  height: 34px;
  font-size: 12px;
}
.mobile-nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
}
.nav-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-controls {
  display: none;
  gap: 3px;
  align-items: center;
}
.nav-edit .nav-controls {
  display: flex;
}
.nav-edit .nav-row {
  cursor: default;
}
.nav-drag-handle,
.home-drag-handle {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -5px;
  cursor: grab;
  user-select: none;
}
.nav-drag-handle:active,
.home-drag-handle:active {
  cursor: grabbing;
}
.nav-edit .nav-row.dragging {
  opacity: 0.45;
}
.nav-edit .nav-row.nav-drop-before {
  box-shadow: 0 -3px 0 #2563eb;
}
.nav-edit .nav-row.nav-drop-after {
  box-shadow: 0 3px 0 #2563eb;
}
.nav-edit nav a {
  padding-right: 8px;
}
.nav-edit .nav-row-hidden > a {
  color: #94a3b8;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.nav-visibility-toggle {
  display: inline-flex;
  align-items: center;
  margin: 0 3px 0 0;
  cursor: pointer;
}
.nav-visibility-toggle .ui-switch input[type="checkbox"] {
  transform: scale(0.78);
  transform-origin: center;
}
.nav-settings-title {
  display: grid;
  gap: 2px;
  border-radius: 8px;
  background: #f5f3ff;
  color: #3b0764;
  padding: 8px 9px;
}
.nav-settings-title span {
  color: #64748b;
  font-size: 10px;
  line-height: 1.3;
}
.nav-marketplace-account a {
  padding-left: 20px;
  font-size: 13px;
}
.nav-business-direction a {
  padding-left: 20px;
  font-size: 13px;
  color: #475569;
}
.icon-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 14px;
}
main {
  min-width: 0;
  padding: 22px;
}
.card {
  min-width: 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}
.login {
  max-width: 380px;
  margin: 10vh auto;
}
label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: #475569;
  margin-bottom: 12px;
}
input {
  height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 14px;
}
textarea {
  min-height: 72px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px;
  font-size: 14px;
  font-family: inherit;
}
button {
  height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: #020617;
  color: white;
  font-weight: 600;
  cursor: pointer;
}
button.secondary {
  background: #f1f5f9;
  color: #334155;
}
button.ghost {
  background: transparent;
  color: #334155;
  border: 1px solid #e2e8f0;
}
select {
  height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 14px;
  background: white;
}
.muted {
  color: #64748b;
  font-size: 14px;
}
.error {
  background: #fef2f2;
  color: #991b1b;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  margin: 10px 0;
}
.success {
  background: #ecfdf5;
  color: #065f46;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  margin: 10px 0;
}
.ui-toast-region {
  position: fixed;
  z-index: 3000;
  top: 18px;
  right: 18px;
  display: grid;
  width: min(420px, calc(100vw - 36px));
  gap: 8px;
  pointer-events: none;
}
.ui-toast {
  pointer-events: auto;
  cursor: pointer;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
  box-shadow: 0 16px 40px rgb(15 23 42 / 18%);
  color: #166534;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.ui-toast.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}
.grid {
  display: grid;
  gap: 14px;
}
.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.app-page-header {
  min-height: 32px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  margin: -8px 0 10px;
}
.app-page-header #page-title {
  margin: 0;
  font-size: 24px;
  line-height: 1;
  white-space: nowrap;
}
.app-page-header .app-user-status {
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}
.app-page-header .top-actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 5px;
}
.app-page-header .top-actions > .small-btn {
  height: 30px;
  border-radius: 6px;
  padding: 0 9px;
  font-size: 11px;
}
#page-title .page-title-wb-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  vertical-align: middle;
}
#page-title .page-title-wb-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: #8b2fd3;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(109, 40, 217, 0.16);
}
#page-title .page-title-wb-copy > span {
  font-size: 26px;
  line-height: 0.95;
  font-weight: 900;
}
#page-title .page-title-wb-copy {
  min-height: 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  line-height: 1;
}
#page-title .page-title-wb-subtitle {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}
.small-btn {
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
}
.top-actions > .small-btn {
  height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
}
.compact-toolbar {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef2f7;
}
.logic-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  vertical-align: middle;
}
.logic-help-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}
.logic-help-panel {
  position: absolute;
  right: 0;
  top: 22px;
  z-index: 20;
  width: min(420px, calc(100vw - 48px));
  display: grid;
  gap: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
  padding: 12px;
  color: #334155;
  text-align: left;
}
.logic-help-panel[hidden] {
  display: none;
}
.logic-help-panel b {
  color: #0f172a;
  font-size: 13px;
}
.logic-help-panel p {
  margin: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.ui-disclosure-details > summary {
  position: relative;
  padding-left: 44px !important;
  cursor: pointer;
  list-style: none;
}
.ui-disclosure-details > summary::-webkit-details-marker {
  display: none;
}
.ui-disclosure-details > summary::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 11px;
  display: block;
  width: 25px;
  height: 25px;
  border-radius: 999px;
  background-color: #ede9fe;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%236d28d9' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 5 4 4-4 4'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  transform: translateY(-50%);
  transition: background-color 0.18s ease;
}
.ui-disclosure-details[open] > summary::before {
  background-color: #ddd6fe;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%236d28d9' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 7 4 4 4-4'/%3E%3C/svg%3E");
}
.ui-help-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.ui-inline-help {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}
.ui-help-button {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  min-height: 24px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  padding: 0;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}
.ui-help-button:hover,
.ui-help-button[aria-expanded="true"] {
  border-color: #a78bfa;
  background: #f5f3ff;
  color: #6d28d9;
}
.ui-help-panel {
  position: absolute;
  z-index: 120;
  top: calc(100% + 8px);
  left: 0;
  width: min(330px, calc(100vw - 48px));
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  padding: 10px 12px;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.16);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}
.ui-help-panel[hidden] {
  display: none;
}
.creative-studio-card {
  display: grid;
  gap: 12px;
}
.creative-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.creative-status-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 11px 12px;
  display: grid;
  gap: 6px;
  min-width: 0;
}
.creative-status-card h3 {
  margin: 0;
  font-size: 14px;
  color: #0f172a;
}
.creative-status-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: #334155;
  overflow-wrap: anywhere;
}
.creative-status-card.done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.creative-status-card.changed {
  background: #fffbeb;
  border-color: #fde68a;
}
.creative-status-card.todo {
  background: #fef2f2;
  border-color: #fecaca;
}
.creative-status-card.done h3 {
  color: #166534;
}
.creative-status-card.changed h3 {
  color: #92400e;
}
.creative-status-card.todo h3 {
  color: #991b1b;
}
.development-board {
  align-items: start;
}
.development-private-card {
  border-color: #fecaca;
  background: #fff7f7;
}
.development-doc-card {
  display: grid;
  gap: 10px;
}
.development-doc-path {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px 10px;
  color: #334155;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow-wrap: anywhere;
}
.development-doc-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  width: max-content;
  padding: 0 12px;
  border-radius: 6px;
  background: #020617;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}
.development-area {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.development-area summary {
  cursor: pointer;
  list-style: none;
  padding: 13px 16px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  border-bottom: 1px solid #eef2f7;
}
.development-area summary::marker {
  content: "";
  display: none;
}
.development-area summary::-webkit-details-marker {
  display: none;
}
.development-area .creative-status-grid {
  padding: 12px;
}
.development-architecture-registry {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.development-architecture-kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.development-architecture-kpi > div {
  display: grid;
  gap: 2px;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.development-architecture-kpi b {
  font-size: 22px;
}
.development-architecture-kpi span,
.development-architecture-title small {
  color: #64748b;
}
.development-architecture-list {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.development-architecture-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 100px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  background: #fff;
  color: #0f172a;
  text-align: left;
}
.development-architecture-row:last-child {
  border-bottom: 0;
}
.development-architecture-row:hover {
  background: #f8fafc;
}
.development-architecture-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #eef2f7;
  font-weight: 800;
}
.development-architecture-title,
.development-architecture-progress {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.development-architecture-progress b {
  text-align: right;
}
.development-architecture-progress i {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #6d5ce7 var(--progress),
    #e2e8f0 var(--progress)
  );
}
.development-architecture-progress.done i {
  background: linear-gradient(
    90deg,
    #16a34a var(--progress),
    #e2e8f0 var(--progress)
  );
}
.development-architecture-progress.changed i {
  background: linear-gradient(
    90deg,
    #d97706 var(--progress),
    #e2e8f0 var(--progress)
  );
}
.development-architecture-progress.todo i {
  background: linear-gradient(
    90deg,
    #dc2626 var(--progress),
    #e2e8f0 var(--progress)
  );
}
.development-architecture-detail-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.development-architecture-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.development-architecture-detail-grid section {
  padding: 11px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.development-architecture-detail-grid h3 {
  margin-top: 0;
}
.development-architecture-detail-grid ul {
  margin: 0;
  padding-left: 20px;
}
.development-service-catalog {
  display: grid;
  gap: 14px;
}
.development-catalog-kpi {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 8px;
}
.development-catalog-kpi > div {
  display: grid;
  gap: 2px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.development-catalog-kpi b {
  font-size: 24px;
  color: #0f172a;
}
.development-catalog-kpi span {
  color: #64748b;
  font-size: 12px;
}
.development-catalog-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}
.development-catalog-filters label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}
.development-service-list {
  max-height: 920px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overscroll-behavior: contain;
  background: #fff;
}
.development-service-category + .development-service-category {
  border-top: 1px solid #e2e8f0;
}
.development-service-category summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
  color: #0f172a;
}
.development-service-category summary::-webkit-details-marker {
  display: none;
}
.development-category-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.development-category-title b {
  font-size: 20px;
  line-height: 1.3;
}
.development-category-title i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 34px;
  font-style: normal;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 160ms ease;
}
.development-service-category[open] .development-category-title i {
  transform: rotate(90deg);
}
.development-category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.development-registry-status-grid {
  padding: 16px;
  border-top: 1px solid #e2e8f0;
  gap: 16px;
}
.development-registry-status-grid .creative-status-card {
  align-content: start;
  min-height: 250px;
  max-height: 560px;
  padding: 18px;
  overflow: auto;
  border-radius: 12px;
}
.development-registry-status-grid .creative-status-card h3 {
  position: sticky;
  top: -18px;
  z-index: 1;
  margin: -18px -18px 6px;
  padding: 18px 18px 10px;
  background: inherit;
  font-size: 17px;
}
.development-registry-status-grid .creative-status-card p {
  font-size: 14px;
  line-height: 1.45;
}
.development-registry-empty {
  color: #64748b !important;
  font-style: italic;
}
.development-codex-task {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid rgba(153, 27, 27, 0.14);
}
.development-codex-task:first-of-type {
  border-top: 0;
}
.development-codex-title {
  display: grid;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7f1d1d;
  text-align: left;
  font-weight: 800;
}
.development-codex-title:hover {
  color: #991b1b;
  text-decoration: underline;
}
.development-codex-title span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}
.development-copy-command {
  justify-self: start;
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}
.development-service-rows {
  border-top: 1px solid #eef2f7;
}
.development-service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 9px 14px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  background: #fff;
  color: #0f172a;
  text-align: left;
}
.development-service-row:hover {
  background: #f8fafc;
}
.development-service-row span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.development-service-row small {
  color: #64748b;
}
.development-readiness {
  display: grid;
  gap: 5px;
  text-align: right;
}
.development-readiness i {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #16a34a var(--progress),
    #e2e8f0 var(--progress)
  );
}
.development-service-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
  border: 0;
  border-radius: 8px;
  color: #0f172a;
}
.development-service-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.development-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
}
.development-checklist {
  display: grid;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}
.development-checklist > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid #eef2f7;
}
.development-checklist > div:last-child {
  border-bottom: 0;
}
@media (max-width: 900px) {
  .development-architecture-kpi,
  .development-architecture-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .development-architecture-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  .development-architecture-progress {
    grid-column: 2;
  }
  .development-catalog-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .development-catalog-filters {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .development-architecture-detail-grid {
    grid-template-columns: 1fr;
  }
  .development-architecture-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.marketplace-card-studio {
  background: #fff;
}
.content-analysis-entry {
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  overflow: hidden;
}
.content-analysis-entry summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  color: #14532d;
  font-weight: 900;
}
.content-analysis-entry summary::marker {
  content: "";
  display: none;
}
.content-analysis-entry summary::-webkit-details-marker {
  display: none;
}
.content-analysis-entry:not(.ui-disclosure-details) summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 2px;
  transition: transform 0.15s ease;
}
.content-analysis-entry:not(.ui-disclosure-details)[open] summary::before {
  transform: rotate(90deg);
}
.content-analysis-body {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}
.content-analysis-body p {
  margin: 0;
  color: #166534;
  font-size: 13px;
  line-height: 1.4;
}
.content-analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}
.content-analysis-card {
  border: 1px solid #dcfce7;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 4px;
}
.content-analysis-card b {
  color: #0f172a;
  font-size: 13px;
}
.content-analysis-card span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}
.creative-workflow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}
.creative-step {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
  display: grid;
  gap: 4px;
}
.creative-step b {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #020617;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.creative-step span {
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}
.creative-step p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}
.creative-card-builder {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.75fr);
  gap: 12px;
  align-items: start;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}
.creative-card-builder h3 {
  margin: 0 0 10px;
}
.creative-safety-note {
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  padding: 11px;
  display: grid;
  gap: 5px;
}
.creative-safety-note p {
  margin: 0;
  color: #7f1d1d;
  font-size: 12px;
  line-height: 1.35;
}
.creative-capability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}
.creative-capability-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 4px;
}
.creative-capability-card span {
  color: #92400e;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.creative-capability-card b {
  color: #0f172a;
  font-size: 13px;
}
.creative-capability-card p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.metric {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
}
.metric span {
  display: block;
  color: #64748b;
  font-size: 12px;
}
.metric b {
  font-size: 24px;
}

.data-freshness-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.data-freshness-card {
  border: 1px solid var(--border);
  border-left: 4px solid #f4b740;
  border-radius: 14px;
  padding: 16px;
  background: var(--surface, #fff);
}

.data-freshness-card.data-freshness-fresh {
  border-left-color: #31b46c;
}
.data-freshness-card.data-freshness-stale,
.data-freshness-card.data-freshness-error {
  border-left-color: #e15353;
}
.data-freshness-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.data-freshness-heading h3 {
  margin: 0;
}
.data-freshness-card dl {
  margin: 14px 0 0;
  display: grid;
  gap: 8px;
}
.data-freshness-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.data-freshness-card dt {
  color: var(--muted);
}
.data-freshness-card dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}
.workforce-metric-action {
  appearance: none;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}
.workforce-metric-action:hover {
  background: #f0f7ff;
  border-color: #93c5fd;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}
.workforce-metric-action:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}
.workforce-metric-action.is-active {
  background: #eff6ff;
  border-color: #3b82f6;
}
.workforce-metric-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 10px 12px;
  color: #1e3a8a;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}
.workforce-metric-filter button {
  flex: 0 0 auto;
}
.workforce-metric-filter[hidden],
.workforce-metric-empty[hidden],
.ai-employee-card[hidden],
tr[data-task-status][hidden] {
  display: none;
}
.workforce-metric-empty {
  margin: 12px 0;
  padding: 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}
.ad-metrics {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.ad-metric {
  padding: 9px 10px;
  border-radius: 6px;
}
.ad-metric span {
  font-size: 11px;
  line-height: 1.2;
}
.ad-metric b {
  display: block;
  font-size: 18px;
  line-height: 1.2;
  margin-top: 2px;
}
.metric-stack {
  display: grid;
  gap: 2px;
  line-height: 1.15;
}
.metric-stack strong {
  color: #0f172a;
  font-size: 18px;
  overflow-wrap: anywhere;
}
.metric-stack small {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.profit-metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(184px, 1fr));
  gap: 8px;
  align-items: stretch;
}
.profit-metric-card {
  min-width: 0;
  min-height: 72px;
  padding: 9px 11px;
  border-radius: 8px;
  display: grid;
  grid-template-rows: auto auto;
  gap: 4px;
  align-content: start;
  overflow: hidden;
}
.profit-metric-card .profit-metric-label {
  min-height: 16px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.profit-metric-value {
  min-width: 0;
  align-self: start;
  font-variant-numeric: tabular-nums;
}
.profit-metric-value .metric-stack {
  display: grid;
  gap: 1px;
}
.profit-metric-value .metric-stack strong {
  color: #0f172a;
  font-size: 18px;
  line-height: 1.05;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.profit-metric-value .metric-stack small {
  display: block;
  min-height: 0;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.wb-funnel-profit-widget {
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 8px;
}
.wb-funnel-profit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.wb-funnel-profit-widget h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.2;
}
.wb-funnel-profit-widget h3 span {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.wb-funnel-profit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 8px;
}
.wb-funnel-profit-grid > div {
  min-height: 68px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px 10px;
  display: grid;
  gap: 2px;
  align-content: center;
}
.wb-funnel-profit-grid span {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}
.wb-funnel-profit-grid b {
  color: #0f172a;
  font-size: 21px;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
}
.wb-funnel-profit-grid small {
  color: #4f46e5;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
}
.ad-metrics-edit .ad-metric {
  cursor: grab;
  outline: 1px dashed #94a3b8;
  outline-offset: 3px;
}
.ad-metrics-edit .ad-metric.dragging {
  opacity: 0.58;
}
.ad-metrics-edit .ad-metric-drop-before {
  box-shadow: -4px 0 0 #7c3aed;
}
.ad-metrics-edit .ad-metric-drop-after {
  box-shadow: 4px 0 0 #7c3aed;
}
.ad-period-edit tbody tr {
  cursor: grab;
  outline: 1px dashed transparent;
}
.ad-period-edit tbody tr:hover {
  outline-color: #cbd5e1;
}
.ad-period-edit tbody tr.dragging {
  opacity: 0.58;
}
.ad-period-drop-before {
  box-shadow: 0 -3px 0 #7c3aed;
}
.ad-period-drop-after {
  box-shadow: 0 3px 0 #7c3aed;
}
[data-mp-widget="advertising"],
.ad-all-campaigns-details,
.ad-all-campaigns-details .rare-tool-body,
.ad-stat-list,
.ad-campaign-stat,
.ad-stat-detail {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.ai-auditor-coverage:not([open]) > :not(summary) {
  display: none;
}
.ad-campaign-stat {
  border: 0;
  border-radius: 0;
  background: #fff;
  overflow: hidden;
}
.ad-campaign-stat + .ad-campaign-stat {
  margin-top: 0;
}
.ad-promo-board {
  display: grid;
  gap: 12px;
}
.ad-workspace-nav {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.96);
  padding: 7px;
  backdrop-filter: blur(10px);
}
.ad-workspace-nav button {
  display: grid;
  justify-items: start;
  gap: 3px;
  min-height: 54px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #475569;
  padding: 9px 12px;
  text-align: left;
}
.ad-workspace-nav button b {
  font-size: 13px;
}
.ad-workspace-nav button small {
  color: #94a3b8;
  font-size: 10px;
}
.ad-workspace-nav button.active {
  background: #111827;
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
}
.ad-workspace-nav button.active small {
  color: #cbd5e1;
}
.ad-workspace-panel {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}
.ad-workspace-panel[hidden] {
  display: none !important;
}
.ad-autopilot-return-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  overflow-x: auto;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 2px;
}
.ad-autopilot-return-bar > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}
.ad-autopilot-return-bar b,
.ad-autopilot-return-bar small {
  display: block;
}
.ad-autopilot-return-bar b {
  color: #1e293b;
  font-size: 12px;
}
.ad-autopilot-return-bar small {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ad-autopilot-return-bar button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 5px 9px;
  font-size: 11px;
}
.ad-autopilot-return-status {
  flex: 1 1 260px;
}
.ad-autopilot-return-controls {
  flex: 0 0 auto;
  justify-content: flex-end;
  white-space: nowrap;
}
.ad-autopilot-return-controls label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
}
.ad-autopilot-return-controls select {
  width: auto;
  min-width: 112px;
  min-height: 32px;
  padding: 4px 28px 4px 8px;
  border-radius: 8px;
  font-size: 11px;
}
.ad-autopilot-return-controls #ad-sync-account {
  max-width: 170px;
}
.ad-workspace-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.ad-workspace-actions label {
  margin: 0;
  min-width: 140px;
}
.ad-workspace-actions button,
.ad-workspace-actions select {
  min-height: 38px;
}
.ad-section-intro {
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px 14px;
}
.ad-section-intro h3,
.ad-section-intro p {
  margin: 0;
}
.ad-section-intro p {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}
.ad-campaign-subsection {
  margin-top: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.ad-campaign-subsection > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  border: 0;
  background: #f8fafc;
  padding: 11px 13px;
  font-weight: 850;
}
.ad-campaign-subsection > summary::-webkit-details-marker {
  display: none;
}
.ad-subsection-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.ad-subsection-disclosure {
  display: inline-grid;
  place-items: center;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  border-radius: 999px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 22px;
  font-style: normal;
  line-height: 1;
  transition: background 0.18s ease;
}
.ad-subsection-disclosure > span,
.ad-row-disclosure > span {
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  font-size: 0;
  transform: rotate(-45deg);
  transform-origin: 50% 50%;
  transition: transform 0.18s ease;
}
.ad-campaign-subsection[open] > summary .ad-subsection-disclosure {
  background: #ddd6fe;
}
.ad-campaign-subsection[open] > summary .ad-subsection-disclosure > span {
  transform: rotate(45deg);
}
.ad-campaign-subsection.has-attention > summary {
  background: #fffbeb;
}
.ad-campaign-subsection-body {
  display: grid;
  min-width: 0;
  max-width: 100%;
  gap: 10px;
  padding: 12px;
}
@media (max-width: 900px) {
  .ad-workspace-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.ad-campaign-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.ad-campaign-overview-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
}
.ad-campaign-overview-head p {
  max-width: 820px;
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}
.ad-campaign-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.ad-campaign-overview > button {
  display: grid;
  gap: 3px;
  height: auto;
  min-height: 76px;
  align-content: center;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
  padding: 10px 12px;
  color: inherit;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}
.ad-campaign-overview > button:hover,
.ad-campaign-overview > button:focus-visible,
.ad-campaign-overview > button.active {
  border-color: #94a3b8;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}
.ad-campaign-overview > button.bad {
  border-color: #fecaca;
  background: #fef2f2;
}
.ad-campaign-overview > button.good {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.ad-campaign-overview span {
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}
.ad-campaign-overview b {
  color: #0f172a;
  font-size: 20px;
  line-height: 1;
}
.ad-campaign-overview .bad b {
  color: #b91c1c;
}
.ad-campaign-overview .good b {
  color: #15803d;
}
.ad-campaign-overview small {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}
.ad-promo-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ad-promo-tabs button {
  height: 36px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #334155;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 900;
}
.ad-promo-tabs button.active {
  background: #fff;
  color: #020617;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}
.ad-promo-tab-note {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.ad-promo-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ad-promo-search {
  flex: 1 1 320px;
  position: relative;
  margin: 0;
}
.ad-promo-search input {
  height: 42px;
  border-radius: 10px;
  padding-right: 38px;
  background: #fff;
  font-weight: 700;
}
.ad-promo-search span {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 24px;
  line-height: 1;
}
.ad-promo-tools select {
  width: auto;
  min-width: 150px;
  height: 42px;
  border-radius: 10px;
  background: #f3f4f6;
  font-weight: 900;
}
.ad-promo-banner {
  min-height: 82px;
  border-radius: 10px;
  background: linear-gradient(118deg, #3b0764 0%, #6d28d9 52%, #c084fc 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  overflow: hidden;
}
.ad-promo-banner b {
  display: block;
  font-size: 18px;
  line-height: 1.2;
}
.ad-promo-banner span {
  display: block;
  margin-top: 4px;
  max-width: 760px;
  color: #ede9fe;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.ad-promo-banner button {
  background: #fff;
  color: #0f172a;
  border: 0;
}
.ad-campaign-principle {
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 9px;
  background: #f5f3ff;
  color: #5b21b6;
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.35;
}
.ad-campaign-principle span {
  color: #6b7280;
}
.ad-campaign-table {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}
.ad-stat-list {
  display: grid;
  min-width: 960px;
}
.ad-stat-header,
.ad-campaign-stat > summary {
  display: grid;
  grid-template-columns:
    24px minmax(240px, 1.5fr) minmax(155px, 0.95fr)
    56px 88px 66px 78px 72px minmax(145px, 0.8fr);
  gap: 8px;
  align-items: center;
}
.ad-stat-header {
  min-width: 960px;
  padding: 8px 10px;
  color: #7c7f8c;
  font-size: 11px;
  font-weight: 900;
  border-bottom: 1px solid #e5e7eb;
}
.ad-campaign-header-control,
.ad-campaign-inactive-toggle {
  display: flex;
  align-items: center;
}
.ad-campaign-header-control {
  min-height: 28px;
  gap: 7px;
  line-height: 1;
}
.ad-campaign-inactive-toggle {
  height: 22px;
  flex: 0 0 36px;
  margin: 0;
  color: #64748b;
  cursor: pointer;
  font-size: 10px;
  text-transform: none;
}
.ad-campaign-inactive-toggle .ui-switch {
  display: inline-flex;
  flex: 0 0 36px;
  width: 36px;
  height: 22px;
  align-items: center;
}
.ad-campaign-inactive-toggle .ui-switch input[type="checkbox"] {
  flex-basis: 36px;
  width: 36px !important;
  height: 22px !important;
  min-height: 22px;
}
.ad-campaign-inactive-toggle .ui-switch input[type="checkbox"]::before {
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
}
.ad-campaign-inactive-toggle .ui-switch input[type="checkbox"]:checked::before {
  transform: translateX(14px);
}
.ad-campaign-header-title,
.ad-campaign-inactive-label {
  display: inline-flex;
  height: 22px;
  align-items: center;
  line-height: 1;
  white-space: nowrap;
}
.ad-campaign-inactive-label {
  color: #64748b;
  font-size: 10px;
  text-transform: none;
}
.ad-campaign-stat > summary {
  cursor: pointer;
  list-style: none;
  padding: 7px 10px;
  font-size: 12px;
  border-bottom: 1px solid #e5e7eb;
}
.ad-campaign-stat > summary::marker {
  content: "";
  display: none;
}
.ad-campaign-stat > summary::-webkit-details-marker {
  display: none;
}
.ad-campaign-stat > summary b {
  font-size: 13px;
}
.ad-row-disclosure {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 22px;
  line-height: 1;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.ad-campaign-stat[open] > summary .ad-row-disclosure {
  background: #ede9fe;
  color: #6d28d9;
}
.ad-campaign-stat[open] > summary .ad-row-disclosure > span {
  transform: rotate(45deg);
}
.ad-row-strategy,
.ad-row-health {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.ad-row-health {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ad-row-strategy small,
.ad-row-health small {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
}
.ad-row-strategy b,
.ad-row-strategy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ad-row-strategy span {
  color: #64748b;
  font-size: 10px;
}
.ad-row-health .ad-health-badge {
  justify-self: start;
}
.ad-row-campaign-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  margin: 0;
  cursor: pointer;
}
.ad-row-campaign-switch small {
  color: #475569;
  white-space: nowrap;
}
.ad-row-campaign-switch.saving {
  opacity: 0.58;
  pointer-events: none;
}
.ad-row-check {
  width: 20px;
  height: 20px;
  border: 2px solid #c4c4d4;
  border-radius: 6px;
  display: inline-block;
}
.ad-row-switch {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #e5e7eb;
  position: relative;
  display: inline-block;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}
.ad-row-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #8b8b98;
  transition:
    left 0.15s ease,
    background 0.15s ease;
}
.ad-row-switch.active {
  background: #e9d5ff;
}
.ad-row-switch.active::after {
  left: 19px;
  background: #9333ea;
}
.ad-row-switch.paused::after {
  background: #71717a;
}
.ad-row-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.ad-row-title b {
  color: #4f67e8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ad-row-title span {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #7c7f8c;
  font-size: 12px;
  font-weight: 800;
  min-width: 0;
}
.ad-status-badge {
  display: inline-block;
  border-radius: 6px;
  padding: 3px 7px;
  font-style: normal;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}
.ad-status-badge.active {
  background: #dcfce7;
  color: #16803a;
}
.ad-status-badge.paused {
  background: #fee2e2;
  color: #ef4444;
}
.ad-status-badge.archived {
  background: #e5e7eb;
  color: #475569;
}
.ad-status-badge.unknown {
  background: #eef2ff;
  color: #4338ca;
}
.ad-health-badge,
.ad-mode-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 6px;
  padding: 3px 7px;
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.ad-health-badge.bad {
  background: #fee2e2;
  color: #b91c1c;
}
.ad-health-badge.warn {
  background: #ffedd5;
  color: #c2410c;
}
.ad-health-badge.good {
  background: #dcfce7;
  color: #15803d;
}
.ad-health-badge.neutral,
.ad-mode-badge {
  background: #eef2ff;
  color: #4338ca;
}
.ad-row-type {
  display: grid;
  gap: 2px;
  color: #334155;
}
.ad-row-type b {
  font-size: 16px;
  line-height: 1;
}
.ad-row-type small {
  width: max-content;
  max-width: 100%;
  border-radius: 5px;
  background: #f3f4f6;
  color: #6b7280;
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 800;
}
.ad-stat-num {
  display: grid;
  gap: 1px;
  text-align: right;
  white-space: nowrap;
  line-height: 1.15;
}
.ad-stat-num small {
  color: #9ca3af;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}
.ad-stat-num strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}
.ad-stat-detail {
  padding: 12px;
  display: grid;
  gap: 10px;
  overflow: hidden;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}
.ad-campaign-live-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #c4b5fd;
  border-radius: 12px;
  background: #f5f3ff;
  padding: 12px 14px;
}
.ad-campaign-live-controls > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.ad-campaign-live-controls > div b {
  color: #3b0764;
  font-size: 14px;
}
.ad-campaign-live-controls > div span {
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}
.ad-campaign-live-switch {
  flex: 0 0 auto;
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
}
.ad-campaign-control-panel {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 10px;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  background: #f8faff;
  padding: 12px;
}
.ad-campaign-control-panel > * {
  max-width: 100%;
  min-width: 0;
}
.ad-campaign-control-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.ad-campaign-control-head > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.ad-campaign-control-head b {
  color: #172554;
  font-size: 14px;
}
.ad-campaign-control-head span:not(.ad-health-badge) {
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}
.ui-switch-setting {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  cursor: pointer;
}
.ui-switch-setting > span:last-child {
  display: grid;
  gap: 2px;
}
.ui-switch-setting small {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
}
:where(
    .ui-switch,
    .fbs-switch,
    .mp-widget-toggle,
    .check-row,
    .ad-trusted-switches label,
    .ad-stock-stop-toggle,
    .ad-black-check,
    .ad-boost-checkbox,
    .ad-rule-enable,
    .review-check,
    .fbs-document-options label
  )
  input[type="checkbox"] {
  position: relative;
  flex: 0 0 46px;
  width: 46px !important;
  height: 28px !important;
  min-height: 28px;
  margin: 0;
  appearance: none;
  border: 0;
  border-radius: 999px;
  outline: none;
  background: #cbd0d8;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.09);
  cursor: pointer;
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease;
}
:where(
    .ui-switch,
    .fbs-switch,
    .mp-widget-toggle,
    .check-row,
    .ad-trusted-switches label,
    .ad-stock-stop-toggle,
    .ad-black-check,
    .ad-boost-checkbox,
    .ad-rule-enable,
    .review-check,
    .fbs-document-options label
  )
  input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.28);
  transition: transform 0.18s ease;
}
:where(
    .ui-switch,
    .fbs-switch,
    .mp-widget-toggle,
    .check-row,
    .ad-trusted-switches label,
    .ad-stock-stop-toggle,
    .ad-black-check,
    .ad-boost-checkbox,
    .ad-rule-enable,
    .review-check,
    .fbs-document-options label
  )
  input[type="checkbox"]:checked {
  background: #7c3aed;
  box-shadow:
    inset 0 0 0 1px rgba(91, 33, 182, 0.2),
    0 0 0 3px rgba(124, 58, 237, 0.1);
}
:where(
    .ui-switch,
    .fbs-switch,
    .mp-widget-toggle,
    .check-row,
    .ad-trusted-switches label,
    .ad-stock-stop-toggle,
    .ad-black-check,
    .ad-rule-enable,
    .review-check,
    .fbs-document-options label
  )
  input[type="checkbox"]:checked::before {
  transform: translateX(18px);
}
:where(.ui-switch, .fbs-switch, .mp-widget-toggle, .check-row)
  input[type="checkbox"]:focus-visible {
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.24);
}
:where(.ui-switch-readonly, .ui-switch) input[type="checkbox"]:disabled {
  opacity: 1;
  cursor: default;
}
.ad-campaign-autopilot-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d7dce5;
  border-radius: 11px;
  background: #f8fafc;
  padding: 11px 12px;
}
.ad-campaign-autopilot-status.active {
  border-color: #c4b5fd;
  background: #f5f3ff;
}
.ad-campaign-autopilot-status.warning {
  border-color: #fcd34d;
  background: #fffbeb;
}
.ad-campaign-autopilot-status .ui-switch-setting > span:last-child b {
  color: #1f2937;
  font-size: 13px;
}
@media (max-width: 780px) {
  .ad-campaign-live-controls {
    align-items: stretch;
    flex-direction: column;
  }
  .ad-campaign-live-switch {
    justify-content: space-between;
  }
}
.ad-autopilot-source {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 800;
}
.ad-campaign-control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.ad-campaign-control-grid label {
  min-width: 0;
  margin: 0;
}
.ad-campaign-control-grid input,
.ad-campaign-control-grid select,
.ad-campaign-control-grid button {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 34px;
}
.ad-control-badges,
.ad-control-permissions,
.ad-control-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.ad-control-badges {
  justify-content: flex-end;
}
.ad-control-actions button {
  min-height: 34px;
}
.ad-campaign-save-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #bbf7d0;
  border-radius: 9px;
  background: #f0fdf4;
  color: #166534;
  padding: 8px 10px;
  font-size: 11px;
}
.ad-campaign-save-state span {
  color: inherit;
  opacity: 0.8;
}
.ad-campaign-save-state.dirty {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}
.ad-campaign-save-state.saving {
  border-color: #c4b5fd;
  background: #f5f3ff;
  color: #6d28d9;
}
.ad-campaign-save-state.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}
.ad-campaign-apply-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px solid #c4b5fd;
  border-radius: 10px;
  background: #f5f3ff;
  padding: 12px;
}
.ad-campaign-apply-bar > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.ad-campaign-apply-bar b {
  color: #3b0764;
  font-size: 13px;
}
.ad-campaign-apply-bar small {
  color: #64748b;
  font-size: 10px;
  line-height: 1.35;
}
.ad-campaign-apply-button {
  min-width: 190px;
  background: #7c3aed;
  color: #fff;
}
.ad-campaign-apply-button:hover {
  background: #6d28d9;
}
.ad-control-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.ad-control-action-grid.single {
  grid-template-columns: minmax(0, 1fr);
}
.ad-control-action-grid article {
  display: grid;
  align-content: space-between;
  gap: 10px;
  min-width: 0;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
}
.ad-control-action-grid article > span {
  display: grid;
  gap: 3px;
}
.ad-control-action-grid small {
  color: #64748b;
  font-size: 10px;
  line-height: 1.35;
}
.ad-control-action-grid button {
  width: 100%;
  min-height: 36px;
}
.ad-control-extra-action {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.ad-control-extra-action > span {
  flex: 1 1 320px;
}
.ad-control-extra-action button {
  width: auto;
  min-width: 230px;
}
.ad-control-stop-actions {
  justify-content: flex-end;
}
.ad-control-actions .danger {
  border-color: #dc2626;
  background: #dc2626;
  color: #fff;
}
.ad-control-actions .danger:hover {
  background: #b91c1c;
}
.ad-strategy-scope {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 12px;
  padding: 10px;
  border-radius: 9px;
  background: #eef2ff;
}
.ad-strategy-scope label {
  flex: 1 1 280px;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}
.ad-strategy-scope select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.ad-strategy-scope span {
  color: #475569;
  font-size: 12px;
}
.ad-strategy-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.ad-strategy-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 126px;
  display: grid;
  align-content: start;
  gap: 7px;
  margin: 0;
  padding: 11px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
}
.ad-strategy-card.selected {
  border-color: #22c55e;
  background: #f0fdf4;
  box-shadow: inset 0 0 0 1px #22c55e;
}
.ad-strategy-card input {
  width: 17px;
  height: 17px;
  accent-color: #16a34a;
}
.ad-strategy-card b {
  color: #0f172a;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.ad-strategy-card small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.ad-strategy-card span {
  color: #166534;
  font-size: 10px;
  font-weight: 800;
}
.ad-strategy-body,
.ad-strategy-head > div,
.ad-strategy-title > div,
.ad-strategy-panel,
.ad-strategy-budget {
  display: grid;
  gap: 5px;
}
.ad-strategy-head,
.ad-strategy-title,
.ad-strategy-row,
.ad-handoff-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ad-strategy-head {
  align-items: flex-start;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  padding: 12px;
}
.ad-strategy-head b {
  color: #172554;
  font-size: 15px;
}
.ad-strategy-head span,
.ad-strategy-title span,
.ad-strategy-row span,
.ad-strategy-budget span,
.ad-handoff-list span {
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}
.ad-strategy-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  gap: 7px;
}
.ad-strategy-summary > div {
  display: grid;
  gap: 2px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}
.ad-strategy-summary span {
  color: #64748b;
  font-size: 10px;
}
.ad-strategy-summary b {
  color: #0f172a;
  font-size: 17px;
}
.ad-strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.ad-strategy-panel {
  align-content: start;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 11px;
}
.ad-strategy-wide {
  grid-column: 1 / -1;
}
.ad-strategy-title {
  align-items: flex-start;
}
.ad-strategy-title h4 {
  margin: 0;
  color: #172554;
  font-size: 13px;
}
.ad-mode-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 7px;
}
.ad-mode-catalog article {
  display: grid;
  gap: 4px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
  padding: 9px;
}
.ad-mode-catalog article b {
  color: #1e3a8a;
  font-size: 12px;
}
.ad-mode-catalog article span,
.ad-mode-catalog article small {
  color: #64748b;
  font-size: 10px;
  line-height: 1.35;
}
.ad-strategy-list,
.ad-handoff-list,
.ad-hour-list,
.ad-calendar-list {
  display: grid;
  gap: 6px;
}
.ad-strategy-row,
.ad-handoff-list > div {
  border-top: 1px solid #eef2f7;
  padding-top: 7px;
}
.ad-strategy-row {
  flex-wrap: wrap;
}
.ad-strategy-row > div,
.ad-handoff-list > div > span:not(.pill) {
  display: grid;
  gap: 2px;
}
.ad-strategy-row > div:first-child {
  min-width: 180px;
  flex: 1;
}
.ad-lifecycle-hub {
  border-color: #c7d2fe;
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
}
.ad-low-demand-rule {
  display: grid;
  gap: 3px;
  border-left: 3px solid #6366f1;
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px;
}
.ad-low-demand-rule b {
  color: #312e81;
  font-size: 12px;
}
.ad-low-demand-rule span {
  color: #64748b;
  font-size: 10px;
}
.ad-budget-allocation {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.ad-budget-allocation > div,
.ad-budget-allocation span {
  display: grid;
  gap: 4px;
}
.ad-budget-allocation > div {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}
.ad-budget-allocation span {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.ad-budget-allocation b,
.ad-budget-allocation small {
  color: #475569;
  font-size: 10px;
}
.ad-budget-allocation i {
  overflow: hidden;
  height: 5px;
  border-radius: 999px;
  background: #e2e8f0;
}
.ad-budget-allocation em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #4f46e5;
}
.ad-budget-allocation [data-allocation="retest"] em {
  background: #f59e0b;
}
.ad-budget-allocation [data-allocation="new"] em {
  background: #0ea5e9;
}
.ad-budget-allocation [data-allocation="irrelevant"] em {
  background: #dc2626;
}
.ad-lifecycle-reason {
  flex: 1 1 260px;
  min-width: 220px;
}
.ad-lifecycle-reason b {
  color: #334155;
  font-size: 10px;
  line-height: 1.35;
}
.ad-hour-list > div,
.ad-calendar-list > div {
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border-radius: 7px;
  background: #f8fafc;
  padding: 7px 8px;
}
.ad-hour-list > div.strong {
  background: #ecfdf5;
}
.ad-hour-list span,
.ad-hour-list small,
.ad-calendar-list span {
  color: #64748b;
  font-size: 10px;
}
.ad-handoff-list > div > span:not(.pill) {
  flex: 1;
}
.ad-owner-guardrail {
  margin: 0;
  border-left: 3px solid #f59e0b;
  border-radius: 5px;
  background: #fffbeb;
  color: #92400e;
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}
.ad-capped-launch {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}
.ad-capped-freedom {
  display: grid;
  gap: 9px;
  border: 1px solid #99f6e4;
  border-radius: 8px;
  background: #f0fdfa;
  padding: 11px;
}
.ad-capped-freedom.stopped {
  border-color: #fecaca;
  background: #fff7f7;
}
.ad-capped-head,
.ad-capped-modal-head,
.ad-capped-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ad-capped-head > div,
.ad-capped-modal-head > div {
  display: grid;
  gap: 2px;
}
.ad-capped-head b {
  color: #134e4a;
  font-size: 13px;
}
.ad-capped-head span:not(.pill) {
  color: #64748b;
  font-size: 11px;
}
.ad-capped-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 6px;
}
.ad-capped-metrics > div {
  display: grid;
  gap: 2px;
  border: 1px solid #ccfbf1;
  border-radius: 6px;
  background: #fff;
  padding: 7px 8px;
}
.ad-capped-metrics span,
.ad-capped-actions-log span {
  color: #64748b;
  font-size: 10px;
}
.ad-capped-metrics b {
  color: #0f172a;
  font-size: 13px;
}
.ad-capped-actions-log {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ad-capped-actions-log span {
  border-radius: 5px;
  background: #fff;
  padding: 5px 7px;
}
.ad-capped-modal-backdrop {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(15 23 42 / 52%);
  padding: 20px;
}
.ad-capped-modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgb(15 23 42 / 28%);
  padding: 18px;
}
.ad-capped-modal h2,
.ad-capped-modal p {
  margin: 0;
}
.ad-capped-modal > p {
  margin-top: 10px;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}
.ad-capped-modal form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.ad-capped-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.ad-capped-modal-grid label {
  margin: 0;
}
.ad-capped-modal-grid [hidden] {
  display: none;
}
.ad-capped-warning {
  border-left: 3px solid #f59e0b;
  border-radius: 5px;
  background: #fffbeb;
  color: #92400e;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.4;
}
.ad-capped-modal-actions {
  justify-content: flex-end;
}
@media (max-width: 640px) {
  .ad-capped-modal-grid {
    grid-template-columns: 1fr;
  }
  .ad-capped-head,
  .ad-capped-modal-head,
  .ad-capped-modal-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
.ad-thresholds {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.ad-thresholds label {
  margin: 0;
  min-width: 160px;
}
.ad-thresholds input {
  height: 32px;
}
.ad-metric-thresholds {
  display: grid;
  align-items: stretch;
}
.ad-metric-threshold-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ad-metric-threshold-head > span {
  display: grid;
  gap: 2px;
}
.ad-metric-threshold-head small {
  color: #64748b;
}
.ad-metric-threshold-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 7px;
}
.ad-metric-threshold-grid label {
  min-width: 0;
  color: #475569;
  font-size: 10px;
}
.ad-metric-threshold-grid input {
  width: 100%;
}
.ad-phrase-scroll-hint {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.ad-phrase-period-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 10px;
  border: 1px solid #ddd6fe;
  border-radius: 10px;
  background: #faf8ff;
  padding: 10px 12px;
}
.ad-cluster-center {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  padding: 18px;
}
.ad-cluster-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e5e7eb;
}
.ad-cluster-tabs {
  display: flex;
  align-items: center;
  gap: 28px;
}
.ad-cluster-tabs button {
  position: relative;
  min-height: 46px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #111827;
  padding: 0 0 12px;
  font-size: 16px;
  font-weight: 850;
}
.ad-cluster-tabs button.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 999px;
  background: #a43df2;
  content: "";
}
.ad-cluster-tabs button span {
  display: inline-grid;
  min-width: 22px;
  margin-left: 5px;
  border-radius: 999px;
  background: #f3e8ff;
  color: #7e22ce;
  padding: 2px 6px;
  font-size: 11px;
}
.ad-cluster-view-result {
  margin: -3px 0 9px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}
.ad-cluster-view-result.empty {
  color: #9a3412;
}
[data-ad-cluster-row][hidden] {
  display: none !important;
}
.ad-cluster-bulk-menu {
  position: relative;
  margin-bottom: 8px;
}
.ad-cluster-bulk-menu summary {
  border: 1px solid #ddd6fe;
  border-radius: 9px;
  background: #faf5ff;
  color: #6b21a8;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.ad-cluster-bulk-menu[open] > div {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  width: 220px;
  gap: 6px;
  border: 1px solid #ddd6fe;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgb(15 23 42 / 16%);
  padding: 9px;
}
.ad-cluster-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.ad-cluster-status-tabs {
  display: flex;
  gap: 6px;
}
.ad-cluster-status-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #374151;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 750;
}
.ad-cluster-status-tabs button.active {
  background: #a43df2;
  color: #fff;
}
.ad-cluster-search {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ad-cluster-search > label:not(.ad-cluster-select-all) {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
}
.ad-cluster-search input[type="search"] {
  width: 230px;
  min-width: 0;
}
.ad-cluster-select-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: #64748b;
  font-size: 11px;
}
.ad-cluster-select-all input,
.ad-cluster-name-cell > input,
.ad-cluster-header-name > input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: #a43df2;
}
.ad-cluster-ai-filter select {
  min-width: 170px;
}
.ad-cluster-header-name,
.ad-cluster-name-cell {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 9px;
  overflow: hidden;
}
.ad-cluster-row-controls {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  border-right: 1px solid #e2e8f0;
  padding-right: 9px;
}
.ad-cluster-header-name .ad-sort-button {
  flex: 1 1 auto;
}
.ad-cluster-row-switch {
  display: inline-flex;
  flex: 0 0 auto;
  margin: 0;
}
.ad-cluster-row-switch .ui-switch {
  transform: scale(0.84);
  transform-origin: center;
}
.ad-cluster-name-copy {
  display: grid;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: 100%;
  gap: 4px;
  overflow: hidden;
}
.ad-cluster-name-copy > b {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: normal;
}
.ad-cluster-permission-warning {
  display: block;
  border-left: 3px solid #f59e0b;
  color: #92400e;
  padding-left: 6px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
}
.ad-cluster-permission-warning b,
.ad-cluster-permission-warning span {
  display: block;
}
.ad-cluster-permission-warning span {
  margin-top: 2px;
  font-weight: 600;
}
.ad-phrase-period-buttons {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 4px;
  border-radius: 9px;
  background: #ede9fe;
  padding: 4px;
}
.ad-phrase-period-buttons button {
  min-height: 32px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #5b4b75;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}
.ad-phrase-period-buttons button.active {
  background: #7c3aed;
  color: #fff;
  box-shadow: 0 2px 8px rgb(124 58 237 / 24%);
}
.ad-phrase-period-facts {
  display: grid;
  min-width: 0;
  gap: 2px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
}
.ad-phrase-period-facts b {
  color: #312e81;
  font-size: 12px;
}
.ad-phrase-scroll-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}
.ad-phrase-scroll-tools > span:last-child {
  display: flex;
  gap: 6px;
}
.ad-phrase-scroll-tools button {
  min-height: 30px;
  padding: 5px 9px;
}
.ad-phrase-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-color: #7c3aed #ede9fe;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.ad-phrase-table-wrap::-webkit-scrollbar {
  height: 14px;
}
.ad-phrase-table-wrap::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #ede9fe;
}
.ad-phrase-table-wrap::-webkit-scrollbar-thumb {
  border: 3px solid #ede9fe;
  border-radius: 999px;
  background: #7c3aed;
}
.ad-phrase-table {
  width: 1800px;
  min-width: 1800px;
  max-width: none;
  margin: 0;
  table-layout: fixed;
}
.table.ad-phrase-table th,
.table.ad-phrase-table td {
  padding: 4px 3px;
  font-size: 11px;
  line-height: 1.2;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
}
.ad-phrase-table th {
  white-space: normal;
}
.ad-phrase-table [data-ad-phrase-column="phrase"] {
  width: 340px;
  min-width: 340px;
  white-space: normal;
}
.ad-phrase-table [data-ad-phrase-column="management_mode"] {
  width: 90px;
  white-space: normal;
}
.ad-phrase-table [data-ad-phrase-column="average_position"] {
  width: 80px;
}
.ad-phrase-table [data-ad-phrase-column="bid"] {
  width: 120px;
}
.ad-phrase-table [data-ad-phrase-column="ai_bid"] {
  width: 150px;
  white-space: normal;
}
.ad-phrase-table [data-ad-phrase-column="advertising_cost"] {
  width: 72px;
}
.ad-phrase-table [data-ad-phrase-column="order_revenue"] {
  width: 85px;
}
.ad-phrase-table [data-ad-phrase-column="drr"] {
  width: 56px;
}
.ad-phrase-table [data-ad-phrase-column="order_cost"] {
  width: 72px;
}
.ad-phrase-table [data-ad-phrase-column="orders"],
.ad-phrase-table [data-ad-phrase-column="add_to_cart"] {
  width: 50px;
}
.ad-phrase-table [data-ad-phrase-column="impressions"] {
  width: 60px;
}
.ad-phrase-table [data-ad-phrase-column="clicks"] {
  width: 50px;
}
.ad-phrase-table [data-ad-phrase-column="ctr"] {
  width: 52px;
}
.ad-phrase-table [data-ad-phrase-column="cpc"] {
  width: 58px;
}
.ad-phrase-table [data-ad-phrase-column="action"] {
  width: 125px;
  white-space: normal;
}
.ad-phrase-name {
  min-width: 0;
  font-weight: 600;
  color: #334155;
  overflow-wrap: anywhere;
  white-space: normal !important;
}
.ad-phrase-table [data-ad-phrase-column="management_mode"] .pill {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ad-cell-danger {
  background: #fef2f2;
  color: #991b1b;
  font-weight: 800;
  border-radius: 6px;
  padding: 5px 7px;
  display: inline-block;
}
.ad-cell-warn {
  background: #fff7ed;
  color: #c2410c;
  font-weight: 700;
  border-radius: 6px;
  padding: 5px 7px;
  display: inline-block;
}
.ad-actions-inline {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
  width: 100%;
}
.ad-actions-inline button {
  width: 100%;
  max-width: 100%;
  min-height: 30px;
  height: auto;
  padding: 5px 6px;
  font-size: 11px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  white-space: normal;
}
.ad-reco-list {
  display: grid;
  gap: 6px;
}
.ad-reco {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}
.ad-reco.bad {
  border-color: #fecaca;
  background: #fff7f7;
}
.ad-reco.warn {
  border-color: #fed7aa;
  background: #fffaf0;
}
.ad-stat-alert td {
  background: #fef2f2;
  color: #991b1b;
  font-weight: 600;
}
.ad-phrase-good td {
  background: #ecfdf5;
  color: #065f46;
}
.ad-phrase-warn td {
  background: #fff7ed;
  color: #9a3412;
}
.ad-phrase-bad td {
  background: #fef2f2;
  color: #991b1b;
  font-weight: 700;
}
.ad-phrase-neutral td {
  background: #fff;
  color: #334155;
}
.ad-phrase-valuable-expensive td {
  background: #ecfdf5 !important;
  color: #14532d !important;
}
.ad-phrase-valuable-expensive td:first-child {
  box-shadow: inset 5px 0 0 #dc2626;
}
.ad-expensive-key-badge {
  display: block;
  width: fit-content;
  margin-top: 5px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #fff1f2;
  color: #b91c1c;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  padding: 3px 7px;
}
.ad-expensive-key-cost {
  display: inline-block;
  border-radius: 6px;
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 900;
  padding: 5px 7px;
}
.ad-phrase-enabled-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 6px;
}
.ad-phrase-enabled-control.protected {
  border-color: #fca5a5;
  background: #fff7f7;
  color: #991b1b;
}
.ad-phrase-enabled-control.saving {
  opacity: 0.6;
  pointer-events: none;
}
.ad-field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
}
.ad-field-help {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}
.ad-field-help > button {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  min-height: 20px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
}
.ad-field-help > button:hover,
.ad-field-help > button[aria-expanded="true"] {
  border-color: #8b5cf6;
  background: #f5f3ff;
  color: #6d28d9;
}
.ad-field-help-panel {
  position: absolute;
  z-index: 180;
  top: calc(100% + 7px);
  left: 0;
  display: grid;
  gap: 4px;
  width: min(360px, calc(100vw - 52px));
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  padding: 11px 12px;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.18);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: normal;
}
.ad-field-help-panel b:not(:first-child) {
  margin-top: 5px;
}
.ad-field-help-panel[hidden] {
  display: none;
}
.ad-control-permissions .ad-field-help-panel {
  text-align: left;
}
.ad-phrase-runtime-status {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  margin-top: 8px;
  border-radius: 9px;
  background: #f1f5f9;
  padding: 7px 9px;
}
.ad-phrase-runtime-status.active {
  background: #f5f3ff;
}
.ad-phrase-runtime-status.warning {
  background: #fffbeb;
}
.ad-phrase-runtime-status > span:last-child {
  display: grid;
  gap: 1px;
}
.ad-phrase-runtime-status b {
  color: #334155;
  font-size: 11px;
}
.ad-phrase-runtime-status small {
  color: #64748b;
  font-size: 10px;
  line-height: 1.3;
}
@media (max-width: 900px) {
  .ad-campaign-autopilot-status,
  .ad-campaign-save-state,
  .ad-phrase-scroll-tools,
  .ad-phrase-period-panel {
    align-items: stretch;
    flex-direction: column;
  }
  .ad-phrase-period-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ad-phrase-period-facts {
    text-align: left;
  }
  .ad-cluster-topbar,
  .ad-cluster-filters,
  .ad-cluster-search {
    align-items: stretch;
    flex-direction: column;
  }
  .ad-cluster-tabs {
    gap: 16px;
  }
  .ad-cluster-search input[type="search"] {
    width: 100%;
  }
  .ad-cluster-bulk-menu[open] > div {
    position: static;
    width: auto;
    margin-top: 6px;
  }
  .ad-control-action-grid {
    grid-template-columns: 1fr;
  }
  .ad-campaign-control-grid,
  .ad-strategy-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ad-control-stop-actions {
    justify-content: stretch;
  }
  .ad-control-stop-actions button {
    flex: 1 1 100%;
  }
}
@media (max-width: 560px) {
  .ad-campaign-control-grid,
  .ad-strategy-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}
.ad-decision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.ad-decision-column {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
.ad-decision-column h4 {
  margin: 0 0 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.ad-decision-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid #eef2f7;
}
.ad-decision-item:first-of-type {
  border-top: 0;
}
.ad-decision-title {
  font-weight: 700;
  color: #0f172a;
}
.ad-decision-meta {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.35;
}
.ad-decision-bad h4 {
  color: #991b1b;
}
.ad-decision-warn h4 {
  color: #9a3412;
}
.ad-decision-good h4 {
  color: #166534;
}
.ad-sort-button {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  color: #475569;
  text-transform: uppercase;
  cursor: pointer;
  width: 100%;
  min-height: 28px;
  justify-content: flex-start;
  white-space: normal;
  line-height: 1.15;
  text-align: left;
}
.ad-sort-button > span {
  display: inline-block;
}
.ad-sort-button.active {
  color: #020617;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ad-phrase-table th[draggable="true"] {
  cursor: grab;
}
.ad-phrase-table th.dragging {
  cursor: grabbing;
  opacity: 0.45;
}
.ad-phrase-table th.ad-phrase-column-drop-before {
  box-shadow: inset 3px 0 #7c3aed;
}
.ad-phrase-table th.ad-phrase-column-drop-after {
  box-shadow: inset -3px 0 #7c3aed;
}
.ad-ai-bid {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.ad-ai-bid b {
  font-size: 12px;
}
.ad-ai-bid span {
  font-size: 10px;
  line-height: 1.15;
}
.ad-ai-bid.good {
  color: #047857;
}
.ad-ai-bid.warn {
  color: #c2410c;
}
.ad-ai-bid.bad {
  color: #b91c1c;
}
.ad-ai-bid button {
  height: 24px;
  padding: 0 7px;
  font-size: 11px;
}
.ad-bid-edit {
  display: flex;
  gap: 3px;
  align-items: center;
  min-width: 0;
  width: 100%;
}
.ad-bid-edit input {
  flex: 1 1 auto;
  width: 1px;
  min-width: 0;
  height: 26px;
  padding: 0 4px;
  font-size: 11px;
}
.ad-bid-edit button {
  flex: 0 0 auto;
  height: 26px;
  padding: 0 5px;
  font-size: 10px;
}
.ad-position-api {
  display: inline-flex;
  min-width: 0;
  justify-content: center;
  color: #334155;
  font-weight: 750;
}
.ad-metric-state {
  display: grid;
  min-height: 28px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 3px 4px;
  font-weight: 750;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}
.ad-metric-state.good {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}
.ad-metric-state.warn {
  border-color: #fde047;
  background: #fef9c3;
  color: #854d0e;
}
.ad-metric-state.bad {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #991b1b;
}
.ad-metric-state.neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}
.ad-metric-state .ad-bid-edit,
.ad-metric-state .ad-ai-bid {
  width: 100%;
}
.ad-stat-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ad-review-details > summary {
  font-size: 17px;
  font-weight: 900;
}
.ad-review-section {
  margin-top: 14px;
}
.ad-review-section h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.ad-stat-period-select {
  width: auto;
  min-width: 132px;
  height: 34px;
  border-radius: 6px;
  background: #f8fafc;
  font-weight: 600;
}
.profit-status-good {
  color: #047857;
  font-weight: 700;
}
.profit-status-warn {
  color: #c2410c;
  font-weight: 700;
}
.profit-status-bad {
  color: #b91c1c;
  font-weight: 700;
}
.mp-problem-list {
  display: grid;
  gap: 8px;
}
.mp-problem-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.mp-problem-filters button {
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
}
.mp-problem-filters button.active {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}
.mp-problem-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  display: grid;
  gap: 7px;
}
.mp-problem-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.mp-problem-head b {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.mp-problem-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mp-problem-meta span {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  white-space: nowrap;
}
.mp-problem-meta b {
  color: #0f172a;
  font-size: 11px;
}
.mp-problem-action {
  justify-self: start;
}
.profit-table-wrap {
  overflow: auto;
  max-height: 440px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.profit-table,
.sku-catalog-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  font-size: 11px;
}
.profit-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.profit-table td,
.sku-catalog-table td {
  vertical-align: top;
}
.profit-table th,
.profit-table td,
.sku-catalog-table th,
.sku-catalog-table td {
  padding: 5px 6px !important;
  white-space: nowrap;
}
.profit-table-main thead tr {
  height: 54px;
}
.profit-table-main tbody tr:not(.profit-action-row) {
  height: 46px;
}
.profit-table-main tbody td {
  height: auto !important;
  vertical-align: middle !important;
  line-height: 1.15;
}
.profit-table-main th:nth-child(1),
.profit-table-main td:nth-child(1) {
  min-width: 220px;
  max-width: 260px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
.profit-table-main th:nth-child(2),
.profit-table-main td:nth-child(2) {
  min-width: 62px;
  max-width: 72px;
  text-align: center;
}
.profit-table-main th:nth-child(3),
.profit-table-main td:nth-child(3),
.profit-table-main th:nth-child(4),
.profit-table-main td:nth-child(4) {
  min-width: 56px;
  text-align: center;
}
.profit-table-main th:nth-child(n + 5),
.profit-table-main td:nth-child(n + 5) {
  min-width: 72px;
}
.profit-table-main th {
  padding: 6px 5px;
  white-space: normal;
  text-align: center;
  vertical-align: middle;
}
.profit-table-header {
  display: inline-block;
  min-width: 0;
  color: #475569;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.05;
}
.real-profit-table-wrap {
  max-height: 420px;
}
.real-profit-table {
  min-width: 1180px;
}
.real-profit-table th:first-child,
.real-profit-table td:first-child {
  min-width: 210px;
  max-width: 260px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.real-profit-metrics .metric:last-child .metric-stack strong {
  color: #047857;
}
.real-profit-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin-top: 2px;
}
.real-profit-metrics .profit-metric-card {
  min-height: 50px;
  padding: 6px 7px;
  border-radius: 5px;
  gap: 1px;
}
.real-profit-metrics .profit-metric-label {
  min-height: 11px;
  font-size: 10px;
  line-height: 1.1;
}
.real-profit-metrics .metric-stack strong {
  font-size: 14px;
  line-height: 1.05;
}
.real-profit-metrics .metric-stack small {
  font-size: 9px;
  line-height: 1.05;
}
.real-profit-summary {
  gap: 4px;
  padding: 8px 0;
}
.real-profit-summary h3 {
  font-size: 15px;
}
.real-profit-summary > .muted {
  font-size: 11px;
  line-height: 1.25;
}
.real-profit-metrics .metric:last-child {
  border-color: #a7f3d0;
  background: #ecfdf5;
}
.real-profit-drr-widget {
  display: grid;
  gap: 5px;
  justify-content: start;
}
.real-profit-drr-widget > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.real-profit-drr-widget em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.real-profit-metrics .real-profit-drr-widget {
  gap: 3px;
}
.real-profit-metrics .real-profit-drr-widget > span {
  gap: 4px;
}
.real-profit-metrics .real-profit-drr-widget em {
  font-size: 10px;
}
.real-profit-metrics .real-profit-drr-widget input {
  width: 48px;
  min-height: 22px;
  padding: 2px 4px;
  font-size: 12px;
}
.real-profit-metrics .real-profit-drr-widget b {
  color: #0f172a;
  font-size: 12px;
}
.real-profit-metrics .real-profit-drr-widget small {
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.05;
}
.real-profit-metrics .wb-options-percent-widget {
  gap: 2px;
}
.real-profit-metrics .wb-options-percent-widget > span {
  gap: 3px;
}
.real-profit-metrics .wb-options-percent-widget input {
  width: 48px;
  min-height: 22px;
  padding: 2px 4px;
  font-size: 12px;
}
.real-profit-metrics .wb-options-percent-widget b {
  font-size: 12px;
}
.real-profit-metrics .wb-options-percent-widget small {
  font-size: 9px;
  line-height: 1.05;
}
@media (min-width: 1700px) {
  .real-profit-metrics {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
}
.wb-options-percent-widget {
  display: grid;
  gap: 5px;
  justify-content: start;
}
.wb-options-percent-widget > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.wb-options-percent-widget input {
  width: 74px;
  min-height: 30px;
  padding: 4px 7px;
  font-size: 17px;
  font-weight: 900;
  text-align: right;
}
.wb-options-percent-widget b {
  color: #0f172a;
  font-size: 16px;
}
.wb-options-percent-widget small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}
.profit-penalty-status {
  display: grid;
  gap: 3px;
}
.profit-penalty-status strong {
  font-size: 16px;
}
.profit-penalty-status small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}
.profit-penalty-status.no-penalties strong {
  color: #15803d;
}
.profit-penalty-status.has-penalties strong {
  color: #dc2626;
}
.wb-profit-penalty-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
  align-items: center;
  gap: 3px 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
}
.wb-profit-penalty-status-line {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: nowrap;
  gap: 7px;
}
.wb-workspace-card .wb-profit-penalty-status-line span {
  width: auto;
  max-width: none;
  display: block;
  margin: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}
.autobidder-panel {
  display: grid;
  gap: 12px;
}
.autobidder-head {
  align-items: flex-start;
}
.autobidder-head h2 {
  margin: 0;
  display: flex;
  align-items: center;
}
.autobidder-head p {
  margin: 4px 0 0;
}
.autobidder-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.autobidder-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.autobidder-metrics .metric {
  min-height: 76px;
}
.autobidder-metrics .metric b {
  font-size: 20px;
}
.autobidder-metrics .metric small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.2;
}
.autobidder-observations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px;
}
.autobidder-observation {
  min-width: 0;
  display: grid;
  gap: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
}
.autobidder-observation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.autobidder-observation-head > b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f172a;
}
.autobidder-observation p {
  margin: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.3;
}
.autobidder-observation > small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.3;
}
.autobidder-price-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: #64748b;
  font-size: 11px;
}
.autobidder-price-line b {
  color: #0f172a;
}
.autobidder-empty {
  display: grid;
  gap: 4px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 12px;
  color: #64748b;
  font-size: 13px;
}
.autobidder-empty b {
  color: #334155;
}
.autobidder-add-watch {
  margin: 0;
}
.autobidder-add-watch-body {
  display: grid;
  gap: 10px;
}
.wb-profit-penalty-line span {
  color: #64748b;
  font-weight: 800;
}
.wb-profit-penalty-line b {
  white-space: nowrap;
}
.wb-profit-penalty-line small {
  grid-column: 1 / -1;
  color: #64748b;
  font-weight: 700;
}
.wb-profit-penalty-line.no-penalties b {
  color: #15803d;
}
.wb-profit-penalty-line.has-penalties b {
  color: #dc2626;
}
.wb-profit-penalty-line .wb-loss-preview {
  grid-column: 2;
  grid-row: 1;
  width: auto;
  min-width: 0;
  margin: 0;
  justify-self: end;
}
.wb-finance-report-fact {
  display: grid;
  gap: 12px;
  border-top: 1px solid #e2e8f0;
  padding-top: 14px;
}
.finance-collapsible {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
}
.finance-collapsible > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  padding: 11px 12px;
  color: #0f172a;
  font-size: 16px;
  font-weight: 850;
}
.finance-collapsible > summary::-webkit-details-marker {
  display: none;
}
.finance-collapsible:not(.ui-disclosure-details) > summary::before {
  content: "▶";
  flex: 0 0 auto;
  color: #64748b;
  font-size: 11px;
  transition: transform 0.15s ease;
}
.finance-collapsible:not(.ui-disclosure-details)[open] > summary::before {
  transform: rotate(90deg);
}
.finance-collapsible > summary > span:first-child {
  flex: 1;
}
.wb-finance-report-fact > summary {
  flex-wrap: wrap;
}
.wb-report-summary-title {
  min-width: 220px;
}
.wb-report-summary-metrics {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.wb-report-summary-metrics > span:not(.pill) {
  display: grid;
  gap: 1px;
  min-width: 92px;
  padding: 4px 8px;
  border-left: 1px solid #e2e8f0;
}
.wb-report-summary-metrics small {
  color: #64748b;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.15;
}
.wb-report-summary-metrics strong {
  color: #0f172a;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}
.wb-report-summary-metrics .has-penalties strong {
  color: #b91c1c;
}
.wb-report-summary-metrics .no-penalties strong {
  color: #047857;
}
.finance-collapsible-body {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 0 12px 12px;
}
.wb-finance-report-fact h3 {
  margin: 0;
  font-size: 18px;
}
.wb-finance-report-fact .toolbar {
  margin: 0;
}
.wb-finance-report-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}
.wb-finance-report-empty p {
  margin: 0;
}
.wb-report-analytics {
  background: #fff;
}
.wb-report-metrics .metric:last-child .metric-stack strong {
  color: #047857;
}
.wb-report-ai {
  border: 1px solid #dbeafe;
  background: #eff6ff;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 6px;
}
.wb-report-ai h3 {
  margin: 0;
  font-size: 15px;
  color: #1e3a8a;
}
.wb-report-ai p {
  margin: 0;
  border-left: 3px solid transparent;
  border-radius: 6px;
  padding: 7px 9px;
  color: #334155;
  font-size: 13px;
  line-height: 1.35;
}
.wb-report-ai-item.is-danger {
  border-left-color: #dc2626;
  background: #fef2f2;
  color: #991b1b;
  font-weight: 650;
}
.wb-report-ai-item.is-success {
  border-left-color: #16a34a;
  background: #f0fdf4;
  color: #166534;
  font-weight: 700;
}

.wb-report-adjustments {
  margin-top: 12px;
}

.wb-report-adjustments h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.wb-report-adjustment-list {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.wb-report-adjustment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
}

.wb-report-adjustment-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.wb-report-adjustment-row b,
.wb-report-adjustment-row small {
  overflow-wrap: anywhere;
}

.wb-report-adjustment-row small {
  color: #64748b;
}

.wb-report-adjustment-row.is-deduction strong {
  color: #b91c1c;
}

.wb-report-adjustment-row.is-credit strong {
  color: #047857;
}
.wb-report-ai-item.is-warning {
  border-left-color: #d97706;
  background: #fffbeb;
  color: #92400e;
}
.wb-report-table-wrap {
  max-height: 360px;
}
.wb-report-table {
  min-width: 980px;
}
.wb-report-expense-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.wb-report-expense {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 4px;
}
.wb-report-expense span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.wb-report-expense b {
  color: #0f172a;
  font-size: 18px;
}
.wb-report-expense small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}
.wb-report-product-table-wrap {
  max-height: 430px;
}
.wb-report-product-table {
  min-width: 1180px;
}
.wb-report-product-table th:first-child,
.wb-report-product-table td:first-child {
  min-width: 180px;
  max-width: 240px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.wb-report-product-ok td {
  background: #f0fdf4;
}
.wb-report-product-warn td {
  background: #fff7ed;
}
.wb-report-product-bad td {
  background: #fef2f2;
  color: #991b1b;
  font-weight: 700;
}
.profit-result-good {
  color: #047857;
  font-weight: 900;
}
.profit-result-bad {
  color: #b91c1c;
  font-weight: 900;
}
.profit-percent-money {
  display: grid;
  gap: 1px;
  line-height: 1.2;
}

.profit-adjustments {
  display: grid;
  gap: 2px;
  line-height: 1.15;
  white-space: nowrap;
}
.profit-percent-money span {
  color: #64748b;
  font-size: 10px;
}
.profit-percent-money b {
  color: #0f172a;
  font-size: 11px;
}
.profit-source-status {
  display: grid;
  gap: 3px;
  min-width: 132px;
  max-width: 210px;
}
.profit-source-button {
  display: inline-grid;
  gap: 1px;
  min-width: 88px;
  min-height: 38px;
  padding: 5px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  text-align: left;
  line-height: 1.05;
}
.profit-source-button span {
  font-size: 12px;
  font-weight: 900;
}
.profit-source-button small {
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
}
.profit-source-button.ok {
  border-color: #86efac;
  background: #f0fdf4;
  color: #047857;
}
.profit-source-button.warn {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}
.profit-source-button.bad {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}
.profit-source-dialog,
.profit-column-settings-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(620px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  padding: 22px;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgb(15 23 42 / 28%);
}
.profit-source-dialog::backdrop,
.profit-column-settings-dialog::backdrop {
  background: rgb(15 23 42 / 48%);
}
.profit-source-details,
.profit-column-settings-list {
  display: grid;
  gap: 8px;
}
.profit-source-detail,
.profit-column-setting-row {
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}
.profit-source-detail p {
  margin: 4px 0 0;
  color: #475569;
  line-height: 1.4;
}
.profit-source-detail.confirmed b {
  color: #047857;
}
.profit-source-detail.estimated b,
.profit-source-detail.stale b {
  color: #c2410c;
}
.profit-source-detail.missing b {
  color: #b91c1c;
}
.profit-column-setting-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  cursor: grab;
  user-select: none;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    opacity 0.15s ease;
}
.profit-column-setting-row:hover {
  border-color: #94a3b8;
  background: #fff;
}
.profit-column-setting-row:active {
  cursor: grabbing;
}
.profit-column-setting-row.dragging {
  opacity: 0.42;
  border-color: #2563eb;
  background: #eff6ff;
}
.profit-column-drag-handle {
  color: #64748b;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -5px;
}
.profit-column-settings-title {
  display: flex;
  align-items: center;
  gap: 9px;
}
.profit-column-help {
  position: relative;
}
.profit-column-help summary {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}
.profit-column-help summary::-webkit-details-marker {
  display: none;
}
.profit-column-help > div {
  position: absolute;
  z-index: 3;
  top: 36px;
  left: 0;
  width: min(330px, calc(100vw - 70px));
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  box-shadow: 0 14px 36px rgb(15 23 42 / 18%);
  font-size: 13px;
  line-height: 1.4;
}
.profit-source-status > .pill {
  justify-self: start;
}
.profit-source-line {
  display: grid;
  gap: 1px;
  line-height: 1.2;
}
.profit-source-line b {
  font-size: 11px;
}
.profit-source-line small {
  color: var(--muted);
  white-space: normal;
  overflow-wrap: anywhere;
}
.profit-source-line.confirmed b {
  color: #047857;
}
.profit-source-line.estimated b,
.profit-source-line.stale b {
  color: #b45309;
}
.profit-source-line.missing b {
  color: #b91c1c;
}
.salary-load-warning {
  grid-column: 1 / -1;
}
.profit-table .profit-recommendation {
  white-space: normal;
}
.profit-action-row td {
  background: #f8fafc;
  border-top: 0;
  color: #475569;
  font-size: 11px;
  padding: 4px 8px !important;
}
.profit-action-row .profit-recommendation {
  max-width: none;
  display: block;
  line-height: 1.35;
}
.profit-results-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: #eef2f7;
}
.profit-results-toggle button {
  height: 24px;
  border: 0;
  border-radius: 999px;
  padding: 0 9px;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.profit-results-toggle button.active {
  background: #020617;
  color: #fff;
}
.profit-period-panel {
  display: flex;
  align-items: center;
  margin: 0 0 0 auto;
}
.profit-period-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.profit-period-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.profit-period-trigger {
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 122px;
  padding: 0 9px 0 10px;
  border: 1px solid #dbe3ef;
  border-radius: 7px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 850;
}
.profit-period-trigger:hover,
.profit-period-trigger[aria-expanded="true"] {
  border-color: #94a3b8;
  background: #f8fafc;
}
.profit-period-trigger > span {
  color: #64748b;
  font-size: 16px;
  line-height: 1;
  transform: translateY(-2px);
}
.profit-period-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  width: min(410px, calc(100vw - 48px));
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
}
.profit-period-menu[hidden] {
  display: none;
}
.profit-main-report > summary {
  display: flex;
  align-items: center;
  gap: 12px;
}
.profit-main-report > summary > span:first-child {
  min-width: 0;
}
.profit-main-report .profit-details-body {
  gap: 7px;
}
.profit-intro-copy > .muted {
  margin: 0;
}
.profit-report-meta {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 18px;
  color: #64748b;
  font-size: 12px;
}
.profit-report-meta p {
  margin: 0;
}
.profit-report-meta .muted + .muted::before {
  content: " · ";
  color: #94a3b8;
}
.profit-report-meta .error {
  width: 100%;
}
.profit-source-coverage-warning {
  margin: 0;
  padding: 7px 10px;
  border-left: 3px solid #f59e0b;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  line-height: 1.35;
}
.profit-period-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.profit-period-tabs button {
  height: 30px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}
.profit-period-tabs button:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}
.profit-period-tabs button.active {
  background: #020617;
  border-color: #020617;
  color: #fff;
}
.profit-period-custom-range {
  display: flex;
  align-items: end;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid #eef2f7;
  flex-wrap: wrap;
}
.profit-period-custom-range label {
  display: grid;
  gap: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  margin: 0;
}
.profit-period-custom-range input[type="date"] {
  width: 132px;
  height: 30px;
  padding: 0 7px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font: inherit;
}
.profit-period-custom-range .profit-period-apply {
  border-color: #4338ca;
  background: #4338ca;
  color: #fff;
}
.profit-period-custom-range .profit-period-apply:hover {
  border-color: #3730a3;
  background: #3730a3;
}
.mp-mode-panel {
  border: 1px solid #dbeafe;
  background: #eff6ff;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mp-mode-panel p {
  flex-basis: 100%;
  margin: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
}
.mp-mode-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mp-mode-main > span {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.mp-mode-toggle {
  min-height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 800;
}
.mp-mode-toggle.active {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}
.profit-sort-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 0;
}
.profit-sort-toolbar span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.profit-sort-toolbar button {
  height: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}
.profit-sort-toolbar button.active {
  background: #020617;
  border-color: #020617;
  color: #fff;
}
.profit-sort-toolbar button.ghost {
  background: #f8fafc;
  color: #64748b;
}
.profit-column-toolbar {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 4px 0 8px;
}
.profit-column-toolbar.active {
  border-top: 1px solid #eef2f7;
  padding-top: 10px;
}
.profit-column-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1 1 100%;
}
.profit-column-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  padding: 3px 5px 3px 9px;
  font-size: 12px;
  font-weight: 800;
}
.profit-column-chip button {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  padding: 0;
  font-size: 12px;
}
.profit-column-chip button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.profit-manual-order {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
}
.profit-manual-order button {
  width: 26px;
  height: 26px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #0f172a;
  padding: 0;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}
.profit-table-main.profit-table-manual th:nth-child(1),
.profit-table-main.profit-table-manual td:nth-child(1) {
  min-width: 54px;
  max-width: 60px;
  text-align: center;
}
.profit-table-main.profit-table-manual th:nth-child(2),
.profit-table-main.profit-table-manual td:nth-child(2) {
  min-width: 220px;
  max-width: 260px;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
.profit-table-main.profit-table-manual th:nth-child(3),
.profit-table-main.profit-table-manual td:nth-child(3) {
  min-width: 62px;
  max-width: 72px;
  text-align: center;
}
.profit-details {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}
.profit-details summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 700;
  color: #334155;
}
.profit-details summary::marker {
  content: "";
}
.profit-details summary::-webkit-details-marker {
  display: none;
}
.profit-details:not(.ui-disclosure-details) summary::before,
.rare-tool:not(.ui-disclosure-details) summary::before {
  content: "▶";
  display: inline-block;
  transition: transform 0.15s ease;
  margin-right: 6px;
}
.profit-details:not(.ui-disclosure-details)[open] > summary::before,
.rare-tool:not(.ui-disclosure-details)[open] > summary::before {
  transform: rotate(90deg);
}
.profit-details-body {
  padding: 0 14px 14px;
  display: grid;
  gap: 12px;
}
.profit-subsection {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}
.profit-subsection h3 {
  margin: 0;
  color: #0f172a;
  font-size: 17px;
  letter-spacing: 0;
}
.profit-subsection .muted {
  margin: 0;
}
.profit-block-intro {
  display: grid;
  gap: 3px;
}
.profit-block-intro h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  letter-spacing: 0;
}
.profit-block-intro p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}
.profit-sku-intro {
  padding-top: 2px;
}
.profit-recommendation {
  max-width: 190px;
  line-height: 1.3;
}
.profit-calculator-result {
  display: grid;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
}
.profit-cost-edit {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 0;
}
.profit-cost-edit input {
  width: 62px;
  height: 26px;
  padding: 0 6px;
  font-size: 12px;
}
.profit-cost-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 84px;
  border-radius: 9px;
}
.profit-cost-field b {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #475569;
  font-size: 12px;
  pointer-events: none;
}
.profit-table-main .profit-cost-field input {
  width: 84px !important;
  min-width: 0 !important;
  height: 32px !important;
  padding: 0 25px 0 9px !important;
  border-radius: 8px;
  box-sizing: border-box;
}
.profit-table-main .profit-cost-field.drilldown-problem-cell-highlight {
  border-radius: 10px;
  overflow: visible;
}
.profit-options-edit {
  display: grid;
  gap: 1px;
  line-height: 1.2;
}
.profit-options-edit b {
  color: #0f172a;
  font-size: 12px;
}
.profit-options-edit small {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}
.profit-options-global {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 3px;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
}
.profit-options-global input {
  width: 48px;
  height: 24px;
  padding: 0 4px;
  font-size: 11px;
}
.profit-options-apply {
  display: block;
  margin-top: 4px;
  border: 0;
  background: transparent;
  color: #4f46e5;
  padding: 0;
  font-size: 10px;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}
.wb-stock-coverage-table th {
  white-space: normal;
  line-height: 1.15;
}
.stock-target-days {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.stock-target-days input {
  width: 38px;
  height: 23px;
  padding: 0 3px;
  font-size: 10px;
}
.profit-cost-input-wrap {
  display: none;
  gap: 3px;
}
.profit-table-main .profit-inline-edit-label {
  display: none;
}
.profit-cost-scope.profit-cost-edit-enabled .profit-cost-view {
  display: none;
}
.profit-cost-scope.profit-cost-edit-enabled .profit-cost-input-wrap {
  display: flex;
}
.product-name-editor {
  display: grid;
  gap: 4px;
  min-width: 0;
  max-width: 240px;
}
.product-name-editor input {
  height: 28px;
  padding: 0 6px;
  font-size: 12px;
  width: 220px;
  max-width: 100%;
}
.product-name-view {
  min-width: 0;
}
.product-name-view span {
  display: block;
  max-width: 230px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}
.product-name-edit-form {
  display: none;
  gap: 6px;
}
.profit-inline-edit-label {
  display: block;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
}
.profit-product-edit-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.profit-table-edit-button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 2px 7px rgb(15 23 42 / 8%);
}
.profit-table-edit-button:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.profit-table-edit-button[aria-pressed="true"] {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}
.profit-table-main th[draggable="true"] {
  cursor: grab;
  user-select: none;
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease;
}
.profit-table-main th[draggable="true"]:active {
  cursor: grabbing;
}
.profit-table-main th.dragging {
  opacity: 0.4;
  background: #e2e8f0;
}
.profit-table-main th.drag-over {
  background: #dbeafe;
  box-shadow: inset 3px 0 #2563eb;
}
.profit-edit-guide {
  display: none;
  grid-template-columns: auto minmax(220px, 1fr);
  gap: 2px 10px;
  align-items: baseline;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 9px 11px;
  font-size: 12px;
}
.profit-cost-scope.profit-cost-edit-enabled .profit-edit-guide {
  display: grid;
}
.profit-edit-guide b {
  grid-row: 1 / span 2;
}
.profit-edit-guide small {
  color: #475569;
  font-size: 10px;
}
.product-name-edit-enabled .product-name-editor .product-name-view,
.product-name-editor.product-name-edit-enabled .product-name-view {
  display: none;
}
.product-name-edit-enabled .product-name-editor .product-name-edit-form,
.product-name-editor.product-name-edit-enabled .product-name-edit-form {
  display: grid;
}
.text-action {
  border: 0;
  background: transparent;
  color: #2563eb;
  height: auto;
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.text-action.warn {
  color: #64748b;
  font-weight: 600;
}
.ai-employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}
.ai-employee-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 9px;
  min-height: 210px;
}
.ai-employee-card.active {
  border-color: #0f172a;
  box-shadow: 0 0 0 1px #0f172a inset;
}
.ai-employee-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.ai-employee-head b {
  display: block;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.2;
}
.ai-employee-head span:not(.pill) {
  display: block;
  color: #64748b;
  font-size: 12px;
  line-height: 1.25;
  margin-top: 3px;
}
.ai-employee-card p {
  margin: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
}
.ai-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.ai-kpi-row span {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  padding: 5px 6px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
}
.ai-kpi-row b {
  display: block;
  color: #0f172a;
  font-size: 13px;
  margin-top: 2px;
}
.ai-trust-mini {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px;
}
.ai-trust-mini > div:first-child span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.ai-trust-mini > div:first-child b {
  display: block;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.25;
}
.ai-trust-bar {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.ai-trust-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #0f172a;
}
.ai-employee-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ai-employee-tools span {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 700;
}
.ai-employee-questions {
  display: grid;
  gap: 5px;
  border-top: 1px solid #eef2f7;
  padding-top: 8px;
  min-height: 54px;
}
.ai-employee-questions strong {
  color: #64748b;
  font-size: 11px;
  text-transform: uppercase;
}
.ai-question {
  border: 1px solid #fed7aa;
  border-radius: 6px;
  background: #fff7ed;
  color: #9a3412;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}
[data-widget-id="workforce-chat"] {
  scroll-margin-top: 16px;
}
.ai-employee-identity {
  display: block;
  max-width: 100%;
  color: #64748b;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.ai-workforce-task-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}
.ai-orchestration-center {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}
.ai-orchestration-heading h2,
.ai-orchestration-heading p {
  margin: 0;
}
.ai-orchestration-heading > div {
  display: grid;
  gap: 3px;
}
.ai-orchestration-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}
.ai-orchestration-metrics > div {
  display: grid;
  gap: 3px;
  min-height: 70px;
  align-content: center;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
}
.ai-orchestration-metrics span,
.ai-orchestration-run small,
.ai-orchestration-facts small {
  color: #64748b;
  font-size: 11px;
}
.ai-orchestration-metrics b {
  font-size: 20px;
}
.ai-auditor-coverage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 9px;
  background: #f8fbff;
}
.ai-auditor-coverage .table-wrap {
  width: 0;
  min-width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.ai-auditor-coverage > summary {
  cursor: pointer;
  font-weight: 800;
}
.ai-auditor-coverage > p {
  margin: 0;
}
.ai-auditor-coverage-table td:first-child {
  min-width: 190px;
}
.ai-auditor-coverage-table td:first-child small {
  display: block;
  color: #64748b;
  font-size: 11px;
}
.ai-orchestration-list,
.ai-orchestration-assignments,
.ai-orchestration-detail {
  display: grid;
  gap: 8px;
}
.ai-real-problem-list {
  display: grid;
  gap: 12px;
}
.ai-real-problem {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #fed7aa;
  border-left: 5px solid #f59e0b;
  border-radius: 9px;
  background: #fffdf8;
}
.ai-real-problem.critical {
  border-color: #fecaca;
  border-left-color: #dc2626;
  background: #fffafa;
}
.ai-real-problem-head,
.ai-real-problem-head > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.ai-real-problem-head > div {
  justify-content: flex-start;
}
.ai-real-problem h3,
.ai-real-problem p {
  margin: 0;
}
.ai-real-problem p {
  color: #475569;
  line-height: 1.45;
}
.ai-real-problem-fix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
}
.ai-real-problem-fix small {
  grid-column: 1 / -1;
  color: #1d4ed8;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ai-real-problem-fix ul {
  margin: 0;
  padding-left: 18px;
  color: #1e3a8a;
}
.ai-problem-command {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.ai-problem-command-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.ai-problem-command-title span,
.ai-problem-command .row > .muted {
  color: #64748b;
  font-size: 11px;
}
.ai-problem-command-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(300px, 1.6fr);
  gap: 10px;
}
.ai-problem-command-grid label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}
.ai-problem-command-grid select,
.ai-problem-command-grid textarea {
  width: 100%;
  box-sizing: border-box;
}
.ai-problem-command .ok p,
.ai-problem-command .error p {
  max-height: 240px;
  overflow: auto;
  margin: 7px 0 0;
  white-space: pre-wrap;
}
.ai-orchestration-history {
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
}
.ai-orchestration-history > summary {
  cursor: pointer;
  color: #334155;
  font-weight: 800;
}
.ai-orchestration-history > .ai-orchestration-list {
  margin-top: 10px;
}
.ai-orchestration-run {
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}
.ai-orchestration-run > summary {
  display: grid;
  grid-template-columns: 8px minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
}
.ai-orchestration-run > summary::-webkit-details-marker {
  display: none;
}
.ai-orchestration-run > summary > span:nth-child(2) {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.ai-orchestration-priority {
  width: 7px;
  height: 30px;
  border-radius: 3px;
  background: #94a3b8;
}
.ai-orchestration-priority.high {
  background: #f59e0b;
}
.ai-orchestration-priority.critical {
  background: #dc2626;
}
.ai-orchestration-priority.low {
  background: #16a34a;
}
.ai-orchestration-task-count {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.ai-orchestration-detail {
  padding: 12px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}
.ai-orchestration-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.ai-orchestration-facts > span {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
}
.ai-orchestration-facts b {
  font-size: 12px;
  line-height: 1.35;
}
.ai-orchestration-assignments > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 9px;
  border-bottom: 1px solid #e2e8f0;
}
.ai-orchestration-assignments > div > span:first-child {
  display: grid;
  gap: 1px;
}
.ai-orchestration-usage {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: #64748b;
  font-size: 11px;
}
.ai-orchestration-usage b {
  color: #334155;
}
.ai-orchestration-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 20px;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgb(15 23 42 / 25%);
}
.ai-orchestration-dialog form,
.ai-orchestration-dialog label {
  display: grid;
  gap: 8px;
}
.ai-orchestration-dialog form {
  gap: 14px;
}
.ai-meeting-participants {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 12px;
  max-height: 240px;
  overflow: auto;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
}
.ai-meeting-participants legend {
  padding: 0 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}
.ai-meeting-participants .check-row {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 12px;
}
@media (max-width: 760px) {
  .ai-orchestration-metrics,
  .ai-orchestration-facts {
    grid-template-columns: 1fr 1fr;
  }
  .ai-orchestration-run > summary {
    grid-template-columns: 7px minmax(0, 1fr) auto;
  }
  .ai-orchestration-task-count {
    grid-column: 2 / -1;
  }
  .ai-problem-command-grid,
  .ai-real-problem-fix {
    grid-template-columns: 1fr;
  }
  .ai-auditor-coverage-table,
  .ai-auditor-coverage-table tbody,
  .ai-auditor-coverage-table tr,
  .ai-auditor-coverage-table td {
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .ai-auditor-coverage-table thead {
    display: none;
  }
  .ai-auditor-coverage-table tbody {
    display: grid;
    gap: 8px;
  }
  .ai-auditor-coverage-table tr {
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
  }
  .ai-auditor-coverage-table td {
    padding: 4px 0;
    border: 0;
    overflow-wrap: anywhere;
  }
  .ai-workforce-task-table,
  .ai-workforce-task-table tbody,
  .ai-workforce-task-table tr,
  .ai-workforce-task-table td {
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .ai-workforce-task-table thead {
    display: none;
  }
  .ai-workforce-task-table tbody {
    display: grid;
    gap: 8px;
  }
  .ai-workforce-task-table tr {
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
  }
  .ai-workforce-task-table td {
    display: grid;
    grid-template-columns: minmax(82px, 0.36fr) minmax(0, 1fr);
    gap: 8px;
    padding: 4px 0;
    border: 0;
    overflow-wrap: anywhere;
  }
  .ai-workforce-task-table td::before {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
  }
  .ai-workforce-task-table td:nth-child(1)::before {
    content: "ID";
  }
  .ai-workforce-task-table td:nth-child(2)::before {
    content: "AI-сотрудник";
  }
  .ai-workforce-task-table td:nth-child(3)::before {
    content: "Задача";
  }
  .ai-workforce-task-table td:nth-child(4)::before {
    content: "Приоритет";
  }
  .ai-workforce-task-table td:nth-child(5)::before {
    content: "Статус";
  }
  .ai-workforce-task-table td:nth-child(6)::before {
    content: "Подтверждение";
  }
  .ai-workforce-task-table td:nth-child(7)::before {
    content: "Создано";
  }
  .ai-workforce-task-table td:nth-child(8)::before {
    content: "Действие";
  }
}

.onboarding-home-card,
.onboarding-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.onboarding-progress {
  display: grid;
  flex: 0 0 112px;
  width: 112px;
  height: 112px;
  place-content: center;
  text-align: center;
  border: 10px solid #ede9fe;
  border-radius: 999px;
}

.onboarding-progress b {
  font-size: 26px;
}

.onboarding-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.onboarding-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #6d28d9;
}

.onboarding-steps {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.onboarding-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.onboarding-step.completed {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.onboarding-step-number {
  display: grid;
  width: 36px;
  height: 36px;
  place-content: center;
  border-radius: 999px;
  background: #ede9fe;
  color: #6d28d9;
  font-weight: 800;
}

.onboarding-step.completed .onboarding-step-number {
  background: #dcfce7;
  color: #166534;
}

.onboarding-step p {
  margin: 4px 0;
  color: #475569;
}

.onboarding-step small {
  color: #64748b;
}

.subscriptions-workspace,
.subscription-card {
  min-width: 0;
}

.subscription-card .metrics {
  margin: 16px 0;
}

@media (max-width: 760px) {
  .onboarding-home-card,
  .onboarding-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .onboarding-progress {
    align-self: center;
  }

  .onboarding-step {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .onboarding-step button {
    grid-column: 1 / -1;
    width: 100%;
  }
}
@media (max-width: 520px) {
  .ai-orchestration-metrics,
  .ai-orchestration-facts {
    grid-template-columns: 1fr;
  }
  .ai-meeting-participants {
    grid-template-columns: 1fr;
  }
}
.ai-chat-shell {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.ai-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-width: 0;
  border-bottom: 1px solid #eef2f7;
  padding-bottom: 10px;
}
.ai-chat-header select {
  box-sizing: border-box;
  width: auto;
  min-width: 230px;
  max-width: 100%;
}
.ai-chat-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ai-chat-person > div {
  min-width: 0;
}
.ai-chat-person > span {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #020617;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
}
.ai-chat-person h2 {
  margin: 0;
  font-size: 18px;
  overflow-wrap: anywhere;
}
.ai-chat-person p {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.ai-chat-log {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 300px;
  max-height: 520px;
  overflow: auto;
}
.ai-chat-empty {
  margin: auto;
  max-width: 420px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
  line-height: 1.4;
}
.ai-chat-message {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
  font-size: 14px;
  line-height: 1.42;
  max-width: min(760px, 86%);
  white-space: normal;
  overflow-wrap: anywhere;
}
.ai-chat-message.answer {
  align-self: flex-start;
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.ai-chat-message.task {
  align-self: flex-end;
  border-color: #dbeafe;
  background: #eff6ff;
}
.ai-chat-message.error {
  align-self: flex-start;
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}
.ai-chat-message.pending {
  opacity: 0.75;
}
.ai-chat-author {
  display: block;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}
.ai-chat-message span {
  color: #475569;
}
.ai-chat-message em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.ai-chat-compose {
  display: grid;
  gap: 8px;
}
.ai-chat-compose textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 64px;
  resize: vertical;
}
.ai-chat-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.ai-chat-actions > * {
  min-width: 0;
  max-width: 100%;
}
.ai-chat-compact .ai-chat-log {
  min-height: 220px;
  max-height: 340px;
}
.ai-chat-compact .ai-chat-header {
  align-items: flex-start;
}
.ai-chat-compact .ai-chat-header select {
  min-width: 200px;
  max-width: 100%;
}
.home-ai-briefing {
  border-color: #c7d2fe;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.08);
}
.home-ai-briefing .ai-chat-person > span {
  background: #4f46e5;
}
.home-pulse-card {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.75fr);
  gap: 14px;
  align-items: stretch;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 18px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 52%, #fff7ed 100%);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  min-width: 0;
}
.home-pulse-main {
  display: grid;
  gap: 10px;
  align-content: center;
  min-width: 0;
}
.home-pulse-date {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.home-pulse-main h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
  color: #0f172a;
}
.home-pulse-main p {
  margin: 0;
  max-width: 780px;
  color: #334155;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.home-pulse-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.home-pulse-side {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.home-health {
  width: 100%;
  height: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: inherit;
  padding: 13px;
  display: grid;
  gap: 2px;
  text-align: left;
}
.home-health span,
.home-health small {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.home-health b {
  color: #0f172a;
  font-size: 30px;
  line-height: 1;
}
.home-health.ok {
  border-color: #bbf7d0;
}
.home-health.warn {
  border-color: #fed7aa;
}
.home-health.bad {
  border-color: #fecaca;
}
.home-signal-list {
  display: grid;
  gap: 6px;
}
.home-signal-list .home-signal-link {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 8px 10px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  text-align: left;
  overflow-wrap: anywhere;
}
.home-marketplace-penalty {
  width: 100%;
  height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  padding: 8px 10px;
  text-align: left;
}
.home-drilldown {
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}
.home-drilldown:hover {
  border-color: #94a3b8;
  box-shadow: 0 5px 14px rgb(15 23 42 / 10%);
  transform: translateY(-1px);
}
.home-drilldown:focus-visible {
  outline: 3px solid rgb(37 99 235 / 24%);
  outline-offset: 2px;
}
.supply-plan-status-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
.supply-plan-status-actions .supply-plan-delete {
  height: 28px;
  border: 1px solid #fecaca;
  background: #fff;
  color: #b91c1c;
}
.supply-plan-status-actions .supply-plan-delete:hover {
  border-color: #dc2626;
  background: #fef2f2;
}
@keyframes drilldown-problem-flash {
  0%,
  100% {
    color: #020617;
  }
  50% {
    color: #dc2626;
  }
}
.drilldown-problem-highlight,
.drilldown-problem-highlight > td {
  animation: drilldown-problem-flash 1s ease-in-out 25;
}
.drilldown-problem-highlight *,
.drilldown-problem-highlight > td * {
  color: inherit !important;
}
@keyframes drilldown-problem-cell-frame {
  0%,
  100% {
    color: #020617;
    box-shadow: inset 0 0 0 3px #020617;
  }
  50% {
    color: #dc2626;
    box-shadow: inset 0 0 0 3px #dc2626;
  }
}
.drilldown-problem-cell-highlight {
  position: relative;
  z-index: 2;
  animation: drilldown-problem-cell-frame 1s ease-in-out 25 !important;
}
.profit-missing-cost-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff7f7;
  padding: 10px 12px;
}
.profit-missing-cost-warning .error {
  flex: 1 1 auto;
  margin: 0;
  border: 0;
  background: transparent;
  padding: 0;
}
.profit-missing-cost-warning button {
  flex: 0 0 auto;
  background: #b91c1c;
}
.profit-missing-cost-warning button:hover {
  background: #991b1b;
}
@media (max-width: 720px) {
  .profit-missing-cost-warning {
    align-items: stretch;
    flex-direction: column;
  }
  .profit-missing-cost-warning button {
    width: 100%;
  }
}
.home-marketplace-penalty span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.home-marketplace-penalty b {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.home-marketplace-penalty small {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.home-marketplace-penalty.no-penalties {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.home-marketplace-penalty.no-penalties b {
  color: #15803d;
}
.home-marketplace-penalty.has-penalties {
  border-color: #fecaca;
  background: #fef2f2;
}
.home-marketplace-penalty.has-penalties b {
  color: #dc2626;
}
.marketplace-penalty-toast {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1000;
  display: grid;
  gap: 12px;
  width: min(390px, calc(100vw - 36px));
  padding: 18px 52px 18px 20px;
  border: 1px solid #fecaca;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
}
.marketplace-penalty-toast h2 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  letter-spacing: 0;
}
.marketplace-penalty-toast strong {
  color: #dc2626;
  font-size: 28px;
  line-height: 1;
}
.marketplace-penalty-toast p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
}
.marketplace-penalty-kicker {
  color: #b91c1c;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.marketplace-penalty-toast-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  font-size: 22px;
  line-height: 1;
}
.home-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.home-metric {
  height: auto;
  min-height: 124px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.home-metric-button {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}
.home-metric-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgb(15 23 42 / 10%);
}
.home-metric-button:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}
.home-metric-button > i {
  margin-top: 5px;
  color: #334155;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}
.home-metric span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.home-metric b {
  color: #0f172a;
  font-size: 24px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.home-metric .home-sales-fraction {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: baseline;
  gap: clamp(4px, 0.7vw, 8px);
  min-width: 0;
  white-space: normal;
}
.home-metric .home-sales-fraction span,
.home-metric .home-sales-fraction em {
  min-width: 0;
  color: #0f172a;
  font-size: clamp(15px, 1.65vw, 24px);
  font-style: normal;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.home-metric .home-sales-fraction em {
  color: #64748b;
}
.home-metric .home-sales-fraction i {
  align-self: center;
  color: #38bdf8;
  font-size: clamp(15px, 1.4vw, 20px);
  font-style: normal;
  font-weight: 900;
}
.home-metric small {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.home-metric.money {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.home-metric.sales {
  border-color: #bae6fd;
  background: #f0f9ff;
}
.home-metric.production {
  border-color: #fde68a;
  background: #fffbeb;
}
.home-metric.ai {
  border-color: #ddd6fe;
  background: #f5f3ff;
}
.home-briefing-card p {
  margin: 0 0 12px;
  color: #334155;
  line-height: 1.45;
}
.home-mini-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.home-mini-checklist span {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 5px 9px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}
.home-alert-list {
  display: grid;
  gap: 8px;
}
.home-alert-item {
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  padding: 9px 10px;
  display: grid;
  gap: 2px;
}
.home-alert-item b {
  color: #0f172a;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.home-alert-item span {
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
}
.home-calm-state {
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  padding: 12px;
  display: grid;
  gap: 2px;
}
.home-calm-state b {
  color: #166534;
}
.home-calm-state span {
  color: #047857;
  font-size: 13px;
}
.home-context-bar {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px 14px;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.home-context-bar > * {
  min-width: 0;
}
.home-context-summary,
.home-context-filters,
.home-context-sources {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.home-context-summary {
  justify-content: space-between;
}
.home-context-summary p {
  flex: 1 1 auto;
}
.home-context-sources {
  flex-wrap: wrap;
}
.home-context-filters {
  flex-wrap: wrap;
  justify-content: flex-start;
}
.home-context-bar label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  font-weight: 800;
}
.home-context-bar select {
  box-sizing: border-box;
  width: auto;
  min-width: 160px;
  max-width: 100%;
}
.home-context-bar p {
  flex: 1 1 220px;
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.home-data-status,
.home-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  height: auto;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}
.home-data-status:hover,
.home-source-badge:hover {
  border-color: #94a3b8;
  box-shadow: 0 3px 10px rgb(15 23 42 / 10%);
  transform: translateY(-1px);
}
.home-data-status:focus-visible,
.home-source-badge:focus-visible {
  outline: 3px solid rgb(37 99 235 / 22%);
  outline-offset: 2px;
}
.home-data-status {
  min-height: 30px;
  padding: 0 10px;
}
.home-source-badge {
  min-height: 24px;
  padding: 0 8px;
  font-size: 11px;
}
.home-data-status::before,
.home-source-badge::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #94a3b8;
}
.home-data-status.ok,
.home-source-badge.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}
.home-data-status.ok::before,
.home-source-badge.ok::before {
  background: #22c55e;
}
.home-data-status.warn,
.home-source-badge.warn {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}
.home-data-status.warn::before,
.home-source-badge.warn::before {
  background: #f59e0b;
}
.home-data-status.bad,
.home-source-badge.bad {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}
.home-data-status.bad::before,
.home-source-badge.bad::before {
  background: #ef4444;
}
.home-decision-card {
  box-sizing: border-box;
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 18px;
  overflow: hidden;
  border: 1px solid #c7d2fe;
  border-left: 4px solid #4f46e5;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef2ff 0%, #fff 72%);
  box-shadow: 0 10px 26px rgba(79, 70, 229, 0.08);
}
.home-decision-card > .toolbar {
  align-items: flex-start;
  margin-bottom: 0;
}
.home-decision-card h2,
.home-decision-card h3,
.home-goal-card h2,
.home-goal-card h3,
.home-command-card h2,
.home-command-card h3 {
  margin: 0;
  overflow-wrap: anywhere;
}
.home-decision-card p,
.home-goal-card p,
.home-command-card p {
  margin: 0;
  color: #475569;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.home-decision-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 2px;
  flex-wrap: wrap;
}
.home-decision-actions > * {
  min-width: 0;
  max-width: 100%;
}
.home-goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 12px;
  width: 100%;
  min-width: 0;
}
.home-goal-card {
  box-sizing: border-box;
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.home-goal-card > strong,
.home-goal-card > b {
  color: #0f172a;
  font-size: 20px;
  overflow-wrap: anywhere;
}
.home-goal-card progress {
  width: 100%;
  height: 8px;
  accent-color: #4f46e5;
}
.home-goal-card small {
  color: #64748b;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.home-attention-list,
.home-activity-list,
.home-opportunity-list {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.home-attention-item,
.home-activity-item,
.home-opportunity-list > li,
.home-opportunity-list > article,
.home-opportunity-list > div,
.home-opportunity-button {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.home-attention-item {
  border-color: #fed7aa;
  background: #fff7ed;
}
.home-activity-item {
  background: #f8fafc;
}
.home-opportunity-list > li,
.home-opportunity-list > article,
.home-opportunity-list > div,
.home-opportunity-button {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.home-opportunity-button {
  border-style: solid;
  text-align: left;
  color: #0f172a;
  cursor: pointer;
}
.home-opportunity-button:hover {
  border-color: #4ade80;
  background: #dcfce7;
  transform: translateY(-1px);
}
.home-opportunity-button > span {
  display: grid;
  justify-items: end;
  gap: 5px;
}
.home-opportunity-button > span b {
  color: #166534;
  font-size: 12px;
  white-space: nowrap;
}
.home-attention-item > *,
.home-activity-item > *,
.home-opportunity-list > li > *,
.home-opportunity-list > article > *,
.home-opportunity-list > div > * {
  min-width: 0;
}
.home-attention-item h3,
.home-attention-item p,
.home-activity-item h3,
.home-activity-item p,
.home-opportunity-list h3,
.home-opportunity-list p {
  margin: 0;
  overflow-wrap: anywhere;
}
.home-attention-item p,
.home-activity-item p,
.home-opportunity-list p {
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}
.home-attention-item small,
.home-attention-item time,
.home-activity-item small,
.home-activity-item time,
.home-opportunity-list small,
.home-opportunity-list time {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.home-attention-item > .home-decision-actions,
.home-activity-item > .home-decision-actions,
.home-opportunity-list .home-decision-actions {
  grid-column: 1 / -1;
}
.home-command-card {
  box-sizing: border-box;
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
}
.home-command-card .row {
  min-width: 0;
}
.home-command-card input,
.home-command-card textarea,
.home-command-card select {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}
.home-command-card input,
.home-command-card textarea {
  flex: 1 1 240px;
}
.home-command-preview,
.home-command-confirmation,
.home-command-result {
  box-sizing: border-box;
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.home-command-preview > *,
.home-command-confirmation > *,
.home-command-result > * {
  min-width: 0;
  margin-block: 0;
}
.home-command-confirmation {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}
.home-command-options {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  flex-wrap: wrap;
}
.home-command-options > * {
  min-width: 0;
  max-width: 100%;
}
.home-command-result {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}
.home-command-result.error,
.home-command-result.bad {
  margin: 0;
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}
.home-command-result.warn {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}
.home-quick-capture {
  display: grid;
  gap: 7px;
  margin-top: 45px;
}
.home-quick-capture > [hidden],
.home-quick-capture > #result:empty {
  display: none;
}
#quick-writeoff-requests-button {
  justify-self: start;
  height: auto;
  padding: 5px 9px;
  color: #b91c1c;
}
.home-quick-capture-row {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) repeat(4, 46px);
  gap: 8px;
  align-items: center;
  overflow: visible;
}
.home-quick-capture-row input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 15px;
  border-color: #d7e0ec;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 1px 0 #fff,
    0 5px 14px rgba(15, 23, 42, 0.05);
  color: #0f172a;
  font-size: 14px;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}
.home-quick-capture-row #command::placeholder {
  color: #64748b;
  opacity: 1;
}
.home-quick-capture-row #command:focus {
  outline: none;
  border-color: #818cf8;
  background: #fff;
  box-shadow:
    0 0 0 4px rgba(99, 102, 241, 0.13),
    0 8px 20px rgba(15, 23, 42, 0.08);
}
button.quick-action-button {
  --quick-color: #334155;
  --quick-background: linear-gradient(145deg, #fff, #f8fafc);
  --quick-border: #dbe3ef;
  --quick-border-hover: #cbd5e1;
  --quick-glow: rgba(15, 23, 42, 0.12);
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  overflow: visible;
  border: 1px solid var(--quick-border);
  border-radius: 14px;
  background: var(--quick-background);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 6px 15px rgba(15, 23, 42, 0.08);
  color: var(--quick-color);
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease;
}
button.quick-action-button svg {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button.quick-action-button::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 1px;
  border-radius: 12px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.72),
    transparent 55%
  );
  pointer-events: none;
}
button.quick-action-button::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: calc(100% + 9px);
  padding: 6px 9px;
  border-radius: 8px;
  background: #0f172a;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.2);
  color: #fff;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 4px) scale(0.96);
  transform-origin: 50% 100%;
  transition:
    opacity 0.14s ease,
    transform 0.14s ease,
    visibility 0.14s ease;
}
button.quick-action-button:not(:disabled):hover {
  border-color: var(--quick-border-hover);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 11px 24px var(--quick-glow);
  filter: saturate(1.08);
  transform: translateY(-2px);
}
button.quick-action-button:not(:disabled):hover::after,
button.quick-action-button:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) scale(1);
}
button.quick-action-button:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.24);
  outline-offset: 2px;
}
button.quick-action-button:not(:disabled):active {
  transform: translateY(0) scale(0.95);
}
button.quick-action-button:disabled {
  cursor: wait;
  filter: grayscale(0.15);
  opacity: 0.58;
}
.quick-action-voice {
  --quick-color: #7c3aed;
  --quick-background: linear-gradient(145deg, #faf5ff, #ede9fe);
  --quick-border: #ddd6fe;
  --quick-border-hover: #c4b5fd;
  --quick-glow: rgba(124, 58, 237, 0.22);
}
.quick-action-scan {
  --quick-color: #2563eb;
  --quick-background: linear-gradient(145deg, #f0f9ff, #dbeafe);
  --quick-border: #bfdbfe;
  --quick-border-hover: #93c5fd;
  --quick-glow: rgba(37, 99, 235, 0.22);
}
.quick-action-file {
  --quick-color: #059669;
  --quick-background: linear-gradient(145deg, #f0fdf4, #d1fae5);
  --quick-border: #a7f3d0;
  --quick-border-hover: #6ee7b7;
  --quick-glow: rgba(5, 150, 105, 0.22);
}
.quick-action-confirm {
  --quick-color: #fff;
  --quick-background: linear-gradient(
    135deg,
    #111827 0%,
    #312e81 58%,
    #4f46e5 100%
  );
  --quick-border: #3730a3;
  --quick-border-hover: #6366f1;
  --quick-glow: rgba(79, 70, 229, 0.34);
}
button.quick-action-confirm::before {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.22),
    transparent 58%
  );
}
button.quick-action-confirm svg {
  width: 24px;
  height: 24px;
}
.quick-action-button .quick-scan-beam,
.quick-action-button .quick-file-plus,
.quick-action-button .quick-preview-spark {
  transform-box: fill-box;
  transform-origin: center;
}
.quick-action-scan:hover .quick-scan-beam {
  animation: quick-scan-beam 0.72s ease-in-out infinite alternate;
}
.quick-action-file:hover .quick-file-plus {
  transform: rotate(90deg);
  transition: transform 0.32s ease;
}
.quick-action-confirm:hover .quick-preview-spark {
  animation: quick-preview-spark 0.62s ease-in-out infinite alternate;
}
.quick-action-button.recording {
  --quick-color: #b91c1c;
  --quick-background: linear-gradient(145deg, #fff1f2, #fee2e2);
  --quick-border: #ef4444;
  --quick-border-hover: #ef4444;
  --quick-glow: rgba(239, 68, 68, 0.28);
  animation: quick-intake-recording 1.1s ease-in-out infinite;
}
@keyframes quick-scan-beam {
  from {
    transform: translateY(-3px);
  }
  to {
    transform: translateY(3px);
  }
}
@keyframes quick-preview-spark {
  from {
    transform: scale(0.82) rotate(-8deg);
    opacity: 0.7;
  }
  to {
    transform: scale(1.12) rotate(8deg);
    opacity: 1;
  }
}
@keyframes quick-intake-recording {
  50% {
    box-shadow:
      0 0 0 6px rgba(239, 68, 68, 0.14),
      0 12px 24px rgba(239, 68, 68, 0.22);
    transform: translateY(-1px) scale(1.04);
  }
}
.quick-intake-files {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.quick-intake-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 5px 4px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
}
.quick-intake-file > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quick-intake-file button {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  line-height: 1;
}
.home-quick-capture .home-command-preview,
.home-quick-capture .home-command-result {
  margin-top: 1px;
  padding: 9px;
}
.quick-intake-preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.quick-intake-preview-head small {
  color: #64748b;
}
.quick-intake-preview-list {
  display: grid;
  gap: 6px;
}
.quick-intake-preview-item {
  display: grid;
  grid-template-columns: minmax(135px, 0.36fr) minmax(220px, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
}
.quick-intake-preview-item > span {
  display: grid;
  gap: 2px;
  color: #1e3a8a;
}
.quick-intake-preview-item small {
  color: #64748b;
  font-size: 10px;
}
.quick-intake-preview-item textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 37px;
  padding: 7px 9px;
  resize: vertical;
  background: #f8fafc;
}
.quick-intake-warnings {
  display: grid;
  gap: 3px;
  color: #9a3412;
  font-size: 11px;
  font-weight: 750;
}
.owner-assistant-thread {
  display: grid;
  gap: 14px;
  min-width: 0;
  margin-top: 5px;
}
.owner-assistant-exchange {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.owner-assistant-user {
  display: flex;
  justify-self: end;
  align-items: flex-start;
  gap: 7px;
  max-width: min(82%, 760px);
  padding: 7px 10px;
  border-radius: 12px 12px 3px 12px;
  background: #e0e7ff;
  color: #312e81;
}
.owner-assistant-user span {
  padding-top: 2px;
  color: #6366f1;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.owner-assistant-user p {
  margin: 0;
  line-height: 1.4;
}
.owner-assistant-answer {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 15px;
  border: 1px solid #c7d2fe;
  border-radius: 16px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.98),
    rgba(238, 242, 255, 0.96)
  );
  box-shadow: 0 14px 35px rgba(49, 46, 129, 0.1);
  color: #172554;
}
.owner-assistant-answer > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.owner-assistant-answer > header > div {
  display: grid;
  gap: 3px;
}
.owner-assistant-answer header small,
.owner-assistant-answer time,
.owner-assistant-sources {
  color: #64748b;
  font-size: 10px;
}
.owner-assistant-report-time {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: #475569;
  font-size: 11px;
}
.owner-assistant-report-time b {
  color: #334155;
}
.owner-assistant-badge {
  color: #4338ca;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.owner-assistant-answer h3,
.owner-assistant-answer h4,
.owner-assistant-answer p {
  margin: 0;
}
.owner-assistant-answer h3 {
  font-size: 19px;
  color: #111827;
}
.owner-assistant-answer h4 {
  font-size: 12px;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}
.owner-assistant-summary {
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
}
.owner-assistant-status {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #fcd34d;
  border-radius: 11px;
  background: #fffbeb;
  color: #92400e;
}
.owner-assistant-status b {
  font-size: 13px;
}
.owner-assistant-status p {
  color: #a16207;
  font-size: 11px;
  line-height: 1.45;
}
.owner-assistant-status.state-empty {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}
.owner-assistant-status.state-empty p {
  color: #64748b;
}
.owner-assistant-kpi-section {
  display: grid;
  gap: 7px;
}
.owner-assistant-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 7px;
}
.owner-assistant-metric {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
}
.owner-assistant-metric span {
  color: #64748b;
  font-size: 10px;
  font-weight: 750;
}
.owner-assistant-metric b {
  color: #0f172a;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.owner-assistant-metric small {
  color: #94a3b8;
  font-size: 9px;
  line-height: 1.35;
}
.owner-assistant-metric.good {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.owner-assistant-metric.bad {
  border-color: #fecaca;
  background: #fff7f7;
}
.owner-assistant-metric.bad b {
  color: #b91c1c;
}
.owner-assistant-metric.state-empty,
.owner-assistant-metric.state-waiting,
.owner-assistant-metric.state-unavailable {
  border-style: dashed;
  background: #f8fafc;
}
.owner-assistant-metric.state-empty b {
  color: #64748b;
}
.owner-assistant-metric.state-waiting {
  border-color: #fcd34d;
  background: #fffbeb;
}
.owner-assistant-metric.state-waiting b {
  color: #92400e;
  font-size: 13px;
}
.owner-assistant-metric.state-unavailable {
  border-color: #fdba74;
  background: #fff7ed;
}
.owner-assistant-metric.state-unavailable b {
  color: #9a3412;
  font-size: 13px;
}
.owner-assistant-metric.state-stale {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.owner-assistant-metric.state-derived {
  border-color: #c4b5fd;
  background: #faf5ff;
}
.owner-assistant-last-activity {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fafc, #fff);
}
.owner-assistant-last-activity > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.owner-assistant-last-activity h4 {
  color: #475569;
}
.owner-assistant-columns {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 9px;
}
.owner-assistant-columns > section {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.76);
}
.owner-assistant-list {
  display: grid;
  gap: 6px;
}
.owner-assistant-insight {
  display: grid;
  gap: 2px;
  padding-left: 8px;
  border-left: 3px solid #f59e0b;
}
.owner-assistant-insight.critical {
  border-left-color: #ef4444;
}
.owner-assistant-insight.recommendation {
  border-left-color: #6366f1;
}
.owner-assistant-insight b {
  color: #1e293b;
  font-size: 12px;
}
.owner-assistant-insight span,
.owner-assistant-ok {
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
}
.owner-assistant-ok {
  color: #166534;
}
.owner-assistant-source-section {
  display: grid;
  gap: 7px;
}
.owner-assistant-source-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.owner-assistant-source-chip {
  display: grid;
  grid-template-columns: auto auto;
  gap: 1px 6px;
  min-width: 145px;
  padding: 6px 8px;
  border: 1px solid #dbeafe;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.82);
}
.owner-assistant-source-chip b {
  color: #334155;
  font-size: 10px;
}
.owner-assistant-source-chip span {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 9px;
}
.owner-assistant-source-chip time {
  justify-self: end;
  color: #94a3b8;
}
.owner-assistant-source-chip.state-ready {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.owner-assistant-source-chip.state-waiting {
  border-color: #fcd34d;
  background: #fffbeb;
}
.owner-assistant-source-chip.state-stale,
.owner-assistant-source-chip.state-empty {
  border-style: dashed;
}
.owner-assistant-source-chip.state-unavailable {
  border-color: #fdba74;
  background: #fff7ed;
}
.owner-assistant-details {
  padding-top: 7px;
  border-top: 1px solid #e2e8f0;
}
.owner-assistant-details summary {
  width: max-content;
  color: #64748b;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}
.owner-assistant-notes {
  display: grid;
  gap: 2px;
  padding-top: 7px;
}
.owner-assistant-notes span {
  color: #64748b;
  font-size: 10px;
}
.owner-assistant-notes span::before {
  content: "• ";
  color: #818cf8;
}
.owner-assistant-details .owner-assistant-sources {
  display: block;
  padding-top: 5px;
}
.owner-assistant-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.owner-assistant-suggestions button {
  width: auto;
  height: auto;
  min-height: 30px;
  padding: 5px 9px;
  font-size: 10px;
}
.quick-scanner {
  gap: 8px;
}
.quick-scanner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.quick-scanner-head > div {
  display: grid;
  gap: 2px;
}
.quick-scanner video {
  width: 100%;
  max-height: 280px;
  border-radius: 9px;
  background: #0f172a;
  object-fit: cover;
}
.quick-scanner-manual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}
.quick-scan-found {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) repeat(3, minmax(125px, 0.7fr));
  gap: 8px;
  align-items: end;
}
.quick-scan-found > div,
.quick-scan-found label {
  display: grid;
  gap: 4px;
}
.quick-scan-found > div span,
.quick-scan-found > div small {
  color: #64748b;
}
.quick-scan-found .home-decision-actions {
  grid-column: 1 / -1;
}
.quick-writeoff-requests {
  display: grid;
  gap: 5px;
  padding-top: 2px;
}
.quick-writeoff-request {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff7f7;
}
.quick-writeoff-request > div:first-child {
  display: grid;
  gap: 2px;
}
.quick-writeoff-request small {
  color: #64748b;
}
.quick-writeoff-request > div:last-child {
  display: flex;
  gap: 5px;
}
.finance-default-method {
  border-color: #bfdbfe;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}
.finance-default-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.finance-default-buttons button.active {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}
.salary-advance-editor {
  width: min(680px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}
.salary-advance-editor::backdrop {
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(3px);
}
.salary-advance-editor form {
  display: grid;
  gap: 14px;
  padding: 20px;
}
.salary-advance-editor h2,
.salary-advance-editor p {
  margin: 0;
}
.salary-advance-editor .span-all {
  grid-column: 1 / -1;
}
@media (prefers-reduced-motion: reduce) {
  button.quick-action-button,
  button.quick-action-button::after,
  .quick-action-file .quick-file-plus {
    transition: none;
  }
  .quick-action-scan:hover .quick-scan-beam,
  .quick-action-confirm:hover .quick-preview-spark,
  .quick-action-button.recording {
    animation: none;
  }
}
@media (max-width: 920px) {
  .home-quick-capture-row {
    grid-template-columns: repeat(4, minmax(46px, 1fr));
  }
  .home-quick-capture-row > #command {
    grid-column: 1 / -1;
  }
  .home-quick-capture-row .quick-action-button {
    justify-self: center;
  }
  .quick-scan-found {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .quick-intake-preview-head,
  .quick-scanner-head,
  .quick-writeoff-request,
  .owner-assistant-answer > header {
    align-items: flex-start;
    flex-direction: column;
  }
  .quick-intake-preview-item,
  .quick-scan-found,
  .quick-scanner-manual,
  .owner-assistant-columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .owner-assistant-user {
    max-width: 94%;
  }
}
@media (max-width: 760px) {
  .owner-assistant-columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .owner-assistant-report-time {
    justify-items: start;
  }
}
.home-metric-unavailable {
  color: #92400e !important;
  font-size: 13px !important;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.home-metric.home-metric-unavailable {
  display: grid;
  border-color: #fed7aa;
  border-style: dashed;
  background: #fffbeb;
  color: inherit !important;
  font-size: inherit !important;
}
.home-metric.home-metric-unavailable b {
  color: #92400e;
  font-size: 18px;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 14px;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  text-align: left;
  color: #64748b;
  font-size: 12px;
  text-transform: uppercase;
  background: #f8fafc;
}
.table th,
.table td {
  padding: 10px;
  border-bottom: 1px solid #e2e8f0;
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
}
.pill.ok {
  background: #ecfdf5;
  color: #047857;
}
.pill.warn {
  background: #fff7ed;
  color: #c2410c;
}
.pill.bad {
  background: #fef2f2;
  color: #b91c1c;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.os-section-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.os-section-heading h2,
.os-section-heading h3 {
  margin: 0;
}
.os-edit-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 132px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid #d8e1ec;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
  color: #172033;
  box-shadow:
    0 1px 2px rgb(15 23 42 / 6%),
    0 6px 18px rgb(15 23 42 / 5%);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}
.os-edit-action::before {
  content: "✎";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #eaf1ff;
  color: #2563eb;
  font-size: 15px;
  line-height: 1;
}
.os-edit-action:hover {
  transform: translateY(-1px);
  border-color: #b8c6d8;
  box-shadow:
    0 2px 4px rgb(15 23 42 / 8%),
    0 9px 24px rgb(15 23 42 / 8%);
}
.os-edit-action:focus-visible {
  outline: 3px solid rgb(37 99 235 / 22%);
  outline-offset: 2px;
}
.os-edit-action[aria-pressed="true"] {
  border-color: #0f172a;
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 8px 22px rgb(15 23 42 / 20%);
}
.os-edit-action[aria-pressed="true"]::before {
  content: "✓";
  background: rgb(255 255 255 / 14%);
  color: #ffffff;
}
.os-edit-action:disabled {
  transform: none;
  opacity: 0.58;
  cursor: wait;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  align-items: end;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
}
.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}
.wb-data-passport .rare-tool-body {
  display: grid;
  gap: 12px;
}
.wb-data-passport .perm-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px 16px;
}
.wb-data-passport .perm-grid > div {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 3px;
}
.wb-data-passport .perm-grid span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}
.wb-data-passport .perm-grid b {
  min-width: 0;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.wb-data-passport .perm-grid .pill {
  justify-self: start;
  max-width: 100%;
  white-space: normal;
}
.wb-data-passport .muted {
  margin: 0;
}
.perm {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
}
.perm input {
  width: 16px;
  height: 16px;
}
.hidden {
  display: none;
}
.list {
  display: grid;
  gap: 8px;
}
.list-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
}
.list-item b {
  display: block;
  margin-bottom: 4px;
}

/* Employees and payroll: compact operational views, not raw admin tables. */
.employee-section-header h2,
.payroll-header h2,
.employee-roster h2,
.employee-methodology h2 {
  margin: 0 0 4px;
}
.employee-section-header p,
.payroll-header p,
.employee-roster p,
.employee-methodology p {
  margin: 0;
}
.employee-summary-metrics,
.payroll-summary-metrics {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 0;
}
.employee-summary-metrics .metric,
.payroll-summary-metrics .metric {
  min-height: 82px;
  padding: 10px 12px;
}
.employee-summary-metrics .metric b,
.payroll-summary-metrics .metric b {
  display: block;
  margin: 3px 0;
  font-size: 20px;
}
.employee-summary-metrics small,
.payroll-summary-metrics small,
.employee-roster td small,
.payroll-actions small {
  display: block;
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}
.employee-roster-table,
.payroll-progress-table,
.payroll-accrual-table {
  min-width: 860px;
}
.payroll-progress-table th,
.payroll-progress-table td {
  min-width: 108px;
  white-space: normal;
}
.payroll-progress-table th:first-child,
.payroll-progress-table td:first-child {
  min-width: 150px;
}
.payroll-progress-table th:last-child,
.payroll-progress-table td:last-child {
  min-width: 140px;
}
.payroll-progress-table td small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.3;
}
.payroll-progress-table td:first-child b {
  display: block;
}
.employee-roster td,
.employee-roster th {
  vertical-align: top;
}
.employee-roster td:first-child b {
  display: block;
}
.employee-tools,
.payroll-actions {
  padding: 0;
  overflow: hidden;
}
.employee-tools > summary,
.payroll-actions > summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  list-style-position: inside;
}
.employee-tools[open] > summary,
.payroll-actions[open] > summary {
  border-bottom: 1px solid #e2e8f0;
}
.employee-tools-body,
.payroll-actions-body {
  padding: 16px;
}
.employee-tool-section {
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}
.employee-tool-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.employee-tool-section h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
.payroll-period {
  grid-template-columns: 145px 145px auto;
  align-items: end;
}
.payroll-period label {
  min-width: 0;
}
.compact-button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}
@media (max-width: 760px) {
  .payroll-period {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }
  .payroll-period button {
    grid-column: 1 / -1;
  }
}
.mp-stock-panel {
  display: grid;
  gap: 10px;
}
.mp-stock-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(140px, 170px) minmax(
      170px,
      220px
    );
  gap: 8px;
  align-items: end;
}
.mp-stock-tools label {
  min-width: 0;
}
.mp-stock-tools input,
.mp-stock-tools select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.mp-stock-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.mp-stock-summary div {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px 10px;
}
.mp-stock-summary span {
  display: block;
  color: #64748b;
  font-size: 11px;
}
.mp-stock-summary b {
  display: block;
  font-size: 18px;
  margin-top: 1px;
}
.fbs-stock-section summary {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fbs-control-panel {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
}
.fbs-control-panel > :nth-child(-n + 3) {
  grid-column: span 4;
}
.fbs-control-panel > :nth-child(n + 4) {
  grid-column: span 2;
}
.fbs-control-panel > .fbs-mirror-mode-action {
  grid-column: span 4;
}
.fbs-control-panel label {
  min-width: 0;
}
.fbs-control-panel input,
.fbs-control-panel select,
.fbs-control-panel button {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.fbs-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
  font-weight: 800;
  color: #334155;
}
.fbs-switch input {
  width: 16px;
  height: 16px;
}
.fbs-stock-table th,
.fbs-stock-table td {
  vertical-align: middle;
}
.fbs-edit-cell {
  display: grid;
  grid-template-columns: minmax(70px, 92px) auto;
  gap: 6px;
  align-items: center;
}
.fbs-edit-cell input {
  width: 100%;
  min-width: 0;
}
.fbs-assembly-section summary {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fbs-assembly-settings {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.fbs-document-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}
.fbs-document-options > label {
  display: grid;
  gap: 3px;
  min-width: 185px;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-weight: 800;
}
.fbs-document-options > label small {
  color: #64748b;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}
.fbs-document-options > label.is-required {
  border-color: #c4b5fd;
  background: #faf5ff;
}
.fbs-document-options button {
  align-self: center;
}
.input-ok {
  outline: 2px solid #22c55e;
  background: #ecfdf5;
}
.mp-stock-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 8px;
  --mp-icon-size: 60px;
  --mp-identity-width: 94px;
}
.mp-stock-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  display: grid;
  gap: 7px;
}
.mp-stock-head {
  display: grid;
  grid-template-columns: var(--mp-identity-width) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.mp-stock-identity {
  width: var(--mp-identity-width);
  min-width: 0;
  display: grid;
  gap: 3px;
  justify-items: start;
  overflow: hidden;
}
.mp-stock-thumb {
  width: var(--mp-icon-size);
  height: var(--mp-icon-size);
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border: 1px solid #e2e8f0;
  display: grid;
  align-items: center;
  justify-items: center;
  color: #334155;
  line-height: 1;
  overflow: hidden;
  text-align: center;
}
.mp-stock-thumb-main,
.mp-stock-thumb-sub {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
  font-size: 17px;
  font-weight: 800;
  color: #334155;
}
.mp-stock-wb-art {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #64748b;
  font-size: 11px;
  line-height: 1.05;
  text-align: left;
}
.mp-stock-info {
  min-width: 0;
}
.mp-stock-list.icon-right .mp-stock-head {
  grid-template-columns: minmax(0, 1fr) var(--mp-identity-width);
}
.mp-stock-list.icon-right .mp-stock-identity {
  order: 2;
}
.mp-stock-list.icon-right .mp-stock-info {
  order: 1;
}
.mp-stock-list.icon-right .mp-stock-chevron {
  order: 3;
}
.mp-stock-list.icon-top .mp-stock-head {
  grid-template-columns: 1fr auto;
}
.mp-stock-list.icon-top .mp-stock-identity {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}
.mp-stock-list.icon-top .mp-stock-info {
  grid-column: 1;
}
.mp-stock-list.icon-hidden .mp-stock-head {
  grid-template-columns: minmax(0, 1fr) auto;
}
.mp-stock-list.icon-hidden .mp-stock-identity {
  display: none;
}
.mp-stock-title {
  font-weight: 700;
  font-size: 14px;
  color: #334155;
  overflow-wrap: anywhere;
}
.mp-stock-title-compact {
  color: #0f172a;
  font-size: 16px;
  line-height: 1.05;
  font-weight: 800;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-stock-meta {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 2px;
}
.mp-stock-meta-compact {
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-stock-chevron {
  color: #94a3b8;
  font-size: 24px;
  line-height: 1;
}
.mp-stock-lines {
  display: grid;
  gap: 3px;
}
.mp-stock-lines-inline {
  margin-top: 0;
  width: 100%;
  max-width: 230px;
  padding-top: 0;
}
.mp-stock-line {
  display: grid;
  grid-template-columns: auto minmax(20px, 1fr) auto;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  line-height: 1.18;
  align-items: end;
}
.mp-stock-line:after {
  display: none;
}
.mp-stock-line span:first-child {
  order: 1;
}
.mp-stock-line span:first-child {
  white-space: nowrap;
}
.mp-stock-line span:first-child:after {
  content: "";
}
.mp-stock-line:after {
  order: 2;
}
.mp-stock-line b {
  order: 3;
  color: #020617;
  font-size: 14px;
  white-space: nowrap;
  min-width: 44px;
  text-align: right;
}
.mp-stock-warehouses {
  border-top: 1px solid #eef2f7;
  padding-top: 5px;
  display: grid;
  gap: 4px;
}
.mp-stock-warehouses-title {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.mp-stock-warehouse-stickers {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: flex-start;
}
.mp-stock-warehouse-sticker {
  display: inline-grid;
  grid-template-columns: minmax(0, auto) auto;
  gap: 4px;
  max-width: 165px;
  align-items: center;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 999px;
  padding: 2px 7px;
  color: #334155;
  font-size: 10px;
  line-height: 1.1;
}
.mp-stock-warehouse-sticker b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  color: #475569;
}
.mp-stock-warehouse-sticker strong {
  white-space: nowrap;
  color: #020617;
  font-size: 11px;
}
.mp-stock-warehouse-sticker small {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-stock-warehouse-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
  font-size: 12px;
  color: #334155;
  padding: 5px 0;
  border-top: 1px solid #f8fafc;
}
.mp-stock-warehouse-row:first-of-type {
  border-top: 0;
}
.mp-stock-warehouse-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mp-stock-warehouse-row b {
  white-space: nowrap;
  color: #020617;
}
.mp-stock-warehouse-row small {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 11px;
}
.mp-warehouse-grid {
  display: grid;
  gap: 10px;
}
.mp-warehouse-cabinets {
  display: grid;
  gap: 12px;
}
.mp-warehouse-cabinet {
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #f8fafc;
}
.mp-warehouse-cabinet > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  color: #475569;
  font-size: 13px;
  font-weight: 750;
}
.mp-warehouse-cabinet > summary > span:first-child {
  display: grid;
  gap: 2px;
}
.mp-warehouse-cabinet > summary small {
  color: #64748b;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mp-warehouse-cabinet > summary b {
  color: #0f172a;
  font-size: 15px;
}
.mp-warehouse-cabinet > .mp-warehouse-grid {
  padding: 0 12px 12px;
}
.mp-warehouse-section {
  display: grid;
  gap: 10px;
}
.mp-marketplace-warehouse {
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
  display: grid;
  gap: 10px;
}
.mp-marketplace-warehouse h3 {
  margin: 0;
}
.mp-warehouse-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}
.mp-warehouse-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}
.mp-warehouse-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid #f1f5f9;
  font-size: 13px;
}
.mp-warehouse-row:first-of-type {
  border-top: 0;
}
.mp-warehouse-row b {
  text-align: right;
}
.stock-wb-summary-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 10px;
}
.stock-wb-summary-title h3 {
  margin: 0;
}
.stock-wb-summary-title > div:first-child {
  display: grid;
  gap: 2px;
}
.stock-wb-account-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.stock-wb-account-switcher button {
  min-height: 32px;
  height: auto;
  padding: 6px 10px;
  font-size: 12px;
}
.supply-note {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}
.supply-warehouse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.supply-warehouse-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  display: grid;
  gap: 3px;
}
.supply-warehouse-card b {
  color: #0f172a;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.supply-warehouse-card span {
  color: #020617;
  font-size: 15px;
  font-weight: 900;
}
.supply-warehouse-card small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}
.supply-decision-table td {
  vertical-align: top;
}
.supply-warehouse-chip {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 6px;
  align-items: center;
  width: 150px;
  max-width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 4px 6px;
  margin: 0 4px 4px 0;
  font-size: 10px;
  line-height: 1.15;
}
.supply-warehouse-chip b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #334155;
}
.supply-warehouse-chip strong {
  white-space: nowrap;
  color: #020617;
}
.supply-warehouse-chip small {
  grid-column: 1 / -1;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.supply-decision-table th:nth-child(6),
.supply-decision-table td:nth-child(6) {
  min-width: 180px;
  max-width: 360px;
}
.marketplace-supply-card-embedded {
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
}
.supply-draft-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  background: #f8fafc;
}
.supply-draft-add {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(130px, 0.6fr) auto;
  gap: 12px;
  align-items: end;
}
.supply-draft-quantity {
  min-width: 110px;
  max-width: 150px;
}
.supply-plan-list {
  display: grid;
  gap: 10px;
}
.supply-plan-row {
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}
.supply-plan-row > summary {
  display: grid;
  grid-template-columns:
    minmax(220px, 1.5fr) minmax(220px, 1fr) minmax(120px, 0.5fr)
    auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}
.supply-plan-row > summary::-webkit-details-marker {
  display: none;
}
.supply-plan-row > summary span:not(.pill) {
  display: grid;
  gap: 3px;
}
.supply-plan-row > summary small {
  color: #64748b;
}
.supply-plan-row[open] > summary {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.supply-plan-body {
  padding: 14px 18px 0;
}
.supply-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 18px 18px;
}
@media (max-width: 900px) {
  .supply-draft-add,
  .supply-plan-row > summary {
    grid-template-columns: 1fr;
  }
}
.home-block {
  position: relative;
}
.home-dashboard-grid {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: 14px;
  align-items: stretch;
}
.home-dashboard-grid > .home-block {
  grid-column: span 6 !important;
  align-self: stretch;
  min-width: 0;
  max-width: 100%;
  height: auto !important;
  overflow: visible !important;
  order: initial !important;
}
.home-dashboard-grid > .home-block[data-home-block="pulse"],
.home-dashboard-grid > .home-block[data-home-block="metrics"],
.home-dashboard-grid > .home-block[data-home-block="quick"] {
  grid-column: span 12 !important;
}
.home-dashboard-grid > .home-block[data-home-block="financeResult"] {
  grid-column: span 7 !important;
}
.home-dashboard-grid > .home-block[data-home-block="aiChat"] {
  grid-column: span 12 !important;
}
.home-dashboard-grid > .home-block[data-home-block="briefing"],
.home-dashboard-grid > .home-block[data-home-block="attention"] {
  grid-column: span 5 !important;
}
.home-dashboard-grid > .home-block > .card,
.home-dashboard-grid > .home-block > .home-pulse-card,
.home-dashboard-grid > .home-block > .home-decision-card,
.home-dashboard-grid > .home-block > .home-command-card {
  box-sizing: border-box;
  height: 100%;
}
.home-dashboard-grid .card,
.home-dashboard-grid .metric,
.home-dashboard-grid .ai-chat-shell {
  min-width: 0;
}
.home-controls {
  display: none;
  gap: 4px;
  margin-bottom: 8px;
}
.home-controls {
  align-items: center;
}
.home-edit .home-controls {
  display: flex;
}
.home-edit .home-block {
  outline: 1px dashed #94a3b8;
  outline-offset: 4px;
  border-radius: 8px;
  cursor: grab;
  touch-action: none;
  transition:
    opacity 0.16s ease,
    box-shadow 0.16s ease;
}
.home-edit .home-block.home-block-hidden {
  opacity: 0.48;
  filter: grayscale(0.35);
}
.home-visibility-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  cursor: pointer;
}
.home-visibility-toggle small {
  color: #64748b;
  font-weight: 700;
}
.home-edit .home-block.dragging {
  cursor: grabbing;
  opacity: 0.55;
}
.home-edit .home-block-drop-before,
.home-edit .home-block-drop-after {
  box-shadow: 0 0 0 4px rgb(15 23 42 / 20%);
}
.view-widget-grid,
.mp-widget-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.view-widget-grid > .view-widget,
.mp-widget-grid [data-mp-widget] {
  grid-column: span var(--view-widget-span, var(--mp-widget-span, 12));
  min-width: 0;
}
.view-widget {
  position: relative;
}
.view-layout-edit .view-widget {
  outline: 1px dashed #94a3b8;
  outline-offset: 4px;
  border-radius: 8px;
  cursor: grab;
  touch-action: none;
}
.view-layout-edit .view-widget.dragging {
  opacity: 0.58;
}
.view-layout-edit .view-widget-drop-before {
  box-shadow: 0 -4px 0 #7c3aed;
}
.view-layout-edit .view-widget-drop-after {
  box-shadow: 0 4px 0 #7c3aed;
}
.view-widget-grip {
  display: none;
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #64748b;
  cursor: nwse-resize;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  z-index: 3;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.view-widget-badge {
  display: none;
  position: absolute;
  right: 28px;
  bottom: 5px;
  z-index: 3;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #020617;
  color: #fff;
  font-size: 10px;
  align-items: center;
}
.view-layout-edit .view-widget-grip,
.view-layout-edit .view-widget-badge {
  display: flex;
}
.mp-widget-size-compact {
  --mp-widget-span: 4;
}
.mp-widget-size-normal {
  --mp-widget-span: 6;
}
.mp-widget-size-wide {
  --mp-widget-span: 8;
}
.mp-widget-size-full {
  --mp-widget-span: 12;
}
.mp-widget-grid:not(.view-widget-grid) > [data-mp-widget] {
  grid-column: span var(--mp-widget-span, 12) !important;
  height: auto !important;
  overflow: visible !important;
}
.wb-hidden-widget {
  display: none !important;
}
.mp-widget-edit [data-mp-widget] {
  min-height: 120px;
}
.mp-widget-settings {
  display: grid;
  gap: 8px;
}
.mp-widget-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
}
.mp-widget-toggle input {
  width: 16px;
  height: 16px;
}
.stock-supply-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 4px 0 2px;
}
.wb-stock-workspace {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: #f6f7fb;
  border: 1px solid #eef2f7;
}
.wb-stock-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wb-stock-headline h2 {
  margin: 0;
  color: #050816;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: 0;
}
.wb-stock-headline p {
  margin: 6px 0 0;
  max-width: 760px;
}
.wb-stock-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.wb-stock-actions button {
  min-height: 42px;
  border-radius: 12px;
  padding: 0 16px;
}
.wb-stock-actions button:first-child {
  background: #8b3dff;
  color: #fff;
  border-color: #8b3dff;
}
.wb-stock-filters {
  display: grid;
  grid-template-columns: 150px 210px 180px auto minmax(260px, 1fr);
  gap: 10px;
  align-items: end;
}
.wb-stock-filter {
  margin: 0;
  min-width: 0;
  display: grid;
  gap: 4px;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
}
.wb-stock-filter select {
  width: 100%;
  height: 42px;
  min-width: 0;
  border: 0;
  border-radius: 12px;
  background: #e9e9ef;
  color: #111827;
  font-weight: 850;
  padding: 0 34px 0 12px;
}
.wb-stock-filter-button {
  height: 42px;
  border-radius: 12px;
  background: #e9e9ef;
  color: #111827;
  font-weight: 900;
}
.wb-stock-search {
  align-self: end;
}
.wb-stock-search input {
  width: 100%;
  height: 42px;
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
  font-weight: 700;
}
.wb-stock-warehouse-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #edf0f6;
  padding: 16px 18px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}
.wb-stock-warehouse-card h3 {
  margin: 0 0 8px;
  color: #050816;
  font-size: 22px;
}
.wb-stock-logistics-summary {
  flex: 1 1 720px;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr)) auto;
  gap: 8px;
  max-width: 920px;
}
.wb-stock-logistics-model {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 86px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
}
.wb-stock-logistics-model > span {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
}
.wb-stock-logistics-model b {
  color: #0f172a;
  font-size: 16px;
  white-space: nowrap;
}
.wb-stock-logistics-model strong {
  color: #334155;
  font-size: 12px;
}
.wb-stock-logistics-model small,
.wb-stock-logistics-meta small {
  color: #64748b;
  font-size: 10px;
}
.wb-stock-logistics-model.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.wb-stock-logistics-model.ok b {
  color: #065f46;
}
.wb-stock-logistics-model.warn {
  border-color: #fed7aa;
  background: #fff7ed;
}
.wb-stock-logistics-model.warn b {
  color: #9a3412;
}
.wb-stock-logistics-meta {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 7px;
  min-width: 132px;
  padding: 8px 0 8px 4px;
}
.rare-tools {
  display: grid;
  gap: 10px;
}
.rare-tool {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0;
  overflow: hidden;
}
.rare-tool summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  font-weight: 700;
  color: #334155;
}
.rare-tool summary::marker {
  content: "";
  display: none;
}
.rare-tool summary::-webkit-details-marker {
  display: none;
}
.ad-rules-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
}
.ad-rule-card {
  display: grid;
  grid-template-columns:
    120px minmax(180px, 1.4fr) minmax(135px, 0.8fr) minmax(110px, 0.55fr)
    minmax(150px, 0.85fr) minmax(125px, 0.65fr) auto;
  gap: 8px;
  align-items: end;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}
.ad-rule-card.disabled {
  opacity: 0.64;
}
.ad-rule-card label {
  margin: 0;
}
.ad-rule-enable {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}
.ad-rule-enable input {
  width: 16px;
  height: 16px;
}
.ad-rule-actions {
  display: flex;
  gap: 6px;
  align-items: end;
  justify-content: flex-end;
}
.ad-rule-create {
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
}
.ad-rule-create h3 {
  margin: 0 0 8px;
}
.ad-guardrails-body {
  display: grid;
  gap: 12px;
}
.ad-guardrail-intro,
.ad-guardrail-save {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.ad-guardrail-intro > div {
  display: grid;
  gap: 3px;
}
.ad-guardrail-intro b {
  color: #0f172a;
  font-size: 16px;
}
.ad-guardrail-intro span,
.ad-guardrail-save p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}
.ad-guardrail-owner {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e !important;
  padding: 5px 9px;
  font-weight: 850;
}
.ad-cpo-zones {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}
.ad-cpo-zones span {
  display: grid;
  gap: 2px;
  min-width: 0;
  border-radius: 8px;
  padding: 8px 9px;
  color: #334155;
  font-size: 11px;
  font-weight: 750;
}
.ad-cpo-zones b {
  font-size: 12px;
}
.ad-cpo-zones .excellent {
  background: #dcfce7;
  color: #166534;
}
.ad-cpo-zones .target {
  background: #d1fae5;
  color: #047857;
}
.ad-cpo-zones .warning {
  background: #fef3c7;
  color: #92400e;
}
.ad-cpo-zones .critical {
  background: #ffedd5;
  color: #c2410c;
}
.ad-cpo-zones .stop {
  background: #fee2e2;
  color: #b91c1c;
}
.ad-guardrail-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.ad-stock-stop-toggle {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px !important;
  border-radius: 8px;
  background: #fff;
  padding: 9px;
  font-size: 11px !important;
}
.ad-stock-stop-toggle input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
}
.ad-stock-stop-toggle span {
  display: grid;
  gap: 3px;
}
.ad-stock-stop-toggle small {
  color: #64748b;
  line-height: 1.35;
}
.ad-settings-center-subsection:empty {
  display: none;
}
.ad-settings-center-subsection > .rare-tool {
  margin: 0;
}
.ad-settings-center-subsection > .ad-trusted-autopilot {
  background: #f0fdf4;
}
.ad-governance > .rare-tool-body {
  display: grid;
  gap: 12px;
}
.ad-governance-head,
.ad-phrase-filter {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ad-governance-head h3,
.ad-governance-head p {
  margin: 0;
}
.ad-governance-head > div {
  display: grid;
  gap: 4px;
  max-width: 820px;
}
.ad-phrase-filter {
  align-items: center;
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px 10px;
  color: #64748b;
  font-size: 11px;
}
.ad-phrase-filter label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-weight: 800;
}
.ad-phrase-filter select {
  min-width: 210px;
}
.ad-phrase-first-table {
  min-width: 1320px;
}
.ad-phrase-first-table td:first-child {
  min-width: 190px;
}
.ad-phrase-first-table td:first-child .pill {
  margin-left: 6px;
}
.ad-phrase-first-table tr.has-conflict td {
  background: #fffbeb;
}
.ad-phrase-first-table td.positive {
  color: #15803d;
  font-weight: 850;
}
.ad-phrase-first-table td.warning {
  color: #b45309;
  font-weight: 850;
}
.ad-phrase-first-table td.negative {
  color: #dc2626;
  font-weight: 850;
}

.ad-campaign-phrase-center {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border, #dbe3ee);
}
.ad-stat-detail > .ad-campaign-phrase-center {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.ad-campaign-phrase-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.ad-campaign-phrase-head h3,
.ad-campaign-phrase-head p {
  margin: 0;
}
.ad-campaign-phrase-head label {
  min-width: 210px;
}
@media (max-width: 900px) {
  .ad-campaign-phrase-head {
    align-items: stretch;
    flex-direction: column;
  }
}
.ad-phrase-first-table details summary {
  cursor: pointer;
  color: #2563eb;
  font-weight: 750;
}
.ad-phrase-first-table details small {
  display: block;
  max-width: 260px;
  padding-top: 5px;
  color: #64748b;
  line-height: 1.35;
}
.ad-governance-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ad-governance-columns > section {
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 10px;
}
.ad-governance-columns article {
  display: grid;
  gap: 5px;
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px;
}
.ad-governance-columns article small,
.ad-governance-columns article span {
  color: #64748b;
  line-height: 1.4;
}
.ad-governance-columns pre {
  max-height: 220px;
  overflow: auto;
  border-radius: 7px;
  background: #0f172a;
  color: #e2e8f0;
  padding: 8px;
  white-space: pre-wrap;
  font-size: 10px;
}
@media (max-width: 900px) {
  .ad-governance-columns {
    grid-template-columns: 1fr;
  }
}
.ad-guardrail-groups section {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
  padding: 10px;
}
.ad-guardrail-groups h4 {
  margin: 0 0 8px;
  color: #334155;
}
.ad-guardrail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.ad-guardrail-fields label {
  min-width: 0;
  margin: 0;
  font-size: 10px;
}
.ad-guardrail-fields label > span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ad-guardrail-fields input {
  min-width: 0;
  height: 32px;
}
.ad-guardrail-fields em {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
.ad-cpo-global-note {
  display: grid;
  gap: 2px;
  max-width: 420px;
  border-radius: 7px;
  background: #ecfdf5;
  color: #047857;
  padding: 7px 9px;
  font-size: 11px;
}
.ad-boost-body {
  display: grid;
  gap: 12px;
}
.ad-boost-summary {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-left: 8px;
}
.ad-boost-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #c4b5fd;
  border-radius: 10px;
  background: linear-gradient(135deg, #f5f3ff, #eff6ff);
  padding: 11px 12px;
}
.ad-boost-intro > div:first-child {
  display: grid;
  gap: 3px;
}
.ad-boost-intro b {
  color: #312e81;
}
.ad-boost-intro span {
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}
.ad-boost-limits {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}
.ad-boost-limits span {
  display: grid;
  min-width: 96px;
  border-radius: 8px;
  background: #fff;
  padding: 7px 9px;
  box-shadow: 0 1px 2px rgb(15 23 42 / 8%);
}
.ad-boost-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.ad-boost-table {
  width: 100%;
  min-width: 1560px;
  border-collapse: collapse;
  background: #fff;
  font-size: 12px;
}
.ad-boost-table th,
.ad-boost-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}
.ad-boost-table th {
  background: #f8fafc;
  color: #64748b;
  font-size: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.ad-boost-table td:first-child {
  min-width: 210px;
}
.ad-boost-table td:nth-child(11) {
  min-width: 270px;
}
.ad-boost-table td small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  line-height: 1.35;
}
.ad-boost-decision {
  display: inline-flex;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 850;
}
.ad-boost-decision.growth,
.ad-boost-decision.normal {
  background: #dcfce7;
  color: #166534;
}
.ad-boost-decision.warning,
.ad-boost-decision.stock_block,
.ad-boost-decision.conversion_problem {
  background: #fef3c7;
  color: #92400e;
}
.ad-boost-decision.approval,
.ad-boost-decision.stop,
.ad-boost-decision.card_problem {
  background: #fee2e2;
  color: #b91c1c;
}
.ad-boost-handoff {
  color: #7c3aed !important;
  font-weight: 800;
}
.ad-boost-data-row .text-danger {
  color: #b91c1c;
}
.ad-boost-data-row .text-success {
  color: #047857;
}
.ad-boost-edit-row td {
  background: #f8fafc;
  padding: 7px 9px 10px;
}
.ad-boost-edit-grid,
.ad-boost-create-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 7px;
  align-items: end;
}
.ad-boost-edit-grid label,
.ad-boost-create-grid label {
  min-width: 0;
  margin: 0;
  font-size: 10px;
}
.ad-boost-edit-grid input,
.ad-boost-edit-grid select,
.ad-boost-create-grid input,
.ad-boost-create-grid select {
  min-width: 0;
  height: 34px;
}
.ad-boost-checkbox {
  display: flex !important;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  color: #475569;
  font-size: 11px !important;
  font-weight: 800;
}
.ad-boost-checkbox input {
  width: 16px;
  height: 16px;
}
.ad-boost-create {
  border: 1px dashed #a78bfa;
  border-radius: 9px;
  background: #fafafa;
}
.ad-boost-create > summary {
  cursor: pointer;
  padding: 10px 12px;
  color: #5b21b6;
  font-weight: 850;
}
.ad-boost-create-grid {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  padding: 0 12px 12px;
}
.ad-boost-wide {
  grid-column: span 2;
}
.ad-boost-empty {
  display: grid;
  gap: 3px;
  padding: 18px;
  text-align: center;
}
.ad-boost-empty span {
  color: #64748b;
}
.ad-campaign-boost-subsection {
  margin-top: 2px;
}
.ad-campaign-boost-body {
  gap: 7px;
  padding: 9px 10px 10px;
}
.ad-campaign-boost-body > p {
  margin: 0;
  font-size: 11px;
}
.ad-campaign-boost-list {
  display: grid;
  gap: 5px;
}
.ad-campaign-boost-empty {
  padding: 7px 9px;
  border-radius: 8px;
  background: #f8fafc;
}
.ad-campaign-boost-item {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.ad-campaign-boost-item > summary {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(120px, auto);
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  cursor: pointer;
  list-style: none;
}
.ad-campaign-boost-item > summary::-webkit-details-marker {
  display: none;
}
.ad-campaign-boost-item > summary > span:first-child {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.ad-campaign-boost-item > summary > span:first-child b,
.ad-campaign-boost-item > summary > span:first-child small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ad-campaign-boost-item > summary > span:nth-child(2) {
  display: grid;
  gap: 1px;
  color: #334155;
  font-size: 11px;
}
.ad-campaign-boost-item > summary small {
  color: #64748b;
  font-size: 10px;
}
.ad-campaign-boost-edit {
  display: grid;
  grid-template-columns: repeat(4, minmax(105px, 1fr));
  gap: 6px;
  align-items: end;
  border-top: 1px solid #eef2f7;
  background: #f8fafc;
  padding: 8px;
}
.ad-campaign-boost-edit label,
.ad-campaign-boost-create-grid label {
  min-width: 0;
  margin: 0;
  font-size: 10px;
}
.ad-campaign-boost-edit input,
.ad-campaign-boost-edit select,
.ad-campaign-boost-create-grid input,
.ad-campaign-boost-create-grid select {
  min-width: 0;
  min-height: 32px;
  height: 32px;
}
.ad-campaign-boost-create {
  border: 1px dashed #c4b5fd;
  border-radius: 8px;
  background: #fafafa;
}
.ad-campaign-boost-create > summary {
  padding: 7px 9px;
  color: #6d28d9;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
}
.ad-campaign-boost-create-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 6px;
  align-items: end;
  padding: 2px 9px 9px;
}
.ad-campaign-boost-create-grid .wide {
  grid-column: span 2;
}
@media (max-width: 1500px) {
  .ad-guardrail-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ad-boost-create-grid {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
  }
}
@media (max-width: 1180px) {
  .ad-guardrail-groups {
    grid-template-columns: 1fr;
  }
  .ad-rule-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ad-rule-actions {
    justify-content: flex-start;
  }
  .ad-boost-intro {
    grid-template-columns: 1fr;
  }
  .ad-boost-limits {
    justify-content: flex-start;
  }
  .ad-boost-edit-grid,
  .ad-boost-create-grid,
  .ad-campaign-boost-edit,
  .ad-campaign-boost-create-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .ad-cpo-zones {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ad-guardrail-intro,
  .ad-guardrail-save {
    align-items: stretch;
    flex-direction: column;
  }
  .ad-boost-edit-grid,
  .ad-boost-create-grid,
  .ad-campaign-boost-edit,
  .ad-campaign-boost-create-grid {
    grid-template-columns: 1fr;
  }
  .ad-boost-wide {
    grid-column: auto;
  }
  .ad-campaign-boost-create-grid .wide {
    grid-column: auto;
  }
  .ad-campaign-boost-item > summary {
    grid-template-columns: 1fr auto;
  }
  .ad-campaign-boost-item > summary .ad-boost-decision {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

/* Command Center: event -> decision -> action -> measured result. */
.command-center {
  display: grid;
  gap: 16px;
}
.command-work-queue {
  display: grid;
  gap: 12px;
}
.command-work-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.command-item-button {
  width: 100%;
  min-width: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.command-item-button:hover {
  border-color: #94a3b8;
  box-shadow: 0 8px 24px rgb(15 23 42 / 10%);
  transform: translateY(-1px);
}
.command-item-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #e2e8f0;
}
.command-item-next span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.command-item-next b {
  color: #1d4ed8;
  font-size: 12px;
}
.command-history {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}
.command-history > summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 850;
}
.command-history > summary small {
  color: #64748b;
  font-weight: 650;
}
.command-history[open] > summary {
  border-bottom: 1px solid #e2e8f0;
}
.command-history > .command-flow,
.command-history > .command-chains {
  margin: 14px;
}
.command-item-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(620px, calc(100vw - 28px));
  padding: 22px;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgb(15 23 42 / 28%);
}
.command-item-dialog::backdrop {
  background: rgb(15 23 42 / 48%);
}
.command-item-explanation {
  display: grid;
  gap: 9px;
}
.command-item-explanation section {
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: #f8fafc;
}
.command-item-explanation section > span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.command-item-explanation p {
  margin: 0;
  color: #334155;
  line-height: 1.45;
}
@media (max-width: 760px) {
  .command-work-list {
    grid-template-columns: 1fr;
  }
  .command-history > summary {
    display: grid;
  }
}

.command-center-head,
.command-stage-head,
.command-item-head,
.command-item-meta,
.command-head-actions,
.command-center-foot {
  display: flex;
  align-items: center;
}

.command-center-head {
  justify-content: space-between;
  gap: 24px;
}

.command-center-head h2,
.command-stage-head h3,
.command-item h4 {
  margin: 0;
}

.command-center-head p,
.command-stage-head p,
.command-item p {
  margin: 4px 0 0;
  color: var(--muted);
}

.command-eyebrow {
  margin-bottom: 4px;
  color: #5b45cc;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.command-head-actions {
  flex: 0 0 auto;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.command-attention-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(250px, 1.25fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel, #fff);
  overflow: hidden;
}

.command-attention-cell {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 14px;
  min-height: 92px;
  padding: 16px;
  border-right: 1px solid var(--line);
}

.command-attention-cell:last-child {
  border-right: 0;
}

.command-attention-cell > span,
.command-attention-cell small {
  color: var(--muted);
}

.command-attention-cell > strong {
  font-size: 24px;
}

.command-attention-cell small {
  grid-column: 1 / -1;
}

.command-attention-cell.is-danger strong,
.command-item.is-danger h4 {
  color: #b42318;
}

.command-attention-cell.is-warning strong,
.command-item.is-warning h4 {
  color: #a15c00;
}

.command-attention-cell.is-success strong,
.command-item.is-success h4 {
  color: #16794a;
}

.command-risk-cell {
  grid-template-columns: 1fr auto auto;
}

.command-risk-cell > strong {
  grid-column: 1 / 2;
}

.command-risk-estimate {
  color: #72530d !important;
  font-weight: 700;
}

.command-change-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
  border-block: 1px solid var(--line);
  overflow-x: auto;
  white-space: nowrap;
}

.command-change {
  padding: 5px 8px;
  border-radius: 6px;
  background: #f1f3f8;
  font-size: 13px;
}

.command-change-empty {
  color: var(--muted);
  font-size: 13px;
}

.command-chains {
  display: grid;
  gap: 10px;
}

.command-section-title,
.command-chain > header,
.command-chain-stages,
.command-chain-stage {
  display: flex;
  align-items: center;
}

.command-section-title {
  justify-content: space-between;
  gap: 16px;
}

.command-section-title h3,
.command-section-title p {
  margin: 0;
}

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

.command-section-title > span {
  padding: 5px 9px;
  border-radius: 6px;
  background: #f1f3f8;
  font-weight: 800;
}

.command-chain-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.command-chain {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-left: 4px solid #e7a324;
  border-radius: 7px;
  background: var(--panel, #fff);
}

.command-chain.is-complete {
  border-left-color: #249864;
}

.command-chain > header {
  justify-content: space-between;
  gap: 12px;
}

.command-chain > header div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.command-chain > header small,
.command-chain > header time,
.command-chain-stage small {
  color: var(--muted);
  font-size: 11px;
}

.command-chain > header small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-chain-stages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.command-chain-stage {
  min-width: 0;
  gap: 7px;
  padding: 7px;
  border-radius: 6px;
  background: #f6f7fa;
}

.command-chain-stage > span {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 50%;
  background: #dfe3ec;
  font-size: 11px;
  font-weight: 800;
}

.command-chain-stage.has-value > span {
  background: #151a2d;
  color: #fff;
}

.command-chain-stage div {
  display: grid;
  min-width: 0;
}

.command-chain-stage small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
  min-width: 0;
}

.command-stage {
  min-width: 0;
}

.command-stage-head {
  align-items: flex-start;
  gap: 10px;
  min-height: 74px;
  padding: 8px 6px 10px;
  border-bottom: 2px solid #dfe3ec;
}

.command-stage-head > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: #151a2d;
  color: #fff;
  font-weight: 800;
}

.command-stage-head h3 {
  font-size: 18px;
}

.command-stage-head p {
  font-size: 12px;
  line-height: 1.35;
}

.command-stage-list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 620px;
  padding-top: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.command-item {
  display: grid;
  gap: 7px;
  padding: 11px;
  border: 1px solid var(--line);
  border-left: 4px solid #a9b0c0;
  border-radius: 7px;
  background: var(--panel, #fff);
}

.command-item.is-danger {
  border-left-color: #d92d20;
}
.command-item.is-warning {
  border-left-color: #e7a324;
}
.command-item.is-success {
  border-left-color: #249864;
}

.command-item-head,
.command-item-meta {
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.command-status {
  font-weight: 800;
}

.command-item h4 {
  font-size: 14px;
  line-height: 1.3;
}

.command-item p {
  display: -webkit-box;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.command-item-meta {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.command-money {
  margin-left: auto;
  color: #72530d;
  font-weight: 800;
}

.command-money.is-confirmed {
  color: #b42318;
}

.command-empty,
.command-loading {
  padding: 24px 12px;
  color: var(--muted);
  text-align: center;
}

.command-loading {
  display: grid;
  gap: 6px;
  min-height: 220px;
  place-content: center;
}

.command-center-foot {
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.command-center-foot span {
  padding: 5px 8px;
  border-radius: 6px;
  background: #f1f3f8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .command-flow {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

@media (max-width: 780px) {
  .command-center-head,
  .command-head-actions {
    align-items: flex-start;
    flex-direction: column;
  }
  .command-attention-band,
  .command-flow,
  .command-chain-stages {
    grid-template-columns: 1fr;
  }
  .command-attention-cell {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .command-attention-cell:last-child {
    border-bottom: 0;
  }
  .command-stage-list {
    max-height: 420px;
  }
}

.certification-page {
  display: grid;
  gap: 18px;
}

.certification-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.certification-hero h2,
.certification-hero p {
  margin: 0;
}

.certification-hero h2 {
  margin-top: 4px;
  font-size: 30px;
}

.certification-hero p {
  max-width: 720px;
  margin-top: 6px;
  color: var(--muted);
}

.section-eyebrow {
  color: #5b34da;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.compact-select {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.compact-select select {
  min-width: 220px;
}

.certification-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

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

.certification-directions > button {
  display: grid;
  justify-items: start;
  gap: 6px;
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-align: left;
  background: var(--panel, #fff);
}

.certification-directions > button:hover {
  border-color: #8b5cf6;
  background: #fbfaff;
}

.certification-directions span {
  font-size: 18px;
  font-weight: 800;
}

.certification-directions b {
  color: var(--muted);
  font-weight: 600;
}

.certification-directions small {
  color: #5b34da;
  font-weight: 800;
}

.certification-ip-direction {
  border-left: 4px solid #7c3aed !important;
}

.certification-summary > div {
  display: grid;
  gap: 6px;
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel, #fff);
}

.certification-summary span,
.certification-detail-grid span {
  color: var(--muted);
  font-size: 13px;
}

.certification-summary b {
  font-size: 26px;
}

.certification-workspace {
  min-height: 360px;
}

.certification-workspace.is-loading {
  opacity: 0.68;
  pointer-events: none;
}

.certification-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.certification-tabs button {
  flex: 0 0 auto;
  color: var(--text);
  background: transparent;
}

.certification-tabs button.active {
  background: #111827;
  color: #fff;
}

.certification-list {
  display: grid;
}

.certification-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.5fr) auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 16px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  text-align: left;
  background: transparent;
}

.certification-row:hover {
  background: var(--panel-soft, #f8f9fc);
}

.certification-row > span:not(.pill) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.certification-row small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 6px;
  padding: 42px 4px;
  color: var(--muted);
}

.empty-state b {
  color: var(--text);
  font-size: 20px;
}

.certification-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

.certification-ip-dialog {
  width: min(860px, calc(100vw - 32px));
}

.certification-ip-dialog .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.certification-ip-dialog .form-grid .wide {
  grid-column: 1 / -1;
}

.certification-ip-dialog input,
.certification-ip-dialog select,
.certification-ip-dialog textarea {
  width: 100%;
  min-width: 0;
}

.certification-dialog::backdrop {
  background: rgb(15 23 42 / 45%);
}

.dialog-head,
.dialog-actions,
.certification-message-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-head {
  align-items: flex-start;
  margin-bottom: 18px;
}

.dialog-head h2,
.dialog-head p {
  margin: 0;
}

.dialog-head p {
  margin-top: 5px;
  color: var(--muted);
}

.dialog-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

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

.certification-detail-grid > div {
  display: grid;
  gap: 5px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.certification-attention {
  margin: 12px 0;
  padding: 12px;
  border-left: 4px solid #dc2626;
  background: #fff7f7;
}

.certification-ip-note {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 12px;
  border-left: 4px solid #7c3aed;
  background: #f7f4ff;
}

.certification-ip-note span {
  color: var(--muted);
  line-height: 1.45;
}

.certification-ip-details {
  margin-bottom: 18px;
}

.certification-ip-details h3 {
  margin: 0 0 4px;
}

.certification-attention p {
  margin: 4px 0 0;
}

.certification-messages {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.certification-messages > div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.certification-messages small {
  color: var(--muted);
}

.certification-message-form {
  margin-top: 14px;
}

.certification-message-form input {
  flex: 1;
}

@media (max-width: 760px) {
  .certification-hero,
  .certification-hero > .row {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-select select {
    min-width: 0;
    width: 100%;
  }

  .certification-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .certification-directions {
    grid-template-columns: 1fr;
  }

  .certification-row {
    grid-template-columns: 1fr auto;
  }

  .certification-row > span:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .certification-detail-grid {
    grid-template-columns: 1fr;
  }

  .certification-ip-dialog .form-grid {
    grid-template-columns: 1fr;
  }

  .certification-ip-dialog .form-grid .wide {
    grid-column: auto;
  }

  .certification-message-form,
  .certification-messages > div {
    align-items: stretch;
    grid-template-columns: 1fr;
  }
}
.review-auto-section {
  background: #fff;
}
.review-rating-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(105px, 1fr));
  gap: 7px;
  margin: 10px 0 12px;
}
.review-ai-worker {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 8px;
  margin: 10px 0;
}
.review-ai-worker > div {
  display: grid;
  gap: 3px;
  border: 1px solid #dbeafe;
  border-radius: 9px;
  background: #f0f9ff;
  color: #334155;
  padding: 9px 10px;
  font-size: 12px;
}
.review-ai-worker span {
  color: #64748b;
  line-height: 1.35;
}
.review-rating-summary button {
  display: grid;
  gap: 3px;
  min-height: 58px;
  border: 1px solid #dbe3ee;
  border-radius: 9px;
  background: #f8fafc;
  color: #475569;
  padding: 8px 10px;
  text-align: left;
}
.review-rating-summary button span {
  font-size: 11px;
  font-weight: 700;
}
.review-rating-summary button b {
  color: #0f172a;
  font-size: 20px;
}
.review-rating-summary button.active {
  border-color: #a5b4fc;
  background: #eef2ff;
}
.review-rating-summary .review-total {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.wb-review-complaints {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.wb-review-complaints > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.wb-review-complaints button {
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #fff1f2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
}
.review-auto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.review-panel {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 10px;
  min-width: 0;
}
.review-panel h3,
.review-queue-section h3,
.review-complaints h3 {
  margin: 0;
}
.review-policy-grid {
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
}
.review-permissions {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.review-check {
  align-items: center;
  font-size: 12px;
}
.review-critical-rules {
  display: grid;
  gap: 3px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.35;
}
.review-test-result {
  min-height: 22px;
}
.review-queue-section {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.review-moderation-list {
  display: grid;
  gap: 8px;
  max-height: min(720px, 68vh);
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 3px;
}
.review-moderation-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  min-width: 0;
}
@media (max-width: 980px) {
  .review-rating-summary {
    grid-template-columns: repeat(3, minmax(105px, 1fr));
  }
  .review-ai-worker {
    grid-template-columns: 1fr;
  }
}
.review-moderation-card-head {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto minmax(140px, 180px);
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef2f7;
}
.review-moderation-card-head select {
  width: 100%;
  min-width: 0;
}
.review-row-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.review-row-title b {
  overflow-wrap: anywhere;
}
.review-row-title span,
.review-field-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}
.review-rating {
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}
.review-moderation-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) minmax(150px, 0.75fr);
  gap: 8px 14px;
  padding-top: 8px;
}
.review-moderation-grid section {
  min-width: 0;
}
.review-moderation-grid p {
  margin: 3px 0 0;
  color: #334155;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.review-moderation-wide {
  grid-column: 1 / -1;
}
@media (max-width: 900px) {
  .review-moderation-card-head,
  .review-moderation-grid {
    grid-template-columns: 1fr;
  }
  .review-moderation-wide {
    grid-column: auto;
  }
}
.wb-partner-shell {
  position: relative;
  z-index: 3;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  overflow: visible;
}
.wb-partner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid #eef2f7;
}
.wb-partner-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  height: auto;
  cursor: pointer;
}
.wb-partner-brand span {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #6d28d9, #db2777);
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 8px 18px rgba(109, 40, 217, 0.18);
}
.wb-partner-brand b {
  color: #0f172a;
  font-size: 18px;
  white-space: nowrap;
}
.wb-partner-status {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.wb-partner-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  overflow: visible;
}
.wb-nav-item {
  position: relative;
}
.wb-nav-button {
  height: 42px;
  border-radius: 10px;
  padding: 0 14px;
  background: #fff;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}
.wb-nav-item.active .wb-nav-button,
.wb-nav-item:hover .wb-nav-button,
.wb-nav-item:focus-within .wb-nav-button {
  background: #e5e7eb;
}
.wb-mega-menu {
  position: fixed;
  left: var(--wb-mega-left, 12px);
  top: var(--wb-mega-top, 96px);
  width: var(--wb-mega-width, min(900px, calc(100vw - 24px)));
  min-width: 0;
  max-width: calc(100vw - 24px);
  max-height: var(--wb-mega-max-height, calc(100vh - 24px));
  overflow: auto;
  display: none;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
  padding: 20px;
  z-index: 80;
  overscroll-behavior: contain;
}
.wb-mega-menu.open-up {
  box-shadow: 0 -18px 50px rgba(15, 23, 42, 0.14);
}
.wb-nav-item.menu-open .wb-mega-menu {
  display: block;
}
.wb-mega-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
}
.wb-mega-column {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}
.wb-mega-column h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 16px;
}
.wb-account-menu {
  position: relative;
  margin-left: auto;
}
.wb-account-menu > summary {
  list-style: none;
  min-height: 40px;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  padding: 0 12px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid #e2e8f0;
}
.wb-account-menu > summary::-webkit-details-marker {
  display: none;
}
.wb-account-menu > summary b {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(180deg);
  transform-origin: center;
}
.wb-account-menu[open] > summary b {
  transform: rotate(0deg);
}
.top-wb-account-slot {
  position: relative;
  order: -1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-wb-account-slot .wb-account-menu {
  margin-left: 0;
}
.top-wb-account-slot .wb-account-menu > summary {
  background: #fff;
}
.wb-fulfillment-help-wrap {
  position: relative;
  display: inline-flex;
}
.wb-fulfillment-toggle {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  padding: 6px 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
}
.wb-fulfillment-toggle span {
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}
.wb-fulfillment-toggle small {
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}
.wb-fulfillment-toggle.fbs {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.wb-fulfillment-toggle.fbs span {
  color: #166534;
}
.wb-fulfillment-toggle.fbo {
  border-color: #ddd6fe;
  background: #f5f3ff;
}
.wb-fulfillment-toggle.fbo span {
  color: #5b21b6;
}
.wb-fulfillment-help {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 90;
  width: 260px;
  display: none;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
  padding: 10px 11px;
  color: #0f172a;
  text-align: left;
}
.wb-fulfillment-help b {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 900;
}
.wb-fulfillment-help small {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}
.wb-fulfillment-help-wrap:hover .wb-fulfillment-help,
.wb-fulfillment-help-wrap:focus-within .wb-fulfillment-help {
  display: block;
}
.wb-account-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 2px);
  z-index: 40;
  width: min(420px, calc(100vw - 340px));
  max-height: min(560px, calc(100vh - 128px));
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
  padding: 14px;
  display: grid;
  gap: 10px;
}
.wb-account-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.wb-account-panel-head h3 {
  margin: 0 0 3px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.1;
}
.wb-account-panel-head p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.3;
}
.wb-account-list {
  display: grid;
  gap: 6px;
  max-height: 190px;
  overflow: auto;
  padding-right: 2px;
}
.wb-account-row {
  height: auto;
  min-height: 46px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #fff;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  text-align: left;
}
.wb-account-row:hover,
.wb-account-row:focus,
.wb-account-row.active {
  background: #f8fafc;
  border-color: #e5e7eb;
}
.wb-account-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.wb-account-row b {
  font-size: 14px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wb-account-row small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wb-account-row i {
  color: #7c3aed;
  font-style: normal;
  font-size: 14px;
  flex: 0 0 auto;
}
.wb-account-api {
  border-top: 1px solid #e5e7eb;
  padding-top: 10px;
}
.wb-account-api > summary {
  cursor: pointer;
  list-style: none;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  padding: 8px 0;
}
.wb-account-api > summary::-webkit-details-marker {
  display: none;
}
.wb-account-api:not(.ui-disclosure-details) > summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 7px;
  transition: transform 0.15s ease;
  color: #64748b;
  font-size: 13px;
}
.wb-account-api:not(.ui-disclosure-details)[open] > summary::before {
  transform: rotate(90deg);
}
.wb-account-api-body {
  display: grid;
  gap: 10px;
  padding-top: 8px;
}
.wb-account-api-body .marketplace-connection-card {
  border: 0;
  box-shadow: none;
  padding: 0;
}
.wb-account-api-body .marketplace-connection-card > .toolbar,
.wb-account-api-body .marketplace-connection-card > .table-wrap {
  display: none;
}
.wb-account-api-body .toolbar {
  min-width: 0;
}
.wb-account-api-body .toolbar > div {
  min-width: 0;
}
.wb-account-api-body .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}
.wb-account-api-body .rare-tool {
  border-radius: 10px;
}
.wb-account-api-body .rare-tool summary {
  padding: 10px 12px;
  font-size: 14px;
}
.wb-account-api-body .rare-tool-body {
  padding: 10px 12px 12px;
}
.wb-account-api-body label {
  margin-bottom: 0;
  font-size: 12px;
}
.wb-account-api-body label,
.wb-account-api-body .metric,
.wb-account-api-body button {
  min-width: 0;
  max-width: 100%;
}
.wb-account-api-body input,
.wb-account-api-body select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wb-account-api-body button {
  width: 100%;
  white-space: normal;
  line-height: 1.15;
}
.wb-account-api-body .table-wrap {
  max-width: 100%;
  overflow: auto;
}
.wb-account-api-body .metric {
  min-height: 64px;
  align-content: center;
}
.wb-account-api-body .metric b {
  font-size: 20px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.wb-workspace-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-top: 1px solid #eef2f7;
  background: #f8fafc;
}
.wb-workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.wb-workspace-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  min-width: max-content;
}
.wb-workspace-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.1;
}
.wb-workspace-head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
  max-width: 780px;
}
.wb-workspace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-auto-rows: auto;
  gap: 12px;
  align-items: stretch;
}
.wb-workspace-card {
  min-width: 0;
  min-height: 214px;
  max-height: 320px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  padding: 14px;
  text-align: left;
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.035);
}
.wb-workspace-card h3 {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.15;
}
.wb-workspace-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.marketplace-loading-shell {
  min-height: 360px;
}
.marketplace-loading-title {
  margin-bottom: 14px;
  color: #0f172a;
  font-size: 20px;
  font-weight: 700;
}
.marketplace-loading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.marketplace-loading-card {
  overflow: hidden;
}
.marketplace-loading-card i {
  display: block;
  width: 100%;
  height: 14px;
  margin: 0 0 12px;
  border-radius: 4px;
  background: #e8edf5;
  animation: marketplace-loading-pulse 1.4s ease-in-out infinite;
}
.marketplace-loading-card i:first-child {
  width: 54%;
  height: 20px;
}
.marketplace-loading-card i:nth-child(3) {
  width: 78%;
}
.marketplace-loading-card i:last-child {
  width: 38%;
  margin-bottom: 0;
}
@keyframes marketplace-loading-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .marketplace-loading-card i {
    animation: none;
  }
}
.wb-workspace-card span {
  width: max-content;
  max-width: 100%;
  display: inline-block;
  margin-top: 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
}
.wb-loss-preview {
  width: max-content;
  height: auto;
  min-height: 34px;
  max-width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  padding: 5px 8px;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}
.wb-loss-preview:hover,
.wb-loss-preview:focus-visible {
  border-color: #dc2626;
  background: #fee2e2;
  transform: translateY(-1px);
}
.wb-workspace-card .wb-loss-preview span {
  width: auto;
  max-width: none;
  display: block;
  margin: 0;
  border-radius: 0;
  background: transparent;
  color: #b91c1c;
  padding: 0;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.wb-loss-preview b {
  min-width: 0;
  color: #7f1d1d;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wb-workspace-home-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}
.wb-workspace-home-card:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.24);
  outline-offset: 2px;
}
.wb-workspace-home-card:hover {
  border-color: #c4b5fd;
  box-shadow: 0 10px 22px rgba(124, 58, 237, 0.1);
  transform: translateY(-1px);
}
[data-auto-scroll] {
  overflow: visible;
  scrollbar-gutter: stable;
}
[data-auto-scroll].wb-has-overflow {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.wb-workspace-card-content {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  padding-right: 3px;
}
.wb-workspace-home-card p {
  min-height: 0;
}
.wb-workspace-card-wide {
  grid-column: span 2;
}
.wb-pulse-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
}
.wb-pulse-mini-grid div {
  min-width: 0;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #f8fafc;
  padding: 7px;
  display: grid;
  gap: 2px;
}
.wb-pulse-mini-grid small {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.15;
}
.wb-pulse-mini-grid b {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.wb-pulse-mini-grid em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.wb-workspace-action {
  cursor: pointer;
}
.wb-workspace-action:hover,
.wb-workspace-action:focus {
  border-color: #c4b5fd;
  box-shadow: 0 10px 22px rgba(124, 58, 237, 0.1);
}
.wb-account-context-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.wb-account-context-card h2 {
  margin: 0 0 7px;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.1;
}
.wb-account-context-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.wb-section-summary-card {
  display: grid;
  grid-template-columns: minmax(210px, 0.85fr) minmax(0, 1.35fr);
  gap: 14px;
  align-items: start;
  min-height: 0;
  max-height: none;
}
.wb-section-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.wb-section-summary-grid div,
.wb-section-summary-stat {
  min-width: 0;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  background: #f8fafc;
  padding: 8px;
  display: grid;
  gap: 3px;
}
.wb-section-summary-stat {
  width: 100%;
  height: auto;
  min-height: 86px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 12px 14px;
  color: inherit;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
  overflow: hidden;
}
.wb-section-summary-stat > small,
.wb-section-summary-stat > b,
.wb-section-summary-stat > em {
  position: static;
  display: block;
  margin: 0;
  transform: none;
}
.wb-section-summary-stat:hover,
.wb-section-summary-stat:focus-visible {
  border-color: #94a3b8;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}
.wb-section-summary-grid small,
.wb-section-summary-stat small {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.15;
}
.wb-section-summary-grid b,
.wb-section-summary-stat b {
  color: #0f172a;
  font-size: 16px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.wb-section-summary-grid em,
.wb-section-summary-stat em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.wb-section-penalty-line {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  align-items: center;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 800;
}
.wb-section-penalty-line span {
  color: #64748b;
}
.wb-section-penalty-line b {
  font-size: 13px;
  white-space: nowrap;
}
.wb-section-penalty-line small {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}
.wb-section-penalty-line.no-penalties {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
}
.wb-section-penalty-line.no-penalties b {
  color: #15803d;
}
.wb-section-penalty-line.has-penalties {
  border: 1px solid #fecaca;
  background: #fef2f2;
}
.wb-section-penalty-line.has-penalties b {
  color: #dc2626;
}
.wb-section-penalty-line.unknown {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.wb-section-penalty-line.unknown b {
  color: #64748b;
}
.wb-section-quality-line {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 48px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 9px 12px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  color: #334155;
  text-align: left;
  box-shadow: none;
  overflow: hidden;
}
.wb-section-quality-line:hover,
.wb-section-quality-line:focus-visible {
  border-color: #a78bfa;
  background: #faf5ff;
  transform: none;
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.1);
}
.wb-section-quality-line > span {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.wb-section-quality-line span b {
  font-size: 13px;
  line-height: 1.15;
}
.wb-section-quality-line span small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}
.wb-section-quality-line i {
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
  flex: 0 0 auto;
}
.wb-section-quality-line i {
  color: #6d28d9;
}
.wb-section-quality-line.bad {
  border-color: #fecaca;
  background: #fff7f7;
}
.wb-section-quality-line.bad span b {
  color: #dc2626;
}
.wb-section-quality-line.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.wb-section-quality-line.ok span b {
  color: #15803d;
}
.wb-section-quality-line.unknown span b {
  color: #64748b;
}
.wb-section-inside {
  grid-column: 1 / -1;
  border-top: 1px solid #eef2f7;
  padding-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.wb-section-inside b {
  color: #0f172a;
}
.wb-home-widget-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
  gap: 14px;
  align-items: start;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}
.wb-home-widget-settings-top {
  margin: 0 0 14px;
  border-color: #c4b5fd;
  background: #fbfaff;
}
.wb-home-widget-panel h3 {
  margin: 0 0 7px;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.15;
}
.wb-home-widget-panel p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}
.wb-home-widget-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}
.wb-home-widget-toggle {
  height: auto;
  min-height: 64px;
  justify-content: flex-start;
  gap: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  display: flex;
  align-items: flex-start;
  padding: 10px;
  text-align: left;
}
.wb-home-widget-toggle span {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #e0e7ff;
  color: #4338ca;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex: 0 0 auto;
}
.wb-home-widget-toggle strong {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.wb-home-widget-toggle b {
  font-size: 13px;
  line-height: 1.2;
}
.wb-home-widget-toggle small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.wb-home-widget-toggle.active {
  border-color: #c4b5fd;
  background: #f5f3ff;
}
.wb-home-widget-toggle.active span {
  background: #7c3aed;
  color: #fff;
}
.wb-command-list {
  display: grid;
  gap: 5px;
}
.wb-command-link {
  height: auto;
  min-height: 38px;
  padding: 6px 0;
  border-radius: 0;
  background: transparent;
  color: #111827;
  display: grid;
  gap: 2px;
  text-align: left;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.wb-command-link:hover,
.wb-command-link:focus {
  color: #6d28d9;
  background: transparent;
}
.wb-command-link small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}
@media (max-width: 1180px) {
  .stock-wb-summary-title {
    align-items: flex-start;
    flex-direction: column;
  }
  .stock-wb-account-switcher {
    justify-content: flex-start;
  }
  .wb-stock-headline,
  .wb-stock-warehouse-card {
    align-items: flex-start;
    flex-direction: column;
  }
  .wb-stock-actions {
    justify-content: flex-start;
  }
  .wb-stock-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wb-stock-search {
    grid-column: 1 / -1;
    width: 100%;
  }
  .wb-stock-logistics-summary {
    width: 100%;
    max-width: none;
  }
  .wb-workspace-head {
    flex-direction: column;
  }
}
@media (max-width: 760px) {
  .wb-stock-workspace {
    padding: 12px;
    border-radius: 14px;
  }
  .wb-stock-headline h2 {
    font-size: 24px;
  }
  .wb-stock-filters {
    grid-template-columns: 1fr;
  }
  .wb-stock-logistics-summary {
    grid-template-columns: 1fr;
  }
  .wb-stock-logistics-meta {
    padding: 0;
  }
}
.review-row-title {
  display: grid;
  gap: 2px;
  min-width: 130px;
}
.review-row-title b {
  color: #0f172a;
}
.review-row-title span {
  color: #64748b;
  font-size: 11px;
}
.review-text-preview {
  display: block;
  max-width: 360px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.review-complaints {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}
.details-arrow {
  display: inline-block;
  transition: transform 0.15s ease;
  margin-right: 4px;
}
details[open] > summary .details-arrow {
  transform: rotate(90deg);
}
.rare-tool-body {
  padding: 0 14px 14px;
}
.scanner-video {
  width: 100%;
  max-height: 260px;
  background: #020617;
  border-radius: 8px;
  object-fit: cover;
}
.scan-card .toolbar {
  align-items: flex-start;
}
.scan-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  gap: 8px;
  align-items: end;
}
.scan-panel label {
  margin: 0;
}
.scan-panel button {
  height: 38px;
  white-space: nowrap;
}
.scan-help {
  margin-top: -4px;
  color: #64748b;
  font-size: 12px;
}
.scan-result {
  display: grid;
  gap: 4px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #172554;
  border-radius: 8px;
  padding: 10px 12px;
}
.scan-result b {
  font-size: 14px;
}
.scan-result .muted {
  color: #475569;
}
.scan-result-edit {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}
.scan-result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.text-action {
  border: 0;
  background: transparent;
  color: #2563eb;
  padding: 0;
  height: auto;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.stock-section-note {
  font-size: 12px;
  color: #64748b;
  margin: 0;
}
.stock-wb-balance-cell {
  white-space: nowrap;
}
.stock-warehouse-edit-note {
  max-width: 280px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.25;
  text-align: right;
}
.stock-editable-column-head {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.stock-editable-column-head .text-action {
  font-size: 11px;
  line-height: 1.1;
  text-transform: none;
  white-space: nowrap;
}
.stock-shared-editor > input,
.stock-shared-editor > select {
  display: none;
}
.stock-warehouse-edit-enabled .stock-shared-editor > span {
  display: none;
}
.stock-warehouse-edit-enabled .stock-shared-editor > input,
.stock-warehouse-edit-enabled .stock-shared-editor > select {
  display: block;
}
.stock-shared-name-editor {
  min-width: 210px;
}
.stock-shared-name-editor input {
  width: min(280px, 100%);
  min-width: 190px;
}
.stock-shared-balance-editor input {
  width: 110px;
  min-height: 36px;
}
.stock-shared-minimum-editor input {
  width: 120px;
  min-height: 36px;
}
.stock-shared-unit-editor select {
  width: 120px;
  min-height: 36px;
}
.stock-shared-policy-editor {
  min-width: 150px;
}
.stock-shared-policy-editor > input {
  width: 22px;
  height: 22px;
  min-height: 0;
}
.stock-warehouse-edit-enabled .stock-shared-editor input {
  border-color: #2563eb;
  background: #fff;
}
.stock-warehouse-edit-enabled .stock-shared-editor select {
  border-color: #2563eb;
  background: #fff;
}
#stock-warehouse-edit-message:not(:empty) {
  margin-top: -4px;
}
@media (max-width: 760px) {
  .stock-warehouse-edit-note {
    max-width: none;
    text-align: left;
  }
  .scan-panel {
    grid-template-columns: 1fr;
  }
  .scan-panel button {
    width: 100%;
  }
}
.mini-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
#content {
  position: relative;
  min-width: 0;
}
.content-refresh-status {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(67, 56, 202, 0.12);
  pointer-events: none;
}
.content-refresh-status::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid #a5b4fc;
  border-top-color: #4338ca;
  border-radius: 999px;
  animation: content-refresh-spin 0.7s linear infinite;
}
.content-refresh-error {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 21;
  max-width: min(420px, calc(100% - 24px));
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #991b1b;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 750;
  box-shadow: 0 8px 18px rgba(127, 29, 29, 0.1);
}
@keyframes content-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 1180px) {
  .home-dashboard-grid > .home-block,
  .home-dashboard-grid > .home-block[data-home-block] {
    grid-column: 1 / -1 !important;
    align-self: start;
  }
  .home-dashboard-grid > .home-block > .card,
  .home-dashboard-grid > .home-block > .home-pulse-card,
  .home-dashboard-grid > .home-block > .home-decision-card,
  .home-dashboard-grid > .home-block > .home-command-card {
    height: auto;
  }
  .home-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wb-partner-nav {
    overflow-x: auto;
  }
  .wb-mega-menu {
    width: var(--wb-mega-width, min(760px, calc(100vw - 24px)));
    min-width: 0;
  }
  .wb-account-panel {
    width: min(420px, calc(100vw - 48px));
  }
  .wb-mega-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }
  aside {
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }
  aside > nav,
  aside > .side-tools {
    display: none;
  }
  aside.mobile-nav-open > nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  aside.mobile-nav-open > .side-tools {
    display: grid;
  }
  .mobile-nav-toggle {
    display: inline-flex;
  }
  .metrics,
  .split,
  .mp-stock-tools,
  .mp-stock-summary,
  .mp-stock-list,
  .fbs-control-panel,
  .fbs-assembly-settings,
  .creative-status-grid,
  .home-pulse-card,
  .home-metric-grid,
  .wb-home-widget-panel,
  .wb-section-summary-card,
  .wb-account-api-body .form-grid,
  .autobidder-metrics,
  .ad-strategy-summary,
  .ad-budget-allocation,
  .ad-strategy-grid {
    grid-template-columns: 1fr;
  }
  .fbs-control-panel > * {
    grid-column: auto;
  }
  .ad-strategy-wide {
    grid-column: auto;
  }
  .ad-strategy-head,
  .ad-strategy-row,
  .ad-handoff-list > div {
    align-items: flex-start;
    flex-direction: column;
  }
  .profit-metric-grid,
  .wb-report-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-pulse-main h2 {
    font-size: 24px;
  }
  .wb-partner-top,
  .wb-account-context-card,
  .autobidder-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .wb-workspace-head {
    flex-direction: column;
  }
  .wb-workspace-head-actions {
    min-width: 0;
    justify-content: flex-start;
  }
  .wb-workspace-card-wide {
    grid-column: auto;
  }
  .wb-pulse-mini-grid,
  .wb-section-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wb-section-quality-line {
    align-items: flex-start;
  }
  .wb-mega-menu,
  .wb-account-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 96px;
    width: auto;
    max-height: calc(100vh - 126px);
    overflow: auto;
    padding: 16px;
  }
  .wb-mega-columns {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .view-widget-grid,
  .mp-widget-grid,
  .home-dashboard-grid {
    grid-template-columns: 1fr;
  }
  .view-widget-grid > .view-widget,
  .mp-widget-grid > [data-mp-widget],
  .home-dashboard-grid > .home-block {
    grid-column: 1;
  }
  .home-dashboard-grid > .home-block,
  .home-dashboard-grid > .home-block[data-home-block] {
    grid-column: 1 / -1 !important;
    width: 100%;
  }
  main {
    padding: 14px;
  }
  .mp-stock-head {
    grid-template-columns: var(--mp-identity-width) minmax(0, 1fr);
  }
  .mp-warehouse-row {
    grid-template-columns: minmax(0, 1fr) 72px;
  }
}
@media (max-width: 640px) {
  .app-page-header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 7px;
    margin: -4px 0 8px;
  }
  .app-page-header #page-title {
    font-size: 22px;
  }
  .app-page-header .top-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
@media (max-width: 480px) {
  .wb-profit-penalty-line {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .wb-profit-penalty-line .wb-loss-preview {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-self: start;
    margin-top: 3px;
  }
}
@media (max-width: 520px) {
  .profit-metric-grid,
  .wb-report-metrics {
    grid-template-columns: 1fr;
  }
  .wb-report-summary-metrics {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }
}
@media (max-width: 640px) {
  #content,
  .home-dashboard-grid,
  .home-dashboard-grid > .home-block,
  .home-dashboard-grid > .home-block > * {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .ai-chat-header,
  .ai-chat-compact .ai-chat-header {
    align-items: stretch;
    flex-direction: column;
  }
  .ai-chat-header select,
  .ai-chat-compact .ai-chat-header select {
    width: 100%;
    min-width: 0;
  }
  .ai-chat-person {
    width: 100%;
  }
  .ai-chat-person > span {
    flex: 0 0 38px;
  }
  .ai-chat-actions,
  .home-decision-actions,
  .home-command-options,
  .home-command-card .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    width: 100%;
  }
  .ai-chat-actions > *,
  .home-decision-actions > *,
  .home-command-options > *,
  .home-command-card .row > * {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  #command {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .home-context-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .home-context-summary {
    align-items: flex-start;
    flex-direction: column;
  }
  .home-context-summary p {
    flex: 0 1 auto;
    width: 100%;
  }
  .home-context-sources .home-source-badge.ok {
    display: none;
  }
  .home-context-bar label {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }
  .home-context-bar select {
    width: 100%;
    min-width: 0;
  }
  .home-data-status,
  .home-source-badge {
    align-self: flex-start;
  }
  .home-decision-card,
  .home-command-card {
    padding: 14px;
  }
  .home-pulse-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .home-pulse-actions button {
    width: 100%;
  }
  .home-goals-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-attention-item,
  .home-activity-item,
  .home-opportunity-list > li,
  .home-opportunity-list > article,
  .home-opportunity-list > div {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
}
.ad-autopilot-simulator {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.ad-autopilot-body {
  display: grid;
  gap: 16px;
}
.ad-autopilot-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
}
.ad-autopilot-head > div {
  display: grid;
  gap: 4px;
}
.ad-autopilot-head span {
  color: #166534;
  font-size: 13px;
}
.ad-autopilot-safety {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #dcfce7;
  font-weight: 700;
}
.ad-autopilot-head-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}
.ad-readonly-periods {
  display: grid;
  gap: 10px;
}
.ad-readonly-periods > h3,
.ad-readonly-grid h3 {
  margin: 0;
}
.ad-readonly-periods > div:first-of-type {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.ad-readonly-periods article {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: #fff;
}
.ad-readonly-periods article > b {
  grid-column: 1 / -1;
}
.ad-readonly-periods article span {
  display: grid;
  gap: 2px;
}
.ad-readonly-periods article small,
.ad-readonly-runs small,
.ad-readonly-recommendations small {
  color: #64748b;
}
.ad-readonly-signals {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.ad-readonly-signals > span {
  display: grid;
  gap: 3px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #f1f5f9;
}
.ad-readonly-signals > span.ok {
  color: #166534;
  background: #dcfce7;
}
.ad-readonly-signals > span.danger {
  color: #991b1b;
  background: #fee2e2;
}
.ad-readonly-signals > span.warn {
  color: #92400e;
  background: #fef3c7;
}
.ad-readonly-signals > span.info {
  color: #1e40af;
  background: #dbeafe;
}
.ad-readonly-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 12px;
}
.ad-readonly-grid > section {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
.ad-data-quality {
  margin: 0;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 13px;
}
.ad-data-quality.ok {
  color: #166534;
  background: #dcfce7;
}
.ad-data-quality.warn {
  color: #92400e;
  background: #fef3c7;
}
.ad-readonly-runs,
.ad-readonly-recommendations {
  display: grid;
  gap: 7px;
}
.ad-readonly-runs article,
.ad-readonly-recommendations article {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 5px 8px;
  padding: 9px;
  border-radius: 9px;
  background: #f8fafc;
}
.ad-readonly-runs small,
.ad-readonly-recommendations small {
  grid-column: 1 / -1;
  line-height: 1.45;
}
.ad-autopilot-kpis,
.ad-autopilot-zones {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.ad-autopilot-kpis > span,
.ad-autopilot-effect > span {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.ad-autopilot-kpis small,
.ad-autopilot-effect small {
  color: #64748b;
}
.ad-autopilot-zones > span {
  display: grid;
  gap: 2px;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 12px;
}
.ad-autopilot-zones .excellent {
  color: #166534;
  background: #dcfce7;
}
.ad-autopilot-zones .target {
  color: #334155;
  background: #e2e8f0;
}
.ad-autopilot-zones .warning {
  color: #92400e;
  background: #fef3c7;
}
.ad-autopilot-zones .critical {
  color: #9a3412;
  background: #ffedd5;
}
.ad-autopilot-zones .stop {
  color: #991b1b;
  background: #fee2e2;
}
.ad-autopilot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 12px;
}
.ad-autopilot-form,
.ad-autopilot-recent {
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
.ad-autopilot-form h3,
.ad-autopilot-recent h3 {
  margin: 0 0 10px;
}
.ad-autopilot-form .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ad-autopilot-result {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.ad-autopilot-result > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ad-autopilot-result p {
  margin: 0;
}
.ad-autopilot-result.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.ad-autopilot-result.warn,
.ad-autopilot-result.high {
  border-color: #fde68a;
  background: #fffbeb;
}
.ad-autopilot-result.danger {
  border-color: #fecaca;
  background: #fef2f2;
}
.ad-autopilot-effect {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.ad-autopilot-decision-list {
  display: grid;
  gap: 8px;
}
.ad-autopilot-decision-list > div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 5px 8px;
  padding: 9px;
  border-radius: 9px;
  background: #f8fafc;
}
.ad-autopilot-decision-list small {
  grid-column: 1 / -1;
  color: #64748b;
}
.ad-trusted-autopilot {
  border-color: #a7f3d0;
  background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 60%);
}
.ad-trusted-autopilot > .rare-tool-body {
  display: grid;
  gap: 14px;
}
.ad-trusted-head,
.ad-trusted-actions,
.ad-trusted-status {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.ad-trusted-head h3,
.ad-trusted-head p,
.ad-trusted-report h4 {
  margin: 0;
}
.ad-trusted-head > div:first-child {
  display: grid;
  gap: 4px;
  max-width: 760px;
}
.ad-trusted-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.ad-trusted-kpis > span,
.ad-trusted-report > div:last-child > span {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid #d1fae5;
  border-radius: 10px;
  background: #fff;
}
.ad-trusted-kpis small,
.ad-trusted-report small {
  color: #64748b;
}
.ad-trusted-boundaries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ad-trusted-boundaries section,
.ad-trusted-report,
.ad-trusted-wizard {
  padding: 13px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
}
.ad-trusted-boundaries h4 {
  margin: 0 0 8px;
}
.ad-trusted-boundaries section > div,
.ad-trusted-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.ad-trusted-report {
  display: grid;
  gap: 10px;
}
.ad-trusted-report > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ad-trusted-report > div:last-child {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}
.ad-trusted-wizard > summary {
  font-weight: 800;
  cursor: pointer;
}
.ad-trusted-wizard .form-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 12px;
}
.ad-trusted-switches {
  margin: 12px 0;
}
.ad-trusted-switches label {
  padding: 8px 10px;
  border-radius: 9px;
  background: #f1f5f9;
}
.ad-trusted-actions {
  justify-content: flex-start;
}
.ad-learning-memory {
  border-color: #bfdbfe;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 62%);
}
.ad-learning-memory > .rare-tool-body,
.ad-learning-playbooks,
.ad-learning-columns section {
  display: grid;
  gap: 12px;
}
.ad-learning-head,
.ad-learning-playbooks > div:first-child,
.ad-learning-footer,
.ad-learning-playbooks article > div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.ad-learning-head h3,
.ad-learning-head p,
.ad-learning-playbooks h4,
.ad-learning-playbooks p,
.ad-learning-columns h4 {
  margin: 0;
}
.ad-learning-head > div:first-child {
  display: grid;
  gap: 4px;
  max-width: 760px;
}
.ad-learning-checkpoints,
.ad-learning-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.ad-learning-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.ad-learning-checkpoints > span,
.ad-learning-kpis > span {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #fff;
}
.ad-learning-checkpoints small,
.ad-learning-kpis small,
.ad-learning-playbooks small,
.ad-learning-columns small {
  color: #64748b;
}
.ad-learning-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ad-learning-columns section,
.ad-learning-playbooks {
  padding: 13px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
}
.ad-learning-columns ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.ad-learning-columns li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
}
.ad-learning-columns li > div,
.ad-learning-playbooks article {
  display: grid;
  gap: 4px;
}
.ad-learning-playbooks > div:last-child {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.ad-learning-playbooks article {
  padding: 11px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fbff;
}
.ad-learning-footer {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
}
.ad-incrementality {
  border-color: #a7f3d0;
  background: linear-gradient(135deg, #ecfdf5 0%, #f8fafc 64%);
}
.ad-incrementality > .rare-tool-body,
.ad-incrementality-results,
.ad-incrementality-grid > section {
  display: grid;
  gap: 12px;
}
.ad-incrementality-head,
.ad-incrementality-section-head,
.ad-incrementality-results article > div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.ad-incrementality-head h3,
.ad-incrementality-head p,
.ad-incrementality-grid h4,
.ad-incrementality-results p {
  margin: 0;
}
.ad-incrementality-head > div:first-child {
  display: grid;
  gap: 4px;
  max-width: 780px;
}
.ad-incrementality-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.ad-incrementality-kpis > span {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #fff;
}
.ad-incrementality-kpis > span.ok {
  color: #047857;
  background: #ecfdf5;
}
.ad-incrementality-kpis > span.danger {
  color: #b91c1c;
  background: #fef2f2;
}
.ad-incrementality-kpis > span.info {
  color: #1d4ed8;
  background: #eff6ff;
}
.ad-incrementality-kpis > span.warn {
  color: #a16207;
  background: #fffbeb;
}
.ad-incrementality-kpis > span.boost {
  color: #6d28d9;
  background: #f5f3ff;
}
.ad-incrementality-kpis small,
.ad-incrementality-section-head small,
.ad-incrementality-results small {
  color: #64748b;
}
.ad-incrementality-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 10px;
}
.ad-incrementality-grid > section {
  align-content: start;
  padding: 13px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
}
.ad-incrementality-results article {
  display: grid;
  gap: 8px;
  padding: 11px;
  border-radius: 10px;
  background: #f8fafc;
}
.ad-incrementality-results article > div:first-child > div {
  display: grid;
  gap: 2px;
}
.ad-incrementality-values,
.ad-incrementality-types {
  display: flex;
  gap: 7px 14px;
  flex-wrap: wrap;
}
.ad-incrementality-values {
  color: #64748b;
  font-size: 11px;
}
.ad-incrementality-types > span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 11px;
  font-weight: 700;
}
.ad-incrementality-warning {
  padding: 10px 12px;
  border-radius: 10px;
  color: #92400e;
  background: #fffbeb;
  font-size: 12px;
  line-height: 1.55;
}
.ad-black-box {
  border-color: #cbd5e1;
  background: linear-gradient(135deg, #f8fafc 0%, #fff 64%);
}
.ad-black-box > .rare-tool-body,
.ad-black-feed,
.ad-black-event-body,
.ad-black-weekly {
  display: grid;
  gap: 12px;
}
.ad-black-head h3,
.ad-black-head p,
.ad-black-event h4,
.ad-black-event p,
.ad-black-weekly h4 {
  margin: 0;
}
.ad-black-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}
.ad-black-filters label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}
.ad-black-filters .ad-black-check {
  display: flex;
  align-items: center;
  min-height: 39px;
  padding: 0 10px;
  border: 1px solid #dbe3ee;
  border-radius: 9px;
  background: #fff;
}
.ad-black-weekly,
.ad-black-event {
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
}
.ad-black-weekly {
  padding: 13px;
}
.ad-black-weekly > div:first-child,
.ad-black-weekly-alerts,
.ad-black-event > summary,
.ad-black-event > summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.ad-black-weekly > div:nth-child(2),
.ad-black-metrics,
.ad-black-reviews {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.ad-black-weekly > div:nth-child(2) > span,
.ad-black-metrics > span,
.ad-black-reviews > span {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
}
.ad-black-weekly small,
.ad-black-metrics small,
.ad-black-reviews small,
.ad-black-event > summary small,
.ad-black-rules small,
.ad-black-explanation small {
  color: #64748b;
}
.ad-black-weekly-alerts {
  justify-content: flex-start;
  padding: 9px 10px;
  border-radius: 9px;
  background: #f1f5f9;
}
.ad-black-event > summary {
  padding: 11px 13px;
  cursor: pointer;
}
.ad-black-event > summary > div {
  justify-content: flex-start;
  min-width: 0;
}
.ad-black-event-body {
  padding: 0 13px 13px;
}
.ad-black-explanation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.ad-black-explanation section,
.ad-black-rules,
.ad-black-event-body > section {
  display: grid;
  gap: 7px;
  padding: 11px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.ad-black-rules > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.ad-black-rules > div > span {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 8px;
  background: #f8fafc;
}
.ad-black-reviews > .is-success {
  border-color: #86efac;
  background: #f0fdf4;
}
.ad-black-reviews > .is-danger {
  border-color: #fca5a5;
  background: #fef2f2;
}
.ad-black-lesson {
  padding: 9px 10px;
  border-radius: 9px;
  background: #eff6ff;
}
.ad-approvals .rare-tool-body {
  display: grid;
  gap: 14px;
}
.ad-approval-head,
.ad-approval-card-head,
.ad-approval-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.ad-approval-head h3,
.ad-approval-head p,
.ad-approval-card p,
.ad-approval-compare h4 {
  margin: 0;
}
.ad-approval-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
}
.ad-approval-list {
  display: grid;
  gap: 10px;
}
.ad-approval-card {
  display: grid;
  gap: 12px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}
.ad-approval-card[hidden] {
  display: none;
}
.ad-approval-card-head {
  justify-content: flex-start;
}
.ad-approval-card-head > div {
  display: grid;
  min-width: 220px;
  flex: 1;
  gap: 2px;
}
.ad-approval-card-head small,
.ad-approval-actions small {
  color: #64748b;
}
.ad-approval-select {
  width: 22px;
}
.ad-approval-phrases {
  display: grid;
  gap: 6px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #f8fafc;
  padding: 9px;
}
.ad-approval-phrases-head,
.ad-approval-phrase-row,
.ad-approval-phrase-metrics,
.ad-approval-phrase-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ad-approval-phrases-head {
  justify-content: space-between;
}
.ad-approval-phrases-head small,
.ad-approval-phrase-row small {
  color: #64748b;
}
.ad-approval-phrase-row {
  flex-wrap: wrap;
  border-top: 1px solid #e2e8f0;
  padding-top: 6px;
}
.ad-approval-phrase-row > span:first-child {
  display: grid;
  min-width: 220px;
  flex: 1;
  gap: 1px;
}
.ad-approval-phrase-metrics {
  min-width: 210px;
  justify-content: flex-end;
}
.ad-approval-phrase-metrics small {
  white-space: nowrap;
}
.ad-approval-inline-message:empty {
  display: none;
}
.ad-approval-inline-message:not(:empty) {
  width: 100%;
}
.ad-approval-metrics {
  display: grid;
  grid-template-columns: repeat(8, minmax(95px, 1fr));
  gap: 8px;
}
.ad-approval-metrics > span,
.ad-approval-compare section {
  display: grid;
  gap: 3px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
  padding: 9px;
}
.ad-approval-metrics small,
.ad-approval-compare small {
  color: #64748b;
  font-size: 11px;
}
.ad-approval-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.ad-approval-compare section > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 7px;
}
.ad-approval-compare section span {
  display: grid;
}
.ad-approval-compare > i {
  color: #64748b;
  font-size: 20px;
  font-style: normal;
}
.ad-approval-actions {
  justify-content: flex-start;
}
.ad-approval-actions small {
  margin-left: auto;
}
.ad-approval-dry-run {
  display: flex;
  gap: 8px;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  background: #eff6ff;
  padding: 9px 10px;
  color: #1e40af;
  font-size: 12px;
}
.ad-autopilot-modes > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 10px;
}
.ad-autopilot-modes > div > span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
}
.ad-autopilot-modes small {
  color: #64748b;
  line-height: 1.45;
}
@media (max-width: 1000px) {
  .ad-approval-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ad-approval-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .ad-autopilot-kpis,
  .ad-autopilot-zones {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ad-autopilot-grid {
    grid-template-columns: 1fr;
  }
  .ad-readonly-grid {
    grid-template-columns: 1fr;
  }
  .ad-readonly-signals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ad-learning-kpis,
  .ad-learning-playbooks > div:last-child {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ad-learning-columns {
    grid-template-columns: 1fr;
  }
  .ad-incrementality-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ad-incrementality-grid {
    grid-template-columns: 1fr;
  }
  .ad-black-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ad-black-weekly > div:nth-child(2),
  .ad-black-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ad-autopilot-modes > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .ad-autopilot-head {
    display: grid;
  }
  .ad-autopilot-kpis,
  .ad-autopilot-zones,
  .ad-autopilot-form .form-grid,
  .ad-autopilot-effect,
  .ad-autopilot-modes > div {
    grid-template-columns: 1fr;
  }
  .ad-readonly-periods > div:first-of-type,
  .ad-readonly-signals,
  .ad-learning-checkpoints,
  .ad-learning-kpis,
  .ad-learning-playbooks > div:last-child {
    grid-template-columns: 1fr;
  }
  .ad-incrementality-kpis {
    grid-template-columns: 1fr;
  }
  .ad-black-filters,
  .ad-black-explanation,
  .ad-black-rules > div,
  .ad-black-weekly > div:nth-child(2),
  .ad-black-metrics,
  .ad-black-reviews {
    grid-template-columns: 1fr;
  }
  .ad-autopilot-head-actions {
    justify-items: start;
  }
  .ad-approval-filters,
  .ad-approval-metrics,
  .ad-approval-compare {
    grid-template-columns: 1fr;
  }
  .ad-approval-compare > i {
    transform: rotate(90deg);
    justify-self: center;
  }
  .ad-approval-actions small {
    width: 100%;
    margin-left: 0;
  }
}
.ad-ranking-body {
  display: grid;
  gap: 14px;
}

.ad-ranking-product {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft, #f8f9fc);
}

.ad-ranking-product-head,
.ad-ranking-factor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ad-ranking-product-head > div,
.ad-ranking-factor > span {
  display: grid;
  gap: 3px;
}

.ad-ranking-product-head small,
.ad-ranking-factor small {
  color: var(--muted);
  font-size: 12px;
}

.ad-ranking-factor-list {
  display: grid;
  gap: 8px;
}

.ad-ranking-factor {
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel, #fff);
}

.ad-ranking-factor .pill {
  flex: 0 0 auto;
  max-width: 48%;
  text-align: right;
}

@media (max-width: 760px) {
  .ad-ranking-product-head,
  .ad-ranking-factor {
    align-items: flex-start;
    flex-direction: column;
  }

  .ad-ranking-factor .pill {
    max-width: 100%;
    text-align: left;
  }
}
.accounting-page {
  display: grid;
  gap: 16px;
}
.accounting-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  padding: 22px 24px;
  border: 1px solid #dce2ec;
  background: #fff;
  border-radius: 8px;
}
.accounting-header h2 {
  margin: 3px 0;
  font-size: 30px;
}
.accounting-header p {
  margin: 0;
  color: #64748b;
}
.accounting-header > div > span {
  color: #4f46e5;
  font-weight: 700;
}
.accounting-header label {
  display: grid;
  gap: 5px;
  min-width: 220px;
  color: #64748b;
  font-weight: 700;
}
.accounting-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  border: 1px solid #dce2ec;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  min-height: 620px;
}
.accounting-tabs {
  padding: 12px;
  border-right: 1px solid #e5e9f0;
  background: #f8fafc;
  overflow: auto;
  max-height: 74vh;
}
.accounting-tabs button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #334155;
  text-align: left;
  padding: 9px 11px;
  margin: 0 0 2px;
  font-weight: 650;
  border-radius: 6px;
}
.accounting-tabs button.active {
  background: #111827;
  color: #fff;
}
.accounting-workspace {
  min-width: 0;
  padding: 20px;
  display: grid;
  align-content: start;
  gap: 16px;
}
.accounting-workspace.is-loading {
  opacity: 0.62;
  pointer-events: none;
}
.accounting-workspace section {
  border-top: 1px solid #e5e9f0;
  padding-top: 14px;
}
.accounting-workspace section:first-child {
  border-top: 0;
}
.accounting-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 10px;
}
.accounting-metric {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid #e1e6ee;
  background: #f8fafc;
  border-radius: 7px;
  min-height: 78px;
  align-content: center;
}
.accounting-metric span,
.accounting-metric small {
  color: #64748b;
}
.accounting-metric b {
  font-size: 20px;
}
.accounting-attention {
  display: grid;
  gap: 12px;
}
.accounting-attention h3,
.accounting-split h3 {
  margin: 0;
}
.accounting-attention p {
  margin: 4px 0 0;
  color: #64748b;
}
.accounting-attention-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 9px;
}
.accounting-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.accounting-split section {
  display: grid;
  gap: 8px;
  border: 1px solid #e1e6ee;
  padding: 16px;
  border-radius: 7px;
}
.accounting-empty {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 22px;
  border: 1px dashed #cbd5e1;
  border-radius: 7px;
  color: #475569;
}
.accounting-empty p {
  margin: 0;
}
.accounting-integration-list {
  display: grid;
  gap: 8px;
}
.accounting-integration-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px;
  border: 1px solid #e1e6ee;
  border-radius: 7px;
}
.accounting-integration-list span {
  display: grid;
  gap: 3px;
}
.accounting-integration-list small {
  color: #64748b;
}
.accounting-warning {
  padding: 14px;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 7px;
}
@media (max-width: 900px) {
  .accounting-header {
    align-items: stretch;
    flex-direction: column;
  }
  .accounting-layout {
    grid-template-columns: 1fr;
  }
  .accounting-tabs {
    display: flex;
    border-right: 0;
    border-bottom: 1px solid #e5e9f0;
    max-height: none;
    overflow-x: auto;
  }
  .accounting-tabs button {
    width: auto;
    white-space: nowrap;
  }
  .accounting-metrics,
  .accounting-attention-grid,
  .accounting-split {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .accounting-metrics,
  .accounting-attention-grid,
  .accounting-split {
    grid-template-columns: 1fr;
  }
}

/* Finance workspace: readable operational records instead of raw admin tables. */
.finance-default-method,
.finance-account-admin {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.finance-account-admin {
  padding: 0;
  overflow: hidden;
}
.finance-account-admin > summary,
.finance-technical-log > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}
.finance-account-admin > summary::-webkit-details-marker,
.finance-technical-log > summary::-webkit-details-marker {
  display: none;
}
.finance-account-admin > summary span:first-child,
.finance-technical-log > summary span:first-child {
  display: grid;
  gap: 3px;
}
.finance-account-admin > summary b,
.finance-technical-log > summary b {
  font-size: 17px;
}
.finance-account-admin > summary small,
.finance-technical-log > summary small {
  color: var(--muted);
}
.finance-account-admin[open] > summary,
.finance-technical-log[open] > summary {
  border-bottom: 1px solid var(--line);
}
.finance-account-admin-body {
  padding: 14px;
  background: #f8fafc;
}
.finance-account-admin-body > .card {
  margin: 0;
  box-shadow: none;
}
.finance-record-page,
.finance-operations-page {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 14px;
}
.finance-record-page > .card,
.finance-operations-page > .card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.finance-entry-form {
  min-width: 0;
}
.finance-entry-form > *,
.finance-entry-form label,
.finance-entry-form input,
.finance-entry-form select {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.finance-entry-form input,
.finance-entry-form select {
  width: 100%;
}
.finance-command-entry .row {
  align-items: stretch;
}
.finance-record-list {
  display: grid;
  gap: 8px;
}
.finance-record {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid #e1e8f0;
  border-radius: 12px;
  background: #fff;
}
.finance-record--expense {
  border-left: 4px solid #ef4444;
}
.finance-record--purchase {
  border-left: 4px solid #0f9f6e;
}
.finance-record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.finance-record-head span,
.finance-record small {
  color: #64748b;
  font-size: 12px;
}
.finance-record-head b {
  font-size: 16px;
}
.finance-record p {
  margin: 0;
  color: #243247;
}
.finance-record-empty {
  display: grid;
  gap: 4px;
  padding: 24px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: #64748b;
  text-align: center;
}
.finance-total-negative {
  color: #c92a2a;
}
.finance-technical-log {
  padding: 0;
}
.finance-technical-events {
  display: grid;
  gap: 7px;
  padding: 14px;
}
.finance-technical-events > div {
  display: grid;
  grid-template-columns: minmax(160px, 0.5fr) 1fr auto;
  gap: 12px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #f8fafc;
}
.finance-technical-events span,
.finance-technical-events small {
  color: #64748b;
}
.accounting-tab-picker {
  display: none;
}

@media (max-width: 700px) {
  .finance-default-method .toolbar {
    align-items: flex-start;
  }
  .finance-default-method .pill {
    white-space: normal;
  }
  .finance-default-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }
  .finance-account-admin > summary,
  .finance-technical-log > summary {
    align-items: flex-start;
    padding: 14px;
  }
  .finance-account-admin-body {
    padding: 8px;
  }
  .finance-account-admin-body .form-grid,
  .finance-entry-form {
    grid-template-columns: 1fr;
  }
  .finance-account-admin-body .table-scroll {
    max-width: 100%;
    overflow-x: auto;
  }
  .finance-command-entry .row {
    display: grid;
    grid-template-columns: 1fr;
  }
  .finance-record-head {
    align-items: flex-start;
  }
  .finance-technical-events > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .accounting-layout {
    min-height: 0;
  }
  .accounting-tab-picker {
    display: grid;
    gap: 6px;
    padding: 12px;
    border-bottom: 1px solid #e5e9f0;
    color: #64748b;
    font-weight: 700;
  }
  .accounting-tab-picker select {
    width: 100%;
    min-width: 0;
  }
  .accounting-tabs {
    display: none;
  }
  .accounting-workspace {
    padding: 12px;
  }
  .payroll-page .payroll-progress-table {
    display: block;
    min-width: 0;
  }
  .payroll-page .payroll-progress-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .payroll-page .payroll-progress-table tbody,
  .payroll-page .payroll-progress-table tr,
  .payroll-page .payroll-progress-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .payroll-page .payroll-progress-table tr {
    margin-bottom: 10px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
  }
  .payroll-page .payroll-progress-table td {
    display: grid;
    grid-template-columns: minmax(105px, 0.7fr) 1fr;
    gap: 10px;
    padding: 7px 0;
    border: 0;
    border-bottom: 1px solid #eef2f6;
  }
  .payroll-page .payroll-progress-table td:last-child {
    border-bottom: 0;
  }
  .payroll-page .payroll-progress-table td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }
  .payroll-page .payroll-progress-table td:first-child {
    grid-template-columns: 1fr;
  }
  .payroll-page .payroll-progress-table td:first-child::before {
    display: none;
  }
  .payroll-page .table-scroll:has(.payroll-progress-table) {
    overflow: visible;
  }
}

/* Advertising Factory: presentation-ready production cockpit. */
.factory-shell {
  --factory-ink: #0b1220;
  --factory-violet: #7c3aed;
  --factory-blue: #2563eb;
  --factory-mint: #10b981;
  display: grid;
  gap: 18px;
}

.factory-shell > .card {
  border-color: #dfe5ef;
  border-radius: 18px;
  box-shadow: 0 10px 35px rgb(15 23 42 / 5%);
}

.factory-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 360px;
  overflow: hidden;
  padding: 32px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 22px;
  background:
    radial-gradient(circle at 82% 4%, rgb(124 58 237 / 42%), transparent 28%),
    radial-gradient(circle at 12% 100%, rgb(37 99 235 / 28%), transparent 32%),
    linear-gradient(135deg, #080f1d, #17243b 62%, #111827);
  color: #fff;
  box-shadow: 0 22px 50px rgb(15 23 42 / 22%);
}

.factory-hero::after {
  position: absolute;
  right: -110px;
  bottom: -140px;
  width: 320px;
  height: 320px;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 50%;
  content: "";
}

.factory-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: start;
  width: 100%;
  max-width: none;
}

.factory-hero h1 {
  max-width: 720px;
  margin: 9px 0 12px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.factory-hero p,
.factory-batch-head p,
.factory-section-head p {
  margin: 0;
}

.factory-hero p {
  max-width: 690px;
  color: #b9c5d8;
  font-size: 16px;
  line-height: 1.55;
}

.factory-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px 10px;
  border: 1px solid rgb(52 211 153 / 34%);
  border-radius: 999px;
  background: rgb(16 185 129 / 12%);
  color: #a7f3d0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.factory-live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 5px rgb(52 211 153 / 12%);
}

.factory-subnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  width: 100%;
  gap: 8px;
  margin-top: 30px;
}

.factory-subnav a {
  padding: 9px 16px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 999px;
  color: #dbeafe;
  background: rgb(255 255 255 / 5%);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.factory-launch-section {
  display: grid;
  grid-template-columns: minmax(230px, 0.45fr) minmax(0, 1.55fr);
  gap: 24px;
  align-items: stretch;
  padding: 24px;
  border: 1px solid #dfe5ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 35px rgb(15 23 42 / 5%);
  scroll-margin-top: 18px;
}

.factory-launch-intro {
  display: grid;
  align-content: center;
  justify-items: start;
  min-width: 0;
  padding: 8px 4px;
}

.factory-launch-intro > small {
  color: #7c3aed;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.factory-launch-intro h2 {
  max-width: 360px;
  margin: 8px 0 10px;
  color: #0f172a;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.factory-launch-intro p {
  max-width: 410px;
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.factory-launch-intro > span {
  margin-top: 18px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 11px;
  font-weight: 800;
}

.factory-launch {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 20px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 16px;
  background: linear-gradient(145deg, #0b1220, #17243b);
  box-shadow: 0 16px 35px rgb(15 23 42 / 16%);
}

.factory-launch > label:not(.factory-upload) {
  display: grid;
  gap: 5px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.factory-launch-options {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.factory-launch-options label,
.factory-platform-picker label {
  display: grid;
  gap: 4px;
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 800;
}

.factory-platform-picker {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fill, minmax(132px, 170px));
  align-items: stretch;
  justify-content: start;
  gap: 6px;
  margin: 0;
  padding: 9px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 10px;
}

.factory-platform-picker legend {
  padding: 0 5px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.factory-platform-picker label {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 58px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgb(255 255 255 / 7%);
  box-sizing: border-box;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}

.factory-platform-picker label:hover {
  border-color: rgb(96 165 250 / 34%);
  background: rgb(255 255 255 / 11%);
  transform: translateY(-1px);
}

.factory-platform-picker label:has(input:checked) {
  border-color: rgb(96 165 250 / 22%);
  background: linear-gradient(
    145deg,
    rgb(59 130 246 / 13%),
    rgb(255 255 255 / 8%)
  );
}

.factory-launch .factory-platform-picker input[type="checkbox"] {
  position: relative;
  display: grid;
  flex: 0 0 20px;
  place-content: center;
  width: 20px !important;
  min-width: 20px;
  height: 20px !important;
  min-height: 20px;
  padding: 0 !important;
  margin: 0;
  appearance: none;
  border: 1px solid rgb(148 163 184 / 65%);
  border-radius: 6px;
  outline: none;
  background: rgb(15 23 42 / 72%);
  box-sizing: border-box;
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 22%);
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.factory-launch .factory-platform-picker input[type="checkbox"]::before {
  width: 9px;
  height: 5px;
  content: "";
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  opacity: 0;
  transform: translateY(-1px) rotate(-45deg) scale(0.65);
  transition:
    opacity 0.14s ease,
    transform 0.14s ease;
}

.factory-launch .factory-platform-picker input[type="checkbox"]:checked {
  border-color: #60a5fa;
  background: linear-gradient(145deg, #2563eb, #3b82f6);
  box-shadow:
    0 0 0 3px rgb(59 130 246 / 14%),
    0 5px 12px rgb(37 99 235 / 24%);
}

.factory-launch
  .factory-platform-picker
  input[type="checkbox"]:checked::before {
  opacity: 1;
  transform: translateY(-1px) rotate(-45deg) scale(1);
}

.factory-launch .factory-platform-picker input[type="checkbox"]:focus-visible {
  box-shadow: 0 0 0 4px rgb(96 165 250 / 28%);
}

.factory-launch select,
.factory-launch input {
  width: 100%;
  min-width: 0;
  border-color: rgb(255 255 255 / 16%);
  background: rgb(255 255 255 / 96%);
  color: #0f172a;
  box-sizing: border-box;
}

.factory-launch > small {
  align-self: center;
  color: #94a3b8;
  line-height: 1.4;
}

.factory-upload {
  justify-content: center;
  width: auto;
  border-color: rgb(255 255 255 / 18%);
  background: rgb(255 255 255 / 8%);
  color: #e2e8f0;
  cursor: pointer;
}

.factory-launch-button {
  grid-column: 1 / -1;
  min-height: 46px;
  border: 0;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  box-shadow: 0 10px 25px rgb(79 70 229 / 28%);
}

.factory-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.factory-metrics > div {
  position: relative;
  display: grid;
  gap: 2px;
  overflow: hidden;
  min-height: 96px;
  padding: 16px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-sizing: border-box;
}

.factory-metrics > div::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(#8b5cf6, #3b82f6);
  content: "";
}

.factory-metrics span,
.factory-metrics small,
.factory-economics span,
.factory-economics small {
  color: #64748b;
}

.factory-metrics b {
  font-size: 30px;
  line-height: 1.1;
}

.factory-batch {
  display: grid;
  gap: 16px;
}

.factory-batch-head,
.factory-creative-head,
.factory-section-head,
.factory-account-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.factory-batch-head h2,
.factory-creative-head h3,
.factory-section-head h2 {
  margin: 4px 0;
}

.factory-batch-head > div:first-child > small,
.factory-section-head > div > small {
  color: #7c3aed;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.factory-batch-head p,
.factory-section-head p {
  color: #64748b;
}

.factory-campaign-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.factory-campaign-tags span {
  padding: 3px 6px;
  border-radius: 6px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 9px;
  font-weight: 800;
}

.factory-batch-state {
  display: flex;
  align-items: center;
  gap: 10px;
}

.factory-batch-state > b {
  color: #4f46e5;
  font-size: 24px;
}

.factory-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf5;
}

.factory-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #2563eb, #10b981);
}

.factory-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.factory-badge.ok {
  background: #dcfce7;
  color: #166534;
}

.factory-badge.wait {
  background: #fff7ed;
  color: #9a3412;
}

.factory-badge.bad {
  background: #fee2e2;
  color: #991b1b;
}

.factory-stages {
  display: grid;
  grid-template-columns: repeat(7, minmax(128px, 1fr));
  gap: 7px;
  overflow-x: auto;
  padding: 2px 0 6px;
}

.factory-stage {
  position: relative;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-height: 64px;
  padding: 9px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  box-sizing: border-box;
}

.factory-stage > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0;
  border-radius: 8px;
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

.factory-stage.done {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.factory-stage.done > span {
  background: #10b981;
  color: #fff;
}

.factory-stage b,
.factory-stage small {
  display: block;
  line-height: 1.25;
}

.factory-stage b {
  font-size: 11px;
}

.factory-stage small {
  margin-top: 4px;
  color: #64748b;
  font-size: 10px;
}

.factory-prediction {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 15px;
  border: 1px solid #ddd6fe;
  border-radius: 11px;
  background: linear-gradient(135deg, #faf5ff, #eef2ff);
  color: #4c1d95;
}

.factory-prediction > span {
  font-size: 20px;
}

.factory-prediction p {
  margin: 3px 0 0;
  color: #6d28d9;
  font-size: 12px;
}

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

.factory-creative {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  background: #fff;
}

.factory-creative.predicted-winner {
  border-color: #8b5cf6;
  box-shadow:
    0 0 0 2px #ede9fe,
    0 18px 38px rgb(124 58 237 / 10%);
}

.factory-creative-head > div {
  min-width: 0;
}

.factory-winner {
  display: block;
  margin-bottom: 6px;
  color: #6d28d9;
  font-size: 11px;
  font-weight: 900;
  text-align: right;
}

.factory-hook {
  min-height: 34px;
  margin: 7px 0 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.4;
}

.factory-preview-wrap {
  position: relative;
  width: min(100%, 290px);
  margin: 12px auto;
}

.factory-video,
.factory-render-placeholder {
  display: block;
  width: 100%;
  max-height: 510px;
  aspect-ratio: 9 / 16;
  margin: 0;
  border-radius: 12px;
  background: #070b12;
  box-shadow: 0 14px 32px rgb(15 23 42 / 18%);
}

.factory-render-placeholder {
  display: grid;
  place-content: center;
  color: #fff;
  text-align: center;
}

.factory-render-placeholder span {
  font-size: 36px;
}

.factory-quality-score {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 5px 8px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 999px;
  background: rgb(15 23 42 / 78%);
  color: #a7f3d0;
  font-size: 10px;
  font-weight: 900;
  backdrop-filter: blur(6px);
}

.factory-meta,
.factory-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.factory-meta span {
  padding: 4px 7px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
}

.factory-actions {
  margin: 12px 0;
}

.button-link {
  text-decoration: none;
}

.factory-qa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px 0;
  font-size: 12px;
}

.factory-creative details {
  margin-top: 7px;
  border-top: 1px solid #eef2f7;
  padding-top: 8px;
  color: #475569;
  font-size: 12px;
}

.factory-creative pre {
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 11px;
}

.factory-platforms {
  display: grid;
  gap: 7px;
  padding-top: 10px;
}

.factory-platform-row {
  display: grid;
  grid-template-columns: 100px auto minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
  font-size: 11px;
}

.factory-platform-row > span:last-child {
  overflow: hidden;
  color: #64748b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.factory-section-head {
  margin-bottom: 14px;
}

.factory-library-search {
  display: flex;
  gap: 7px;
}

.factory-library-search input {
  min-width: 230px;
}

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

.factory-asset-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 11px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #f8fafc);
}

.factory-asset-card > div:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.factory-asset-card b,
.factory-asset-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.factory-asset-card small,
.factory-asset-card span {
  color: #64748b;
  font-size: 10px;
}

.factory-asset-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 52px;
  border-radius: 10px;
  background: linear-gradient(145deg, #ede9fe, #dbeafe);
  color: #6d28d9;
  font-size: 18px;
}

.factory-asset-score {
  display: grid;
  justify-items: center;
  min-width: 50px;
  padding: 6px;
  border-radius: 9px;
  background: #ecfdf5;
  color: #047857;
}

.factory-asset-score b {
  font-size: 18px;
}

.factory-library-empty {
  display: grid;
  grid-column: 1 / -1;
  justify-items: start;
  gap: 5px;
  padding: 22px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
}

.factory-library-empty b {
  color: #334155;
}

.factory-economics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.factory-economics > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: #f8fafc;
}

.factory-economics b {
  overflow: hidden;
  font-size: 20px;
  text-overflow: ellipsis;
}

.factory-economics span,
.factory-economics small {
  font-size: 10px;
}

.factory-winners {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.factory-performance-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 13px;
  border: 1px solid #bbf7d0;
  border-radius: 13px;
  background: linear-gradient(145deg, #f0fdf4, #fff);
}

.factory-performance-card > div:first-child {
  display: grid;
  gap: 3px;
}

.factory-performance-card small {
  color: #64748b;
}

.factory-viral-score {
  display: grid;
  justify-items: center;
  color: #047857;
}

.factory-viral-score strong {
  font-size: 25px;
}

.factory-score-track {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #d1fae5;
}

.factory-score-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #10b981, #22c55e);
}

.factory-performance-stats {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 10px;
  color: #64748b;
  font-size: 10px;
}

.factory-performance-stats b {
  color: #0f172a;
}

.factory-learning {
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e40af;
}

.factory-learning li {
  margin: 6px 0;
}

.factory-calendar {
  display: grid;
  gap: 7px;
}

.factory-publishing-health {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}

.factory-publishing-health span {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 10px;
}

.factory-publishing-health b {
  margin-right: 3px;
  color: #0f172a;
}

.factory-calendar-row {
  display: grid;
  grid-template-columns: 20px 120px minmax(220px, 1fr) 185px auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: #fff;
}

.factory-calendar-row[draggable="true"] {
  cursor: grab;
}

.factory-calendar-row.dragging {
  opacity: 0.45;
}

.factory-calendar-row.drop-target {
  border-color: #7c3aed;
  background: #faf5ff;
  box-shadow: 0 0 0 2px #ede9fe;
}

.factory-calendar-handle {
  color: #94a3b8;
  font-size: 17px;
}

.factory-calendar-platform {
  color: #4f46e5;
  font-size: 12px;
  font-weight: 900;
}

.factory-calendar-row > div,
.factory-calendar-row label {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.factory-calendar-row > div b,
.factory-calendar-row > div small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.factory-calendar-row small,
.factory-calendar-row label span {
  color: #64748b;
  font-size: 10px;
}

.factory-calendar-row input {
  min-height: 34px;
  padding: 5px 7px;
  font-size: 11px;
}

.factory-provider-count {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 800;
}

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

.factory-account {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.factory-account.healthy {
  border-color: #bbf7d0;
}

.factory-account.blocked {
  border-color: #fecaca;
}

.factory-account-head {
  align-items: center;
  gap: 8px;
}

.factory-account-head > div {
  display: grid;
  min-width: 0;
  flex: 1;
}

.factory-account-head small,
.factory-capabilities {
  color: #64748b;
}

.factory-platform-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.factory-account-status {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #eef2f7;
  padding-top: 7px;
  color: #64748b;
  font-size: 10px;
}

.factory-account-status b {
  color: #334155;
  text-align: right;
}

.factory-account-list {
  display: grid;
  gap: 6px;
}

.factory-connected-account {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 7px;
  padding: 8px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #f8fafc;
}

.factory-connected-account > div {
  display: grid;
  min-width: 0;
}

.factory-connected-account > div b,
.factory-connected-account > div small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.factory-connected-account > span,
.factory-connected-account > em,
.factory-account-missing {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 9px;
  font-style: normal;
}

.factory-connected-account > em {
  color: #991b1b;
}

.factory-capabilities {
  min-height: 28px;
  font-size: 10px;
  line-height: 1.4;
}

.factory-account-error {
  margin: 0;
  padding: 7px;
  border-radius: 7px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 10px;
}

.factory-empty {
  display: grid;
  justify-items: center;
  padding: 44px;
  color: #64748b;
  text-align: center;
}

.factory-empty > span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 20px;
}

@media (max-width: 1180px) {
  .factory-creatives,
  .factory-asset-grid,
  .factory-winners {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .factory-economics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .factory-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .factory-accounts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .factory-hero {
    grid-template-columns: 1fr;
  }

  .factory-launch-section {
    grid-template-columns: 1fr;
  }

  .factory-metrics,
  .factory-accounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .factory-publishing-health {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .factory-calendar-row {
    grid-template-columns: 20px 110px minmax(0, 1fr) auto;
  }

  .factory-calendar-row label {
    grid-column: 3;
    grid-row: 2;
  }

  .factory-calendar-row > .factory-badge {
    grid-column: 4;
    grid-row: 1;
  }

  .factory-calendar-handle {
    grid-column: 1;
    grid-row: 1 / 3;
  }
}

@media (max-width: 680px) {
  .factory-hero {
    min-height: auto;
    padding: 22px;
  }

  .factory-subnav {
    justify-content: flex-start;
  }

  .factory-launch-section {
    gap: 16px;
    padding: 16px;
  }

  .factory-launch {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .factory-launch > *,
  .factory-launch-options,
  .factory-platform-picker,
  .factory-launch-button {
    grid-column: 1;
  }

  .factory-hero h1 {
    font-size: 34px;
  }

  .factory-metrics,
  .factory-creatives,
  .factory-asset-grid,
  .factory-winners,
  .factory-economics,
  .factory-accounts {
    grid-template-columns: 1fr;
  }

  .factory-publishing-health {
    grid-template-columns: 1fr;
  }

  .factory-launch-options {
    grid-template-columns: 1fr;
  }

  .factory-profile-grid {
    grid-template-columns: 1fr;
  }

  .factory-profile-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .factory-section-head,
  .factory-batch-head {
    align-items: stretch;
    flex-direction: column;
  }

  .factory-library-search {
    width: 100%;
  }

  .factory-library-search input {
    min-width: 0;
    flex: 1;
  }

  .factory-platform-row,
  .factory-calendar-row {
    grid-template-columns: 1fr;
  }

  .factory-calendar-row label {
    grid-column: auto;
    grid-row: auto;
  }

  .factory-calendar-row > .factory-badge,
  .factory-calendar-handle {
    grid-column: auto;
    grid-row: auto;
  }

  .factory-prediction {
    flex-direction: column;
  }
}

/* SketchForge entry point on the production workspace. */
.sketchforge-card {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.5fr);
  gap: 22px;
  align-items: center;
  margin-bottom: 16px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid #c7d2fe;
  border-left: 4px solid #4f46e5;
  border-radius: 16px;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(99, 102, 241, 0.18),
      transparent 42%
    ),
    linear-gradient(135deg, #ffffff 0%, #f5f3ff 100%);
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.08);
}

.sketchforge-card-main {
  min-width: 0;
}

.sketchforge-card h2 {
  margin: 4px 0 8px;
  color: #1e1b4b;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.sketchforge-card p {
  max-width: 720px;
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.sketchforge-features {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.sketchforge-features span {
  padding: 6px 9px;
  border: 1px solid #ddd6fe;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: #5b21b6;
  font-size: 12px;
  font-weight: 700;
}

.sketchforge-card-actions {
  display: grid;
  gap: 9px;
  align-content: center;
}

.sketchforge-card-actions .pill {
  justify-self: start;
}

.sketchforge-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 10px;
  background: #4f46e5;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.22);
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.sketchforge-open:hover {
  background: #4338ca;
  transform: translateY(-1px);
}

.sketchforge-open:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.3);
  outline-offset: 3px;
}

.sketchforge-card-actions small {
  color: #64748b;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .sketchforge-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
  }

  .sketchforge-card-actions .pill {
    justify-self: stretch;
    justify-content: center;
  }
}
.home-block[data-home-block="businessChart"] {
  grid-column: 1 / -1;
}
.home-business-chart-card {
  padding: 18px 20px 12px;
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgb(15 23 42 / 6%);
  overflow: hidden;
}
.home-business-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #e2e8f0;
}
.home-business-chart-tabs,
.home-business-chart-periods {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
}
.home-business-chart-tabs button,
.home-business-chart-periods button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #475569;
  font-weight: 800;
}
.home-business-chart-tabs button {
  padding: 11px 12px 13px;
  border-radius: 0;
}
.home-business-chart-tabs button.active {
  color: #0f172a;
  box-shadow: inset 0 -3px #0f172a;
}
.home-business-chart-periods {
  padding: 5px;
  border-radius: 11px;
  background: #f1f5f9;
}
.home-business-chart-periods button {
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 12px;
}
.home-business-chart-periods button.active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgb(15 23 42 / 10%);
}
.home-business-chart-summary {
  display: flex;
  align-items: flex-end;
  gap: 26px;
  padding: 18px 2px 6px;
  flex-wrap: wrap;
}
.home-business-chart-summary > div:first-child {
  margin-right: auto;
  display: grid;
  gap: 2px;
}
.home-business-chart-summary span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.home-business-chart-summary strong {
  font-size: 19px;
}
.home-business-chart-total {
  display: grid;
  gap: 3px;
  min-width: 130px;
}
.home-business-chart-total span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.home-business-chart-total i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}
.home-business-chart-total b {
  font-size: 20px;
}
.home-business-chart-plot {
  position: relative;
  min-height: 260px;
}
.home-business-chart-plot svg {
  display: block;
  width: 100%;
  height: 270px;
  overflow: visible;
}
.home-business-chart-plot .axis {
  stroke: #94a3b8;
  stroke-width: 1;
}
.home-business-chart-plot .gridline {
  stroke: #e8edf5;
  stroke-width: 1;
  stroke-dasharray: 4 6;
}
.home-business-chart-plot text {
  fill: #64748b;
  font-size: 12px;
}
.home-chart-hover-area {
  fill: transparent;
  cursor: crosshair;
  touch-action: none;
}
.home-chart-cursor {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}
.home-chart-cursor.active {
  opacity: 1;
}
.home-chart-cursor line {
  stroke: #64748b;
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
}
.home-business-chart-tooltip {
  position: absolute;
  z-index: 4;
  top: 8px;
  display: none;
  min-width: 190px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 14px 34px rgb(15 23 42 / 18%);
  pointer-events: none;
}
.home-business-chart-tooltip.active {
  display: grid;
  gap: 7px;
}
.home-business-chart-tooltip > strong {
  font-size: 13px;
}
.home-business-chart-tooltip > span {
  display: grid;
  grid-template-columns: 9px minmax(80px, 1fr) auto;
  align-items: center;
  gap: 7px;
}
.home-business-chart-tooltip i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}
.home-business-chart-tooltip b {
  color: #475569;
  font-size: 12px;
}
.home-business-chart-tooltip em {
  color: #0f172a;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}
.home-business-chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #64748b;
  font-weight: 750;
}
.home-business-chart-plot.empty svg {
  opacity: 0.42;
}
@media (max-width: 780px) {
  .home-business-chart-card {
    padding: 12px 10px 8px;
  }
  .home-business-chart-head {
    display: grid;
  }
  .home-business-chart-tabs {
    order: 1;
  }
  .home-business-chart-periods {
    order: 0;
  }
  .home-business-chart-summary {
    gap: 12px;
  }
  .home-business-chart-total {
    min-width: 105px;
  }
  .home-business-chart-plot svg {
    height: 230px;
  }
}
.process-discovery-panel {
  grid-column: 1 / -1;
}

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

.process-discovery-form label:nth-child(n + 3),
.process-discovery-form button {
  grid-column: 1 / -1;
}

.process-discovery-card ol {
  margin: 12px 0;
  padding-left: 22px;
}

@media (max-width: 720px) {
  .process-discovery-form {
    grid-template-columns: 1fr;
  }

  .process-discovery-form label,
  .process-discovery-form label:nth-child(n + 3),
  .process-discovery-form button {
    grid-column: 1;
  }
}
.ai-quality-director > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: 1.1rem;
  font-weight: 750;
  justify-content: space-between;
  list-style: none;
}

.ai-quality-assessments {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  margin-top: 14px;
}
.company-brain-header,
.company-brain-sections,
.company-brain-provenance {
  grid-column: 1 / -1;
}

.company-brain-sections pre {
  margin: 10px 0 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.goal-engine-form .span-2 {
  grid-column: 1 / -1;
}

.goal-engine-chain {
  min-width: 0;
  overflow-wrap: anywhere;
}

.learning-effect-assessment {
  min-width: 0;
  overflow-wrap: anywhere;
}

.learning-effect-form {
  margin-top: 14px;
}

.simulation-contract-card {
  min-width: 0;
  overflow-wrap: anywhere;
}

.unit-economics-coverage-source {
  min-width: 0;
  overflow-wrap: anywhere;
}

.unit-economics-unlinked {
  margin-top: 14px;
}

.development-coverage-warnings {
  margin-top: 12px;
}

.development-coverage-warnings p {
  margin: 4px 0;
}

.trust-plane-layers {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  margin: 14px 0;
}

.trust-plane-layers span {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 9px 10px;
}

.trust-plane-layers i {
  align-items: center;
  background: #f1edff;
  border-radius: 999px;
  color: #6d28d9;
  display: inline-flex;
  flex: 0 0 24px;
  font-style: normal;
  height: 24px;
  justify-content: center;
}

.autonomous-cycle-card {
  min-width: 0;
  overflow-wrap: anywhere;
}

.decision-adapter-card {
  min-width: 0;
  overflow-wrap: anywhere;
}

.integration-connector-list {
  display: grid;
  gap: 16px;
}

.integration-breadcrumb {
  margin: 0 0 4px;
  font-weight: 700;
}

.integration-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 12px;
  margin-top: 16px;
}

.integration-catalog-card {
  align-items: flex-start;
  min-height: 132px;
  height: auto;
  padding: 16px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  text-align: left;
}

.integration-catalog-card b,
.integration-catalog-card span,
.integration-catalog-card small {
  display: block;
}

.integration-catalog-card span {
  margin: 8px 0;
  color: #475569;
  font-weight: 500;
  line-height: 1.35;
}

.integration-catalog-card small {
  margin-top: auto;
  color: #6d28d9;
}

.integration-connector-card {
  min-width: 0;
}

.integration-status {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.integration-status.success {
  color: #166534;
  background: #f0fdf4;
}

.integration-status.warning {
  color: #92400e;
  background: #fffbeb;
}

.integration-status.error {
  color: #991b1b;
  background: #fef2f2;
}

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

.integration-facts > span {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.integration-facts small {
  color: #64748b;
}

.integration-facts b {
  overflow-wrap: anywhere;
}

.integration-actions,
.integration-log {
  margin-top: 14px;
}

.integration-log {
  overflow-x: auto;
}

@media (max-width: 760px) {
  .integration-facts {
    grid-template-columns: 1fr;
  }

  .integration-connector-card .toolbar {
    align-items: flex-start;
  }
}
