:root {
  --bg: #f5fbf8;
  --surface: #ffffff;
  --surface-soft: #f4fff9;
  --text: #173834;
  --muted: #607a73;
  --line: #d8ece4;
  --primary: #0b8f73;
  --primary-deep: #056b5f;
  --cyan: #0b8f73;
  --green: #17a66a;
  --amber: #d99216;
  --red: #d94b4b;
  --shadow: 0 18px 48px rgba(37, 75, 120, 0.12);
  --radius: 8px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--primary);
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.login-page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 492px);
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 56px 6vw;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(3, 117, 95, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(21, 196, 143, 0.12), transparent 38%),
    linear-gradient(125deg, #f7fff9 0%, #ffffff 42%, #e8fbf3 100%);
}

.login-page::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(105deg, transparent 0 22%, rgba(255, 255, 255, 0.72) 22% 23%, transparent 23% 58%, rgba(11, 127, 105, 0.08) 58% 59%, transparent 59%),
    repeating-linear-gradient(135deg, rgba(6, 128, 105, 0.045) 0 1px, transparent 1px 22px);
  content: "";
}

.login-panel {
  width: min(100%, 492px);
  justify-self: center;
  padding: 48px 50px;
  border: 1px solid rgba(137, 221, 190, 0.48);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 255, 251, 0.9));
  box-shadow: 0 24px 60px rgba(0, 103, 83, 0.18);
  backdrop-filter: blur(14px);
  z-index: 2;
}

.brand-lockup,
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-lockup > div:last-child {
  min-width: 0;
  flex: 1;
}

.brand-mark {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  color: white;
  font-size: 30px;
  font-weight: 800;
  border: 1px solid rgba(119, 224, 184, 0.42);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(5, 118, 100, 0.22);
  overflow: hidden;
}

.logo-gem {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cyc-logo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  line-height: 1;
  text-align: center;
}

.cyc-logo b {
  display: block;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 0;
}

.cyc-logo em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
}

.cyc-logo.rail {
  width: 42px;
  height: 42px;
}

.cyc-logo.rail b {
  font-size: 24px;
}

.cyc-logo.rail em {
  font-size: 8px;
}

.brand-logo-img,
.rail-logo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-mark.small {
  width: 38px;
  height: 38px;
  font-size: 20px;
}

.brand-lockup h1 {
  margin: 0;
  font-size: clamp(21px, 1.85vw, 25px);
  line-height: 1.2;
  color: #063a3d;
  white-space: nowrap;
}

.brand-lockup p,
.sidebar-brand span,
.eyebrow {
  margin: 4px 0 0;
  color: #55756d;
  font-size: 13px;
}

.login-tabs {
  display: flex;
  gap: 28px;
  margin-top: 52px;
  border-bottom: 1px solid rgba(148, 219, 194, 0.46);
}

.tab {
  position: relative;
  padding: 0 0 13px;
  border: 0;
  color: var(--text);
  background: transparent;
}

.tab.active {
  color: #05836d;
  font-weight: 700;
}

.tab.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #047866, #18c58b);
  content: "";
}

.login-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.field input,
.field select,
.field textarea,
.filters input,
.filters select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 13px;
  color: var(--text);
  background: var(--surface);
  outline: none;
}

.field textarea {
  min-height: 96px;
  padding-top: 10px;
  resize: vertical;
}

.required-field > span,
.switch-field > span {
  color: #303133;
}

.switch-field {
  justify-items: start;
}

.field input:focus,
.field textarea:focus,
.filters input:focus,
.filters select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 167, 125, 0.12);
}

.login-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 12px;
  font-size: 14px;
  text-align: center;
}

.login-links a:only-child {
  grid-column: 1 / -1;
}

.remember-line {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.remember-line input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.code-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 10px;
}

.code-field button {
  min-height: 42px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  background: var(--primary);
}

.code-field button:disabled {
  cursor: not-allowed;
  background: #9cb5dd;
}

.contact-form {
  gap: 16px;
}

.contact-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f4fff9;
  color: var(--muted);
  line-height: 1.6;
}

.contact-card strong {
  color: var(--text);
  font-size: 18px;
}

.primary,
.outline,
.text-button,
.icon-button {
  border: 0;
  border-radius: 5px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.primary {
  min-height: 42px;
  padding: 0 18px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #057866, #13bc83 52%, #07939f);
  box-shadow: 0 10px 22px rgba(5, 120, 102, 0.22);
}

.primary:hover,
.outline:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.login-submit {
  min-height: 48px;
  border-radius: 24px;
  font-size: 16px;
}

.outline {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
}

.text-button {
  color: var(--primary);
  background: transparent;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
}

.security-note {
  min-height: 38px;
  padding: 10px 14px;
  border-radius: 5px;
  color: #b27712;
  background: #fff5df;
  font-size: 13px;
}

.hero-visual {
  position: relative;
  z-index: 1;
}

.hero-visual img {
  display: block;
  width: min(100%, 760px);
  margin-left: auto;
  filter: drop-shadow(0 26px 45px rgba(16, 167, 125, 0.14));
}

.login-footer {
  position: absolute;
  right: 0;
  bottom: 26px;
  left: 0;
  text-align: center;
  color: #66877e;
  font-size: 13px;
}

.login-footer a {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.login-footer a:hover {
  color: #067b67;
}

.login-page .login-links a {
  color: #067b67;
}

.login-page .login-links a:hover {
  color: #034d43;
}

.login-page .field input,
.login-page .field select,
.login-page .field textarea {
  border-color: rgba(171, 221, 202, 0.76);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.login-page .field input:focus,
.login-page .field textarea:focus {
  border-color: #10a77d;
  box-shadow: 0 0 0 3px rgba(16, 167, 125, 0.14);
}

.login-page .remember-line input {
  accent-color: #0f9c78;
}

.login-page .primary {
  background: linear-gradient(135deg, #057866, #13bc83 52%, #07939f);
  box-shadow: 0 12px 26px rgba(5, 120, 102, 0.24);
}

.login-page .security-note {
  border-radius: 8px;
  color: #6d5a12;
  background: #fbf5db;
}

.login-page .contact-card {
  border-color: rgba(171, 221, 202, 0.76);
  border-radius: 10px;
  background: #f4fff9;
}

.app-shell {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 70px 210px minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  background: #f6f8f9;
}

.app-shell.hidden {
  display: none !important;
}

.icon-rail {
  position: relative;
  top: 0;
  left: 0;
  z-index: 3;
  height: 100vh;
  overflow: auto;
  background: #0e1337;
}

.rail-logo {
  display: grid;
  width: 70px;
  height: 76px;
  place-items: center;
  color: #fff;
  background: transparent;
  box-shadow: inset 0 -1px 0 rgba(199, 246, 226, 0.14);
}

.rail-logo-img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

.rail-logo .logo-gem {
  width: 31px;
  height: 31px;
}

.rail-nav {
  display: grid;
}

.rail-item {
  display: grid;
  width: 70px;
  min-height: 65px;
  place-items: center;
  gap: 4px;
  border: 0;
  color: #cfd0d7;
  background: transparent;
  font-size: 12px;
}

.rail-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  line-height: 1;
}

.rail-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-item:hover,
.rail-item.active {
  color: #fff;
  background: #0b8f73;
}

.sub-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid #d8ece4;
  background: #fff;
}

.sub-sidebar h2 {
  display: flex;
  align-items: center;
  height: 52px;
  margin: 0;
  padding: 0 22px;
  color: #1f2937;
  font-size: 17px;
  font-weight: 700;
  border-bottom: 1px solid #f0f2f6;
}

.sub-nav {
  display: grid;
  padding: 8px 0 18px;
}

.sub-group {
  border-bottom: 0;
  padding: 0;
}

.sub-group p {
  margin: 8px 20px;
  color: #8b96a8;
  font-size: 12px;
}

.sub-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0 22px;
  color: #303133;
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
}

.sub-group-title.group-page {
  cursor: pointer;
}

.sub-group-title.group-page.active,
.sub-group-title.group-page:hover {
  color: #1f6feb;
  background: #e8fbf3;
}

.sub-group-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub-group-title::before {
  order: 2;
  content: "⌄";
  margin-right: 0;
  margin-left: 8px;
  color: #8b96a8;
  transform: rotate(-90deg);
  transition: transform 0.15s ease;
}

.sub-group.open .sub-group-title::before {
  transform: rotate(0deg);
}

.sub-group-items {
  display: none;
  position: relative;
  margin: 0;
  padding: 0 0 6px;
}

.sub-group.open .sub-group-items {
  display: block;
}

.sub-item {
  width: 100%;
  height: 46px;
  border: 0;
  padding: 0 22px;
  color: #303133;
  background: #fff;
  text-align: left;
  font-size: 14px;
}

.sub-item.child {
  height: 40px;
  margin-left: 0;
  padding-left: 42px;
  color: #303133;
  font-size: 14px;
  position: relative;
}

.sub-item.child::before {
  content: none;
}

.sub-item.child.active::before {
  background: #0b8f73;
}

.sub-item:hover,
.sub-item.active {
  color: #0b8f73;
  background: transparent;
  font-weight: 600;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.sidebar-brand {
  padding: 2px 6px 24px;
}

.sidebar-brand strong {
  display: block;
}

.main-nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  color: #244741;
  background: transparent;
  text-align: left;
}

.nav-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--primary);
}

.nav-item:hover,
.nav-item.active {
  color: var(--primary-deep);
  background: #e9fff5;
  font-weight: 700;
}

.workspace {
  min-width: 0;
  height: 100vh;
  padding: 0 0 32px;
  overflow: auto;
}

.topbar,
.panel-header,
.top-actions,
.toolbar,
.drawer-actions {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 24px;
  height: 50px;
  margin-bottom: 0;
  padding: 0 20px 0 15px;
  border-bottom: 1px solid #e6e9ef;
  background: #fff;
}

.topbar h2 {
  margin: 2px 0 0;
  font-size: 24px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
  color: #173834;
  font-size: 14px;
}

.breadcrumb span:last-child {
  color: #303133;
}

.top-actions {
  align-items: center;
  gap: 8px;
}

.top-tool {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 54px;
  height: 49px;
  align-items: center;
  border: 0;
  color: #173834;
  background: transparent;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(3px);
}

.top-tool:hover {
  color: #0b8f73;
}

.top-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -7px 12px rgba(0, 0, 0, 0.12),
    0 5px 12px rgba(28, 66, 138, 0.16);
}

.top-tool-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-tool[data-top-panel="system"] .top-tool-icon {
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(135deg, #52d9a8 0%, #13bc83 48%, #056b5f 100%);
}

.top-tool[data-version-refresh-top] .top-tool-icon {
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(135deg, #78efbd 0%, #16b981 48%, #05735f 100%);
}

.top-tool[data-top-panel="messages"] .top-tool-icon {
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(135deg, #7ef0c5 0%, #0b8f73 48%, #056b5f 100%);
}

.top-tool[data-top-panel="tasks"] .top-tool-icon {
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(135deg, #45ddb0 0%, #13bc83 46%, #056b5f 100%);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 104px;
  height: 30px;
  padding: 0 10px 0 8px;
  border-radius: 16px;
  color: #173834;
  background: #fff;
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.user-chip:hover {
  border-color: #cfeadd;
  color: var(--primary);
  background: #f4fff9;
}

.user-chip::before {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #0b8f73, #0b8f73);
  content: attr(data-avatar);
  font-size: 13px;
  font-weight: 800;
}

.tenant-chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  min-width: 88px;
  color: #173834;
  font-size: 14px;
}

.top-popover {
  position: fixed;
  z-index: 30;
  width: 280px;
  padding: 14px;
  border: 1px solid #d8ece4;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 28, 45, 0.18);
}

.top-popover-title {
  margin-bottom: 10px;
  color: #173834;
  font-weight: 700;
}

.top-popover-list {
  display: grid;
  gap: 10px;
}

.top-popover-list article {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  align-items: center;
  border-bottom: 1px solid #d8ece4;
}

.top-popover-list article:last-child {
  border-bottom: 0;
}

.top-popover-list span,
.top-empty {
  color: var(--muted);
}

.top-popover-link {
  width: 100%;
  margin-top: 12px;
  justify-content: center;
}

.user-menu-list {
  display: grid;
  gap: 4px;
}

.user-menu-list button {
  min-height: 36px;
  border: 0;
  border-radius: 5px;
  padding: 0 10px;
  color: #173834;
  background: transparent;
  text-align: left;
}

.user-menu-list button:hover {
  color: var(--primary);
  background: #e9fff5;
}

.tab-strip {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 37px;
  overflow: hidden;
  border-bottom: 1px solid #d8ece4;
  background: #fff;
}

.page-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 37px;
  min-width: 84px;
  max-width: 180px;
  border: 0;
  padding: 0 12px;
  color: #244741;
  background: #e9fff5;
  white-space: nowrap;
}

.page-tab.active {
  color: #fff;
  background: #0b8f73;
}

.page-tab span {
  flex: 0 0 auto;
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin-left: 8px;
  place-items: center;
  border-radius: 50%;
  cursor: pointer;
}

.page-tab span:hover {
  background: rgba(16, 167, 125, 0.12);
}

.page-tab.active span:hover {
  background: rgba(255, 255, 255, 0.2);
}

.content-page {
  display: none;
}

.content-page.active {
  display: grid;
  gap: 14px;
  padding: 15px;
}

.content-page[data-page-panel="dashboard"].active {
  gap: 8px;
  padding: 8px 10px 12px;
}

.content-page[data-page-panel="sales"].quick-loan-fit.active {
  gap: 8px;
  height: calc(100vh - 96px);
  min-height: 0;
  padding: 8px 10px;
  overflow: hidden;
}

.content-page[data-page-panel="sales"].quick-sale-fit.active {
  height: calc(100vh - 120px);
}

.content-page[data-page-panel="sales"].loan-order-fit.active {
  gap: 8px;
  height: calc(100vh - 120px);
  min-width: 0;
  min-height: 0;
  padding: 8px 10px;
  overflow: hidden;
}

.content-page[data-page-panel="inventory"].active {
  gap: 8px;
  height: calc(100vh - 96px);
  min-height: 0;
  padding: 8px 10px;
  overflow: hidden;
}

.content-page[data-page-panel="inventoryWarning"].active {
  gap: 8px;
  height: calc(100vh - 96px);
  min-height: 0;
  padding: 8px 10px;
  overflow: hidden;
}

.content-page[data-page-panel="inventoryOverview"].active {
  gap: 8px;
  height: calc(100vh - 96px);
  min-height: 0;
  padding: 8px 10px;
  overflow: hidden;
}

.content-page[data-page-panel="replenishment"].active {
  gap: 8px;
  height: calc(100vh - 96px);
  min-height: 0;
  padding: 8px 10px;
  overflow: hidden;
}

.content-page[data-page-panel="transfer"].active {
  gap: 8px;
  height: calc(100vh - 96px);
  min-height: 0;
  padding: 8px 10px;
  overflow: hidden;
}

.content-page[data-page-panel="stockCheck"].active {
  gap: 8px;
  height: calc(100vh - 96px);
  min-height: 0;
  padding: 8px 10px;
  overflow: hidden;
}

.content-page[data-page-panel="stockAdjust"].active {
  gap: 8px;
  height: calc(100vh - 96px);
  min-height: 0;
  padding: 8px 10px;
  overflow: hidden;
}

.content-page[data-page-panel="reports"].active {
  gap: 8px;
  height: calc(100vh - 96px);
  min-width: 0;
  min-height: 0;
  padding: 8px 10px;
  overflow: hidden;
}

.content-page[data-page-panel="purchase"].purchase-order-fit.active {
  gap: 8px;
  height: calc(100vh - 96px);
  min-height: 0;
  padding: 8px 10px;
  overflow: hidden;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stat-strip article,
.generic-summary article {
  min-height: 92px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(37, 75, 120, 0.06);
}

.stat-strip span,
.generic-summary span,
.stat-strip em {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.stat-strip strong,
.generic-summary strong {
  display: block;
  margin: 8px 0 5px;
  font-size: 24px;
}

.generic-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.module-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.compact-actions {
  margin: 0;
}

.transfer-panel {
  gap: 0;
}

.transfer-top-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1.55fr) minmax(320px, 1fr);
  gap: 28px;
  padding: 18px 22px 18px;
  border-bottom: 10px solid #e9fff5;
  background: #fff;
}

.transfer-search {
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 206px;
  padding: 0;
  background: #fff;
}

.transfer-search strong {
  display: block;
  min-height: 32px;
  padding: 8px 10px;
  border-radius: 3px;
  color: #173834;
  background: #e8f3ff;
  font-size: 13px;
  font-weight: 500;
}

.transfer-search-row {
  display: grid;
  grid-template-columns: 150px 230px;
  grid-auto-rows: minmax(32px, auto);
  gap: 10px;
  align-items: center;
}

.transfer-search-row input,
.transfer-search-row select {
  min-height: 32px;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
}

.transfer-search-row .primary {
  grid-column: 1 / 2;
  width: 74px;
  margin-left: 160px;
}

.transfer-image-preview {
  display: grid;
  gap: 10px;
  align-content: start;
}

.transfer-image-box {
  display: grid;
  place-items: center;
  min-height: 188px;
  border-radius: 7px;
  color: #6b7280;
  background: #ededf3;
  font-size: 12px;
}

.transfer-image-box .product-thumb {
  width: 148px;
  height: 148px;
  border-radius: 8px;
}

.transfer-image-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 48px;
  color: #050505;
  font-size: 42px;
  line-height: 1;
}

.transfer-image-preview p {
  margin: 0;
  color: #111827;
  font-size: 12px;
}

.transfer-step-title {
  margin: 0;
  min-height: 32px;
  margin: 18px 22px 8px;
  padding: 8px 10px;
  border-radius: 3px;
  color: #173834;
  background: #e8f3ff;
  font-size: 13px;
}

.transfer-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 820px;
  padding: 0 22px 18px;
  background: #fff;
}

.transfer-summary article {
  min-height: 64px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
}

.transfer-summary span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.transfer-summary strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.transfer-toolbar {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
}

.transfer-order-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 8px 12px;
  padding: 10px 12px;
  background: #fff;
}

.transfer-order-filters label {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  color: #173834;
  font-size: 12px;
}

.transfer-order-filters input,
.transfer-order-filters select {
  min-height: 30px;
  min-width: 0;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
}

.transfer-order-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.transfer-order-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
}

.transfer-order-mode .transfer-table table {
  min-width: 1500px;
}

.transfer-viewbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  color: var(--muted);
  background: #fff;
}

.transfer-viewbar select {
  min-width: 180px;
}

.transfer-table {
  min-height: 0;
  max-height: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.transfer-table table {
  min-width: 2700px;
  font-size: 12px;
}

.transfer-table th,
.transfer-table td {
  height: 38px;
  padding: 0 8px;
}

.transfer-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.transfer-table .product-thumb {
  width: 76px;
  height: 76px;
}

.transfer-row-actions button {
  color: #0b8f73;
}

.stock-check-panel {
  gap: 0;
}

.stock-check-title h3 {
  margin: 0 0 8px;
  padding-left: 10px;
  border-left: 4px solid #0b8f73;
  font-size: 17px;
}

.stock-check-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 8px 12px;
  padding: 10px 12px;
  background: #fff;
}

