.shell>.wms-sidebar {
  --shell-ink: #0b0f19;
  --shell-muted: #526071;
  --shell-border: #e5e7f0;
  --shell-accent: #086b2a;
  --shell-active: #dcfce7;
  background: #f8fafc;
  color: var(--shell-ink);
  border-right: 1px solid var(--shell-border);
}
.shell>.wms-sidebar .brand {color:var(--shell-ink);letter-spacing:0;line-height:1.25}
.shell>.wms-sidebar .brand>b {flex:none;background:#16a34a;color:#0b0f19;border-radius:12px}
.shell>.wms-sidebar :is(.brand small,.aside-label,.sidebar-person small,.warehouse small) {color:var(--shell-muted);letter-spacing:0}
.shell>.wms-sidebar nav :is(button,summary) {
  gap:8px;min-height:32px;padding-block:6px;line-height:20px;
  color:var(--shell-ink);font-size:13px;font-weight:500;border-radius:8px;
}
.shell>.wms-sidebar nav :is(button,summary)>span {flex:0 0 16px;width:16px;height:16px;color:var(--shell-muted)}
.shell>.wms-sidebar nav :is(button,summary)>b {white-space:normal;overflow:visible;line-height:1.25}
.shell>.wms-sidebar nav svg {display:block;width:16px;height:16px}
.shell>.wms-sidebar nav :is(button,summary):hover {background:#f0f4f7}
.shell>.wms-sidebar nav button.selected {background:var(--shell-active);color:var(--shell-accent)}
.shell>.wms-sidebar nav button.selected>span {color:var(--shell-accent)}
.shell>.wms-sidebar .sidebar-profile {border-top:1px solid var(--shell-border);color:var(--shell-ink)}
.shell>.wms-sidebar .warehouse {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
.shell>.wms-sidebar .warehouse>div {min-width:0}
.shell>.wms-sidebar .warehouse :is(select,strong) {width:100%;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.shell>.wms-sidebar .sidebar-person {margin-block:8px}
.shell>.wms-sidebar .sidebar-user-actions {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px}
.shell>.wms-sidebar .sidebar-user-actions button {margin:0;color:var(--shell-accent);text-align:left;white-space:nowrap}
.shell>.wms-sidebar .sidebar-user-actions button:first-child {grid-column:1/-1}
.wms-warehouse-settings {display:grid;place-items:center;width:32px;height:32px;border:1px solid #e5e7f0;border-radius:8px;background:#fff;color:#086b2a}
.wms-warehouse-settings svg {width:16px;height:16px}
.warehouse-card-dialog {width:min(640px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:16px;border:1px solid #e5e7f0;border-radius:20px;background:#fff;color:#0b0f19}
.warehouse-card-dialog::backdrop {background:rgb(11 15 25 / 45%)}
.warehouse-card-dialog :is(header,footer) {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.warehouse-card-dialog header {justify-content:space-between;margin-bottom:12px}
.warehouse-card-dialog h2 {margin:0;font-size:20px}
.warehouse-card-dialog [role=status]:empty {display:none}
.warehouse-card-dialog [hidden] {display:none!important}
.warehouse-card-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:16px}
.warehouse-card-fields label {margin:0;min-width:0}
.warehouse-card-wide {grid-column:1/-1}
@media(max-width:540px){.warehouse-card-fields{grid-template-columns:minmax(0,1fr)}}

.crm-page,.crm-settings {color:#0b0f19}
.crm-toolbar,.crm-heading,.crm-heading-actions,.crm-tabs {flex-wrap:wrap}
.crm-tabs button,.crm-client-grid>button {border-color:#e5e7f0;border-radius:12px;color:#0b0f19}
.crm-tabs .selected,.crm-client-grid>button:hover {background:#dcfce7;border-color:#dcfce7;color:#086b2a}
.crm-client-grid>button {padding:12px 16px;min-height:56px}
.crm-settings.crm-drawer {width:min(1056px,100%);border-left:1px solid #e5e7f0;background:#f8fafc}
.crm-settings .crm-drawer-body {padding:16px;min-width:0}
.crm-settings .crm-drawer-body .page-heading {margin-bottom:12px;flex-wrap:wrap}
.crm-settings .crm-drawer-body .page-heading h1 {font-size:24px}
.crm-settings .crm-drawer-body .panel {border-color:#e5e7f0;border-radius:16px}
.crm-settings .crm-client-summary .catalog-legal {display:flex;flex-wrap:wrap;gap:8px}
.crm-settings .crm-client-summary .panel-heading {margin-bottom:6px}
.crm-settings .crm-client-summary .panel-heading h2 {margin-top:4px}
.crm-settings .crm-lower-access>summary {cursor:pointer;font-weight:600}
.crm-settings .crm-lower-access>#client-access {margin:8px 0 0;padding:0;border:0;box-shadow:none}
.crm-settings .crm-lower-access #client-access h2 {display:none}
.crm-carrier {padding:10px 0;border-top:1px solid #e5e7f0}
.crm-carrier summary {cursor:pointer;line-height:1.5}
.crm-carrier summary small {margin-left:8px;color:#526071}
.crm-carrier .crm-carrier-choice {display:flex;align-items:center;gap:8px;margin:8px 0}
.crm-carrier .crm-carrier-origin {display:flex;flex-direction:row;align-items:end;gap:8px;flex-wrap:wrap}
.crm-carrier-origin label {margin:0;max-width:280px}
.crm-carrier [role=status] {margin:6px 0 0}
.crm-carrier [role=status]:empty {display:none}
@media(max-width:650px){.crm-toolbar input{width:100%}.crm-settings .crm-drawer-body{padding:12px}}

/* КиЗ scanning uses the warehouse shell and the standard panel and buttons. */
.kiz-copy-page .page-heading {margin-bottom:16px}
.kiz-copy-page .page-heading h1 {margin-top:0}
.kiz-copy-station {padding:20px;color:#0b0f19;border-color:#e5e7f0}
.kiz-copy-controls {display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:end;gap:12px}
.kiz-copy-controls>label,.kiz-copy-mode {display:grid;min-width:0;gap:6px;margin:0;font-weight:600}
.kiz-copy-controls input {width:100%;min-width:0;min-height:44px;margin:0;font:15px ui-monospace,Consolas,monospace}
.kiz-copy-controls input:focus {outline:2px solid #86b59a;outline-offset:1px}
.kiz-copy-controls>button,.kiz-copy-switch button {min-height:44px}
.kiz-copy-switch {display:flex;gap:4px;padding:2px;border:1px solid #e5e7f0;border-radius:10px;background:#f8fafc}
.kiz-copy-switch button {flex:1;white-space:nowrap;border:0;border-radius:7px;background:transparent;color:#526071}
.kiz-copy-switch button[aria-pressed=true] {background:#dcfce7;color:#086b2a;font-weight:650}
.kiz-copy-feedback {display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px}
.kiz-copy-feedback p {margin:0;line-height:1.5}
.kiz-copy-feedback [data-tone=ready] {color:#086b2a}
.kiz-copy-feedback [data-tone=error] {color:#9f2626}
.kiz-copy-frame {position:fixed;width:1px;height:1px;border:0;opacity:0;pointer-events:none}
@media(max-width:720px){
  .kiz-copy-station {padding:14px}
  .kiz-copy-controls {grid-template-columns:minmax(0,1fr) auto}
  .kiz-copy-mode {grid-column:1/-1}
  .kiz-copy-switch button {white-space:normal}
}
