:root {
      --bg: #050403;
      --bg-shift-x: 0px;
      --bg-shift-y: 0px;
      --bg-glow-x: 50%;
      --bg-glow-y: 6%;
      --panel: rgba(22, 21, 20, .78);
      --panel-2: rgba(34, 32, 30, .86);
      --ink: #fff7ee;
      --muted: #b8aaa0;
      --soft: #756a62;
      --line: rgba(255, 255, 255, .12);
      --accent: #e23b3b;
      --accent-2: #ff6a6a;
      --green: #2dd08c;
      --shadow: rgba(0, 0, 0, .45);
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      min-height: 100vh;
      font-family: Inter, "Segoe UI", Arial, sans-serif;
      color: var(--ink);
      background:
        linear-gradient(135deg, rgba(226, 59, 59, .18), transparent 28%),
        radial-gradient(ellipse at var(--bg-glow-x) var(--bg-glow-y), rgba(233, 70, 70, .34), transparent 36%),
        radial-gradient(ellipse at calc(92% + var(--bg-shift-x) * .14) calc(74% + var(--bg-shift-y) * .12), rgba(226, 59, 59, .18), transparent 22%),
        var(--bg);
      background-attachment: fixed;
      background-position:
        calc(var(--bg-shift-x) * .10) calc(var(--bg-shift-y) * .08),
        0 0,
        0 0,
        0 0;
    }
    body::before {
      content: "";
      position: fixed;
      inset: 0;
      pointer-events: none;
      background:
        repeating-radial-gradient(ellipse at calc(50% + var(--bg-shift-x) * .22) calc(12% + var(--bg-shift-y) * .18), rgba(226, 59, 59, .20) 0 1px, transparent 1px 22px),
        linear-gradient(180deg, transparent, rgba(0, 0, 0, .74) 42%, #050403 100%);
      opacity: .78;
      transform: translate3d(calc(var(--bg-shift-x) * .28), calc(var(--bg-shift-y) * .28), 0);
      transition: transform .35s cubic-bezier(.22,1,.36,1), opacity .35s ease;
    }
    main {
      position: relative;
      width: min(1220px, calc(100% - 28px));
      margin: 0 auto;
      padding: 18px 0 46px;
    }
    header.hero {
      min-height: 280px;
      display: grid;
      align-content: center;
      justify-items: center;
      text-align: center;
      padding: 24px 0 18px;
    }
    .topbar {
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 14px;
      margin-bottom: 22px;
    }
    .brand {
      display: flex;
      align-items: center;
      gap: 10px;
      font-weight: 800;
      letter-spacing: 0;
    }
    .brand-mark {
      width: 28px;
      height: 28px;
      border-radius: 9px;
      display: grid;
      place-items: center;
      background: var(--accent);
      color: white;
      font-weight: 900;
      box-shadow: 0 0 28px rgba(255, 106, 42, .6);
    }
    .pill {
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 8px 13px;
      color: var(--muted);
      background: rgba(255, 255, 255, .05);
      backdrop-filter: blur(10px);
    }
    .top-action {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      min-width: 96px;
    }
    .top-exit-button {
      min-width: 96px;
    }
    h1 {
      max-width: 760px;
      margin: 0 0 12px;
      font-size: clamp(36px, 7vw, 68px);
      line-height: .94;
      letter-spacing: 0;
    }
    h2, h3 {
      margin-top: 0;
      letter-spacing: 0;
    }
    p {
      color: var(--muted);
      line-height: 1.55;
    }
    .hero p {
      max-width: 620px;
      margin: 0 auto 22px;
      font-size: 15px;
    }
    .hero-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: center;
    }
    .stocks-nav-button.active {
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      color: #fff;
      border-color: rgba(255, 255, 255, .18);
      box-shadow: 0 14px 34px rgba(226, 59, 59, .24);
    }
    section {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 18px;
      padding: 22px;
      margin-bottom: 16px;
      box-shadow: 0 22px 70px var(--shadow);
      backdrop-filter: blur(18px);
    }
    .section-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 18px;
      flex-wrap: wrap;
      margin-bottom: 16px;
    }
    .section-head h2 {
      margin-bottom: 4px;
    }
    .section-head p {
      margin: 0;
    }
    .row, .toolbar, .summary {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      align-items: center;
    }
    .search-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }
    .search-grid input {
      width: 100%;
    }
    #pairingSection {
      max-width: none;
    }
    .auth-device-row {
      display: block;
      margin-top: 18px;
      margin-bottom: 10px;
    }
    #deviceName {
      width: min(100%, 430px);
    }
    .auth-pin-row {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }
    #pinCode {
      width: 206px;
    }
    #authSubmit {
      min-width: 140px;
      white-space: nowrap;
    }
    .clearable-field {
      position: relative;
    }
    .clearable-field input {
      padding-right: 40px;
    }
    .clear-input-btn {
      position: absolute;
      top: 50%;
      right: 10px;
      transform: none;
      margin-top: -11px;
      width: 22px;
      height: 22px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, .12);
      background: rgba(255, 255, 255, .08);
      color: var(--muted);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 18px;
      line-height: 20px;
      padding: 0;
      box-shadow: none;
      transition: background .16s ease, color .16s ease, border-color .16s ease;
    }
    .clear-input-btn:hover {
      color: var(--ink);
      background: rgba(255, 255, 255, .14);
      transform: none;
    }
    .clear-input-btn.hidden {
      display: none !important;
    }
    .table-wrap {
      overflow: auto;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: rgba(255, 255, 255, .04);
    }
    .identifier-controls {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      margin-top: 14px;
      margin-bottom: 14px;
    }
    .page-size-control {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      color: var(--muted);
      font-size: 13px;
    }
    .page-size-picker {
      position: relative;
    }
    .page-size-button,
    .page-number-button,
    .sort-header {
      box-shadow: none;
    }
    .page-size-button {
      min-width: 76px;
      padding: 10px 36px 10px 14px;
      border: 1px solid rgba(226, 59, 59, .42);
      background: rgba(255, 255, 255, .09);
      color: var(--ink);
      text-align: left;
      position: relative;
      transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
    }
    .page-size-button:hover {
      transform: translateY(-1px);
      border-color: rgba(226, 59, 59, .72);
      background: rgba(226, 59, 59, .16);
      box-shadow: 0 12px 26px rgba(226, 59, 59, .15);
    }
    .page-size-button::after {
      content: "";
      position: absolute;
      right: 14px;
      top: 50%;
      width: 7px;
      height: 7px;
      border-right: 2px solid currentColor;
      border-bottom: 2px solid currentColor;
      transform: translateY(-65%) rotate(45deg);
    }
    .page-size-menu {
      position: absolute;
      left: 0;
      top: calc(100% + 8px);
      min-width: 100%;
      padding: 6px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(28, 25, 25, .98);
      box-shadow: 0 18px 42px rgba(0, 0, 0, .36);
      z-index: 30;
    }
    .page-size-menu.hidden {
      display: none;
    }
    .page-size-menu button {
      display: block;
      width: 100%;
      padding: 8px 10px;
      border-radius: 9px;
      background: transparent;
      color: var(--ink);
      text-align: left;
      box-shadow: none;
    }
    .page-size-menu button:hover,
    .page-size-menu button.active {
      background: rgba(226, 59, 59, .20);
    }
    .freeze-button {
      min-width: 166px;
    }
    .identifier-pagination {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      margin: 14px 0 14px;
    }
    .page-buttons {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .page-number-button {
      min-width: 40px;
      padding: 9px 12px;
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, .08);
      color: var(--ink);
      transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
    }
    .page-number-button:not(:disabled):hover {
      transform: translateY(-1px);
      border-color: rgba(226, 59, 59, .58);
      background: rgba(226, 59, 59, .16);
    }
    .page-number-button.active {
      border-color: rgba(226, 59, 59, .78);
      background: rgba(226, 59, 59, .24);
      box-shadow: 0 10px 24px rgba(226, 59, 59, .14);
    }
    .page-number-button:disabled {
      opacity: .46;
      cursor: default;
    }
    .sort-header {
      width: 100%;
      min-height: 28px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      padding: 0;
      border: none;
      border-radius: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      font-weight: 800;
      cursor: pointer;
      transition: color .16s ease, background .16s ease, transform .16s ease;
    }
    .sort-header:hover {
      color: #fff;
      transform: translateY(-1px);
    }
    .sort-header::after {
      content: "↕";
      color: var(--muted);
      font-size: 12px;
      line-height: 1;
    }
    .sort-header.sort-asc::after {
      content: "▲";
      color: var(--accent);
    }
    .sort-header.sort-desc::after {
      content: "▼";
      color: var(--accent);
    }
    table {
      width: 100%;
      border-collapse: collapse;
      min-width: 860px;
    }
    .identifier-table {
      width: max-content;
      min-width: 2370px;
      table-layout: fixed;
      border-collapse: separate;
      border-spacing: 0;
    }
    th, td {
      text-align: left;
      vertical-align: top;
      padding: 12px 14px;
      border-bottom: 1px solid var(--line);
      font-size: 14px;
      transition: background .14s ease, color .14s ease, box-shadow .14s ease, border-color .14s ease;
    }
    th {
      text-align: center;
      color: var(--muted);
      font-weight: 700;
      position: sticky;
      top: 0;
      background: rgba(17, 16, 15, .96);
      z-index: 1;
    }
    .identifier-table th {
      user-select: none;
    }
    .identifier-table th,
    .identifier-table td {
      position: relative;
      background-clip: padding-box;
    }
    .identifier-table .frozen-cell {
      position: sticky;
      z-index: 3;
    }
    .identifier-table th.frozen-cell {
      z-index: 5;
      background: rgba(17, 16, 15, .98);
    }
    .identifier-table td.frozen-cell {
      background: rgba(21, 19, 18, .98);
    }
    .identifier-table tbody tr:nth-child(odd) td.frozen-cell {
      background: rgba(24, 22, 21, .98);
    }
    .identifier-table tbody tr:hover td.frozen-cell {
      background: linear-gradient(90deg, rgba(57, 28, 28, .98), rgba(35, 27, 26, .98));
    }
    .column-resize-handle {
      position: absolute;
      top: 0;
      right: -4px;
      width: 9px;
      height: 100%;
      cursor: col-resize;
      z-index: 8;
      touch-action: none;
    }
    .column-resize-handle::after {
      content: "";
      position: absolute;
      top: 18%;
      bottom: 18%;
      left: 4px;
      width: 1px;
      border-radius: 999px;
      background: rgba(255, 255, 255, .16);
      transition: background .16s ease, box-shadow .16s ease;
    }
    .column-resize-handle:hover::after,
    .column-resize-handle.resizing::after {
      background: rgba(226, 59, 59, .85);
      box-shadow: 0 0 12px rgba(226, 59, 59, .35);
    }
    th:not(:last-child),
    td:not(:last-child) {
      border-right: 1px solid rgba(255, 255, 255, .08);
    }
    tbody tr:nth-child(odd) td {
      background: rgba(255, 255, 255, .02);
    }
    tbody tr {
      cursor: default;
    }
    tbody tr:hover td {
      background: linear-gradient(90deg, rgba(226, 59, 59, .18), rgba(255, 255, 255, .055));
      border-bottom-color: rgba(226, 59, 59, .32);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), inset 0 -1px 0 rgba(226, 59, 59, .10);
    }
    tbody tr:hover td:first-child {
      box-shadow: inset 3px 0 0 var(--accent), inset 0 1px 0 rgba(255, 255, 255, .05), inset 0 -1px 0 rgba(226, 59, 59, .10);
    }
    td {
      color: var(--ink);
    }
    .barcode-stack {
      display: grid;
      gap: 5px;
      min-width: 150px;
    }
    .barcode-line {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 2px 0;
      line-height: 1.28;
    }
    .barcode-line.gtin-line {
      margin-bottom: 2px;
      padding: 5px 8px;
      border: 1px solid rgba(226, 59, 59, .45);
      border-radius: 9px;
      background: rgba(226, 59, 59, .14);
      color: #fff;
      font-weight: 800;
      box-shadow: inset 3px 0 0 var(--accent);
    }
    .code-type {
      flex: 0 0 auto;
      padding: 2px 6px;
      border-radius: 999px;
      background: rgba(226, 59, 59, .22);
      color: #fff;
      font-size: 10px;
      font-weight: 900;
      letter-spacing: 0;
    }
    .article-stack {
      display: grid;
      gap: 7px;
      min-width: 190px;
    }
    .article-link {
      display: flex;
      align-items: flex-start;
      gap: 7px;
      width: 100%;
      padding: 6px 8px;
      border: 1px solid rgba(255, 255, 255, .08);
      border-radius: 10px;
      background: rgba(255, 255, 255, .045);
      color: var(--ink);
      text-decoration: none;
      line-height: 1.28;
      white-space: nowrap;
      transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
    }
    .article-link:hover {
      transform: translateY(-1px);
      border-color: rgba(226, 59, 59, .46);
      background: rgba(226, 59, 59, .13);
      box-shadow: 0 10px 24px rgba(226, 59, 59, .12);
    }
    .article-link.no-url {
      cursor: default;
    }
    .article-link.no-url:hover {
      transform: none;
      border-color: rgba(255, 255, 255, .08);
      background: rgba(255, 255, 255, .045);
      box-shadow: none;
    }
    .article-cabinet {
      flex: 0 0 auto;
      max-width: 92px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      padding: 2px 6px;
      border-radius: 999px;
      background: rgba(255, 255, 255, .09);
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
    }
    .article-text {
      min-width: 0;
      white-space: nowrap;
      overflow-wrap: normal;
    }
    tr:last-child td {
      border-bottom: none;
    }
    .filter-row {
      margin-top: 12px;
      padding: 12px 14px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: rgba(255, 255, 255, .04);
    }
    .filter-title {
      font-size: 13px;
      color: var(--muted);
      margin-bottom: 8px;
    }
    .checkbox-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }
    .checkbox-pill,
    .chip-checkbox {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(255, 255, 255, .05);
      color: var(--ink);
      user-select: none;
    }
    .collision-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
      margin: 14px 0;
    }
    .collision-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin: 8px 0 14px;
    }
    .collision-tab-button.active {
      background: rgba(226, 59, 59, .22);
      border-color: rgba(226, 59, 59, .65);
      color: #fff;
      box-shadow: 0 12px 26px rgba(226, 59, 59, .16);
    }
    .collision-summary {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin: 10px 0 14px;
    }
    .collision-stat {
      padding: 8px 12px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(255, 255, 255, .045);
      color: var(--muted);
      font-size: 13px;
    }
    .collision-table {
      min-width: 1960px;
      width: max-content;
      table-layout: auto;
    }
    .collision-table th {
      white-space: nowrap;
    }
    .collision-table td {
      vertical-align: top;
      white-space: nowrap;
    }
    .collision-table .status-resolved {
      color: #86efac;
      font-weight: 800;
    }
    .collision-table .status-error {
      color: #ff8b8b;
      font-weight: 800;
    }
    .collision-candidate {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 8px;
      align-items: start;
      min-width: 360px;
    }
    .collision-candidate input {
      margin-top: 3px;
      transform: scale(1.1);
      accent-color: var(--accent);
    }
    .collision-candidate-title {
      font-weight: 800;
      line-height: 1.35;
    }
    .collision-candidate-sub {
      color: var(--muted);
      font-size: 12px;
      margin-top: 4px;
      overflow-wrap: anywhere;
    }
    .collision-extra {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
      min-width: 320px;
      white-space: normal;
      overflow-wrap: anywhere;
    }
    .collision-item-cell {
      min-width: 380px;
      white-space: normal !important;
      overflow-wrap: anywhere;
    }
    .collision-cabinet-cell {
      min-width: 170px;
    }
    .collision-barcode-cell {
      min-width: 150px;
      font-variant-numeric: tabular-nums;
    }
    .exclusion-toolbar {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
      margin: 12px 0 16px;
    }
    .exclusion-toolbar input {
      min-width: min(520px, 100%);
      flex: 1 1 360px;
    }
    .exclusion-layout {
      display: grid;
      grid-template-columns: minmax(0, 1.55fr) minmax(340px, .75fr);
      gap: 14px;
      align-items: start;
    }
    .exclusion-table {
      min-width: 980px;
    }
    .exclusion-table tbody tr {
      cursor: pointer;
    }
    .exclusion-table tbody tr.selected-row td {
      background: rgba(226, 59, 59, .20);
      border-bottom-color: rgba(226, 59, 59, .38);
    }
    .exclusion-product-cell {
      min-width: 380px;
      white-space: normal !important;
      overflow-wrap: anywhere;
    }
    .exclusion-detail {
      border: 1px solid var(--line);
      border-radius: 16px;
      background: rgba(255, 255, 255, .04);
      padding: 16px;
      min-height: 240px;
      position: sticky;
      top: 12px;
    }
    .exclusion-selected-title {
      margin: 0 0 12px;
      color: var(--ink);
      font-weight: 800;
      line-height: 1.35;
      overflow-wrap: anywhere;
    }
    .exclusion-cabinet-list {
      display: grid;
      gap: 8px;
      max-height: 54vh;
      overflow: auto;
      padding-right: 4px;
    }
    .exclusion-cabinet-check {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      padding: 9px 10px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(255, 255, 255, .045);
      cursor: pointer;
      transition: background .16s ease, border-color .16s ease, transform .16s ease;
    }
    .exclusion-cabinet-check:hover {
      transform: translateY(-1px);
      border-color: rgba(226, 59, 59, .5);
      background: rgba(226, 59, 59, .12);
    }
    .exclusion-cabinet-check input {
      margin-top: 2px;
      accent-color: var(--accent);
    }
    .socks-form-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(220px, 1fr));
      gap: 10px;
      margin: 14px 0;
    }
    .socks-form-grid input {
      width: 100%;
    }
    .socks-upload-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
      margin: 12px 0;
    }
    .socks-upload-row input[type="file"] {
      flex: 1 1 360px;
      min-width: min(100%, 320px);
    }
    .socks-option-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin: 12px 0;
    }
    .socks-mode-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin: 10px 0;
    }
    .socks-mode-tabs button.active {
      background: rgba(226, 59, 59, .22);
      border-color: rgba(226, 59, 59, .65);
      box-shadow: 0 12px 26px rgba(226, 59, 59, .16);
    }
    .socks-table {
      min-width: 1160px;
      width: 100%;
    }
    .socks-table td,
    .socks-table th {
      vertical-align: top;
    }
    .socks-table .wide-cell {
      min-width: 320px;
      white-space: normal;
      overflow-wrap: anywhere;
    }
    .socks-preview-section {
      margin-top: 16px;
    }
    .socks-preview-section h3 {
      margin: 0 0 8px;
    }
    .socks-preview-table {
      min-width: 980px;
      width: 100%;
    }
    .socks-preview-table .name-cell {
      min-width: 360px;
      white-space: normal;
      overflow-wrap: anywhere;
    }
    .socks-preview-table td:first-child {
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    .b2b-upload-row {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      margin: 14px 0;
    }
    .b2b-upload-row input[type="file"] {
      min-width: min(100%, 420px);
      color: var(--muted);
    }
    .b2b-upload-row input[type="file"]::file-selector-button {
      margin-right: 10px;
      padding: 9px 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(255,255,255,.08);
      color: var(--text);
      font: inherit;
      cursor: pointer;
    }
    .b2b-table {
      min-width: 1460px;
    }
    .b2b-manual-search-wrap {
      max-height: 380px;
      overflow: auto;
    }
    .b2b-manual-search-wrap .b2b-table {
      min-width: 1180px;
    }
    .b2b-manual-search-wrap thead th {
      position: sticky;
      top: 0;
      z-index: 2;
      background: rgba(18, 16, 16, .98);
    }
    .b2b-manual-search-wrap tbody tr {
      height: 52px;
    }
    .b2b-table th,
    .b2b-table td {
      vertical-align: middle;
    }
    .b2b-table .b2b-code-kind {
      font-weight: 800;
      white-space: nowrap;
    }
    .b2b-table .b2b-code-gtin {
      color: #8ef0b7;
      font-weight: 800;
    }
    .b2b-table .b2b-code-barcode {
      color: #7bc9ff;
      font-weight: 800;
    }
    .b2b-table tr.b2b-missing td {
      background: rgba(226, 59, 59, .13);
    }
    .b2b-table .b2b-editable {
      cursor: text;
      min-width: 120px;
    }
    .b2b-table .b2b-editable:hover {
      background: rgba(255,255,255,.06);
    }
    .b2b-table .b2b-edit-input {
      width: 100%;
      min-width: 130px;
      box-sizing: border-box;
      padding: 7px 8px;
      border-radius: 6px;
    }
    .b2b-table .b2b-qty-input {
      width: 82px;
      min-width: 82px;
      padding: 7px 8px;
      border-radius: 6px;
      text-align: center;
    }
    .b2b-table .b2b-action-cell {
      white-space: nowrap;
    }
    .b2b-table .b2b-action-cell button {
      padding: 8px 11px;
      min-height: 34px;
      border-radius: 8px;
    }
    .b2b-table .b2b-manual-source {
      min-width: 300px;
      white-space: normal;
      overflow-wrap: anywhere;
    }
    .b2b-table tr.b2b-search-row:hover td {
      background: rgba(255,255,255,.055);
    }
    .b2b-qty-modal {
      position: fixed;
      inset: 0;
      z-index: 80;
      display: grid;
      place-items: center;
      padding: 18px;
      background: rgba(0, 0, 0, .58);
      backdrop-filter: blur(8px);
    }
    .b2b-qty-modal-panel {
      width: min(520px, 100%);
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(20, 18, 18, .98);
      box-shadow: 0 24px 80px rgba(0, 0, 0, .45);
      padding: 20px;
    }
    .b2b-qty-modal-panel h3 {
      margin: 0 0 8px;
      font-size: 22px;
    }
    .b2b-qty-modal-panel .b2b-note {
      margin: 5px 0;
    }
    .b2b-qty-modal-panel input {
      width: 160px;
      margin-top: 14px;
    }
    .b2b-qty-modal-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 16px;
    }
    .b2b-note {
      margin: 0;
      color: var(--muted);
    }
    .b2b-unavailable {
      max-width: 760px;
      padding: 18px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(255,255,255,.025);
    }
    .status a.report-link {
      color: #fff;
      display: inline-block;
      margin-top: 10px;
      padding: 8px 12px;
      border-radius: 12px;
      background: rgba(226, 59, 59, .22);
      border: 1px solid rgba(226, 59, 59, .5);
      text-decoration: none;
      font-family: Inter, "Segoe UI", Arial, sans-serif;
      font-weight: 800;
    }
    @media (max-width: 980px) {
      .exclusion-layout {
        grid-template-columns: 1fr;
      }
      .exclusion-detail {
        position: static;
      }
    }
    body.mode-oper #sendSection,
    body.mode-oper #scheduleSection,
    body.mode-oper #feedbackSection,
    body.mode-oper #collisionSection,
    body.mode-oper #exclusionsSection,
    body.mode-oper #socksChzSection,
    body.mode-oper #socksPromoSection,
    body.mode-oper #socksStockSection,
    body.mode-oper #socksBundlesSection {
      display: none;
    }
    body.mode-oper main {
      width: min(1780px, calc(100% - 28px));
    }
    body.mode-stocks main {
      width: min(1760px, calc(100% - 28px));
    }
    body.mode-stocks #sendSection,
    body.mode-stocks #collisionSection,
    body.mode-stocks #exclusionsSection,
    body.mode-stocks #scheduleSection {
      display: none;
    }
    body.mode-stocks #sendSection.stocks-view-active,
    body.mode-stocks #collisionSection.stocks-view-active,
    body.mode-stocks #exclusionsSection.stocks-view-active,
    body.mode-stocks #scheduleSection.stocks-view-active {
      display: block;
    }
    body.mode-stocks #identifiersSection,
    body.mode-stocks #feedbackSection,
    body.mode-stocks #socksChzSection,
    body.mode-stocks #socksPromoSection,
    body.mode-stocks #socksStockSection,
    body.mode-stocks #socksBundlesSection {
      display: none;
    }
    body.mode-feedback #sendSection,
    body.mode-feedback #scheduleSection,
    body.mode-feedback #identifiersSection,
    body.mode-feedback #collisionSection,
    body.mode-feedback #exclusionsSection,
    body.mode-feedback #socksChzSection,
    body.mode-feedback #socksPromoSection,
    body.mode-feedback #socksStockSection,
    body.mode-feedback #socksBundlesSection {
      display: none;
    }
    body.mode-feedback main {
      width: min(100% - 20px, 1780px);
    }
    body.mode-socks main {
      width: min(1760px, calc(100% - 28px));
    }
    body.mode-socks #sendSection,
    body.mode-socks #scheduleSection,
    body.mode-socks #identifiersSection,
    body.mode-socks #collisionSection,
    body.mode-socks #exclusionsSection,
    body.mode-socks #feedbackSection {
      display: none;
    }
    body.mode-socks #socksChzSection,
    body.mode-socks #socksPromoSection,
    body.mode-socks #socksStockSection,
    body.mode-socks #socksBundlesSection {
      display: none;
    }
    body.mode-socks #socksChzSection.socks-view-active,
    body.mode-socks #socksPromoSection.socks-view-active,
    body.mode-socks #socksStockSection.socks-view-active,
    body.mode-socks #socksBundlesSection.socks-view-active {
      display: block;
    }
    body:not(.mode-b2b) #b2bSiteSection,
    body:not(.mode-b2b) #b2bPricesSection,
    body:not(.mode-b2b) #b2bManualSection {
      display: none;
    }
    body.mode-b2b main {
      width: min(1780px, calc(100% - 28px));
    }
    body.mode-b2b #sendSection,
    body.mode-b2b #scheduleSection,
    body.mode-b2b #identifiersSection,
    body.mode-b2b #collisionSection,
    body.mode-b2b #exclusionsSection,
    body.mode-b2b #feedbackSection,
    body.mode-b2b #socksChzSection,
    body.mode-b2b #socksPromoSection,
    body.mode-b2b #socksStockSection,
    body.mode-b2b #socksBundlesSection,
    body.mode-b2b #b2bSiteSection,
    body.mode-b2b #b2bPricesSection,
    body.mode-b2b #b2bManualSection {
      display: none;
    }
    body.mode-b2b #b2bSiteSection.b2b-view-active,
    body.mode-b2b #b2bPricesSection.b2b-view-active,
    body.mode-b2b #b2bManualSection.b2b-view-active {
      display: block;
    }
    .feedback-tabs {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 12px;
    }
    .feedback-tabs button.active {
      background: #ffffff;
      color: #151515;
      border-color: #ffffff;
    }
    .feedback-table-wrap {
      overflow: auto;
      max-height: 72vh;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: rgba(255,255,255,.03);
    }
    .feedback-table {
      min-width: 1880px;
      border-collapse: separate;
      border-spacing: 0;
    }
    .feedback-table th {
      position: sticky;
      top: 0;
      z-index: 2;
      background: #181716;
    }
    .feedback-table td,
    .feedback-table th {
      vertical-align: top;
    }
    .feedback-table .sticky-col {
      position: sticky;
      left: 0;
      z-index: 3;
      background: #181716;
    }
    .feedback-table td.sticky-col {
      background: #11100f;
    }
    .feedback-comment {
      width: 240px;
      min-height: 76px;
      resize: vertical;
      font: inherit;
    }
    .feedback-text {
      min-width: 240px;
      max-width: 320px;
      white-space: pre-wrap;
      line-height: 1.35;
    }
    .rating-cell {
      text-align: center;
      font-weight: 800;
      min-width: 46px;
    }
    .rating-low { background: #ea9999; color: #151515; }
    .rating-mid { background: #ffe599; color: #151515; }
    .rating-high { background: #b7e1cd; color: #151515; }
    .summary > label {
      flex: 1 1 230px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 13px 14px;
      background: rgba(255, 255, 255, .06);
      color: var(--ink);
    }
    input, select, button {
      font: inherit;
      color: var(--ink);
      border-radius: 13px;
      border: 1px solid var(--line);
      padding: 10px 12px;
      background: rgba(255, 255, 255, .08);
      outline: none;
    }
    input:focus, select:focus {
      border-color: rgba(255, 106, 42, .76);
      box-shadow: 0 0 0 3px rgba(255, 106, 42, .14);
    }
    input[type="checkbox"] {
      width: 18px;
      height: 18px;
      padding: 0;
      accent-color: var(--accent);
    }
    input[type="time"] {
      color-scheme: dark;
    }
    select {
      color-scheme: dark;
    }
    button {
      cursor: pointer;
      border: none;
      color: white;
      font-weight: 750;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      box-shadow: 0 14px 34px rgba(255, 106, 42, .24);
    }
    button.secondary {
      background: rgba(255, 255, 255, .1);
      color: var(--ink);
      border: 1px solid var(--line);
      box-shadow: none;
    }
    button:disabled { opacity: .55; cursor: wait; }
    .hidden { display: none !important; }
    .mini {
      font-size: 13px;
      color: var(--muted);
    }
    .status {
      white-space: pre-wrap;
      font-family: Consolas, monospace;
      font-size: 13px;
      line-height: 1.45;
      background: #070706;
      color: #f6efe6;
      border: 1px solid rgba(255, 255, 255, .08);
      padding: 14px;
      border-radius: 16px;
      min-height: 150px;
      max-height: 420px;
      overflow: auto;
    }
    .platform-block {
      margin-top: 18px;
      border-top: 1px solid var(--line);
      padding-top: 16px;
    }
    .cabinet-card {
      border: 1px solid var(--line);
      border-radius: 16px;
      background: var(--panel-2);
      padding: 14px;
      margin-top: 12px;
    }
    .cabinet-head {
      display: flex;
      gap: 10px;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
    }
    .cabinet-time {
      display: flex;
      gap: 6px;
      align-items: center;
      color: var(--muted);
      font-size: 13px;
    }
    .day-grid {
      display: grid;
      grid-template-columns: repeat(7, minmax(112px, 1fr));
      gap: 8px;
      margin-top: 10px;
    }
    .day-cell {
      display: grid;
      gap: 5px;
      min-width: 0;
    }
    .day-cell span {
      font-size: 13px;
      color: var(--muted);
    }
    .day-cell input,
    .day-cell select {
      width: 100%;
    }
    @media (max-width: 760px) {
      main {
        width: min(100% - 18px, 1220px);
        padding-top: 10px;
      }
      header.hero {
        min-height: 230px;
      }
      .topbar {
        align-items: flex-start;
      }
      section {
        padding: 16px;
        border-radius: 16px;
      }
      .day-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .search-grid {
        grid-template-columns: 1fr;
      }
      .day-cell:last-child {
        grid-column: 1 / -1;
      }
    }
