:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --line: #d9e1ea;
  --text: #182230;
  --muted: #64748b;
  --strong: #0f172a;
  --brand: #1f6f78;
  --brand-dark: #14545c;
  --green: #16845b;
  --blue: #2f5fb3;
  --amber: #b7791f;
  --red: #b42318;
  --violet: #6254b2;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #eef3f5;
  padding: 24px;
}

.login-panel {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 32px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark.small {
  width: 40px;
  height: 40px;
  font-size: 13px;
}

.login-panel h1 {
  margin: 18px 0 6px;
  font-size: 24px;
  letter-spacing: 0;
}

.login-panel p {
  color: var(--muted);
  margin: 0 0 24px;
}

.icp-link {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.icp-link:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

.login-icp {
  display: block;
  margin-top: 18px;
  text-align: center;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
}

input,
select,
textarea {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}

textarea {
  resize: vertical;
  min-height: 88px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 111, 120, 0.12);
}

.app-shell {
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-columns: 248px 1fr;
  overflow: hidden;
}

.sidebar {
  background: #17212b;
  color: #dbe4ee;
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-brand {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand strong {
  display: block;
  color: #fff;
  font-size: 16px;
}

.sidebar-brand span {
  display: block;
  color: #9fb0c3;
  font-size: 12px;
  margin-top: 3px;
}

.nav-menu {
  padding: 12px;
  display: grid;
  gap: 10px;
  overflow: auto;
  flex: 1;
  align-content: start;
}

.nav-section {
  display: grid;
  gap: 4px;
}

.nav-section-title {
  padding: 10px 12px 4px;
  color: #7f93a8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-item {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: #cbd7e4;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  text-align: left;
  position: relative;
}

.nav-item.has-unread::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18);
}

.nav-item svg,
button svg,
.search-box svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.nav-item:hover,
.nav-item.active {
  background: #223241;
  color: #fff;
}

.sidebar-utility {
  display: none;
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  gap: 8px;
}

.app-shell.compact-topbar .sidebar-utility {
  display: grid;
}

.app-shell.compact-topbar .topbar {
  display: none;
}

.sidebar-role,
.sidebar-notice-btn,
.sidebar-logout-btn {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: #dbe4ee;
}

.sidebar-role {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
}

.sidebar-role span {
  color: #9fb0c3;
  font-size: 12px;
}

.sidebar-role strong {
  color: #fff;
  font-size: 14px;
}

.sidebar-notice-btn,
.sidebar-logout-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 10px;
}

.sidebar-notice-btn:hover,
.sidebar-logout-btn:hover {
  background: #223241;
  color: #fff;
}

.sidebar-notice-btn svg,
.sidebar-logout-btn svg {
  width: 17px;
  height: 17px;
}

.main-area {
  min-width: 0;
  min-height: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.topbar {
  height: 64px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 8;
}

.mobile-title {
  display: none;
  font-weight: 700;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 720px;
}

.app-shell.hide-global-search .search-box {
  display: none;
}

.app-shell.hide-global-search .top-actions {
  margin-left: auto;
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.search-box input {
  width: 100%;
  padding-left: 38px;
}

.search-results {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 20;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-radius: 6px;
}

.search-result-item:hover {
  background: var(--panel-soft);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

#notificationButton,
#roleSwitch {
  display: none;
}

.icon-btn,
.ghost-btn,
.primary-btn,
.secondary-btn,
.danger-btn {
  min-height: 36px;
  border-radius: 6px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
}

.icon-btn {
  width: 36px;
  padding: 0;
  position: relative;
}

.ghost-btn {
  background: #fff;
}

.primary-btn {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.primary-btn:hover {
  background: var(--brand-dark);
}

.secondary-btn {
  background: #edf7f8;
  color: var(--brand-dark);
  border-color: #b9dde2;
}

.danger-btn {
  color: var(--red);
  border-color: #f1c9c5;
  background: #fff7f6;
}

.full {
  width: 100%;
}

.login-panel .ghost-btn.full {
  margin-top: 10px;
}

.login-note {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}

.dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--red);
}

.page-content {
  padding: 20px;
  min-width: 0;
  flex: 1 0 auto;
}

.app-footer {
  flex: 0 0 auto;
  padding: 0 24px 18px;
  text-align: center;
}

.page-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.page-title h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.page-title p {
  margin: 6px 0 0;
  color: var(--muted);
}

.action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.action-row.compact {
  margin-top: 0;
  align-items: center;
}

.action-row .action-row-leading {
  margin-right: auto;
}

.compact-actions {
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 6px;
}

.compact-actions .ghost-btn,
.compact-actions .secondary-btn,
.compact-actions .danger-btn {
  min-height: 30px;
  padding: 0 8px;
  white-space: nowrap;
}

.modal-tip {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card,
.panel,
.table-panel,
.chart-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric-card {
  padding: 16px;
  min-height: 112px;
  display: grid;
  align-content: space-between;
}

.metric-card span {
  color: var(--muted);
}

.metric-card strong {
  display: block;
  font-size: 26px;
  margin-top: 8px;
  letter-spacing: 0;
}

.metric-card small {
  color: var(--green);
}

.metric-card.warn small {
  color: var(--amber);
}

.metric-card.danger small {
  color: var(--red);
}

.content-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 16px;
}

.panel {
  padding: 16px;
  min-width: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  min-width: 0;
}

.panel-header h2,
.modal-header h2,
.drawer-header h2 {
  font-size: 16px;
  margin: 0;
  letter-spacing: 0;
}

.panel-header small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-bar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.filter-bar label {
  margin: 0;
  gap: 6px;
  font-size: 12px;
}

.order-filter-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(180px, 1fr) minmax(220px, 1.2fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.order-filter-panel label {
  margin: 0;
  gap: 6px;
  font-size: 12px;
}

.order-filter-panel .wide {
  min-width: 0;
}

.table-action-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.order-line-builder {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.order-line-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.order-line-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.order-item-list {
  display: grid;
  gap: 8px;
}

.order-item-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) minmax(76px, 0.65fr) minmax(96px, 0.8fr) minmax(88px, 0.75fr) minmax(104px, 0.9fr) 36px;
  gap: 8px;
  align-items: end;
}

.order-item-row label {
  margin: 0;
  gap: 5px;
  font-size: 12px;
}

.product-picker-label,
.customer-picker-label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.product-picker-input,
.customer-picker-input {
  width: 100%;
  min-width: 0;
}

.temporary-product-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.temporary-product-toggle input {
  width: auto;
  min-width: auto;
  margin: 0;
}

.live-order-temporary-sku {
  margin-top: 2px;
}

.modal-panel.product-detail-modal-panel {
  width: min(1120px, 100%);
}

.product-detail-modal-panel .modal-body,
.product-detail-modal-panel .form-grid,
.product-detail-modal-panel .order-line-builder,
.product-detail-modal-panel .order-item-list,
.product-detail-modal-panel .order-item-row,
.product-detail-modal-panel .sample-item-row,
.product-detail-modal-panel label,
.product-detail-modal-panel input,
.product-detail-modal-panel select,
.product-detail-modal-panel textarea {
  min-width: 0;
  box-sizing: border-box;
}

.product-detail-modal-panel .order-line-builder {
  overflow: hidden;
}

.info-grid.compact {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  margin-bottom: 0;
}

.report-filter-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
}

