/* The components of StockOne (design-01): a copy of frontend/src/ui/ui.css (the source; Storybook shows it). Change both. */
/* The components of StockOne (design-01). Every class starts with `so-`; colours, radii and fonts come only from tokens.css. */

.so-root {
  font-family: var(--so-font);
  color: var(--so-text);
  background: var(--so-bg);
  -webkit-font-smoothing: antialiased;
}
.so-root *,
.so-root *::before,
.so-root *::after {
  box-sizing: border-box;
}

/* ----- type ----- */
.so-display,
.so-h1,
.so-h2,
.so-h3,
.so-h4,
.so-title {
  margin: 0;
  font-family: var(--so-font-display);
  font-weight: 700;
  color: var(--so-text);
}
.so-display {
  font-size: 56px;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.so-h1 {
  font-size: 44px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.so-h2 {
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.so-h3 {
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.so-h4 {
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.so-title {
  font-size: 24px;
  line-height: 1.45;
}
.so-accent {
  color: var(--so-accent);
}
.so-lead,
.so-body,
.so-small,
.so-caption,
.so-micro {
  margin: 0;
  color: var(--so-muted);
}
.so-lead {
  font-size: 18px;
  line-height: 1.45;
}
.so-body {
  font-size: 16px;
  line-height: 1.45;
}
.so-small {
  font-size: 14px;
  line-height: 1.4;
}
.so-caption {
  font-size: 12px;
  line-height: 1.4;
}
.so-micro {
  font-size: 11px;
  line-height: 1.4;
}
.so-eyebrow {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--so-accent);
}
.so-link {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--so-accent);
  text-decoration: none;
  cursor: pointer;
}
.so-link:hover {
  text-decoration: underline;
}

/* ----- buttons ----- */
.so-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 32px;
  border: 1px solid transparent;
  border-radius: var(--so-radius-pill);
  font: 600 16px/1.4 var(--so-font);
  cursor: pointer;
  transition:
    filter 0.15s,
    background 0.15s;
  text-decoration: none;
}
.so-btn:focus-visible {
  outline: 2px solid var(--so-accent);
  outline-offset: 2px;
}
.so-btn--block {
  width: 100%;
}
.so-btn--primary {
  background: var(--so-primary);
  color: var(--so-on-primary);
}
.so-btn--secondary {
  background: var(--so-surface);
  border-color: var(--so-border);
  color: var(--so-text);
}
.so-btn--success {
  background: var(--so-success-strong);
  color: var(--so-on-success-strong);
}
.so-btn:hover:not(:disabled) {
  filter: brightness(0.96);
}
.so-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

/* ----- badges and labels ----- */
.so-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 33px;
  padding: 0 10px;
  border-radius: var(--so-radius-xs);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
.so-badge--success {
  background: var(--so-success-soft);
  color: var(--so-success);
}
.so-badge--accent {
  background: var(--so-primary-soft);
  color: var(--so-accent);
  font-weight: 600;
  text-transform: uppercase;
}
.so-badge--warning {
  background: var(--so-warning-soft);
  color: var(--so-warning);
}
.so-badge--danger {
  background: var(--so-danger-soft);
  color: var(--so-danger);
}
.so-market {
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
}
.so-market--wb {
  color: var(--so-wb);
}
.so-market--ozon {
  color: var(--so-ozon);
}
.so-market--ym {
  color: var(--so-ym);
}

/* ----- fields ----- */
.so-field {
  width: 100%;
  height: 53px;
  padding: 0 16px;
  border: 1px solid var(--so-border);
  border-radius: var(--so-radius-md);
  background: var(--so-surface);
  color: var(--so-text);
  font: 400 16px/1.45 var(--so-font);
}
.so-field::placeholder,
.so-search::placeholder {
  color: var(--so-muted);
}
.so-field:focus,
.so-search:focus {
  outline: 2px solid var(--so-primary);
  outline-offset: -1px;
}
.so-search {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--so-radius-sm);
  background: var(--so-bg);
  color: var(--so-text);
  font: 400 14px/1.4 var(--so-font);
}

/* ----- toggle ----- */
.so-toggle {
  position: relative;
  width: 52px;
  height: 32px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--so-border);
  cursor: pointer;
  transition: background 0.15s;
}
.so-toggle::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--so-surface);
  transition: transform 0.15s;
}
.so-toggle[aria-checked='true'] {
  background: var(--so-primary);
}
.so-toggle[aria-checked='true']::after {
  transform: translateX(20px);
}

