:root {
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #e7edf0;
  background: #0b1116;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #0b1116;
  --panel: #111a21;
  --panel-2: #16232a;
  --line: #26343b;
  --muted: #82939c;
  --text: #e7edf0;
  --green: #35f2a1;
  --red: #ff6d72;
  --amber: #ffcc66;
  --blue: #64b9ff;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(ellipse at 83% 4%, rgba(24,89,65,.14), transparent 30%), var(--bg); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 228px minmax(0,1fr); }
.sidebar { background: #0d151a; border-right: 1px solid #1f2d33; display: flex; flex-direction: column; padding: 23px 14px 18px; position: sticky; top: 0; height: 100vh; z-index: 10; }
.brand { display: flex; align-items: center; gap: 11px; padding: 3px 11px 30px; }
.brand-mark { width: 31px; height: 31px; flex: none; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.brand-name span { color: var(--green); }
.brand-caption { font: 10px var(--mono); color: #83939a; letter-spacing: .12em; margin-top: 3px; }
.nav-label { color: #60717a; font: 10px var(--mono); text-transform: uppercase; letter-spacing: .14em; padding: 0 12px 9px; }
.nav { display: grid; gap: 4px; }
.nav-item { width: 100%; border: 0; background: transparent; color: #92a2aa; text-align: left; padding: 11px 12px; border-radius: 8px; display: flex; align-items: center; gap: 11px; font-size: 13px; transition: background .18s, color .18s; }
.nav-item svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.nav-item:hover { background: #172329; color: #dce7e8; }
.nav-item.active { background: #172b27; color: var(--green); box-shadow: inset 2px 0 var(--green); }
.side-bottom { margin-top: auto; }
.side-status { padding: 13px 12px; margin: 0 3px 14px; border: 1px solid #26373a; background: #111d20; border-radius: 9px; }
.status-heading { display: flex; align-items: center; gap: 8px; color: #c8d5d5; font-size: 11px; }
.status-dot { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 9px #35f2a177; }
.status-caption { font-size: 10px; color: #819293; line-height: 1.5; margin: 7px 0 0 15px; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 12px 9px 0; border-top: 1px solid #223036; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #20352f; color: var(--green); font-size: 11px; font-weight: 700; }
.user-meta { min-width: 0; flex: 1; }
.user-name { font-size: 11px; color: #dce5e7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-sub { font-size: 10px; color: #778890; margin-top: 3px; }
.user-menu { color: #87979d; background: none; border: 0; font-size: 18px; padding: 4px; }
.main { min-width: 0; padding: 29px clamp(20px,3vw,46px) 52px; max-width: 1700px; width: 100%; margin: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 28px; }
.breadcrumbs { font: 11px var(--mono); color: #6f828a; letter-spacing: .07em; }
.breadcrumbs b { color: #c3d0d2; font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-button, .plain-button { border: 1px solid var(--line); background: var(--panel); color: #b8c8cc; padding: 9px 12px; border-radius: 7px; font-size: 12px; transition: .16s; }
.icon-button:hover, .plain-button:hover { border-color: #50766a; color: var(--green); }
.primary-button { border: 1px solid var(--green); border-radius: 7px; background: var(--green); color: #09130f; font-weight: 700; font-size: 12px; padding: 10px 15px; transition: filter .15s, transform .15s; }
.primary-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.primary-button:disabled { cursor: not-allowed; opacity: .42; filter: grayscale(.3); transform: none; }
.primary-button svg, .plain-button svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 6px; }
.ghost-button { border: 0; background: transparent; color: #93a4ab; font-size: 12px; padding: 9px; }
.ghost-button:hover { color: var(--green); }
.select-control, .search-control { height: 36px; border: 1px solid #2a383f; background: #10191f; color: #cad6d8; border-radius: 6px; padding: 0 11px; font-size: 11px; }
.select-control { min-width: 118px; }
.filter-pill { height: 34px; border: 1px solid #2a383f; border-radius: 6px; padding: 0 12px; background: #10191f; color: #b1c1c5; font-size: 11px; }
.filter-pill.active { border-color: #246d51; color: var(--green); background: #142820; }
.page-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.eyebrow { color: var(--green); font: 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 8px; }
.page-title { font-size: 27px; line-height: 1.15; letter-spacing: -.035em; font-weight: 600; margin: 0; color: #edf3f4; }
.page-subtitle { font-size: 12px; color: #85959c; margin: 8px 0 0; line-height: 1.5; }
.toolbar { display: flex; align-items: center; gap: 8px; }
.panel { background: linear-gradient(145deg, rgba(21,32,39,.98), rgba(15,24,30,.98)); border: 1px solid #25343a; border-radius: 10px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 13px; }
.kpi { padding: 16px 17px 15px; min-height: 119px; position: relative; overflow: hidden; }
.kpi:after { content: ''; position: absolute; width: 105px; height: 105px; border-radius: 50%; right: -44px; top: -57px; border: 1px solid #ffffff0c; box-shadow: 0 0 0 14px #ffffff03,0 0 0 29px #ffffff02; pointer-events: none; }
.kpi-label { font-size: 11px; color: #8fa0a6; display: flex; align-items: center; gap: 7px; }
.hint { display: inline-grid; place-items: center; border: 1px solid #52636a; color: #8ea0a6; width: 14px; height: 14px; border-radius: 50%; font: 9px var(--mono); cursor: help; }
.kpi-value { font: 500 24px var(--mono); letter-spacing: -.05em; margin-top: 12px; color: #e8f0f0; }
.kpi-value.positive { color: var(--green); }
.kpi-value.negative { color: var(--red); }
.kpi-foot { display: flex; align-items: center; gap: 6px; margin-top: 9px; color: #788890; font-size: 10px; }
.delta-up { color: var(--green); }
.delta-down { color: var(--red); }
.chart-grid { display: grid; grid-template-columns: minmax(0,1.75fr) minmax(250px,.9fr); gap: 13px; margin-bottom: 13px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px 0; }
.panel-title { font-size: 13px; font-weight: 600; color: #e1e9eb; }
.panel-kicker { font: 10px var(--mono); color: #73838a; margin-top: 5px; }
.chart-card { padding-bottom: 9px; }
.chart-legend { display: flex; gap: 14px; color: #84969c; font-size: 10px; }
.legend-dot { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 5px; background: var(--green); }
.legend-dot.dim { background: #38534d; }
.chart-wrap { height: 206px; padding: 5px 18px 12px; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.chart-gridline { stroke: #24343b; stroke-width: 1; stroke-dasharray: 3 5; }
.chart-label { fill: #73858c; font: 10px var(--mono); }
.profit-chart-bar { fill: #35f2a1; opacity: .83; rx: 3; }
.profit-chart-bar:hover { opacity: 1; }
.profit-chart-shadow { fill: #244c3c; opacity: .55; }
.margin-card { padding-bottom: 14px; }
.margin-visual { display: flex; align-items: center; gap: 18px; padding: 20px 18px 15px; }
.donut-wrap { width: 104px; height: 104px; position: relative; flex: none; }
.donut-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-bg { stroke: #283a40; fill: none; stroke-width: 12; }
.donut-value { stroke: var(--green); fill: none; stroke-width: 12; stroke-linecap: round; transition: stroke-dasharray .35s; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-number { font: 500 20px var(--mono); color: #eef5f3; }
.donut-label { font-size: 9px; color: #839397; margin-top: 2px; }
.margin-stats { flex: 1; display: grid; gap: 12px; }
.margin-stat { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 10px; color: #87969d; }
.margin-stat b { font: 500 12px var(--mono); color: #d6e0e1; }
.margin-stat .green { color: var(--green); }
.margin-bar { height: 4px; background: #25343a; border-radius: 4px; overflow: hidden; margin-top: 5px; }
.margin-bar span { height: 100%; display: block; background: var(--green); border-radius: 4px; }
.risk-note { display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px; margin: 0 16px; background: #271d19; border: 1px solid #563b2f; border-radius: 7px; color: #d8a679; font-size: 10px; line-height: 1.45; }
.risk-note svg { width: 14px; height: 14px; flex: none; stroke: var(--amber); fill: none; stroke-width: 1.8; }
.table-panel { overflow: hidden; }
.table-head { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #25343a; }
.table-title-group { display: flex; align-items: center; gap: 9px; }
.table-title { font-size: 13px; font-weight: 600; }
.count-badge { border: 1px solid #304047; background: #19252b; color: #8fa1a7; border-radius: 10px; padding: 2px 7px; font: 10px var(--mono); white-space: nowrap; }
.table-actions { display: flex; align-items: center; gap: 8px; }
.search-control { width: 170px; height: 32px; padding-left: 30px; background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='7' cy='7' r='4.5' stroke='%237a8b91'/%3E%3Cpath d='m10.5 10.5 3 3' stroke='%237a8b91'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 9px center; }
.table-scroll { overflow: auto; }
.sku-table { width: 100%; border-collapse: collapse; min-width: 810px; }
.sku-table th { font: 9px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: #75878e; text-align: right; padding: 11px 14px; border-bottom: 1px solid #25343a; white-space: nowrap; cursor: pointer; }
.sku-table th:first-child, .sku-table td:first-child { text-align: left; padding-left: 18px; }
.sku-table td { font-size: 11px; color: #c7d3d5; text-align: right; padding: 12px 14px; border-bottom: 1px solid #1f2d33; white-space: nowrap; }
.sku-table tr:last-child td { border-bottom: 0; }
.sku-table tbody tr { cursor: pointer; transition: background .14s; }
.sku-table tbody tr:hover { background: #172329; }
.product-cell { display: flex; align-items: center; gap: 10px; min-width: 195px; }
.product-thumb { width: 32px; height: 32px; border-radius: 7px; display: grid; place-items: center; color: #cbead8; background: #20342f; font: 10px var(--mono); }
.product-thumb.violet { background: #29263b; color: #cfc8ff; }
.product-thumb.orange { background: #3a2e24; color: #f8cf9d; }
.product-thumb.blue { background: #23323d; color: #9cd4f7; }
.product-name { font-size: 11px; font-weight: 500; color: #e0e9ea; }
.product-sku { font: 9px var(--mono); color: #72848a; margin-top: 3px; }
.marketplace-tag { font: 9px var(--mono); padding: 4px 6px; border-radius: 4px; border: 1px solid #6d4691; color: #dfb9ff; background: #2a2037; }
.marketplace-tag.ozon { border-color: #305b99; color: #a4c7ff; background: #1c2a40; }
.profit-text { font-family: var(--mono); font-size: 10px; }
.profit-positive { color: var(--green) !important; }
.profit-negative { color: var(--red) !important; }
.margin-chip { display: inline-flex; align-items: center; gap: 5px; font: 10px var(--mono); padding: 4px 7px; border-radius: 4px; }
.margin-chip.good { background: #163328; color: #6df4b2; }
.margin-chip.warn { background: #302a1e; color: #ffd17c; }
.margin-chip.bad { background: #382124; color: #ff9297; }
.status-cell { width: 4px; height: 4px; background: currentColor; border-radius: 50%; display: inline-block; vertical-align: 2px; }
.empty-state { padding: 24px 16px; text-align: center; color: #8a999f; font-size: 11px; line-height: 1.55; }
.below-table { border-top: 1px solid #24333a; padding: 11px 17px; display: flex; justify-content: space-between; gap: 12px; color: #74858b; font-size: 10px; }
.view-all { border: 0; background: none; color: var(--green); font-size: 10px; white-space: nowrap; }
.banner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 15px; background: #12241e; border: 1px solid #285340; border-radius: 8px; margin: 0 0 13px; }
.banner-copy { display: flex; align-items: center; gap: 10px; color: #b8d6c8; font-size: 11px; line-height: 1.4; }
.banner-icon { display: grid; place-items: center; width: 26px; height: 26px; flex: none; background: #1b4635; color: var(--green); border-radius: 7px; font-size: 15px; }
.banner button { white-space: nowrap; }
.demo-banner { border-color: #4a4027; background: #211e15; }
.demo-banner .banner-icon { background: #40351e; color: var(--amber); }
.demo-label { font: 9px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #e3c375; }
.import-grid { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(250px,.7fr); gap: 13px; }
.dropzone { margin: 18px; border: 1px dashed #416052; border-radius: 9px; min-height: 214px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 22px; background: radial-gradient(ellipse at 50% 10%, #18362c, transparent 65%), #111b20; transition: .18s; }
.dropzone.dragover { border-color: var(--green); background-color: #172c23; }
.upload-icon { width: 42px; height: 42px; border: 1px solid #3d624f; color: var(--green); border-radius: 12px; display: grid; place-items: center; margin-bottom: 13px; }
.upload-icon svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.drop-title { font-size: 14px; font-weight: 600; }
.drop-sub { font-size: 11px; color: #829298; margin: 7px 0 15px; line-height: 1.5; }
.drop-actions { display: flex; gap: 8px; align-items: center; }
.file-note { color: #6d7c83; font: 9px var(--mono); margin-top: 12px; }
.file-input { display: none; }
.template-link { border: 0; background: none; color: var(--green); font-size: 11px; padding: 0; }
.info-card { padding: 18px; }
.info-card h3 { font-size: 13px; margin: 0 0 12px; }
.step { display: flex; gap: 11px; margin-top: 12px; color: #a8b5b9; font-size: 11px; line-height: 1.5; }
.step-number { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #1a2e29; color: var(--green); font: 10px var(--mono); }
.scenario-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,.8fr); gap: 13px; }
.scenario-card { padding: 17px; }
.scenario-title { font-size: 13px; font-weight: 600; }
.scenario-sub { font-size: 11px; color: #819198; line-height: 1.5; margin: 6px 0 16px; }
.scenario-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.field { display: grid; gap: 6px; }
.field label { color: #8c9ca2; font-size: 10px; }
.input-wrap { display: flex; align-items: center; position: relative; }
.input-wrap input, .field select { height: 36px; border: 1px solid #2a393f; background: #0e171c; border-radius: 6px; padding: 0 10px; color: #e5eeee; width: 100%; font: 11px var(--mono); }
.input-suffix { position: absolute; right: 10px; color: #788990; font-size: 10px; }
.scenario-result { border: 1px solid #2d5141; background: #11221c; border-radius: 8px; padding: 16px; margin-top: 14px; }
.result-label { font-size: 10px; color: #91aaa0; }
.result-value { font: 500 24px var(--mono); color: var(--green); margin-top: 5px; }
.result-bottom { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; color: #91a39b; margin-top: 10px; }
.recommend-card { padding: 18px; background: linear-gradient(145deg,#13241f,#11191e); }
.recommend-value { font: 500 25px var(--mono); color: var(--green); margin: 15px 0 4px; }
.recommend-label { font-size: 10px; color: #94a7a0; }
.recommend-copy { color: #96a4a6; font-size: 11px; line-height: 1.55; }
.recommend-row { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid #2b3d3a; padding-top: 12px; margin-top: 12px; font-size: 10px; color: #849499; }
.recommend-row b { font: 500 11px var(--mono); color: #dce8e1; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.settings-card { padding: 19px; }
.settings-card h3 { font-size: 13px; margin: 0; }
.settings-desc { font-size: 11px; color: #85949a; line-height: 1.55; margin: 7px 0 16px; }
.settings-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid #25343a; }
.settings-line span { font-size: 11px; color: #bdc9cc; }
.settings-line small { display: block; color: #75868d; font-size: 9px; margin-top: 4px; }
.threshold-control { width: 90px; }
.status-tag { font: 9px var(--mono); padding: 4px 7px; border: 1px solid #4e472c; border-radius: 4px; color: #e3c375; background: #29251a; text-align: center; }
.soft-warning { border: 1px solid #4d422a; background: #211e16; padding: 12px; border-radius: 7px; color: #cfba86; font-size: 10px; line-height: 1.5; margin-top: 13px; }
.source-note { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 9px 11px; border: 1px solid #2b3d3c; background: #13201e; border-radius: 6px; color: #8fa49c; font-size: 10px; margin-bottom: 12px; }
.notification-list { display: grid; gap: 10px; margin-top: 14px; }
.notification-entry { border: 1px solid #2a3b3f; background: #121d22; border-radius: 7px; padding: 12px; }
.notification-entry-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.notification-entry-head b { font-size: 11px; color: #dce8e3; }
.notification-entry-head time { font: 9px var(--mono); color: #7e9094; }
.notification-entry p { font-size: 10px; line-height: 1.55; color: #91a2a5; margin: 7px 0 0; }
.filter-row { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 1000; display: grid; gap: 8px; }
.toast { min-width: 230px; max-width: 360px; border: 1px solid #38614d; background: #15251f; color: #d7e7df; padding: 12px 15px; border-radius: 8px; box-shadow: 0 10px 40px #0006; font-size: 11px; animation: toast-in .2s ease; }
.toast.error { border-color: #684046; background: #291a1e; color: #ffd1d2; }
.toast.muted { border-color: #3c4b53; background: #19232a; color: #d7e0e2; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.modal-backdrop { position: fixed; inset: 0; background: #05090cbb; z-index: 100; display: grid; place-items: center; padding: 22px; backdrop-filter: blur(5px); animation: fade-in .18s; }
.modal { width: min(790px,100%); max-height: min(90vh,900px); overflow: auto; border: 1px solid #34464c; border-radius: 12px; background: #111a20; box-shadow: 0 22px 90px #0009; animation: modal-in .22s; }
.modal.wide { width: min(900px,100%); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 19px 21px; border-bottom: 1px solid #27373e; position: sticky; top: 0; background: #111a20; z-index: 2; }
.modal-title { font-size: 16px; font-weight: 600; }
.modal-subtitle { font: 10px var(--mono); color: #819198; margin-top: 6px; }
.close-button { width: 29px; height: 29px; border: 1px solid #2c3b41; border-radius: 6px; background: #162127; color: #9baab0; font-size: 18px; }
.modal-body { padding: 19px 21px; }
.modal-kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 18px; }
.modal-kpi { padding: 10px; background: #172127; border: 1px solid #28383f; border-radius: 6px; }
.modal-kpi span { display: block; color: #829298; font-size: 9px; }
.modal-kpi b { display: block; font: 500 14px var(--mono); margin-top: 6px; color: #e1eaea; }
.modal-section-title { font-size: 11px; font-weight: 600; color: #d8e1e3; margin: 17px 0 10px; }
.breakdown { display: grid; gap: 7px; }
.breakdown-row { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; color: #9aa8ad; }
.breakdown-row b { font: 10px var(--mono); color: #ced7d9; }
.breakdown-row.total { border-top: 1px solid #2d3b41; padding-top: 9px; margin-top: 3px; color: #e0e9ea; }
.breakdown-row.total b { font-size: 13px; color: var(--green); }
.modal-controls { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; }
.modal-footer { display: flex; justify-content: space-between; gap: 8px; padding: 14px 21px; border-top: 1px solid #27373e; }
.mapping-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.mapping-row { display: grid; grid-template-columns: minmax(120px,.7fr) 1fr; align-items: center; gap: 10px; }
.mapping-row label { font-size: 10px; color: #99a7ab; }
.mapping-row select { width: 100%; min-width: 0; }
.mapping-alert { padding: 10px 12px; border: 1px solid #53452a; background: #211f17; border-radius: 7px; color: #d5bd7f; font-size: 10px; line-height: 1.5; margin-bottom: 13px; }
.no-data { padding: 55px 25px; text-align: center; }
.no-data h3 { font-size: 15px; margin: 0; color: #e3ebec; }
.no-data p { max-width: 390px; margin: 9px auto 17px; color: #819197; font-size: 11px; line-height: 1.6; }
.small { color: #788990; font-size: 10px; line-height: 1.5; }
.content-spacer { height: 24px; }
.boot { height: 100vh; display: flex; align-items: center; justify-content: center; gap: 12px; color: #819394; font-size: 12px; }
.pulse-mark { width: 20px; height: 20px; border: 2px solid #244d3b; border-radius: 5px; position: relative; }
.pulse-mark:after { content: ''; position: absolute; left: 3px; right: 3px; top: 8px; height: 2px; background: var(--green); transform: skewY(-26deg); box-shadow: 0 0 6px #35f2a1; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scaleX(.65) skewY(-26deg); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: .5; transform: translateY(7px) scale(.99); } to { opacity: 1; transform: none; } }
.mobile-toggle { display: none; }
@media (max-width: 1100px) {
  .shell { grid-template-columns: 200px minmax(0,1fr); }
  .kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .chart-grid { grid-template-columns: minmax(0,1.3fr) minmax(230px,.8fr); }
  .main { padding-left: 24px; padding-right: 24px; }
  .scenario-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .shell { display: block; }
  .sidebar { position: fixed; left: -252px; top: 0; width: 232px; transition: left .22s; box-shadow: 20px 0 50px #0007; }
  .sidebar.open { left: 0; }
  .mobile-toggle { display: grid; place-items: center; width: 34px; height: 34px; background: #142027; border: 1px solid #2b3d43; border-radius: 7px; color: #b9c9cc; }
  .mobile-toggle svg { width: 17px; height: 17px; stroke: currentColor; fill: none; }
  .main { padding: 22px 18px 44px; }
  .chart-grid, .import-grid, .settings-grid, .scenario-grid { grid-template-columns: 1fr; }
  .page-title-row { align-items: flex-start; flex-direction: column; }
  .toolbar { width: 100%; flex-wrap: wrap; }
  .topbar { margin-bottom: 22px; }
  .brand { padding-bottom: 21px; }
}
@media (max-width: 540px) {
  .main { padding: 17px 13px 36px; }
  .topbar { flex-wrap: wrap; align-items: center; }
  .breadcrumbs { display: none; }
  .top-actions { margin-left: auto; max-width: calc(100% - 44px); gap: 6px; }
  .top-actions .plain-button { max-width: 115px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 8px; font-size: 10px; }
  .top-actions .primary-button { padding: 8px 10px; font-size: 11px; }
  .page-title { font-size: 23px; }
  .kpi-grid { gap: 8px; }
  .kpi { padding: 13px; min-height: 106px; }
  .kpi-value { font-size: 18px; }
  .kpi-label { font-size: 10px; }
  .kpi-foot { font-size: 9px; }
  .table-head { padding: 13px 12px; align-items: flex-start; flex-direction: column; }
  .table-actions { width: 100%; justify-content: space-between; gap: 5px; }
  .search-control { width: min(54vw,210px); }
  .chart-wrap { height: 180px; padding-left: 10px; padding-right: 10px; }
  .margin-visual { padding: 17px 13px; }
  .panel-head { padding: 15px 14px 0; }
  .chart-legend { font-size: 9px; gap: 8px; }
  .banner { align-items: flex-start; flex-direction: column; }
  .banner .primary-button { align-self: flex-end; }
  .modal-backdrop { padding: 8px; }
  .modal { max-height: 94vh; }
  .modal-head, .modal-body { padding: 15px; }
  .modal-kpis { grid-template-columns: repeat(2,1fr); }
  .modal-controls { grid-template-columns: repeat(2,1fr); }
  .modal-footer { padding: 12px 15px; }
  .mapping-grid { grid-template-columns: 1fr; }
  .mapping-row { grid-template-columns: 110px 1fr; }
  .dropzone { margin: 12px; min-height: 190px; }
  .select-control { min-width: 106px; }
  .below-table { align-items: flex-start; flex-direction: column; }
  .notification-entry-head { align-items: flex-start; flex-direction: column; gap: 5px; }
  .source-note { flex-direction: column; }
}

.auto-import-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; margin-bottom: 13px; }
.import-card { min-width: 0; overflow: hidden; }
.compact-dropzone { min-height: 185px; margin: 14px; padding: 18px; }
.compact-dropzone .drop-sub { max-width: 390px; }
.import-helper { padding: 0 16px 15px; color: #8a9ba0; font-size: 10px; line-height: 1.55; }
.import-helper .template-link { font-size: 10px; }
.cost-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px 0; }
.cost-toolbar .small { max-width: 260px; }
.report-summary { margin: 0 0 13px; overflow: hidden; }
.report-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; padding: 15px 16px 10px; }
.report-kpis > div { min-width: 0; padding: 11px 12px; border: 1px solid #2a3a40; background: #121e23; border-radius: 7px; }
.report-kpis span { display: block; min-height: 26px; color: #87999e; font-size: 9px; line-height: 1.4; }
.report-kpis b { display: block; margin-top: 7px; color: #e3ecec; font: 500 14px var(--mono); overflow-wrap: anywhere; }
.report-breakdown { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0 17px 12px; color: #8a9a9f; font-size: 9px; line-height: 1.5; }
.report-table { width: 100%; min-width: 1040px; border-collapse: collapse; }
.report-table th { padding: 10px 12px; border-top: 1px solid #24343a; border-bottom: 1px solid #24343a; color: #75878e; text-align: right; white-space: nowrap; font: 9px var(--mono); }
.report-table thead tr:first-child th:first-child, .report-table td:first-child { text-align: left; padding-left: 17px; }
.report-table th.report-group { text-align: center; color: var(--green); background: #14211f; }
.report-table td { padding: 11px 12px; border-bottom: 1px solid #202e34; text-align: right; color: #c5d1d3; white-space: nowrap; font: 10px var(--mono); }
.report-table td.report-count { color: #95a5aa; font: 10px 'IBM Plex Sans',sans-serif; text-align: center; }
.report-table tr:last-child td { border-bottom: 0; }
.report-footnote { border-top: 1px solid #27373d; padding: 11px 16px 13px; color: #cbb987; background: #1e1c15; font-size: 10px; line-height: 1.5; }
.advanced-import { margin-top: 13px; overflow: hidden; }
.detail-upload-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 0 16px 12px; }
.detail-upload-row .select-control { min-width: 130px; }
.report-empty { margin-bottom: 13px; }
@media (max-width: 800px) {
  .auto-import-grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .report-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 12px; }
  .report-kpis > div { padding: 9px; }
  .report-kpis b { font-size: 12px; }
  .report-breakdown { padding-left: 13px; padding-right: 13px; }
  .cost-toolbar { align-items: flex-start; flex-direction: column; }
  .cost-toolbar .select-control { width: 100%; }
  .detail-upload-row { align-items: stretch; flex-direction: column; }
  .detail-upload-row .select-control, .detail-upload-row button { width: 100%; text-align: left; }
}

.marketplace-tag.yandex { border-color: #a84043; color: #ffb7ad; background: #382025; }
.fixed-costs-panel { margin: 13px 0 14px; overflow: hidden; }
.fixed-cost-body { padding: 16px 18px 18px; }
.fixed-cost-controls { display: grid; grid-template-columns: minmax(150px, .65fr) minmax(220px, 1fr); gap: 12px; margin-bottom: 15px; max-width: 620px; }
.fixed-cost-month, .fixed-cost-method { display: grid; gap: 7px; color: #91a1a7; font-size: 10px; }
.fixed-cost-month input { min-height: 36px; border: 1px solid #2a383f; border-radius: 6px; background: #10191f; color: #cad6d8; padding: 0 10px; }
.fixed-cost-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.fixed-cost-field { min-width: 0; display: grid; gap: 7px; color: #91a1a7; font-size: 10px; }
.fixed-cost-field .input-wrap { min-width: 0; }
.fixed-cost-field input { width: 100%; min-width: 0; }
.fixed-cost-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 15px; }
.fixed-cost-actions .file-note { max-width: 620px; line-height: 1.5; }
.fixed-cost-list { margin-top: 16px; border: 1px solid #24343a; border-radius: 7px; }
.fixed-cost-table { width: 100%; min-width: 900px; border-collapse: collapse; }
.fixed-cost-table th { padding: 10px; border-bottom: 1px solid #26373d; color: #8da0a5; text-align: right; white-space: nowrap; font: 9px var(--mono); }
.fixed-cost-table th:first-child, .fixed-cost-table td:first-child { text-align: left; }
.fixed-cost-table td { padding: 9px 10px; border-bottom: 1px solid #202e34; color: #c5d1d3; text-align: right; white-space: nowrap; font: 10px var(--mono); }
.fixed-cost-table tr:last-child td { border-bottom: 0; }
.fixed-cost-table td:last-child { text-align: left; }
.danger-link { color: #d87c80; margin-left: 7px; }
.danger-link:hover { color: var(--red); }
.fixed-cost-empty { border: 1px dashed #304047; border-radius: 7px; margin-top: 15px; padding: 14px; color: #819197; font-size: 11px; line-height: 1.55; }
@media (max-width: 1000px) { .fixed-cost-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .fixed-cost-controls { grid-template-columns: 1fr; }
  .fixed-cost-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fixed-cost-actions { align-items: stretch; flex-direction: column; }
  .fixed-cost-actions .primary-button { align-self: flex-start; }
}
@media (max-width: 420px) {
  .fixed-cost-body { padding: 13px; }
  .fixed-cost-grid { grid-template-columns: 1fr; }
}
.order-stats-panel { margin: 0 0 14px; overflow: hidden; }
.order-stats-table { min-width: 1750px; border-collapse: collapse; }
.order-stats-table th { padding: 11px 10px; border-bottom: 1px solid #26373d; color: #8da0a5; text-align: right; white-space: nowrap; font: 9px var(--mono); }
.order-stats-table th:first-child, .order-stats-table td:first-child { min-width: 210px; text-align: left; }
.order-stats-table td { padding: 11px 10px; border-bottom: 1px solid #202e34; text-align: right; color: #c5d1d3; white-space: nowrap; font: 10px var(--mono); }
.order-stats-table tr:last-child td { border-bottom: 0; }
.order-stats-panel .report-footnote { color: #cbb987; }
.order-stats-empty { margin: 0 0 14px; }


.saas-api-list { display: grid; gap: 10px; margin-top: 22px; }
.saas-api-list > h3 { color: #c5d4d6; font-size: 12px; margin: 0; }
.saas-api-card { border: 1px solid #2b3c42; background: #101a1f; border-radius: 8px; padding: 13px; }
.saas-api-card > b, .saas-api-head b { display: block; color: #dce8e3; font-size: 11px; }
.saas-api-card > p { margin: 6px 0 0; color: #91a2a5; font-size: 10px; line-height: 1.5; }
.saas-api-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.saas-api-head > div > span { display: block; margin-top: 4px; color: #84959a; font-size: 9px; }
.saas-api-head .status-tag { flex: 0 0 auto; }
.status-tag.api-status-ok { border-color: #315844; color: #7cdbab; background: #15251f; }
.status-tag.api-status-error { border-color: #684046; color: #ffc5c8; background: #291a1e; }
.saas-api-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 13px; }
.saas-api-form .field { min-width: 0; }
.saas-api-form .saas-form-note, .saas-api-form .primary-button { grid-column: 1 / -1; }
.saas-api-form input { width: 100%; min-width: 0; }
.saas-api-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 11px; }
.saas-api-error { color: #ffc5c8 !important; border-left: 2px solid #a8545d; padding-left: 9px; }
@media (max-width: 800px) { .saas-api-form { grid-template-columns: 1fr; } .saas-api-form .saas-form-note, .saas-api-form .primary-button { grid-column: auto; } .saas-api-head { flex-direction: column; } }


.saas-api-categories {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
}
.saas-api-categories > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.saas-api-categories .status-tag {
  white-space: nowrap;
}