.report-filter-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.report-filter-header h2 {
  font-size: 16px;
  margin: 0 0 5px;
}

.report-filter-header p {
  color: var(--muted);
  margin: 0;
}

.report-active-filter-bar {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  margin-bottom: 12px;
  border: 1px solid #d8e7e9;
  border-radius: 7px;
  background: #f7fbfb;
}

.report-filter-basis {
  flex: 0 0 auto;
  padding: 4px 0;
  color: #365e64;
  font-size: 12px;
  font-weight: 700;
}

.report-filter-rule {
  flex: 0 0 auto;
  margin-top: 1px;
  padding: 3px 8px;
  border: 1px solid #cfe0e3;
  border-radius: 999px;
  background: #fff;
  color: #55737a;
  font-size: 12px;
  white-space: nowrap;
}

.report-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.report-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 3px 6px 3px 9px;
  border: 1px solid #b9dadd;
  border-radius: 999px;
  background: #eaf5f5;
  color: #155e65;
  font-size: 12px;
}

.report-filter-chip.is-locked {
  border-color: #d8dfe8;
  background: #f1f4f7;
  color: #526173;
}

.report-filter-chip button {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.report-filter-chip button:hover {
  background: rgba(15, 118, 110, 0.12);
}

.report-filter-chip svg {
  width: 13px;
  height: 13px;
}

.report-filter-empty {
  padding: 4px 0;
  color: var(--muted);
  font-size: 12px;
}

.report-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(135px, 1fr));
  gap: 10px;
}

.report-filter-grid label {
  margin: 0;
  gap: 6px;
  font-size: 12px;
}

.saved-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.pill-btn {
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid #b9dde2;
  background: #edf7f8;
  color: var(--brand-dark);
  padding: 0 11px;
}

.settings-shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.personal-settings-shell {
  grid-template-columns: 180px minmax(0, 1fr);
}

.settings-sidebar,
.settings-main {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.settings-sidebar {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 132px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.settings-tab {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  text-align: left;
}

.settings-tab:hover,
.settings-tab.active {
  background: #edf7f8;
  color: var(--brand-dark);
}

.settings-main {
  padding: 16px;
  min-width: 0;
}

.settings-main-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.settings-main-header h2 {
  margin: 0;
  font-size: 18px;
}

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

.permission-list,
.settings-form-list {
  display: grid;
  gap: 10px;
}

.switch-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: var(--text);
}

.switch-line input {
  width: 16px;
  height: 16px;
}

.permission-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.permission-card p {
  color: var(--muted);
  margin: 6px 0 10px;
}

.notice-panel {
  border: 1px solid #b9dde2;
  background: #edf7f8;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.notice-panel p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.compact-notice {
  padding: 10px 12px;
}

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

.role-permission-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
  min-width: 0;
}

.role-permission-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.role-permission-head small {
  color: var(--muted);
}

.permission-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.permission-action-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.permission-action-section > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--strong);
}

.permission-check {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 13px;
}

.permission-check input {
  width: 15px;
  height: 15px;
}

.permission-check span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dictionary-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.dictionary-menu {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 8px;
  display: grid;
  align-content: start;
  gap: 5px;
}

.dict-menu-item {
  min-height: 36px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
}

.dict-menu-item.active,
.dict-menu-item:hover {
  background: #fff;
  color: var(--brand-dark);
}

.dict-menu-item span {
  color: var(--muted);
}

.dictionary-layout > .panel {
  min-width: 0;
  overflow: hidden;
}

.dictionary-layout > .panel .table-wrap {
  max-height: calc(100vh - 332px);
  overflow: auto;
  overscroll-behavior: contain;
}

.switch-row {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: var(--text);
}

.switch-row input {
  min-height: auto;
  width: 18px;
  height: 18px;
}

.settings-actions {
  margin-top: 14px;
  justify-content: flex-start;
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}

.required-star {
  color: var(--red);
  font-weight: 800;
}

.form-hint {
  color: var(--muted);
  line-height: 1.7;
  margin: 12px 0 0;
}

.order-stat-rule {
  margin: 8px 0 12px;
  padding: 8px 12px;
  border-left: 3px solid var(--brand);
  background: #f1f8f8;
}

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

.required-field-card {
  align-content: start;
}

.transfer-filter-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.transfer-filter-panel label {
  margin: 0;
  gap: 6px;
  font-size: 12px;
}

.transfer-info-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
  margin-bottom: 10px;
}

.transfer-info-block strong {
  display: block;
  margin-bottom: 8px;
}

.transfer-info-block p {
  color: var(--muted);
  margin: 0;
}

.table-panel {
  overflow: hidden;
}

.table-toolbar {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.table-wrap {
  overflow: auto;
}

.product-search-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  position: relative;
  z-index: 6;
}

.product-search-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.product-search-form label {
  margin: 0;
  gap: 5px;
  font-size: 12px;
}

.product-search-form input,
.product-search-actions .primary-btn,
.product-search-actions .ghost-btn {
  box-sizing: border-box;
  height: 38px;
  min-height: 38px;
}

