@charset "utf-8";

:root {
  --bg: #f0f2fa;
  --sidebar: #051a61;
  --sidebar-hi: rgba(255, 255, 255, 0.12);
  --card: #ffffff;
  --text: #1a1f2e;
  --muted: #737a8c;
  --blue: #0058e6;
  --navy: #051a61;
  --line: rgba(0, 0, 0, 0.07);
  --success: #21a361;
  --danger: #c72929;
  --warn: #d1780a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}

#app { height: 100%; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button { cursor: pointer; }

.login {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  padding: 32px;
}

.login-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 460px;
}

.brand-mark {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  object-fit: cover;
  display: block;
}

.login h1 {
  margin: 0;
  color: #fff;
  font-size: 34px;
  font-weight: 700;
}

.login-lead {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  text-align: center;
  max-width: 420px;
}

.login-card {
  width: 420px;
  max-width: 100%;
  background: var(--card);
  border-radius: 18px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-label {
  font-size: 12px;
  color: var(--muted);
}

input[type="email"],
input[type="password"],
input[type="text"],
select {
  width: 100%;
  height: 36px;
  border: 1px solid #d8dde8;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
}

input:focus, select:focus {
  outline: 2px solid rgba(0, 88, 230, 0.25);
  border-color: var(--blue);
}

.hint {
  font-size: 11px;
  color: var(--muted);
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  width: 100%;
  height: 40px;
  font-size: 15px;
}

.btn-primary:disabled { opacity: 0.55; cursor: default; }

.shell {
  display: flex;
  height: 100%;
  min-height: 100%;
}

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: var(--sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
  z-index: 3;
}

.side-toggle {
  position: absolute;
  top: 20px;
  right: -12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  padding: 0;
  display: grid;
  place-items: center;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(5, 26, 97, 0.14);
}

.side-toggle-ico {
  width: 12px;
  height: 12px;
  display: block;
}

.sidebar:not(.collapsed) .side-toggle {
  transform: rotate(180deg);
}

.sidebar.collapsed {
  width: 64px;
  flex-basis: 64px;
}

.sidebar.collapsed .side-title,
.sidebar.collapsed .side-store,
.sidebar.collapsed .side-group,
.sidebar.collapsed .name,
.sidebar.collapsed .sub,
.sidebar.collapsed .who,
.sidebar.collapsed .role {
  display: none;
}

.sidebar.collapsed .side-brand {
  padding: 16px 12px 8px;
}

.sidebar.collapsed .side-brand-row {
  justify-content: center;
}

.sidebar.collapsed .side-btn {
  justify-content: center;
  padding: 10px 0;
  width: calc(100% - 16px);
  margin: 0 8px 4px;
}

.sidebar.collapsed .side-user {
  margin: 8px;
  padding: 8px;
}

.sidebar.collapsed .logout {
  text-align: center;
  padding: 4px 0;
  font-size: 11px;
}

.nav-toggle {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  padding: 0;
  display: grid;
  place-items: center;
}

.nav-toggle:hover { border-color: #c9d4ee; }

.side-brand {
  padding: 22px 18px 12px;
}

.side-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.side-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.side-title { font-size: 18px; font-weight: 700; }

.side-store {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.side-nav {
  flex: 1;
  overflow: auto;
  padding-bottom: 8px;
}

.side-group {
  padding: 10px 18px 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.4);
}

.side-btn {
  margin: 0 10px 4px;
  border: 0;
  background: transparent;
  color: #fff;
  width: calc(100% - 20px);
  text-align: left;
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.side-btn.prominent { padding: 12px; }

.side-btn.on { background: var(--blue); }

.side-ico, .ico {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: block;
}
.side-btn.prominent .side-ico { width: 22px; height: 22px; flex-basis: 22px; }

.side-btn .name { font-size: 13px; font-weight: 600; }
.side-btn.prominent .name { font-size: 15px; }
.side-btn .sub { font-size: 11px; opacity: 0.7; margin-top: 1px; }

.side-user {
  margin: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--sidebar-hi);
}

.side-user .who { font-size: 13px; font-weight: 600; }
.side-user .role { font-size: 11px; color: rgba(255, 255, 255, 0.5); margin: 4px 0 6px; }

.logout {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 0;
  text-align: left;
  width: 100%;
}

.main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chip-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 88, 230, 0.1);
  color: var(--blue);
  display: grid;
  place-items: center;
}
.chip-svg, .chip-mini { width: 15px; height: 15px; display: block; }

.chip-cap {
  font-size: 9px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.4px;
}

.chip-val { font-size: 15px; font-weight: 600; }

.header select {
  height: 28px;
  max-width: 220px;
  border: 0;
  background: transparent;
  font-weight: 600;
  padding: 0;
}

.grow { flex: 1; }

.badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge .dot { width: 8px; height: 8px; border-radius: 50%; }
.badge.ok { color: var(--success); background: rgba(33, 163, 97, 0.1); }
.badge.ok .dot { background: var(--success); }
.badge.sync { color: var(--blue); background: rgba(0, 88, 230, 0.1); }
.badge.sync .dot { background: var(--blue); }
.badge.warn { color: var(--warn); background: rgba(209, 120, 10, 0.12); }
.badge.warn .dot { background: var(--warn); }