/* ----- tabs, steps, days ----- */
.so-tabs {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 8px;
}
.so-tab {
  height: 40px;
  border: 0;
  border-radius: var(--so-radius-xs);
  background: transparent;
  color: var(--so-muted);
  font: 500 14px/1.4 var(--so-font);
  cursor: pointer;
}
.so-tab[aria-selected='true'] {
  background: var(--so-primary-soft);
  color: var(--so-accent);
}
.so-steps {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.so-step {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 8px;
  border-radius: var(--so-radius-xs);
  background: var(--so-bg);
  color: var(--so-muted);
  font-size: 14px;
  font-weight: 500;
}
.so-step--current {
  background: var(--so-primary-soft);
  color: var(--so-accent);
}
.so-step--done {
  background: var(--so-success-soft);
  color: var(--so-success);
}
.so-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.so-day {
  height: 36px;
  border: 0;
  border-radius: var(--so-radius-xs);
  background: var(--so-primary-soft);
  color: var(--so-muted);
  font: 600 12px/1.4 var(--so-font);
  cursor: pointer;
}
.so-day[aria-pressed='true'] {
  background: var(--so-success-strong);
  color: var(--so-on-success-strong);
}

/* ----- counter (the reserve of the last items) ----- */
.so-counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 49px;
  padding: 0 12px;
  border-radius: var(--so-radius-sm);
  background: var(--so-warning-soft);
  font-size: 14px;
  font-weight: 500;
}
.so-counter__controls {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--so-accent);
  font-size: 18px;
  font-weight: 600;
}
.so-counter__btn {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--so-accent);
  font: 600 18px/1 var(--so-font);
  cursor: pointer;
}
.so-counter__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ----- choice pill (the lead form) ----- */
.so-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 55px;
  padding: 0 16px;
  border: 1px solid var(--so-border);
  border-radius: var(--so-radius-3xl);
  background: var(--so-surface);
  color: var(--so-text);
  font: 400 16px/1.45 var(--so-font);
  text-align: left;
  cursor: pointer;
}
.so-choice__mark {
  width: 14px;
  color: var(--so-muted);
  font-size: 20px;
  line-height: 1;
}
.so-choice[aria-pressed='true'] {
  border-color: var(--so-on-primary);
  background: var(--so-success-strong);
  color: var(--so-on-success-strong);
}
.so-choice[aria-pressed='true'] .so-choice__mark {
  color: var(--so-on-success-strong);
}

/* ----- the app window (the demo of the product) ----- */
.so-showcase {
  padding: 12px;
  border-radius: var(--so-radius-3xl);
}
.so-showcase--accent {
  background: var(--so-primary-soft);
}
.so-showcase--success {
  background: var(--so-success-soft);
}
.so-showcase--warning {
  background: var(--so-warning-soft);
}
.so-showcase--info {
  background: var(--so-info-soft);
}
.so-app {
  overflow: hidden;
  border: 1px solid var(--so-border);
  border-radius: var(--so-radius-2xl);
  background: var(--so-surface);
}
.so-app__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 57px;
  padding: 0 16px;
  background: var(--so-primary);
  color: var(--so-on-primary);
  font-size: 18px;
  font-weight: 600;
}
.so-app__tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.so-app__crumbs {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  background: var(--so-primary-soft);
  color: var(--so-accent);
  font-size: 14px;
  font-weight: 500;
}
.so-app__tabs {
  padding: 12px;
}
.so-app__body {
  display: grid;
  gap: 16px;
  padding: 16px;
}
.so-app__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 18px;
  font-weight: 600;
}
.so-app__demo {
  color: var(--so-muted);
  font-size: 11px;
}

/* ----- stat tiles ----- */
.so-stats {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 8px;
}
.so-stat {
  display: grid;
  gap: 4px;
  min-height: 79px;
  padding: 12px;
  border-radius: var(--so-radius-md);
}
.so-stat__value {
  font: 700 28px/1.15 var(--so-font-display);
  color: var(--so-text);
}
.so-stat__label {
  color: var(--so-muted);
  font-size: 12px;
}
.so-tone--accent {
  background: var(--so-primary-soft);
}
.so-tone--warning {
  background: var(--so-warning-soft);
}
.so-tone--success {
  background: var(--so-success-soft);
}
.so-tone--danger {
  background: var(--so-danger-soft);
}
.so-tone--info {
  background: var(--so-info-soft);
}

