/* AMIR V4 (Stitch "Technical Precision") page layouts. Tokens: qa/stitch-v4-redesign-20260928/design-tokens.json */
:root {
  --v4-canvas: #f7f7f5; --v4-surface: #fff; --v4-ink: #171717; --v4-muted: #6b6b68; --v4-line: #e5e5e1;
  --v4-active: #2563eb; --v4-active-bg: #eff4ff; --v4-success: #16834a; --v4-success-bg: #eefaf3;
  --v4-attention: #b77900; --v4-attention-bg: #fff8e6; --v4-danger: #c83030; --v4-danger-bg: #fdeeee;
  --v4-mono: "JetBrains Mono", ui-monospace, monospace; --v4-r: 10px;
}
.v4-card { background: var(--v4-surface); border: 1px solid var(--v4-line); border-radius: var(--v4-r); padding: 20px; }
.v4-card + .v4-card, .v4-guided-main > * + * { margin-top: 16px; }
.v4-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.v4-card-head h2 { margin: 0; font: 600 18px/1.3 Geist, sans-serif; }
.v4-mono, .v4-kicker, .v4-chip, .v4-status { font-family: var(--v4-mono); }
.v4-kicker { display: inline-block; font-size: 11px; letter-spacing: .08em; font-weight: 600; color: var(--v4-muted); }
.v4-kicker.running { color: var(--v4-active); } .v4-kicker.waiting { color: var(--v4-attention); } .v4-kicker.completed { color: var(--v4-success); }
.v4-chip { padding: 2px 6px; border: 1px solid var(--v4-line); border-radius: 4px; font-size: 10px; color: var(--v4-muted); background: #fafafa; }
.v4-track { height: 6px; border-radius: 99px; background: #eeeeec; overflow: hidden; margin: 10px 0; }
.v4-track i { display: block; height: 100%; background: var(--v4-active); border-radius: inherit; transition: width .4s; }

/* page head */
.v4-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; font: 500 12px/1.4 var(--v4-mono); color: var(--v4-muted); }
.v4-breadcrumb button { border: 0; background: none; padding: 0; color: var(--v4-muted); font: inherit; cursor: pointer; }
.v4-breadcrumb button:hover { color: var(--v4-ink); text-decoration: underline; }
.v4-breadcrumb strong { color: var(--v4-ink); font-weight: 600; }
.v4-page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.v4-page-head h1 { margin: 0; font: 600 28px/1.2 Geist, sans-serif; letter-spacing: -.01em; }
.v4-page-head p { margin: 6px 0 0; color: var(--v4-muted); }
.v4-segmented { display: inline-flex; padding: 3px; border: 1px solid var(--v4-line); border-radius: 8px; background: #fafafa; }
.v4-segmented button { border: 0; border-radius: 6px; padding: 7px 12px; background: transparent; color: var(--v4-muted); font: 500 12px/1 var(--v4-mono); cursor: pointer; }
.v4-segmented button[aria-pressed="true"] { background: var(--v4-ink); color: #fff; }
.v4-product-switch { display: flex; gap: 6px; overflow-x: auto; margin: -6px 0 16px; padding-bottom: 2px; }
.v4-product-switch button { flex: none; border: 1px solid var(--v4-line); border-radius: 99px; background: var(--v4-surface); padding: 6px 12px; font-size: 13px; }
.v4-product-switch button[aria-selected="true"] { border-color: var(--v4-ink); background: var(--v4-ink); color: #fff; }
.v4-loading { display: flex; gap: 8px; align-items: center; }

/* guided layout: main + right rail */
.v4-guided { display: grid; grid-template-columns: minmax(0, 1fr) 304px; gap: 24px; align-items: start; }
.v4-hero { position: relative; }
.v4-hero.running { border-color: #c9d8fb; }
.v4-hero.waiting { border-left: 4px solid var(--v4-attention); }
.v4-hero.completed { border-left: 4px solid var(--v4-success); }
.v4-hero-top { display: flex; gap: 16px; align-items: flex-start; }
.v4-hero-icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; border: 2px solid var(--v4-line); background: #fafafa; }
.v4-hero.running .v4-hero-icon { border-color: var(--v4-active); background: var(--v4-active-bg); }
.v4-hero.waiting .v4-hero-icon { color: var(--v4-attention); background: var(--v4-attention-bg); border-color: #f3d38a; }
.v4-hero.completed .v4-hero-icon { color: var(--v4-success); background: var(--v4-success-bg); border-color: #a9dfc0; }
.v4-hero-copy { flex: 1; min-width: 0; }
.v4-hero-copy h2 { margin: 6px 0 4px; font: 600 20px/1.3 Geist, sans-serif; }
.v4-hero-copy p { margin: 0; color: #3f3f3c; }
.v4-elapsed { flex: none; padding: 10px 14px; border: 1px solid var(--v4-line); border-radius: 8px; background: #fafafa; text-align: left; }
.v4-elapsed small { display: block; font: 600 10px/1 var(--v4-mono); letter-spacing: .08em; color: var(--v4-muted); }
.v4-elapsed strong { display: block; margin-top: 6px; font: 600 26px/1 var(--v4-mono); }
.v4-live-progress { margin-top: 14px; font: 500 12px/1.4 var(--v4-mono); }
.v4-activity { margin-top: 16px; border: 1px solid var(--v4-line); border-radius: 8px; padding: 12px 14px; }
.v4-activity > div { display: flex; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--v4-line); font: 600 10px/1 var(--v4-mono); letter-spacing: .08em; color: var(--v4-muted); }
.v4-activity p { margin: 8px 0 0; font-size: 14px; }
.v4-activity time { font-family: var(--v4-mono); color: var(--v4-muted); margin-right: 6px; }
.v4-activity .v4-auto-note { display: flex; gap: 6px; align-items: flex-start; color: var(--v4-active); font-size: 13px; }
.v4-auto-note .material-symbols-outlined { font-size: 16px; }
.v4-action-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--v4-line); }
.v4-action-bar small { display: block; font: 600 10px/1.2 var(--v4-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--v4-muted); }
.v4-action-bar strong { display: block; font-size: 14px; }
.v4-action-bar > div { min-width: 0; }
.v4-action-bar button.primary { flex: none; min-height: 40px; padding: 0 18px; }
.v4-hero .intake-job { margin-top: 16px; border: 1px solid var(--v4-line); box-shadow: none; }

/* seven phases */
.v4-phase-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.v4-phase { border: 1px solid var(--v4-line); border-radius: 8px; background: #fafafa; }
.v4-phase summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.v4-phase summary::-webkit-details-marker { display: none; }
.v4-phase > p { margin: 0; padding: 0 14px 12px 58px; color: #3f3f3c; font-size: 13px; }
.v4-phase-icon { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 99px; border: 1px solid var(--v4-line); background: #fff; font: 600 12px/1 var(--v4-mono); color: var(--v4-muted); }
.v4-phase-icon .material-symbols-outlined { font-size: 17px; }
.v4-phase-title { flex: 1; min-width: 0; display: grid; }
.v4-phase-title strong { font-weight: 500; font-size: 15px; }
.v4-phase-title small { font: 400 11px/1.4 var(--v4-mono); color: var(--v4-muted); }
.v4-status { flex: none; font-style: normal; font-size: 11px; padding: 3px 7px; border-radius: 4px; background: #f0f0ee; color: var(--v4-muted); }
.v4-phase.completed { background: var(--v4-success-bg); border-color: #bfe6cf; }
.v4-phase.completed .v4-phase-icon { background: var(--v4-success); border-color: var(--v4-success); color: #fff; }
.v4-phase.completed .v4-status { background: #d7f2e2; color: var(--v4-success); }
.v4-phase.running, .v4-phase.queued { background: var(--v4-active-bg); border-color: #b9ccf8; }
.v4-phase.running .v4-phase-icon, .v4-phase.queued .v4-phase-icon { border-color: var(--v4-active); }
.v4-phase.running .v4-status, .v4-phase.queued .v4-status { background: var(--v4-active); color: #fff; }
.v4-phase.running .v4-phase-title small { color: var(--v4-active); }
.v4-phase.waiting, .v4-phase.blocked { background: var(--v4-attention-bg); border-color: #f3d38a; }
.v4-phase.waiting .v4-phase-icon, .v4-phase.blocked .v4-phase-icon { color: var(--v4-attention); border-color: var(--v4-attention); }
.v4-phase.waiting .v4-status, .v4-phase.blocked .v4-status { background: #fdecc0; color: #7a5200; }
.v4-phase.failed { background: var(--v4-danger-bg); border-color: #f2b8b8; }
.v4-phase.failed .v4-status { background: var(--v4-danger); color: #fff; }
.v4-phase.pending .v4-phase-title strong { color: #5c5c59; }
.guided-configuration summary, .v4-done summary { cursor: pointer; font-weight: 500; }

/* rail */
.v4-rail { display: grid; gap: 16px; position: sticky; top: 84px; }
.v4-rail .v4-card { padding: 16px; margin: 0; }
.v4-rail strong { display: block; margin: 8px 0 4px; font-size: 15px; font-weight: 500; }
.v4-rail p { margin: 0; color: #3f3f3c; font-size: 13px; }
.v4-rail-now.running { border-color: #c9d8fb; }
.v4-next { list-style: none; margin: 10px 0 0; padding: 0 0 0 10px; border-left: 2px solid var(--v4-ink); display: grid; gap: 10px; }
.v4-next strong { margin: 0; font-size: 14px; }
.v4-next small { font: 400 11px/1.4 var(--v4-mono); color: var(--v4-muted); }
.v4-done ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.v4-done li { display: flex; gap: 8px; align-items: flex-start; }
.v4-done li .material-symbols-outlined { color: var(--v4-success); font-size: 18px; }
.v4-done li strong { margin: 0; font-size: 13px; }
.v4-done a { display: block; font: 400 12px/1.5 var(--v4-mono); color: var(--v4-active); }

/* detail mode */
.v4-detail-tools { margin-top: 20px; }
.v4-name-edit { margin-bottom: 12px; }
.v4-tool-body { margin-top: 16px; min-width: 0; }

@media (max-width: 1180px) {
  .v4-guided { grid-template-columns: minmax(0, 1fr); }
  .v4-rail { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 767px) {
  .v4-page-head h1 { font-size: 22px; }
  .v4-page-head { margin-bottom: 14px; }
  .v4-segmented { width: 100%; } .v4-segmented button { flex: 1; }
  .v4-card { padding: 16px; }
  .v4-hero-top { flex-wrap: wrap; }
  .v4-hero-icon { width: 40px; height: 40px; }
  .v4-elapsed { order: -1; margin-left: auto; padding: 6px 10px; }
  .v4-elapsed strong { font-size: 18px; margin-top: 3px; }
  .v4-rail { grid-template-columns: 1fr; }
  /* primary action stays within thumb reach, just above the bottom nav */
  .v4-action-bar { position: fixed; z-index: 44; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); margin: 0; padding: 10px 16px; background: rgba(255,255,255,.98); border-top: 1px solid var(--v4-line); box-shadow: 0 -6px 20px rgba(0,0,0,.06); }
  .v4-action-bar button.primary { max-width: 58%; white-space: normal; line-height: 1.2; padding: 8px 14px; }
  .v4-detail:has(.v4-action-bar) { padding-bottom: 80px; }
  .v4-phase > p { padding-left: 14px; }
}
@media (max-width: 1180px) { .v4-rail-now { display: none; } }

/* checkpoint pages: V4 head replaces the legacy one; one primary action per checkpoint */
.v4-cp > .stitch-page > .stitch-page-head, .v4-cp .lp-stitch > .stitch-page-head { display: none; }
.v4-cp .v4-page-head .focused-back { margin: 0; }
.v4-cp button.primary:not([data-cp2-approve]):not([data-copy-save]):not([data-campaign-execute]):not([data-copy-primary]):not([data-copy-retry]):not([data-cp3-flow] button):not([data-lp-fix] button):not([data-open-cp2]) { background: var(--v4-surface); color: var(--v4-ink); border: 1px solid var(--v4-line); }
[data-lp-refresh], [data-campaign-reload] { display: none !important; }
.v4-adcopy .campaign-status-strip, .v4-adcopy .campaign-accordion > details:not([data-campaign-section="copy"]),
.v4-adcopy #campaign-configuration > :not([type="hidden"]):not(:has([data-copy-save])), .v4-adcopy .campaign-inspector-rail { display: none !important; }
.v4-adcopy .campaign-inspector-layout { grid-template-columns: minmax(0, 1fr) !important; }
.v4-adcopy .campaign-accordion > details[data-campaign-section="copy"] > summary { pointer-events: none; }
.v4-adcopy #campaign-workflow-panel > h2 { display: none; }
.v4-adcopy .campaign-inspector-layout, .v4-adcopy .campaign-inspector-main { max-width: none; width: 100%; }
.v4-adcopy [data-copy-save], .v4-adcopy .campaign-copy-options:not(:has(option[value="0"])) [data-campaign-copy-generate] { background: var(--v4-ink); color: #fff; border-color: var(--v4-ink); min-height: 42px; font-weight: 600; }
.v4-adcopy .campaign-copy-options:not(:has(option[value="0"])) [data-copy-save] { display: none; }

/* product list */
.v4-list-page, .v4-overview { display: grid; grid-template-columns: minmax(0, 1fr) 304px; gap: 24px; align-items: start; }
.v4-list-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.v4-list-head h1 { margin: 0; font: 600 26px/1.2 Geist, sans-serif; }
.v4-list-head p { margin: 6px 0 0; color: var(--v4-muted); }
.v4-list-head .primary, .v4-list-rail .primary { min-height: 42px; padding: 0 18px; }
.v4-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; padding: 14px; }
.v4-filters select, .v4-search input { height: 38px; border: 1px solid var(--v4-line); border-radius: 6px; background: #fff; padding: 0 10px; font-size: 14px; }
.v4-search { position: relative; flex: 1 1 260px; display: flex; }
.v4-search input { width: 100%; padding-left: 34px; }
.v4-search .material-symbols-outlined { position: absolute; left: 9px; top: 9px; font-size: 20px; color: var(--v4-muted); }
.v4-table { margin-top: 16px; border: 1px solid var(--v4-line); border-radius: var(--v4-r); background: var(--v4-surface); overflow: hidden; }
.v4-tr { display: grid; grid-template-columns: minmax(130px, 1.3fr) minmax(90px, 1fr) 120px minmax(140px, 1.4fr) 104px; gap: 14px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--v4-line); }
.v4-th { border-top: 0; background: #fafaf8; font: 600 11px/1.3 var(--v4-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--v4-muted); }
.v4-tr > span { min-width: 0; display: grid; gap: 3px; }
.v4-tr small { color: var(--v4-muted); font-size: 12px; overflow-wrap: anywhere; }
.v4-td-name strong { font-weight: 500; }
.v4-td-name a { font: 400 12px/1.3 var(--v4-mono); color: var(--v4-active); }
.v4-td-action { justify-items: end; }
.v4-td-action button { min-height: 36px; padding: 0 14px; white-space: nowrap; }
.v4-segments { display: flex; gap: 3px; }
.v4-segments i { flex: 1; height: 6px; border-radius: 3px; background: #e7e7e4; }
.v4-segments i.completed { background: var(--v4-success); }
.v4-segments i.running, .v4-segments i.queued { background: var(--v4-active); }
.v4-segments i.waiting, .v4-segments i.blocked { background: var(--v4-attention); }
.v4-segments i.failed { background: var(--v4-danger); }
.v4-segments.is-loading i { animation: v4pulse 1.2s infinite alternate; }
@keyframes v4pulse { to { opacity: .45; } }
.v4-pill { display: inline-flex; align-items: center; gap: 6px; width: max-content; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--v4-line); font: 500 12px/1.3 var(--v4-mono); background: #f5f5f3; color: var(--v4-muted); }
.v4-pill i { width: 6px; height: 6px; border-radius: 99px; background: currentColor; }
.v4-pill.running { background: var(--v4-active-bg); color: var(--v4-active); border-color: #c9d8fb; }
.v4-pill.attention { background: var(--v4-attention-bg); color: #8a5a00; border-color: #f3d38a; }
.v4-pill.done { background: var(--v4-success-bg); color: var(--v4-success); border-color: #bfe6cf; }
.v4-empty { margin-top: 16px; text-align: center; padding: 40px 20px; }
.v4-empty p { color: var(--v4-muted); margin: 6px 0 0; }
.v4-list-foot { margin-top: 10px; }
.v4-rail-title { margin: 0 0 12px; font: 600 16px/1.3 Geist, sans-serif; }
.v4-stats { margin: 0; display: grid; gap: 8px; }
.v4-stats div { display: flex; justify-content: space-between; align-items: center; padding: 12px; border: 1px solid var(--v4-line); border-radius: 8px; }
.v4-stats dt { font-size: 14px; } .v4-stats dd { margin: 0; font: 600 22px/1 var(--v4-mono); }
.v4-stats .attention { background: var(--v4-attention-bg); border-color: #f3d38a; color: #8a5a00; }
@media (max-width: 1180px) {
  .v4-list-page, .v4-overview { grid-template-columns: minmax(0, 1fr); }
  .v4-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .v4-stats div { flex-direction: column; align-items: flex-start; gap: 6px; }
}
@media (max-width: 900px) {
  .v4-th { display: none; }
  .v4-tr { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .v4-tr > span:nth-child(2), .v4-tr > span:nth-child(3), .v4-tr > span:nth-child(4) { grid-column: 1 / -1; }
  .v4-tr > .v4-td-action { grid-column: 2; grid-row: 1; }
  .v4-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* overview */
.v4-ov-main > * + * { margin-top: 16px; }
.v4-stats-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.v4-stat { margin: 0 !important; }
.v4-stat > div { display: flex; justify-content: space-between; font: 600 11px/1.3 var(--v4-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--v4-muted); }
.v4-stat > div .material-symbols-outlined { font-size: 20px; }
.v4-stat strong { display: block; margin: 10px 0 2px; font: 600 30px/1 var(--v4-mono); }
.v4-stat small { color: var(--v4-muted); }
.v4-stat.running > div .material-symbols-outlined { color: var(--v4-active); }
.v4-stat.attention { border-color: #f3d38a; } .v4-stat.attention > div .material-symbols-outlined, .v4-stat.attention small { color: var(--v4-attention); }
.v4-stat.done > div .material-symbols-outlined { color: var(--v4-success); }
.v4-ov-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--v4-line); border-radius: 8px; }
.v4-ov-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 140px auto; gap: 12px; align-items: center; padding: 12px 14px; }
.v4-ov-row + .v4-ov-row { border-top: 1px solid var(--v4-line); }
.v4-ov-row button { min-height: 34px; padding: 0 14px; }
.v4-ov-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--v4-line); background: #fafafa; color: var(--v4-muted); }
.v4-ov-icon .material-symbols-outlined { font-size: 18px; }
.v4-ov-icon.running { color: var(--v4-active); background: var(--v4-active-bg); border-color: #c9d8fb; }
.v4-ov-icon.attention { color: var(--v4-attention); background: var(--v4-attention-bg); border-color: #f3d38a; }
.v4-ov-icon.danger { color: var(--v4-danger); background: var(--v4-danger-bg); border-color: #f2b8b8; }
.v4-ov-icon.done { color: var(--v4-success); background: var(--v4-success-bg); border-color: #bfe6cf; }
.v4-ov-copy { display: grid; min-width: 0; } .v4-ov-copy strong { font-weight: 500; } .v4-ov-copy small { color: var(--v4-muted); font: 400 12px/1.4 var(--v4-mono); overflow-wrap: anywhere; }
.v4-ov-progress { display: grid; gap: 4px; }
.v4-conn { margin: 0 0 14px; display: grid; }
.v4-conn div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--v4-line); }
.v4-conn dd { margin: 0; font: 500 12px/1.4 var(--v4-mono); } .v4-conn dd.ok { color: var(--v4-success); } .v4-conn dd.warn { color: var(--v4-attention); }
.v4-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.v4-feed li:not(.help):not(.error) { border: 1px solid var(--v4-line); border-radius: 8px; padding: 10px 12px; }
.v4-feed li.danger { border-color: #f2b8b8; background: var(--v4-danger-bg); }
.v4-feed li > div { display: flex; justify-content: space-between; font: 600 11px/1.3 var(--v4-mono); color: var(--v4-active); }
.v4-feed time { color: var(--v4-muted); font-weight: 400; }
.v4-feed p { margin: 6px 0 0; font-size: 13px; }
.v4-ov-tools { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.v4-ov-tools button { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 10px 12px; border: 1px solid var(--v4-line); border-radius: 8px; background: #fff; font: 600 13px/1 var(--v4-mono); }
@media (max-width: 767px) {
  .v4-stats-row { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .v4-stat { padding: 12px; } .v4-stat strong { font-size: 22px; } .v4-stat small { display: none; } .v4-stat > div .material-symbols-outlined { display: none; }
  .v4-ov-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .v4-ov-progress { grid-column: 2 / -1; grid-row: 2; }
}

/* intake: the one start button stays reachable above the bottom nav */
@media (max-width: 767px) {
  .intake-save-bar { position: fixed !important; left: 0 !important; right: 0 !important; bottom: calc(64px + env(safe-area-inset-bottom)) !important; top: auto !important; z-index: 44; margin: 0 !important; width: auto !important; padding: 8px 12px !important; display: flex !important; flex-flow: row wrap !important; align-items: center; gap: 4px 8px; border-radius: 0 !important; box-shadow: 0 -6px 20px rgba(0,0,0,.06); }
  .intake-save-bar > span { flex: 1 1 100%; min-width: 0; }
  .intake-save-bar small { display: none; }
  .intake-save-bar strong { font-size: 12px; line-height: 1.25; }
  .intake-save-bar .actions { display: flex !important; flex-direction: row !important; gap: 6px; flex: 1 1 100%; margin: 0 !important; }
  .intake-save-bar .actions button.primary { flex: 1; }
  .intake-save-bar .actions button { width: auto !important; min-height: 40px; padding: 0 10px; font-size: 13px; }
  .intake-page { padding-bottom: 120px; }
}
.v4-inventory { margin-top: 20px; }
.v4-inv-group { border-top: 1px solid var(--v4-line); padding: 10px 0; }
.v4-inv-group summary { display: flex; justify-content: space-between; cursor: pointer; }
.v4-inv-group ul { margin: 8px 0 0; padding-left: 18px; font: 400 13px/1.7 var(--v4-mono); overflow-wrap: anywhere; }
.v4-inv-group .v4-conn dd { text-align: right; overflow-wrap: anywhere; }
.intake-page input[type="checkbox"] { width: 18px !important; height: 18px !important; flex: none; }
.v4-rail .guided-summary ul { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; gap: 8px; }
.v4-rail .guided-summary li { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.v4-rail .guided-summary li > div { display: grid; min-width: 0; }
.v4-rail .guided-summary small { color: var(--v4-muted); font-size: 12px; }
.v4-rail .guided-summary-label { margin: 8px 0 0; font: 600 11px/1.3 var(--v4-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--v4-muted); }
.v4-rail .guided-task button { flex: none; padding: 4px 10px; min-height: 30px; }
.v4-btn-attention { border: 1px solid #e0a800 !important; background: var(--v4-attention-bg) !important; color: #6b4600 !important; font-weight: 600; }

/* CP2: status + approval first, then the live preview, then technical panels */
.v4-cp2 .lp-studio { display: flex !important; flex-direction: column; gap: 16px; }
.v4-cp2 .lp-control-column, .v4-cp2 .lp-preview-column { display: contents !important; }
.v4-cp2 .lp-studio > * > * { margin: 0 !important; }
.v4-cp2 #lp-panel { order: 1; } .v4-cp2 .lp-device-tabs { order: 2; } .v4-cp2 #lp-live-preview { order: 3; }
.v4-cp2 #lp-revision-panel { order: 4; } .v4-cp2 .lp-pricing-card { order: 5; } .v4-cp2 #checkout-panel { order: 6; }
.v4-cp2 #tracking-qa-panel { order: 7; } .v4-cp2 #lp-size-panel { order: 8; } .v4-cp2 #formulir-publication-panel { order: 9; } .v4-cp2 #checkout-activation-panel { order: 10; }
.v4-cp2 [data-cp2-approve] { min-height: 42px; padding: 0 18px; font-weight: 600; }
.v4-cp2 .lp-studio section.panel { width: 100%; max-width: none; box-sizing: border-box; }
.v4-status-choices { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.v4-status-choices legend { font-weight: 600; margin-bottom: 8px; }
.v4-choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--v4-line); border-radius: 8px; background: #fff; cursor: pointer; }
.v4-choice.is-selected { border-color: var(--v4-ink); box-shadow: inset 0 0 0 1px var(--v4-ink); }
.v4-choice input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.v4-choice span { display: grid; gap: 2px; } .v4-choice small { color: var(--v4-muted); }
.v4-choice em { font-style: normal; margin-left: 6px; }
.v4-manual-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; padding: 12px; border: 1px dashed var(--v4-line); border-radius: 8px; }
.v4-manual-status label { display: grid; gap: 4px; font-size: 13px; }
[hidden] { display: none !important; }
.v4-tr > span > small:last-child:not(.v4-mono) { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.v4-ov-copy small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* CP1: LP copy & message direction */
.v4-copy-review > * + * { margin-top: 16px; }
.v4-copy-review h3 { margin: 16px 0 6px; font: 600 14px/1.3 Geist, sans-serif; }
.v4-copy-review ul { margin: 0; padding-left: 20px; }
.v4-field { display: grid; gap: 6px; font-weight: 500; }
.v4-field input, .v4-field textarea { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid var(--v4-line); border-radius: 6px; }
.v4-copy-hero { margin-top: 14px; padding: 14px; border: 1px solid var(--v4-line); border-radius: 8px; background: #fafaf8; }
.v4-copy-hero small { font: 600 10px/1 var(--v4-mono); letter-spacing: .08em; color: var(--v4-muted); }
.v4-copy-hero strong { display: block; margin-top: 6px; font-size: 18px; }
.v4-copy-hero p { margin: 4px 0 0; color: #3f3f3c; }
.v4-faq dt { font-weight: 600; margin-top: 8px; } .v4-faq dd { margin: 2px 0 0; color: #3f3f3c; }
.v4-cp1 .v4-action-bar { position: sticky; bottom: 0; background: var(--v4-surface); padding: 12px 16px; border: 1px solid var(--v4-line); border-radius: var(--v4-r); z-index: 5; }
@media (max-width: 767px) { .v4-cp1 .v4-action-bar { position: fixed; border-radius: 0; } .v4-copy-review { padding-bottom: 80px; } }

/* ---- Paket 30 Sep 2026 (ui-core): D2 prepared work, PAL fallback, CP3 single flow, strategy, LP fix, Kill ---- */
/* D2: work prepared ahead of the gate phase; never counted as a finished phase */
.v4-segments i.prepared { background-image: repeating-linear-gradient(135deg, #c9d8fb 0 3px, transparent 3px 6px); }
.v4-chip-prepared { color: var(--v4-active); border-color: #c9d8fb; background: var(--v4-active-bg); }
.v4-prepared { margin: 0 14px 12px 58px; padding: 10px 12px; border: 1px dashed #b9ccf8; border-radius: 8px; background: #fff; }
.v4-prepared.has-issue { border-color: #f2b8b8; }
.v4-prepared > p { margin: 4px 0 8px; }
.v4-prepared ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.v4-prepared li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.v4-prepared li > .material-symbols-outlined { font-size: 18px; color: var(--v4-muted); }
.v4-prepared li.completed > .material-symbols-outlined { color: var(--v4-success); }
.v4-prepared li.failed > .material-symbols-outlined, .v4-prepared li.blocked > .material-symbols-outlined { color: var(--v4-danger); }
.v4-prepared li strong { display: block; font-weight: 500; }
.v4-prepared li small { font: 400 11px/1.4 var(--v4-mono); color: var(--v4-muted); }
.v4-prepared li p { margin: 4px 0 0; }
.v4-prepared .production-spinner { width: 14px; height: 14px; margin-top: 2px; }

/* C4: PAL review fallback */
.v4-pal-review { margin-top: 16px; padding: 16px; border: 1px solid #f3d38a; border-radius: 8px; background: var(--v4-attention-bg); }
.v4-pal-review.is-running { display: flex; gap: 12px; border-color: #c9d8fb; background: var(--v4-active-bg); }
.v4-pal-review.is-running p { margin: 4px 0 0; }
.v4-pal-review-head { display: flex; gap: 10px; align-items: flex-start; }
.v4-pal-review-head > .material-symbols-outlined { color: var(--v4-attention); }
.v4-pal-review-head p { margin: 4px 0 0; }
.v4-pal-attempts { margin: 10px 0; padding-left: 20px; font: 400 12px/1.6 var(--v4-mono); color: var(--v4-muted); }
.v4-pal-review form .field { display: grid; gap: 6px; }
.v4-pal-review input[type="url"] { width: 100%; min-width: 0; }
.v4-pal-review .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* B2: CP3 single flow */
.v4-cp3-flow { margin: 16px 0; }
.v4-cp3-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.v4-cp3-step { border: 1px solid var(--v4-line); border-radius: var(--v4-r); background: var(--v4-surface); padding: 16px; }
.v4-cp3-step.is-current { border-color: var(--v4-ink); box-shadow: inset 3px 0 0 var(--v4-ink); }
.v4-cp3-step.is-done { background: #fcfdfc; }
.v4-cp3-step.is-future { opacity: .75; }
.v4-cp3-step > header { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.v4-cp3-step > header > div { flex: 1; min-width: 0; }
.v4-cp3-step h3 { margin: 0; font: 600 16px/1.3 Geist, sans-serif; }
.v4-cp3-step header p { margin: 2px 0 0; color: var(--v4-muted); font-size: 13px; }
.v4-cp3-num { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 99px; background: var(--v4-ink); color: #fff; font: 600 12px/1 var(--v4-mono); }
.v4-cp3-step.is-future .v4-cp3-num { background: #e7e7e4; color: var(--v4-muted); }
.v4-cp3-step.is-done .v4-cp3-num { background: var(--v4-success); }
.v4-cp3-num .material-symbols-outlined { font-size: 16px; }
.v4-cp3-step .actions-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.v4-cp3-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 12px; border: 1px solid var(--v4-line); border-radius: 8px; background: #fafafa; }
.v4-cp3-summary .full { grid-column: 1 / -1; }
.v4-cp3-summary dt { font: 600 10px/1.2 var(--v4-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--v4-muted); }
.v4-cp3-summary dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.v4-cp3-check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--v4-line); border-radius: 8px; cursor: pointer; }
.v4-cp3-check input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.v4-cp3-check span { display: grid; gap: 4px; } .v4-cp3-check small { color: var(--v4-muted); }
.v4-cp3-invalid { margin: 0 0 10px; }
.v4-cp3-cooldown { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; padding: 10px 12px; border-radius: 8px; background: var(--v4-attention-bg); color: #7a5200; }
.v4-cp3-cooldown strong { font-family: var(--v4-mono); }
.v4-cp3-result { display: flex; gap: 14px; align-items: flex-start; }
.v4-cp3-result > div { flex: 1; min-width: 0; }
.v4-cp3-result h3 { margin: 4px 0; font: 600 18px/1.3 Geist, sans-serif; }
.v4-cp3-result p { margin: 4px 0; }
.v4-cp3-flow.is-finished, .v4-cp3-flow.is-running, .v4-cp3-flow.is-attention { padding: 16px; border: 1px solid var(--v4-line); border-radius: var(--v4-r); background: var(--v4-surface); }
.v4-cp3-flow.is-finished { border-left: 4px solid var(--v4-success); } .v4-cp3-flow.is-finished .v4-cp3-result > .material-symbols-outlined { color: var(--v4-success); }
.v4-cp3-flow.is-running { border-color: #c9d8fb; }
.v4-cp3-flow.is-attention { border-left: 4px solid var(--v4-attention); } .v4-cp3-flow.is-attention .v4-cp3-result > .material-symbols-outlined { color: var(--v4-attention); }
.v4-cp3-flow > .actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.v4-cp3-conflict { display: grid; gap: 6px; margin: 8px 0; }
.v4-cp3-conflict dt { font: 600 10px/1.2 var(--v4-mono); color: var(--v4-muted); text-transform: uppercase; }
.v4-cp3-conflict dd { margin: 0; overflow-wrap: anywhere; }
.v4-cooldown-card { border-color: #f3d38a; background: var(--v4-attention-bg); }
.v4-cooldown-card.is-ended { border-color: #c9d8fb; background: var(--v4-active-bg); }
.v4-cooldown-card > div { display: flex; gap: 8px; align-items: center; }
.v4-cooldown-card p { margin: 6px 0 0; font-size: 13px; }

/* F1: strategy defaults + effective chips */
.v4-strategy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.v4-strategy-group .v4-choice { padding: 10px 12px; }
.v4-strategy-effective { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--v4-line); }
.v4-strategy-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.v4-strategy-chip { display: inline-flex; gap: 6px; align-items: baseline; padding: 3px 9px; border: 1px solid var(--v4-line); border-radius: 99px; background: #fafafa; font-size: 12px; }
.v4-strategy-chip small { font: 500 10px/1 var(--v4-mono); color: var(--v4-muted); }
.v4-strategy-chip.is-override { border-color: #f3d38a; background: var(--v4-attention-bg); }
.v4-strategy-card > summary { display: flex; justify-content: space-between; gap: 12px; align-items: center; cursor: pointer; list-style: none; }
.v4-strategy-card > summary::-webkit-details-marker { display: none; }
.v4-strategy-card > summary span { display: grid; } .v4-strategy-card > summary small { color: var(--v4-muted); font: 400 12px/1.4 var(--v4-mono); }
.v4-strategy-card .v4-strategy-defaults { margin: 16px 0; box-shadow: none; }
.v4-strategy-products { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.v4-strategy-products li { display: grid; grid-template-columns: minmax(140px, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--v4-line); border-radius: 8px; }
.v4-strategy-products li > div:first-child { display: grid; } .v4-strategy-products small { color: var(--v4-muted); font-size: 12px; }
.v4-strategy-override { margin-top: 12px; }

/* C1/F2: LP image fixes */
.v4-lp-fix { margin: 12px 0; display: grid; gap: 12px; }
.v4-required-text { margin: 0 0 10px; padding: 10px 12px 10px 28px; border-radius: 8px; background: var(--v4-danger-bg); color: #7d1f1f; font-size: 13px; }
.v4-lp-restore summary { cursor: pointer; font-weight: 500; }

/* F9: Kill */
.auto-kill { margin: 16px 0; }
.v4-kill-status { padding: 12px 14px; border-radius: 8px; border: 1px solid var(--v4-line); }
.v4-kill-status.is-done { background: var(--v4-success-bg); border-color: #bfe6cf; }
.v4-kill-status.is-attention { background: var(--v4-attention-bg); border-color: #f3d38a; }
.v4-kill-status strong, .v4-kill-status small { display: block; } .v4-kill-status small { color: var(--v4-muted); font: 400 12px/1.4 var(--v4-mono); }
.v4-kill-steps { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.v4-kill-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--v4-line); border-radius: 8px; }
.v4-kill-steps li > div { flex: 1; min-width: 0; } .v4-kill-steps li small { display: block; color: var(--v4-muted); overflow-wrap: anywhere; }
.v4-kill-steps em { font: 600 10px/1.4 var(--v4-mono); font-style: normal; color: var(--v4-muted); }
.v4-kill-steps li.is-done > .material-symbols-outlined, .v4-kill-steps li.is-done em { color: var(--v4-success); }
.v4-kill-steps li.is-failed { border-color: #f2b8b8; background: var(--v4-danger-bg); }
.v4-kill-steps li.is-failed > .material-symbols-outlined, .v4-kill-steps li.is-failed em { color: var(--v4-danger); }
.v4-kill-steps li.is-waiting > .material-symbols-outlined { color: var(--v4-attention); }

/* Scale-out / GAKOMON / T4JAM hosts (renderers in paket.js) */
.v4-paket-host { min-width: 0; }
.v4-gakomon-switch { margin-bottom: 16px; flex-wrap: wrap; }
.v4-mobile-only { display: none; }

@media (max-width: 900px) {
  .v4-strategy-grid { grid-template-columns: minmax(0, 1fr); }
  .v4-strategy-products li { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .v4-mobile-only { display: inline-flex; margin-bottom: 12px; }
  .v4-product-menu { width: 100%; } .v4-product-menu button { flex: 1; }
  .v4-prepared { margin-left: 14px; }
  .v4-cp3-summary { grid-template-columns: minmax(0, 1fr); }
  .v4-cp3-step, .v4-cp3-flow.is-finished, .v4-cp3-flow.is-running, .v4-cp3-flow.is-attention { padding: 12px; }
  .v4-cp3-step .actions-row > button, .v4-pal-review .actions > button { flex: 1 1 100%; }
}
/* wave D: Mode Detail — the next step's primary lives in the progress panel (or Mode Dipandu); older tool-body buttons step down */
.v4-detail .v4-tool-body button.primary { background: var(--v4-surface); color: var(--v4-ink); border: 1px solid var(--v4-line); }
[data-cp2-guard] [data-open-cp2] { margin-left: 8px; }
.v4-controller-switch { margin: 10px 0 14px; padding: 10px 12px; border: 1px solid var(--v4-line); border-radius: 8px; }
.v4-controller-switch summary { cursor: pointer; font-weight: 600; }
.v4-controller-switch .field { margin-top: 10px; }
.v4-switch-status { margin: 10px 0 0; padding: 0; border: 0; display: flex; gap: 16px; flex-wrap: wrap; }
.v4-switch-status legend { font-weight: 600; margin-bottom: 4px; font-size: 13px; }

/* Automasi list (Stitch desktop-automasi-list, approved 30 Sep 2026): slim tool row, compact campaign rows, right drawer. */
.auto-agents { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 20px 20px 0; padding: 8px 10px; border: 1px solid var(--v4-line); border-radius: 8px; background: var(--v4-surface); }
.auto-agent { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border: 1px solid var(--v4-line); border-radius: 6px; background: #fafaf8; color: var(--v4-ink); font: 500 12px/1 var(--v4-mono); cursor: pointer; }
.auto-agent:hover { border-color: var(--v4-ink); }
.auto-agent strong { font-weight: 600; }
.auto-agent span { color: var(--v4-muted); font-size: 10px; }
.auto-agent em { font-style: normal; color: var(--v4-muted); }
.auto-agent.is-attention em { color: var(--v4-danger); } .auto-agent.is-waiting em { color: var(--v4-attention); }
.auto-agents-engine { margin-left: auto; color: var(--v4-muted); font: 500 11px/1.4 var(--v4-mono); }
.auto-dot { flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 99px; background: #c4c4c0; }
.is-running > .auto-dot, .is-running .auto-row-status .auto-dot { background: var(--v4-success); }
.is-waiting > .auto-dot, .is-waiting .auto-row-status .auto-dot { background: var(--v4-active); }
.is-attention > .auto-dot, .is-attention .auto-row-status .auto-dot { background: var(--v4-attention); }
.auto-section > header h2 { display: flex; align-items: center; gap: 6px; }
.auto-attention { padding: 12px 14px; border: 1px solid #f3d38a; border-radius: 8px; background: var(--v4-attention-bg); }
.auto-attention > header { margin: 0 0 10px; }
.auto-attention h2 { color: #6b4600; font: 600 12px/1.3 var(--v4-mono) !important; letter-spacing: .06em; text-transform: uppercase; }
.auto-attention h2 .material-symbols-outlined { font-size: 18px; color: var(--v4-attention); }
.auto-attention .auto-row { border-left: 3px solid var(--v4-attention); }
.auto-attention .auto-rows { gap: 6px; }
.auto-link { min-height: 36px; padding: 0 12px; border: 1px solid var(--v4-line); border-radius: 6px; background: var(--v4-surface); font-size: 12px; }
#automation-campaigns .auto-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
#automation-campaigns .auto-filter { gap: 0; border-bottom: 1px solid var(--v4-line); }
#automation-campaigns .auto-filter button { min-height: 44px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--v4-muted); }
#automation-campaigns .auto-filter button[aria-pressed=true] { border-bottom-color: var(--v4-ink); background: none; color: var(--v4-ink); font-weight: 600; }
#automation-campaigns .auto-search { flex: 0 1 340px; min-height: 40px; border-color: var(--v4-line); border-radius: 6px; }
.auto-rows { display: grid; gap: 0; }
.auto-table { border: 1px solid var(--v4-line); border-radius: 8px; overflow: hidden; background: var(--v4-surface); }
.auto-row-head, .auto-row { display: grid; grid-template-columns: 128px minmax(0, 1fr) 96px 118px 58px 112px 70px; align-items: center; gap: 12px; padding: 0 14px; }
.auto-row-head { min-height: 36px; background: #fafaf8; border-bottom: 1px solid var(--v4-line); color: var(--v4-muted); font: 600 10px/1.2 var(--v4-mono); letter-spacing: .06em; text-transform: uppercase; }
#automation-panel .auto-row, .auto-row { width: 100%; min-height: 56px; padding-block: 7px; border: 0; border-bottom: 1px solid var(--v4-line); border-radius: 0; background: var(--v4-surface); color: var(--v4-ink); font: inherit; text-align: left; cursor: pointer; }
div.auto-row { cursor: default; }
.auto-attention .auto-row { border: 1px solid #f0dca8; border-left-width: 3px; border-left-color: var(--v4-attention); border-radius: 6px; }
.auto-table .auto-row:last-of-type { border-bottom: 0; }
button.auto-row:hover { background: #fafaf8; }
button.auto-row:focus-visible { outline: 2px solid var(--v4-active); outline-offset: -2px; }
.auto-row[hidden] { display: none; }
.auto-row > span { min-width: 0; }
.auto-row-status { display: flex; align-items: center; gap: 8px; font: 500 12px/1.3 var(--v4-mono); }
.is-running .auto-row-status { color: var(--v4-success); } .is-waiting .auto-row-status { color: var(--v4-active); }
.is-attention .auto-row-status { color: var(--v4-attention); } .is-stopped .auto-row-status, .is-archive .auto-row-status { color: var(--v4-muted); }
.auto-row-name { display: grid; gap: 2px; }
.auto-row-name strong, .auto-row-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auto-row-name strong { font-size: 13px; font-weight: 600; }
.auto-row-name small { color: var(--v4-muted); font: 11px/1.3 var(--v4-mono); }
.auto-row-reason { color: #8a5a00; }
.auto-row-account { font: 600 11px/1.3 var(--v4-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auto-row-manager { justify-self: start; max-width: 100%; padding: 3px 7px; border: 1px solid var(--v4-line); border-radius: 4px; background: #fafaf8; color: var(--v4-muted); font: 500 11px/1.3 var(--v4-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auto-row-manager.mgr-t4jam { border-color: #b9ccf7; background: var(--v4-active-bg); color: var(--v4-active); }
.auto-row-manager.mgr-amon { color: var(--v4-ink); }
.auto-row-manager:empty { display: none; }
.auto-row-tools { display: flex; gap: 6px; align-items: center; }
.auto-tool-dot { display: inline-block; width: 9px; height: 9px; border-radius: 99px; background: #e2e2de; }
.auto-tool-dot.is-ok { background: var(--v4-success); } .auto-tool-dot.is-warn { background: var(--v4-attention); } .auto-tool-dot.is-bad { background: var(--v4-danger); }
.auto-row-time { color: var(--v4-muted); font: 11px/1.3 var(--v4-mono); text-align: right; overflow-wrap: anywhere; }
.auto-row-go { justify-self: end; font: 600 12px/1 var(--v4-mono); white-space: nowrap; }
.auto-row-go button { min-height: 36px; padding: 0 10px; font-size: 12px; }
/* Drawer: right side on desktop, bottom sheet on phones. Reuses the dialog focus trap in openAutomationDetail. */
.auto-detail-overlay { place-items: stretch end !important; padding: 0 !important; }
.auto-detail-overlay .app-dialog.auto-detail { display: flex; flex-direction: column; width: min(460px, 100vw); height: 100vh; max-height: 100vh; border-radius: 0; border-left: 1px solid var(--v4-line); padding: 18px 20px 20px; }
.auto-detail .auto-kill { margin: auto -20px -20px; padding: 16px 20px 20px; border-top: 1px solid var(--v4-line); background: #fafaf8; }
.auto-detail .auto-kill button.danger, .auto-detail [data-kill-start] { width: 100%; min-height: 44px; border-color: var(--v4-danger); background: var(--v4-danger); color: #fff; font-weight: 600; }
.auto-detail .v4-controller-switch > summary { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-bottom: 8px; border: 1px solid var(--v4-line); border-radius: 6px; background: var(--v4-surface); cursor: pointer; font-weight: 500; }
@media (max-width: 1100px) { .auto-row-head, .auto-row { grid-template-columns: 118px minmax(0, 1fr) 64px 108px 54px 96px; } .auto-row-head > :last-child, .auto-row-go { display: none; } .auto-row-go:has(button) { display: block; grid-column: 1 / -1; justify-self: end; } }
@media (max-width: 767px) {
  .auto-agents { margin: 14px 14px 0; }
  .auto-agents-engine { margin-left: 0; width: 100%; }
  .auto-row-head { display: none; }
  /* Two lines on phones: status + name, then account · manager · dots · time (::after forces the break). */
  #automation-panel .auto-row, .auto-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 12px; min-height: 56px; }
  .auto-row::after { content: ""; flex-basis: 100%; order: 1; }
  .auto-row-status { flex: none; font-size: 11px; } .auto-row-name { flex: 1 1 0; }
  .auto-row-account, .auto-row-manager, .auto-row-tools, .auto-row-time, .auto-row-go { order: 2; }
  .auto-row-account { flex: 0 1 auto; max-width: 38%; }
  .auto-row-time { flex: 1 1 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .auto-agent span { display: none; }
  .auto-row-id { display: none; }
  .auto-row-go button { min-height: 44px; }
  #automation-campaigns .auto-toolbar { display: grid; }
  #automation-campaigns .auto-filter { overflow-x: auto; }
  #automation-campaigns .auto-search { flex: none; width: 100%; }
  .auto-detail-overlay { place-items: end stretch !important; }
  .auto-detail-overlay .app-dialog.auto-detail { width: 100vw; height: auto; max-height: 88vh; border-left: 0; border-top: 1px solid var(--v4-line); border-radius: 14px 14px 0 0; padding: 16px 14px 14px; }
  .auto-detail .auto-kill { margin: auto -14px -14px; padding: 14px; }
}
/* G1–G4 (30 Sep): campaign ON/OFF in the automation drawer, scale-out chips on rows and products */
.auto-power { padding: 14px; border: 1px solid var(--v4-line); border-radius: 8px; background: #fafaf8; }
.auto-power h3 { margin: 0 0 8px; font-size: 14px; }
.v4-power-state { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font: 500 13px/1.4 var(--v4-mono); }
.auto-power > small { display: block; margin-top: 4px; color: var(--v4-muted); font: 11px/1.4 var(--v4-mono); }
.auto-power .help { margin: 6px 0 0; }
.auto-power .auto-card-actions { margin-top: 10px; }
.auto-power .auto-card-actions button { width: 100%; min-height: 44px; }
.auto-power button.primary { background: var(--v4-ink); color: #fff; border-color: var(--v4-ink); font-weight: 600; }
.auto-power .v4-power-locked { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: #eeeeec; color: var(--v4-muted); border-color: var(--v4-line); cursor: not-allowed; }
.auto-power .error:empty { display: none; }
.auto-row-so, .v4-so-count { display: inline-block; margin-right: 6px; padding: 0 5px; border: 1px solid var(--v4-line); border-radius: 4px; background: #f3f3f0; color: var(--v4-ink); font: 500 10px/1.6 var(--v4-mono); white-space: nowrap; }
.v4-so-count { margin: 2px 0 0; justify-self: start; }

/* 30 Sep 2026: very long product names without spaces must wrap, not push the page sideways */
.v4-ov-copy{min-width:0}
.v4-ov-copy strong,.v4-ov-copy small{overflow-wrap:anywhere;word-break:break-word}

/* Daftar Produk: archive toggle + small text button next to "Buka" */
.v4-archive-toggle{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--v4-muted);white-space:nowrap}
.v4-link-btn{background:none;border:0;padding:4px 6px;font-size:12px;color:var(--v4-muted);text-decoration:underline;cursor:pointer}
.v4-td-action{display:flex;align-items:center;gap:4px;flex-wrap:wrap}

/* Batch approval (restored 1 Oct 2026): compact list, same rhythm as Automasi rows */
.v4-approval-list{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:6px}
.v4-approval-list label{display:grid;grid-template-columns:24px 1fr auto;align-items:center;gap:10px;min-height:52px;padding:8px 12px;border:1px solid var(--v4-line,#e3e3e3);border-radius:10px;cursor:pointer}
.v4-approval-list li.is-blocked label{cursor:default;opacity:.7}
.v4-approval-list li.is-selected label{border-color:var(--v4-ink,#111)}
.v4-approval-list strong{display:block}
.v4-approval-list small{color:var(--v4-muted);display:block;overflow-wrap:anywhere}
.v4-approval-foot{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;margin-top:12px}
.v4-approval-foot [data-approval-total]{display:flex;gap:8px;align-items:baseline}

/* Owner 1 Oct 2026: "Ganti video otomatis" switch */
.v4-gv-row { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; margin: 14px 0; padding: 12px 14px; border: 1px solid var(--v4-line); border-radius: 8px; }
.v4-gv-row .help { margin: 4px 0 0; }
.v4-toggle { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.v4-toggle input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex: none; width: 42px; min-width: 42px; height: 24px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 99px; background: #c9c9c9; position: relative; cursor: pointer; transition: background .15s; }
.v4-toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.v4-toggle input:checked { background: var(--v4-ink); }
.v4-toggle input:checked::after { transform: translateX(18px); }
.v4-toggle input:focus-visible { outline: 2px solid var(--v4-ink); outline-offset: 2px; }
.v4-toggle input:disabled { opacity: .5; cursor: not-allowed; }
.v4-toggle em { font-style: normal; font-size: 13px; min-width: 38px; white-space: nowrap; }
.auto-gv h4 { margin: 14px 0 6px; font-size: 13px; }
.v4-gv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.v4-gv-list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 10px; border: 1px solid var(--v4-line); border-radius: 6px; }
.v4-gv-list li div { min-width: 0; }
.v4-gv-list small { display: block; color: var(--v4-muted, #666); overflow-wrap: anywhere; }
.auto-gv .v4-gv-row { margin-top: 0; }
.auto-gv-overview header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.v4-gv-dry { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.v4-gv-dry > li { border: 1px solid var(--v4-line); border-radius: 8px; padding: 10px 12px; }
.v4-gv-dry-head { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; }
.v4-gv-dry-head strong { overflow-wrap: anywhere; }
.v4-gv-dry ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.v4-gv-dry .is-plan { font-weight: 600; }
.v4-gv-dry .is-warn { color: var(--warning-text, #8a5a00); }
/* Owner 1 Oct 2026: tabs Berjalan/Dihentikan, account filter, checkboxes + bulk bar (Automasi, GAKOMON, AMON, HAMEN) */
.list-toolbar { flex-wrap: wrap; gap: 10px; }
.list-account { width: auto; min-width: 170px; min-height: 36px; padding: 6px 10px; }
.list-row-wrap { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--v4-line); }
.list-row-wrap > :not(.list-pick) { flex: 1; min-width: 0; border-bottom: 0; }
.list-row-wrap[hidden] { display: none; }
.list-pick { flex: none; width: 18px; height: 18px; min-height: 0; margin: 0 0 0 12px; padding: 0; }
span.list-pick { display: inline-block; }
.list-bulk { position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 14px; border-radius: 8px; background: var(--v4-ink); color: #fff; box-shadow: 0 8px 24px #0003; }
.list-bulk[hidden] { display: none; }
.list-bulk strong { margin-right: 6px; }
.list-bulk button { min-height: 34px; padding: 6px 10px; background: #fff; color: var(--v4-ink); border-color: #fff; }
.list-bulk button.danger { background: #fff; color: #b42318; border-color: #b42318; }
.list-bulk .text-button { background: none; color: #fff; border: 0; margin-left: auto; }
.list-report ul { margin: 6px 0; padding-left: 18px; font-size: 13px; }
.attn-card { padding: 12px 14px; border-bottom: 1px solid var(--v4-line); }
.attn-card p { margin: 4px 0; font-size: 13px; }
.attn-card .auto-card-actions { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.button-link { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border: 1px solid var(--v4-line); border-radius: 6px; text-decoration: none; color: inherit; font-size: 13px; }
@media (max-width: 760px) { .list-bulk { bottom: 72px; } .list-account { flex: 1; } }
/* Owner 1 Oct 2026: intake de-duplication */
button.preflight-check { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; }
button.preflight-check:hover, button.preflight-check:focus-visible { background: var(--v4-surface, #f4f4f2); }
.jump-flash { animation: jump-flash 1.6s ease-out; }
@keyframes jump-flash { 0%, 40% { box-shadow: 0 0 0 3px var(--v4-ink); } 100% { box-shadow: 0 0 0 0 transparent; } }
.v4-amon-slot { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--v4-line); border-radius: 8px; }
.v4-amon-slot[hidden] { display: none; }
.v4-strategy-own { margin-top: 12px; }
.v4-strategy-own > summary { cursor: pointer; font-weight: 600; }
.checkout-package-row.is-main { border-color: var(--v4-ink); }
.main-package { margin-left: auto; margin-right: 8px; font-size: 13px; }
button.preflight-check small::after { content: " →"; }
.main-package { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.main-package input[type="radio"] { width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; flex: none; }
.checkout-package-row .card-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Owner 1 Oct 2026: Input Batch per-group setting */
.pill-missing { display: inline-block; padding: 1px 8px; border-radius: 99px; background: #fde8e8; color: #b42318; font-size: 12px; }
.intake-group-bar { position: static; margin: 8px 0; }
.intake-group-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.intake-group-banner button { margin-left: auto; }
tr.is-grouped { background: #eef4ff; }

/* Login Meta AMIR (owner 3 Oct 2026) */
.meta-login-card { margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.meta-login-card .meta-login-alert { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #fcd34d; background: #fffbeb; color: #92400e; border-radius: 8px; padding: 10px 12px; }
.meta-login-card .meta-login-alert p { margin: 0; }
.meta-login-card .connection-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; background: var(--v4-soft, #f5f5f5); border-radius: 8px; padding: 12px; }
.meta-login-card .connection-facts > div { display: block; }
.meta-login-card .connection-facts span { display: block; font-family: var(--v4-mono, monospace); font-size: 11px; text-transform: uppercase; color: #737373; }
.meta-login-card strong.warn, .meta-login-card .help.warn { color: #b91c1c; }
.meta-login-card .actions-row { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-login-scopes summary { cursor: pointer; font-family: var(--v4-mono, monospace); font-size: 12px; }
.meta-login-scopes ul { margin: 8px 0; padding-left: 18px; font-size: 13px; }
.attn-card.is-critical { border-left: 3px solid #dc2626; }
