:root {
  --bg: #f3f0e8;
  --surface: #fffef9;
  --nav: #ebe6dc;
  --ink: #171a18;
  --soft: #626963;
  --muted: #858b86;
  --line: #d8d2c7;
  --blue: #2f55bf;
  --mint: #c8f1dc;
  --green: #247258;
  --red: #a4433e;
  --amber: #9a661f;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
}
button,
input,
select {
  font: inherit;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  padding: 22px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid var(--line);
  background: var(--nav);
  z-index: 10;
}
.brand {
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-rows: auto auto;
  gap: 1px 11px;
  padding: 0 6px;
  color: inherit;
  text-decoration: none;
}
.brand > span {
  grid-row: 1/3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #bbb4a8;
  border-radius: 10px;
  background: var(--surface);
}
.brand img {
  width: 30px;
  height: 30px;
}
.brand b {
  font-size: 17px;
  align-self: end;
}
.brand small {
  font-size: 12px;
  color: var(--soft);
}
.demo-store {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 254, 249, 0.65);
}
.demo-store i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: #fff;
  background: #ef5c4b;
  font-style: normal;
  font-weight: 800;
  font-size: 12px;
}
.demo-store div {
  display: grid;
  gap: 2px;
}
.demo-store b {
  font-size: 12px;
}
.demo-store small {
  font-size: 12px;
  color: var(--muted);
}
nav {
  display: grid;
  gap: 5px;
}
nav button {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  color: #59615c;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
nav button:hover {
  background: #e1dcd1;
  color: var(--ink);
}
nav button.active {
  color: #fff;
  background: var(--ink);
}
nav button em {
  font-style: normal;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--green);
  background: #dff4e9;
}
.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 12px;
  padding: 16px 8px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.sidebar-foot span {
  color: var(--green);
}
.sidebar-foot a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}
main {
  margin-left: 248px;
  padding: 28px 34px 64px;
  max-width: 1680px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.topbar h1,
.section-head h2,
.assistant-layout h2 {
  margin: 6px 0 5px;
  font-size: 30px;
  letter-spacing: -0.035em;
}
.topbar p,
.section-head p,
.assistant-layout > div > p {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
}
.demo-label,
.section-head span,
.panel header span,
.decision-panel header span {
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.top-actions > span {
  font-size: 12px;
  color: var(--soft);
}
.top-actions a {
  padding: 10px 14px;
  border-radius: 9px;
  color: #fff;
  background: var(--ink);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}
.view {
  display: none;
}
.view.active {
  display: block;
}
.notice {
  margin: 18px 0 14px;
  padding: 12px 14px;
  border: 1px solid #c8d2ed;
  border-radius: 10px;
  color: #29499f;
  background: #eef2ff;
  font-size: 12px;
}
.decision-panel,
.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(23, 26, 24, 0.035);
}
.decision-panel > header,
.panel > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.decision-panel h2,
.panel h3 {
  margin: 4px 0 3px;
  font-size: 20px;
  letter-spacing: -0.025em;
}
.decision-panel header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.decision-panel header > b {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f5f1e9;
  font-size: 12px;
}
.decision {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.decision:last-child {
  border-bottom: 0;
}
.decision i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #eef2ff;
  color: #29499f;
  font-style: normal;
  font-weight: 800;
}
.decision strong {
  display: block;
  font-size: 13px;
}
.decision small {
  color: var(--muted);
  font-size: 12px;
}
.decision button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #bbb4a8;
  border-radius: 8px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 14px 0;
}
.metric {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.metric strong {
  display: block;
  margin: 14px 0 5px;
  font-size: 28px;
  letter-spacing: -0.04em;
}
.metric small {
  color: var(--green);
  font-size: 12px;
}
.content-grid {
  display: grid;
  grid-template-columns: 1.65fr 0.85fr;
  gap: 14px;
  margin-bottom: 14px;
}
.secondary-grid {
  grid-template-columns: 1fr 1fr;
}
.panel header strong {
  font-size: 12px;
}
.chart {
  height: 245px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  padding: 20px;
}
.bar {
  flex: 1;
  min-width: 3px;
  border-radius: 4px 4px 0 0;
  background: var(--blue);
  opacity: 0.82;
}
.channels {
  display: grid;
  padding: 14px 20px;
}
.channel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.channel:last-child {
  border-bottom: 0;
}
.channel b {
  font-size: 12px;
}
.channel small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.channel strong {
  font-size: 13px;
}
.orders {
  margin-top: 0;
}
.panel header button {
  border: 0;
  color: var(--blue);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
th,
td {
  padding: 13px 18px;
  border-bottom: 1px solid #e7e2d8;
  text-align: left;
  font-size: 12px;
}
th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  background: #fbf9f3;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.status {
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--green);
  background: #e5f5ec;
  font-size: 12px;
}
.status.bad {
  color: var(--red);
  background: #fdeceb;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 24px 0 14px;
}
.section-head strong {
  font-size: 12px;
  color: var(--soft);
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.product {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
.product-visual {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 12px;
  background: #ece8de;
  font-size: 28px;
}
.product h3 {
  margin: 2px 0 7px;
  font-size: 13px;
}
.product p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}
.product dl {
  display: flex;
  gap: 15px;
  margin: 0;
  flex-wrap: wrap;
}
.product dt {
  color: var(--muted);
  font-size: 12px;
}
.product dd {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 700;
}
.assistant-layout {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 24px;
  margin-top: 26px;
}
.prompt-list {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}
.prompt-list button {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  text-align: left;
  font-size: 12px;
  cursor: pointer;
}
.chat {
  min-height: 570px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}
.messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  padding: 20px;
  overflow: auto;
}
.messages > div {
  max-width: 82%;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.55;
}
.messages p {
  margin: 4px 0 0;
}
.bot {
  align-self: flex-start;
  background: #f1eee6;
}
.user {
  align-self: flex-end;
  color: #fff;
  background: var(--blue);
}
#demoChat {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid var(--line);
}
#demoChat input {
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbf9f4;
  outline: none;
}
#demoChat button {
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
.funnel,
.cities,
.cost-structure,
.margin-list {
  padding: 16px 20px;
}
.funnel > div,
.cost-structure > div {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}
.funnel > div:last-child,
.cost-structure > div:last-child {
  margin-bottom: 0;
}
.funnel span,
.cost-structure span {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.funnel small {
  color: var(--muted);
}
.funnel i,
.cost-structure i {
  height: 8px;
  border-radius: 99px;
  background: #ece8de;
  overflow: hidden;
}
.funnel em,
.cost-structure em {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--blue);
}
.cities > div,
.margin-list > div {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.cities > div:last-child,
.margin-list > div:last-child {
  border-bottom: 0;
}
.toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.toolbar input,
.toolbar select {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}
.toolbar input {
  flex: 1;
}
.stock-alert {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #efcfa9;
  border-radius: 12px;
  background: #fff4e6;
}
.stock-alert b {
  font-size: 12px;
}
.stock-alert span {
  color: var(--soft);
  font-size: 12px;
}
.stock-alert button {
  grid-column: 2;
  grid-row: 1/3;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.cost-structure em {
  background: var(--green);
}
.margin-list b {
  color: var(--green);
}
.supplier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
.supplier {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
.supplier header {
  display: flex;
  gap: 10px;
  align-items: center;
}
.supplier header i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #e3f3ea;
  color: var(--green);
  font-style: normal;
  font-weight: 800;
}
.supplier h3 {
  margin: 0 0 3px;
  font-size: 13px;
}
.supplier p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.supplier dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.supplier dt {
  color: var(--muted);
  font-size: 12px;
}
.supplier dd {
  margin: 3px 0 0;
  font-size: 12px;
  font-weight: 700;
}
.supplier button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.shipments {
  padding: 0 20px;
}
.shipments > div {
  display: grid;
  grid-template-columns: 100px 1fr 120px 90px;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.shipments > div:last-child {
  border-bottom: 0;
}
.shipments em {
  font-style: normal;
  color: var(--green);
}
.shipments small {
  color: var(--muted);
  text-align: right;
}
@media (max-width: 1100px) {
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .content-grid,
  .secondary-grid {
    grid-template-columns: 1fr;
  }
  .product-grid,
  .supplier-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: auto;
    height: auto;
  }
  .sidebar nav {
    grid-template-columns: repeat(3, 1fr);
  }
  .sidebar nav button {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 7px;
    font-size: 12px;
  }
  .sidebar nav button > span {
    display: block;
  }
  .sidebar-foot {
    display: none;
  }
  main {
    margin: 0;
    padding: 18px 14px 40px;
  }
  .topbar {
    align-items: flex-start;
  }
  .top-actions > span {
    display: none;
  }
  .metrics,
  .product-grid,
  .supplier-grid {
    grid-template-columns: 1fr;
  }
  .assistant-layout {
    grid-template-columns: 1fr;
  }
  .decision {
    grid-template-columns: 36px 1fr;
  }
  .decision button {
    grid-column: 2;
    justify-self: start;
  }
  .demo-store {
    display: none;
  }
  .stock-alert {
    grid-template-columns: 1fr;
  }
  .stock-alert button {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
  .shipments > div {
    grid-template-columns: 1fr 1fr;
  }
  .shipments small {
    text-align: left;
  }
}

/* Readable Cyrillic UI finish: system fonts, restrained hierarchy, large targets. */
.demo-page {
  color: var(--ink);
  font-family:
    "Segoe UI Variable Text", "Segoe UI", "PT Root UI", Inter, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
}

.demo-page small,
.demo-page
  :is(
    .demo-label,
    .section-head > span,
    .panel header > span,
    .decision-panel header > span
  ),
.demo-page
  :is(
    .demo-store small,
    .channel small,
    .product p,
    .product dt,
    .supplier p,
    .supplier dt
  ),
.demo-page
  :is(
    .decision small,
    .metric span,
    .metric small,
    .top-actions > span,
    .stock-alert span
  ),
.demo-page :is(.status, .sidebar-foot, .funnel span, .cost-structure span) {
  font-size: 12px;
  line-height: 1.45;
}

.demo-page :is(th, .panel header button, .decision button, .supplier button) {
  font-size: 12px;
}

.demo-page td {
  font-size: 13px;
}

.demo-page :is(button, a, input, select) {
  font-size: 13px;
}

.demo-page :is(button, .top-actions a, .prompt-list button) {
  min-height: 40px;
}

.demo-page :is(input, select) {
  min-height: 44px;
  font-size: 16px;
}

.demo-page .messages > div {
  font-size: 14px;
}

.demo-page .demo-nav-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(23, 26, 24, 0.1);
  border-radius: 8px;
  background: rgba(255, 254, 249, 0.55);
}

.demo-page .demo-nav-icon svg {
  width: 18px;
  height: 18px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.demo-page nav button.active .demo-nav-icon {
  color: #123f31;
  border-color: #9dccb4;
  background: var(--mint);
}

.demo-page :is(button, a, input, select):focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .demo-page .sidebar nav button {
    min-height: 54px;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 8px;
    text-align: left;
    font-size: 12px;
  }
}