.product-search-actions,
.product-table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-table-panel {
  max-width: 100%;
}

.product-table-wrap {
  width: 100%;
  max-width: 100%;
  max-height: max(300px, calc(100vh - 320px));
  min-height: 240px;
  overflow: auto;
  overscroll-behavior: contain;
  padding-bottom: 3px;
  scrollbar-gutter: stable;
  scrollbar-color: #7ba7ad #e5eef0;
  scrollbar-width: auto;
}

.product-table-wrap::-webkit-scrollbar {
  height: 14px;
}

.product-table-wrap::-webkit-scrollbar-track {
  background: #e5eef0;
  border-radius: 999px;
}

.product-table-wrap::-webkit-scrollbar-thumb {
  background: #7ba7ad;
  border: 3px solid #e5eef0;
  border-radius: 999px;
}

.product-table-wrap::-webkit-scrollbar-thumb:hover {
  background: var(--brand);
}

.product-table {
  width: 1660px;
  min-width: 1660px;
  table-layout: fixed;
}

.product-table .product-col-name { width: 220px; }
.product-table .product-col-sku { width: 135px; }
.product-table .product-col-category { width: 165px; }
.product-table .product-col-activity { width: 260px; }
.product-table .product-col-price { width: 105px; }
.product-table .product-col-status { width: 100px; }
.product-table .product-col-online { width: 95px; }
.product-table .product-col-engineer { width: 145px; }
.product-table .product-col-remark { width: 170px; }
.product-table .product-col-actions { width: 160px; }

.product-table th,
.product-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 var(--line);
}

.product-table th:nth-child(1),
.product-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fff;
}

.product-table th:nth-child(2),
.product-table td:nth-child(2) {
  position: sticky;
  left: 220px;
  z-index: 3;
  background: #fff;
  border-right: 2px solid rgba(15, 118, 110, 0.12);
}

.product-table thead th:nth-child(1),
.product-table thead th:nth-child(2) {
  z-index: 5;
  background: #f7f9fb;
}

.product-table tr:hover td:nth-child(1),
.product-table tr:hover td:nth-child(2) {
  background: #fbfcfd;
}

.product-table td.product-operation-cell {
  overflow: visible;
}

.product-pagination {
  box-sizing: border-box;
  min-height: 48px;
  padding: 5px 10px;
  border-top: 1px solid var(--line);
  background: #fff;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  gap: 8px;
}

.product-page-range {
  color: var(--muted);
  font-size: 13px;
}

.product-page-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.product-page-controls button {
  min-width: 32px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--strong);
}

.product-page-controls button:hover:not(:disabled) {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: #f2fbfb;
}

.product-page-controls button.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

.product-page-controls button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.product-page-ellipsis {
  min-width: 18px;
  color: var(--muted);
  text-align: center;
}

.product-page-size {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.product-page-size select {
  width: auto;
  min-width: 88px;
  min-height: 32px;
  height: 32px;
  padding: 0 28px 0 9px;
}

.page-content:is(
  [data-page="customers"],
  [data-page="pool"],
  [data-page="mine"],
  [data-page="followups"],
  [data-page="approvals"],
  [data-page="transfers"],
  [data-page="orders"],
  [data-page="reports"],
  [data-page="tech"]
) .table-wrap:not(.product-table-wrap) {
  max-height: 52vh;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-color: #7ba7ad #e5eef0;
  scrollbar-width: auto;
}

.page-content:is(
  [data-page="customers"],
  [data-page="pool"],
  [data-page="mine"],
  [data-page="followups"],
  [data-page="approvals"],
  [data-page="transfers"],
  [data-page="orders"],
  [data-page="reports"],
  [data-page="tech"]
) .table-wrap:not(.product-table-wrap) thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 var(--line);
}

.page-content:is(
  [data-page="customers"],
  [data-page="pool"],
  [data-page="mine"],
  [data-page="followups"],
  [data-page="approvals"],
  [data-page="transfers"],
  [data-page="orders"],
  [data-page="reports"],
  [data-page="tech"]
) .table-wrap:not(.product-table-wrap)::-webkit-scrollbar {
  width: 12px;
  height: 14px;
}

.page-content:is(
  [data-page="customers"],
  [data-page="pool"],
  [data-page="mine"],
  [data-page="followups"],
  [data-page="approvals"],
  [data-page="transfers"],
  [data-page="orders"],
  [data-page="reports"],
  [data-page="tech"]
) .table-wrap:not(.product-table-wrap)::-webkit-scrollbar-thumb {
  background: #7ba7ad;
  border: 3px solid #e5eef0;
  border-radius: 999px;
}

.page-content[data-page="transfers"] .table-wrap:not(.product-table-wrap) {
  max-height: max(220px, calc(100vh - 520px));
}

.page-content[data-page="orders"] .table-wrap:not(.product-table-wrap) {
  max-height: max(260px, calc(100vh - 370px));
}

.product-name-link {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font-weight: 700;
}

.product-table-actions .ghost-btn {
  min-height: 30px;
  padding: 0 8px;
}

