:root {
  color-scheme: light;
  --ink: #172522;
  --muted: #65736f;
  --line: #dce5e1;
  --surface: #ffffff;
  --canvas: #f3f6f4;
  --green: #123c35;
  --green-soft: #e4f0eb;
  --mint: #b9e4d0;
  --amber: #9a6410;
  --amber-soft: #fff4d9;
  --danger: #a13d36;
  --shadow: 0 8px 30px rgba(24, 52, 45, 0.07);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.topbar { height: 72px; padding: 0 max(24px, calc((100vw - 1440px) / 2)); display: flex; align-items: center; justify-content: space-between; color: white; background: var(--green); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-link { color: inherit; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.35); border-radius: 10px; font-weight: 800; color: var(--mint); }
.brand div { display: grid; gap: 2px; }
.brand strong { font-size: 16px; letter-spacing: .01em; }
.brand div span { color: #bcd1ca; font-size: 12px; }
.system-status { display: flex; align-items: center; gap: 8px; color: #d9e9e4; font-size: 13px; }
.system-status i { width: 8px; height: 8px; border-radius: 50%; background: #6de0a7; box-shadow: 0 0 0 4px rgba(109,224,167,.12); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.logout-button { padding: 7px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; color: #cfe0db; background: transparent; font-size: 12px; font-weight: 700; }
.logout-button:hover { color: white; border-color: rgba(255,255,255,.4); }
.topnav { align-self: stretch; display: flex; align-items: center; gap: 4px; }
.topnav a { padding: 9px 13px; border-radius: 8px; color: #bcd1ca; font-size: 13px; font-weight: 700; text-decoration: none; }
.topnav a:hover, .topnav a.active { color: white; background: rgba(255,255,255,.1); }

main { max-width: 1440px; margin: 0 auto; padding: 38px 28px 64px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 7px; color: #387263; font-size: 12px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(32px, 4vw, 46px); font-weight: 500; line-height: 1.05; }
.page-heading p:last-child { margin: 10px 0 0; color: var(--muted); }
.primary-button { border: 0; border-radius: 10px; padding: 12px 17px; color: white; background: var(--green); font-weight: 700; box-shadow: 0 3px 12px rgba(18,60,53,.18); }
.primary-button:hover { background: #195047; }
.page-heading-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 10px; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.metrics article { min-height: 132px; padding: 19px 20px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.metrics article > span { color: var(--muted); font-size: 13px; }
.metrics strong { margin-top: 10px; font-family: Georgia, "Times New Roman", serif; font-size: 31px; font-weight: 500; }
.metrics small { margin-top: auto; color: #84918e; }
.metrics .inventory-card { background: var(--green-soft); border-color: #c8ded5; }
.inventory-card strong { font-family: inherit; font-size: 18px; }
.inventory-card button { width: fit-content; margin-top: auto; padding: 0; border: 0; color: var(--green); background: transparent; font-weight: 750; }

.workspace { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); }
.toolbar { min-height: 74px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.search-field { width: min(460px, 100%); height: 43px; padding: 0 13px; display: flex; align-items: center; gap: 9px; border: 1px solid #cbd8d3; border-radius: 10px; background: #fbfcfb; }
.search-field:focus-within { border-color: #588e80; box-shadow: 0 0 0 3px rgba(88,142,128,.12); }
.search-field span { color: #70807b; font-size: 21px; transform: rotate(-15deg); }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.toolbar-note { color: #7a8884; font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 13px 18px; color: #72807c; background: #f8faf9; font-size: 11px; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
td { padding: 16px 18px; border-top: 1px solid #edf1ef; vertical-align: middle; }
.number-cell { text-align: right; }
.loading-row td { height: 180px; color: var(--muted); text-align: center; }
.empty-state { padding: 58px 20px 64px; text-align: center; }
.empty-state > div { width: 52px; height: 52px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 14px; color: var(--green); background: var(--green-soft); font-size: 25px; }
.empty-state h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 500; }
.empty-state p { margin: 8px 0 20px; color: var(--muted); }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: 380px; padding: 13px 16px; border-radius: 10px; color: white; background: var(--green); box-shadow: 0 10px 32px rgba(0,0,0,.2); }
.product-name { display: grid; gap: 4px; }
.product-name small { color: var(--muted); }
.market-switches { display: flex; flex-wrap: wrap; gap: 6px; }
.market-switch { padding: 6px 9px; border: 1px solid transparent; border-radius: 999px; font-size: 11px; font-weight: 800; transition: .15s ease; }
.market-switch.pending { color: var(--amber); background: var(--amber-soft); }
.market-switch.connected { color: #176344; background: #e2f4ea; }
.market-switch.disabled { color: #7b8582; background: #edf0ef; text-decoration: line-through; }
.market-switch.not_found, .market-switch.needs_review { color: var(--danger); background: #fff0ee; }
.market-switch:hover { border-color: currentColor; transform: translateY(-1px); }
.row-action { padding: 7px 11px; border: 1px solid #cbd8d3; border-radius: 8px; color: var(--green); background: white; font-weight: 700; }
.row-action:hover { background: var(--green-soft); border-color: #a9c8bb; }
.row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
.row-edit-name-action { width: 31px; height: 31px; padding: 7px; display: inline-grid; place-items: center; border: 1px solid #cbd8d3; border-radius: 8px; color: var(--green); background: #f7fbf9; }
.row-edit-name-action svg { width: 16px; height: 16px; display: block; fill: currentColor; }
.row-edit-name-action:hover { color: white; border-color: var(--green); background: var(--green); }
.row-edit-name-action:focus-visible { outline: 3px solid #b9d8cc; outline-offset: 2px; }
.row-delete-action { width: 31px; height: 31px; padding: 7px; display: inline-grid; place-items: center; border: 1px solid #edc9c3; border-radius: 8px; color: var(--danger); background: #fff7f5; }
.row-delete-action svg { width: 16px; height: 16px; display: block; fill: currentColor; }
.row-delete-action:hover { color: white; border-color: var(--danger); background: var(--danger); }
.row-delete-action:focus-visible { outline: 3px solid #f2b7ad; outline-offset: 2px; }
code { color: #53635e; font-family: "Cascadia Mono", Consolas, monospace; font-size: 13px; }

.modal { width: min(560px, calc(100vw - 28px)); max-height: calc(100vh - 36px); padding: 0; overflow: auto; border: 0; border-radius: 17px; color: var(--ink); background: white; box-shadow: 0 24px 80px rgba(13, 39, 33, .3); }
.modal::backdrop { background: rgba(13, 32, 28, .56); backdrop-filter: blur(3px); }
.modal form { padding: 25px; }
.modal-heading { display: flex; justify-content: space-between; gap: 20px; }
.modal h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 29px; font-weight: 500; }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; color: #63716d; background: white; font-size: 25px; line-height: 1; }
.modal-description { margin: 10px 0 22px; color: var(--muted); line-height: 1.5; }
.lookup-note { margin: -6px 0 20px; padding: 12px 14px; display: grid; gap: 4px; border-radius: 10px; color: #31584e; background: var(--green-soft); }
.lookup-note b { font-size: 12px; }
.lookup-note span { font-size: 12px; line-height: 1.45; }
.form-field { display: grid; gap: 7px; margin-top: 17px; }
.form-field > span { font-size: 13px; font-weight: 750; }
.form-field input { width: 100%; height: 45px; padding: 0 12px; border: 1px solid #c7d3cf; border-radius: 9px; outline: 0; background: #fbfcfb; }
.form-field input:focus { border-color: #588e80; box-shadow: 0 0 0 3px rgba(88,142,128,.12); }
.form-field small { color: #778581; font-size: 11px; }
.compact-field { max-width: 220px; }
.modal-actions { display: flex; justify-content: end; gap: 10px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.secondary-button { padding: 11px 16px; border: 1px solid #cbd8d3; border-radius: 9px; color: var(--ink); background: white; font-weight: 700; }
.form-error { margin-top: 14px; padding: 10px 12px; border-radius: 8px; color: var(--danger); background: #fff0ee; font-size: 13px; }
.current-stock-panel { margin-top: 20px; padding: 15px 17px; display: flex; align-items: baseline; gap: 8px; border-radius: 11px; background: var(--green-soft); }
.current-stock-panel span { margin-right: auto; color: #4e6961; font-size: 13px; }
.current-stock-panel strong { font-family: Georgia, serif; font-size: 29px; font-weight: 500; }
.current-stock-panel small { color: var(--muted); }
.mode-selector { margin: 18px 0 0; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; border: 0; border-radius: 10px; background: #eef2f0; }
.mode-selector label { cursor: pointer; }
.mode-selector input { position: absolute; opacity: 0; pointer-events: none; }
.mode-selector span { min-height: 38px; display: grid; place-items: center; border-radius: 8px; color: #61706c; font-size: 12px; font-weight: 750; }
.mode-selector input:checked + span { color: var(--green); background: white; box-shadow: 0 2px 8px rgba(23, 54, 46, .1); }
.result-preview { margin-top: 18px; padding: 12px 14px; border-left: 3px solid #7dac9e; color: #4e625c; background: #f3f7f5; font-size: 13px; }
.inventory-steps { margin: 22px 0; padding: 0; list-style: none; counter-reset: inventory; }
.inventory-steps li { position: relative; min-height: 54px; padding: 0 0 18px 46px; display: grid; gap: 4px; counter-increment: inventory; }
.inventory-steps li::before { content: counter(inventory); position: absolute; left: 0; top: 0; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--green-soft); font-weight: 800; }
.inventory-steps li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 31px; bottom: 1px; width: 1px; background: #cfe0da; }
.inventory-steps span { color: var(--muted); font-size: 13px; }
.inventory-warning { padding: 13px 14px; border-radius: 10px; color: #755216; background: var(--amber-soft); font-size: 13px; line-height: 1.45; }
.inventory-start-panel { padding: 24px; }
.inventory-start-panel h2 { margin: 0; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.inventory-start-hint { margin: 13px 0 0; color: var(--muted); font-size: 12px; }
.inventory-progress { padding: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; border-bottom: 1px solid var(--line); background: #f8faf9; }
.inventory-progress div { display: grid; gap: 2px; }
.inventory-progress strong { font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.inventory-progress span { color: var(--muted); font-size: 12px; }
.inventory-count-form { display: flex; gap: 8px; }
.inventory-count-form input { width: 100px; height: 36px; padding: 0 9px; border: 1px solid #c7d3cf; border-radius: 8px; }
.inventory-counted-row { background: #f5fbf8; }
.inventory-count-state { color: var(--muted); font-size: 12px; }
.inventory-counted-row .inventory-count-state { color: #176344; font-weight: 750; }
.inventory-error-note { color: var(--danger); border-color: #edc9c3; background: #fff7f5; }

.settings-heading { margin-bottom: 22px; }
.security-note { margin-bottom: 20px; padding: 16px 18px; display: flex; align-items: start; gap: 13px; border: 1px solid #c9ddd5; border-radius: 12px; color: #31584e; background: var(--green-soft); }
.security-note > span { margin-top: 2px; color: #4d8d7b; }
.security-note div { display: grid; gap: 3px; }
.security-note p { margin: 0; color: #607a72; font-size: 13px; line-height: 1.45; }
.connections { display: grid; gap: 16px; }
.connection-loading { padding: 50px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); background: white; text-align: center; }
.connection-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: var(--shadow); }
.connection-card-head { padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.market-identity { display: flex; align-items: center; gap: 13px; }
.market-logo { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: white; font-weight: 850; }
.wb .market-logo { background: linear-gradient(135deg, #8c2dda, #d82782); }
.ozon .market-logo { background: #1769ff; }
.yandex .market-logo { color: #191919; background: #ffd633; }
.market-identity h2 { margin: 0; font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.market-identity p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.global-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.global-switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { width: 44px; height: 25px; padding: 3px; border-radius: 99px; background: #cbd4d1; transition: .2s; }
.switch-track i { width: 19px; height: 19px; display: block; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: .2s; }
.global-switch input:checked + .switch-track { background: #2f8069; }
.global-switch input:checked + .switch-track i { transform: translateX(19px); }
.global-switch input:disabled + .switch-track { opacity: .45; }
.global-switch b { font-size: 13px; }
.connection-state { padding: 13px 22px; display: flex; gap: 8px 20px; background: #f8faf9; }
.connection-state b { font-size: 12px; }
.connection-state span { color: var(--muted); font-size: 12px; }
.connection-form { padding: 4px 22px 20px; }
.connection-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.connection-field { min-width: 0; }
.secret-hint { margin: 13px 0 0; color: #6e7e79; font-size: 11px; }
.connection-actions { margin-top: 20px; padding-top: 17px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); }
.connection-actions > span { color: #75837f; font-size: 11px; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: #eaf0ed; }
.login-shell { width: min(1000px, 100%); min-height: 610px; padding: 0; display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden; border-radius: 22px; background: white; box-shadow: 0 30px 90px rgba(19, 54, 45, .18); }
.login-brand-panel { padding: 40px; display: flex; flex-direction: column; color: white; background: linear-gradient(145deg, #10372f, #1b584c); }
.login-brand-panel .brand-mark { color: var(--mint); }
.login-brand-panel .brand div span { color: #bcd1ca; }
.login-message { margin: auto 0; max-width: 440px; }
.login-message .eyebrow { color: #8ad3b7; }
.login-message h1 { font-size: clamp(37px, 5vw, 57px); line-height: 1.02; }
.login-message > p:last-child { color: #c3d9d1; line-height: 1.65; }
.login-brand-panel > small { color: #9ebdb3; }
.login-form-panel { padding: 54px; display: grid; place-items: center; }
.login-form { width: 100%; max-width: 360px; }
.login-form h2 { margin: 0; font-family: Georgia, serif; font-size: 34px; font-weight: 500; }
.login-form > div:first-child > p:last-child { margin: 8px 0 24px; color: var(--muted); }
.login-submit { width: 100%; margin-top: 22px; }
.login-security { margin: 14px 0 0; color: #7a8884; font-size: 11px; text-align: center; }

@media (max-width: 900px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar-note { display: none; }
}

@media (max-width: 620px) {
  .topbar { height: 64px; padding: 0 16px; }
  .brand div span, .system-status span { display: none; }
  .header-actions { gap: 8px; }
  .logout-button { padding: 6px 8px; }
  .topnav { order: 3; position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; height: 58px; justify-content: center; background: var(--green); box-shadow: 0 -8px 25px rgba(0,0,0,.12); }
  .topnav a { min-width: 110px; text-align: center; }
  main { padding: 26px 14px 48px; }
  .page-heading { align-items: start; flex-direction: column; }
  .page-heading .primary-button { width: 100%; }
  .metrics { grid-template-columns: 1fr; }
  .metrics article { min-height: 112px; }
  th:nth-child(2), td:nth-child(2), th:nth-child(4), td:nth-child(4) { display: none; }
  td, th { padding-left: 13px; padding-right: 13px; }
  .modal form { padding: 20px; }
  .modal-actions { position: sticky; bottom: 0; margin-left: -20px; margin-right: -20px; padding: 14px 20px 0; background: white; }
  .connections { padding-bottom: 52px; }
  .connection-card-head { align-items: start; padding: 17px; }
  .connection-state { padding: 12px 17px; display: grid; }
  .connection-form { padding: 2px 17px 18px; }
  .connection-fields { grid-template-columns: 1fr; }
  .connection-actions { align-items: stretch; flex-direction: column; }
  .connection-actions .primary-button { width: 100%; }
  .login-page { padding: 0; background: white; }
  .login-shell { min-height: 100vh; grid-template-columns: 1fr; border-radius: 0; box-shadow: none; }
  .login-brand-panel { min-height: 245px; padding: 24px; }
  .login-message { margin: auto 0 0; }
  .login-message h1 { font-size: 35px; }
  .login-message > p:last-child, .login-brand-panel > small { display: none; }
  .login-form-panel { padding: 34px 24px 45px; align-items: start; }
}
.connection-buttons { display: flex; gap: .65rem; flex-wrap: wrap; }
.lookup-action { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.lookup-action div { display: grid; gap: .2rem; }
.discovery-results { padding: .85rem 1rem; border: 1px solid #d6dfdc; border-radius: 12px; background: #f7faf9; }
.discovery-results p { display: flex; justify-content: space-between; gap: 1rem; margin: .35rem 0; }
.discovery-results span { color: #55706a; text-align: right; }
.product-link { color: inherit; text-decoration: none; }
.product-link:hover strong { color: #13705d; text-decoration: underline; }
.back-link { display: inline-block; margin: 1.5rem 0 1rem; color: #41665e; text-decoration: none; }
.product-detail-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; padding-bottom: 1.5rem; }
.product-detail-heading h1 { margin: .2rem 0 .45rem; }
.detail-stock { min-width: 210px; display: grid; padding: 1.1rem 1.3rem; border-radius: 16px; background: #123c35; color: white; }
.detail-stock strong { font-size: 2rem; }
.detail-stock span,.detail-stock small { color: #c5ddd7; }
.detail-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1rem 0; padding: 1rem 1.2rem; border: 1px solid #d6dfdc; border-radius: 14px; background: white; }
.detail-toolbar p { margin: .2rem 0 0; color: #60756f; }
.mapping-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; padding-bottom: 2rem; }
.mapping-card { background: white; border: 1px solid #d8e1de; border-top: 4px solid #9aacaa; border-radius: 16px; padding: 1.1rem; }
.mapping-card.wb { border-top-color: #a338e0; }.mapping-card.ozon { border-top-color: #1d65f5; }.mapping-card.yandex { border-top-color: #f2c500; }
.mapping-card-head,.mapping-card-head>div { display:flex; align-items:center; justify-content:space-between; gap:.7rem; }.mapping-card-head h2 { margin:0; font-size:1.08rem; }
.mapping-badge { padding:.35rem .55rem; border-radius:999px; background:#edf1f0; font-size:.75rem; }.mapping-badge.connected { background:#dff4eb;color:#12614f }.mapping-badge.needs_review { background:#fff0c7;color:#7a5700 }.mapping-badge.disabled { background:#eee;color:#666 }
.mapping-message { min-height: 2.7rem; color:#63756f; font-size:.88rem; }.mapping-form { display:grid; gap:.75rem; }.candidate-list { display:grid; gap:.45rem; margin:.8rem 0; }.candidate-list>b { font-size:.84rem }.candidate-list button { text-align:left; display:grid; gap:.15rem; padding:.65rem; border:1px solid #ccd8d4; border-radius:10px; background:#f8fbfa; cursor:pointer }.candidate-list span { color:#61736d;font-size:.78rem }
@media (max-width: 900px) { .mapping-grid { grid-template-columns: 1fr; }.product-detail-heading,.detail-toolbar { align-items:stretch; flex-direction:column }.detail-stock { min-width:0 } }
.stock-comparison-section { margin: 1rem 0 1.25rem; padding: 1.2rem; border: 1px solid #d5dfdc; border-radius: 18px; background: #f7faf9; }
.section-title-row { display:flex; justify-content:space-between; align-items:end; gap:1rem; margin-bottom:1rem }.section-title-row h2 { margin:.1rem 0 .25rem }.section-title-row p { margin:0;color:#657871 }
.stock-comparison-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.8rem }
.stock-compare-card { padding:1rem; border:1px solid #d8e1de; border-radius:14px; background:white; box-shadow:0 5px 15px rgba(26,66,56,.04) }.stock-compare-card.error { border-color:#e7b9b2 }.stock-compare-card.synced { border-color:#9fd2c1 }.stock-compare-card.different { border-color:#e5c976 }
.stock-compare-head { display:flex;align-items:center;gap:.65rem }.stock-compare-head>div { display:grid }.stock-compare-head small { color:#6a7c76 }
.stock-values { display:grid;grid-template-columns:1fr 1fr;gap:.6rem;margin:1rem 0 }.stock-values>div { display:grid;padding:.7rem;border-radius:10px;background:#f3f7f6 }.stock-values span { font-size:.76rem;color:#60736d }.stock-values strong { font-size:1.65rem }.stock-values small { font-size:.72rem;color:#6d7d78 }
.stock-compare-card>p { margin:0;color:#596c66;font-size:.82rem;min-height:2.2rem }.comparison-legend { display:flex;gap:1rem;margin-top:.8rem;color:#657871;font-size:.78rem }.comparison-legend span { display:flex;align-items:center;gap:.35rem }.comparison-legend i { width:9px;height:9px;border-radius:50%;background:#697d77 }.comparison-legend .legend-target { background:#d5ad28 }
@media (max-width: 900px) { .stock-comparison-grid { grid-template-columns:1fr }.section-title-row { align-items:stretch;flex-direction:column } }
.sync-mode-note { display:flex;align-items:center;gap:.8rem;margin:1rem 0;padding:.9rem 1rem;border:1px solid #dfc77d;border-radius:13px;background:#fff9e8 }.sync-mode-note.live { border-color:#8bcab5;background:#edf9f5 }.sync-mode-note p { margin:.15rem 0 0;color:#65736f }.sync-mode-dot { width:11px;height:11px;border-radius:50%;background:#d3a71c;box-shadow:0 0 0 5px rgba(211,167,28,.13) }.sync-mode-note.live .sync-mode-dot { background:#1b8d6e;box-shadow:0 0 0 5px rgba(27,141,110,.13) }
.launch-preview-section { margin: 20px 0 24px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #f7faf9; }
.launch-preview-section .section-title-row h2 { margin: 2px 0 5px; font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.launch-preview-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.launch-preview-grid > .connection-loading { grid-column: 1 / -1; }
.launch-preview-card { overflow: hidden; border: 1px solid #d7e0dd; border-top: 4px solid #9aacaa; border-radius: 14px; background: white; }
.launch-preview-card.wb { border-top-color: #a338e0; }.launch-preview-card.ozon { border-top-color: #1d65f5; }.launch-preview-card.yandex { border-top-color: #f2c500; }
.launch-preview-head { padding: 15px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #edf1ef; }
.launch-preview-head .market-logo { width: 38px; height: 38px; border-radius: 10px; font-size: 12px; }
.launch-preview-head h3 { margin: 0; font-family: Georgia, serif; font-size: 19px; font-weight: 500; }
.launch-preview-head p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.launch-preview-metrics { padding: 12px 15px; display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; background: #f8faf9; }
.launch-preview-metrics div { display: grid; }.launch-preview-metrics strong { font-size: 20px; }.launch-preview-metrics span { color: var(--muted); font-size: 10px; }
.launch-preview-items { min-height: 128px; padding: 7px 15px; }
.launch-preview-item { padding: 8px 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 8px; border-bottom: 1px solid #edf1ef; }
.launch-preview-item > div { min-width: 0; display: grid; }.launch-preview-item b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.launch-preview-item small,.launch-preview-item span { color: var(--muted); font-size: 9px; }
.launch-preview-item > strong { grid-row: span 2; align-self: center; font-size: 18px; }.launch-preview-item > span { grid-column: 1 / -1; }.launch-preview-item.skipped > strong { color: #9aa5a2; }
.launch-preview-empty,.launch-preview-more { color: var(--muted); font-size: 11px; }
.launch-preview-actions { padding: 12px 15px 15px; display: grid; gap: 9px; border-top: 1px solid #edf1ef; }.launch-preview-actions > span { color: var(--muted); font-size: 10px; }.launch-preview-actions button { width: 100%; }.launch-preview-actions button:disabled { cursor: not-allowed; opacity: .45; }
@media (max-width: 1000px) { .launch-preview-grid { grid-template-columns: 1fr; } }
.orders-heading { align-items: center; }
.order-preview-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.order-preview-grid > .connection-loading { grid-column: 1 / -1; }
.order-preview-card { overflow: hidden; border: 1px solid var(--line); border-top: 4px solid #9aacaa; border-radius: 15px; background: white; box-shadow: var(--shadow); }
.order-preview-card.wb { border-top-color: #a338e0; }.order-preview-card.ozon { border-top-color: #1d65f5; }.order-preview-card.yandex { border-top-color: #f2c500; }
.order-card-head { padding: 17px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); }.order-card-head h2 { margin: 0; font-family: Georgia,serif; font-size: 21px; font-weight: 500; }.order-card-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.order-card-metrics { padding: 13px 17px; display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; background: #f8faf9; }.order-card-metrics div { display: grid; }.order-card-metrics strong { font-size: 21px; }.order-card-metrics span { color: var(--muted); font-size: 10px; }
.order-lines { min-height: 180px; max-height: 460px; padding: 7px 17px; overflow: auto; }.order-line { padding: 9px 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 9px; border-bottom: 1px solid #edf1ef; }.order-line > div { min-width: 0; display: grid; }.order-line b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.order-line small,.order-line span { color: var(--muted); font-size: 9px; }.order-line > strong { grid-row: span 2; align-self: center; }.order-line > span { grid-column: 1 / -1; }.order-line.ready > span { color: #13705d; }.order-line.unresolved > span,.order-card-error { color: var(--danger); }
.order-empty,.order-more { color: var(--muted); font-size: 11px; }.order-card-error { min-height: 180px; margin: 0; padding: 18px; font-size: 12px; background: #fff7f5; }
.order-card-actions { padding: 13px 17px 17px; display: grid; gap: 9px; border-top: 1px solid var(--line); }.order-card-actions span { color: var(--muted); font-size: 10px; }.order-card-actions button { width: 100%; }.order-card-actions button:disabled { cursor: not-allowed; opacity: .45; }
@media (max-width: 1000px) { .order-preview-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .topnav a { min-width: 88px; padding-left: 7px; padding-right: 7px; } }
.catalog-import-modal { width: min(820px,calc(100vw - 28px)); }
.catalog-import-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; }.catalog-import-summary > div:not(.connection-loading) { padding: 12px; display: grid; border-radius: 10px; background: #f2f6f4; }.catalog-import-summary strong { font-size: 24px; }.catalog-import-summary span { color: var(--muted); font-size: 10px; }
.catalog-source-errors { margin: 12px 0; padding: 10px 13px; border-radius: 10px; color: var(--danger); background: #fff0ee; }.catalog-source-errors p { margin: 3px 0; display: flex; justify-content: space-between; gap: 12px; font-size: 11px; }
.catalog-import-list { max-height: 380px; margin-top: 14px; overflow: auto; border: 1px solid var(--line); border-radius: 11px; }.catalog-import-item { padding: 10px 12px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 12px; border-bottom: 1px solid #edf1ef; }.catalog-import-item:last-child { border-bottom: 0; }.catalog-import-item > div { min-width: 0; display: grid; }.catalog-import-item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }.catalog-import-item small,.catalog-import-item > span { color: var(--muted); font-size: 10px; }.catalog-import-item > strong { grid-row: span 2; align-self: center; color: #246b58; font-size: 10px; }.catalog-import-item.unchanged > strong,.catalog-import-item.deleted > strong { color: #8a9692; }.catalog-import-empty { padding: 30px; color: var(--muted); text-align: center; }
@media (max-width: 620px) { .page-heading-actions { width: 100%; }.page-heading-actions button { flex: 1; }.catalog-import-summary { grid-template-columns: repeat(2,1fr); } }
.stock-policy-section { margin: 20px 0 24px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.stock-policy-form { display: grid; grid-template-columns: minmax(230px,1.2fr) minmax(180px,.7fr) minmax(220px,1fr); gap: 14px; align-items: end; }
.stock-policy-form .policy-switch-row { grid-column: 1 / -1; }
.policy-switch-row { display: flex; align-items: center; gap: 11px; padding: 13px 14px; border: 1px solid #d7e1de; border-radius: 12px; background: #f7faf9; cursor: pointer; }
.policy-switch-row input { width: 19px; height: 19px; accent-color: var(--green); }
.policy-switch-row span { display: grid; gap: 2px; }.policy-switch-row small,.form-field small { color: var(--muted); font-size: 10px; }
.stock-policy-form select { width: 100%; padding: 11px 12px; border: 1px solid #cdd9d5; border-radius: 9px; color: var(--ink); background: white; }
.stock-policy-form input:disabled,.stock-policy-form select:disabled { cursor: not-allowed; opacity: .55; background: #edf1ef; }
.policy-summary { grid-column: 1 / -1; padding: 11px 13px; border-radius: 10px; color: #315f54; background: var(--green-soft); font-size: 12px; }
.policy-summary.warning { color: #7a5700; background: var(--amber-soft); }
.stock-policy-form > .form-error { grid-column: 1 / -1; }
.stock-policy-form > button { justify-self: start; }
@media (max-width: 800px) { .stock-policy-form { grid-template-columns: 1fr; }.stock-policy-form .policy-switch-row,.policy-summary,.stock-policy-form > .form-error { grid-column: 1; }.stock-policy-form > button { width: 100%; } }
.launch-readiness-section { margin: 20px 0 24px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.launch-readiness-section .section-title-row h2 { margin: 2px 0 5px; font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.launch-readiness-summary { margin-bottom: 12px; padding: 13px 15px; display: grid; gap: 3px; border-radius: 11px; color: #755216; background: var(--amber-soft); }
.launch-readiness-summary.ready { color: #176344; background: #e2f4ea; }
.launch-readiness-summary.blocked { color: #8f3428; background: #fff0ee; }
.launch-readiness-summary span { font-size: 11px; }
.launch-readiness-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.readiness-check { min-width: 0; padding: 12px 13px; display: flex; align-items: start; gap: 10px; border: 1px solid #dce4e1; border-radius: 11px; background: #f9fbfa; }
.readiness-check-icon { flex: 0 0 auto; width: 11px; height: 11px; margin-top: 3px; border-radius: 50%; background: #279071; box-shadow: 0 0 0 4px rgba(39,144,113,.1); }
.readiness-check.warning .readiness-check-icon { background: #d3a71c; box-shadow: 0 0 0 4px rgba(211,167,28,.12); }
.readiness-check.blocker .readiness-check-icon { background: var(--danger); box-shadow: 0 0 0 4px rgba(181,69,54,.1); }
.readiness-check div { min-width: 0; display: grid; gap: 3px; }
.readiness-check b { font-size: 12px; }
.readiness-check p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
@media (max-width: 760px) { .launch-readiness-list { grid-template-columns: 1fr; } }

.operations-section { margin: 20px 0 24px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.operations-section h2,.emergency-section h2 { margin: 2px 0 5px; font-family: Georgia,serif; font-size: 26px; font-weight: 500; }
.email-settings-form { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 14px; }
.email-settings-form .full-row { grid-column: 1 / -1; }
.email-settings-form select { width: 100%; height: 45px; padding: 0 12px; border: 1px solid #c7d3cf; border-radius: 9px; background: #fbfcfb; }
.operations-actions { margin-top: 17px; display: flex; gap: 10px; }
.backup-panel { margin-top: 22px; padding: 17px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; border-radius: 13px; background: #f5f8f7; }
.backup-panel p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.backup-actions { display: flex; align-items: center; gap: 9px; }
.file-button { cursor: pointer; }.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.backup-preview { grid-column: 1 / -1; padding: 14px; border: 1px solid #cbdcd6; border-radius: 11px; background: white; }
.backup-preview p,.backup-preview ul { color: var(--muted); font-size: 12px; }.backup-preview ul { padding-left: 19px; }.backup-preview button { margin-top: 8px; }
.emergency-section { margin: 20px 0 24px; padding: 20px; display: flex; align-items: center; justify-content: space-between; gap: 25px; border: 1px solid #e9c4bd; border-radius: 16px; background: #fff8f6; }
.emergency-section > div > p:not(.eyebrow) { margin: 5px 0 11px; color: #765f5a; font-size: 12px; line-height: 1.5; }
.emergency-state { color: #647570; font-size: 11px; }.emergency-state.active { color: var(--danger); font-weight: 750; }
.danger-button { flex: 0 0 auto; padding: 12px 17px; border: 1px solid #a9392b; border-radius: 9px; color: white; background: #b54536; font-weight: 800; }
.danger-button:hover { background: #9d3529; }.danger-button:disabled { cursor: not-allowed; opacity: .5; }
@media (max-width: 800px) { .email-settings-form { grid-template-columns: 1fr; }.email-settings-form .full-row { grid-column: 1; }.backup-panel { grid-template-columns: 1fr; }.backup-actions { align-items:stretch; flex-direction:column }.backup-actions > * { width:100%; text-align:center }.backup-preview { grid-column:1 }.emergency-section { align-items:stretch; flex-direction:column }.emergency-section button { width:100%; } }
.demo-mode-banner { position: sticky; top: 0; z-index: 1000; display: flex; justify-content: center; gap: 12px; padding: 9px 16px; color: #3d2900; background: #ffd76a; border-bottom: 1px solid #d7a91e; font-size: 13px; text-align: center; }
.demo-mode-banner span { opacity: .82; }
.demo-mode .topbar { top: 38px; }
.demo-mode.login-page { display: block; }
.demo-mode.login-page .login-shell { margin: 28px auto; }
@media (max-width: 700px) { .demo-mode-banner { position: relative; flex-direction: column; gap: 2px; } .demo-mode .topbar { top: 0; } }