.stock-check-filters label {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  color: #173834;
  font-size: 12px;
}

.stock-check-filters input,
.stock-check-filters select {
  min-height: 30px;
  min-width: 0;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
}

.stock-check-filter-actions {
  grid-column: 2 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.stock-check-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 12px;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
}

.stock-check-table {
  min-height: 0;
  max-height: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.stock-check-table table {
  min-width: 1320px;
  font-size: 12px;
}

.stock-check-table th,
.stock-check-table td {
  height: 38px;
  padding: 0 8px;
}

.stock-check-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.stock-check-actions button {
  color: #0b8f73;
}

.stock-check-actions button:last-child {
  color: #d94b4b;
}

.stock-adjust-panel {
  gap: 0;
}

.stock-adjust-title h3 {
  margin: 0 0 8px;
  padding-left: 10px;
  border-left: 4px solid #0b8f73;
  font-size: 17px;
}

.stock-adjust-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 8px 12px;
  padding: 10px 12px;
  background: #fff;
}

.stock-adjust-filters label {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  color: #173834;
  font-size: 12px;
}

.stock-adjust-filters input,
.stock-adjust-filters select {
  min-height: 30px;
  min-width: 0;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
}

.stock-adjust-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.stock-adjust-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 12px;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
}

.stock-adjust-table {
  min-height: 0;
  max-height: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.stock-adjust-table table {
  min-width: 1200px;
  font-size: 12px;
}

.stock-adjust-table th,
.stock-adjust-table td {
  height: 38px;
  padding: 0 8px;
}

.stock-adjust-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.stock-adjust-actions button {
  color: #0b8f73;
}

.stock-adjust-actions button:last-child {
  color: #d94b4b;
}

.image-cell {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  color: #3769a8;
  background: #edf6ff;
}

.product-thumb {
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border: 1px solid #e6ebf2;
  border-radius: 6px;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 3px 8px rgba(30, 55, 88, 0.08);
}

img.product-thumb {
  display: inline-block;
  object-fit: cover;
  cursor: zoom-in;
}

.table-thumb {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(171, 221, 202, 0.72);
  border-radius: 6px;
  object-fit: cover;
  cursor: zoom-in;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 30, 28, 0.62);
  backdrop-filter: blur(8px);
}

.image-viewer.hidden {
  display: none !important;
}

.image-viewer-card {
  display: grid;
  width: min(92vw, 880px);
  max-height: 88vh;
  overflow: hidden;
  border: 1px solid rgba(171, 221, 202, 0.72);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(0, 43, 36, 0.3);
}

.image-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 8px 12px 8px 18px;
  border-bottom: 1px solid rgba(171, 221, 202, 0.62);
  color: #173834;
}

.image-viewer-body {
  display: grid;
  min-height: 220px;
  max-height: calc(88vh - 49px);
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(244, 255, 249, 0.8), rgba(255, 255, 255, 0.96));
}

.image-viewer-body img {
  display: block;
  max-width: 100%;
  max-height: calc(88vh - 86px);
  border-radius: 8px;
  object-fit: contain;
}

.product-thumb.generated b {
  position: relative;
  z-index: 1;
  font-size: 22px;
}

.product-thumb.generated {
  position: relative;
}

.product-thumb.generated::after {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  content: "";
}

.product-thumb.gold {
  background: radial-gradient(circle at 32% 24%, #fff1a8, transparent 28%), linear-gradient(135deg, #d6a12b, #f3ce64 48%, #a66a16);
}

.product-thumb.jade {
  background: radial-gradient(circle at 32% 24%, #d8fff0, transparent 28%), linear-gradient(135deg, #27b486, #76d0a4 48%, #16785f);
}

.product-thumb.pearl {
  color: #42506a;
  background: radial-gradient(circle at 34% 28%, #fff, transparent 30%), linear-gradient(135deg, #f6edf8, #d8ece4 50%, #cde8dc);
}

.product-thumb.silver {
  color: #344056;
  background: radial-gradient(circle at 32% 24%, #fff, transparent 28%), linear-gradient(135deg, #edf2f8, #b9c5d6 52%, #7f8da3);
}

.product-thumb.ruby {
  background: radial-gradient(circle at 32% 24%, #ffd6df, transparent 28%), linear-gradient(135deg, #f04f70, #a9113c 52%, #74102d);
}

.table-thumb {
  width: 76px;
  height: 76px;
  border: 1px solid #e6ebf2;
  border-radius: 6px;
  object-fit: cover;
  cursor: zoom-in;
  box-shadow: 0 3px 8px rgba(30, 55, 88, 0.08);
}

.readonly-value {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f4fff9;
  font-size: 14px;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.process-steps article {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #f4fff9;
}

.process-steps article.active {
  border-color: #9fc4ff;
  background: #e9fff5;
}

.process-steps strong {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #0b8f73;
}

.process-steps span {
  color: #173834;
}

.system-config-area {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.config-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.config-tabs button {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: #59677a;
  background: transparent;
}

.config-tabs button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

.settings-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  max-width: 760px;
}

.settings-form.compact-grid {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.settings-form .span-all {
  grid-column: 1 / -1;
}

.settings-form p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.switch-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.system-list-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, max-content);
  gap: 10px;
  align-items: end;
}

.system-list-tools label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.system-list-tools input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 12px;
}

.permission-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr)) repeat(3, max-content);
  gap: 10px;
  align-items: end;
}

.permission-filters.user-filters {
  grid-template-columns: repeat(5, minmax(140px, 1fr)) repeat(3, max-content);
}

.permission-filters.salesman-filters {
  grid-template-columns: repeat(7, minmax(96px, 1fr));
  align-items: end;
}

.permission-filters.print-template-filters {
  grid-template-columns: repeat(5, minmax(126px, 1fr)) repeat(6, minmax(126px, 1fr)) repeat(3, max-content);
}

.operation-log-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr)) minmax(260px, 1.2fr) repeat(2, max-content);
  gap: 10px;
  align-items: end;
}

.operation-log-page {
  display: grid;
  gap: 12px;
}

.operation-log-tabs {
  display: flex;
  align-items: center;
  min-height: 32px;
}

.operation-log-tabs button {
  border: 0;
  border-bottom: 2px solid var(--primary);
  padding: 0 4px 8px;
  color: var(--primary);
  background: transparent;
  font-weight: 600;
}

.operation-log-filters label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.operation-log-filters input,
.operation-log-filters select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 12px;
  background: #fff;
}

.log-date-range {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.log-date-range span {
  grid-column: 1 / -1;
}

.log-date-range em {
  align-self: center;
  color: var(--muted);
  font-style: normal;
}

.operation-log-relation {
  max-width: 420px;
  white-space: pre-line;
  line-height: 1.8;
}

.log-detail-pre {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #f4fff9;
  color: var(--text);
  font: inherit;
  line-height: 1.8;
  white-space: pre-wrap;
}

.drawer-log-panel {
  display: grid;
  gap: 12px;
}

.drawer-log-filters {
  grid-template-columns: repeat(2, minmax(140px, 1fr));
}

.drawer-log-filters .log-date-range,
.drawer-log-filters button {
  grid-column: auto;
}

.drawer-log-table {
  max-height: calc(100vh - 330px);
  overflow: auto;
}

.drawer-log-table table {
  min-width: 1180px;
}

.drawer-log-table th,
.drawer-log-table td {
  white-space: nowrap;
}

.drawer-log-table .operation-log-relation {
  min-width: 320px;
  white-space: pre-line;
}

.inventory-loan-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  color: #2b3547;
}

.inventory-loan-detail-head strong {
  font-size: 14px;
}

.inventory-loan-detail-head span {
  color: var(--muted);
  font-size: 13px;
}

.inventory-loan-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 12px;
}

.inventory-loan-detail-table {
  max-height: 54vh;
  overflow: auto;
}

.inventory-loan-detail-table table {
  min-width: 2600px;
}

.inventory-loan-detail-table th,
.inventory-loan-detail-table td {
  white-space: nowrap;
}

.drawer-loan-detail {
  display: grid;
  gap: 12px;
}

.drawer-loan-detail .inventory-loan-detail-actions {
  justify-content: flex-start;
}

.drawer-loan-detail .inventory-loan-detail-table {
  max-height: calc(100vh - 260px);
}

.drawer-loan-detail .modal-pager {
  justify-content: flex-start;
}

.modal-pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.modal-pager input {
  width: 52px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 4px;
  text-align: center;
}

.permission-filters label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.permission-filters input,
.permission-filters select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 12px;
  background: #fff;
}

.permission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 320px;
  vertical-align: middle;
}

.permission-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 10px;
  color: #3d5570;
  background: #edf4ff;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
}

.permission-tree {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
}

.permission-tree strong {
  grid-column: 1 / -1;
}

.permission-tree label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  line-height: 1.4;
  word-break: keep-all;
}

.permission-tree label input {
  flex: 0 0 auto;
}