.product-detail-hero {
  border: 1px solid #b9dde2;
  background: linear-gradient(135deg, #f5fbfc 0%, #ffffff 72%);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.product-detail-hero h2 {
  margin: 6px 0 8px;
  color: var(--strong);
  font-size: 24px;
  line-height: 1.35;
  word-break: break-word;
}

.product-detail-hero p {
  margin: 0;
  color: var(--muted);
}

.product-detail-status {
  flex: 0 0 auto;
}

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

.product-detail-item {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 14px;
  min-height: 76px;
}

.product-detail-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.product-detail-item strong {
  display: block;
  color: var(--strong);
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.product-detail-wide {
  grid-column: 1 / -1;
  min-height: 100px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}

th {
  background: #f7f9fb;
  color: #475569;
  font-weight: 700;
}

tr:hover td {
  background: #fbfcfd;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
}

.tag,
.status,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.tag {
  background: #eef6f0;
  color: #166534;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dictionary-multi-control {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.dictionary-multi-control select {
  width: 100%;
  min-width: 0;
}

.dictionary-value-chip {
  max-width: 100%;
  gap: 5px;
  cursor: pointer;
}

.dictionary-value-chip svg {
  flex: 0 0 auto;
}

.tag.blue {
  background: #edf3ff;
  color: #244a91;
}

.tag.amber {
  background: #fff7e8;
  color: #92400e;
}

.tag.violet {
  background: #f1efff;
  color: #4f46a5;
}

.status {
  background: #edf7f8;
  color: var(--brand-dark);
}

.status.success {
  background: #eaf7ef;
  color: var(--green);
}

.status.warn {
  background: #fff6df;
  color: var(--amber);
}

.status.danger {
  background: #fff1f0;
  color: var(--red);
}

.status.muted {
  background: #eef2f6;
  color: #64748b;
}

.split-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
}

.timeline-time {
  color: var(--muted);
  font-size: 12px;
}

.timeline-content {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.chart-bars {
  display: grid;
  gap: 10px;
}

.chart-row {
  display: grid;
  grid-template-columns: 88px 1fr 70px;
  gap: 10px;
  align-items: center;
}

.bar-track {
  height: 10px;
  background: #edf2f7;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
}

.bar-fill.blue {
  background: var(--blue);
}

.bar-fill.amber {
  background: var(--amber);
}

.bar-fill.green {
  background: var(--green);
}

.drawer,
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 40;
}

.drawer-panel {
  margin-left: auto;
  width: min(720px, 100%);
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.drawer-header,
.modal-header {
  min-height: 68px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drawer-body,
.modal-body {
  padding: 18px;
  overflow: auto;
}

.eyebrow {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.modal {
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-panel {
  width: min(760px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

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

.form-grid .wide {
  grid-column: 1 / -1;
}

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

.info-item {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 8px;
  padding: 11px;
  min-height: 64px;
}

.info-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.info-item strong {
  color: var(--strong);
}

.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  overflow: auto;
}

.tab-btn {
  border: 0;
  background: transparent;
  min-height: 38px;
  padding: 0 12px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
}

.tab-btn.active {
  color: var(--brand-dark);
  border-bottom-color: var(--brand);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #17212b;
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  z-index: 60;
}

.empty-state {
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.import-hint {
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--muted);
  border-radius: 8px;
  padding: 12px;
  line-height: 1.6;
}

.import-error-box {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 8px;
  padding: 12px;
  line-height: 1.6;
}

.import-error-box p {
  margin: 6px 0 0;
}

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

.kpi-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.kpi-line:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.workflow-chain {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}

.workflow-step {
  min-height: 108px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 14px;
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: 1fr auto;
  gap: 10px;
  text-align: left;
}

.workflow-step svg {
  color: var(--brand);
}

.workflow-step span {
  display: grid;
  gap: 5px;
}

.workflow-step strong {
  font-size: 15px;
}

.workflow-step small {
  color: var(--muted);
  line-height: 1.5;
}

.workflow-step b {
  grid-column: 1 / -1;
  color: var(--brand-dark);
  font-size: 18px;
}

.workflow-step:hover {
  border-color: #b9dde2;
  background: #fbfefe;
}

.workflow-mini {
  display: grid;
  grid-template-columns: repeat(6, minmax(90px, 1fr));
  gap: 8px;
}

.workflow-mini span,
.relation-note {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--muted);
  display: flex;
  align-items: center;
  padding: 0 10px;
}

.customer-action-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.relation-note {
  margin-top: 10px;
  min-height: 42px;
  color: var(--brand-dark);
}

.tech-filter {
  grid-template-columns: minmax(140px, 220px) minmax(220px, 1fr) auto;
}

.wide-filter {
  min-width: 220px;
}

.tech-direction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}

.tech-direction-card {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 8px;
  padding: 12px;
  min-height: 112px;
  text-align: left;
  display: grid;
  gap: 8px;
  align-content: space-between;
}

.tech-direction-card:hover {
  border-color: #99d1d8;
  background: #f8fcfd;
}

.tech-direction-card strong {
  color: var(--strong);
  line-height: 1.35;
}

.tech-direction-card span,
.tech-direction-card small {
  color: var(--muted);
}

.tech-progress {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: #e8eef2;
  overflow: hidden;
  min-width: 120px;
}

.tech-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #1f7a7e, #40a68f);
}

.tech-progress b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: #0f172a;
}

.tech-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(106px, 1fr));
  gap: 10px;
}

.tech-flow-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
  min-height: 78px;
  min-width: 0;
  display: grid;
  align-content: space-between;
}

.tech-flow-step span {
  font-size: 24px;
  color: var(--brand-dark);
  font-weight: 700;
}

.tech-task-line,
.tech-summary-line {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.tech-task-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tech-task-line small,
.tech-summary-line small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.tech-task-line.overdue strong,
.row-warn td:first-child {
  color: var(--red);
}

.tech-summary-line p {
  margin: 6px 0 0;
  color: var(--text);
  line-height: 1.5;
}

.tech-table {
  max-width: 100%;
  overflow: hidden;
}

.tech-table .table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.tech-table table {
  min-width: 980px;
  table-layout: fixed;
}

.tech-table th,
.tech-table td {
  white-space: normal;
  word-break: break-word;
  vertical-align: top;
}

.tech-table th:nth-child(2),
.tech-table th:nth-child(3),
.tech-table .tech-project-name-cell,
.tech-table .tech-structure-cell {
  text-align: center;
  vertical-align: middle;
}

.tech-table .tech-project-name-cell .link-btn {
  display: inline-block;
  max-width: 100%;
  line-height: 1.45;
  text-align: center;
  white-space: normal;
}

.tech-table .tech-structure-cell {
  font-weight: 700;
  color: var(--text);
}

.tech-table .tech-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 150px;
}

.tech-table .ghost-btn,
.tech-table .primary-btn,
.tech-table .secondary-btn,
.tech-table .danger-btn {
  min-height: 32px;
  padding: 0 9px;
  white-space: nowrap;
}

.view-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.view-switch button {
  min-height: 34px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
}

.view-switch button:last-child {
  border-right: 0;
}

.view-switch button.active {
  background: #edf7f8;
  color: var(--brand-dark);
}

.tech-map-list {
  display: grid;
  gap: 14px;
}

.tech-summary-board {
  display: grid;
  gap: 14px;
}

.tech-summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  min-width: 0;
}