.addr {
  font-size: 12px;
  color: var(--muted);
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page {
  flex: 1;
  overflow: auto;
  padding: 24px;
}

.page h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 650;
}

.page-sub {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  max-width: 720px;
}

.gate {
  position: fixed;
  inset: 0;
  background: rgba(5, 26, 97, 0.45);
  display: grid;
  place-items: center;
  z-index: 20;
}

.gate-box {
  background: #fff;
  border-radius: 16px;
  padding: 22px 28px;
  min-width: 260px;
  text-align: center;
  font-weight: 600;
}

.toast-wrap {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 240px;
  max-width: 360px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.12);
  border: 1px solid var(--line);
}

.toast b { display: block; font-size: 13px; font-weight: 600; }
.toast-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex: 0 0 8px;
  background: var(--blue);
}
.toast.ok { border-color: rgba(33, 163, 97, 0.25); }
.toast.ok .toast-dot { background: var(--success); }
.toast.danger { border-color: rgba(199, 41, 41, 0.25); }
.toast.danger .toast-dot { background: var(--danger); }
.toast.warn .toast-dot { background: var(--warn); }

.page.wide { padding: 0; display: flex; flex-direction: column; min-height: 0; }
.work { display: flex; flex: 1; min-height: 0; }
.page.wide .work { flex: 1; min-height: 0; }
button.row { width: 100%; text-align: left; color: inherit; }
.row.on { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(0,88,230,.12); }
.rail {
  width: 268px;
  flex: 0 0 268px;
  background: #fff;
  border-right: 1px solid var(--line);
  overflow: auto;
  padding: 16px 0 12px;
}
.rail h3, .page-bar h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
}
.rail-cap {
  padding: 0 14px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.rail-note {
  padding: 0 14px 10px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}
.rail-item {
  margin: 0 6px 2px;
  border: 0;
  background: transparent;
  width: calc(100% - 12px);
  display: flex;
  justify-content: space-between;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
}
.rail-item.on { background: rgba(0, 88, 230, 0.1); color: var(--blue); font-weight: 600; }
.rail-item span { color: var(--muted); font-weight: 400; }

.tree-row {
  display: flex;
  align-items: center;
  margin: 0 6px 1px;
  min-height: 30px;
}

.tree-guides {
  display: flex;
  height: 30px;
  flex: 0 0 auto;
}

.tree-step {
  width: 18px;
  height: 30px;
  position: relative;
  flex: 0 0 18px;
}

.tree-v {
  position: absolute;
  left: 9px;
  top: 0;
  width: 1px;
  background: rgba(115, 122, 140, 0.42);
}

.tree-v.full { height: 30px; }
.tree-v.half { height: 15px; }

.tree-h {
  position: absolute;
  left: 9px;
  top: 15px;
  width: 9px;
  height: 1px;
  background: rgba(115, 122, 140, 0.42);
}

.tree-fold,
.tree-fold-gap {
  width: 16px;
  height: 22px;
  flex: 0 0 16px;
  border: 0;
  background: transparent;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.tree-chevron { width: 10px; height: 10px; display: block; }

.tree-hit {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 8px 0 4px;
  border-radius: 8px;
  color: inherit;
  text-align: left;
}

.tree-row.on .tree-hit { background: rgba(0, 88, 230, 0.1); }
.tree-row.on .tree-name { color: var(--blue); font-weight: 600; }

.tree-folder {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: var(--blue);
}

.tree-name {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  border-radius: 999px;
  padding: 1px 5px;
  flex: 0 0 auto;
}

.tree-badge.loud {
  color: var(--blue);
  background: rgba(0, 88, 230, 0.12);
  padding: 1px 6px;
}

.tree-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  flex: 0 0 auto;
}

.cats-work {
  padding: 0 20px 20px;
  gap: 16px;
  align-items: stretch;
}

.cats-tree {
  width: 380px;
  flex: 0 0 380px;
  border-right: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 0;
}

.cats-inspector {
  width: 360px;
  max-width: 100%;
  align-self: flex-start;
}

.cats-inspector h3 { margin: 4px 0 8px; }
.cats-hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.cats-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.page-bar {
  padding: 16px 20px 12px;
  background: var(--bg);
}
.page-bar p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.page-bar .page-hero { margin-bottom: 0; }
.tools { display: flex; gap: 8px; align-items: center; padding: 0 20px 12px; flex-wrap: wrap; }
.tools input[type="search"], .tools input[type="text"] { max-width: 280px; }
.check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
}
.grid-head, .row {
  display: grid;
  grid-template-columns: 1fr 90px 110px 110px;
  gap: 8px;
  padding: 7px 10px;
  font-size: 13px;
}
.grid-head {
  margin: 0 20px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  background: #f5f7fc;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  text-transform: none;
}
.list { overflow: auto; padding: 0 20px 20px; }
.row {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0;
  margin: 0;
  cursor: pointer;
  align-items: center;
  min-height: 34px;
  line-height: 1.25;
}
.row > div { overflow: hidden; text-overflow: ellipsis; }
.row:hover { background: #f4f7ff; }
.row:last-child { border-radius: 0 0 8px 8px; }
.row.on { background: rgba(0, 88, 230, 0.08); }
.row .muted { color: var(--muted); font-size: 11px; }
.name-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row-photo { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.client-pick.need { border-color: #e6a23c; background: #fff8eb; }
.page > .grid-head,
.cab-body > .grid-head,
.sheet-box > .grid-head { margin-left: 0; margin-right: 0; }
.page > .list,
.cab-body > .list,
.sheet-box > .list { padding-left: 0; padding-right: 0; }
.empty {
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #fff;
  padding: 18px 12px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.tbl-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.preview-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 14px;
}
.preview-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.preview-head b { font-size: 15px; }
.preview-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 4px 0;
  cursor: pointer;
}
.preview-line:hover { color: var(--blue); }
.row.filler { background: #fafbfe; cursor: default; min-height: 30px; }
.row.filler:hover { background: #fafbfe; }
.doc-hero {
  background: rgba(0, 88, 230, 0.06);
  border: 1px solid rgba(0, 88, 230, 0.18);
  border-radius: 14px;
  padding: 16px;
  flex: 1;
}
.doc-badge-cap { font-size: 11px; font-weight: 700; color: var(--blue); letter-spacing: 0.4px; }
.doc-num { display: block; font-size: 26px; font-weight: 700; margin: 2px 0 4px; }
.doc-acts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 190px; }
.doc-acts .ghost { justify-content: center; }
.danger-btn { color: var(--danger); }
.trade-line { color: var(--blue); font-size: 13px; font-weight: 600; margin-top: 12px; }
.staff-card { max-width: 640px; margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.staff-card h3 { margin: 0 0 4px; font-size: 20px; }
.row-field { display: flex; align-items: center; gap: 10px; }
.row-field > span { font-size: 13px; min-width: 128px; color: var(--text); }
.rights-box {
  background: var(--bg);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rights-box .muted { font-size: 12px; margin: 0 0 4px; }
.req-wrap { display: flex; gap: 0; align-items: stretch; min-height: 520px; margin: -4px -24px 0; }
.req-wrap .rail { width: 220px; flex: 0 0 220px; }
.req-main { flex: 1; min-width: 0; padding: 16px; background: var(--bg); }
.req-main h3 { margin: 0 0 3px; font-size: 20px; }
.req-side {
  width: 360px;
  flex: 0 0 360px;
  background: #fff;
  border-left: 1px solid var(--line);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.req-side h3 { margin: 0; font-size: 16px; }
.req-line { background: var(--bg); border-radius: 10px; padding: 10px; }
.req-line-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.req-await-head { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.cab-chip.warn { background: rgba(209, 120, 10, 0.12); color: var(--warn); border-color: transparent; }
.await-card {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid rgba(209, 120, 10, 0.25);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.wait-chip {
  font-size: 10px;
  font-weight: 700;
  color: var(--warn);
  background: rgba(209, 120, 10, 0.12);
  border-radius: 999px;
  padding: 2px 6px;
}
.jr-item { display: block; }
.jr-item .row { width: 100%; }
.jr-caret { color: var(--muted); font-size: 13px; }
.jr-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 0;
  font-size: 13px;
}
.jr-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.jr-body {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 0;
  padding: 12px;
}
.jr-facts { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 8px; }
.jr-fact b { display: block; font-size: 14px; }
.pay-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 88, 230, 0.1);
  color: var(--blue);
}
.edit-cell { display: flex; align-items: center; gap: 6px; }
.edit-cell .cost-input { width: 100px; }
.row .chip-cap { display: block; font-size: 9px; }
.await-ok {
  background: rgba(33, 163, 97, 0.06);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
}
.right { text-align: right; }
.receipt {
  width: 360px;
  flex: 0 0 360px;
  background: #fff;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.receipt h3 { margin: 0; padding: 14px 16px 8px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.cart { flex: 1 1 auto; min-height: 120px; overflow: auto; padding: 0 12px 8px; }
.cart-line {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 8px;
}
.cart-line b { display: block; font-size: 13px; }
.cart-meta { color: var(--muted); font-size: 11px; margin: 3px 0; }
.pay-box { padding: 12px 14px 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; flex: 0 1 auto; max-height: 58%; overflow: auto; }
.pay-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.pay-row.total { font-size: 20px; font-weight: 700; }
.pays { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pays button {
  border: 1px solid var(--line);
  background: var(--bg, #f4f6fb);
  border-radius: 8px;
  padding: 0 8px;
  min-height: 30px;
  font-size: 12px;
}
.pays button.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.client-row { display: flex; align-items: stretch; gap: 6px; }
.client-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; }
.client-copy b { font-size: 13px; font-weight: 600; line-height: 1.2; }
.client-pick .client-copy { flex: 1; }
.icon-btn { width: 36px; padding: 0; flex: 0 0 36px; }
.trade-box { display: flex; flex-direction: column; gap: 8px; padding: 8px 10px; background: #f6f8fc; border: 1px solid var(--line); border-radius: 10px; }
.pay-foot { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; margin-top: 2px; border-top: 1px solid var(--line); }
.client-pick.on-soft { border-color: #c9d4ee; background: #f3f7ff; }
.ghost {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 7px 10px;
}
.menu { position: relative; }
.menu-list {
  position: absolute;
  right: 0;
  top: 36px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 200px;
  box-shadow: 0 10px 24px rgba(16,24,40,.12);
  z-index: 8;
  overflow: hidden;
}
.menu-list button {
  display: block;
  width: 100%;
  border: 0;
  background: #fff;
  text-align: left;
  padding: 10px 12px;
}
.menu-list button:hover { background: var(--bg); }
.empty { padding: 40px 24px; color: var(--muted); }
.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 26, 97, 0.4);
  display: grid;
  place-items: center;
  z-index: 25;
}
.modal-box {
  background: #fff;
  border-radius: 16px;
  width: 520px;
  max-width: calc(100% - 32px);
  max-height: 80vh;
  overflow: auto;
  padding: 20px;
}
.serial {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  margin: 6px 0;
}
.clients-grid { grid-template-columns: 1.4fr 140px 90px 1fr 1.2fr; }
.suppliers-grid { grid-template-columns: 1.3fr 130px 120px 1fr 120px; }
.in-grid { grid-template-columns: 120px 150px 170px 90px 1fr 100px 1.2fr; }
.out-grid { grid-template-columns: 120px 150px 220px 1.3fr 70px 110px 110px; }
.imei-grid { grid-template-columns: 1.3fr 1.2fr 1fr 1fr 110px 110px; }
.st-posted, .st-completed { color: var(--success); }
.st-awaiting { color: var(--warn); font-weight: 600; }
.await-banner {
  display: inline-flex;
  margin: 0 0 12px;
  border: 0;
  border-radius: 10px;
  background: var(--warn);
  color: #fff;
  font: 600 13px/1.2 inherit;
  padding: 8px 12px;
  cursor: pointer;
}
.hist-grid { grid-template-columns: 150px 110px 1fr 100px 90px; margin: 8px 0 0; }
.hist-grid-sup { grid-template-columns: 140px 1fr 130px 110px; margin: 8px 0 0; }
.sales-grid { grid-template-columns: 140px 1fr 120px 110px 90px; }
.wh-head {
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.wh-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wh-title-row h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}
.wh-store-pill {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg);
  border-radius: 999px;
  padding: 4px 10px;
}
.wh-tabs { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-end; }
.wh-cap {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.wh-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.wh-pill {
  border: 0;
  background: var(--bg);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.wh-pill.on {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}
.wh-pill-ico { width: 12px; height: 12px; display: block; flex: 0 0 12px; }
.wh-split {
  width: 1px;
  height: 28px;
  background: var(--line);
  border-radius: 1px;
  align-self: flex-end;
  margin-bottom: 2px;
}

.smart-find {
  position: relative;
  flex: 1 1 320px;
  max-width: 460px;
  min-width: 220px;
}
.smart-find-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.smart-find.open .smart-find-bar,
.smart-find-bar:focus-within {
  background: #fff;
  border-color: rgba(0, 88, 230, 0.35);
  box-shadow: 0 0 0 4px rgba(0, 88, 230, 0.12);
}
.smart-find-ico {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex: 0 0 16px;
}
.smart-find-bar input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 13px;
}
.smart-find-bar input:focus { outline: none; box-shadow: none; border: 0; }
.smart-find-clear {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  font-size: 12px;
}
.smart-find-clear:hover { background: rgba(0,0,0,.06); color: var(--text); }
.smart-hits {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.14);
  max-height: min(420px, 70vh);
  overflow: auto;
  padding: 6px;
}
.smart-hits.hint,
.smart-hits.empty {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.smart-hit-cap {
  padding: 8px 10px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--muted);
}
.smart-hit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 8px 10px;
  text-align: left;
}
.smart-hit:hover,
.smart-hit:focus { background: rgba(0, 88, 230, 0.08); }
.smart-hit b {
  font-size: 13px;
  font-weight: 650;
}
.smart-hit span {
  font-size: 12px;
  color: var(--muted);
}
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: left; }
.stat b { display: block; font-size: 20px; margin-top: 4px; }
.stat.on { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(0,88,230,.15); }
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 920px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-align: left; }
.tile b { display: block; font-size: 16px; margin-bottom: 6px; }
.tile span { color: var(--muted); font-size: 13px; }
.ghost.on { background: var(--blue); color: #fff; border-color: var(--blue); }
@media (max-width: 1100px) { .tiles { grid-template-columns: 1fr 1fr; } .work-grid { grid-template-columns: 1fr; } .today-strip { grid-template-columns: 1fr 1fr; } }

.home-page { padding: 0; }
.home-wrap { display: flex; min-height: 100%; align-items: stretch; }
.home-col {
  flex: 1;
  min-width: 0;
  max-width: 920px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.home-hello { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.home-title { margin: 0 0 6px; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.home-lead { margin: 0; font-size: 14px; color: var(--muted); max-width: 560px; }
.home-pill {
  border: 0;
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
}
.home-pill.warn-solid { background: var(--warn); color: #fff; padding: 7px 12px; }
.home-pill.warn-soft { background: rgba(209, 120, 10, 0.12); color: var(--warn); }
.calc-btn {
  border: 1px solid var(--line);
  background: #eef0f5;
  border-radius: 8px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  flex: 0 0 auto;
}
.today-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.today-cell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.today-cell b { display: block; font-size: 20px; font-weight: 700; margin: 4px 0 8px; }
.today-cell .bar { display: block; width: 28px; height: 3px; border-radius: 2px; }
.bar-blue { background: var(--blue); }
.bar-navy { background: var(--navy); }
.bar-green { background: var(--success); }
.bar-warn { background: var(--warn); }
.home-block { display: flex; flex-direction: column; gap: 10px; }
.home-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.work-tile {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  min-height: 96px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
}
.work-tile:hover { border-color: #c9d4ee; }
.work-ico {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  color: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 48px;
}
.work-svg { width: 22px; height: 22px; stroke-width: 1.8; }
.work-copy { flex: 1; min-width: 0; }
.work-copy b { display: block; font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.work-copy span { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }
.work-chevron { width: 12px; height: 12px; color: var(--muted); margin-top: 6px; flex: 0 0 12px; }
.extra-row { display: flex; flex-wrap: wrap; gap: 10px; }
.extra-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.extra-chip:hover { border-color: #c9d4ee; }
.pins-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pins-hint { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.pins-empty { margin: 0; font-size: 13px; color: var(--muted); }
.pin-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pin-form-row { display: flex; gap: 8px; }
.seg { display: flex; background: #eef0f5; border-radius: 8px; padding: 2px; width: fit-content; }
.seg button { border: 0; background: transparent; border-radius: 6px; padding: 6px 12px; font-size: 13px; }
.seg button.on { background: #fff; font-weight: 600; }
.pins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pin-card {
  text-align: left;
  min-height: 110px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pin-top { display: flex; align-items: center; gap: 8px; color: var(--blue); }
.pin-top b { color: var(--text); font-size: 15px; }
.pin-card span { font-size: 12px; color: var(--muted); }
.pin-go { font-size: 12px; font-weight: 600; color: var(--blue); }
.desk-calc {
  width: 300px;
  flex: 0 0 300px;
  padding: 12px 16px;
  border-left: 1px solid var(--line);
  background: #fff;
}
.calc-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.calc-title { font-size: 16px; font-weight: 600; }
.calc-acts { display: flex; gap: 6px; }
.calc-display {
  font-size: 42px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-height: 72px;
  line-height: 72px;
  padding: 0 8px;
}
.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0 12px; }
.calc-key {
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 600;
}
.calc-key.num { background: var(--bg); color: var(--text); }
.calc-key.fn { background: var(--muted); color: #fff; }
.calc-key.op { background: var(--navy); color: #fff; }
.calc-key.eq { background: var(--blue); color: #fff; }
.calc-key.wide { grid-column: span 2; }
textarea { width: 100%; border: 1px solid #d8dde8; border-radius: 8px; padding: 8px 10px; font: inherit; resize: vertical; }

.page-hero { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.page-ico { width: 28px; height: 28px; color: var(--blue); flex: 0 0 28px; margin-top: 2px; }
.field-label { display: block; margin: 10px 0 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rights { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.card .pay-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.card .pay-row.total { border: 0; font-size: 18px; font-weight: 700; padding-top: 12px; }

.cab-page { padding: 20px 24px 32px; }
.cab-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 18px; }
.cab-head h2 { margin: 0 0 4px; font-size: 26px; }
.cab-head p { margin: 0; color: var(--muted); font-size: 13px; }
.cab-tabs { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.cab-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.cab-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.cab-chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.cab-chip .chip-mini { color: inherit; }
.cab-body { display: flex; flex-direction: column; gap: 14px; max-width: 1100px; }
.cab-month { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.cab-month h3 { margin: 0 0 4px; font-size: 20px; }
.cab-month p { margin: 0; color: var(--muted); font-size: 12px; }
.cab-month input { height: 34px; border: 1px solid #d8dde8; border-radius: 8px; padding: 0 10px; }
.hero-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
}
.hero-top { display: flex; align-items: center; gap: 8px; }
.hero-val { display: block; font-size: 32px; font-weight: 700; letter-spacing: -0.03em; margin: 8px 0 4px; }
.delta { font-size: 12px; font-weight: 600; }
.delta.up { color: var(--success); }
.delta.down { color: var(--danger); }
.mini-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.mini-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.mini-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0, 88, 230, 0.1);
  display: grid;
  place-items: center;
  flex: 0 0 36px;
}
.mini-ico .ico { width: 18px; height: 18px; }
.cab-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}
.cab-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.cab-card-head h3 { margin: 0 0 4px; font-size: 16px; }
.cab-card-head p { margin: 0; font-size: 12px; color: var(--muted); max-width: 620px; }
.cab-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan-row {
  margin-top: 10px;
  padding: 12px;
  background: var(--bg);
  border-radius: 12px;
}
.plan-name { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.plan-meter { margin-top: 8px; }
.plan-meter-top { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.plan-meter-top span:first-child { color: var(--muted); font-weight: 600; }
.plan-meter-top b { margin-left: auto; }
.plan-pct { width: 40px; text-align: right; font-weight: 700; }
.meter {
  height: 7px;
  background: #fff;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 5px;
}
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--blue); }
.meter.green i { background: var(--success); }
.store-line, .top-line { margin-top: 12px; }
.top-line { display: flex; gap: 10px; align-items: flex-start; }
.top-n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  flex: 0 0 22px;
}
.company-card { display: flex; gap: 20px; max-width: 860px; }
.logo-col { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 160px; flex: 0 0 160px; }
.logo-box {
  width: 160px;
  height: 160px;
  border-radius: 14px;
  background: var(--bg);
  color: var(--muted);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
}
.logo-box img { width: 100%; height: 100%; object-fit: cover; }
.company-fields { flex: 1; min-width: 0; }
@media (max-width: 1100px) {
  .hero-row, .cab-split { grid-template-columns: 1fr; }
  .company-card { flex-direction: column; }
  .cab-head { flex-direction: column; }
  .cab-tabs { align-items: flex-start; }
}

.sheet-wrap { max-height: 90vh; }
.sheet-box {
  background: #fff;
  border-radius: 18px;
  width: 980px;
  max-width: calc(100vw - 32px);
  max-height: 90vh;
  overflow: auto;
  padding: 20px 22px 16px;
}
.sheet-box.card-wide { width: 980px; }
.sheet-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.sheet-head h3 { margin: 0 0 4px; font-size: 22px; }
.sheet-foot { display: flex; align-items: center; gap: 8px; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.card-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; }
.doc-banner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.doc-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0,88,230,.1);
  color: var(--blue);
}
.doc-badge.in { background: rgba(33,163,97,.12); color: var(--success); }
.doc-badge.sale { background: rgba(0,88,230,.1); color: var(--blue); }
.doc-badge.writeoff { background: rgba(199,41,41,.1); color: var(--danger); }
@media (max-width: 1100px) { .card-grid { grid-template-columns: 1fr; } }

.card-block {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}
.card-block .muted { font-size: 12px; margin: 4px 0; display: block; }
.block-cap { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.block-sub { font-size: 13px; font-weight: 600; margin: 14px 0 4px; }
.ident-row { display: flex; gap: 16px; align-items: flex-start; }
.photo-col { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 120px; flex: 0 0 120px; }
.photo-box {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  background: var(--bg);
  color: #b7c0d6;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-empty { width: 54px; height: 54px; }
.photo-pick { display: inline-block; text-align: center; }
.ident-fields { flex: 1; min-width: 0; }
.seg-wide { width: 100%; }
.seg-wide button { flex: 1; text-align: center; }
.seg.off button { opacity: .55; }
.hist-line { font-size: 13px; font-weight: 600; margin: 8px 0 6px; }
.serial-tools { display: flex; align-items: center; gap: 8px; margin: 8px 0 6px; }
.serial-tools input { max-width: 240px; height: 28px; }
.serial-tools select { max-width: 200px; height: 28px; }
.serial-grid { grid-template-columns: 1.15fr 84px 96px 78px 96px 70px 58px; margin: 0; font-size: 12px; }
.serial-list { padding: 0; max-height: 280px; }
.serial-list .row {
  cursor: default;
  min-height: 28px;
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.2;
}
.serial-list .grid-head,
.serial-grid.grid-head { padding: 5px 8px; font-size: 10px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.st-in_stock { color: var(--success); font-weight: 600; }
.st-sold { color: var(--muted); }
.st-written_off { color: var(--danger); }
.st-partner { color: var(--blue); font-weight: 600; }
.link { color: var(--blue); cursor: pointer; font-size: 13px; }
.link.danger { color: var(--danger); font-size: 12px; }
.doc-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  text-align: left;
}
.doc-link.danger { color: var(--danger); font-family: inherit; font-size: 11px; }
.doc-link:hover { text-decoration: underline; }
.cost-input { height: 22px; padding: 0 5px; text-align: right; font-size: 12px; width: 68px; }
.stock-line { display: flex; align-items: baseline; gap: 10px; margin: 8px 0; }
.stock-line b { font-size: 28px; font-weight: 700; }
.stock-line b.ok { color: var(--success); }
.stock-line b.dim { color: var(--muted); }
.doc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 7px 6px;
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
}
.doc-row:hover { background: var(--bg); }
.doc-row b { color: var(--blue); }
.sheet-box .field-label { margin-top: 10px; }

.rep-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--text);
}
.rep-item:hover { border-color: #c9d4ee; }
.rep-item .chip-mini { color: var(--blue); width: 18px; height: 18px; }
.rep-grid { align-items: center; }
.cart-ctl { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; }
.cart-ctl .cost-input { width: 78px; }
.qty {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1;
}
.mix-box { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; padding: 4px 0; }
.field-row .cost-input { width: 110px; }
.client-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #f6f8fc;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text);
  min-height: 44px;
}
.client-pick:hover { border-color: #c9d4ee; }
.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  padding: 0 4px 8px;
}
.crumbs .on { color: #fff; font-weight: 600; }
.crumbs .sep { opacity: .5; }
.crumbs .ghost { margin-left: auto; background: rgba(255,255,255,.14); color: #fff; border-color: transparent; }
.serial-grid.on { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(0,88,230,.15); }
.serial-list .row .link { cursor: pointer; }
.header input[type="search"] { height: 30px; }
.smart-find-bar input[type="search"] { height: 36px; width: auto; border: 0; }

.recv { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.recv-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.recv-bar b { font-size: 16px; font-weight: 600; white-space: nowrap; }
.recv-bar select { max-width: 220px; }
.recv-bar input { flex: 1; }
.recv-stage { background: var(--bg); }
.recv-catbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.recv-catbar b { font-size: 16px; font-weight: 600; white-space: nowrap; }
.recv-catbar input[type="text"], .recv-catbar input.mono { max-width: 240px; }
.recv-catbar input[type="search"] { max-width: 200px; }
.recv-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 16px;
}
.recv-folder {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 110px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  text-align: left;
}
.recv-folder:hover { border-color: #c9d4ee; }
.recv-folder b { font-size: 15px; }
.recv-folder span { font-size: 12px; color: var(--muted); }
.recv-folder-ico { width: 22px; height: 22px; color: var(--blue); }
.recv-head, .recv-item {
  display: grid;
  grid-template-columns: 48px 1fr 80px 100px 90px;
  gap: 8px;
  align-items: center;
}
.recv-head {
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.recv-list { padding: 0 12px 12px; overflow: auto; }
.recv-item {
  grid-template-columns: 48px 1fr 80px 100px 90px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 6px;
  color: var(--text);
}
.recv-item:hover { border-color: #c9d4ee; }
.recv-item i { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 2px; }
.recv-side { width: 360px; flex: 0 0 360px; }
.recv-hint { margin: 0 16px 10px; font-size: 12px; color: var(--muted); line-height: 1.4; }
.recv-line {
  background: var(--bg);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
}
.recv-imei { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.recv-imei input.mono { flex: 1; }
.recv-imei input[placeholder="Закуп"], .recv-imei input[placeholder="Закуп за штуку"] { width: 88px; }
.recv-x { border: 0; min-width: 28px; }
.recv-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.recv-foot b { display: block; font-size: 24px; font-weight: 700; }

.notice-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(5, 26, 97, 0.28);
  display: grid;
  place-items: center;
}
.notice-box {
  width: 420px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 16px;
  padding: 22px 22px 16px;
  box-shadow: 0 22px 50px rgba(16, 24, 40, 0.22);
}
.notice-box h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 650;
}
.notice-box p {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.notice-box input {
  width: 100%;
  margin-bottom: 14px;
}
.notice-acts {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.notice-acts.stack {
  flex-direction: column;
  align-items: stretch;
}
.notice-acts.stack .btn,
.notice-acts.stack .ghost {
  width: 100%;
  justify-content: center;
}
.danger-solid { background: var(--danger) !important; border-color: var(--danger) !important; }
.ok-text { color: var(--success); font-weight: 600; margin: 0 0 10px; }
.danger-text { color: var(--danger); font-size: 13px; }
.debt-box { margin: 14px 0 10px; }
.debt-box b { display: block; font-size: 26px; font-weight: 700; margin-top: 2px; }
.merge-box {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 88, 230, 0.06);
}
.merge-box > b { display: block; margin-bottom: 4px; }
.merge-box p { margin: 0 0 4px; }
.merge-twin {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.merge-twin i { font-style: normal; }
.scan-bar { display: flex; gap: 8px; margin: 0 0 14px; }
.scan-bar input { flex: 1; }
.line-photo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--bg);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 48px;
  color: var(--muted);
}
.line-photo img { width: 100%; height: 100%; object-fit: cover; }
.unit-row { padding-left: 56px; }
.sheet-paper { background: var(--bg); }
.sheet-paper .card-block { background: #fff; }
.settings-page { display: flex; padding: 0; min-height: 0; }
.set-rail {
  width: 220px;
  flex: 0 0 220px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}
.set-mod {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 16px);
  margin: 2px 8px;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
}
.set-mod b { display: block; font-size: 13px; font-weight: 500; }
.set-mod i { display: block; font-size: 11px; font-style: normal; opacity: .7; }
.set-mod.on { background: var(--blue); color: #fff; }
.set-mod.on b { font-weight: 600; }
.set-ver { margin-top: auto; padding: 16px; }
.set-ver b { display: block; font-size: 13px; }
.set-ver span { font-size: 12px; font-weight: 600; color: var(--blue); }
.set-main { flex: 1; padding: 20px 24px; overflow: auto; }
.settings-page.docs-open { overflow: hidden; height: 100%; }
.settings-page.docs-open .set-rail { display: none; }
.settings-page.docs-open .set-main { padding: 0; overflow: hidden; display: flex; min-width: 0; min-height: 0; }
.docs-work {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: #e8ecf2;
}
.docs-dim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(16, 24, 40, .18);
  z-index: 3;
  cursor: pointer;
}
.docs-back { width: calc(100% - 24px); margin: 0 12px 8px; }
.docs-empty { padding: 24px; color: var(--muted); }
.docs-list {
  width: 240px;
  flex: 0 0 240px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.docs-hint { padding: 0 12px 10px; font-size: 11px; line-height: 1.35; }
.docs-rows { flex: 1; overflow: auto; }
.docs-row {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
  background: transparent;
  padding: 9px 12px;
  color: var(--text);
}
.docs-row b { display: block; font-size: 13px; font-weight: 500; }
.docs-row i { display: block; font-size: 11px; font-style: normal; color: var(--muted); }
.docs-row.on { background: rgba(0,0,0,.05); }
.docs-row.on b { font-weight: 600; }
.docs-list-acts { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.docs-list-acts .btn, .docs-list-acts .ghost { width: 100%; }
.docs-editor {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 10px 0;
}
.docs-toolbar-top { display: flex; align-items: center; gap: 6px; }
.docs-toolbar-top input {
  flex: 1;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 15px;
  font-weight: 600;
}
.docs-trash { width: 32px; min-width: 32px; height: 32px; padding: 0; }
.docs-flags {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 2px 0 4px;
  font-size: 12px;
}
.docs-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 6px 0;
}
.docs-bar button, .docs-bar select {
  height: 28px;
  border: 1px solid #d5dae3;
  background: #fff;
  border-radius: 6px;
  padding: 0 8px;
  cursor: pointer;
}
.docs-bar button:hover { background: #f3f6fb; }
.docs-pop-wrap { position: relative; }
.docs-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 8;
  width: 220px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .14);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.docs-pop[hidden] { display: none; }
.docs-pop label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.docs-pop input[type="number"] {
  width: 64px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 6px;
}
.docs-pop input[type="range"] { width: 90px; }
.docs-zoom { display: inline-flex; gap: 4px; margin-left: 4px; }
.docs-sheet-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 4px 12px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.docs-sheet-frame {
  width: 794px;
  height: 1123px;
  position: relative;
}
.docs-sheet {
  width: 794px;
  position: absolute;
  top: 0;
  left: 0;
}
.docs-sheet-label {
  text-align: center;
  font-size: 11px;
  color: #6b7280;
  margin: 0 0 6px;
}
.docs-page {
  width: 794px;
  min-height: 1123px;
  background: #fff;
  padding: 40px 44px;
  box-sizing: border-box;
  box-shadow: 0 8px 28px rgba(16,24,40,.12);
  outline: none;
  color: #111;
  font: 13px/1.45 -apple-system, "Segoe UI", sans-serif;
  position: relative;
}
.docs-page .rs-doc { position: relative; min-height: 980px; }
.docs-chrome {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}
.docs-sel {
  position: absolute;
  border: 1.5px solid #0a57e6;
  box-sizing: border-box;
}
.docs-sel-move {
  position: absolute;
  left: 0;
  right: 0;
  top: -22px;
  height: 20px;
  pointer-events: auto;
  cursor: move;
  border: 0;
  border-radius: 4px 4px 0 0;
  background: #0a57e6;
  color: #fff;
  font-size: 11px;
  line-height: 20px;
}
.docs-sel-resize {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 12px;
  height: 12px;
  padding: 0;
  pointer-events: auto;
  cursor: nwse-resize;
  border: 2px solid #fff;
  border-radius: 2px;
  background: #0a57e6;
}
.rs-box { max-width: 100%; box-sizing: border-box; }
.rs-box-img { cursor: move; }
.rs-box-img img { width: 100%; height: auto; display: block; }
.rs-table { border-collapse: separate; border-spacing: 0; }
.docs-work.docs-wide .docs-list {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .16);
}
.docs-work.docs-wide.list-on .docs-list { display: flex; }
.docs-work.docs-wide .docs-editor { padding: 8px 12px 0; }
.docs-page .rs-field, #doc-editor .rs-field { color: #0a4fd6; font-weight: 600; }
.docs-page img, #doc-editor img { max-width: 100%; }
.docs-preview-hint { margin: 6px 0 0; }
.docs-fields {
  width: 228px;
  flex: 0 0 228px;
  background: #fff;
  border-left: 1px solid var(--line);
  padding: 12px;
  overflow: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.docs-field-acts {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.docs-field-acts .btn,
.docs-field-acts .ghost { flex: 1; }
.docs-props {
  background: #f6f8fb;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 12px;
}
.docs-props-title { font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.docs-props-empty { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.docs-prop { display: block; font-size: 12px; margin-bottom: 8px; }
.docs-prop b { float: right; font-weight: 600; }
.docs-prop input[type="range"] { width: 100%; margin-top: 4px; }
.docs-prop-row { display: flex; gap: 6px; margin-bottom: 8px; }
.docs-prop-row .ghost { flex: 1; }
.docs-prop-del { width: 100%; color: #c0392b; }
.docs-logo-btn { width: 100%; margin: 0 0 10px; }
.docs-group {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.docs-field {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 4px 0;
  font-size: 13px;
  color: var(--text);
}
.docs-field:hover { color: var(--blue); }
@media (max-width: 1100px) {
  .docs-work { overflow-x: auto; }
}
.set-group {
  max-width: 720px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}
.set-field { margin: 10px 0; }
.prefix-fixed { font-size: 14px; font-weight: 600; }
@media (max-width: 900px) {
  .settings-page { flex-direction: column; }
  .set-rail { width: 100%; flex: none; border-right: 0; border-bottom: 1px solid var(--line); }
}