.template-thumb {
  width: 145px;
  height: 42px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.print-template-table th:nth-child(4),
.print-template-table td:nth-child(4) {
  width: 168px;
  min-width: 168px;
}

.print-template-table td {
  height: 66px;
  vertical-align: middle;
}

.template-mini-preview {
  position: relative;
  width: var(--mini-w, 72px);
  height: var(--mini-h, 34px);
  overflow: hidden;
  border: 1px solid #d8ece4;
  border-radius: 3px;
  background:
    linear-gradient(#f0f5ff 1px, transparent 1px),
    linear-gradient(90deg, #f0f5ff 1px, transparent 1px),
    #fff;
  background-size: 10px 10px;
}

.mini-design-item {
  position: absolute;
  display: block;
  border-radius: 1px;
  box-sizing: border-box;
}

.mini-preview-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #79cdb0;
  color: #172033;
  background: #fff;
  font-weight: 400;
  line-height: 1;
}

.mini-preview-barcode {
  border: 1px solid #79cdb0;
  background: #fff;
}

.mini-preview-barcode::before {
  position: absolute;
  inset: 3px 8px;
  background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 4px, #111 4px 5px, transparent 5px 8px);
  content: "";
}

.mini-preview-barcode em {
  display: none;
}

.mini-preview-qr {
  background: repeating-linear-gradient(90deg, #111 0 3px, #fff 3px 5px), repeating-linear-gradient(0deg, rgba(17,17,17,.55) 0 3px, transparent 3px 5px);
  background-blend-mode: multiply;
}

.mini-preview-line {
  background: #d6d6d6;
}

.mini-preview-box {
  border: 1px solid #1d2633;
  background: transparent;
}

.mini-preview-image {
  border: 1px solid #79cdb0;
  background:
    radial-gradient(circle at 72% 30%, #79cdb0 0 3px, transparent 4px),
    linear-gradient(135deg, transparent 42%, #79cdb0 43% 52%, transparent 53%),
    #f4fff9;
}

.print-template-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.print-template-footer select,
.print-template-footer input {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
}

.print-template-footer input {
  width: 58px;
}

.print-template-footer button {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 10px;
  color: var(--muted);
  background: #f4fff9;
}

.print-template-footer strong {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 4px;
  color: #fff;
  background: #0b8f73;
}

.template-designer {
  display: grid;
  gap: 14px;
}

.template-canvas {
  display: grid;
  gap: 8px;
  max-width: 340px;
  min-height: 130px;
  padding: 16px;
  border: 1px dashed #8ea6c8;
  border-radius: 4px;
  background: #f4fff9;
}

.drawer.wide .drawer-panel {
  width: calc(100vw - 242px);
  max-width: none;
}

.drawer.wide {
  justify-content: flex-end;
  align-items: stretch;
}

.drawer.wide .drawer-panel {
  height: 100vh;
  border-radius: 0;
  padding: 20px;
  box-sizing: border-box;
  box-shadow: none;
}

.drawer.wide .panel-header {
  min-height: 40px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.drawer.wide .drawer-actions {
  display: none;
}

.template-design-shell {
  display: grid;
  gap: 12px;
  position: relative;
  min-height: calc(100vh - 96px);
  margin-top: 0;
  padding-top: 56px;
}

.template-design-info {
  display: grid;
  grid-template-columns: 96px 96px 110px 130px 130px;
  gap: 34px;
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% - 220px);
  padding: 0;
  border: 0;
  background: transparent;
}

.template-design-info p {
  margin: 0;
  color: #3d4b5f;
  font-size: 13px;
  line-height: 1.45;
}

.template-design-actions {
  display: flex;
  gap: 10px;
  position: absolute;
  top: 0;
  right: 42px;
}

.template-design-workbench {
  display: grid;
  grid-template-columns: 184px minmax(480px, 1fr) minmax(260px, 300px);
  gap: 0;
  align-items: stretch;
  border-top: 1px solid var(--line);
  min-width: 0;
}

.template-toolbox {
  position: relative;
  display: block;
  min-height: calc(100vh - 190px);
  padding-top: 16px;
  padding-right: 16px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.tool-section {
  display: grid;
  gap: 10px;
  position: absolute;
  left: 16px;
  width: 168px;
}

.tool-section:nth-child(1) {
  top: 16px;
}

.tool-section:nth-child(2) {
  top: 154px;
}

.tool-section:nth-child(3) {
  top: 292px;
}

.tool-section:nth-child(4) {
  top: 430px;
}

.tool-section > strong {
  display: flex;
  align-items: center;
  height: 36px;
  border-radius: 5px;
  padding: 0 14px 0 18px;
  border-left: 4px solid #0b8f73;
  color: #1f2d3d;
  font-size: 14px;
  background: linear-gradient(90deg, #f4fff9 0%, #e9fff5 100%);
}

.tool-pair {
  display: grid;
  grid-template-columns: repeat(2, 80px);
  gap: 8px;
}

.template-properties {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  max-height: calc(100vh - 190px);
  padding: 14px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  overflow: auto;
}

.template-properties.hidden {
  display: none;
}

.template-properties label {
  display: grid;
  gap: 4px;
  color: #607a73;
  font-size: 12px;
}

.template-properties input,
.template-properties select {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
}

.template-properties > strong {
  color: #1f2d3d;
  font-size: 15px;
}

.template-prop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(96px, 1fr));
  gap: 8px;
  min-width: 0;
}

.template-prop-grid label {
  min-width: 0;
}

.template-lock-line {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.template-lock-line input {
  width: 36px;
  min-height: 20px;
}

.template-text-props,
.template-barcode-props {
  display: grid;
  gap: 8px;
}

.template-text-props.hidden,
.template-barcode-props.hidden {
  display: none;
}

.template-properties .wide-tool {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(232, 82, 82, 0.32);
  border-radius: 4px;
  background: #fff5f5;
  color: var(--red);
}

.template-secret-props {
  display: grid;
  gap: 8px;
  margin: 4px 0;
  padding: 10px;
  border: 1px solid #f2d6a2;
  border-radius: 4px;
  background: #fff9ed;
}

.template-secret-props > strong {
  color: #7a5b16;
  font-size: 13px;
}

.template-secret-props select,
.template-secret-props input {
  min-height: 30px;
  border: 1px solid #ecd293;
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
}

.template-secret-props .wide-tool {
  border-color: #e5c46d;
  color: #7a5b16;
  background: #fff;
}

.template-toolbox button {
  justify-content: center;
  min-height: 70px;
  border: 1px solid #e5eaf2;
  border-radius: 3px;
  padding: 0 4px;
  color: #2f4158;
  background: #fff;
  text-align: center;
  box-shadow: 0 2px 5px rgba(23, 47, 84, 0.08);
}

.template-toolbox .wide-tool {
  width: 80px;
}

.template-toolbox .compact-tool {
  min-height: 70px;
  border-color: #eef2f7;
  background: #fff;
}

.icon-tool {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
}

.icon-tool i {
  display: block;
  width: 28px;
  height: 28px;
  background: #202833;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.icon-text i {
  mask-image: linear-gradient(#000 0 0);
  -webkit-mask-image: linear-gradient(#000 0 0);
  width: 24px;
  height: 24px;
  border: 2px solid #202833;
  border-radius: 3px;
  background: transparent;
}

.icon-text i::before {
  content: "T";
}

.icon-barcode i {
  background: repeating-linear-gradient(90deg, #202833 0 3px, transparent 3px 5px, #202833 5px 7px, transparent 7px 10px);
}

.icon-qr i {
  background:
    linear-gradient(#202833 0 0) left top / 9px 9px no-repeat,
    linear-gradient(#202833 0 0) right top / 9px 9px no-repeat,
    linear-gradient(#202833 0 0) left bottom / 9px 9px no-repeat,
    repeating-linear-gradient(90deg, #202833 0 3px, transparent 3px 7px);
}

.icon-image i {
  border: 2px solid #202833;
  border-radius: 3px;
  background:
    radial-gradient(circle at 72% 30%, #202833 0 3px, transparent 4px),
    linear-gradient(135deg, transparent 42%, #202833 43% 52%, transparent 53%),
    transparent;
}

.icon-box i {
  border: 2px solid #202833;
  border-radius: 2px;
  background: transparent;
}

.icon-line i {
  height: 10px;
  border-top: 3px solid #202833;
  background: transparent;
}

.template-stage {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: calc(100vh - 190px);
  padding: 22px 34px 14px;
  border: 0;
  border-radius: 0;
  background: #f3f3f3;
  overflow: auto;
}

.template-loading-note {
  margin: 0;
  height: 0;
  overflow: hidden;
  color: #7d8ba0;
  font-size: 13px;
}

.template-ruler {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  width: 350px;
  max-width: none;
  margin-left: 22px;
  padding-left: 0;
  color: #7d8ba0;
  font-size: 7px;
}

.template-zoom {
  display: flex;
  align-items: center;
  gap: 10px;
}

.template-zoom button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.template-stage-board {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 420px;
  transform-origin: top left;
}

.template-ruler-y {
  display: grid;
  width: 22px;
  padding-top: 14px;
  color: #7d8ba0;
  font-size: 7px;
}

.template-label-canvas {
  position: relative;
  width: var(--label-w);
  min-width: var(--label-w);
  height: var(--label-h);
  min-height: var(--label-h);
  border: 1px dashed #7d96bd;
  border-radius: 0;
  background:
    linear-gradient(#eef1f5 1px, transparent 1px),
    linear-gradient(90deg, #eef1f5 1px, transparent 1px),
    #fff;
  background-size: 12px 12px;
  transform-origin: top left;
}

.design-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #213650;
  background: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  transform: rotate(var(--rotate, 0deg));
  transform-origin: center;
  cursor: move;
  user-select: none;
  white-space: nowrap;
}

.design-chip.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 167, 125, 0.16);
}

.design-chip[data-design-field="文本"] {
  min-width: 0;
  min-height: 0;
  padding: 0;
  line-height: 1;
}

.resize-handle {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 1px 4px rgba(15, 28, 45, 0.24);
  cursor: nwse-resize;
  content: "";
}

.design-chip.chip-0 { left: 18px; top: 16px; }
.design-chip.chip-1 { left: 120px; top: 16px; }
.design-chip.chip-2 { left: 220px; top: 16px; }
.design-chip.chip-3 { left: 18px; top: 48px; }
.design-chip.chip-4 { left: 150px; top: 48px; }
.design-chip.chip-5 { left: 260px; top: 48px; }

.design-barcode {
  display: block;
  width: var(--code-w, 100px);
  min-width: 0;
  height: var(--code-h, 40px);
  min-height: 0;
  padding: 0 !important;
}

.design-barcode b {
  display: block;
  width: 100%;
  height: 100%;
}

.barcode-svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: #000;
  background: #fff;
  overflow: visible;
}

.design-barcode i {
  display: block;
  flex: var(--bar) 0 0;
  width: auto;
  background: #101820;
}

.design-barcode em {
  display: none;
}

.design-qr {
  width: var(--code-w, 54px);
  height: var(--code-h, 54px);
  padding: 5px;
}

.design-qr b {
  display: grid;
  grid-template-columns: repeat(7, 5px);
  gap: 1px;
  width: 100%;
  height: 100%;
  padding: 3px;
  background: #fff;
}

.design-qr i {
  width: 100%;
  height: 100%;
  background: #fff;
}

.design-qr i.on {
  background: #101820;
}

.design-box {
  width: 70px;
  height: 28px;
  background: transparent;
}

.design-line {
  width: 86px;
  min-height: 0;
  height: 2px;
  padding: 0;
  border: 0;
  background: #e8e8e8;
}

.design-image {
  width: 48px;
  height: 32px;
  justify-content: center;
  background: #eef4ff;
}

.mini-switch {
  display: inline-flex;
  align-items: center;
}

.mini-switch input {
  display: none;
}

.mini-switch span {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #c9d3e1;
}

.mini-switch span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.16s ease;
  content: "";
}

.mini-switch input:checked + span {
  background: var(--primary);
}

.mini-switch input:checked + span::after {
  transform: translateX(16px);
}

.module-panel {
  min-height: 420px;
}

.content-page[data-page-panel="partners"] .module-panel {
  min-width: 0;
  overflow: hidden;
}

.content-page[data-page-panel="partners"] .table-wrap {
  min-width: 0;
}

.quick-loan-fit .module-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.content-page[data-page-panel="inventory"] .module-panel {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.content-page[data-page-panel="inventory"].borrowed-mode .module-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.content-page[data-page-panel="inventoryWarning"] .module-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.content-page[data-page-panel="inventoryOverview"] .module-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.content-page[data-page-panel="replenishment"] .module-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.content-page[data-page-panel="transfer"] .module-panel {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.content-page[data-page-panel="stockCheck"] .module-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.content-page[data-page-panel="stockAdjust"] .module-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.content-page[data-page-panel="reports"] .module-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.purchase-order-fit .module-panel {
  display: grid;
  grid-template-rows: auto minmax(0, auto) minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.speed-entry {
  display: grid;
  grid-template-columns: minmax(580px, 1.2fr) minmax(360px, 0.8fr);
  gap: 14px;
  align-items: stretch;
}

.speed-card {
  min-height: 590px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(31, 67, 115, 0.07);
}

.speed-card h3 {
  margin: 0 0 18px;
  padding-left: 10px;
  border-left: 4px solid var(--primary);
  font-size: 18px;
}

.speed-card h3 small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.speed-form {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px 12px;
  max-width: 620px;
  margin: 0 auto;
}

.speed-form .field {
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.speed-form .field span {
  color: #2f3b52;
  text-align: right;
}

.speed-form .required span::before {
  color: var(--red);
  content: "* ";
}

.speed-form .field input,
.speed-form .field select {
  min-height: 40px;
}

.speed-form .span-2 {
  grid-column: 1 / -1;
}

.compact {
  min-height: 40px;
  padding: 0 12px;
}

.money-field {
  position: relative;
}

.money-field em {
  position: absolute;
  right: 12px;
  bottom: 11px;
  color: var(--muted);
  font-style: normal;
}

.money-field input {
  padding-right: 34px;
}

.label-price {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 72px 38px 110px;
  gap: 8px;
  align-items: center;
}

.label-price-title {
  color: #2f3b52;
  text-align: right;
}

.label-price-title::before {
  color: var(--red);
  content: "* ";
}

.label-price-money {
  position: relative;
}

.label-price-money input,
.label-price-rate,
.label-price select {
  width: 100%;
  min-height: 40px;
}

.label-price-money input {
  padding-right: 34px;
}

.label-price-money em {
  position: absolute;
  right: 12px;
  bottom: 11px;
  color: var(--muted);
  font-style: normal;
}

.label-price-rate-text {
  color: #2f3b52;
  white-space: nowrap;
}

.custom-field {
  grid-column: 1 / -1;
  justify-self: center;
  min-height: 34px;
}

.barcode-preview {
  display: grid;
  gap: 6px;
  margin: -4px 0 0 98px;
  padding: 8px 10px;
  border: 1px solid rgba(171, 221, 202, 0.86);
  border-radius: 4px;
  color: #0b8f73;
  background: #f4fff9;
  font-size: 13px;
  line-height: 1.5;
}

.barcode-preview strong {
  color: #173834;
}

.barcode-preview code {
  display: inline-block;
  margin: 2px 4px 0 0;
  padding: 2px 6px;
  border-radius: 3px;
  color: #057866;
  background: #e9fff5;
  font-family: Arial, sans-serif;
}

.secret-code-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  margin-left: 98px;
  padding: 10px;
  border: 1px solid #f2d6a2;
  border-radius: 4px;
  color: #6d5523;
  background: #fff9ed;
  font-size: 13px;
}

.secret-code-preview span {
  grid-column: 1 / -1;
  color: #8a6a22;
}

.secret-code-preview strong {
  min-height: 28px;
  padding: 6px 8px;
  border-radius: 3px;
  color: #2f2412;
  background: #fff;
}

.speed-custom-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin-left: 98px;
}

.speed-custom-fields:empty {
  display: none;
}

.speed-custom-field {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 8px;
  color: #2f3b52;
  font-size: 13px;
}

.speed-custom-field input,
.speed-custom-field select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 8px;
}

.speed-custom-field button {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  color: var(--red);
  background: #fff1f1;
}

.speed-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  gap: 12px;
  align-items: center;
  max-width: 620px;
  margin: 18px auto 0;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  color: #334158;
  font-size: 13px;
}

.speed-options > label,
.radio-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.speed-options > label {
  min-height: 34px;
  justify-content: space-between;
  padding: 0 10px;
  border: 1px solid rgba(171, 221, 202, 0.86);
  border-radius: 4px;
  color: #173834;
  background: #f4fff9;
}

.speed-options input[type="checkbox"] {
  width: 38px;
  height: 20px;
  accent-color: var(--primary);
}

.speed-options .radio-row,
.speed-options .print-count {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.speed-options .radio-row {
  min-height: 34px;
}

.speed-options .radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.speed-price-cache {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  max-width: 560px;
  padding: 10px;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  background: #f4fff9;
}

.speed-price-cache:empty {
  display: none;
}

.speed-price-cache > strong {
  color: #173834;
  font-size: 13px;
}

.speed-price-cache > span {
  color: var(--muted);
}

.speed-price-cache button {
  min-height: 30px;
  border: 1px solid rgba(16, 167, 125, 0.32);
  border-radius: 4px;
  padding: 0 10px;
  color: #057866;
  background: #fff;
  cursor: pointer;
}

.speed-price-cache button em {
  margin-left: 6px;
  color: var(--muted);
  font-style: normal;
}

.print-count input {
  width: 70px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 8px;
}

.media-card {
  display: grid;
  grid-template-rows: auto 1fr auto auto auto auto;
  gap: 12px;
}

.camera-box {
  position: relative;
  display: grid;
  min-height: 330px;
  place-items: center;
  align-content: center;
  gap: 12px;
  overflow: hidden;
  color: #5d687a;
  background: #e6f2ec;
}

.camera-box.active {
  color: #fff;
  background: #111827;
}

.camera-video {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-box.active .camera-video {
  display: block;
}

.camera-box.active::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.35));
  content: "";
}

.camera-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 28px;
  background: var(--primary);
}

.camera-box.active .camera-icon {
  opacity: 0;
}

.camera-box span {
  position: relative;
  z-index: 1;
}

.camera-box.active span {
  align-self: end;
  margin-bottom: 18px;
  padding: 6px 10px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.45);
}

.media-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.media-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.upload-tile {
  display: grid;
  width: 120px;
  height: 120px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed #c8d2df;
  color: #59677a;
  background: #fff;
}

.photo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.photo-thumb {
  position: relative;
  display: grid;
  width: 120px;
  min-height: 120px;
  gap: 6px;
  padding: 6px;
  border: 1px solid #d8ece4;
  background: #fff;
}

.photo-preview {
  display: grid;
  height: 76px;
  place-items: center;
  overflow: hidden;
  color: #fff;
  border-radius: 3px;
  background: linear-gradient(135deg, #0b8f73, #0b8f73);
  font-weight: 700;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-thumb span {
  overflow: hidden;
  color: #59677a;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-thumb button {
  position: absolute;
  top: -8px;
  right: -8px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #ffd2d2;
  border-radius: 50%;
  color: #c83636;
  background: #fff;
}

.upload-tile strong {
  font-size: 34px;
  font-weight: 300;
}

.video-upload {
  display: grid;
  gap: 6px;
  margin-top: 4px;
  padding: 16px;
  border: 1px dashed #c8d2df;
  color: var(--muted);
  background: #fafcff;
}

.video-upload:hover {
  border-color: #9fc4ff;
  background: #f4fff9;
}

.video-file {
  color: #0b8f73;
  font-size: 13px;
}

.video-upload strong {
  color: var(--text);
}

.video-upload em {
  color: var(--primary);
  font-style: normal;
}

.speed-footer {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  padding: 14px 0 0;
}

.speed-footer button {
  min-width: 100px;
}

.form-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  background: #fff;
}

.form-steps span {
  display: grid;
  min-height: 44px;
  place-items: center;
  color: #59677a;
  border-right: 1px solid var(--line);
  background: #f4fff9;
}

.form-steps span:last-child {
  border-right: 0;
}

.form-steps span.active {
  color: #fff;
  background: #0b8f73;
}

.product-form {
  display: grid;
  gap: 14px;
}

.inventory-edit-form {
  display: grid;
  gap: 12px;
}

.inventory-edit-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e4ebf5;
  border-radius: 5px;
  background: #f4fff9;
}

.inventory-edit-preview .product-thumb {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
}

.inventory-edit-image {
  position: relative;
  display: block;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  padding: 0;
  border: 1px dashed #9fb5d3;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
}

.inventory-edit-image .product-thumb {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.inventory-edit-image em {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 4px 0;
  color: #fff;
  background: rgba(22, 103, 255, 0.82);
  font-size: 12px;
  font-style: normal;
  text-align: center;
}

.inventory-edit-preview strong,
.inventory-edit-preview span {
  display: block;
}

.inventory-edit-preview strong {
  color: #17213a;
  font-size: 16px;
}

.inventory-edit-preview span {
  margin-top: 6px;
  color: #697386;
}

.inventory-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.product-import-page {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 14px;
  min-height: calc(100vh - 128px);
  overflow: hidden;
}

.import-page-title h3 {
  margin: 0;
  padding-left: 10px;
  border-left: 4px solid #0b8f73;
  font-size: 18px;
}

.goods-import-actions {
  display: flex;
  gap: 12px;
}

.goods-import-note {
  margin: 0;
  color: #4b5870;
  line-height: 1.8;
  font-size: 13px;
}

.goods-import-note::before {
  display: inline-grid;
  width: 16px;
  height: 16px;
  margin-right: 7px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #0b8f73;
  content: "i";
  font-size: 12px;
}

.goods-import-note button {
  border: 0;
  padding: 0;
  color: #0b8f73;
  background: transparent;
}

.goods-import-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(220px, 1fr) minmax(200px, 1fr) max-content max-content;
  gap: 12px;
  align-items: end;
}

.goods-import-filters label {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: #173834;
  font-size: 13px;
}

.goods-import-filters input,
.goods-import-filters select {
  min-height: 34px;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  padding: 0 10px;
  background: #f4fff9;
}

.goods-import-table {
  min-height: 0;
  border: 1px solid var(--line);
  background: #fff;
}

.goods-import-table table {
  min-width: 860px;
}

.goods-import-table th,
.goods-import-table td {
  height: 42px;
}

.import-upload-drop {
  display: grid;
  min-height: 180px;
  place-items: center;
  gap: 8px;
  border: 1px dashed #b9c7da;
  border-radius: 6px;
  background: #f4fff9;
  text-align: center;
}

.import-upload-drop strong {
  color: #25324a;
  font-size: 16px;
}

.import-upload-drop em {
  color: #0b8f73;
  font-style: normal;
}

.import-upload-drop span {
  color: var(--muted);
  font-size: 13px;
}

.import-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
}

.import-guide,
.import-workbench {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.import-guide {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
}

.import-guide strong {
  color: #173834;
  font-size: 16px;
}

.import-guide p {
  margin: 0;
  color: #607a73;
  line-height: 1.7;
}

.import-rule-list {
  display: grid;
  gap: 8px;
}

.import-rule-list span {
  padding: 8px 10px;
  border-radius: 4px;
  color: #2f4158;
  background: #f5f8fc;
  font-size: 13px;
}

.import-workbench {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.import-actions {
  display: grid;
  grid-template-columns: repeat(5, max-content);
  gap: 10px;
}

.import-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.import-status-grid article {
  padding: 12px;
  border: 1px solid #d8ece4;
  border-radius: 6px;
  background: #f9fbfe;
}

.import-status-grid span {
  display: block;
  color: #607a73;
  font-size: 12px;
}

.import-status-grid strong {
  display: block;
  margin-top: 6px;
  color: #173834;
  font-size: 15px;
}

.import-steps span.done {
  border-color: rgba(37, 168, 105, 0.24);
  color: #168f5b;
  background: #effaf5;
}

.scan-panel,
.inline-scan {
  display: grid;
  align-items: center;
  gap: 12px;
  border: 1px solid #b9d4ff;
  border-radius: 4px;
  background: linear-gradient(135deg, #f4fff9, #e9fff5);
}

.scan-panel {
  grid-template-columns: minmax(220px, 0.7fr) minmax(280px, 1fr) 110px;
  padding: 16px;
}

.scan-panel h4,
.scan-panel p {
  margin: 0;
}

.scan-panel p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.scan-box {
  display: grid;
  gap: 7px;
}

.scan-box span,
.inline-scan strong {
  color: #0b8f73;
}

.scan-box input,
.inline-scan input {
  min-height: 42px;
  border: 1px solid #9fc4ff;
  border-radius: 4px;
  padding: 0 12px;
  outline: none;
  background: #fff;
}

.scan-box input:focus,
.inline-scan input:focus {
  border-color: #0b8f73;
  box-shadow: 0 0 0 3px rgba(16, 167, 125, 0.14);
}

.inline-scan {
  grid-template-columns: 90px minmax(260px, 1fr) 100px;
  margin-bottom: 14px;
  padding: 12px 14px;
}

.inventory-scan-query {
  grid-template-columns: 88px minmax(320px, 1fr) 104px;
  margin-bottom: 8px;
}

.inventory-scan-detail {
  display: grid;
  grid-template-columns: 64px minmax(180px, 0.55fr) minmax(360px, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 68px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  background: #fff;
}

.inventory-scan-detail > span,
.inventory-scan-detail > strong,
.inventory-scan-detail > em {
  grid-column: 1 / -1;
}

.inventory-scan-detail > span,
.scan-detail-main span {
  color: #0b8f73;
  font-size: 13px;
}

.inventory-scan-detail > strong,
.scan-detail-main strong {
  color: #18233f;
  font-size: 16px;
}

.inventory-scan-detail > em,
.scan-detail-main em {
  color: var(--muted);
  font-style: normal;
}

.scan-detail-image .product-thumb {
  width: 96px;
  height: 96px;
}

.scan-detail-main {
  display: grid;
  gap: 4px;
}

.location-badge {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 26px;
  align-items: center;
  border-radius: 14px;
  padding: 0 10px;
  color: #17415f;
  background: #eaf5ff;
  font-size: 12px;
}

.location-badge.borrowed {
  color: #9b650d;
  background: #fff2d7;
}

.location-badge.stock {
  color: #117449;
  background: #e8f7ef;
}

.location-badge.empty {
  color: #b83636;
  background: #ffe8e8;
}

.inventory-scan-detail dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(80px, 1fr));
  gap: 6px 10px;
  margin: 0;
}

.inventory-scan-detail dl div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.inventory-scan-detail dt {
  color: var(--muted);
  font-size: 12px;
}

.inventory-scan-detail dd {
  margin: 0;
  color: #18233f;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-scan-detail.scan-error {
  border-color: #ffd2d2;
  background: #fff8f8;
}

.inventory-query-title h3 {
  margin: 0 0 8px;
  padding-left: 10px;
  border-left: 4px solid #0b8f73;
  font-size: 17px;
}

.inventory-query-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 8px 12px;
  padding: 10px 12px;
  background: #fff;
}

.inventory-query-filters label {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  color: #173834;
  font-size: 12px;
}

.inventory-query-filters input,
.inventory-query-filters select,
.inventory-toolbar select {
  min-height: 30px;
  min-width: 0;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
}

.compound-field {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
}

.compound-field select {
  border-radius: 4px 0 0 4px;
}

.compound-field input {
  border-left: 0;
  border-radius: 0 4px 4px 0;
}

.inventory-filter-actions {
  grid-column: 3 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.success {
  min-height: 32px;
  border: 0;
  border-radius: 5px;
  padding: 0 12px;
  color: #fff;
  font-weight: 700;
  background: #58bd39;
}

.inventory-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px 12px;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
}

.inventory-toolbar select {
  width: 138px;
  margin-left: auto;
}

.inventory-scan-box {
  padding: 8px 12px 0;
}

.inventory-status-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 250px;
}

.inventory-status-tags span {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border-radius: 4px;
  padding: 0 7px;
  color: #057866;
  background: #e9fff5;
  font-size: 12px;
}

.inventory-status-tags .good {
  color: #16803d;
  background: #ecf9ed;
}

.inventory-status-tags .warn {
  color: #9b650d;
  background: #fff4dd;
}

.copy-code {
  margin-left: 6px;
  border: 0;
  color: #0b8f73;
  background: transparent;
  font-size: 12px;
}

.inventory-actions {
  max-width: 180px;
  flex-wrap: wrap;
}

.inventory-actions button {
  color: #0b8f73;
}

.modal-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.modal-stat-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
}

.modal-stat-grid strong,
.modal-stat-grid span {
  display: block;
}

.modal-stat-grid strong {
  color: #0b8f73;
  font-size: 20px;
}

.inventory-batch-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.inventory-compact table {
  font-size: 12px;
}

.inventory-compact th,
.inventory-compact td {
  height: 38px;
  padding: 0 8px;
}

.purchase-order-panel {
  display: grid;
  gap: 10px;
}

.purchase-order-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 8px 12px;
  padding: 10px 12px;
  background: #fff;
}

.purchase-order-filters label {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  color: #173834;
  font-size: 12px;
}

.purchase-order-filters input,
.purchase-order-filters select {
  min-height: 30px;
  min-width: 0;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
}

.purchase-order-filter-actions {
  grid-column: 3 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.purchase-order-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
}

.purchase-order-summary article {
  min-height: 70px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(37, 75, 120, 0.06);
}

.purchase-order-summary span,
.purchase-order-summary strong {
  display: block;
}

.purchase-order-summary span {
  color: var(--muted);
  font-size: 12px;
}

.purchase-order-summary strong {
  margin-top: 8px;
  color: #25324a;
  font-size: 18px;
  font-weight: 500;
}

.purchase-order-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #fff;
}

.warning {
  min-height: 32px;
  border: 1px solid #f5d097;
  border-radius: 5px;
  padding: 0 12px;
  color: #b27712;
  font-weight: 700;
  background: #fff8e8;
}

.po-view-switch {
  display: inline-flex;
  gap: 10px;
  margin-left: auto;
  color: #173834;
  font-size: 13px;
}

.purchase-order-actions {
  display: grid;
  gap: 8px;
}

.purchase-order-actions button {
  color: #0b8f73;
}

.purchase-order-actions button:last-child {
  color: #d94b4b;
}

.purchase-order-fit .table-wrap {
  min-height: 0;
  max-height: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.purchase-order-fit table {
  min-width: 1380px;
  font-size: 12px;
}

.purchase-order-fit th,
.purchase-order-fit td {
  height: 38px;
  padding: 0 8px;
}

.purchase-order-fit th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.content-page[data-page-panel="inventory"] .table-wrap {
  min-height: 0;
  max-height: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.content-page[data-page-panel="inventory"] table {
  min-width: 1680px;
  font-size: 12px;
}

.content-page[data-page-panel="inventory"].borrowed-mode table {
  min-width: 3600px;
}

.content-page[data-page-panel="inventory"] th,
.content-page[data-page-panel="inventory"] td {
  height: 86px;
  padding: 0 8px;
}

.content-page[data-page-panel="inventory"] th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.content-page[data-page-panel="inventory"] .small-action {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.content-page[data-page-panel="inventory"] .product-thumb {
  width: 76px;
  height: 76px;
}

.inventory-warning-panel {
  gap: 0;
}

.inventory-warning-title h3 {
  margin: 0 0 8px;
  padding-left: 10px;
  border-left: 4px solid #0b8f73;
  font-size: 17px;
}

.inventory-warning-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 8px 12px;
  padding: 10px 12px;
  background: #fff;
}

.inventory-warning-filters label {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  color: #173834;
  font-size: 12px;
}

.inventory-warning-filters input,
.inventory-warning-filters select {
  min-height: 30px;
  min-width: 0;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
}

.inventory-warning-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.inventory-warning-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 12px;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
}

.inventory-warning-table {
  min-height: 0;
  max-height: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.inventory-warning-table table {
  min-width: 1900px;
  font-size: 12px;
}

.inventory-warning-table th,
.inventory-warning-table td {
  height: 86px;
  padding: 0 8px;
}

.inventory-warning-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.inventory-warning-table .product-thumb {
  width: 76px;
  height: 76px;
}

.inventory-overview-panel {
  gap: 0;
}

.inventory-overview-title h3 {
  margin: 0 0 8px;
  padding-left: 10px;
  border-left: 4px solid #0b8f73;
  font-size: 17px;
}

.inventory-overview-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 8px 12px;
  padding: 10px 12px;
  background: #fff;
}

.inventory-overview-filters label {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  color: #173834;
  font-size: 12px;
}

.inventory-overview-filters input,
.inventory-overview-filters select,
.inventory-overview-toolbar select {
  min-height: 30px;
  min-width: 0;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
}

.inventory-overview-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.inventory-overview-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px 12px;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
}

.inventory-overview-toolbar select {
  width: 138px;
  margin-left: auto;
}

.inventory-overview-table {
  min-height: 0;
  max-height: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.inventory-overview-table table {
  min-width: 4200px;
  font-size: 12px;
}

.inventory-overview-table th,
.inventory-overview-table td {
  height: 86px;
  padding: 0 8px;
}

.inventory-overview-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.inventory-overview-table .product-thumb {
  width: 76px;
  height: 76px;
}

.replenishment-panel {
  gap: 0;
}

.replenishment-title h3 {
  margin: 0 0 8px;
  padding-left: 10px;
  border-left: 4px solid #0b8f73;
  font-size: 17px;
}

.replenishment-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 8px 12px;
  padding: 10px 12px;
  background: #fff;
}

.replenishment-filters label {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  color: #173834;
  font-size: 12px;
}

.replenishment-filters input,
.replenishment-filters select {
  min-height: 30px;
  min-width: 0;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
}

.date-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.replenishment-filter-actions {
  grid-column: 3 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.replenishment-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 12px;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
}

.replenishment-table {
  min-height: 0;
  max-height: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.replenishment-table table {
  min-width: 1120px;
  font-size: 12px;
}

.replenishment-table th,
.replenishment-table td {
  height: 38px;
  padding: 0 8px;
}

.replenishment-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.replenishment-actions button:first-child {
  color: #0b8f73;
}

.replenishment-actions button:last-child {
  color: #d94b4b;
}

.quick-loan-panel,
.quick-sale-panel {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) minmax(300px, 0.72fr);
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  background: #fff;
}

.quick-loan-fit .quick-loan-panel,
.quick-loan-fit .quick-sale-panel {
  grid-template-columns: minmax(560px, 1fr) minmax(300px, 0.72fr);
  gap: 8px;
  margin-bottom: 8px;
  padding: 10px 12px;
}

.quick-loan-left {
  display: grid;
  gap: 10px;
}

.quick-loan-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}

.quick-loan-fit .quick-loan-fields {
  grid-template-columns: minmax(150px, 1.2fr) minmax(90px, 0.46fr) minmax(140px, 0.8fr) minmax(90px, 0.46fr);
  gap: 8px;
}

.quick-loan-fields label {
  display: grid;
  gap: 6px;
}

.quick-loan-fields label.span-2 {
  grid-column: span 2;
}

.quick-loan-fields span {
  color: #5d6682;
  font-size: 13px;
}

.field-error {
  color: #d94b4b;
  font-size: 12px;
  font-style: normal;
}

.quick-loan-fields input,
.quick-loan-fields select {
  min-height: 38px;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  padding: 0 10px;
  background: #fff;
}

.quick-loan-fields .percent-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  background: #fff;
}

.quick-loan-fields .percent-field input {
  min-width: 0;
  border: 0;
}

.quick-loan-fields .percent-field em {
  color: #5d6682;
  font-style: normal;
}

.quick-loan-fit .quick-loan-fields input,
.quick-loan-fit .quick-loan-fields select,
.quick-loan-fit .quick-loan-search-row input,
.quick-loan-fit .quick-loan-search-row select {
  min-height: 32px;
  padding: 0 8px;
}

.quick-loan-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #eef3fa;
  border-radius: 4px;
  background: #f4fff9;
}

.quick-loan-fit .quick-loan-step {
  padding: 7px 10px;
}

.step-index {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #2378ff;
  color: #fff;
  font-weight: 700;
}

.step-content {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.step-content p,
.quick-loan-search-row em {
  margin: 0;
}

.quick-loan-search-row,
.quick-loan-toolbar {
  display: grid;
  gap: 10px;
  align-items: center;
}

.quick-loan-search-row {
  grid-template-columns: 160px minmax(220px, 1fr) 86px minmax(130px, auto) minmax(240px, 1fr);
}

.quick-loan-fit .quick-loan-search-row {
  grid-template-columns: 150px minmax(180px, 1fr) 82px;
}

.quick-loan-search-row select,
.quick-loan-search-row input {
  min-height: 38px;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  padding: 0 10px;
  background: #fff;
}

.quick-loan-search-row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.quick-loan-fit .quick-loan-search-row .check-inline {
  grid-column: 1 / 2;
}

.quick-loan-fit .quick-loan-search-row em {
  grid-column: 2 / -1;
}

.quick-loan-image {
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr);
  gap: 10px;
  color: #25324a;
  font-size: 13px;
}

.quick-loan-image > div {
  display: grid;
  min-height: 260px;
  place-items: center;
  background: #f5f7fb;
}

.quick-loan-image svg {
  width: 58px;
  height: 48px;
}

.quick-loan-image .thumb {
  width: 88px;
  height: 88px;
  font-size: 12px;
}

.quick-loan-image .product-thumb {
  width: 176px;
  height: 176px;
  border-radius: 8px;
}

.quick-loan-toolbar {
  grid-template-columns: repeat(4, max-content);
  justify-content: end;
  grid-column: 1 / -1;
}

.quick-loan-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 270px));
  gap: 12px;
  grid-column: 1 / -1;
}