.tech-summary-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 240px);
  gap: 14px;
  align-items: start;
  margin-bottom: 12px;
}

.tech-summary-head .link-btn {
  max-width: 100%;
  text-align: left;
  white-space: normal;
  word-break: break-word;
}

.tech-summary-head small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.tech-summary-progress {
  display: grid;
  gap: 8px;
}

.tech-role-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
}

.tech-role-card {
  border: 1px solid #cfe3e7;
  border-radius: 8px;
  background: #f8fcfd;
  padding: 10px;
  min-width: 0;
}

.tech-role-card.empty {
  border-style: dashed;
  background: #fafafa;
}

.tech-role-card strong {
  color: var(--brand-dark);
}

.tech-role-card p,
.tech-summary-bottom p {
  margin: 7px 0 4px;
  line-height: 1.5;
  word-break: break-word;
}

.tech-role-card small,
.tech-summary-bottom small {
  color: var(--muted);
  line-height: 1.45;
}

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

.tech-summary-bottom > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 10px;
  min-width: 0;
}

.tech-summary-bottom strong {
  color: var(--strong);
}

.tech-fish-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  overflow: hidden;
}

.tech-fish-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  align-items: start;
  gap: 14px;
  margin-bottom: 14px;
}

.tech-fish-head .link-btn {
  max-width: 100%;
  text-align: left;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

.tech-fish-head small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.tech-fish-status {
  display: grid;
  gap: 8px;
}

.tech-fish-spine {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(92px, 1fr));
  gap: 8px;
  padding: 12px 0 4px;
  overflow-x: auto;
}

.tech-fish-spine::before {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  top: 27px;
  height: 2px;
  background: #d7e3e8;
}

.tech-fish-node {
  position: relative;
  min-width: 92px;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 5px;
  text-align: center;
}

.tech-fish-node span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  background: #fff;
}

.tech-fish-node strong {
  font-size: 13px;
  line-height: 1.3;
  color: var(--strong);
}

.tech-fish-node small {
  font-size: 11px;
  color: var(--muted);
}

.tech-fish-node.done span {
  border-color: #1f7a7e;
  background: #1f7a7e;
}

.tech-fish-node.current span {
  border-color: #c7831e;
  background: #fff7ed;
  box-shadow: 0 0 0 4px #fdebd0;
}

.tech-fish-node.current strong {
  color: #9a5b12;
}

.tech-fish-detail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.tech-fish-detail > div {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 8px;
  padding: 10px;
  min-width: 0;
}

.tech-fish-detail strong {
  color: var(--brand-dark);
}

.tech-fish-detail p {
  margin: 7px 0 4px;
  line-height: 1.5;
  word-break: break-word;
}

.tech-fish-detail small {
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    max-width: 100vw;
    overflow-x: hidden;
  }

  .sidebar {
    height: auto;
    min-height: auto;
    min-width: 0;
    max-width: 100vw;
    overflow: hidden;
  }

  .sidebar-brand {
    display: none;
  }

  .nav-menu {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    max-width: 100vw;
    min-width: 0;
    flex: none;
  }

  .nav-section {
    display: flex;
    gap: 4px;
    flex: 0 0 auto;
  }

  .nav-section-title {
    display: none;
  }

  .app-shell.compact-topbar .sidebar-utility {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    overflow-x: auto;
    max-width: 100vw;
  }

  .sidebar-role,
  .sidebar-notice-btn,
  .sidebar-logout-btn {
    flex: 0 0 auto;
  }

  .main-area,
  .topbar,
  .page-content {
    min-width: 0;
    max-width: 100vw;
  }

  .main-area {
    height: auto;
    min-height: 0;
  }

  .content-grid,
  .split-row {
    grid-template-columns: 1fr;
  }

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

  .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-search-form {
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  }

  .product-search-actions {
    grid-column: auto;
  }

  .product-pagination {
    grid-template-columns: minmax(150px, 1fr) auto auto;
  }

  .product-page-controls {
    grid-column: auto;
    grid-row: 1;
    flex-wrap: wrap;
  }

  .order-item-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-shell,
  .dictionary-layout {
    grid-template-columns: 1fr;
  }

  .settings-sidebar {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
  }

  .settings-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .transfer-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-chain {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-mini {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tech-filter,
  .tech-direction-grid,
  .tech-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tech-fish-detail {
    grid-template-columns: 1fr;
  }

  .tech-role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tech-summary-bottom {
    grid-template-columns: 1fr;
  }

  .role-permission-grid {
    grid-template-columns: 1fr;
  }

  .required-field-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: auto;
    padding: 12px;
    flex-wrap: wrap;
  }

  .mobile-title {
    display: block;
  }

  .search-box {
    order: 3;
    min-width: 100%;
  }

  .top-actions {
    margin-left: auto;
  }

  .page-content {
    padding: 12px;
  }

  .page-title {
    display: grid;
  }

  .panel-header {
    display: grid;
    align-items: start;
  }

  .panel-actions {
    justify-content: flex-start;
  }

  .action-row {
    justify-content: flex-start;
  }

  .metric-grid,
  .filter-bar,
  .order-filter-panel,
  .order-item-row,
  .report-filter-grid,
  .settings-summary-grid,
  .transfer-filter-panel,
  .workflow-chain,
  .workflow-mini,
  .tech-filter,
  .tech-direction-grid,
  .tech-flow,
  .role-permission-grid,
  .permission-check-grid,
  .form-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .product-search-form,
  .product-detail-grid {
    grid-template-columns: 1fr;
  }

  .product-search-actions,
  .product-detail-wide {
    grid-column: 1;
  }

  .product-pagination {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .product-page-controls {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-start;
  }

  .product-page-size {
    justify-self: start;
  }

  .product-detail-hero {
    display: grid;
  }

  .product-table-wrap {
    max-height: 55vh;
    min-height: 260px;
  }

  .tech-fish-head {
    grid-template-columns: 1fr;
  }

  .tech-summary-head,
  .tech-role-grid {
    grid-template-columns: 1fr;
  }

  .view-switch,
  .view-switch button {
    width: 100%;
  }

  .view-switch button {
    justify-content: center;
  }

  .report-filter-header {
    display: grid;
  }

  .report-active-filter-bar {
    display: grid;
  }

  .drawer-panel {
    width: 100%;
  }
}

/* V12 样品跟进与通知确认 */
.notification-line {
  gap: 16px;
  align-items: center;
}

.notification-line.is-pending {
  border-left: 3px solid #dc2626;
  padding-left: 12px;
  background: #fff8f8;
}

.notification-line.is-acknowledged {
  opacity: 0.76;
}

.notification-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 190px;
}

