﻿:root {
  --bg-main: #e7e8d5;
  --panel: #efefea;
  --side: #f7f7f2;
  --card: #ffffff;
  --ink: #1f2423;
  --muted: #6a706e;
  --line: #dfe1d7;
  --brand: #0f7a76;
  --accent: #f2cb45;
  --accent-ink: #352a00;
  --ok: #1d7a47;
  --bad: #b13b30;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #dedfc4 0%, var(--bg-main) 100%);
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

.app-shell {
  width: min(1320px, calc(100vw - 32px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  background: var(--panel);
  border-radius: 20px;
  border: 1px solid rgba(30, 36, 35, 0.08);
  display: grid;
  grid-template-columns: 230px 1fr;
  overflow: hidden;
  box-shadow: 0 24px 56px rgba(22, 31, 35, 0.12);
}

.sidebar {
  background: var(--side);
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px 18px;
  border-bottom: 1px dashed var(--line);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--brand), #1c9f99);
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.brand-title {
  font-family: "Manrope", sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.brand-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-section-label {
  margin: 4px 6px 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25px;
  text-transform: uppercase;
}

.side-link {
  text-decoration: none;
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: .2s ease;
}

.side-link:hover {
  background: #fff;
  border-color: var(--line);
}

.side-link.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: rgba(53, 42, 0, 0.15);
}

.side-home-link {
  display: block;
  margin-bottom: 2px;
}

.side-footer {
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
  padding: 8px 6px;
}

.side-logout-link {
  margin-top: 6px;
}

.main-panel {
  padding: 22px;
  overflow: auto;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

h1 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 34px;
  letter-spacing: 0.2px;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zaxira-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  margin-left: 12px;
  margin-bottom: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow-x: auto;
}

.zaxira-tab {
  border: 0;
  background: transparent;
  color: #4b5563;
  font-family: "Manrope", sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
}

.zaxira-tab:hover {
  background: #eef1f5;
  color: var(--ink);
}

.zaxira-tab.active {
  background: #d8dde6;
  color: var(--ink);
  border: 0;
  box-shadow: none;
}

.zaxira-panel.hidden {
  display: none;
}

.need-embed-card {
  padding: 0;
  overflow: hidden;
}

.need-embed-frame {
  width: 100%;
  min-height: calc(100vh - 220px);
  border: 0;
  display: block;
  background: transparent;
}

body.need-embed-body {
  background: transparent;
  min-height: 100%;
  height: auto !important;
  overflow: auto !important;
}

.need-embed-main {
  padding: 10px;
}

.layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.section-title {
  font-family: "Manrope", sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.list-head .section-title {
  margin-bottom: 0;
}

.panel-toggle {
  display: none;
  margin-top: 0;
  padding: 7px 10px;
  min-height: 34px;
  border-radius: 8px;
  font-size: 12px;
}

.list-panel-body {
  margin-top: 10px;
}

.ombor-panel-body {
  margin-top: 8px;
  margin-bottom: 10px;
}

.ombor-toolbar-right {
  justify-content: flex-start;
  margin-bottom: 10px;
}

.orders-list {
  display: grid;
  gap: 8px;
  max-height: 64vh;
  overflow: auto;
  padding-right: 3px;
}

.list-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.orders-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.orders-bulk-bar.hidden {
  display: none;
}

.orders-bulk-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.filter-field {
  display: grid;
  gap: 4px;
  margin: 0;
}

.filter-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.filter-field select {
  padding: 7px 9px;
  min-height: 34px;
  border-radius: 8px;
  font-size: 13px;
}

.order-item {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  transition: .2s ease;
}

.order-item:hover {
  transform: translateY(-1px);
  border-color: #cfd3c2;
  box-shadow: 0 8px 20px rgba(20, 28, 30, 0.08);
}

.order-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.order-check {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  min-height: 100%;
}

.order-check input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.order-item.active {
  background: #fffdf4;
  border-color: #e4cc7c;
  box-shadow: inset 0 0 0 1px #e8cf7a;
}

.order-item.qolda {
  background: #f7f9f5;
  border-color: #d8ddcf;
}

.orders-divider {
  margin: 6px 0 2px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px dashed #d4c37f;
  background: #fff8dc;
  color: #5f520f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.order-item .no {
  font-family: "Manrope", sans-serif;
  font-weight: 700;
}

.order-item .meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.detail-empty {
  color: var(--muted);
  padding: 6px 2px 10px;
}

.detail-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.kv {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
}

.kv .k { color: var(--muted); font-size: 12px; }
.kv .v { font-weight: 700; margin-top: 3px; }
.kv.wide { grid-column: 1 / -1; }

.update-form {
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

select, input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 11px;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
}

select:focus, input:focus {
  outline: none;
  border-color: #c6ccb4;
  box-shadow: 0 0 0 3px rgba(207, 213, 183, 0.3);
}

.mode-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mode-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  cursor: pointer;
}

.mode-pill input { width: auto; margin: 0; }

.btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  transition: .2s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  margin-top: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  border-color: rgba(53, 42, 0, 0.18);
}

.btn-ghost {
  background: #fff;
}

.btn-danger {
  background: #fff2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.btn-icon-only {
  width: 44px;
  min-width: 44px;
  padding: 0;
}

.btn-delete-icon {
  color: #dc2626;
}

.btn-delete-icon::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 auto;
  background: currentColor;
  -webkit-mask: url("/static/icons/orders-delete-bulk.svg") center / contain no-repeat;
  mask: url("/static/icons/orders-delete-bulk.svg") center / contain no-repeat;
  transform: scale(1.3);
  transform-origin: center;
}

.btn-danger:hover {
  background: #fee2e2;
}

.menu-toggle {
  display: none;
  margin-top: 0;
  min-width: 46px;
  padding: 10px 12px;
  font-size: 18px;
  line-height: 1;
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(20, 26, 28, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.form-actions .btn {
  margin-top: 12px;
}

.message {
  min-height: 24px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
}

.message.ok { color: var(--ok); }
.message.error { color: var(--bad); }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 23, 24, 0.36);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 50;
}

.modal-overlay.hidden { display: none; }

.modal-card {
  width: min(1020px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #f8f8f4;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(20, 28, 30, 0.24);
  padding: 14px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.modal-head h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
}

.modal-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.create-grid {
  margin-bottom: 10px;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.sku-list {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  max-height: 46vh;
  overflow: auto;
  padding: 8px;
  display: grid;
  gap: 8px;
}

.groups-summary {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.group-chip .rm {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  width: 22px;
  height: 22px;
  line-height: 1;
}

.sku-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  display: grid;
  grid-template-columns: 56px 1fr 120px;
  align-items: center;
  gap: 8px;
}

.sku-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #f2f2f2;
}

.sku-meta .sku-name {
  font-weight: 700;
  font-size: 13px;
}

.sku-meta .sku-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.qty-input { width: 100%; }

.modal-foot {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.compact-btn {
  padding: 9px 11px;
  font-size: 13px;
}

.search-input {
  width: 340px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 11px;
  font-size: 14px;
  background: #fff;
}

.search-input.compact { width: 210px; }

.columns-panel {
  display: none;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.columns-panel.open { display: grid; }

.col-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.col-check input {
  width: auto;
  margin: 0;
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.stat-chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}

.stat-chip .k { color: var(--muted); font-size: 12px; }

.stat-chip .v {
  font-weight: 700;
  font-family: "Manrope", sans-serif;
  margin-top: 2px;
}

.ombor-grid {
  display: grid;
  gap: 10px;
}

.need-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 10px;
}

.need-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
}

.need-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.need-thumb {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #f2f2f2;
}

.need-thumb-btn {
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: zoom-in;
  line-height: 0;
}

.need-head-meta {
  min-width: 0;
  flex: 1;
}

.need-variant {
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  word-break: break-word;
}

.need-total {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.need-download-btn {
  margin-top: 0;
  margin-left: auto;
  padding: 8px 10px;
  min-height: 38px;
  white-space: nowrap;
}

.need-table td:nth-child(3),
.need-table th:nth-child(3) {
  text-align: right;
}

.need-image-modal-card {
  width: min(980px, 100%);
}

.need-image-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}

.need-image-preview {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 10px;
}

.group-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
}

.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.group-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-thumb {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #f2f2f2;
}

.group-toggle {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.group-name {
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  font-size: 20px;
}

.group-meta {
  color: var(--muted);
  font-size: 13px;
}

.group-body.collapsed { display: none; }

.table-wrap { overflow: auto; }

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.mini-table th,
.mini-table td {
  border-top: 1px solid var(--line);
  padding: 8px;
  text-align: left;
  white-space: nowrap;
}

.table-thumb {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #f2f2f2;
}

.table-thumb.noimg,
.group-thumb.noimg {
  display: inline-block;
}

.mini-table th {
  color: var(--muted);
  font-weight: 700;
  background: #fbfbf7;
}

.empty-note {
  color: var(--muted);
  padding: 8px 2px;
}

.home-filterbar {
  justify-content: flex-end;
}

.inline-field {
  margin: 0;
  display: grid;
  gap: 4px;
  min-width: 138px;
}

.inline-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.inline-field input {
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 13px;
}

.home-dynamics {
  margin-top: 8px;
  margin-bottom: 10px;
}

.home-dyn-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

.home-dyn-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.home-dyn-head-advanced {
  align-items: flex-end;
  margin-bottom: 6px;
}

.home-dyn-title {
  font-family: "Manrope", sans-serif;
  font-size: 17px;
  font-weight: 700;
}

.home-dyn-subtitle {
  margin-top: 2px;
  color: #6b7280;
  font-size: 12px;
}

.home-range-wrap {
  display: grid;
  gap: 4px;
  min-width: 180px;
}

.home-range-wrap span {
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.home-range-select {
  height: 36px;
  border: 1px solid #d5dbea;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  padding: 0 10px;
}

.home-dyn-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.home-dyn-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.dot-sold {
  background: #0f7a76;
}

.dot-return {
  background: #b13b30;
}

.home-dyn-svg-wrap {
  width: 100%;
  overflow: auto;
  position: relative;
}

.home-dyn-svg {
  display: block;
  width: 100%;
  min-width: 620px;
  height: auto;
}

.dyn-grid-line {
  stroke: #ebede5;
  stroke-width: 1;
}

.dyn-axis-text {
  fill: #6a706e;
  font-size: 11px;
}

.dyn-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dyn-line-sold {
  stroke: #0f7a76;
}

.dyn-line-return {
  stroke: #b13b30;
}

.dyn-point {
  opacity: 0.9;
  transform-origin: center;
  transition: r .12s ease, opacity .12s ease;
}

.dyn-point-sold {
  fill: #0f7a76;
}

.dyn-point-return {
  fill: #b13b30;
}

.dyn-point.active {
  r: 5;
  opacity: 1;
}

.dyn-hit {
  fill: transparent;
  cursor: crosshair;
}

.dyn-focus-line {
  stroke: rgba(63, 74, 72, 0.45);
  stroke-width: 1.4;
  stroke-dasharray: 4 4;
  opacity: 0;
}

.dyn-focus-line.show {
  opacity: 1;
}

.dyn-tooltip {
  position: absolute;
  z-index: 4;
  min-width: 188px;
  max-width: 260px;
  border: 1px solid #d7ddcd;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: 0 10px 26px rgba(30, 40, 42, 0.18);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity .1s ease, transform .1s ease;
}

.dyn-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.dyn-tooltip-date {
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.dyn-tooltip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.dyn-tooltip-row b {
  color: var(--ink);
  font-weight: 700;
}

.home-kpis {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.home-kpi-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

.home-kpi-block-costs {
  border-color: #e6d59d;
  background: #fffaf0;
}

.home-kpi-title {
  font-family: "Manrope", sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.home-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.home-kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.home-kpi .k {
  color: var(--muted);
  font-size: 12px;
}

.home-kpi .v {
  margin-top: 6px;
  font-family: "Manrope", sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}

.home-kpi .u {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.home-meta {
  margin-top: 10px;
}

.home-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--muted);
  font-size: 13px;
}

.home-statuses {
  margin-top: 10px;
}

.home-status-head {
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.home-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.home-status-chip {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: #fff;
}

.home-status-chip .k {
  color: var(--muted);
  font-size: 12px;
}

.home-status-chip .v {
  margin-top: 4px;
  font-family: "Manrope", sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}

.home-status-chip .u {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.home-errors {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.home-error-item {
  border: 1px solid #ecc8c3;
  background: #fff5f3;
  color: #8d2d23;
  border-radius: 9px;
  padding: 7px 9px;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
    width: min(1320px, calc(100vw - 14px));
    margin: 7px auto;
    min-height: calc(100vh - 14px);
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 12px;
  }

  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    background: var(--bg-main);
  }

  .app-shell {
    border-radius: 0;
    border: 0;
    box-shadow: none;
    width: 100vw;
    min-height: 100vh;
    margin: 0;
    display: block;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 82vw);
    z-index: 180;
    transform: translateX(-105%);
    transition: transform .24s ease;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    box-shadow: 0 16px 36px rgba(19, 27, 30, 0.2);
    overflow: auto;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  body.menu-open .menu-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .main-panel {
    padding: 12px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .top-actions {
    width: 100%;
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .top-actions .btn {
    flex: 1 1 180px;
  }

  h1 {
    font-size: 28px;
  }

  .topbar p {
    font-size: 13px;
  }

  .section-title {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .panel-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .list-panel-body {
    margin-top: 8px;
  }

  .list-card.collapsed .list-panel-body {
    display: none;
  }

  .ombor-panel-body.collapsed {
    display: none;
  }

  .card {
    padding: 10px;
    border-radius: 12px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .list-filters {
    grid-template-columns: 1fr;
  }

  .create-grid {
    grid-template-columns: 1fr;
  }

  .sku-row {
    grid-template-columns: 48px 1fr 96px;
  }

  .sku-thumb {
    width: 48px;
    height: 48px;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-right {
    justify-content: stretch;
  }

  .toolbar-right > * {
    width: 100%;
  }

  .search-input,
  .search-input.compact {
    width: 100%;
  }

  .home-filterbar {
    width: 100%;
  }

  .home-filterbar .inline-field {
    width: 100%;
    min-width: 0;
  }

  .home-kpi .v {
    font-size: 24px;
  }

  .home-dyn-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-dyn-legend {
    flex-wrap: wrap;
    gap: 6px 8px;
  }

  .columns-panel {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .need-grid {
    grid-template-columns: 1fr;
  }

  .need-card-head {
    flex-wrap: wrap;
  }

  .need-thumb {
    width: 84px;
    height: 84px;
  }

  .need-download-btn {
    width: 100%;
    margin-left: 0;
  }

  .modal-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .group-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .group-meta {
    white-space: normal;
    line-height: 1.35;
  }

  .mini-table th,
  .mini-table td {
    padding: 7px 6px;
    font-size: 12px;
  }

  .detail-box {
    grid-template-columns: 1fr;
  }

  .orders-list {
    max-height: none;
  }

  .mode-row {
    flex-wrap: wrap;
  }

  .modal-overlay {
    padding: 8px;
    align-items: end;
  }

  .modal-card {
    width: 100%;
    max-height: 92vh;
    border-radius: 14px 14px 0 0;
  }

  .modal-head {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-head .btn {
    margin-top: 4px;
    align-self: flex-end;
  }
}

@media (max-width: 520px) {
  .sidebar {
    padding: 10px 10px 8px;
    gap: 10px;
  }

  .brand {
    padding: 4px 2px 10px;
    gap: 8px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 13px;
  }

  .brand-title {
    font-size: 18px;
  }

  .brand-sub {
    font-size: 11px;
  }

  .side-nav {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .side-section-label {
    margin: 2px 2px 0;
    font-size: 10px;
    letter-spacing: 0.2px;
  }

  .side-link {
    padding: 9px 10px;
    font-size: 13px;
    text-align: center;
  }

  .side-footer {
    display: none;
  }

  .main-panel {
    padding: 10px;
  }

  h1 {
    font-size: 24px;
  }

  .top-actions {
    gap: 6px;
  }

  .top-actions .btn {
    padding: 9px 10px;
    font-size: 14px;
  }

  .sku-row {
    grid-template-columns: 42px 1fr 78px;
    padding: 7px;
    gap: 6px;
  }

  .sku-thumb {
    width: 42px;
    height: 42px;
  }

  .sku-meta .sku-name {
    font-size: 12px;
  }

  .sku-meta .sku-sub {
    font-size: 11px;
  }

  .qty-input {
    padding: 8px 7px;
    font-size: 13px;
  }

  .columns-panel {
    grid-template-columns: 1fr;
  }

  .stats-bar {
    grid-template-columns: 1fr 1fr;
  }

  .group-name {
    font-size: 17px;
  }

  .home-kpis {
    grid-template-columns: 1fr;
  }

  .home-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== UI Refresh: Seller E-com style ===== */
:root {
  --shell-bg: #f3f5f9;
  --shell-panel: #ffffff;
  --shell-line: #e4e8ef;
  --shell-ink: #1f2937;
  --shell-muted: #6b7280;
  --side-bg: linear-gradient(180deg, #151c31 0%, #28305b 100%);
  --side-line: rgba(255, 255, 255, 0.08);
  --side-ink: #c5d0e7;
  --side-muted: #8b98b7;
  --side-active-bg: rgba(255, 255, 255, 0.12);
  --side-active-ink: #ffffff;
  --accent: #4f46e5;
  --accent-soft: #eef0ff;
  --success: #15a85a;
  --warn: #f59e0b;
  --danger: #ef4444;
}

body {
  background: #e9edf5;
  color: var(--shell-ink);
}

.app-shell {
  width: min(1720px, calc(100vw - 24px));
  min-height: 100vh;
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  background: var(--shell-bg);
  box-shadow: none;
  grid-template-columns: 250px 1fr;
}

.sidebar {
  background: var(--side-bg);
  border-right: 0;
  box-shadow: inset -1px 0 0 rgba(5, 10, 24, 0.7);
  color: var(--side-ink);
  padding: 10px 8px;
  gap: 8px;
}

.brand {
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--side-line);
  padding: 2px 4px 12px;
}

.brand-mark {
  width: 30px;
  height: 22px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: linear-gradient(145deg, #24d46f, #16a34a);
  color: #072313;
}

.brand-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: #f5f8ff;
}

.brand-sub,
.side-home-link {
  display: none;
}

.side-nav {
  gap: 4px;
}

.side-section-label {
  margin: 10px 6px 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12px;
  letter-spacing: 0;
  color: var(--side-muted);
  text-transform: none;
  font-weight: 700;
}

.side-link {
  color: var(--side-ink);
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.side-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: transparent;
}

.side-link.active {
  background: var(--side-active-bg);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--side-active-ink);
}

.side-ico {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0;
  opacity: 0.95;
  position: relative;
}

.side-ico::before {
  content: "";
  font-size: 11px;
  line-height: 1;
  color: #d7def1;
}

.ico-home::before {
  content: "";
  width: 12px;
  height: 12px;
  display: block;
  background-color: currentColor;
  -webkit-mask: url("/static/icons/HomeCheckmark24Filled.svg") no-repeat center / contain;
  mask: url("/static/icons/HomeCheckmark24Filled.svg") no-repeat center / contain;
}
.ico-products::before { content: "\25A3"; }
.ico-orders::before { content: "\25B3"; }
.ico-warehouse::before { content: "\25A4"; }
.ico-analytics::before { content: "\25D4"; }
.ico-control::before { content: "\27F3"; }
.ico-report::before { content: "\2299"; }
.ico-staff::before { content: "\25CF"; }
.ico-settings::before { content: "\2699"; }
.ico-admin::before {
  content: "";
  width: 19px;
  height: 19px;
  display: block;
  background-color: currentColor;
  -webkit-mask: url("/static/icons/nav-admin-custom.svg") no-repeat center / contain;
  mask: url("/static/icons/nav-admin-custom.svg") no-repeat center / contain;
}
.ico-setup::before {
  content: "";
  width: 14px;
  height: 14px;
  display: block;
  background-color: currentColor;
  -webkit-mask: url("/static/icons/nav-settings-custom.svg") no-repeat center / contain;
  mask: url("/static/icons/nav-settings-custom.svg") no-repeat center / contain;
}
.ico-logout::before { content: "\21AA"; }

.side-link:hover .side-ico,
.side-link.active .side-ico {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
}

.side-link.active .side-ico::before {
  color: #ffffff;
}

.side-footer {
  margin-top: auto;
  display: grid;
  gap: 5px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.main-panel {
  padding: 0;
}

.topbar {
  align-items: center;
  margin: 0;
  padding: 14px 16px 8px;
}

.page-kicker {
  display: inline-block;
  font-size: 11px;
  color: #6f7a92;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25px;
  margin-bottom: 2px;
}

h1 {
  font-size: 28px;
  margin-bottom: 1px;
}

.topbar p {
  font-size: 13px;
}

.card {
  border-radius: 12px;
  border: 1px solid var(--shell-line);
  background: var(--shell-panel);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  margin: 0 16px 16px;
}

.btn {
  border-radius: 10px;
  min-height: 44px;
  height: 44px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--accent);
  border-color: #4338ca;
  color: #fff;
}

.btn-ghost {
  background: #fff;
  border-color: #d6dce8;
  color: #334155;
}

.btn-danger {
  background: #fff2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.top-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.top-actions .btn {
  margin: 0;
}

.menu-toggle {
  width: 44px;
  padding: 0;
}

.layout {
  margin: 0 16px 16px;
}

.layout .card {
  margin: 0;
}

.card-ombor {
  padding: 0;
  overflow: hidden;
}

.card-ombor .list-head,
.card-ombor .status-tabs,
.card-ombor .ombor-panel-body {
  padding-left: 12px;
  padding-right: 12px;
}

.card-ombor .list-head {
  padding-top: 12px;
}

.card-ombor .status-tabs {
  margin: 0;
  padding-top: 4px;
  padding-bottom: 8px;
}

.card-ombor .ombor-panel-body {
  margin-top: 0;
  padding-bottom: 10px;
}

.card-ombor .ombor-grid {
  margin: 0;
}

.status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}

.status-tab {
  border: 0;
  background: transparent;
  color: #4b5563;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.status-tab.active {
  background: #d8dde6;
  border: 0;
  color: #1f2937;
}

.status-tab:hover {
  background: #eef1f5;
  color: #1f2937;
}

.status-badge {
  display: inline-block;
  min-width: 18px;
  text-align: center;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 11px;
  padding: 0 4px;
  margin-left: 4px;
}

.status-tab.active .status-badge {
  background: rgba(31, 41, 55, 0.08);
}

.group-card {
  border-radius: 10px;
  border: 1px solid #dbe2ee;
  overflow: hidden;
}

.group-head {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(520px, 2fr);
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  padding: 8px 10px;
  border-bottom: 1px solid #dbe2ee;
}

.group-head-left {
  gap: 8px;
}

.group-thumb {
  width: 44px;
  height: 56px;
  border-radius: 8px;
}

.group-name-wrap {
  min-width: 0;
}

.group-badge {
  display: inline-block;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 3px;
}

.group-badge.is-low {
  background: #fff3d6;
  color: #8a5600;
}

.group-badge.is-need {
  background: #ffe1e1;
  color: #a01f1f;
}

.group-badge.is-ok {
  background: #e4f7eb;
  color: #10632f;
}

.group-name {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.group-meta {
  display: grid;
  grid-template-columns: repeat(6, minmax(88px, 1fr));
  gap: 6px;
  font-size: 12px;
}

.group-meta span {
  display: grid;
  gap: 2px;
  background: #fff;
  border: 1px solid #e3e8f2;
  border-radius: 8px;
  padding: 4px 6px;
  color: #475569;
}

.group-meta b {
  font-size: 17px;
  color: #0f172a;
  line-height: 1;
}

.group-toggle {
  border-radius: 7px;
  width: 26px;
  height: 26px;
  border-color: #d6dceb;
}

.mini-table thead th {
  background: #475467;
  color: #fff;
  font-size: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid #3b4558;
}

.mini-table tbody td {
  background: #f8fafc;
  border-bottom: 1px solid #e4e8f0;
  font-size: 14px;
  color: #111827;
}

.mini-table tbody tr:nth-child(odd) td {
  background: #f2f6fb;
}

.orders-list {
  max-height: 70vh;
}

.order-item {
  border-radius: 10px;
  border-color: #dbe2ef;
  background: #fff;
}

.order-item.active {
  background: #eef2ff;
  border-color: #96a5ff;
  box-shadow: inset 0 0 0 1px #96a5ff;
}

.message.ok {
  background: #ecfdf3;
  border-color: #9bd8b1;
  color: #0d6b34;
}

.message.error {
  background: #fff1f1;
  border-color: #f2bbbb;
  color: #a42020;
}

@media (max-width: 1024px) {
  .app-shell {
    width: calc(100vw - 16px);
    min-height: calc(100vh - 10px);
    margin: 8px auto;
    grid-template-columns: 230px 1fr;
  }

  .group-head {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .group-meta {
    grid-template-columns: repeat(3, minmax(84px, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: 100vw;
    min-height: 100vh;
    margin: 0;
  }

  .main-panel {
    padding: 10px;
  }

  .status-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .status-tab {
    white-space: nowrap;
  }

  .group-meta {
    grid-template-columns: repeat(2, minmax(84px, 1fr));
  }
}

/* ===== Home Dashboard Redesign ===== */
body,
input,
select,
button,
textarea,
.brand-title,
h1,
h2,
h3,
.section-title {
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.home-dashboard-card {
  padding: 12px 14px 14px;
  background: #ffffff;
}

.home-dashboard-card .toolbar {
  margin-bottom: 10px;
}

.home-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #d6e3ff;
  background: linear-gradient(92deg, #3b82f6 0%, #2563eb 62%, #0f172a 100%);
  border-radius: 12px;
  padding: 10px 12px;
  color: #f8fbff;
  margin-bottom: 10px;
}

.home-banner .t1 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.home-banner .t2 {
  font-size: 12px;
  opacity: 0.92;
}

.home-banner-btn {
  min-height: 34px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
  font-weight: 700;
}

.home-kpis {
  margin-top: 6px;
  margin-bottom: 10px;
  gap: 8px;
}

.home-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.home-strip-card {
  border: 1px solid #e5e9f1;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 12px;
}

.home-strip-card .h {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 7px;
}

.home-strip-card .pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.home-strip-card .pair > div {
  border: 1px solid #e9edf4;
  border-radius: 8px;
  background: #fff;
  padding: 7px 8px;
}

.home-strip-card b {
  display: block;
  font-size: 18px;
  line-height: 1.08;
  color: #0f172a;
}

.home-strip-card span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: #64748b;
}

.home-dyn-card {
  border: 1px solid #e5e9f1;
  background: #ffffff;
  border-radius: 12px;
  padding: 10px;
}

.home-dyn-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 10px;
}

.home-dyn-svg-wrap {
  border: 1px solid #e9edf4;
  border-radius: 10px;
  background: #fcfdff;
  padding: 6px 4px 2px;
}

.home-dyn-svg {
  min-width: 560px;
}

.home-dyn-side {
  display: grid;
  gap: 8px;
}

.home-side-stat {
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  background: #fbfcfe;
  padding: 9px 10px;
}

.home-side-stat .k {
  font-size: 12px;
  color: #64748b;
}

.home-side-stat .v {
  margin-top: 2px;
  font-size: 25px;
  line-height: 1.08;
  font-weight: 800;
  color: #0f172a;
}

.home-side-stat .u {
  margin-top: 4px;
  font-size: 11px;
  color: #16a34a;
}

.dyn-grid-line {
  stroke: #edf1f7;
}

.dyn-grid-line-v {
  stroke: #edf1f7;
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.dyn-area {
  fill: url(#soldAreaGrad);
}

.dyn-area-return {
  fill: url(#returnAreaGrad);
}

.dyn-line-sold {
  stroke: #3b82f6;
  stroke-width: 3.4;
}

.dyn-line-return {
  stroke: #ef4444;
  stroke-width: 2.8;
}

.dyn-point-sold {
  fill: #2563eb;
}

.dyn-point-return {
  fill: #dc2626;
}

.home-kpi-block {
  border-color: #e5e9f1;
  border-radius: 10px;
  background: #f9fbff;
}

.home-kpi-block-costs {
  background: #f8fbff;
  border-color: #dfe8ff;
}

.home-kpi-title {
  font-size: 16px;
}

.home-kpi-grid {
  gap: 8px;
}

.home-kpi {
  border-radius: 10px;
  border: 1px solid #e5eaf3;
}

.home-kpi .v {
  font-size: 24px;
  font-weight: 800;
}

.home-meta-line {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  font-size: 12px;
}

.home-meta-line span {
  border: 1px solid #e4e9f2;
  background: #fbfcfe;
  border-radius: 9px;
  padding: 7px 9px;
}

.home-status-grid {
  gap: 8px;
}

.home-status-chip {
  border: 1px solid #e3e8f2;
  background: #fbfcff;
}

@media (max-width: 1240px) {
  .home-range-wrap {
    min-width: 150px;
  }

  .home-dyn-layout {
    grid-template-columns: 1fr;
  }

  .home-dyn-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .home-strip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-dyn-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .home-dyn-head-advanced {
    flex-direction: column;
    align-items: stretch;
  }

  .home-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-strip-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Soft Chart + Fixed Sidebar polish ===== */
.home-dyn-card {
  border: 1px solid #edf1f7;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(38, 67, 117, 0.06);
}

.home-dyn-layout {
  display: block;
}

.home-dyn-svg-wrap {
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  padding: 0;
}

.dyn-grid-line {
  stroke: #edf2fb;
  stroke-width: 1;
}

.dyn-grid-line-v {
  stroke: #e8eefb;
  stroke-width: 1;
  stroke-dasharray: 4 8;
  opacity: 0.85;
}

.dyn-axis-text {
  fill: #9aa6bc;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.dyn-area-activity {
  fill: url(#activityAreaGrad);
  opacity: 1;
}

.dyn-area-sold {
  fill: url(#soldAreaGrad);
  opacity: 1;
}

.dyn-line {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dyn-line-sold {
  stroke: #4a8cff;
  stroke-width: 2;
  opacity: 0.92;
}

.dyn-point-sold {
  fill: #4a8cff;
  opacity: 0;
  transition: opacity .14s ease, transform .14s ease, r .14s ease;
}

.dyn-tooltip {
  border: 1px solid #e4eaf5;
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(35, 58, 107, 0.14);
  padding: 10px 12px;
}

.dyn-focus-line {
  stroke: rgba(74, 140, 255, 0.35);
  stroke-width: 1.2;
  stroke-dasharray: 4 7;
}

.dyn-tooltip-date {
  color: #18253e;
  font-size: 13px;
}

.dyn-tooltip-row {
  color: #6f7d94;
}

.home-dyn-footer-note {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 4px 0;
  color: #738099;
  font-size: 12px;
}

.dot-activity {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  background: #dfe6ff;
  border: 1px solid #cad7ff;
}

/* ===== Admin ===== */
.admin-stats {
  margin-bottom: 14px;
}

.admin-table-wrap {
  overflow: auto;
}

.admin-users-table {
  min-width: 1120px;
}

.admin-user-name {
  font-weight: 700;
  color: #1f2937;
}

.admin-user-sub {
  margin-top: 2px;
  font-size: 12px;
  color: #748096;
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-perf-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.admin-perf-block {
  display: grid;
  gap: 10px;
}

.admin-perf-title {
  font-size: 18px;
  font-weight: 800;
  color: #1f2937;
}

.perf-route-name,
.perf-path {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-page {
  background: #f7f9fc;
  color: #191c1e;
}

.admin-page .sidebar {
  background:
    radial-gradient(circle at top right, rgba(253, 118, 26, 0.18), transparent 28%),
    linear-gradient(180deg, #161220 0%, #120f19 100%);
  box-shadow: 0 20px 40px rgba(18, 15, 25, 0.34);
  border-right: none;
}

.admin-page .brand-title {
  color: #ffffff;
}

.admin-page .side-section-label {
  color: rgba(255, 219, 202, 0.58);
}

.admin-page .side-link {
  color: rgba(245, 238, 255, 0.78);
}

.admin-page .side-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
}

.admin-page .side-link.active {
  background: linear-gradient(135deg, #fd761a, #9d4300);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(157, 67, 0, 0.28);
}

.admin-page .side-link.active .side-ico {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.admin-page .brand-mark {
  background: linear-gradient(135deg, #fd761a, #9d4300);
  color: #fff7f0;
  box-shadow: 0 10px 22px rgba(157, 67, 0, 0.28);
}

.admin-page .side-footer {
  border-top-color: rgba(255, 219, 202, 0.1);
}

.admin-page .main-panel {
  background: #f7f9fc;
  min-height: 100vh;
  padding-bottom: 32px;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(24px);
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(199, 196, 215, 0.12);
  border-top: 3px solid #5e5ce6;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.admin-topbar-search {
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f2f4f7;
  padding: 8px 14px;
  border-radius: 999px;
}

.admin-topbar-search span {
  color: #75758b;
  font-size: 18px;
}

.admin-topbar-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  width: 100%;
  color: #1f2937;
}

.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-topbar-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: rgba(17, 24, 39, 0.04);
  display: grid;
  place-items: center;
  color: #4b5563;
}

.admin-topbar-icon span {
  font-size: 18px;
}

.admin-topbar-sep {
  width: 1px;
  height: 26px;
  background: rgba(15, 23, 42, 0.08);
}

.admin-topbar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-topbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #e7e7ff;
  display: grid;
  place-items: center;
  color: #4441cc;
  font-weight: 700;
}

.admin-topbar-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.admin-topbar-name {
  font-size: 12px;
  font-weight: 700;
}

.admin-topbar-role {
  font-size: 10px;
  color: #747b8a;
}

.admin-topbar-back {
  background: #ffffff;
  border: 1px solid rgba(120, 126, 140, 0.2);
  border-radius: 12px;
}

.admin-canvas {
  padding: 28px 28px 0;
  display: grid;
  gap: 24px;
}

.admin-hero {
  display: grid;
  gap: 16px;
}

.admin-hero-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.admin-page-title {
  margin: 4px 0 0;
  font-size: 44px;
  line-height: 1.03;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #191c1e;
}

.admin-page-desc {
  margin: 8px 0 0;
  color: #5f6677;
  font-size: 16px;
}

.admin-hero-actions,
.admin-perf-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-hero-message {
  margin: 0;
  border-left-width: 4px;
  border-radius: 12px;
}

.admin-kpi-strip {
  background: #ffffff;
  border-radius: 24px;
  padding: 18px 20px;
  box-shadow: 0 12px 32px -4px rgba(25, 28, 30, 0.06);
}

.admin-card {
  border: none;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 12px 32px -4px rgba(25, 28, 30, 0.06);
}

.admin-users-card {
  padding: 0;
  overflow: hidden;
}

.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 8px;
}

.admin-card-title-wrap,
.admin-perf-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(94, 92, 230, 0.12);
  color: #5e5ce6;
  font-size: 20px;
}

.admin-card-icon-error {
  background: rgba(186, 26, 26, 0.12);
  color: #ba1a1a;
}

.admin-card-icon-primary {
  background: rgba(94, 92, 230, 0.12);
  color: #5e5ce6;
}

.admin-card-icon-success {
  background: rgba(0, 100, 67, 0.12);
  color: #006443;
}

.admin-card-title {
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
  color: #191c1e;
}

.admin-card-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: #70788b;
}

.admin-users-wrap {
  padding: 0 16px 16px;
}

.admin-page .admin-users-table {
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
}

.admin-page .admin-users-table thead tr {
  background: rgba(242, 244, 247, 0.88);
}

.admin-page .admin-users-table thead th {
  padding-top: 16px;
  padding-bottom: 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5f6677;
  font-weight: 800;
}

.admin-page .admin-users-table tbody td {
  background: #ffffff;
  border-top: 1px solid rgba(199, 196, 215, 0.18);
}

.admin-page .admin-users-table tbody tr:hover td {
  background: rgba(242, 244, 247, 0.5);
}

.admin-perf-section {
  display: grid;
  gap: 16px;
}

.admin-perf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.admin-page .admin-perf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.admin-page .admin-perf-block {
  background: #ffffff;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 12px 32px -4px rgba(25, 28, 30, 0.06);
  display: grid;
  gap: 14px;
}

.admin-page .stats-bar.admin-stats {
  margin-bottom: 0;
}

.admin-page .admin-perf-title {
  font-size: 18px;
  font-weight: 800;
  color: #191c1e;
}

@media (max-width: 1100px) {
  .admin-hero-head,
  .admin-perf-header {
    align-items: start;
    flex-direction: column;
  }

  .admin-page .admin-perf-grid {
    grid-template-columns: 1fr;
  }
}

.extra-services-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
}

.extra-services-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 320px));
  gap: 16px;
}

.extra-service-card-ui {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 20px 20px 18px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid transparent;
  text-decoration: none;
  color: #111827;
  box-shadow: 0 14px 32px rgba(25, 28, 30, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.extra-service-card-ui:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: 0 18px 36px rgba(25, 28, 30, 0.12);
}

.extra-service-card-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #111827;
}

.extra-service-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: rgba(79, 70, 229, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.extra-service-card-title {
  font-size: 18px;
  font-weight: 800;
}

.extra-service-card-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #6b7280;
}

.extra-service-card-cta {
  margin-top: 6px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  transition: background 0.2s ease, color 0.2s ease;
}

.extra-service-card-ui:hover .extra-service-card-cta {
  background: #4f46e5;
  color: #ffffff;
}

.extra-service-section {
  margin-top: 12px;
}

.extra-service-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: #fff;
}

.compact-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.result-stack {
  display: grid;
  gap: 14px;
}

.code-box {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafe;
  color: var(--ink);
  word-break: break-all;
}

.muted-box {
  color: var(--muted);
}

.small-title {
  margin-bottom: 12px;
}

.badge-ok {
  background: #e8f8ee;
  color: #17663a;
}

.badge-bad {
  background: #fdecec;
  color: #a63333;
}

.badge-ink {
  background: #e9eef8;
  color: #253859;
}

.dot-sold {
  background: #4a8cff;
}

.dyn-inline-metric {
  margin-left: auto;
  color: #7b889e;
}

.dyn-inline-metric b {
  color: #23324d;
}

@media (min-width: 761px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .app-shell {
    height: 100vh;
    min-height: 100vh;
  }

  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }

  .main-panel {
    height: 100vh;
    overflow-y: auto;
  }
}

/* ===== Final Sidebar/Icon Fixes ===== */
.sidebar {
  border-right: 0 !important;
  box-shadow: none !important;
}

.side-ico {
  width: 22px;
  height: 22px;
  border: 0 !important;
  background: transparent !important;
}

.side-ico::before {
  font-size: 14px;
}

.ico-home::before {
  width: 16px;
  height: 16px;
}

.side-link:hover .side-ico,
.side-link.active .side-ico {
  background: transparent !important;
  border-color: transparent !important;
}

@media (max-width: 760px) {
  .sidebar {
    border-right: 0 !important;
    box-shadow: none !important;
  }
}

/* ===== Final layout lock (remove left white stripe) ===== */
html,
body {
  margin: 0 !important;
  padding: 0 !important;
}

.app-shell {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

@media (max-width: 1400px) {
  .app-shell {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
  }
}

.sidebar {
  left: 0 !important;
}

/* Sidebar typography downsize */
.side-link {
  font-size: 13px !important;
  font-weight: 600 !important;
}

.side-section-label {
  font-size: 11px !important;
}

.side-footer .side-link {
  font-size: 12px !important;
}

/* ===== Desktop/mobile feature separation ===== */
@media (min-width: 761px) {
  .menu-toggle,
  .panel-toggle {
    display: none !important;
  }

  .menu-backdrop {
    display: none !important;
  }

  .list-card.collapsed .list-panel-body {
    display: block !important;
  }

  .ombor-panel-body.collapsed {
    display: block !important;
  }
}

@media (max-width: 760px) {
  .menu-toggle,
  .panel-toggle {
    display: inline-flex !important;
  }
}

/* ===== User custom sidebar icon pack + active color ===== */
.side-link.active {
  background: #1a1e28 !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: #ffffff !important;
}

.side-ico {
  width: 20px !important;
  height: 20px !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
}

.side-ico::before {
  content: "" !important;
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  background-color: currentColor !important;
  -webkit-mask-repeat: no-repeat !important;
  -webkit-mask-position: center !important;
  -webkit-mask-size: contain !important;
  mask-repeat: no-repeat !important;
  mask-position: center !important;
  mask-size: contain !important;
}

.ico-home::before {
  -webkit-mask-image: url("/static/icons/nav-home-custom.svg") !important;
  mask-image: url("/static/icons/nav-home-custom.svg") !important;
}

.ico-products::before {
  -webkit-mask-image: url("/static/icons/nav-products-custom.svg") !important;
  mask-image: url("/static/icons/nav-products-custom.svg") !important;
}

.ico-orders::before {
  -webkit-mask-image: url("/static/icons/nav-orders-custom.svg") !important;
  mask-image: url("/static/icons/nav-orders-custom.svg") !important;
}

.ico-warehouse::before {
  -webkit-mask-image: url("/static/icons/nav-warehouse-custom.svg") !important;
  mask-image: url("/static/icons/nav-warehouse-custom.svg") !important;
}

.ico-analytics::before {
  -webkit-mask-image: url("/static/icons/nav-analytics-custom.svg") !important;
  mask-image: url("/static/icons/nav-analytics-custom.svg") !important;
}

.ico-control::before {
  -webkit-mask-image: url("/static/icons/nav-control-custom.svg") !important;
  mask-image: url("/static/icons/nav-control-custom.svg") !important;
}

.ico-report::before {
  -webkit-mask-image: url("/static/icons/nav-report-custom.svg") !important;
  mask-image: url("/static/icons/nav-report-custom.svg") !important;
}

.ico-staff::before {
  -webkit-mask-image: url("/static/icons/nav-staff-custom.svg") !important;
  mask-image: url("/static/icons/nav-staff-custom.svg") !important;
}

.ico-admin::before {
  content: "" !important;
  width: 17px !important;
  height: 17px !important;
  display: block !important;
  background-color: currentColor !important;
  -webkit-mask: url("/static/icons/nav-admin-custom.svg") no-repeat center / contain !important;
  mask: url("/static/icons/nav-admin-custom.svg") no-repeat center / contain !important;
}

/* Keep settings/logout readable with existing glyphs */
.ico-settings::before,
.ico-logout::before {
  -webkit-mask-image: none !important;
  mask-image: none !important;
  content: attr(data-icon) !important;
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  font-size: 14px !important;
  line-height: 1 !important;
}

.ico-settings::before { content: "\2699" !important; }
.ico-setup::before {
  content: "" !important;
  width: 14px !important;
  height: 14px !important;
  display: block !important;
  background-color: currentColor !important;
  -webkit-mask: url("/static/icons/nav-settings-custom.svg") no-repeat center / contain !important;
  mask: url("/static/icons/nav-settings-custom.svg") no-repeat center / contain !important;
}
.ico-logout::before { content: "\21AA" !important; }

/* ===== Hard fix: remove the left/right white stripe near sidebar ===== */
html,
body {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
}

.app-shell {
  width: 100vw !important;
  max-width: 100vw !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.sidebar {
  margin: 0 !important;
  left: 0 !important;
  border-right: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

.sidebar::before,
.sidebar::after {
  content: none !important;
}

/* ===== Final Unified Selection Design ===== */

/* Select controls (all pages) */
select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  border: 1px solid #cfd6e2 !important;
  border-radius: 12px !important;
  background-color: #ffffff !important;
  color: #1f2937 !important;
  min-height: 44px !important;
  padding: 10px 42px 10px 14px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9L12 15L18 9' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 14px 14px !important;
}

select:focus {
  border-color: #b9c3d4 !important;
  box-shadow: 0 0 0 3px rgba(185, 195, 212, 0.28) !important;
}

select option {
  background: #ffffff;
  color: #1f2937;
}

/* Tab-like choosers (Zaxira + Ombor status tabs) */
.zaxira-switcher,
.status-tabs {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  gap: 8px !important;
}

.zaxira-tab,
.status-tab {
  background: transparent !important;
  border: 0 !important;
  border-radius: 12px !important;
  color: #334155 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  padding: 7px 12px !important;
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  box-shadow: none !important;
}

.zaxira-tab:hover,
.status-tab:hover {
  background: #e7ebf2 !important;
  color: #1f2937 !important;
}

.zaxira-tab.active,
.status-tab.active {
  background: #d2d8e2 !important;
  color: #111827 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.zaxira-tab.active {
  border-radius: 12px !important;
}

.status-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 20px !important;
  height: 20px !important;
  margin-left: 6px !important;
  padding: 0 6px !important;
  border-radius: 999px !important;
  background: #e5e9f1 !important;
  color: #1f2937 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

.status-tab.active .status-badge {
  background: #bec7d6 !important;
  color: #111827 !important;
}

/* Ombor mini tabs left-align with "Ombor Ko'rinishi" title */
.card-ombor .status-tabs {
  padding-left: 12px !important;
  padding-right: 12px !important;
}

/* Need-report custom group picker (search + list) */
.need-group-picker {
  position: relative;
  min-width: 320px;
  max-width: 420px;
}

.need-group-native {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.need-group-trigger {
  width: 100%;
  min-height: 44px;
  border: 1px solid #b9c1cf;
  border-radius: 14px;
  background: #f4f6fa;
  color: #1f2937;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  padding: 0 42px 0 14px;
  position: relative;
  cursor: pointer;
}

.need-group-trigger span:first-child {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.need-group-caret {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid #2c3441;
  border-bottom: 2px solid #2c3441;
  transform: translateY(-60%) rotate(45deg);
  transition: transform .15s ease;
}

.need-group-trigger[aria-expanded="true"] .need-group-caret {
  transform: translateY(-35%) rotate(225deg);
}

.need-group-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  z-index: 45;
  border: 1px solid #c0c7d3;
  border-radius: 14px;
  background: #eceef2;
  box-shadow: 0 14px 30px rgba(22, 30, 44, 0.16);
  padding: 8px;
}

.need-group-panel.hidden {
  display: none;
}

.need-group-search {
  width: 100%;
  min-height: 38px;
  border: 1px solid #c6cdd9;
  border-radius: 12px;
  background: #f8f9fc;
  color: #1f2937;
  font-size: 14px;
  padding: 0 12px;
  margin-bottom: 8px;
}

.need-group-options {
  max-height: 320px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding-right: 2px;
}

.need-group-option {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: #d9dce3;
  color: #232b37;
  text-align: left;
  min-height: 42px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.need-group-option:hover {
  background: #d1d6e0;
}

.need-group-option.active {
  background: #c9ced9;
}

.need-group-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #242933;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.need-group-option:not(.active) .need-group-check {
  background: #b8bfcc;
  color: transparent;
}

.need-group-name {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.need-group-need {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: #4b5563;
  padding-left: 8px;
}

.need-group-empty {
  padding: 10px 12px;
  color: #5b6474;
  font-size: 13px;
}

.variant-filter-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.need-variant-filter-list {
  max-height: 280px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding-right: 2px;
}

.need-variant-filter-list .col-check {
  border: 1px solid #d5dbe7;
  border-radius: 9px;
  background: #f4f6fa;
  padding: 7px 10px;
}

/* Need report card width/readability fix */
.need-grid {
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)) !important;
}

.need-card,
.need-card .table-wrap {
  min-width: 0;
}

.need-card .table-wrap {
  overflow-x: auto;
}

.need-table {
  width: 100% !important;
  table-layout: fixed;
}

.need-table th,
.need-table td {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.need-table th:first-child,
.need-table td:first-child {
  width: 72px;
  white-space: nowrap !important;
}

.need-table th:last-child,
.need-table td:last-child {
  width: 116px;
  white-space: nowrap !important;
  text-align: right !important;
}

@media (max-width: 900px) {
  .need-grid {
    grid-template-columns: 1fr !important;
  }
}

/* FBS invoice page */
.fbs-card {
  padding: 14px;
}

.fbs-layout {
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.fbs-endpoints {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f9fafc;
  padding: 12px;
}

.fbs-endpoint-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 320px);
  overflow: auto;
  padding-right: 3px;
}

.fbs-endpoint-item {
  width: 100%;
  border: 1px solid #c8d1e3;
  border-radius: 12px;
  background: #ecf2fb;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  padding: 8px 10px;
  cursor: pointer;
}

.fbs-endpoint-item.active {
  border-color: #7f9ef2;
  background: #dfe9fb;
}

.fbs-method-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 28px;
  border-radius: 8px;
  background: #4f9be8;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}

.fbs-method-badge.post {
  background: #39ba7d;
}

.fbs-endpoint-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.fbs-endpoint-meta code {
  font-size: 15px;
  line-height: 1.2;
  color: #1b2638;
}

.fbs-endpoint-meta small {
  color: #3c4b65;
  font-size: 12px;
  line-height: 1.25;
}

.fbs-workspace {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
}

.fbs-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.fbs-path {
  display: inline-block;
  font-size: 14px;
  color: #15233b;
  word-break: break-all;
}

.fbs-selected-desc {
  color: #51607a;
  margin: 0 0 10px;
  font-size: 13px;
}

.fbs-workspace textarea {
  min-height: 90px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.fbs-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 8px;
}

.fbs-result {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0f172a;
  color: #dbeafe;
  padding: 10px;
  min-height: 210px;
  max-height: 520px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 1200px) {
  .fbs-layout {
    grid-template-columns: 1fr;
  }
  .fbs-endpoint-list {
    max-height: 340px;
  }
}

/* FBS operational dashboard */
.fbs-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.fbs-invoices-card,
.fbs-detail-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  min-width: 0;
}

.fbs-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.fbs-invoice-list {
  display: grid;
  gap: 8px;
  max-height: 620px;
  overflow: auto;
  padding-right: 3px;
}

.fbs-invoice-item {
  width: 100%;
  border: 1px solid #d6ddea;
  border-radius: 11px;
  background: #f7f9fc;
  text-align: left;
  padding: 9px 10px;
  cursor: pointer;
}

.fbs-invoice-item.active {
  border-color: #8aa1f7;
  background: #eaf0ff;
}

.fbs-invoice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fbs-invoice-meta {
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #3c4d6c;
}

.fbs-invoice-meta.muted {
  color: #6c7a95;
}

.fbs-bucket {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.fbs-bucket.new {
  background: #fff3d7;
  color: #885100;
}

.fbs-bucket.active {
  background: #dceaff;
  color: #1b4fb8;
}

.fbs-bucket.done {
  background: #dbf6e7;
  color: #0f5f33;
}

.fbs-bucket.cancelled {
  background: #ffe4e4;
  color: #9d1f1f;
}

.fbs-detail-info .detail-box {
  margin-bottom: 10px;
}

.fbs-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.fbs-subcard {
  border: 1px solid #dde2ef;
  border-radius: 12px;
  background: #f9fbff;
  padding: 10px;
}

.fbs-subcard h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.fbs-orders-table td,
.fbs-orders-table th {
  font-size: 12px;
}

.fbs-qr-list {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
}

.fbs-qr-item {
  border: 1px solid #dde2ef;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  display: grid;
  gap: 4px;
}

.fbs-qr-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  word-break: break-all;
}

@media (max-width: 1280px) {
  .fbs-stats {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

@media (max-width: 880px) {
  .fbs-stats {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

.row-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row-inline input {
  flex: 1 1 auto;
  min-width: 0;
}

/* FBS page (reset from scratch) */
.fbs-stage-card {
  padding-bottom: 8px;
}

.fbs-main-tabs {
  margin-top: 2px;
  margin-bottom: 12px;
}

.fbs-main-pane-hidden {
  display: none;
}

.fbs-stage-tabs {
  margin-top: 6px;
  margin-bottom: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.fbs-stage-tabs .status-tab {
  flex: 0 0 auto;
  white-space: nowrap;
}

.fbs-source-hint {
  min-height: 18px;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 8px;
}

.fbs-stage-table th,
.fbs-stage-table td {
  white-space: nowrap;
}

.fbs-select-col {
  width: 42px;
  text-align: center;
}

.fbs-stage-table .fbs-order-select {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.fbs-order-id-main {
  color: #0f172a;
}

.fbs-order-id-last {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 9px;
  background: #1c202b;
  border: 1px solid #1c202b;
  color: #ffffff;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
}

.fbs-order-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #d7dce8;
  display: inline-block;
  background: #fff;
}

.fbs-order-thumb--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-weight: 700;
  background: #eef2f8;
}

.fbs-composition {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}

.fbs-composition-images {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.fbs-comp-thumb {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #d7dce8;
  object-fit: cover;
  background: #ffffff;
  display: inline-block;
}

.fbs-comp-thumb--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-weight: 700;
  background: #eef2f8;
}

.fbs-comp-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid #d7dce8;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.fbs-composition-total {
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  margin-left: 2px;
}

.fbs-deadline-main {
  font-weight: 600;
  line-height: 1.25;
}

.fbs-deadline-sub {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.2;
}

.fbs-deadline-main.is-urgent,
.fbs-deadline-sub.is-urgent {
  color: #dc2626;
}

.fbs-stage-table[data-stage="delivery"] th:nth-child(5),
.fbs-stage-table[data-stage="delivery"] td:nth-child(5) {
  width: 250px;
  max-width: 250px;
}

.fbs-stage-table[data-stage="delivery"] th:nth-child(6),
.fbs-stage-table[data-stage="delivery"] td:nth-child(6) {
  width: 175px;
  max-width: 175px;
}

.fbs-delivery-point {
  white-space: normal;
  line-height: 1.25;
  font-size: 12px;
  color: #334155;
  max-width: 230px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.fbs-delivery-slot-time {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
  color: #0f172a;
  white-space: nowrap;
}

.fbs-delivery-slot-date {
  margin-top: 3px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.15;
  white-space: nowrap;
}

.fbs-confirm-btn {
  border: 1px solid #c7d2e6;
  background: #ffffff;
  color: #1f2937;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.fbs-action-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.fbs-label-btn {
  border: 1px solid #c7d2e6;
  background: #f8fafc;
  color: #1e293b;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.fbs-label-size-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.fbs-label-size-wrap select {
  min-width: 170px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #c7d2e6;
  background: #ffffff;
  color: #1f2937;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
}

.fbs-label-btn:hover {
  border-color: #0f766e;
  color: #0f766e;
}

.fbs-print-size-popover {
  position: absolute;
  z-index: 2500;
  min-width: 188px;
  border: 1px solid #cdd7e8;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.fbs-print-size-popover.hidden {
  display: none;
}

.fbs-print-size-title {
  font-size: 12px;
  color: #475569;
  font-weight: 700;
}

.fbs-print-size-select {
  height: 34px;
  border-radius: 9px;
  border: 1px solid #c7d2e6;
  background: #fff;
  color: #1f2937;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
}

.fbs-print-size-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.fbs-print-size-cancel,
.fbs-print-size-confirm {
  border: 1px solid #c7d2e6;
  background: #ffffff;
  color: #1f2937;
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.fbs-print-size-confirm {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #ffffff;
}

.fbs-bulk-actions-btn {
  min-width: 120px;
  justify-content: center;
}

.fbs-bulk-actions-popover {
  position: absolute;
  z-index: 2500;
  min-width: 220px;
  border: 1px solid #cdd7e8;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
  padding: 8px;
}

.fbs-bulk-actions-popover.hidden {
  display: none;
}

.fbs-bulk-actions-list {
  display: grid;
  gap: 6px;
}

.fbs-bulk-actions-item {
  border: 1px solid #c7d2e6;
  background: #ffffff;
  color: #1f2937;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.fbs-bulk-actions-item:hover {
  border-color: #4f46e5;
  background: #eef2ff;
  color: #312e81;
}

.fbs-confirm-btn:hover:not(:disabled) {
  border-color: #4f46e5;
  color: #3730a3;
}

.fbs-create-btn {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
}

.fbs-create-btn:hover:not(:disabled) {
  border-color: #4338ca;
  background: #4338ca;
  color: #ffffff;
}

.fbs-confirm-btn:disabled {
  opacity: 0.65;
  cursor: default;
}

.fbs-action-empty {
  color: #94a3b8;
}

.fbs-invoice-modal-card {
  width: min(1080px, 100%);
}

.fbs-invoice-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) !important;
  gap: 12px;
  align-items: start;
}

.fbs-invoice-panel {
  border: 1px solid #d8dfeb;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px;
  min-width: 0;
}

.fbs-invoice-panel-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800;
  color: #1f2937;
}

.fbs-invoice-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.fbs-invoice-panel-head .fbs-invoice-panel-title {
  margin: 0;
}

.fbs-invoice-search {
  width: min(340px, 100%);
  border: 1px solid #d2dae8;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 12px;
  background: #fff;
  color: #111827;
}

.fbs-invoice-search:focus {
  outline: none;
  border-color: #a5b4fc;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.16);
}

.fbs-invoice-table-wrap {
  max-height: 300px;
  overflow: auto;
  border: 1px solid #d8dfeb;
  border-radius: 10px;
  background: #fff;
}

.fbs-invoice-panel:first-child .fbs-invoice-table-wrap {
  max-height: 360px;
}

.fbs-invoice-table th,
.fbs-invoice-table td {
  font-size: 12px;
  padding: 8px 8px;
  vertical-align: top;
}

.fbs-invoice-table td {
  white-space: normal;
  word-break: break-word;
  line-height: 1.25;
}

.fbs-invoice-table tbody tr {
  cursor: pointer;
}

.fbs-invoice-table tbody tr:hover td {
  background: #eef2ff;
}

.fbs-invoice-table tbody tr.is-selected td {
  background: #e0e7ff;
  color: #1e1b4b;
}

.fbs-invoice-hidden-selects {
  display: none;
}

.fbs-invoice-panel:first-child .fbs-invoice-table {
  table-layout: fixed;
  width: 100%;
}

@media (max-width: 760px) {
  .fbs-composition {
    min-width: 0;
  }

  .fbs-comp-thumb {
    width: 30px;
    height: 30px;
  }

  .fbs-comp-more {
    height: 30px;
    min-width: 26px;
    padding: 0 6px;
  }

  .fbs-invoice-layout {
    grid-template-columns: 1fr;
  }

  .fbs-invoice-panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .fbs-invoice-search {
    width: 100%;
  }

  .fbs-invoice-table-wrap {
    max-height: 220px;
  }

  .fbs-invoice-panel:first-child .fbs-invoice-table-wrap {
    max-height: 240px;
  }
}

/* Final mobile sidebar layout fix */
@media (max-width: 520px) {
  .sidebar {
    width: min(300px, 88vw) !important;
    padding: 14px 12px 12px !important;
    gap: 14px !important;
  }

  .brand {
    padding: 6px 4px 14px !important;
  }

  .brand-title {
    font-size: 17px !important;
  }

  .side-nav {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .side-section-label {
    grid-column: 1 / -1 !important;
    margin: 6px 4px 2px !important;
    font-size: 10px !important;
    letter-spacing: 0.3px !important;
  }

  .side-link {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    min-height: 42px !important;
    padding: 10px 12px !important;
    font-size: 12px !important;
    text-align: left !important;
    white-space: normal !important;
    line-height: 1.25 !important;
  }

  .side-link span:last-child {
    flex: 1 1 auto !important;
  }

  .side-footer {
    display: grid !important;
    gap: 8px !important;
    margin-top: auto !important;
    padding: 8px 0 0 !important;
  }

  .side-footer .side-link {
    font-size: 12px !important;
  }
}

.analytics-page-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.analytics-layout,
.analytics-grid-two {
  display: grid;
  grid-template-columns: 1.05fr 1.45fr;
  gap: 18px;
}

.analytics-grid-bottom {
  align-items: start;
}

.analytics-form-card,
.analytics-summary-card,
.analytics-dynamics-card,
.analytics-profit-card,
.analytics-shops-card,
.analytics-history-card {
  border: 1px solid rgba(182, 194, 219, 0.72);
  border-radius: 22px;
  background: #ffffff;
  padding: 18px;
}

.analytics-form-grid,
.analytics-summary-cards,
.analytics-profit-cards,
.analytics-growth-cards {
  display: grid;
  gap: 14px;
}

.analytics-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analytics-summary-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analytics-growth-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analytics-profit-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analytics-note-field textarea {
  min-height: 92px;
  resize: vertical;
}

.analytics-form-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 14px;
}

.analytics-entry-meta,
.analytics-mini-note {
  color: #6f7c95;
  font-size: 13px;
  line-height: 1.5;
}

.analytics-summary-card .section-title,
.analytics-form-card .section-title,
.analytics-dynamics-card .section-title,
.analytics-profit-card .section-title,
.analytics-shops-card .section-title,
.analytics-history-card .section-title {
  margin-bottom: 14px;
}

.analytics-metric-card,
.analytics-growth-card,
.analytics-profit-section {
  border: 1px solid rgba(182, 194, 219, 0.72);
  border-radius: 18px;
  background: #fbfcff;
  padding: 16px;
}

.analytics-metric-label,
.analytics-growth-title {
  color: #6f7c95;
  font-size: 13px;
  margin-bottom: 8px;
}

.analytics-metric-value,
.analytics-growth-value {
  color: #1b2437;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.05;
}

.analytics-metric-sub,
.analytics-growth-sub {
  margin-top: 6px;
  color: #6f7c95;
  font-size: 13px;
}

.analytics-growth-card.up .analytics-growth-value,
.analytics-growth-card.up .analytics-growth-sub {
  color: #1d8f57;
}

.analytics-growth-card.down .analytics-growth-value,
.analytics-growth-card.down .analytics-growth-sub {
  color: #d94b66;
}

.analytics-profit-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.analytics-profit-head {
  color: #1b2437;
  font-size: 18px;
  font-weight: 800;
}

.analytics-profit-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: #43506a;
}

.analytics-profit-row b {
  color: #1b2437;
  font-weight: 800;
  text-align: right;
}

.analytics-chart-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.analytics-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: #43506a;
  font-size: 13px;
}

.analytics-chart-legend .dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  margin-right: 7px;
}

.dot-capital {
  background: #5b5ce2;
}

.dot-liquid {
  background: #12a4a6;
}

.dot-stock {
  background: #9aa7c7;
}

.analytics-chart-wrap {
  min-height: 280px;
}

.analytics-chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.analytics-grid-line {
  stroke: rgba(176, 188, 214, 0.42);
  stroke-width: 1;
}

.analytics-axis-text {
  fill: #7b88a3;
  font-size: 11px;
  font-weight: 700;
}

.analytics-area-capital {
  fill: url(#analyticsCapitalGrad);
}

.analytics-line {
  fill: none;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.analytics-line-capital {
  stroke: #5b5ce2;
}

.analytics-line-liquid {
  stroke: #12a4a6;
}

.analytics-line-stock {
  stroke: #9aa7c7;
}

.analytics-point {
  fill: #5b5ce2;
}

.analytics-table td b {
  font-weight: 800;
}

.analytics-shops-donut {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.analytics-shops-chart {
  display: flex;
  justify-content: center;
  align-items: center;
}

.analytics-shops-svg {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
}

.analytics-donut-total-label {
  fill: #7b88a3;
  font-size: 13px;
  font-weight: 700;
}

.analytics-donut-total-value {
  fill: #1b2437;
  font-size: 24px;
  font-weight: 800;
}

.analytics-shops-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.analytics-shop-item {
  border: 1px solid rgba(182, 194, 219, 0.72);
  border-radius: 16px;
  background: #fbfcff;
  padding: 12px 14px;
}

.analytics-shop-item-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.analytics-shop-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.analytics-shop-name {
  color: #1b2437;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  flex: 1 1 auto;
}

.analytics-shop-share {
  color: #5b5ce2;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.analytics-shop-value {
  margin-left: 20px;
  margin-top: 6px;
  color: #43506a;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .analytics-layout,
  .analytics-grid-two,
  .analytics-profit-cards,
  .analytics-summary-cards,
  .analytics-growth-cards {
    grid-template-columns: 1fr;
  }

  .analytics-shops-donut {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .analytics-form-grid {
    grid-template-columns: 1fr;
  }

  .extra-services-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Unified Auth ===== */
.auth-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.1), transparent 24%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.12), transparent 28%),
    #eef3fb;
  color: #1f2937;
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.auth-shell {
  width: min(1240px, calc(100vw - 40px));
  min-height: calc(100vh - 40px);
  margin: 20px auto;
  display: grid;
  grid-template-columns: minmax(380px, 0.92fr) minmax(520px, 1.08fr);
  gap: 28px;
  align-items: center;
}

.auth-hero,
.auth-card {
  border-radius: 32px;
}

.auth-card-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  padding: 40px 34px 36px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.auth-card-head {
  text-align: center;
}

.auth-card-head h2 {
  margin: 0;
  font-size: 48px;
  color: #0f172a;
  letter-spacing: -0.05em;
}

.auth-card-head p {
  margin: 10px 0 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.65;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.auth-switcher {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  margin: 22px 0 20px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
  align-self: center;
}

.auth-switch-btn {
  border: 0;
  background: transparent;
  color: #4b5563;
  border-radius: 14px;
  padding: 12px 18px;
  min-width: 170px;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}

.auth-switch-btn.active {
  background: #4f46e5;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.2);
}

.auth-panel {
  display: none;
}

.auth-panel.active {
  display: block;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form .inline-field {
  display: grid;
  gap: 8px;
}

.auth-form .inline-field > span {
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.auth-form .search-input,
.auth-form input,
.auth-form select {
  width: 100%;
  max-width: 100%;
}

.auth-input {
  height: 50px;
  border: 1.5px solid #d5dbe8;
  border-radius: 999px;
  background: #ffffff;
  padding: 0 18px;
  color: #111827;
  font-size: 14px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.auth-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrap .auth-input {
  padding-right: 44px;
}

.auth-eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.auth-eye-btn:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

.auth-eye-icon {
  width: 18px;
  height: 18px;
  display: block;
  filter: grayscale(1);
  opacity: 0.78;
}

.auth-eye-btn[data-state="hidden"] .eye-on {
  display: none;
}

.auth-eye-btn[data-state="shown"] .eye-off {
  display: none;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-check-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #475569;
}

.auth-check-row input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.auth-inline-note {
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.auth-actions .btn {
  width: 100%;
  min-width: 0;
  height: 50px;
  border-radius: 999px;
  font-size: 15px;
  background: #0f172a;
  border-color: #0f172a;
  box-shadow: none;
}

.auth-actions .btn:hover {
  background: #111827;
  border-color: #111827;
}

.auth-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
  color: #9ca3af;
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.auth-socials {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.auth-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
}

.auth-bottom-note {
  margin-top: 6px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
}

.auth-bottom-link {
  border: 0;
  background: transparent;
  color: #16a34a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.auth-social-block {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.auth-social-error {
  margin-top: 10px;
  margin-bottom: 6px;
}

.auth-social-stack {
  display: grid;
  gap: 12px;
}

.auth-provider-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.auth-provider-title {
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.google-auth-button-slot,
.telegram-auth-button-slot {
  min-height: 42px;
}

.telegram-auth-button-slot iframe {
  max-width: 100%;
}

.auth-hero {
  width: 100%;
  max-width: 760px;
  justify-self: stretch;
  padding: 24px 24px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  border: 0;
  background:
    linear-gradient(180deg, rgba(246, 251, 245, 0.94) 0%, rgba(250, 253, 248, 0.96) 100%);
  box-shadow: none;
}

.auth-illustration-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 420px;
  max-height: 460px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(163, 230, 53, 0.12), transparent 22%),
    linear-gradient(180deg, rgba(246, 251, 245, 1) 0%, rgba(246, 252, 244, 1) 100%);
  overflow: hidden;
}

.auth-illustration {
  display: block;
  width: 100%;
  max-width: 430px;
  height: auto;
  object-fit: contain;
}

.auth-hero-copy {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.auth-hero-copy h3 {
  margin: 0;
  max-width: 460px;
  color: #111827;
  font-size: 28px;
  line-height: 1.24;
  letter-spacing: -0.04em;
}

.auth-hero-copy p {
  margin: 0;
  max-width: 440px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.65;
}

.auth-hero-dots {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.auth-hero-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d1d5db;
}

.auth-hero-dots span.active {
  width: 26px;
  background: #111827;
}

@media (max-width: 1040px) {
  .auth-shell {
    grid-template-columns: minmax(340px, 0.9fr) minmax(420px, 1.1fr);
    width: min(1080px, calc(100vw - 24px));
  }

  .auth-card {
    max-width: none;
  }

  .auth-hero {
    min-height: 0;
    padding: 20px 20px 24px;
  }

  .auth-card-head h2 {
    font-size: 42px;
  }

  .auth-switch-btn {
    min-width: 150px;
  }

  .auth-hero-copy h3 {
    font-size: 24px;
  }

  .auth-illustration-frame {
    min-height: 360px;
    max-height: 400px;
  }
}

@media (max-width: 640px) {
  .auth-shell {
    width: calc(100vw - 16px);
    min-height: auto;
    margin: 8px auto;
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 18px;
  }

  .auth-hero {
    display: none;
  }

  .auth-card-head h2 {
    font-size: 36px;
  }

  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-switcher {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .auth-switch-btn {
    min-width: 0;
    width: 100%;
  }

  .auth-actions .btn {
    width: 100%;
    min-width: 0;
  }
}