.quick-loan-summary article {
  min-height: 78px;
  padding: 14px 12px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #f1f5ff;
  text-align: center;
}

.quick-loan-fit .quick-loan-summary article {
  min-height: 64px;
  padding: 10px 12px;
}

.quick-loan-summary span,
.quick-loan-summary em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.quick-loan-summary strong {
  display: block;
  margin: 0 0 4px;
  color: #0b8f73;
  font-size: 22px;
  font-weight: 500;
}

.quick-loan-fit .quick-loan-summary strong {
  margin: 2px 0 0;
  font-size: 15px;
}

.quick-loan-style-standard .quick-loan-panel {
  gap: 12px;
}

.quick-sale-fields {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.quick-loan-fit .quick-sale-fields {
  grid-template-columns: repeat(5, minmax(110px, 1fr));
}

.purchase-return-fields,
.quick-loan-fit .purchase-return-fields {
  grid-template-columns: minmax(220px, 360px);
}

.table-mini-input {
  width: 82px;
  min-height: 28px;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  padding: 0 6px;
  background: #fff;
}

.quick-loan-style-standard table {
  font-size: 13px;
}

.quick-loan-style-standard th,
.quick-loan-style-standard td {
  height: 42px;
  padding: 0 10px;
}

.loan-order-fit .module-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
}

.loan-order-fit .panel-header {
  margin-bottom: 8px;
}

.loan-order-panel {
  display: grid;
  min-width: 0;
  gap: 8px;
  margin-bottom: 8px;
}

.loan-order-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 12px 18px;
  align-items: end;
}

.loan-order-filters label {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.loan-order-filters span {
  color: #5d6682;
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}

.loan-order-filters input,
.loan-order-filters select,
.loan-order-toolbar select {
  min-height: 32px;
  min-width: 0;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
}

.loan-order-filters .compound-field {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
}

.loan-order-filters .compound-field select {
  border-radius: 4px 0 0 4px;
}

.loan-order-filters .compound-field input {
  border-left: 0;
  border-radius: 0 4px 4px 0;
}

.loan-order-stats,
.sales-order-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
}

.loan-order-stats article,
.sales-order-stats article {
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid #edf1f7;
  border-radius: 4px;
  background: #f4fff9;
}

.loan-order-stats span,
.sales-order-stats span {
  display: block;
  color: #6a7288;
  font-size: 12px;
  line-height: 1.25;
}

.loan-order-stats strong,
.sales-order-stats strong {
  display: block;
  margin-top: 5px;
  color: #1f6feb;
  font-size: 17px;
  font-weight: 600;
}

.warehouse-sales-stats,
.sales-batch-stats {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.stack-cell {
  display: grid;
  gap: 4px;
  min-width: 180px;
  color: #46516a;
  font-size: 12px;
  line-height: 1.35;
}

.stack-cell strong {
  color: #17233d;
  font-size: 13px;
}

.stack-cell .status {
  width: max-content;
}

.after-sales-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

.after-return-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 8px 14px;
  align-items: start;
}

.after-return-panel .quick-loan-step,
.after-return-fields,
.after-return-methods,
.after-return-query,
.after-return-panel .muted-note,
.after-return-summary,
.after-return-panel .quick-loan-toolbar {
  grid-column: 1;
}

.after-return-image {
  grid-column: 2;
  grid-row: 1 / span 8;
}

.after-return-fields,
.after-return-query {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 8px 12px;
  align-items: end;
}

.after-return-query strong {
  grid-column: 1 / -1;
  color: #2b344b;
  font-size: 13px;
}

.after-return-fields label,
.after-return-query label {
  display: grid;
  gap: 4px;
  color: #5d6682;
  font-size: 12px;
}

.after-return-fields input,
.after-return-fields select,
.after-return-query input,
.after-return-query select {
  min-height: 32px;
  min-width: 0;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
}

.after-return-methods {
  display: flex;
  gap: 8px;
}

.after-return-methods button {
  min-height: 30px;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  padding: 0 12px;
  background: #fff;
  color: #40506b;
}

.after-return-methods button.active {
  border-color: #1f6feb;
  color: #1f6feb;
  background: #e8fbf3;
}

.after-list-stats {
  grid-template-columns: repeat(7, minmax(110px, 1fr));
}

.after-receipt-stats {
  grid-template-columns: repeat(2, minmax(160px, 1fr));
}

.audit-review-page {
  display: grid;
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

.audit-tabs {
  display: flex;
  gap: 8px;
}

.audit-tabs button {
  min-height: 30px;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  padding: 0 14px;
  background: #fff;
  color: #40506b;
}

.audit-tabs button.active {
  border-color: #1f6feb;
  color: #1f6feb;
  background: #e8fbf3;
}

.audit-review-stats {
  grid-template-columns: repeat(2, minmax(160px, 1fr));
}

.loan-order-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.loan-order-toolbar select {
  width: 130px;
}

.loan-order-actions {
  min-width: 148px;
}

.loan-order-fit .table-wrap {
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
}

.loan-order-fit table {
  min-width: 1540px;
}

.return-stock-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  background: #fff;
}

.return-stock-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  align-items: stretch;
}

.return-stock-steps {
  display: grid;
  gap: 12px;
}

.return-image-preview {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 178px;
  padding: 12px;
  border: 1px solid #eef3fa;
  border-radius: 4px;
  background: #f4fff9;
}

.return-image-preview > span {
  color: var(--muted);
  font-size: 13px;
}

.return-image-preview [data-return-image-preview] {
  display: grid;
  place-items: center;
  min-height: 170px;
  border: 1px dashed #d8ece4;
  border-radius: 4px;
  background: #fff;
  text-align: center;
}

.return-image-preview .product-thumb {
  width: 138px;
  height: 138px;
}

.return-image-preview strong,
.return-image-preview em {
  display: block;
  max-width: 130px;
  overflow: hidden;
  color: #27364f;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.return-image-preview em,
.return-image-empty {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.return-step {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #eef3fa;
  border-radius: 4px;
  background: #f4fff9;
}

.return-step p,
.return-step em {
  margin: 0;
}

.return-step em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.return-step label,
.return-search-row,
.check-inline {
  display: flex;
  gap: 10px;
  align-items: center;
}

.return-step select,
.return-step input,
.return-search-row select,
.return-search-row input {
  min-height: 38px;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  padding: 0 10px;
  background: #fff;
}

.return-search-row {
  display: grid;
  grid-template-columns: 160px minmax(220px, 1fr) 86px minmax(260px, auto);
}

.return-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.return-stock-panel.quick-return-mode .return-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.return-summary article {
  padding: 10px 12px;
  border: 1px solid #edf1f7;
  border-radius: 4px;
  background: #fff;
}

.return-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.return-summary strong {
  display: block;
  margin-top: 4px;
  color: #17213a;
  font-size: 18px;
}

.return-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.scan-result {
  grid-column: 1 / -1;
  min-height: 38px;
  padding: 10px 12px;
  border: 1px solid rgba(171, 221, 202, 0.86);
  border-radius: 4px;
  color: #0b8f73;
  background: #fff;
}

.scan-result.scan-error {
  color: #b83636;
  border-color: #ffd2d2;
  background: #fff7f7;
}

.scan-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.scan-item {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 170px 80px;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  background: #fff;
}

.scan-item span {
  color: #173834;
}

.scan-item strong {
  color: #0b8f73;
  font-size: 13px;
}

.scan-item em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
}

.scan-item.scan-error {
  border-color: #ffd2d2;
  background: #fff8f8;
}

.form-card {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 18px;
  background: #fff;
}

.form-card h4 {
  margin: 0 0 16px;
  color: #173834;
  font-size: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.upload-grid,
.check-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.upload-grid button {
  min-height: 92px;
  border: 1px dashed #b9c7dc;
  border-radius: 4px;
  color: #0b8f73;
  background: #f4fff9;
}

.check-grid label {
  min-height: 42px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #f4fff9;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.overview-grid article {
  min-height: 130px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #f4fff9;
}

.overview-grid strong,
.overview-grid span {
  display: block;
}

.overview-grid span {
  margin: 10px 0 20px;
  font-size: 24px;
}

.overview-grid em {
  display: block;
  width: var(--w);
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0b8f73, #0b8f73);
}

.flow-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.finance-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.finance-board article {
  min-height: 108px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: linear-gradient(135deg, #f4fff9, #fff);
}

.finance-board strong,
.finance-board span {
  display: block;
}

.finance-board span {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.flow-board div {
  min-height: 112px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
}

.flow-board strong,
.flow-board span {
  display: block;
}

.flow-board span {
  margin-top: 12px;
  color: var(--muted);
}

.account-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.account-card,
.account-info-grid article,
.message-list article {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
}

.account-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  background: #f4fff9;
}

.avatar-lg {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  background: linear-gradient(135deg, #0b8f73, #0b8f73);
}

.account-card span,
.account-info-grid span,
.message-list span,
.message-list em {
  color: var(--muted);
}

.account-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.account-info-grid article {
  min-height: 104px;
  padding: 18px;
}

.account-info-grid strong {
  display: block;
  margin-top: 12px;
  font-size: 18px;
}

.message-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.message-tabs button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 14px;
  background: #fff;
}

.message-tabs button.active {
  color: #0b8f73;
  border-color: #9fc4ff;
  background: #e9fff5;
}

.message-list {
  display: grid;
  gap: 10px;
}

.message-list article {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 100px;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 14px 16px;
}

.promo-row {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.9fr);
  gap: 10px;
}

.promo-card {
  min-height: 104px;
  border-radius: 3px;
  padding: 25px 30px;
  color: #fff;
  overflow: hidden;
  position: relative;
}

.content-page[data-page-panel="dashboard"] .promo-card {
  min-height: 72px;
  padding: 16px 22px;
}

.content-page[data-page-panel="dashboard"] .promo-card strong {
  font-size: 20px;
  margin-bottom: 5px;
}

.promo-card strong {
  display: block;
  font-size: 24px;
  margin-bottom: 8px;
}

.promo-card span {
  font-size: 14px;
}

.service-promo {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.08)),
    linear-gradient(135deg, #33475f, #aab8c4);
}

.service-promo::after {
  position: absolute;
  right: 28px;
  bottom: 6px;
  z-index: 0;
  color: rgba(255, 255, 255, 0.16);
  content: "www.cuiyuncang.com";
  font-size: clamp(26px, 3.1vw, 44px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
}

.service-promo strong,
.service-promo span {
  position: relative;
  z-index: 1;
}

.support-promo {
  background: linear-gradient(135deg, #0b8f73, #0b8f73);
}

.support-promo strong,
.support-promo span {
  position: relative;
  z-index: 1;
  max-width: 100%;
}

.realtime-panel {
  padding: 18px 20px 14px;
}

.content-page[data-page-panel="dashboard"] .panel {
  padding: 12px 14px;
}

.content-page[data-page-panel="dashboard"] .panel-header {
  margin-bottom: 8px;
}

.content-page[data-page-panel="dashboard"] .panel-header h3 {
  font-size: 16px;
}

.content-page[data-page-panel="dashboard"] .realtime-panel {
  padding: 10px 14px 8px;
}

.panel-header .date-note {
  margin-right: auto;
  color: #303133;
  font-size: 13px;
}

.live-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid transparent;
}

.live-metrics article {
  min-height: 86px;
  padding: 9px 22px;
  border-right: 1px solid #d8ece4;
}

.content-page[data-page-panel="dashboard"] .live-metrics article {
  min-height: 58px;
  padding: 6px 14px;
}

.live-metrics article:last-child {
  border-right: 0;
}

.live-metrics span,
.live-metrics a {
  display: inline-block;
  color: #303133;
  font-size: 14px;
}

.live-metrics a {
  margin-left: 10px;
  color: #0b8f73;
  font-size: 13px;
}

.live-metrics a:hover {
  text-decoration: underline;
}

.metric-tooltip {
  position: fixed;
  z-index: 80;
  min-width: 188px;
  max-width: 240px;
  padding: 10px 12px;
  border: 1px solid rgba(16, 167, 125, 0.18);
  border-radius: 6px;
  color: #173834;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 28px rgba(21, 50, 96, 0.18);
  pointer-events: none;
}

.metric-tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 18px;
  width: 10px;
  height: 10px;
  border-left: 1px solid rgba(16, 167, 125, 0.18);
  border-top: 1px solid rgba(16, 167, 125, 0.18);
  background: #fff;
  transform: rotate(45deg);
}

.metric-tooltip strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.metric-tooltip dl {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 5px 8px;
  margin: 0;
  font-size: 12px;
}

.metric-tooltip dt {
  color: #607a73;
}

.metric-tooltip dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

.live-metrics strong {
  display: block;
  margin-top: 20px;
  font-size: 26px;
}

.content-page[data-page-panel="dashboard"] .live-metrics strong {
  margin-top: 8px;
  font-size: 22px;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.8fr);
  gap: 10px;
}