/* ----- the stock table ----- */
.so-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.so-table th {
  height: 37px;
  padding: 0 10px;
  background: var(--so-primary-soft);
  color: var(--so-muted);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
}
.so-table th:first-child {
  border-radius: var(--so-radius-xs) 0 0 var(--so-radius-xs);
}
.so-table th:last-child {
  border-radius: 0 var(--so-radius-xs) var(--so-radius-xs) 0;
}
.so-table td {
  height: 74px;
  padding: 0 10px;
  font-size: 18px;
  font-weight: 600;
}
.so-table__num {
  width: 58px;
}
.so-table__name {
  display: block;
  color: var(--so-text);
  font-size: 14px;
  font-weight: 500;
}
.so-table__sku {
  display: block;
  color: var(--so-muted);
  font-size: 11px;
  font-weight: 400;
}
.so-table__zero {
  color: var(--so-muted);
}

/* ----- callouts and statuses ----- */
.so-callout {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: var(--so-radius-md);
}
.so-callout__title {
  font-size: 14px;
  font-weight: 600;
}
.so-callout__text {
  color: var(--so-text);
  font-size: 14px;
}
.so-callout__meta {
  color: var(--so-muted);
  font-size: 12px;
}
.so-callout--success {
  background: var(--so-success-soft);
}
.so-callout--success .so-callout__title {
  color: var(--so-success);
}
.so-callout--warning {
  background: var(--so-warning-soft);
}
.so-callout--warning .so-callout__title {
  color: var(--so-text);
  font-size: 16px;
}
.so-callout__amount {
  color: var(--so-warning);
  font-size: 20px;
  font-weight: 600;
}
.so-callout--large .so-callout__title {
  font-size: 18px;
}
.so-callout--error {
  gap: 8px;
  padding: 16px;
  background: var(--so-danger-strong);
  color: var(--so-on-danger-strong);
}
.so-callout--error .so-callout__title {
  font-size: 18px;
}
.so-callout--error .so-callout__text {
  color: var(--so-on-danger-strong);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
}
.so-banner {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--so-radius-sm);
  background: var(--so-success-soft);
  color: var(--so-success);
  font-size: 14px;
  font-weight: 500;
}
.so-status {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}
.so-status--success {
  color: var(--so-success);
}
.so-status--warning {
  color: var(--so-warning);
}
.so-status--danger {
  color: var(--so-danger);
}

/* ----- messages (Telegram) ----- */
.so-message {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--so-border);
  border-radius: var(--so-radius-lg);
  background: var(--so-surface);
}
.so-message__from {
  font-size: 14px;
  font-weight: 600;
}
.so-message__from--success {
  color: var(--so-success);
}
.so-message__from--warning {
  color: var(--so-warning);
}
.so-message__from--danger {
  color: var(--so-danger);
}
.so-message__text {
  margin: 0;
  color: var(--so-text);
  font-size: 16px;
  line-height: 1.4;
}
.so-chat {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: var(--so-radius-lg);
  background: var(--so-info-soft);
}
.so-chat__title {
  font-size: 16px;
  font-weight: 600;
}
.so-chat__time {
  color: var(--so-muted);
  font-size: 11px;
}

/* ----- weekend mode ----- */
.so-timefield {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--so-border);
  border-radius: var(--so-radius-sm);
  background: var(--so-surface);
}
.so-timefield__label {
  color: var(--so-muted);
  font-size: 12px;
}
.so-timefield__value {
  font-size: 18px;
  font-weight: 600;
}
.so-schedule {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--so-radius-md);
  background: var(--so-primary-soft);
}
.so-range {
  margin: 0;
  color: var(--so-accent);
  font: 700 24px/1.4 var(--so-font-display);
}
.so-counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.so-mcount {
  display: grid;
  gap: 4px;
  padding: 16px 12px;
  border: 1px solid var(--so-border);
  border-radius: var(--so-radius-lg);
  background: var(--so-surface);
}
.so-mcount__value {
  font: 700 32px/1.4 var(--so-font-display);
}

/* ----- assembly ----- */
.so-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 600;
}
.so-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: var(--so-radius-md);
  background: var(--so-primary-soft);
}
.so-item__name {
  font-size: 16px;
  font-weight: 600;
}
.so-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.so-size {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: var(--so-radius-xs);
}
.so-size__label {
  font-size: 12px;
}
.so-size__value {
  font: 700 28px/1.15 var(--so-font-display);
}
.so-size--ok {
  background: var(--so-success-soft);
  color: var(--so-success);
}
.so-size--bad {
  background: var(--so-danger-soft);
  color: var(--so-danger);
}
.so-barcode {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--so-border);
  border-radius: var(--so-radius-sm);
  background: var(--so-surface);
}
.so-barcode svg {
  display: block;
  width: 100%;
  height: 40px;
  fill: var(--so-ink);
}

