/* Sales Counter admin. Scoped under .scw-wrap so it never leaks into other screens. */
.scw-wrap {
	--scw-ink: #0f1b2d;
	--scw-ink-2: #1b2b45;
	--scw-paper: #f4f5f8;
	--scw-surface: #fff;
	--scw-line: #e2e5ec;
	--scw-text: #172033;
	--scw-muted: #5a6478;
	--scw-accent: #2f5bea;
	--scw-accent-dark: #1f43c0;
	--scw-tally: #f5a524;
	--scw-good: #12805c;
	--scw-bad: #b42318;
	margin: 0 0 0 -20px;
	color: var(--scw-text);
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
	font-size: 14px;
	line-height: 1.5;
}
.scw-wrap *, .scw-wrap *::before, .scw-wrap *::after { box-sizing: border-box; }
.scw-wrap p { margin: 0; }
.scw-wrap [hidden] { display: none !important; }

.scw-app { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 32px); background: var(--scw-paper); }

/* Sidebar */
.scw-side { position: sticky; top: 32px; align-self: start; height: calc(100vh - 32px); display: flex; flex-direction: column; padding: 20px 14px; background: var(--scw-ink); color: #c9d2e3; overflow-y: auto; }
.scw-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 20px; }
.scw-brand__mark { display: inline-flex; align-items: flex-end; gap: 3px; height: 22px; }
.scw-brand__mark i { width: 4px; background: #fff; border-radius: 2px; }
.scw-brand__mark i:nth-child(1) { height: 10px; }
.scw-brand__mark i:nth-child(2) { height: 16px; }
.scw-brand__mark i:nth-child(3) { height: 22px; }
.scw-brand__mark i:nth-child(4) { height: 13px; background: var(--scw-tally); }
.scw-brand__name { font-size: 16px; font-weight: 650; color: #fff; letter-spacing: -.01em; }

.scw-nav__group { margin-bottom: 14px; }
.scw-nav__label { padding: 6px 10px; font-size: 12px; color: #7f8da8; }
.scw-nav__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: #c9d2e3; font: inherit; text-align: left; cursor: pointer; }
.scw-nav__item span:first-of-type { flex: 1; }
.scw-nav__item:hover { background: var(--scw-ink-2); color: #fff; }
.scw-nav__item:focus-visible { outline: 2px solid var(--scw-tally); outline-offset: 1px; }
.scw-nav__item.is-active { background: #fff; color: var(--scw-ink); font-weight: 600; }
.scw-ico { flex: none; }

.scw-side__foot { margin-top: auto; padding-top: 16px; }
.scw-upsell { padding: 14px; margin-bottom: 12px; border-radius: 10px; background: var(--scw-ink-2); }
.scw-upsell p { font-size: 13px; color: #aab6cc; margin-bottom: 10px; }
.scw-upsell__title { color: #fff !important; font-weight: 600; margin-bottom: 4px !important; }
.scw-version { padding: 0 8px; font-size: 12px; color: #7f8da8; }

/* Top bar */
.scw-top { position: sticky; top: 32px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 32px; background: rgba(244, 245, 248, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--scw-line); }
.scw-top__title { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.015em; color: var(--scw-text); }
.scw-top__actions { display: flex; align-items: center; gap: 10px; }
.scw-state { font-size: 13px; color: var(--scw-muted); }
.scw-state[data-dirty="1"] { color: #8a5a00; font-weight: 600; }

.scw-content { padding: 28px 32px 64px; max-width: 1180px; }

/* Buttons */
.scw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; border: 1px solid transparent; border-radius: 8px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.3; }
.scw-btn:focus-visible { outline: 2px solid var(--scw-accent); outline-offset: 2px; }
.scw-btn--primary { background: var(--scw-accent); color: #fff; }
.scw-btn--primary:hover { background: var(--scw-accent-dark); color: #fff; }
.scw-btn--primary:disabled { background: #c5cde0; cursor: default; }
.scw-btn--ghost { background: var(--scw-surface); border-color: var(--scw-line); color: var(--scw-text); }
.scw-btn--ghost:hover { border-color: #b7bfce; color: var(--scw-text); }
.scw-btn--light { background: #fff; color: var(--scw-ink); }
.scw-btn--light:hover { background: #e8ecf5; color: var(--scw-ink); }
.scw-btn--danger { background: var(--scw-surface); border-color: #f1c4bf; color: var(--scw-bad); }
.scw-btn--danger:hover { background: #fef3f2; }
.scw-btn--sm { padding: 5px 10px; font-size: 12px; }
.scw-link { padding: 0; border: 0; background: none; color: var(--scw-accent); font: inherit; font-weight: 600; cursor: pointer; }
.scw-link:hover { text-decoration: underline; }

/* Cards */
.scw-card { padding: 22px 24px; margin-bottom: 20px; background: var(--scw-surface); border: 1px solid var(--scw-line); border-radius: 12px; }
.scw-card__title { margin: 0 0 6px; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.scw-grid { display: grid; gap: 20px; align-items: start; }
.scw-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scw-grid--1 { grid-template-columns: minmax(0, 760px); }
.scw-grid .scw-card { margin-bottom: 0; }
.scw-hint { margin-top: 2px; font-size: 13px; color: var(--scw-muted); }
.scw-notice { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: #fff7e6; color: #7a4b00; font-size: 13px; }
.scw-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Rows */
.scw-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 1.2fr); gap: 20px; align-items: center; padding: 14px 0; border-top: 1px solid var(--scw-line); }
.scw-card__title + .scw-row, .scw-card__title + .scw-hint + .scw-row { border-top: 0; }
.scw-row__label label { font-weight: 600; }
.scw-row__control { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.scw-input { min-height: 36px; padding: 6px 10px; border: 1px solid #cdd3df; border-radius: 8px; background: #fff; color: var(--scw-text); font: inherit; box-shadow: none; }
.scw-input:focus { border-color: var(--scw-accent); outline: 2px solid rgba(47, 91, 234, .25); outline-offset: 0; box-shadow: none; }
.scw-input--wide { width: 100%; max-width: 420px; }
.scw-input--num { width: 84px; }
.scw-num { display: inline-flex; align-items: center; gap: 6px; }
.scw-suffix { color: var(--scw-muted); font-size: 13px; }
.scw-color { display: inline-flex; align-items: center; gap: 8px; }
.scw-color input[type="color"] { width: 40px; height: 34px; padding: 2px; border: 1px solid #cdd3df; border-radius: 8px; background: #fff; cursor: pointer; }
.scw-color code { background: none; padding: 0; color: var(--scw-muted); font-size: 12px; }

/* Switch */
.scw-switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.scw-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.scw-switch__track { position: absolute; inset: 0; border-radius: 999px; background: #c5cbd8; transition: background .15s; }
.scw-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.scw-switch input:checked + .scw-switch__track { background: var(--scw-accent); }
.scw-switch input:checked + .scw-switch__track::after { transform: translateX(18px); }
.scw-switch input:focus-visible + .scw-switch__track { outline: 2px solid var(--scw-accent); outline-offset: 2px; }

/* Segmented control */
.scw-seg { display: inline-flex; flex-wrap: wrap; padding: 3px; gap: 2px; border-radius: 9px; background: #eceff4; }
.scw-seg button { padding: 6px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--scw-muted); font: inherit; font-weight: 600; cursor: pointer; }
.scw-seg button[aria-checked="true"] { background: #fff; color: var(--scw-text); box-shadow: 0 0 0 1px var(--scw-line); }
.scw-seg button:focus-visible { outline: 2px solid var(--scw-accent); }
.scw-seg--sm button { padding: 4px 10px; font-size: 12px; }

/* Checklists */
.scw-checklist { width: 100%; max-height: 240px; overflow: auto; padding: 8px 12px; border: 1px solid var(--scw-line); border-radius: 8px; }
.scw-check { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.scw-catrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; }

/* Dashboard hero: the tally chart is the one distinctive thing here. */
.scw-hero { padding: 26px 28px 20px; margin-bottom: 20px; background: var(--scw-ink); border-radius: 14px; color: #c9d2e3; }
.scw-hero__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.scw-hero__label { font-size: 13px; color: #8c9ab3; }
.scw-hero__num { font-size: 56px; line-height: 1.05; font-weight: 700; color: #fff; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.scw-hero .scw-seg { background: var(--scw-ink-2); }
.scw-hero .scw-seg button { color: #9fb0cf; }
.scw-hero .scw-seg button[aria-checked="true"] { background: #fff; color: var(--scw-ink); box-shadow: none; }
.scw-bars { display: flex; align-items: flex-end; gap: 3px; height: 150px; margin: 22px 0 18px; }
.scw-bars i { flex: 1 1 0; height: var(--h, 2%); min-height: 3px; border-radius: 3px 3px 0 0; background: #5b7cf0; }
.scw-bars i.is-empty { background: #2a3b58; }
.scw-bars i.is-today { background: var(--scw-tally); }
.scw-figures { display: flex; flex-wrap: wrap; gap: 8px 40px; margin: 0; padding-top: 16px; border-top: 1px solid #243653; }
.scw-figures div { min-width: 90px; }
.scw-figures dt { font-size: 12px; color: #8c9ab3; }
.scw-figures dd { margin: 0; font-size: 20px; font-weight: 650; color: #fff; font-variant-numeric: tabular-nums; }
.scw-hero .scw-notice { background: #3a2f12; color: #f6d58a; }

.scw-list { margin: 10px 0 0; padding: 0; list-style: none; }
.scw-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-top: 1px solid var(--scw-line); }
.scw-list li:first-child { border-top: 0; }
.scw-list a { color: var(--scw-text); font-weight: 600; text-decoration: none; }
.scw-list a:hover { color: var(--scw-accent); }
.scw-list small { display: block; color: var(--scw-muted); font-size: 12px; font-weight: 400; }
.scw-list .scw-num-out { font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.scw-empty { color: var(--scw-muted); }

.scw-setup { margin-top: 20px; }
.scw-steps { margin: 10px 0 0; padding: 0; list-style: none; }
.scw-steps li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--scw-line); }
.scw-steps li:first-child { border-top: 0; }
.scw-steps li > span:nth-child(2) { flex: 1; }
.scw-steps__dot { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 1.5px solid #b7bfce; border-radius: 50%; color: #fff; }
.scw-steps .is-done .scw-steps__dot { background: var(--scw-good); border-color: var(--scw-good); }
.scw-steps .is-done .scw-ico { width: 12px; height: 12px; }
.scw-steps .is-done > span:nth-child(2) { color: var(--scw-muted); text-decoration: line-through; }

/* Split with live preview */
.scw-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.scw-split__side { position: sticky; top: 112px; }
.scw-preview { padding: 18px; background: var(--scw-surface); border: 1px solid var(--scw-line); border-radius: 12px; }
.scw-preview__bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-weight: 650; }
.scw-mock { padding: 14px; margin-bottom: 10px; background: #f8f9fb; border-radius: 10px; }
.scw-mock__img { aspect-ratio: 1 / 1; margin-bottom: 12px; border-radius: 8px; background: repeating-linear-gradient(135deg, #dfe4ee 0 10px, #e9edf4 10px 20px); }
.scw-mock__img--wide { aspect-ratio: 16 / 9; }
.scw-mock__title { font-weight: 600; margin-bottom: 4px; }
.scw-mock__title--lg { font-size: 18px; }
.scw-mock__price { margin: 4px 0 10px; color: var(--scw-muted); }
.scw-mock__btn { display: inline-block; padding: 7px 14px; border-radius: 6px; background: #2b3447; color: #fff; font-size: 13px; }
.scw-mock__qty { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.scw-mock__qty > span:first-child { padding: 6px 12px; border: 1px solid #cdd3df; border-radius: 6px; background: #fff; }

/* Storefront chips inside the preview reuse the frontend look */
.scw-preview .scw-box { margin: 6px 0; }

/* Tools, features, teasers */
.scw-status { width: 100%; margin-top: 10px; border-collapse: collapse; }
.scw-status th, .scw-status td { padding: 8px 0; border-top: 1px solid var(--scw-line); text-align: left; font-weight: 400; }
.scw-status th { color: var(--scw-muted); }
.scw-status td { font-weight: 600; text-align: right; }
.scw-status td.is-warn { color: var(--scw-bad); }

.scw-features__bar { margin-bottom: 8px; }
.scw-feature-list { margin: 0; padding: 0; list-style: none; }
.scw-feature-list li { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 0; border-top: 1px solid var(--scw-line); }
.scw-feature-list li:first-child { border-top: 0; }
.scw-feature__name { font-weight: 600; }
.scw-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 650; vertical-align: 1px; }
.scw-tag--free { background: #e3f5ec; color: var(--scw-good); }
.scw-tag--pro { background: #e6ecff; color: var(--scw-accent-dark); }
.scw-tag--planned { background: #eceff4; color: var(--scw-muted); }
.scw-nav__item .scw-tag--pro { margin-left: 0; background: #2a3f66; color: #b9caf5; }

.scw-teaser { max-width: 720px; }
.scw-teaser__icon { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; margin-bottom: 10px; border-radius: 10px; background: #e6ecff; color: var(--scw-accent-dark); }
.scw-feature-list--plain { margin-bottom: 16px; }

.scw-snippet { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--scw-line); }
.scw-snippet:first-of-type { margin-top: 10px; }
.scw-snippet code { display: block; margin-top: 2px; padding: 2px 6px; background: #eef1f6; border-radius: 4px; font-size: 12px; }
.scw-snippet span code { display: inline; }

/* Toast */
.scw-toast { position: fixed; right: 24px; bottom: 24px; z-index: 100000; max-width: 360px; padding: 12px 16px; border-radius: 10px; background: var(--scw-ink); color: #fff; font-weight: 600; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .15s, transform .15s; }
.scw-toast.is-show { opacity: 1; transform: none; }
.scw-toast.is-error { background: var(--scw-bad); }

@media (max-width: 1100px) {
	.scw-split { grid-template-columns: minmax(0, 1fr); }
	.scw-split__side { position: static; order: -1; }
}
@media (max-width: 960px) {
	.scw-app { grid-template-columns: minmax(0, 1fr); }
	.scw-side { position: static; height: auto; padding: 12px; }
	.scw-nav { display: flex; gap: 6px; overflow-x: auto; }
	.scw-nav__group { display: flex; gap: 4px; margin: 0; }
	.scw-nav__label, .scw-side__foot, .scw-brand { display: none; }
	.scw-nav__item { width: auto; white-space: nowrap; }
	.scw-top { position: static; padding: 12px 16px; }
	.scw-content { padding: 20px 16px 48px; }
	.scw-grid--2 { grid-template-columns: minmax(0, 1fr); }
	.scw-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
	.scw-hero__num { font-size: 44px; }
}
@media (max-width: 782px) {
	.scw-wrap { margin-left: -10px; }
}
@media (prefers-reduced-motion: reduce) {
	.scw-switch__track, .scw-switch__track::after, .scw-toast { transition: none; }
}

/* Experiment */
.scw-ab__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; }
.scw-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #eceff4; color: var(--scw-muted); font-weight: 650; }
.scw-pill[data-status="running"] { background: #e3f5ec; color: var(--scw-good); }
.scw-pill[data-status="stopped"] { background: #fff1d6; color: #8a5a00; }
.scw-verdict { padding: 14px 16px; margin: 10px 0 16px; border-radius: 10px; background: #eceff4; font-weight: 600; }
.scw-verdict[data-verdict="helping"] { background: #e3f5ec; color: #0b5d42; }
.scw-verdict[data-verdict="hurting"] { background: #fee9e7; color: #8f1f15; }
.scw-verdict[data-verdict="unclear"] { background: #fff1d6; color: #7a4b00; }
.scw-ab-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.scw-ab-table th, .scw-ab-table td { padding: 10px 8px; border-top: 1px solid var(--scw-line); text-align: right; }
.scw-ab-table thead th { border-top: 0; font-size: 12px; color: var(--scw-muted); font-weight: 600; }
.scw-ab-table th:first-child, .scw-ab-table tbody th { text-align: left; font-weight: 600; }

/* Preview: the add-to-cart form outline shows where "inside the form" positions land */
.scw-mock__form { padding: 8px; margin: 4px 0; border: 1px dashed #c3cad8; border-radius: 8px; }
.scw-mock__form .scw-box { margin: 4px 0; }
.scw-mock [data-scw-preview]:empty { display: none; }

/* Pro preview screens (Free edition) */
.scw-teaser2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: stretch; margin-bottom: 20px; }
.scw-teaser2 .scw-card { margin-bottom: 0; }
.scw-teaser2__headline { margin: 10px 0 14px; font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.scw-tag--solo { margin-left: 0; }
.scw-benefits { margin: 0 0 6px; padding: 0; list-style: none; }
.scw-benefits li { display: flex; gap: 10px; padding: 6px 0; }
.scw-benefits .scw-ico { flex: none; margin-top: 2px; color: var(--scw-good); }
.scw-teaser2__example { background: #f8f9fb; }
.scw-ex-label { margin-bottom: 12px; font-size: 12px; color: var(--scw-muted); }
.scw-ex .scw-mock { max-width: 280px; background: #fff; }
.scw-ex-note { margin-top: 10px; font-size: 13px; color: var(--scw-muted); }
.scw-ex-shop { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.scw-ex-popup { display: flex; align-items: center; gap: 10px; max-width: 320px; margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: #fff; box-shadow: 0 6px 22px rgba(15, 27, 45, .16), 0 0 0 1px rgba(15, 27, 45, .06); font-size: 13px; line-height: 1.4; }
.scw-ex-popup__img { flex: none; width: 48px; height: 48px; border-radius: 8px; background: repeating-linear-gradient(135deg, #dfe4ee 0 8px, #e9edf4 8px 16px); }
.scw-ex-popup__time { margin-top: 2px !important; font-size: 12px; opacity: .65; }
.scw-ex-rules p { padding: 5px 0; }
.scw-ex-rules .is-on { color: var(--scw-good); font-weight: 600; }
.scw-ex-rules .is-on .scw-ico { vertical-align: -3px; width: 16px; height: 16px; }
.scw-ex-rules .is-off { color: var(--scw-bad); font-weight: 600; }
.scw-ex .scw-ab-table th, .scw-ex .scw-ab-table td { font-size: 13px; }

/* Free vs Pro */
.scw-upgrade-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.scw-upgrade-hero__title { margin: 0 0 4px; font-size: 20px; font-weight: 700; letter-spacing: -.015em; }
.scw-upgrade-hero .scw-hint { max-width: 560px; }
.scw-compare { width: 100%; border-collapse: collapse; }
.scw-compare th, .scw-compare td { padding: 12px 8px; border-top: 1px solid var(--scw-line); text-align: center; vertical-align: top; }
.scw-compare thead th { border-top: 0; font-size: 12px; color: var(--scw-muted); font-weight: 650; }
.scw-compare th:first-child { text-align: left; font-weight: 600; width: 100%; }
.scw-compare tbody th .scw-hint { display: block; font-weight: 400; }
.scw-compare td { width: 80px; }
.scw-compare .is-yes { color: var(--scw-good); }
.scw-compare .is-no { color: #98a1b3; }

/* Dashboard hint (Free edition) */
.scw-tip { position: relative; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 40px 12px 16px; margin-bottom: 20px; border: 1px solid #d5ddf7; border-radius: 10px; background: #f1f4ff; }
.scw-tip p { flex: 1 1 320px; }
.scw-tip__x { position: absolute; top: 6px; right: 8px; width: 28px; height: 28px; border: 0; background: transparent; color: var(--scw-muted); font-size: 20px; line-height: 1; cursor: pointer; }
.scw-tip__x:hover, .scw-tip__x:focus-visible { color: var(--scw-text); }

@media (max-width: 960px) { .scw-teaser2 { grid-template-columns: minmax(0, 1fr); } }

/* Time-period rows */
.scw-periods-wrap { width: 100%; }
.scw-periods { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.scw-period { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 8px 10px; border: 1px solid var(--scw-line); border-radius: 10px; background: #fafbfc; }
.scw-period__text { flex: 1 1 200px; min-width: 160px; }
.scw-textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; max-width: 100%; width: 100%; }
#scw-gen .scw-snippet code { word-break: break-all; }