.content-page[data-page-panel="dashboard"] .home-grid {
  gap: 8px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.content-page[data-page-panel="dashboard"] .service-grid {
  gap: 8px;
}

.service-grid article {
  min-height: 150px;
  padding: 24px 120px 18px 24px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 82% 55%, rgba(16, 167, 125, 0.22), transparent 34%),
    linear-gradient(135deg, #f4fff9, #e8fbf3);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.content-page[data-page-panel="dashboard"] .service-grid article {
  min-height: 92px;
  padding: 14px 82px 12px 16px;
  background:
    radial-gradient(circle at 86% 58%, rgba(16, 167, 125, 0.18), transparent 30%),
    linear-gradient(135deg, #f4fff9, #e8fbf3);
}

.service-grid article:hover,
.service-grid article:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(16, 167, 125, 0.12);
}

.service-grid strong {
  display: block;
  margin-bottom: 18px;
  font-size: 20px;
}

.content-page[data-page-panel="dashboard"] .service-grid strong {
  margin-bottom: 6px;
  font-size: 16px;
}

.service-grid p {
  margin: 0;
  color: #607a73;
  line-height: 1.75;
}

.content-page[data-page-panel="dashboard"] .service-grid p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  line-height: 1.45;
}

.empty-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  color: #a7b0bf;
  background:
    radial-gradient(circle at 50% 54%, rgba(16, 167, 125, 0.07), transparent 16%),
    linear-gradient(#fff, #fff);
}

.content-page[data-page-panel="dashboard"] .empty-state {
  min-height: 142px;
}

.quick-grid,
.help-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.content-page[data-page-panel="dashboard"] .quick-grid,
.content-page[data-page-panel="dashboard"] .help-list {
  gap: 8px;
}

.quick-grid button,
.help-list a {
  display: grid;
  min-height: 74px;
  place-items: center;
  border: 1px solid #d8ece4;
  border-radius: 4px;
  color: #173834;
  background: #f4fff9;
}

.content-page[data-page-panel="dashboard"] .quick-grid button,
.content-page[data-page-panel="dashboard"] .help-list a {
  min-height: 44px;
  font-size: 13px;
}

.help-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-page[data-page-panel="dashboard"].active {
  gap: 12px;
  padding: 12px 14px 18px;
}

.content-page[data-page-panel="dashboard"] .promo-row {
  grid-template-columns: minmax(0, 1.38fr) minmax(320px, 0.82fr);
  gap: 10px;
}

.content-page[data-page-panel="dashboard"] .promo-card {
  min-height: 76px;
  border-radius: 8px;
  padding: 16px 24px;
  box-shadow: 0 12px 28px rgba(0, 103, 83, 0.12);
}

.content-page[data-page-panel="dashboard"] .promo-card strong {
  position: relative;
  z-index: 1;
  margin-bottom: 4px;
  font-size: 20px;
}

.content-page[data-page-panel="dashboard"] .promo-card span {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.88);
}

.content-page[data-page-panel="dashboard"] .support-promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px 10px 24px;
}

.support-promo-copy {
  min-width: 0;
}

.support-qr {
  position: relative;
  z-index: 1;
  display: block;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 6px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 8px 18px rgba(0, 58, 48, 0.18);
}

.content-page[data-page-panel="dashboard"] .realtime-panel {
  padding: 12px;
}

.content-page[data-page-panel="dashboard"] .panel-header {
  min-height: 32px;
  margin-bottom: 8px;
}

.content-page[data-page-panel="dashboard"] .panel-header h3 {
  font-size: 17px;
}

.content-page[data-page-panel="dashboard"] .live-metrics {
  gap: 8px;
}

.content-page[data-page-panel="dashboard"] .live-metrics article {
  min-height: 78px;
  border: 1px solid rgba(171, 221, 202, 0.66);
  border-radius: 8px;
  padding: 12px 14px;
  background:
    radial-gradient(circle at 90% 20%, rgba(82, 217, 168, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 255, 251, 0.9));
}

.content-page[data-page-panel="dashboard"] .live-metrics span {
  font-weight: 600;
}

.content-page[data-page-panel="dashboard"] .live-metrics a {
  float: right;
  margin-left: 0;
  font-size: 12px;
}

.content-page[data-page-panel="dashboard"] .live-metrics strong {
  margin-top: 12px;
  color: #063a3d;
  font-size: 25px;
}

.content-page[data-page-panel="dashboard"] .home-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.72fr);
  gap: 12px;
  align-items: stretch;
}

.content-page[data-page-panel="dashboard"] .home-grid.lower {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
}

.content-page[data-page-panel="dashboard"] .dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.78fr);
  gap: 10px;
  align-items: stretch;
}

.content-page[data-page-panel="dashboard"] .dashboard-stack {
  display: grid;
  gap: 12px;
  grid-template-rows: minmax(228px, 228px) auto;
  align-content: start;
}

.content-page[data-page-panel="dashboard"] .panel {
  border-radius: 8px;
  padding: 12px;
}

.content-page[data-page-panel="dashboard"] .value-panel,
.content-page[data-page-panel="dashboard"] .notice-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 228px;
  min-height: 228px;
}

.content-page[data-page-panel="dashboard"] .service-grid {
  height: 100%;
  gap: 10px;
  min-height: 0;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.content-page[data-page-panel="dashboard"] .service-grid article {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 0;
  border: 1px solid rgba(171, 221, 202, 0.52);
  border-radius: 8px;
  padding: 12px 18px;
}

.content-page[data-page-panel="dashboard"] .service-grid article.service-placeholder {
  border-style: dashed;
  color: #7f9992;
  background:
    radial-gradient(circle at 86% 58%, rgba(127, 153, 146, 0.12), transparent 30%),
    linear-gradient(135deg, #fbfefd, #f1f7f4);
  cursor: default;
}

.content-page[data-page-panel="dashboard"] .service-grid article.service-placeholder::after {
  background: linear-gradient(135deg, rgba(127, 153, 146, 0.18), rgba(127, 153, 146, 0.08));
}

.content-page[data-page-panel="dashboard"] .service-grid article.service-placeholder strong,
.content-page[data-page-panel="dashboard"] .service-grid article.service-placeholder p {
  color: #7f9992;
}

.content-page[data-page-panel="dashboard"] .service-grid article::after {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(19, 188, 131, 0.24), rgba(7, 147, 159, 0.16));
  content: "";
}

.content-page[data-page-panel="dashboard"] .service-grid strong {
  margin-bottom: 4px;
  color: #063a3d;
  font-size: 15px;
}

.content-page[data-page-panel="dashboard"] .service-grid p {
  max-width: 88%;
  -webkit-line-clamp: 1;
  line-height: 1.35;
}

.content-page[data-page-panel="dashboard"] .notice-panel {
  display: flex;
  flex-direction: column;
  min-height: 228px;
  height: 228px;
  border-color: rgba(171, 221, 202, 0.9);
  box-shadow: 0 12px 28px rgba(5, 120, 102, 0.08);
}

.content-page[data-page-panel="dashboard"] .notice-panel .panel-header {
  flex: 0 0 58px;
  border-bottom: 0;
  background: transparent;
}

.content-page[data-page-panel="dashboard"] .notice-panel .panel-header h3 {
  padding-left: 13px;
  color: #0f3531;
  font-size: 18px;
  font-weight: 700;
}

.content-page[data-page-panel="dashboard"] .notice-panel .panel-header h3::before {
  top: 2px;
  bottom: 2px;
  width: 4px;
  border-radius: 2px;
  background: #13bc83;
}

.content-page[data-page-panel="dashboard"] .notice-panel .text-button {
  color: #087866;
  font-size: 17px;
  font-weight: 800;
}

.announcement-empty {
  display: grid;
  flex: 1;
  min-height: 0;
  margin: 0 14px 14px;
  place-items: center;
  border: 1px dashed rgba(127, 207, 178, 0.9);
  border-radius: 8px;
  color: #77928d;
  background: rgba(255, 255, 255, 0.56);
  font-size: 22px;
  font-weight: 800;
}

.announcement-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  min-height: 0;
  margin: 0 14px 12px;
  border: 1px dashed rgba(127, 207, 178, 0.9);
  border-radius: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.64);
  text-align: left;
}

.announcement-card strong {
  margin-bottom: 6px;
  color: #073b3a;
  font-size: 17px;
  line-height: 1.35;
}

.announcement-card p {
  margin: 0 0 8px;
  color: #38534f;
  font-size: 13px;
  line-height: 1.55;
}

.announcement-card span {
  color: #087866;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 800;
}

.content-page[data-page-panel="dashboard"] .quick-panel,
.content-page[data-page-panel="dashboard"] .help-panel {
  min-height: 112px;
}

.content-page[data-page-panel="dashboard"] .quick-grid,
.content-page[data-page-panel="dashboard"] .help-list {
  gap: 8px;
}

.content-page[data-page-panel="dashboard"] .quick-grid button,
.content-page[data-page-panel="dashboard"] .help-list a {
  min-height: 54px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.content-page[data-page-panel="dashboard"] .quick-grid button:hover,
.content-page[data-page-panel="dashboard"] .help-list a:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(5, 120, 102, 0.12);
}

.content-page[data-page-panel="operationManual"].active {
  display: block;
}

.operation-manual-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: calc(100vh - 148px);
}

.manual-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 18px;
  align-items: end;
  padding: 22px 24px;
  border: 1px solid rgba(22, 128, 112, 0.14);
  border-radius: 8px;
  background: linear-gradient(135deg, #f7fbfa, #eef7f4);
}

.manual-heading span {
  display: inline-flex;
  margin-bottom: 6px;
  color: #087866;
  font-size: 13px;
  font-weight: 700;
}

.manual-heading h2 {
  margin: 0;
  color: #073b3a;
  font-size: 26px;
  line-height: 1.25;
}

.manual-heading p {
  margin: 0;
  color: #5b716d;
  font-size: 14px;
  line-height: 1.7;
}

.manual-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.manual-nav {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(19, 144, 123, 0.14);
  border-radius: 8px;
  background: #fff;
}

.manual-nav a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  color: #36504c;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.manual-nav a:hover {
  background: #edf8f5;
  color: #087866;
}

.manual-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.manual-section {
  scroll-margin-top: 92px;
  padding: 20px;
  border: 1px solid rgba(22, 128, 112, 0.14);
  border-radius: 8px;
  background: #fff;
}

.manual-section-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.manual-section-head > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #0c7f70;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.manual-section-head h3 {
  margin: 0 0 4px;
  color: #083f3d;
  font-size: 19px;
}

.manual-section-head p {
  margin: 0;
  color: #607a75;
  font-size: 14px;
  line-height: 1.6;
}

.manual-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.manual-items section {
  min-height: 96px;
  padding: 14px;
  border: 1px solid rgba(116, 154, 146, 0.18);
  border-radius: 8px;
  background: #fbfdfc;
}

.manual-items strong {
  display: block;
  margin-bottom: 6px;
  color: #123c3a;
  font-size: 14px;
}

.manual-items p {
  margin: 0;
  color: #5c6f6b;
  font-size: 13px;
  line-height: 1.65;
}

.manual-items ol {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding-left: 20px;
  color: #314c48;
  font-size: 13px;
  line-height: 1.6;
}

.manual-items li::marker {
  color: #0c7f70;
  font-weight: 800;
}

.content-page[data-page-panel="releaseLogs"].active {
  display: block;
}

.release-log-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: calc(100vh - 148px);
}

.release-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 18px;
  align-items: end;
  padding: 22px 24px;
  border: 1px solid rgba(22, 128, 112, 0.14);
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fcfb, #edf8f4);
}

.release-heading span {
  display: inline-flex;
  margin-bottom: 6px;
  color: #087866;
  font-size: 13px;
  font-weight: 700;
}

.release-heading h2 {
  margin: 0;
  color: #073b3a;
  font-size: 26px;
  line-height: 1.25;
}

.release-heading p {
  margin: 0;
  color: #5b716d;
  font-size: 14px;
  line-height: 1.7;
}

.release-log-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.release-log-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(22, 128, 112, 0.14);
  border-radius: 8px;
  background: #fff;
}

.release-date {
  display: grid;
  place-items: center;
  align-self: start;
  min-height: 88px;
  border-radius: 8px;
  background: #0c7f70;
  color: #fff;
}

.release-date strong {
  font-size: 22px;
}

.release-date span {
  font-size: 12px;
  opacity: 0.84;
}

.release-card-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.release-card-head h3 {
  margin: 0;
  color: #083f3d;
  font-size: 19px;
}

.release-card-head span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 13px;
  padding: 0 10px;
  color: #087866;
  background: #e8f8f3;
  font-size: 12px;
  font-weight: 700;
}

.release-body p {
  margin: 0 0 10px;
  color: #607a75;
  font-size: 14px;
  line-height: 1.6;
}

.release-body ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #314c48;
  font-size: 13px;
  line-height: 1.65;
}

.app-shell {
  background:
    linear-gradient(135deg, rgba(3, 117, 95, 0.08), transparent 31%),
    linear-gradient(315deg, rgba(21, 196, 143, 0.12), transparent 36%),
    linear-gradient(125deg, #f7fff9 0%, #ffffff 46%, #e8fbf3 100%);
}

.icon-rail {
  background:
    linear-gradient(180deg, #063a3d 0%, #07584e 52%, #03433f 100%);
  box-shadow: inset -1px 0 0 rgba(199, 246, 226, 0.14);
}

.rail-logo {
  background: transparent;
  box-shadow:
    inset 0 -1px 0 rgba(199, 246, 226, 0.14);
}

.rail-item {
  color: rgba(222, 250, 238, 0.78);
}

.rail-item:hover,
.rail-item.active {
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(19, 188, 131, 0.95), rgba(5, 120, 102, 0.95));
  box-shadow: inset 3px 0 0 #d9fff0;
}

.sub-sidebar {
  border-right-color: rgba(171, 221, 202, 0.62);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 255, 251, 0.92));
  box-shadow: 10px 0 30px rgba(0, 103, 83, 0.04);
}

.sub-sidebar h2 {
  color: #063a3d;
  border-bottom-color: rgba(171, 221, 202, 0.52);
  background: rgba(244, 255, 249, 0.72);
}

.sub-group-title.group-page.active,
.sub-group-title.group-page:hover {
  color: #057866;
  background: rgba(219, 255, 241, 0.72);
}

.sub-item {
  color: #244741;
  background: transparent;
}

.sub-item.child.active::before {
  background: #13bc83;
}

.sub-item:hover,
.sub-item.active {
  color: #057866;
  background: rgba(244, 255, 249, 0.76);
}

.workspace {
  background:
    linear-gradient(105deg, transparent 0 25%, rgba(255, 255, 255, 0.62) 25% 26%, transparent 26% 58%, rgba(11, 127, 105, 0.05) 58% 59%, transparent 59%),
    repeating-linear-gradient(135deg, rgba(6, 128, 105, 0.032) 0 1px, transparent 1px 24px);
}