/* ----- money ----- */
.so-profit {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: var(--so-radius-md);
  background: var(--so-primary-soft);
}
.so-profit__value {
  color: var(--so-accent);
  font: 700 32px/1.15 var(--so-font-display);
}
.so-prow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 10px;
  border-radius: var(--so-radius-sm);
  font-size: 16px;
}
.so-prow__amount {
  font-weight: 600;
  color: var(--so-success);
}
.so-prow--loss {
  background: var(--so-danger-soft);
}
.so-prow--loss .so-prow__amount {
  color: var(--so-danger);
}

/* ----- landing blocks ----- */
.so-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 84px;
  padding: 0 160px;
  background: var(--so-surface);
}
.so-logo {
  font: 700 20px/1.45 var(--so-font-display);
  color: var(--so-text);
}
.so-nav {
  display: flex;
  gap: 24px;
}
.so-nav a {
  padding: 10px 12px;
  color: var(--so-muted);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}
.so-nav a:hover {
  color: var(--so-text);
}
.so-header .so-btn {
  padding: 0 32px;
}
.so-footer {
  display: grid;
  gap: 16px;
  padding: 64px 160px;
  background: var(--so-bg);
}
.so-footer .so-nav {
  gap: 8px;
  margin-left: -8px;
}
.so-footer .so-nav a {
  padding: 10px 8px;
}
.so-pain {
  min-height: 86px;
  padding: 20px;
  border-radius: var(--so-radius-xl);
  color: var(--so-text);
  font-size: 16px;
  line-height: 1.45;
}
.so-stepcard {
  display: grid;
  align-content: start;
  gap: 12px;
}
.so-stepcard__num {
  color: var(--so-accent);
  font: 700 32px/1.12 var(--so-font-display);
}
.so-stepcard__title {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 600;
}
.so-feature {
  display: grid;
  gap: 12px;
  max-width: 440px;
}
.so-feature .so-lead {
  margin-top: 4px;
}
.so-illustration {
  display: block;
  width: 100%;
  border-radius: var(--so-radius-3xl);
  object-fit: cover;
}
.so-list-card {
  display: grid;
  align-content: start;
  gap: 20px;
  padding: 24px;
  border-radius: 16px;
}
.so-list-card ul {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.so-list-card li {
  display: flex;
  gap: 12px;
  font-size: 16px;
}
.so-list-card__mark {
  width: 10px;
  font-size: 18px;
  font-weight: 500;
}
.so-list-card--minus {
  background: var(--so-danger-soft);
}
.so-list-card--minus .so-list-card__mark {
  color: var(--so-danger);
}
.so-list-card--check {
  background: var(--so-success-soft);
}
.so-list-card--check .so-list-card__mark {
  color: var(--so-success);
}
.so-plan {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--so-border);
  border-radius: var(--so-radius-2xl);
  background: var(--so-surface);
}
.so-plan ul {
  display: grid;
  gap: 20px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}
.so-plan li {
  font-size: 16px;
}
.so-plan__price {
  font: 700 40px/1.15 var(--so-font-display);
}
.so-plan--featured {
  border: 2px solid var(--so-primary);
  background: var(--so-primary);
  color: var(--so-on-primary);
}
.so-plan--featured .so-title {
  color: var(--so-on-primary);
}
.so-faq {
  border: 1px solid var(--so-border);
  border-radius: var(--so-radius-xl);
}
.so-faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 86px;
  padding: 20px;
  border: 0;
  background: transparent;
  color: var(--so-text);
  font: 600 18px/1.45 var(--so-font);
  text-align: left;
  cursor: pointer;
}
.so-faq__icon {
  color: var(--so-accent);
  font: 700 24px/1 var(--so-font-display);
}
.so-faq__a {
  margin: -16px 0 0;
  padding: 0 20px 20px;
  color: var(--so-muted);
  font-size: 16px;
  line-height: 1.45;
}
.so-cta {
  display: grid;
  gap: 24px;
  padding: 64px 160px;
  background: var(--so-primary);
  color: var(--so-on-primary);
}
.so-cta .so-h1,
.so-cta .so-lead,
.so-cta .so-small {
  color: var(--so-on-primary);
}
.so-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.so-leadform {
  display: grid;
  grid-template-columns: 1fr 212px;
  gap: 12px;
}

/* ----- narrow screens (768 and 375 boards) ----- */
@media (max-width: 900px) {
  .so-header,
  .so-footer,
  .so-cta {
    padding-left: 24px;
    padding-right: 24px;
  }
  .so-header .so-nav {
    display: none;
  }
  .so-choices,
  .so-leadform {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .so-display {
    font-size: 36px;
  }
  .so-h1,
  .so-h2 {
    font-size: 32px;
  }
  .so-h3 {
    font-size: 28px;
  }
  .so-header .so-btn {
    padding: 0 16px;
    height: 44px;
    font-size: 14px;
  }
}