.sample-filter-panel {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(180px, 240px) auto auto;
  gap: 12px;
  align-items: end;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.sample-filter-panel label {
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.sample-filter-panel :is(input, select, button) {
  height: 42px;
  min-height: 42px;
}

.sample-filter-panel button {
  align-self: end;
}

.assignment-target-card {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #b9dfe3;
  border-radius: 8px;
  background: #f2fbfc;
  display: grid;
  gap: 4px;
}

.assignment-target-card span,
.assignment-target-card small {
  color: var(--muted);
}

.assignment-target-card strong {
  color: var(--strong);
  font-size: 16px;
}

.sample-list-panel {
  padding: 0;
  overflow: hidden;
}

.sample-followup-panel {
  margin-top: 16px;
}

.sample-followup-panel > .table-wrap {
  max-height: 360px;
  overflow: auto;
}

.sample-followup-panel thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f6f9fb;
}

.sample-followup-content {
  min-width: 260px;
  max-width: 420px;
  white-space: normal;
  line-height: 1.55;
}

.sample-table-scroll {
  max-height: calc(100vh - 390px);
  min-height: 320px;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}

.sample-table-scroll > .table-wrap {
  overflow: visible;
  min-width: 1500px;
}

.sample-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f6f9fb;
}

.sample-item-row {
  display: grid;
  grid-template-columns: minmax(250px, 1.5fr) minmax(120px, 0.75fr) minmax(80px, 0.5fr) minmax(105px, 0.65fr) minmax(105px, 0.65fr) 36px;
  gap: 10px;
  align-items: end;
}

.sample-item-row label {
  display: grid;
  gap: 6px;
}

.sample-recipient-preview {
  padding: 12px;
  border: 1px dashed #9fcbd0;
  border-radius: 10px;
  background: #f5fbfc;
}

.sample-recipient-preview small,
.sample-linked-panel small {
  color: var(--muted);
}

.compact-metrics {
  margin: 12px 0 16px;
}

.compact-workflow {
  margin-top: 12px;
}

@media (max-width: 1100px) {
  .sample-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sample-item-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .sample-filter-panel,
  .sample-item-row {
    grid-template-columns: 1fr;
  }

  .sample-table-scroll {
    max-height: 58vh;
  }

  .notification-actions {
    min-width: 0;
    justify-content: flex-start;
  }
}

/* V20 全模块版面优化：大型功能区上下排列，完整展示表格并消除横向滚动。 */
.content-grid,
.split-row {
  grid-template-columns: minmax(0, 1fr);
}