.topbar,
.tab-strip {
  border-bottom-color: rgba(171, 221, 202, 0.55);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.breadcrumb,
.top-tool,
.tenant-chip,
.user-chip,
.top-popover-title,
.user-menu-list button,
.page-tab,
.quick-grid button,
.help-list a {
  color: #173834;
}

.top-tool:hover,
.user-menu-list button:hover,
.live-metrics a,
.text-button {
  color: #057866;
}

.top-tool[data-top-panel="system"] .top-tool-icon,
.top-tool[data-top-panel="tasks"] .top-tool-icon,
.user-chip::before {
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(135deg, #52d9a8 0%, #13bc83 45%, #057866 100%);
}

.top-tool[data-top-panel="messages"] .top-tool-icon {
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(135deg, #7ef0c5 0%, #0b8f73 48%, #056b5f 100%);
}

.user-chip:hover {
  border-color: rgba(171, 221, 202, 0.86);
  color: #057866;
  background: #f4fff9;
}

.top-popover {
  border-color: rgba(171, 221, 202, 0.72);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 34px rgba(0, 103, 83, 0.14);
}

.user-menu-list button:hover {
  background: #e9fff5;
}

.page-tab {
  background: rgba(244, 255, 249, 0.86);
}

.page-tab.active {
  color: #ffffff;
  background: linear-gradient(135deg, #057866, #13bc83 56%, #07939f);
}

.panel,
.metric-card,
.report-block {
  border-color: rgba(171, 221, 202, 0.72);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(0, 103, 83, 0.08);
}

.content-page[data-page-panel="dashboard"] .panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 255, 251, 0.92));
}

.service-promo {
  background:
    linear-gradient(90deg, rgba(6, 58, 61, 0.78), rgba(6, 58, 61, 0.08)),
    radial-gradient(circle at 86% 48%, rgba(217, 255, 240, 0.48), transparent 26%),
    linear-gradient(135deg, #057866, #13bc83 58%, #07939f);
}

.support-promo {
  background:
    linear-gradient(90deg, rgba(5, 107, 95, 0.9), rgba(5, 107, 95, 0.14)),
    radial-gradient(circle at 85% 42%, rgba(255, 255, 255, 0.46), transparent 25%),
    linear-gradient(135deg, #0b7f69, #52d9a8);
}

.panel-header .date-note,
.live-metrics span,
.live-metrics a {
  color: #244741;
}

.live-metrics article {
  border-right-color: rgba(171, 221, 202, 0.56);
}

.live-metrics strong {
  color: #063a3d;
}

.metric-tooltip {
  border-color: rgba(16, 167, 125, 0.22);
  color: #173834;
  box-shadow: 0 12px 28px rgba(0, 103, 83, 0.16);
}

.metric-tooltip::before {
  border-left-color: rgba(16, 167, 125, 0.22);
  border-top-color: rgba(16, 167, 125, 0.22);
}

.service-grid article {
  background:
    radial-gradient(circle at 86% 58%, rgba(19, 188, 131, 0.22), transparent 30%),
    linear-gradient(135deg, #f7fff9, #e8fbf3);
}

.content-page[data-page-panel="dashboard"] .service-grid article {
  background:
    radial-gradient(circle at 86% 58%, rgba(19, 188, 131, 0.2), transparent 30%),
    linear-gradient(135deg, #f7fff9, #e8fbf3);
}

.service-grid article:hover,
.service-grid article:focus-visible {
  box-shadow: 0 10px 26px rgba(5, 120, 102, 0.14);
}

.service-grid p {
  color: #607a73;
}

.empty-state {
  color: #7f9992;
  background:
    radial-gradient(circle at 50% 54%, rgba(19, 188, 131, 0.08), transparent 16%),
    linear-gradient(rgba(255, 255, 255, 0.9), rgba(248, 255, 251, 0.9));
}

.quick-grid button,
.help-list a {
  border-color: rgba(171, 221, 202, 0.72);
  background: #f4fff9;
}

.quick-grid button:hover,
.help-list a:hover {
  color: #057866;
  border-color: rgba(16, 167, 125, 0.42);
  background: #e9fff5;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card,
.panel,
.report-block {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(37, 75, 120, 0.08);
}

.metric-card {
  display: grid;
  gap: 8px;
  min-height: 124px;
  padding: 20px;
}

.metric-card span,
.report-block span {
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  font-size: 28px;
}

.metric-card em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.good {
  color: var(--green) !important;
}

.warn {
  color: var(--amber) !important;
}

.danger {
  color: var(--red) !important;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.panel {
  padding: 18px;
}

.panel-header {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-header h3 {
  position: relative;
  margin: 0;
  padding-left: 13px;
  font-size: 18px;
}

.panel-header h3::before {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  width: 4px;
  border-radius: 2px;
  background: #0b8f73;
  content: "";
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.segmented button {
  min-width: 48px;
  height: 30px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
}

.segmented button.active {
  color: var(--primary);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 75, 120, 0.1);
}

.chart-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 16px;
  height: 240px;
  padding: 18px 8px 0;
  background:
    linear-gradient(to top, var(--line) 1px, transparent 1px) 0 0 / 100% 25%,
    var(--surface-soft);
  border-radius: 6px;
}

.chart-bars span {
  display: block;
  height: var(--h);
  min-height: 38px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, var(--primary), var(--cyan));
}

.todo-list,
.partner-list {
  display: grid;
  gap: 10px;
}

.todo-list button {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--text);
  background: var(--surface-soft);
}

.todo-list span {
  color: var(--amber);
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

.quick-loan-fit .table-wrap {
  min-height: 0;
  max-height: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.quick-loan-fit table {
  min-width: 1560px;
  font-size: 12px;
}

.quick-loan-fit th,
.quick-loan-fit td {
  height: 34px;
  padding: 0 7px;
}

.quick-loan-fit th {
  position: sticky;
  top: 0;
  z-index: 2;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  height: 48px;
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: #526176;
  background: var(--surface-soft);
  font-weight: 700;
}

.empty-cell {
  height: 96px;
  color: #98a4b5;
  text-align: center;
}

.empty-card {
  display: grid;
  min-height: 120px;
  place-items: center;
  grid-column: 1 / -1;
  border: 1px dashed #c9d5e6;
  border-radius: 3px;
  color: #98a4b5;
  background: #f4fff9;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.status.ok {
  color: #117449;
  background: #e8f7ef;
}

.status.wait {
  color: #9b650d;
  background: #fff2d7;
}

.status.bad {
  color: #b83636;
  background: #ffe8e8;
}

.row-actions {
  display: flex;
  gap: 8px;
}

.row-actions button {
  border: 0;
  color: var(--primary);
  background: transparent;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px 86px;
  gap: 10px;
  margin-bottom: 14px;
}

.wide-filters {
  grid-template-columns: minmax(260px, 1fr) 150px 150px 150px 86px;
}

.supplier-filters,
.lender-filters {
  grid-template-columns: repeat(4, minmax(132px, 1fr)) repeat(4, max-content);
  align-items: end;
}

.lender-filters {
  grid-template-columns: repeat(5, minmax(118px, 1fr)) repeat(4, max-content);
}

.supplier-filters label,
.lender-filters label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.supplier-filters input,
.supplier-filters select,
.lender-filters input,
.lender-filters select {
  min-height: 38px;
}

.wide-filters > button:last-child:nth-child(4) {
  grid-column: auto;
}

.content-page[data-page-panel="reports"] .wide-filters {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(110px, 1fr) 78px minmax(110px, 1fr) minmax(112px, 130px) minmax(126px, 142px) minmax(126px, 142px) auto auto auto;
  align-items: end;
  gap: 8px;
  margin-bottom: 10px;
}

.content-page[data-page-panel="reports"] .wide-filters label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.content-page[data-page-panel="reports"] .wide-filters input,
.content-page[data-page-panel="reports"] .wide-filters select {
  min-height: 34px;
  padding: 0 9px;
  font-size: 13px;
}

.content-page[data-page-panel="reports"] .wide-filters button {
  min-height: 34px;
  padding: 0 13px;
  white-space: nowrap;
}

.content-page[data-page-panel="reports"] .checkbox-field {
  grid-template-columns: 1fr;
  align-content: end;
  justify-items: center;
}

.content-page[data-page-panel="reports"] .checkbox-field input {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

.content-page[data-page-panel="reports"] .table-wrap {
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  overflow: auto;
}

.content-page[data-page-panel="reports"] table {
  width: max-content;
  min-width: 100%;
  font-size: 12px;
}

.content-page[data-page-panel="reports"] th,
.content-page[data-page-panel="reports"] td {
  height: 34px;
  padding: 0 8px;
}

.content-page[data-page-panel="reports"] th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.price-report-controls {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(280px, 1fr) minmax(220px, auto) auto;
  align-items: center;
  gap: 14px;
  min-height: 34px;
}

.price-radio-group,
.price-report-tabs,
.price-report-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-radio-group label {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 5px !important;
  color: var(--text) !important;
  white-space: nowrap;
}

.price-radio-group input {
  width: 14px !important;
  min-height: 14px !important;
  padding: 0 !important;
}

.price-report-tabs span {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-bottom: 2px solid transparent;
  color: #526176;
  font-weight: 600;
}

.price-report-tabs span.active {
  color: var(--primary);
  border-color: var(--primary);
}

.price-report-actions {
  justify-content: flex-end;
}

.stagnant-report-tabs {
  display: flex;
  grid-column: 1 / -2;
  align-items: center;
  gap: 24px;
  min-height: 32px;
  color: #526176;
  font-weight: 600;
}

.stagnant-report-tabs span {
  display: inline-flex;
  align-items: center;
  height: 28px;
  border-bottom: 2px solid transparent;
}

.stagnant-report-tabs span:first-child {
  color: var(--primary);
  border-color: var(--primary);
}

.report-radio-row {
  display: flex;
  grid-column: span 3;
  align-items: center;
  gap: 12px;
  min-width: 260px;
  min-height: 34px;
}

.report-radio-row label {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 5px !important;
  color: var(--text) !important;
  white-space: nowrap;
}

.report-radio-row input {
  width: 14px !important;
  min-height: 14px !important;
  padding: 0 !important;
}

.borrower-list-panel {
  margin-bottom: 12px;
}

.borrower-list-filters {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(150px, 190px) minmax(320px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.borrower-list-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.borrower-list-filters select,
.borrower-list-filters input {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 10px;
  background: var(--surface);
}

.borrower-date-range {
  grid-template-columns: 94px minmax(130px, 1fr) 18px minmax(130px, 1fr);
  align-items: center;
}

.borrower-date-range span {
  grid-column: 1;
}

.borrower-date-range input:first-of-type {
  grid-column: 2;
}

.borrower-date-range em {
  grid-column: 3;
  color: var(--muted);
  font-style: normal;
  text-align: center;
}

.borrower-date-range input:last-of-type {
  grid-column: 4;
}

.borrower-filter-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  white-space: nowrap;
}

.borrower-filter-actions button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 4px;
}

.borrowed-inventory-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.borrowed-inventory-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.borrowed-inventory-filters label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.borrowed-inventory-filters input,
.borrowed-inventory-filters select {
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 9px;
  background: var(--surface);
}

.borrowed-filter-actions,
.borrowed-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.borrowed-filter-actions {
  grid-column: 2 / -1;
  justify-content: flex-end;
}

.borrowed-toolbar {
  justify-content: flex-end;
  padding-top: 2px;
}

.borrowed-cycle-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.borrowed-cycle-filters {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(140px, 180px) auto auto 1fr;
  gap: 10px;
  align-items: end;
}

.borrowed-cycle-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.borrowed-cycle-filters select,
.borrowed-cycle-filters input {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 9px;
  background: var(--surface);
}

.borrowed-cycle-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.borrowed-cycle-summary article {
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  background: #fff;
}

.borrowed-cycle-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.borrowed-cycle-summary strong {
  display: block;
  margin-top: 6px;
  color: var(--primary-deep);
  font-size: 18px;
}

.borrow-in-overdue-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.borrow-in-overdue-filters {
  display: grid;
  grid-template-columns: minmax(150px, 200px) minmax(120px, 150px) minmax(150px, 190px) minmax(320px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.borrow-in-overdue-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.borrow-in-overdue-filters select,
.borrow-in-overdue-filters input {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 9px;
  background: var(--surface);
}

.borrow-in-date-range {
  grid-template-columns: 76px minmax(120px, 1fr) 18px minmax(120px, 1fr);
  align-items: center;
}

.borrow-in-date-range span {
  grid-column: 1;
}

.borrow-in-date-range input:first-of-type {
  grid-column: 2;
}

.borrow-in-date-range em {
  grid-column: 3;
  color: var(--muted);
  font-style: normal;
  text-align: center;
}

.borrow-in-date-range input:last-of-type {
  grid-column: 4;
}

.borrow-in-overdue-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.borrow-in-overdue-summary article {
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  background: #fff;
}

.borrow-in-overdue-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.borrow-in-overdue-summary strong {
  display: block;
  margin-top: 6px;
  color: var(--primary-deep);
  font-size: 18px;
}

.borrow-in-cycle-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.borrow-in-cycle-filters {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(140px, 180px) auto auto 1fr;
  gap: 10px;
  align-items: end;
}

.borrow-in-cycle-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.borrow-in-cycle-filters select,
.borrow-in-cycle-filters input {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 9px;
  background: var(--surface);
}

.borrow-in-cycle-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.borrow-in-cycle-summary article {
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  background: #fff;
}

.borrow-in-cycle-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.borrow-in-cycle-summary strong {
  display: block;
  margin-top: 6px;
  color: var(--primary-deep);
  font-size: 18px;
}

.small-action {
  min-height: 36px;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.warehouse-card,
.partner-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface-soft);
}

.borrower-card {
  border-color: #d8ece4;
  background: #f4fff9;
}

.danger-text {
  color: #d83b3b;
}

.warehouse-card {
  display: grid;
  gap: 14px;
}

.warehouse-card header,
.partner-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.stock-meter {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef6;
}

.stock-meter span {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.report-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  gap: 14px;
  margin-bottom: 16px;
}

.report-chart,
.rank-list {
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 16px;
  background: var(--surface-soft);
}

.chart-bars.compact {
  height: 246px;
  padding-top: 18px;
}

.rank-list h4 {
  margin: 0 0 14px;
  font-size: 16px;
}

.rank-list ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.rank-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.rank-list li::marker {
  color: #0b8f73;
  font-weight: 700;
}

.rank-list span {
  display: inline-block;
  min-width: 120px;
}

.rank-list strong {
  float: right;
}

.report-block {
  display: grid;
  gap: 8px;
  min-height: 110px;
  padding: 18px;
}

.report-block strong {
  font-size: 24px;
}

.chart-line {
  position: relative;
  height: 260px;
  margin-top: 18px;
  border-radius: 6px;
  background:
    linear-gradient(to top, var(--line) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(135deg, rgba(16, 167, 125, 0.08), rgba(20, 184, 200, 0.08));
}

.chart-line span {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(16, 167, 125, 0.12);
}

.chart-line span:nth-child(1) { left: 8%; bottom: 30%; }
.chart-line span:nth-child(2) { left: 24%; bottom: 42%; }
.chart-line span:nth-child(3) { left: 40%; bottom: 38%; }
.chart-line span:nth-child(4) { left: 56%; bottom: 58%; }
.chart-line span:nth-child(5) { left: 72%; bottom: 64%; }
.chart-line span:nth-child(6) { left: 88%; bottom: 74%; }

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: #10a77d;
  box-shadow: 0 0 0 3px rgba(16, 167, 125, 0.14);
}

.process-steps article {
  background: #f4fff9;
}

.process-steps article.active {
  border-color: rgba(16, 167, 125, 0.34);
  background: #e9fff5;
}

.process-steps strong,
.panel-header h3::before {
  background: #13bc83;
}

.process-steps span {
  color: #173834;
}

.rank-list li::marker {
  color: #0b8f73;
}

.chart-line {
  background:
    linear-gradient(to top, var(--line) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(135deg, rgba(16, 167, 125, 0.08), rgba(20, 184, 200, 0.08));
}

.chart-line span {
  box-shadow: 0 0 0 6px rgba(16, 167, 125, 0.12);
}

.stat-strip strong,
.generic-summary strong,
.loan-order-stats strong,
.sales-order-stats strong,
.warehouse-sales-stats strong,
.sales-batch-stats strong,
.after-list-stats strong,
.after-receipt-stats strong,
.audit-review-stats strong,
.return-summary strong,
.quick-loan-summary strong,
.purchase-order-summary strong,
.borrowed-cycle-summary strong,
.borrow-in-overdue-summary strong,
.borrow-in-cycle-summary strong,
.detail-summary-grid strong,
.report-block strong {
  color: #0b8f73;
}

.drawer {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: flex-end;
  background: rgba(15, 28, 45, 0.34);
  z-index: 10;
}

.drawer.open {
  display: flex;
}

.drawer-panel {
  width: min(520px, 100vw);
  height: 100%;
  padding: 22px;
  background: var(--surface);
  box-shadow: -18px 0 44px rgba(15, 28, 45, 0.18);
  overflow: auto;
}

.drawer-form {
  display: grid;
  gap: 16px;
}

.drawer-actions {
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.drawer-body {
  display: grid;
  gap: 16px;
}

.quick-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(10, 18, 36, 0.28);
}

.service-contact-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(7, 23, 34, 0.46);
  backdrop-filter: blur(2px);
}

.service-contact-card {
  position: relative;
  width: min(660px, 90vw);
  overflow: hidden;
  border: 1px solid rgba(171, 221, 202, 0.76);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(3, 58, 54, 0.28);
}

.service-contact-close {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(3, 58, 54, 0.18);
  font-size: 30px;
  line-height: 1;
}

.service-contact-close:hover,
.service-contact-close:focus-visible {
  outline: none;
  background: rgba(3, 58, 54, 0.32);
}

.service-contact-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 190px;
  padding: 34px 46px 54px;
  color: #ffffff;
  background:
    radial-gradient(circle at 78% 26%, rgba(255, 255, 255, 0.34), transparent 26%),
    linear-gradient(135deg, #057866, #13bc83 58%, #07939f);
}

.service-contact-hero::after {
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: -44px;
  height: 90px;
  border-radius: 0 0 50% 50%;
  background: #ffffff;
  content: "";
}

.service-contact-hero div:first-child {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.service-contact-hero span {
  width: fit-content;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  color: #dffcf2;
  font-size: 14px;
  font-weight: 700;
}

.service-contact-hero strong {
  font-size: 46px;
  font-weight: 950;
  letter-spacing: 0;
}

.service-contact-hero em {
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
  font-style: normal;
  font-weight: 700;
}

.service-contact-badge {
  position: relative;
  z-index: 1;
  display: grid;
  width: 150px;
  height: 118px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 24px;
  color: #057866;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 34px rgba(3, 58, 54, 0.18);
  backdrop-filter: blur(10px);
  font-size: 24px;
  font-weight: 900;
  overflow: hidden;
}

.service-contact-badge img {
  display: block;
  width: 132px;
  height: 104px;
  object-fit: contain;
}

.service-contact-body {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 14px 46px 42px;
}

.service-contact-qr {
  position: relative;
  display: grid;
  width: 206px;
  height: 206px;
  place-items: center;
  border: 1px solid rgba(171, 221, 202, 0.72);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(5, 120, 102, 0.12);
}

.service-contact-qr::after {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 4px solid #ffffff;
  border-radius: 12px;
  color: #ffffff;
  background: #0b8f73;
  content: "翠";
  font-size: 20px;
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.service-contact-qr img {
  width: 176px;
  height: 176px;
  object-fit: contain;
}

.service-contact-info {
  display: grid;
  gap: 14px;
}

.service-contact-info span {
  color: #607a73;
  font-size: 18px;
  font-weight: 800;
}

.service-contact-info strong {
  color: #0b8f73;
  font-size: 36px;
  font-weight: 950;
  letter-spacing: 0;
}

.service-contact-info p {
  max-width: 360px;
  margin: 0;
  color: #607a73;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.8;
}

.quick-modal-card {
  width: min(760px, 92vw);
  max-height: min(78vh, 720px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(20, 35, 70, 0.22);
}

.quick-modal-header,
.quick-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.quick-modal-header h3 {
  margin: 0;
  font-size: 17px;
}

.quick-modal-body {
  min-height: 0;
  padding: 14px 16px;
  overflow: auto;
}

.quick-modal-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.quick-config-table {
  max-height: 48vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.quick-config-table table {
  min-width: 560px;
  font-size: 13px;
}

.quick-config-table th,
.quick-config-table td {
  height: 38px;
  padding: 0 10px;
}

.quick-style-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-style-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 14px;
  background: var(--surface-soft);
}

.modal-check {
  margin-top: 12px;
}

.confirm-text {
  margin: 0;
  color: #25324a;
  font-size: 15px;
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.detail-summary-grid article {
  padding: 12px;
  border: 1px solid #e5ecf6;
  border-radius: 4px;
  background: #f4fff9;
}

.detail-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-summary-grid strong {
  display: block;
  margin-top: 6px;
  color: #17213a;
  font-size: 20px;
}

.ai-service-panel {
  display: grid;
  gap: 14px;
}

.ai-service-hero {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 8px;
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 255, 255, 0.35), transparent 28%),
    linear-gradient(135deg, #057866, #13bc83 58%, #07939f);
  box-shadow: 0 14px 32px rgba(5, 120, 102, 0.16);
}

.ai-service-hero span,
.ai-service-hero em {
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
}

.ai-service-hero strong {
  font-size: 22px;
}

.ai-metric-grid,
.ai-band-grid,
.ai-service-overview {
  display: grid;
  gap: 10px;
}

.ai-metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ai-band-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ai-service-overview {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-metric-grid article,
.ai-band-grid article,
.ai-service-overview article,
.ai-advice-list article {
  border: 1px solid rgba(171, 221, 202, 0.62);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #f7fff9);
}

.ai-metric-grid span,
.ai-band-grid span,
.ai-service-overview p,
.ai-advice-list article {
  color: #607a73;
}

.ai-metric-grid strong,
.ai-band-grid strong,
.ai-service-overview strong {
  display: block;
  margin-top: 6px;
  color: #063a3d;
  font-size: 20px;
}

.ai-metric-grid em,
.ai-band-grid em {
  display: block;
  margin-top: 4px;
  color: #7f9992;
  font-style: normal;
  font-size: 12px;
}

.ai-service-overview article.muted,
.ai-service-overview article.is-reserved {
  border-style: dashed;
  background: #fbfefd;
}

.ai-service-overview article.is-reserved strong,
.ai-service-overview article.is-reserved p {
  color: #7f9992;
}

.ai-advice-list {
  display: grid;
  gap: 8px;
}

.ai-service-table {
  max-height: 360px;
}

.ai-service-table table {
  table-layout: fixed;
}

.ai-service-table th,
.ai-service-table td {
  vertical-align: middle;
}

.ai-service-table th:nth-child(1),
.ai-service-table td:nth-child(1) {
  width: 118px;
}

.ai-service-table th:nth-child(2),
.ai-service-table td:nth-child(2),
.ai-service-table th:nth-child(5),
.ai-service-table td:nth-child(5),
.ai-service-table th:nth-child(7),
.ai-service-table td:nth-child(7) {
  width: 86px;
  text-align: center;
}

.ai-service-table th:nth-child(3),
.ai-service-table td:nth-child(3),
.ai-service-table th:nth-child(4),
.ai-service-table td:nth-child(4),
.ai-service-table th:nth-child(6),
.ai-service-table td:nth-child(6),
.ai-service-table th:nth-child(8),
.ai-service-table td:nth-child(8) {
  text-align: left;
}

.ai-service-table .product-thumb {
  width: 54px;
  height: 54px;
  border-radius: 6px;
  margin: 0 auto;
}

.ai-service-detail-page {
  min-height: calc(100vh - 142px);
  padding: 22px;
  background:
    radial-gradient(circle at 12% 12%, rgba(19, 188, 131, 0.07), transparent 24%),
    linear-gradient(180deg, #ffffff, #f7fff9);
}

.ai-service-detail-page > .panel-header {
  margin-bottom: 16px;
}

.ai-service-detail-body {
  max-width: 1180px;
}

.ai-service-detail-body .ai-service-panel {
  gap: 16px;
}

.ai-service-detail-body .ai-service-hero {
  min-height: 136px;
}

.ai-match-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1.4fr)) minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(171, 221, 202, 0.62);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fff9);
}

.ai-match-filters label,
.ai-match-range {
  display: grid;
  gap: 6px;
}

.ai-match-filters span,
.ai-match-range span {
  color: #607a73;
  font-size: 13px;
  font-weight: 800;
}

.ai-match-filters input,
.ai-match-filters select {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(171, 221, 202, 0.82);
  border-radius: 6px;
  padding: 0 12px;
  color: #173834;
  background: #ffffff;
  outline: none;
}

.ai-match-filters input:focus,
.ai-match-filters select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 143, 115, 0.1);
}

.ai-match-range-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.ai-match-range-fields input[data-ai-match-filter$="Min"],
.ai-match-range-fields input[data-ai-match-filter$="Max"],
.ai-match-range-fields em {
  display: none;
}

.ai-match-range.is-range .ai-match-range-fields {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.ai-match-range.is-range .ai-match-range-fields input[data-ai-match-filter="budget"],
.ai-match-range.is-range .ai-match-range-fields input[data-ai-match-filter="size"] {
  display: none;
}

.ai-match-range.is-range .ai-match-range-fields input[data-ai-match-filter$="Min"],
.ai-match-range.is-range .ai-match-range-fields input[data-ai-match-filter$="Max"],
.ai-match-range.is-range .ai-match-range-fields em {
  display: block;
}

.ai-match-range-fields em {
  color: #7f9992;
  font-style: normal;
  font-weight: 800;
}

.ai-profile-workbench {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.35fr);
  gap: 12px;
  align-items: stretch;
}

.ai-profile-input,
.ai-profile-output {
  border: 1px solid rgba(171, 221, 202, 0.62);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, #f7fff9);
}

.ai-profile-head,
.ai-profile-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.ai-profile-head .drawer-section-title {
  margin: 0;
}

.ai-profile-customer-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.ai-profile-customer-field span {
  color: #607a73;
  font-size: 13px;
  font-weight: 800;
}

.ai-profile-customer-field input {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(171, 221, 202, 0.82);
  border-radius: 6px;
  padding: 0 12px;
  color: #173834;
  background: #ffffff;
  outline: none;
}

.ai-profile-input textarea {
  width: 100%;
  min-height: 330px;
  margin-top: 12px;
  border: 1px solid rgba(171, 221, 202, 0.82);
  border-radius: 8px;
  padding: 12px;
  color: #173834;
  background: #ffffff;
  outline: none;
  resize: vertical;
  line-height: 1.7;
}

.ai-profile-customer-field input:focus,
.ai-profile-input textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 143, 115, 0.1);
}

.ai-profile-actions {
  justify-content: flex-start;
  margin-top: 10px;
}

.ai-profile-output {
  display: grid;
  gap: 12px;
}

.ai-profile-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(171, 221, 202, 0.62);
}

.ai-profile-score span,
.ai-profile-fields span {
  color: #607a73;
  font-size: 13px;
  font-weight: 800;
}

.ai-profile-score strong {
  min-width: 72px;
  border-radius: 999px;
  padding: 6px 12px;
  color: #057866;
  text-align: center;
  background: rgba(19, 188, 131, 0.12);
}

.ai-profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ai-profile-fields article {
  display: grid;
  gap: 8px;
  min-height: 82px;
  border: 1px solid rgba(171, 221, 202, 0.54);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.ai-profile-fields article.span-2 {
  grid-column: 1 / -1;
}

.ai-profile-fields strong {
  color: #063a3d;
  font-size: 18px;
}

.ai-profile-fields div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-profile-fields div span {
  border-radius: 999px;
  padding: 5px 9px;
  color: #057866;
  background: rgba(19, 188, 131, 0.1);
}

.ai-profile-fields p {
  margin: 0;
  color: #173834;
  line-height: 1.7;
}

.ai-profile-suggestions {
  display: grid;
  gap: 8px;
}

.ai-profile-suggestions .drawer-section-title {
  margin: 0;
}

.ai-profile-suggestions article {
  border: 1px solid rgba(171, 221, 202, 0.54);
  border-radius: 8px;
  padding: 10px 12px;
  color: #173834;
  background: #ffffff;
}

.ai-customer-reference-table th:nth-child(1),
.ai-customer-reference-table td:nth-child(1) {
  width: 108px;
}

.ai-customer-reference-table th:nth-child(2),
.ai-customer-reference-table td:nth-child(2),
.ai-customer-reference-table th:nth-child(3),
.ai-customer-reference-table td:nth-child(3) {
  width: 80px;
  text-align: center;
}

.ai-customer-reference-table th:nth-child(4),
.ai-customer-reference-table td:nth-child(4),
.ai-customer-reference-table th:nth-child(5),
.ai-customer-reference-table td:nth-child(5),
.ai-customer-reference-table th:nth-child(6),
.ai-customer-reference-table td:nth-child(6) {
  width: 132px;
  text-align: left;
}

.ai-customer-reference-table th:nth-child(7),
.ai-customer-reference-table td:nth-child(7) {
  min-width: 220px;
  text-align: left;
}

.ai-customer-reference-table th:nth-child(8),
.ai-customer-reference-table td:nth-child(8) {
  width: 150px;
  text-align: center;
}

.ai-copy-workbench {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(520px, 1.35fr);
  gap: 12px;
  align-items: start;
}

.ai-copy-form,
.ai-copy-results {
  border: 1px solid rgba(171, 221, 202, 0.62);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, #f7fff9);
}

.ai-copy-form {
  display: grid;
  gap: 12px;
}

.ai-copy-form .drawer-section-title {
  margin: 0;
}

.ai-copy-note {
  border: 1px solid rgba(171, 221, 202, 0.54);
  border-radius: 8px;
  padding: 10px 12px;
  color: #607a73;
  background: rgba(19, 188, 131, 0.08);
  line-height: 1.6;
}

.ai-copy-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ai-copy-form-grid.compact {
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
}

.ai-copy-form label {
  display: grid;
  gap: 6px;
}

.ai-copy-form label span {
  color: #607a73;
  font-size: 13px;
  font-weight: 800;
}

.ai-copy-form input,
.ai-copy-form select,
.ai-copy-form textarea {
  width: 100%;
  border: 1px solid rgba(171, 221, 202, 0.82);
  border-radius: 6px;
  color: #173834;
  background: #ffffff;
  outline: none;
}

.ai-copy-form input,
.ai-copy-form select {
  height: 40px;
  padding: 0 12px;
}

.ai-copy-form textarea {
  min-height: 82px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.6;
}

.ai-copy-form input:focus,
.ai-copy-form select:focus,
.ai-copy-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 143, 115, 0.1);
}

.ai-copy-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ai-copy-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 260px;
  border: 1px solid rgba(171, 221, 202, 0.54);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.ai-copy-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(171, 221, 202, 0.54);
}

.ai-copy-card-head strong {
  color: #063a3d;
}

.ai-copy-card pre {
  margin: 0;
  padding: 12px;
  color: #173834;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
  font-family: inherit;
  font-size: 13px;
}

.ai-copy-record-table th:nth-child(1),
.ai-copy-record-table td:nth-child(1) {
  width: 150px;
}

.ai-copy-record-table th:nth-child(2),
.ai-copy-record-table td:nth-child(2),
.ai-copy-record-table th:nth-child(3),
.ai-copy-record-table td:nth-child(3) {
  width: 100px;
  text-align: center;
}

.ai-copy-record-table th:nth-child(4),
.ai-copy-record-table td:nth-child(4) {
  text-align: left;
}

.ai-copy-record-table th:nth-child(5),
.ai-copy-record-table td:nth-child(5) {
  width: 150px;
  text-align: center;
}

.ai-copy-record-table th:nth-child(6),
.ai-copy-record-table td:nth-child(6) {
  width: 82px;
  text-align: center;
}

.ai-image-workbench {
  display: grid;
  grid-template-columns: minmax(340px, 0.85fr) minmax(520px, 1.35fr);
  gap: 12px;
  align-items: start;
}

.ai-image-form,
.ai-image-preview {
  border: 1px solid rgba(171, 221, 202, 0.62);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, #f7fff9);
}

.ai-image-form {
  display: grid;
  gap: 12px;
}

.ai-image-form .drawer-section-title,
.ai-image-preview .drawer-section-title {
  margin: 0;
}

.ai-image-uploader {
  display: grid;
  gap: 10px;
  border: 1px dashed rgba(5, 120, 102, 0.36);
  border-radius: 8px;
  padding: 12px;
  background: rgba(19, 188, 131, 0.06);
  cursor: pointer;
}

.ai-image-uploader img {
  display: block;
  width: 100%;
  max-height: 260px;
  border-radius: 8px;
  object-fit: contain;
  background: #ffffff;
}

.ai-image-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  gap: 8px;
  color: #607a73;
  text-align: center;
}

.ai-image-empty strong {
  color: #063a3d;
  font-size: 18px;
}

.ai-image-form label {
  display: grid;
  gap: 6px;
}

.ai-image-form label span {
  color: #607a73;
  font-size: 13px;
  font-weight: 800;
}

.ai-image-form input,
.ai-image-form select,
.ai-image-form textarea {
  width: 100%;
  border: 1px solid rgba(171, 221, 202, 0.82);
  border-radius: 6px;
  color: #173834;
  background: #ffffff;
  outline: none;
}

.ai-image-form input,
.ai-image-form select {
  height: 40px;
  padding: 0 12px;
}

.ai-image-form textarea {
  min-height: 82px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.6;
}

.ai-image-form input:focus,
.ai-image-form select:focus,
.ai-image-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 143, 115, 0.1);
}

.ai-image-preview {
  display: grid;
  gap: 12px;
}

.ai-image-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ai-image-preview-head span {
  color: #607a73;
  font-size: 13px;
  font-weight: 800;
}

.ai-image-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 520px);
  margin: 0 auto;
  border: 1px solid rgba(171, 221, 202, 0.62);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 36px rgba(5, 120, 102, 0.12);
}

.ai-image-stage.ratio-1-1 { aspect-ratio: 1 / 1; }
.ai-image-stage.ratio-3-4 { aspect-ratio: 3 / 4; }
.ai-image-stage.ratio-4-5 { aspect-ratio: 4 / 5; }
.ai-image-stage.ratio-9-16 { aspect-ratio: 9 / 16; max-height: 620px; }

.ai-image-stage.jade {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.9), transparent 28%),
    linear-gradient(135deg, #edf9f1, #bfe8d8);
}

.ai-image-stage.white {
  background:
    radial-gradient(circle at 50% 24%, #ffffff, transparent 30%),
    linear-gradient(180deg, #ffffff, #eef3f1);
}

.ai-image-stage.dark {
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.18), transparent 26%),
    linear-gradient(135deg, #102823, #031311);
}

.ai-image-stage.warm {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.76), transparent 24%),
    linear-gradient(135deg, #fff7e8, #e8d2a8);
}

.ai-image-cutout {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 72%;
  height: 72%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.18) 58%, transparent 72%);
}

.ai-image-cutout img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.22));
}

.ai-image-placeholder {
  color: #607a73;
  font-weight: 800;
}

.ai-image-watermark {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  padding: 6px 12px;
  color: rgba(6, 58, 61, 0.72);
  background: rgba(255, 255, 255, 0.62);
  font-weight: 900;
}

.ai-image-stage.dark .ai-image-watermark {
  color: rgba(255, 255, 255, 0.82);
  background: rgba(0, 0, 0, 0.24);
}

.watermark-right-bottom { right: 18px; bottom: 18px; }
.watermark-left-bottom { left: 18px; bottom: 18px; }
.watermark-right-top { right: 18px; top: 18px; }
.watermark-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  font-size: 28px;
  opacity: 0.28;
}

.ai-image-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ai-image-steps article,
.ai-image-note {
  border: 1px solid rgba(171, 221, 202, 0.54);
  border-radius: 8px;
  padding: 10px;
  color: #607a73;
  background: #ffffff;
}

.ai-image-steps strong {
  display: block;
  margin-bottom: 4px;
  color: #063a3d;
}

.ai-image-steps p {
  margin: 0;
}

.ai-image-record-table th:nth-child(1),
.ai-image-record-table td:nth-child(1) {
  width: 76px;
  text-align: center;
}

.ai-image-record-table th:nth-child(2),
.ai-image-record-table td:nth-child(2) {
  width: 116px;
  text-align: center;
}

.ai-image-record-table th:nth-child(3),
.ai-image-record-table td:nth-child(3),
.ai-image-record-table th:nth-child(4),
.ai-image-record-table td:nth-child(4) {
  width: 116px;
  text-align: center;
}

.ai-image-record-table th:nth-child(5),
.ai-image-record-table td:nth-child(5) {
  width: 150px;
  text-align: center;
}

.ai-image-record-table th:nth-child(6),
.ai-image-record-table td:nth-child(6) {
  width: 82px;
  text-align: center;
}

.drawer-section-title small {
  color: #7f9992;
  font-size: 13px;
  font-weight: 700;
}

.value-service-page {
  display: grid;
  align-content: start;
  min-height: calc(100vh - 142px);
  padding: clamp(28px, 4vw, 52px) clamp(28px, 5vw, 72px);
  background:
    radial-gradient(circle at 18% 18%, rgba(19, 188, 131, 0.08), transparent 24%),
    radial-gradient(circle at 88% 24%, rgba(7, 147, 159, 0.08), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f7fff9 100%);
}

.value-service-heading {
  max-width: 760px;
  justify-self: center;
  margin-bottom: clamp(24px, 3vw, 38px);
  text-align: center;
}

.value-service-heading span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 30px;
  margin-bottom: 12px;
  border: 1px solid rgba(11, 143, 115, 0.22);
  border-radius: 999px;
  color: var(--primary);
  background: rgba(244, 255, 249, 0.92);
  font-size: 13px;
  font-weight: 700;
}

.value-service-heading h2 {
  margin: 0;
  color: #173834;
  font-size: clamp(28px, 2.8vw, 40px);
  font-weight: 900;
  letter-spacing: 0;
}

.value-service-heading p {
  margin: 14px 0 0;
  color: #7f9992;
  font-size: 16px;
  font-weight: 600;
}

.value-service-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: min(1180px, 100%);
  justify-self: center;
  margin-bottom: 24px;
}

.value-service-stats article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 14px 20px;
  border: 1px solid rgba(171, 221, 202, 0.58);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(5, 120, 102, 0.08);
}

.value-service-stats span {
  color: #607a73;
  font-weight: 700;
}

.value-service-stats strong {
  color: var(--primary);
  font-size: 24px;
  font-weight: 900;
}

.value-service-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 16px;
  width: min(1180px, 100%);
  justify-self: center;
}