.content-grid > *,
.split-row > *,
.panel,
.table-panel,
.chart-panel {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.metric-grid,
.settings-summary-grid,
.workflow-chain {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.filter-bar,
.order-filter-panel,
.report-filter-grid,
.transfer-filter-panel,
.sample-filter-panel,
.tech-filter {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.table-wrap,
.product-table-wrap,
.tech-table .table-wrap,
.sample-table-scroll,
.sample-table-scroll > .table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

table,
.product-table,
.tech-table table,
.sample-table-scroll table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  table-layout: auto;
}

th,
td,
.product-table th,
.product-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.5;
}

.product-table .product-col-name { width: 14%; }
.product-table .product-col-sku { width: 9%; }
.product-table .product-col-category { width: 10%; }
.product-table .product-col-activity { width: 18%; }
.product-table .product-col-price { width: 8%; }
.product-table .product-col-status { width: 7%; }
.product-table .product-col-online { width: 7%; }
.product-table .product-col-engineer { width: 9%; }
.product-table .product-col-remark { width: 10%; }
.product-table .product-col-actions { width: 150px; }

.product-table th:nth-child(1),
.product-table td:nth-child(1),
.product-table th:nth-child(2),
.product-table td:nth-child(2) {
  position: static;
  left: auto;
  border-right: 0;
}

.compact-actions,
.product-table-actions,
.table-action-stack,
.tabs {
  flex-wrap: wrap;
}

.tabs,
.tech-fish-spine {
  overflow-x: visible;
}

.tech-fish-spine {
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
}

.sample-table-scroll {
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.sample-followup-content {
  min-width: 0;
  max-width: none;
}

.panel-header,
.table-toolbar,
.page-title,
.settings-main-header,
.report-filter-header,
.report-active-filter-bar {
  flex-wrap: wrap;
}

.report-filter-header > *,
.panel-header > *,
.table-toolbar > *,
.page-title > * {
  min-width: 0;
}

/* V20 客户管理紧凑工作区：筛选可折叠，表格列宽按内容所需字符数分配。 */
.page-content:is(
  [data-page="customers"],
  [data-page="pool"],
  [data-page="mine"],
  [data-page="followups"],
  [data-page="approvals"]
) {
  padding: 14px 20px 10px;
}

.page-content:is(
  [data-page="customers"],
  [data-page="pool"],
  [data-page="mine"],
  [data-page="followups"],
  [data-page="approvals"]
) .page-title {
  align-items: center;
  margin-bottom: 10px;
}

.page-content:is(
  [data-page="customers"],
  [data-page="pool"],
  [data-page="mine"],
  [data-page="followups"],
  [data-page="approvals"]
) .page-title h1 {
  font-size: 20px;
  line-height: 1.25;
}

.page-content:is(
  [data-page="customers"],
  [data-page="pool"],
  [data-page="mine"],
  [data-page="followups"],
  [data-page="approvals"]
) .page-title p {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.35;
}

.customer-filter-bar {
  grid-template-columns: minmax(280px, 1fr) minmax(145px, 180px) minmax(145px, 180px) auto;
  gap: 8px;
  padding: 9px 10px;
  margin-bottom: 10px;
  align-items: end;
}

.customer-filter-bar label {
  gap: 4px;
}

.customer-filter-keyword {
  min-width: 0;
}

.customer-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  align-items: center;
  white-space: nowrap;
}

.customer-filter-actions button {
  min-height: 42px;
  padding-inline: 12px;
}

.customer-filter-advanced {
  display: none;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 8px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}

.customer-filter-bar.is-expanded .customer-filter-advanced {
  display: grid;
}

/* V20 表头筛选：筛选结果、全选和批量操作共用同一可见数据范围。 */
.table-header-filter {
  display: grid;
  gap: 4px;
  min-width: 0;
  width: 100%;
}

.table-header-filter > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.table-header-filter select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 28px;
  min-height: 28px;
  padding: 2px 22px 2px 6px;
  border-radius: 5px;
  background-color: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.table-header-filter.is-active select {
  border-color: var(--brand);
  background-color: #eef9fa;
  color: var(--brand-dark);
  font-weight: 700;
}

.table-header-filter-summary {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbfc;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.page-content[data-page="followups"] > .table-header-filter-summary {
  flex: 0 0 auto;
  margin-bottom: 8px;
}

.sample-list-panel > .table-header-filter-summary {
  border-width: 0 0 1px;
  border-radius: 0;
}

.sample-followup-panel > .table-header-filter-summary {
  margin-bottom: 8px;
}

.page-content[data-page="followups"] .table-wrap,
.page-content[data-page="pool"] .table-wrap {
  max-height: max(360px, calc(100vh - 238px));
}

.page-content[data-page="customers"] .table-wrap,
.page-content[data-page="mine"] .table-wrap {
  max-height: max(340px, calc(100vh - 292px));
}

.page-content[data-page="approvals"] .table-wrap {
  max-height: max(260px, calc(100vh - 300px));
}

/* V20 客户管理全高数据区：把页脚上方空白交还给客户信息列表。 */
@media (min-width: 1101px) {
  .page-content:is(
    [data-page="customers"],
    [data-page="pool"],
    [data-page="mine"],
    [data-page="followups"],
    [data-page="approvals"]
  ) {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .page-content:is(
    [data-page="customers"],
    [data-page="pool"],
    [data-page="mine"],
    [data-page="followups"],
    [data-page="approvals"]
  ) > .table-panel {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .page-content:is(
    [data-page="customers"],
    [data-page="pool"],
    [data-page="mine"],
    [data-page="followups"],
    [data-page="approvals"]
  ) > .table-panel > .table-wrap {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
  }
}

.page-content:is(
  [data-page="customers"],
  [data-page="pool"],
  [data-page="mine"],
  [data-page="followups"],
  [data-page="approvals"]
) .table-toolbar {
  padding: 8px 10px;
}

.page-content:is(
  [data-page="customers"],
  [data-page="pool"],
  [data-page="mine"],
  [data-page="followups"],
  [data-page="approvals"]
) th,
.page-content:is(
  [data-page="customers"],
  [data-page="pool"],
  [data-page="mine"],
  [data-page="followups"],
  [data-page="approvals"]
) td {
  padding: 9px 10px;
  font-size: 13px;
  vertical-align: middle;
}

.page-content[data-page="followups"] table {
  table-layout: fixed;
}

.sample-table-scroll table,
.sample-followup-panel table {
  table-layout: fixed;
}

.sample-table-scroll th:nth-child(1) { width: 8%; }
.sample-table-scroll th:nth-child(2) { width: 12%; }
.sample-table-scroll th:nth-child(3) { width: 14%; }
.sample-table-scroll th:nth-child(4) { width: 10%; }
.sample-table-scroll th:nth-child(5) { width: 7%; }
.sample-table-scroll th:nth-child(6) { width: 9%; }
.sample-table-scroll th:nth-child(7) { width: 10%; }
.sample-table-scroll th:nth-child(8) { width: 8%; }
.sample-table-scroll th:nth-child(9) { width: 9%; }
.sample-table-scroll th:nth-child(10) { width: 13%; }

.sample-followup-panel th:nth-child(1) { width: 9%; }
.sample-followup-panel th:nth-child(2) { width: 14%; }
.sample-followup-panel th:nth-child(3) { width: 10%; }
.sample-followup-panel th:nth-child(4) { width: 8%; }
.sample-followup-panel th:nth-child(5) { width: 9%; }
.sample-followup-panel th:nth-child(6) { width: 22%; }
.sample-followup-panel th:nth-child(7) { width: 10%; }
.sample-followup-panel th:nth-child(8) { width: 8%; }
.sample-followup-panel th:nth-child(9) { width: 10%; }

.page-content[data-page="followups"] th:nth-child(1) { width: 42px; }
.page-content[data-page="followups"] th:nth-child(2) { width: 8%; }
.page-content[data-page="followups"] th:nth-child(3) { width: 7%; }
.page-content[data-page="followups"] th:nth-child(4) { width: 6%; }
.page-content[data-page="followups"] th:nth-child(5) { width: 9%; }
.page-content[data-page="followups"] th:nth-child(6) { width: 6%; }
.page-content[data-page="followups"] th:nth-child(8) { width: 11%; }
.page-content[data-page="followups"] th:nth-child(9) { width: 11%; }
.page-content[data-page="followups"] th:nth-child(10) { width: 8%; }

.page-content[data-page="followups"] :is(th, td):not(:nth-child(7)) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
  word-break: normal;
}

.page-content[data-page="followups"] :is(th, td):nth-child(7) {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.page-content[data-page="followups"] :is(th, td):nth-child(8),
.page-content[data-page="followups"] :is(th, td):nth-child(9) {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: normal;
  word-break: keep-all;
}

.page-content[data-page="pool"] table {
  table-layout: fixed;
}

.page-content[data-page="pool"] th:nth-child(1) { width: 15%; }
.page-content[data-page="pool"] th:nth-child(2) { width: 13%; }
.page-content[data-page="pool"] th:nth-child(3) { width: 17%; }
.page-content[data-page="pool"] th:nth-child(4) { width: 20%; }
.page-content[data-page="pool"] th:nth-child(5) { width: 10%; }
.page-content[data-page="pool"] th:nth-child(6) { width: 10%; }
.page-content[data-page="pool"] th:nth-child(7) { width: 15%; }

.page-content[data-page="pool"] :is(th, td):nth-child(5),
.page-content[data-page="pool"] :is(th, td):nth-child(6) {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.customer-data-table,
.page-content[data-page="mine"] table {
  table-layout: fixed;
}

.customer-data-table .customer-col-select,
.page-content[data-page="mine"] :is(th, td):nth-child(1) { width: 42px; }
.customer-data-table .customer-col-customer,
.page-content[data-page="mine"] :is(th, td):nth-child(2) { width: 12%; }
.customer-data-table .customer-col-contact,
.page-content[data-page="mine"] :is(th, td):nth-child(3) { width: 11%; }
.customer-data-table .customer-col-source,
.page-content[data-page="mine"] :is(th, td):nth-child(4) { width: 13%; }
.customer-data-table .customer-col-domain,
.page-content[data-page="mine"] :is(th, td):nth-child(5) { width: 14%; }
.customer-data-table .customer-col-owner,
.page-content[data-page="mine"] :is(th, td):nth-child(6) { width: 8%; }
.customer-data-table .customer-col-status,
.page-content[data-page="mine"] :is(th, td):nth-child(7) { width: 10%; }
.customer-data-table .customer-col-level,
.page-content[data-page="mine"] :is(th, td):nth-child(8) { width: 10%; }
.customer-data-table .customer-col-next,
.page-content[data-page="mine"] :is(th, td):nth-child(9) { width: 11%; }
.customer-data-table .customer-col-importer { width: 9%; }
.customer-data-table .customer-col-actions,
.page-content[data-page="mine"] :is(th, td):nth-child(10) { width: 176px; }

.customer-data-table :is(.customer-col-customer, .customer-col-contact, .customer-col-owner, .customer-col-next, .customer-col-importer),
.page-content[data-page="mine"] :is(th, td):nth-child(2),
.page-content[data-page="mine"] :is(th, td):nth-child(3),
.page-content[data-page="mine"] :is(th, td):nth-child(6),
.page-content[data-page="mine"] :is(th, td):nth-child(9) {
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
  word-break: normal;
}

.page-content[data-page="approvals"] .split-row {
  gap: 10px;
}

.page-content[data-page="approvals"] .split-row > .panel {
  padding: 12px;
}

.page-content[data-page="approvals"] .split-row > .panel:nth-child(2) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.page-content[data-page="approvals"] .split-row > .panel:nth-child(2) .panel-header,
.page-content[data-page="approvals"] .split-row > .panel:nth-child(2) p {
  margin: 0;
}

.import-error-box.customer-import-error-box {
  margin-top: 4px;
  padding: 12px;
}

.import-error-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.import-error-summary p {
  margin: 5px 0 0;
  color: var(--muted);
}

.import-check-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.import-check-metrics span {
  padding: 8px 10px;
  border: 1px solid #f0c9c4;
  border-radius: 6px;
  background: #fff;
}

.import-error-table-wrap {
  max-height: 310px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.import-error-table {
  table-layout: fixed;
  min-width: 0;
}

.import-error-table th:nth-child(1) { width: 8%; }
.import-error-table th:nth-child(2) { width: 21%; }
.import-error-table th:nth-child(3) { width: 14%; }
.import-error-table th:nth-child(4) { width: 25%; }
.import-error-table th:nth-child(5) { width: 32%; }

.import-error-table th,
.import-error-table td {
  padding: 8px;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  vertical-align: top;
}

@media (max-width: 1100px) {
  .report-filter-grid,
  .filter-bar,
  .order-filter-panel,
  .transfer-filter-panel,
  .sample-filter-panel,
  .tech-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-table .product-col-actions {
    width: 120px;
  }

  th,
  td {
    padding: 9px 8px;
    font-size: 13px;
  }

  .customer-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-filter-actions,
  .customer-filter-advanced {
    grid-column: 1 / -1;
  }

  .customer-filter-actions {
    justify-content: flex-start;
  }

  .customer-filter-advanced {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .report-filter-grid,
  .filter-bar,
  .order-filter-panel,
  .transfer-filter-panel,
  .sample-filter-panel,
  .tech-filter {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-filter-bar,
  .customer-filter-advanced,
  .import-check-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-filter-actions,
  .import-error-summary,
  .page-content[data-page="approvals"] .split-row > .panel:nth-child(2) {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
  }
}


/* V22 stable in-modal search pickers (avoid native datalist focus loss on Windows) */
.inline-picker-results {
  display: grid;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.inline-picker-results.hidden { display: none; }
.inline-picker-option {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.inline-picker-option:hover,
.inline-picker-option:focus-visible {
  border-color: var(--line);
  background: var(--soft);
  outline: none;
}
.inline-picker-option strong,
.inline-picker-option span { overflow-wrap: anywhere; }
.inline-picker-option span,
.inline-picker-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.inline-picker-empty { padding: 10px; }

/* V23.2j 后台通知与界面弹窗热修复 */
.notification-alert {
  position: fixed;
  right: 22px;
  top: 22px;
  width: min(430px, calc(100vw - 32px));
  z-index: 90;
  border: 1px solid #f59e0b;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.notification-alert-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 16px;
}

.notification-alert-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff7ed;
  color: #c2410c;
}

.notification-alert-content strong {
  display: block;
  color: var(--strong);
  margin-bottom: 6px;
  font-size: 15px;
}

.notification-alert-content p {
  margin: 0;
  line-height: 1.55;
  color: var(--text);
}

.notification-alert-content small {
  display: block;
  color: var(--muted);
  margin-top: 7px;
}

.notification-alert-actions {
  grid-column: 2 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.notification-alert-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px;
  min-height: auto;
}

.notification-capability-panel {
  margin-bottom: 14px;
}

.notification-capability-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.notification-capability-copy strong,
.notification-capability-copy small {
  display: block;
}

.notification-capability-copy small {
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.5;
}

.notification-capability-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
}

.notification-capability-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.notification-capability-status.is-enabled::before {
  background: #16a34a;
}

.notification-capability-status.is-limited::before {
  background: #f59e0b;
}

@media (max-width: 640px) {
  .notification-alert {
    top: 12px;
    right: 12px;
    width: calc(100vw - 24px);
  }
  .notification-alert-card {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    padding: 13px;
  }
  .notification-alert-icon {
    width: 38px;
    height: 38px;
  }
}