.value-service-cards article {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  align-items: center;
  min-height: 148px;
  overflow: hidden;
  padding: 22px 24px;
  border: 1px solid rgba(171, 221, 202, 0.52);
  border-radius: 8px;
  background:
    radial-gradient(circle at 86% 52%, rgba(82, 217, 168, 0.18), transparent 34%),
    linear-gradient(135deg, #f7fff9, #edf9f3);
  box-shadow: 0 14px 32px rgba(5, 120, 102, 0.08);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.value-service-cards article:hover,
.value-service-cards article:focus-visible {
  outline: none;
  border-color: rgba(11, 143, 115, 0.34);
  box-shadow: 0 18px 42px rgba(5, 120, 102, 0.14);
  transform: translateY(-2px);
}

.value-service-cards article.is-reserved {
  border-style: dashed;
  background:
    radial-gradient(circle at 86% 52%, rgba(127, 153, 146, 0.12), transparent 34%),
    linear-gradient(135deg, #fbfefd, #f3f8f5);
  cursor: default;
}

.value-service-cards article.is-reserved:hover {
  border-color: rgba(171, 221, 202, 0.52);
  box-shadow: 0 14px 32px rgba(5, 120, 102, 0.08);
  transform: none;
}

.value-service-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.value-service-copy strong {
  color: #173057;
  font-size: 21px;
  font-weight: 900;
}

.value-service-copy p {
  max-width: 520px;
  margin: 0;
  color: #607a73;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.65;
}

.value-service-icon {
  position: relative;
  z-index: 1;
  width: 86px;
  height: 86px;
  justify-self: end;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 82%, rgba(11, 143, 115, 0.28), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(219, 248, 238, 0.72));
  box-shadow: inset 0 0 0 1px rgba(11, 143, 115, 0.12), 0 18px 28px rgba(5, 120, 102, 0.14);
}

.value-service-icon::before,
.value-service-icon::after {
  position: absolute;
  content: "";
}

.value-service-icon.report::before {
  left: 25px;
  top: 17px;
  width: 38px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #dffaf0);
  box-shadow: inset 0 0 0 3px rgba(11, 143, 115, 0.18);
}

.value-service-icon.report::after {
  left: 34px;
  top: 30px;
  width: 22px;
  height: 22px;
  border: 6px solid #13bc83;
  border-top-color: #f8df93;
  border-radius: 50%;
}

.value-service-icon.match::before {
  left: 20px;
  top: 20px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #13bc83, #07939f);
  box-shadow: 14px 10px 0 rgba(248, 223, 147, 0.86);
}

.value-service-icon.match::after {
  left: 34px;
  top: 35px;
  width: 18px;
  height: 18px;
  border: 5px solid #ffffff;
  border-radius: 50%;
}

.value-service-icon.customer::before {
  left: 29px;
  top: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f8df93, #13bc83);
}

.value-service-icon.customer::after {
  left: 19px;
  top: 49px;
  width: 48px;
  height: 22px;
  border-radius: 24px 24px 16px 16px;
  background: linear-gradient(135deg, #13bc83, #07939f);
}

.value-service-icon.copywriting::before,
.value-service-icon.image::before,
.value-service-icon.certificate::before {
  left: 23px;
  top: 20px;
  width: 40px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #dffaf0);
  box-shadow: inset 0 0 0 3px rgba(11, 143, 115, 0.16);
}

.value-service-icon.copywriting::after {
  left: 34px;
  top: 32px;
  width: 28px;
  height: 6px;
  border-radius: 999px;
  background: #13bc83;
  box-shadow: 0 13px 0 #13bc83, 0 26px 0 #f8df93;
}

.value-service-icon.image::after {
  left: 32px;
  top: 34px;
  width: 24px;
  height: 20px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 70% 30%, #f8df93 0 4px, transparent 5px),
    linear-gradient(135deg, #13bc83, #07939f);
}

.value-service-icon.certificate::after {
  left: 34px;
  top: 31px;
  width: 20px;
  height: 28px;
  border-radius: 50%;
  border: 6px solid #13bc83;
  border-bottom-color: #f8df93;
}

.drawer-section-title {
  margin: 16px 0 8px;
  color: #17213a;
  font-size: 15px;
}

.detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.detail-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.detail-flow article {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #f4fff9;
}

.detail-flow article.active {
  color: var(--text);
  border-color: #9bc8ff;
  background: #edf6ff;
}

.detail-flow strong {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #3769a8;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.detail-row span {
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  min-width: 220px;
  padding: 13px 16px;
  border-radius: 6px;
  color: white;
  background: #24344a;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.version-refresh-pill,
.version-update-banner {
  position: fixed;
  z-index: 80;
  box-shadow: 0 14px 34px rgba(15, 41, 54, 0.18);
}

.version-refresh-pill {
  left: 298px;
  bottom: 18px;
  min-width: 88px;
  height: 34px;
  border: 1px solid rgba(39, 126, 106, 0.24);
  border-radius: 17px;
  color: #0f5f54;
  background: rgba(255, 255, 255, 0.94);
  font-size: 13px;
}

.version-update-banner {
  left: 298px;
  bottom: 62px;
  display: none;
  align-items: center;
  gap: 14px;
  max-width: min(520px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid rgba(39, 126, 106, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
}

.version-update-banner.show {
  display: flex;
}

.version-update-banner.is-update {
  border-color: rgba(202, 47, 56, 0.22);
}

.version-update-banner div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.version-update-banner strong {
  color: #173c3a;
}

.version-update-banner span {
  color: #667985;
  font-size: 13px;
}

.version-update-banner button {
  flex: 0 0 auto;
  height: 32px;
  border-radius: 6px;
  padding: 0 12px;
  border: 0;
  color: #fff;
  background: #0b7b68;
}

.version-update-banner [data-version-dismiss] {
  width: 28px;
  padding: 0;
  color: #59706c;
  background: #edf7f4;
}

@media (max-width: 760px) {
  .version-refresh-pill {
    left: 12px;
    bottom: 12px;
  }

  .version-update-banner {
    left: 12px;
    right: 12px;
    bottom: 54px;
    max-width: none;
  }
}

.clean-label-system {
  display: grid;
  gap: 16px;
  padding: 0;
  background: transparent;
}

.clean-label-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.clean-label-header h3 {
  margin: 0 0 4px;
  color: #172033;
  font-size: 18px;
}

.clean-label-header p {
  margin: 0;
  color: #697386;
}

.clean-label-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.clean-label-workbench {
  display: grid;
  grid-template-columns: minmax(540px, 1fr) minmax(300px, 340px);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.clean-label-stage,
.clean-label-props {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.clean-label-ruler {
  color: #7c8798;
  font-size: 12px;
}

.clean-label-ruler-x {
  display: flex;
  justify-content: space-between;
  width: 450px;
  margin: 0 0 6px;
  padding: 0 2px;
}

.clean-label-canvas {
  position: relative;
  width: 450px;
  height: 90px;
  overflow: hidden;
  border: 1px solid #1f2937;
  border-radius: 3px;
  background:
    linear-gradient(to right, rgba(22, 119, 255, 0.12) 1px, transparent 1px) 0 0 / 10px 10px,
    linear-gradient(to bottom, rgba(22, 119, 255, 0.12) 1px, transparent 1px) 0 0 / 10px 10px,
    #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.clean-label-item {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px dashed transparent;
  color: #000;
  cursor: move;
  user-select: none;
  line-height: 1;
}

.clean-label-item.selected {
  border-color: #0b8f73;
  background: rgba(22, 119, 255, 0.06);
}

.clean-label-barcode svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: #000;
}

.clean-label-text {
  white-space: nowrap;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

.clean-label-props {
  display: grid;
  gap: 12px;
  overflow: hidden;
}

.clean-label-props label {
  display: grid;
  gap: 5px;
  color: #536176;
  font-size: 13px;
}

.clean-label-props input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.clean-label-prop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
  gap: 10px;
  min-width: 0;
}

.clean-label-prop-grid label {
  min-width: 0;
}

.clean-print-label {
  position: relative;
  display: block;
  width: 45mm;
  height: 9mm;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.clean-print-item {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
  color: #000;
  line-height: 1;
}

.clean-print-barcode svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: #000;
}

.print-sheet {
  display: none;
}

.print-count {
  display: none !important;
}

.barcode-label {
  display: grid;
  width: var(--print-label-w, 58mm);
  height: var(--print-label-h, 36mm);
  place-items: center;
  align-content: center;
  gap: 3mm;
  break-inside: avoid;
  page-break-inside: avoid;
}

.barcode-bars {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 48mm;
  height: 16mm;
  gap: 0.55mm;
}

.barcode-bars span {
  width: calc(var(--w) * 0.45mm);
  background: #000;
}

.barcode-label strong {
  color: #000;
  font-family: Arial, sans-serif;
  font-size: 13pt;
  letter-spacing: 1px;
}

.template-print-label {
  position: relative;
  display: block;
  overflow: hidden;
  background: #fff;
}

.label-rotation-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.narrow-long-label .label-rotation-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 45mm;
  height: 9mm;
  transform: none;
  transform-origin: top left;
}

.print-design-item {
  position: absolute;
  display: inline-flex;
  align-items: center;
  min-height: 0;
  color: #000;
  font-family: Arial, sans-serif;
  transform: translate(var(--print-offset-x, 0), var(--print-offset-y, 0)) scale(var(--print-scale, 1)) rotate(var(--rotate, 0deg));
  transform-origin: center;
}

.print-barcode {
  display: block;
  width: var(--code-w, 120px);
  height: var(--code-h, 42px);
  min-height: 0;
  padding: 0 !important;
  align-items: stretch;
}

.print-barcode b {
  display: block;
  width: 100%;
  height: var(--code-h, 42px);
}

.print-barcode .barcode-svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: #000 !important;
  color: #000 !important;
  background: #fff !important;
}

.print-barcode span {
  width: calc(var(--w) * 0.45mm);
  background: #000;
}

.print-barcode em {
  display: none;
}

.narrow-long-label .print-barcode {
  width: var(--code-w, 136px);
  height: var(--code-h, 24px);
  min-height: 0;
}

.narrow-long-label .print-barcode b {
  height: var(--code-h, 24px);
}

.narrow-long-label .print-barcode em {
  display: none;
}

.print-qr {
  width: var(--code-w, 54px);
  height: var(--code-h, 54px);
}

.purchase-print-sheet {
  display: block;
  width: 190mm;
  min-height: 120mm;
  padding: 12mm;
  color: #000;
  background: #fff;
  page-break-after: always;
}

.purchase-print-sheet h2 {
  margin: 0 0 8mm;
  color: #000;
  text-align: center;
  font-size: 20pt;
}

.purchase-print-sheet .print-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4mm 10mm;
  margin-bottom: 8mm;
  font-size: 11pt;
}

.purchase-print-sheet table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10pt;
}

.purchase-print-sheet th,
.purchase-print-sheet td {
  border: 1px solid #000;
  padding: 3mm;
  text-align: left;
}

.print-qr b {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  width: 100%;
  height: 100%;
  padding: 3px;
  background: #fff;
}

.print-qr i {
  background: #fff;
}

.print-qr i.on {
  background: #000;
}

.print-box {
  width: var(--code-w, 70px);
  height: var(--code-h, 28px);
  border: 1px solid #000;
}

.print-line {
  width: var(--code-w, 86px);
  height: 1px;
  min-height: 1px;
  background: #000;
}

.print-image {
  justify-content: center;
  width: var(--code-w, 48px);
  height: var(--code-h, 32px);
  border: 1px solid #000;
}

@media print {
  @page {
    size: 45mm 9mm;
    margin: 0;
  }

  html,
  body {
    width: 45mm !important;
    height: 9mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  body > *:not(.print-sheet) {
    display: none !important;
  }

  .print-sheet {
    position: fixed !important;
    inset: 0 auto auto 0 !important;
    display: block;
    width: 45mm !important;
    height: 9mm !important;
    min-height: 0 !important;
    max-height: 9mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff;
  }

  .print-sheet .template-print-label {
    margin: 0 !important;
    padding: 0 !important;
    page-break-before: auto !important;
    page-break-after: auto !important;
    break-before: auto !important;
    break-after: auto !important;
  }

  .print-sheet .template-print-label:nth-of-type(n + 2) {
    display: none !important;
  }

  .template-print-label * {
    color: #000 !important;
  }

  .barcode-label {
    border: 0;
  }
}

@media (max-width: 980px) {
  .clean-label-workbench {
    grid-template-columns: 1fr;
  }

  .clean-label-prop-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .login-page {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .hero-visual {
    display: none;
  }

  .app-shell {
    grid-template-columns: 62px 168px minmax(0, 1fr);
  }

  .rail-logo,
  .rail-item {
    width: 62px;
  }

  .rail-item {
    min-height: 58px;
    font-size: 11px;
  }

  .rail-icon {
    width: 22px;
    height: 22px;
  }

  .rail-icon svg {
    width: 20px;
    height: 20px;
  }

  .sub-sidebar h2 {
    padding: 0 16px;
  }

  .sub-item {
    padding: 0 16px;
  }

  .sub-item.child {
    padding-left: 30px;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .main-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metrics-grid,
  .report-grid,
  .inventory-grid,
  .dashboard-layout,
  .stat-strip,
  .generic-summary,
  .process-steps,
  .promo-row,
  .home-grid,
  .dashboard-main-grid,
  .report-dashboard,
  .form-grid,
  .upload-grid,
  .check-grid,
  .overview-grid,
  .flow-board,
  .inventory-query-filters,
  .inventory-warning-filters,
  .inventory-overview-filters,
  .replenishment-filters,
  .transfer-order-filters,
  .stock-check-filters,
  .stock-adjust-filters,
  .purchase-order-filters,
  .purchase-order-summary,
  .quick-loan-panel,
  .quick-loan-fields,
  .quick-loan-search-row,
  .quick-loan-summary,
  .return-summary,
  .transfer-top-grid,
  .transfer-search-row,
  .transfer-summary,
  .finance-board {
    grid-template-columns: 1fr 1fr;
  }

  .content-page[data-page-panel="dashboard"] .dashboard-main-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  }

  .return-stock-main {
    grid-template-columns: 1fr;
  }

  .borrower-list-filters {
    grid-template-columns: 1fr 1fr;
  }

  .borrower-date-range,
  .borrower-filter-actions {
    grid-column: 1 / -1;
  }

  .borrowed-inventory-filters {
    grid-template-columns: 1fr 1fr;
  }

  .borrowed-filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .borrowed-cycle-filters,
  .borrowed-cycle-summary,
  .borrow-in-overdue-filters,
  .borrow-in-overdue-summary,
  .borrow-in-cycle-filters,
  .borrow-in-cycle-summary {
    grid-template-columns: 1fr 1fr;
  }

  .borrow-in-date-range {
    grid-column: 1 / -1;
  }

  .speed-entry {
    grid-template-columns: 1fr;
  }

  .settings-form,
  .settings-form.compact-grid,
  .system-list-tools {
    grid-template-columns: 1fr 1fr;
  }

  .filters,
  .wide-filters {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .login-page {
    padding: 18px;
  }

  .app-shell {
    grid-template-columns: 56px 132px minmax(0, 1fr);
  }

  .rail-logo,
  .rail-item {
    width: 56px;
  }

  .rail-logo {
    height: 62px;
  }

  .rail-logo-img {
    width: 52px;
    height: 52px;
  }

  .rail-logo .logo-gem {
    width: 25px;
    height: 25px;
  }

  .cyc-logo.rail {
    width: 38px;
    height: 38px;
  }

  .cyc-logo.rail b {
    font-size: 21px;
  }

  .cyc-logo.rail em {
    font-size: 7px;
  }

  .rail-item {
    min-height: 54px;
    gap: 2px;
    font-size: 10px;
  }

  .rail-icon {
    width: 20px;
    height: 20px;
  }

  .rail-icon svg {
    width: 18px;
    height: 18px;
  }

  .sub-sidebar h2 {
    height: 46px;
    padding: 0 12px;
    font-size: 15px;
  }

  .sub-nav {
    padding-top: 4px;
  }

  .sub-item {
    height: 40px;
    padding: 0 12px;
    font-size: 13px;
  }

  .sub-item.child {
    height: 36px;
    padding-left: 22px;
    font-size: 12px;
  }

  .login-panel {
    padding: 28px 22px;
  }

  .brand-lockup h1 {
    font-size: clamp(17px, 5.4vw, 21px);
  }

  .login-links,
  .topbar,
  .top-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .manual-heading {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .manual-heading h2 {
    font-size: 22px;
  }

  .manual-layout {
    grid-template-columns: 1fr;
  }

  .manual-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 8px;
  }

  .manual-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .manual-section {
    padding: 16px;
  }

  .manual-section-head {
    flex-direction: column;
  }

  .manual-items {
    grid-template-columns: 1fr;
  }

  .release-heading {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .release-heading h2 {
    font-size: 22px;
  }

  .release-log-card {
    grid-template-columns: 1fr;
  }

  .release-date {
    display: flex;
    justify-content: space-between;
    min-height: 54px;
    padding: 0 16px;
  }

  .main-nav,
  .metrics-grid,
  .report-grid,
  .inventory-grid,
  .dashboard-layout,
  .filters,
  .wide-filters,
  .stat-strip,
  .generic-summary,
  .process-steps,
  .promo-row,
  .home-grid,
  .dashboard-main-grid,
  .service-grid,
  .quick-grid,
  .help-list,
  .report-dashboard,
  .scan-panel,
  .inline-scan,
  .form-grid,
  .upload-grid,
  .check-grid,
  .overview-grid,
  .flow-board,
  .finance-board,
  .account-layout,
  .account-info-grid,
  .form-steps,
  .speed-entry,
  .speed-form,
  .label-price,
  .speed-options,
  .inventory-query-filters,
  .inventory-warning-filters,
  .inventory-overview-filters,
  .replenishment-filters,
  .transfer-order-filters,
  .stock-check-filters,
  .stock-adjust-filters,
  .purchase-order-filters,
  .purchase-order-summary,
  .quick-loan-panel,
  .quick-loan-fields,
  .quick-loan-search-row,
  .quick-loan-toolbar,
  .quick-loan-summary,
  .return-search-row,
  .return-summary,
  .return-stock-main,
  .transfer-top-grid,
  .transfer-search-row,
  .transfer-summary {
    grid-template-columns: 1fr;
  }

  .transfer-search-row .primary {
    width: auto;
    margin-left: 0;
  }

  .quick-loan-fields label.span-2 {
    grid-column: auto;
  }

  .system-list-tools,
  .settings-form,
  .settings-form.compact-grid {
    grid-template-columns: 1fr;
  }

  .speed-card {
    min-height: auto;
  }

  .speed-form .field {
    grid-template-columns: 1fr;
  }

  .speed-form .field span,
  .label-price-title {
    text-align: left;
  }

  .barcode-preview {
    margin-left: 0;
  }

  .workspace {
    padding: 18px 14px 28px;
  }

  .panel {
    padding: 14px;
  }
}

@media (max-width: 1180px) {
  .template-design-workbench {
    grid-template-columns: 160px minmax(360px, 1fr) minmax(240px, 280px);
  }

  .template-prop-grid {
    grid-template-columns: 1fr;
  }

  .value-service-cards {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }

  .ai-profile-workbench {
    grid-template-columns: 1fr;
  }

  .ai-copy-workbench,
  .ai-copy-results,
  .ai-image-workbench {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .value-service-page {
    padding: 28px 14px;
  }

  .value-service-stats {
    grid-template-columns: 1fr;
  }

  .value-service-cards article {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .value-service-icon {
    justify-self: start;
  }

  .service-contact-modal {
    padding: 14px;
  }

  .service-contact-hero {
    min-height: 168px;
    padding: 30px 24px 48px;
  }

  .service-contact-hero strong {
    font-size: 40px;
  }

  .service-contact-badge {
    display: none;
  }

  .service-contact-body {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 10px 28px 34px;
  }

  .service-contact-qr {
    width: 190px;
    height: 190px;
    justify-self: center;
  }

  .service-contact-qr img {
    width: 162px;
    height: 162px;
  }

  .service-contact-info {
    text-align: center;
  }

  .service-contact-info strong {
    font-size: 34px;
  }

  .ai-match-filters {
    grid-template-columns: 1fr;
  }

  .ai-profile-fields {
    grid-template-columns: 1fr;
  }

  .ai-profile-fields article.span-2 {
    grid-column: auto;
  }

  .ai-profile-head,
  .ai-profile-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-copy-form-grid,
  .ai-copy-form-grid.compact {
    grid-template-columns: 1fr;
  }

  .ai-image-preview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-image-steps {
    grid-template-columns: 1fr;
  }
}
