:root {
  --bg: #eef1f4;
  --ink: #1a2332;
  --muted: #6b7380;
  --line: #d7dde5;
  --accent: #0f5c4c;
  --accent-soft: rgba(15, 92, 76, 0.1);
  --panel: #ffffff;
  --navbar: #10233f;
  --navbar-ink: #f4f7fb;
  --sidebar: #f7f9fb;
  --error: #9b2c2c;
  --radius: 10px;
  --navbar-h: 56px;
  --sidebar-w: 240px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

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

a:hover {
  text-decoration: underline;
}

/* ---------- Login ---------- */
.auth-page {
  background:
    radial-gradient(circle at top left, rgba(15, 92, 76, 0.12), transparent 40%),
    linear-gradient(180deg, #e7ecf2 0%, var(--bg) 45%, #e3e8ef 100%);
}

.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.5rem 2.5rem;
  position: relative;
}

.auth-beian {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1rem;
  text-align: center;
  font-size: 0.8rem;
}

.auth-beian a {
  color: var(--muted);
}

.auth-beian a:hover {
  color: var(--ink);
}

.auth-panel {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 2rem;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.auth-brand h1 {
  margin: 0;
  font-size: 1.5rem;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.auth-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.auth-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.auth-field {
  position: relative;
  display: block;
}

.auth-field-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: 0.95rem;
  line-height: 1;
}

.auth-form .auth-field input[type="text"],
.auth-form .auth-field input[type="password"] {
  width: 100%;
  padding: 0.7rem 0.8rem 0.7rem 2.4rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.auth-form .auth-field input#login-password {
  padding-right: 2.6rem;
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.auth-form > button[type="submit"],
button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1rem;
  font: inherit;
  cursor: pointer;
}

.auth-password-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.95rem;
}

.auth-password-toggle:hover {
  color: var(--ink);
  background: var(--accent-soft);
}

.muted {
  color: var(--muted);
}

.error {
  color: var(--error);
}

/* ---------- App shell ---------- */
.app-frame {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-navbar {
  height: var(--navbar-h);
  background: var(--navbar);
  color: var(--navbar-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
}

.top-navbar .brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
}

.top-navbar .brand-name {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.top-navbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dept-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.78rem;
}

.user-menu {
  position: relative;
}

.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  margin: 0;
  padding: 0.2rem 0.35rem 0.2rem 0.2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.user-menu-trigger:hover,
.user-menu:focus-within .user-menu-trigger {
  background: rgba(255, 255, 255, 0.08);
}

.user-avatar {
  display: inline-grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.user-avatar-admin {
  background: linear-gradient(145deg, #d4a017, #8a6a12);
  color: #fff8e7;
}

.user-avatar-member {
  background: rgba(255, 255, 255, 0.14);
  color: #e8eef6;
}

.user-avatar-super {
  background: linear-gradient(145deg, #3d7ea6, #1f4f6e);
  color: #eaf6ff;
}

.user-name {
  font-size: 0.92rem;
  opacity: 0.92;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-caret {
  font-size: 0.65rem;
  opacity: 0.7;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 40;
  min-width: 11.5rem;
  padding: 0.4rem;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(16, 35, 63, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

/* 悬停桥接，避免移入下拉层时断开 */
.user-menu-dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -0.45rem;
  height: 0.45rem;
}

.user-menu:hover .user-menu-dropdown,
.user-menu:focus-within .user-menu-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu-role {
  padding: 0.45rem 0.65rem 0.55rem;
  margin-bottom: 0.2rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.user-menu-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}

.user-menu-logout {
  color: var(--error);
}

.user-menu-logout:hover {
  background: rgba(155, 44, 44, 0.08);
  color: var(--error);
}

.logout-form {
  margin: 0;
}

.btn-logout,
.btn-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  color: var(--navbar-ink);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  font-size: 0.85rem;
  text-decoration: none;
}

.btn-logout:hover,
.btn-nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.password-form {
  display: grid;
  gap: 1rem;
  max-width: 28rem;
}

.password-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.password-form input[type="password"],
.password-form input[type="text"],
.password-form input[type="number"],
.password-form textarea,
.password-form input[type="file"],
.password-form select {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}

.password-form input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--brand, #1f6feb);
}

.password-form .field-inline-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.password-form .field-inline-check input[type="checkbox"] {
  order: -1;
}

.password-form textarea {
  resize: vertical;
  min-height: 6rem;
}

.password-form textarea[readonly],
.password-form input[readonly] {
  background: #f3f4f6;
  color: #4b5563;
  cursor: not-allowed;
}

.section-title {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem;
}

.quote-text {
  white-space: pre-wrap;
  margin: 0;
  padding: 0.75rem 1rem;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quote-images {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.quote-image {
  margin: 0;
  width: min(220px, 100%);
}

.quote-image img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.quote-image figcaption {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  word-break: break-all;
}

.quote-file-list {
  margin: 0;
  padding-left: 1.1rem;
}

.quote-file-list li {
  margin: 0.35rem 0;
}


.password-form .form-actions {
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.password-form .field-hint {
  font-size: 0.82rem;
}

.app-body {
  display: flex;
  flex: 1;
  margin-top: var(--navbar-h);
  min-height: calc(100vh - var(--navbar-h));
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 1rem 0.75rem 2rem;
  position: fixed;
  top: var(--navbar-h);
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 20;
}

.sidebar-label {
  padding: 0 0.75rem 0.65rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-group + .sidebar-group {
  margin-top: 1rem;
}

.sidebar-group-title {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.menu-list,
.menu-sublist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
}

.menu-link i {
  width: 1.1rem;
  text-align: center;
  color: var(--muted);
}

.menu-item.is-active > .menu-link,
.menu-subitem.is-active > .menu-link,
.menu-parent.is-active > .menu-link-parent {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.menu-item.is-active > .menu-link i,
.menu-subitem.is-active > .menu-link i,
.menu-parent.is-active > .menu-link-parent > i:not(.menu-caret) {
  color: var(--accent);
}

.menu-link:hover {
  background: rgba(16, 35, 63, 0.05);
  text-decoration: none;
}

.menu-link-parent {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.menu-link-text {
  flex: 1;
  min-width: 0;
}

.menu-caret {
  width: auto;
  margin-left: auto;
  font-size: 0.7rem;
  transition: transform 0.15s ease;
}

.menu-parent.is-open > .menu-link-parent .menu-caret {
  transform: rotate(180deg);
}

.menu-parent:not(.is-open) > .menu-sublist {
  display: none;
}

.menu-sublist {
  padding-left: 0.85rem;
  margin-top: 0.15rem;
}

.menu-empty {
  padding: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 1.25rem 1.5rem 2rem;
  min-width: 0;
}

.content-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.content-header {
  padding: 1.25rem 1.4rem 1rem;
  border-bottom: 1px solid var(--line);
}

.content-header.import-check-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.import-check-header-main {
  min-width: 0;
  flex: 1;
}

.import-check-rules {
  position: relative;
  flex-shrink: 0;
}

/* 按钮与冒泡层之间的可悬停桥接，避免移入时层消失 */
.import-check-rules::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 19;
  width: min(26rem, calc(100vw - 2.5rem));
  height: 0;
  pointer-events: none;
}

.import-check-rules:hover::after,
.import-check-rules:focus-within::after {
  height: 0.7rem;
  pointer-events: auto;
}

.import-check-rules-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: default;
  white-space: nowrap;
}

.import-check-rules-trigger:hover,
.import-check-rules:focus-within .import-check-rules-trigger {
  border-color: rgba(15, 92, 76, 0.35);
  background: var(--accent-soft);
}

.import-check-rules-bubble {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 20;
  width: min(26rem, calc(100vw - 2.5rem));
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(16, 35, 63, 0.14);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.55;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
}

.import-check-rules-bubble::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 1.1rem;
  width: 10px;
  height: 10px;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  background: #fff;
  transform: rotate(45deg);
}

.import-check-rules:hover .import-check-rules-bubble,
.import-check-rules:focus-within .import-check-rules-bubble {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.import-check-rules-title {
  margin: 0 0 0.45rem;
  font-weight: 700;
}

.import-check-rules-bubble ul {
  margin: 0;
  padding-left: 1.15rem;
}

.import-check-rules-bubble li + li {
  margin-top: 0.35rem;
}

.content-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.shop-id-warning {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.6rem;
  border-radius: 6px;
  background: #fff4e5;
  color: #b45309;
  border: 1px solid #f5c07a;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
}

.content-header .muted {
  margin: 0;
}

.import-check-hint {
  margin: 0.75rem 0 0;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  background: #fff4e5;
  color: #9a3412;
  border: 1px solid #f5c07a;
  font-size: inherit;
  font-weight: 400;
  line-height: 1.6;
}

.import-check-hint a {
  color: inherit;
  font-size: inherit;
  text-decoration: underline;
}

.content-body {
  padding: 1.25rem 1.4rem 1.5rem;
}

.placeholder-card {
  display: grid;
  place-items: center;
  gap: 0.75rem;
  min-height: 280px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fafbfc;
  color: var(--muted);
  text-align: center;
  padding: 2rem;
}

.placeholder-icon {
  font-size: 1.75rem;
  color: var(--accent);
  opacity: 0.7;
}

.messages {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.btn-primary-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: #fff;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.92rem;
}

.btn-primary-link:hover {
  text-decoration: none;
  opacity: 0.92;
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.action-menu {
  position: relative;
  display: inline-flex;
}

.btn-more {
  min-width: 2rem;
  justify-content: center;
  padding-left: 0.45rem;
  padding-right: 0.45rem;
}

.action-menu-panel {
  position: fixed;
  z-index: 80;
  min-width: 8.5rem;
  padding: 0.35rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(16, 35, 63, 0.14);
}

.action-menu-panel[hidden] {
  display: none !important;
}

.action-menu-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
}

.action-menu-item:hover {
  background: rgba(16, 35, 63, 0.05);
  text-decoration: none;
}

.action-menu-item i {
  width: 1rem;
  text-align: center;
  color: var(--muted);
}

.action-menu-danger {
  color: var(--error);
}

.action-menu-danger i {
  color: var(--error);
}

.action-menu-form {
  margin: 0;
}

.inline-form {
  display: inline;
  margin: 0;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

/* Capsule slide switch */
.switch-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 3.1rem;
  height: 1.55rem;
  padding: 0 0.35rem;
  border: none;
  border-radius: 999px;
  background: #c5ccd6;
  cursor: pointer;
  vertical-align: middle;
  transition: background 0.2s ease;
  font: inherit;
  color: #fff;
}

.switch-toggle.is-on {
  background: var(--accent);
}

.switch-toggle-knob {
  position: absolute;
  top: 0.18rem;
  left: 0.18rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.switch-toggle.is-on .switch-toggle-knob {
  transform: translateX(1.5rem);
}

.switch-toggle-label {
  position: relative;
  z-index: 1;
  width: 100%;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
  text-align: right;
  padding-right: 0.15rem;
  user-select: none;
}

.switch-toggle.is-on .switch-toggle-label {
  text-align: left;
  padding-right: 0;
  padding-left: 0.2rem;
}

.switch-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Form checkbox as slide switch */
.form-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.25rem 0 0.15rem;
}

.password-form .form-switch-row {
  margin: 0.15rem 0;
}

.form-switch-title {
  font-size: 0.92rem;
  color: var(--ink);
}

.form-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}

.form-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.form-switch-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 3.1rem;
  height: 1.55rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #c5ccd6;
  transition: background 0.2s ease;
  color: #fff;
  box-sizing: border-box;
}

.form-switch-knob {
  position: absolute;
  top: 0.18rem;
  left: 0.18rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.form-switch-text {
  position: relative;
  z-index: 1;
  width: 100%;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
  user-select: none;
}

.form-switch-text-on {
  display: none;
  text-align: left;
  padding-left: 0.2rem;
}

.form-switch-text-off {
  display: block;
  text-align: right;
  padding-right: 0.15rem;
}

.form-switch input[type="checkbox"]:checked + .form-switch-track {
  background: var(--accent);
}

.form-switch input[type="checkbox"]:checked + .form-switch-track .form-switch-knob {
  transform: translateX(1.5rem);
}

.form-switch input[type="checkbox"]:checked + .form-switch-track .form-switch-text-on {
  display: block;
}

.form-switch input[type="checkbox"]:checked + .form-switch-track .form-switch-text-off {
  display: none;
}

.form-switch input[type="checkbox"]:focus-visible + .form-switch-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-table,
.btn-table-link {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-table:hover,
.btn-table-link:hover {
  background: var(--accent-soft);
  text-decoration: none;
}

.tool-form {
  margin-bottom: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  margin-bottom: 1rem;
}

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

.form-grid.express-recommend-fields {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.filter-word-add {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  max-width: 36rem;
}

.filter-word-add label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  flex: 1 1 auto;
  min-width: 0;
}

.filter-word-add input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  line-height: 1.2;
  height: calc(1.2em + 1.1rem + 2px);
  background: #fff;
}

.filter-word-add button {
  flex: 0 0 auto;
  height: calc(1.2em + 1.1rem + 2px);
  padding: 0.55rem 1rem;
  box-sizing: border-box;
  line-height: 1.2;
}

.search-form-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
}

.search-form-compact .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 11rem));
  gap: 0.85rem 1rem;
  margin-bottom: 0;
  max-width: none;
  flex: 0 1 auto;
}

.search-form-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-bottom: 0.1rem;
}

.search-form-actions button {
  padding: 0.55rem 0.9rem;
  border: 1px solid transparent;
  line-height: 1.2;
  height: calc(1.2em + 1.1rem + 2px);
  box-sizing: border-box;
}

.search-form-compact .form-grid input {
  line-height: 1.2;
  height: calc(1.2em + 1.1rem + 2px);
  box-sizing: border-box;
}

.search-form-compact.pdd-similar-filter .form-grid {
  grid-template-columns: minmax(14rem, 20rem) 10.5rem auto;
  align-items: end;
}

.search-form-compact.pdd-similar-filter .form-grid select.cost-range-select {
  min-width: 8.5rem;
  padding-right: 2.1rem;
}

.order-list-filter .form-grid {
  grid-template-columns:
    auto
    minmax(12rem, 1.2fr)
    auto
    minmax(8rem, 0.9fr)
    minmax(8rem, 0.9fr)
    auto;
  width: 100%;
  align-items: end;
}

/* 对齐典型订单号长度：260730-209358743942264（23 字符） */
.order-list-filter .order-list-q-input {
  width: calc(23ch + 1.3rem + 2px);
  max-width: 100%;
  box-sizing: border-box;
}

.order-list-filter .form-grid select,
.order-list-filter .form-grid input[type="date"] {
  line-height: 1.2;
  height: calc(1.2em + 1.1rem + 2px);
  box-sizing: border-box;
}

.order-list-filter-actions {
  padding-bottom: 0;
}

.order-list-panel {
  overflow: visible;
  position: relative;
  z-index: 2;
}

.order-list-filter {
  position: relative;
  z-index: 3;
}

.order-list-filter .settle-shop-field {
  z-index: 4;
}

.order-list-filter .settle-shop-input,
.order-list-filter .order-list-date-preset-select {
  width: 100%;
}

.order-list-date-preset {
  min-width: 6.5rem;
}

.settle-filter .form-grid {
  display: grid;
  grid-template-columns: minmax(5.5rem, 7rem) minmax(14rem, 18rem) auto auto auto auto;
  gap: 0.85rem 1rem;
  width: auto;
  max-width: 100%;
  align-items: end;
  margin-bottom: 0;
}

.settle-filter .form-grid select,
.settle-filter .form-grid input {
  line-height: 1.2;
  height: calc(1.2em + 1.1rem + 2px);
  box-sizing: border-box;
  width: 100%;
}

.settle-filter .settle-platform-select {
  min-width: 0;
  width: 100%;
}

.settle-filter .settle-period-input {
  width: 100%;
  min-width: 10rem;
}

.settle-filter .settle-date-input {
  min-width: 7.5rem;
  width: 100%;
}

.settle-shop-field {
  position: relative;
}

.settle-shop-combobox {
  position: relative;
}

.settle-shop-combobox .settle-shop-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.settle-shop-suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.2rem);
  left: 0;
  right: 0;
  max-height: 14rem;
  overflow: auto;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(16, 35, 63, 0.12);
}

.settle-shop-suggestions[hidden] {
  display: none;
}

.settle-shop-suggestion {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.45rem 0.7rem;
  text-align: left;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}

.settle-shop-suggestion:hover,
.settle-shop-suggestion.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.settle-shop-suggestion-empty {
  padding: 0.55rem 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.settle-filter-actions {
  padding-bottom: 0;
}

/* 费用导出：店铺建议层需要画出卡片，否则会被 content-panel 裁掉 */
.fee-export-panel {
  overflow: visible;
  position: relative;
  z-index: 2;
}

.fee-export-filter {
  position: relative;
  z-index: 3;
}

.fee-export-filter .settle-shop-field {
  z-index: 4;
}

.fee-export-month-field {
  min-width: 6.5rem;
}

.batch-switcher {
  margin-bottom: 0.75rem;
}

.batch-switcher label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  min-width: min(100%, 28rem);
}

.batch-switcher-select {
  appearance: none;
  width: min(100%, 32rem);
  max-width: 100%;
  padding: 0.55rem 2.1rem 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  line-height: 1.2;
  height: calc(1.2em + 1.1rem + 2px);
  box-sizing: border-box;
  color: #1f2937;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.2.6 6 5.4 10.8.6 12 1.8 6 7.8 0 1.8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.7rem;
  cursor: pointer;
}

.batch-switcher-select:hover {
  border-color: #c5ccd6;
}

.batch-switcher-select:focus {
  outline: none;
  border-color: #7c8fa3;
  box-shadow: 0 0 0 3px rgba(124, 143, 163, 0.16);
}

.form-grid .span-2 {
  grid-column: span 2;
}

.table-scroll {
  overflow-x: auto;
  padding-top: 0.35rem;
}

.form-grid label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
}

.form-grid select,
.form-grid input {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.sku-ac {
  position: relative;
}

.sku-ac-input {
  width: 100%;
  box-sizing: border-box;
}

.sku-ac-list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  max-height: 16rem;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.sku-ac-item {
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.sku-ac-item:hover,
.sku-ac-item.is-active {
  background: #f1f5f9;
}

.sku-ac-empty {
  padding: 0.55rem 0.7rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.form-errors {
  color: var(--error);
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
}

.result-block h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0.55rem;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--muted);
  font-weight: 600;
  background: #fafbfc;
}

.data-table tr.is-recommend {
  background: var(--accent-soft);
}

.import-check-warning,
.import-check-success {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 1.25rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-weight: 600;
}

.import-check-warning {
  background: #fdecec;
  color: var(--error);
  border: 1px solid #f0c2c2;
}

.import-check-success {
  background: #e7f6ee;
  color: var(--accent);
  border: 1px solid #b7e0cc;
}

.data-table tr.is-check-error td {
  background: #fdecec;
  color: var(--error);
}

.data-table tr.is-check-ok td {
  background: #e7f6ee;
  color: var(--accent);
}

.import-check-error-icon,
.import-check-ok-icon {
  margin-right: 0.35rem;
}

.tag-recommend {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(15, 92, 76, 0.12);
  color: var(--accent);
  white-space: nowrap;
}

.tag-recommend i {
  font-size: 0.75rem;
}

.data-table input[type="number"],
.data-table input[type="text"],
.data-table select,
.rate-edit-table input,
.rate-edit-table select {
  width: 100%;
  max-width: 7.5rem;
  padding: 0.35rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  background: #fff;
}

.rate-edit-table select {
  max-width: 9rem;
}

@media (max-width: 860px) {
  .app-body {
    flex-direction: column;
  }

  .sidebar {
    position: static;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.75rem;
    overflow-y: visible;
  }

  .main-content {
    margin-left: 0;
  }

  .top-navbar-right .user-name {
    display: none;
  }

  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid.express-recommend-fields {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .search-form-compact .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .search-form-compact.pdd-similar-filter .form-grid {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .search-form-compact.pdd-similar-filter .form-grid label:first-child {
    grid-column: 1 / -1;
  }

  .order-list-filter .form-grid {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .order-list-filter-actions {
    grid-column: 1 / -1;
  }

  .settle-filter .form-grid {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .settle-filter-actions {
    grid-column: 1 / -1;
  }

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

/* ---------- Confirm modal ---------- */
body.confirm-modal-open {
  overflow: hidden;
}

.confirm-modal[hidden] {
  display: none !important;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 35, 63, 0.45);
}

.confirm-modal-dialog {
  position: relative;
  width: min(400px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.35rem 1.15rem;
  box-shadow: 0 16px 40px rgba(16, 35, 63, 0.18);
}

.confirm-modal-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.confirm-modal-message {
  margin: 0 0 1.15rem;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.95rem;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
}

/* 导入日志「查看失败」：宽表自适应 + 内容区纵向滚动 */
.confirm-modal-dialog.import-log-fails-dialog {
  width: min(92vw, max-content);
  max-width: min(92vw, 56rem);
  max-height: min(88vh, 40rem);
  display: flex;
  flex-direction: column;
  padding-bottom: 1rem;
}

.import-log-fails-dialog .confirm-modal-title {
  flex: 0 0 auto;
}

.import-log-fails-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(60vh, 28rem);
  overflow: auto;
  margin: 0 0 1rem;
  -webkit-overflow-scrolling: touch;
}

.import-log-fails-body .data-table {
  width: max-content;
  min-width: 100%;
}

.import-log-fails-body .data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.import-log-fails-body .data-table td {
  white-space: nowrap;
}

.import-log-fails-body .data-table td:last-child {
  white-space: normal;
  word-break: break-word;
  min-width: 12rem;
  max-width: 28rem;
}

.import-log-fails-dialog .confirm-modal-actions {
  flex: 0 0 auto;
  margin-top: 0;
}

.btn-modal-cancel,
.btn-modal-danger {
  border: 0;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font: inherit;
  cursor: pointer;
}

.btn-modal-cancel {
  background: #eef1f4;
  color: var(--ink);
}

.btn-modal-cancel:hover {
  background: #e3e8ef;
}

.btn-modal-danger {
  background: var(--error);
  color: #fff;
}

.btn-modal-danger:hover {
  opacity: 0.92;
}

.btn-modal-primary {
  border: 0;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font: inherit;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}

.btn-modal-primary:hover {
  opacity: 0.92;
}

.modal-form {
  display: grid;
  gap: 1rem;
}

.modal-form-label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.modal-form-label input {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.modal-form .confirm-modal-actions {
  margin-top: 0.15rem;
}

/* ---------- Design review ---------- */
.review-thumb {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  display: block;
}

.review-preview {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f5f7;
}

.review-detail-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
}

@media (max-width: 960px) {
  .review-detail-grid {
    grid-template-columns: 1fr;
  }
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.cell-wrap {
  max-width: 18rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  line-height: 1.4;
}

.badge-pass {
  background: rgba(15, 92, 76, 0.12);
  color: var(--accent);
}

.badge-fail {
  background: rgba(155, 44, 44, 0.12);
  color: var(--error);
}

.badge-manual {
  background: rgba(180, 120, 20, 0.15);
  color: #8a5a00;
}

.badge-muted {
  background: rgba(107, 115, 128, 0.15);
  color: var(--muted);
}

.batch-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}

.batch-select-all {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.btn-primary {
  border: 0;
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary:not(:disabled):hover {
  opacity: 0.92;
}

.col-check {
  width: 2.25rem;
  text-align: center;
  vertical-align: middle;
}

.shop-check-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0 auto;
  cursor: pointer;
}

.shop-check-label input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.shop-check-box {
  box-sizing: border-box;
  width: 1.15rem;
  height: 1.15rem;
  border: 1.5px solid #94a3b8;
  border-radius: 4px;
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.shop-check-label:hover .shop-check-box {
  border-color: var(--accent);
}

.shop-check-label input:focus-visible + .shop-check-box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.shop-check-label input:checked + .shop-check-box {
  border-color: var(--accent);
  background: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.85rem 0.85rem;
}

.shop-check-label input:indeterminate + .shop-check-box {
  border-color: var(--accent);
  background: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M3.5 8h9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.85rem 0.85rem;
}

/* ---------- Customer list ---------- */
.customer-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.cost-list-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.shop-list-toolbar {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
}

.shop-list-filters {
  flex: 0 1 auto;
  flex-wrap: nowrap;
  min-width: 0;
}

.shop-list-filters .cost-range-select {
  min-width: 7.5rem;
}

.shop-list-filters .cost-search-label {
  flex: 0 0 auto;
  width: 12rem;
  min-width: 0;
}

.shop-list-filters .cost-search-input {
  width: 100%;
  min-width: 0;
}

.shop-list-toolbar > .btn-primary-link,
.shop-list-toolbar > .btn-export {
  flex-shrink: 0;
}

.shop-list-export {
  margin-left: auto;
}

.cost-range-form {
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.shop-list-filters.cost-range-form {
  flex-wrap: nowrap;
}

.cost-range-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.cost-range-caption {
  white-space: nowrap;
}

.cost-search-label {
  margin: 0;
}

.cost-search-input {
  width: min(100%, 18rem);
  min-width: 12rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.2;
  height: calc(1.2em + 1.1rem + 2px);
  box-sizing: border-box;
  color: var(--ink);
  background: #fff;
}

.cost-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 92, 76, 0.16);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cost-range-select {
  appearance: none;
  min-width: 10.5rem;
  padding: 0.55rem 2.1rem 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.2;
  height: calc(1.2em + 1.1rem + 2px);
  box-sizing: border-box;
  color: var(--ink);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.2.6 6 5.4 10.8.6 12 1.8 6 7.8 0 1.8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.7rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cost-range-select:hover {
  border-color: #c5ccd6;
}

.cost-range-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 92, 76, 0.16);
}

.customer-stats {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.customer-stats strong {
  color: var(--ink);
  font-weight: 700;
}

.customer-stats-sep {
  color: var(--line);
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  background: #fff;
  color: var(--accent);
}

.btn-export:hover {
  background: var(--accent-soft);
}

.customer-batch-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.9rem;
  background: #f3f6f5;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.customer-batch-bar[hidden] {
  display: none !important;
}

.customer-batch-count {
  color: var(--ink);
  font-size: 0.92rem;
}

.customer-batch-form {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
}

.btn-batch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}

.btn-batch:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-batch:not(:disabled):hover {
  opacity: 0.92;
}

.customer-table {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.customer-table thead th {
  background: #1f3d34;
  color: #fff;
  border-bottom: 0;
  font-weight: 600;
  white-space: nowrap;
}

.customer-table tbody tr:nth-child(even) {
  background: #f7f9f8;
}

.customer-table tbody tr:hover {
  background: #eef5f2;
}

.customer-table .col-center {
  text-align: center;
  vertical-align: middle;
}

.customer-table .col-check {
  vertical-align: middle;
}

.customer-table input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.customer-basic {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 10rem;
}

.customer-avatar {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: #e7eeeb;
  color: #5f716b;
  font-size: 0.95rem;
}

.customer-basic-text {
  min-width: 0;
}

.customer-name {
  font-weight: 600;
  line-height: 1.3;
}

.customer-phone {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.customer-meta {
  display: grid;
  gap: 0.28rem;
  color: var(--muted);
  font-size: 0.88rem;
  min-width: 9rem;
}

.customer-meta i,
.customer-wechat-type i {
  width: 0.95rem;
  color: #6f817a;
}

.customer-wechat-type {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.35rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}

.level-badge.level-s {
  background: #d8f0e5;
  color: #0f5c4c;
}

.level-badge.level-a {
  background: #d9e6f2;
  color: #355a7a;
}

.level-badge.level-b {
  background: #e2e5ea;
  color: #4a5563;
}


.batch-progress-dialog {
  width: min(440px, 100%);
}

.reviewing-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.15rem;
}

.reviewing-copy {
  min-width: 0;
  flex: 1;
}

.reviewing-copy .confirm-modal-title {
  margin-bottom: 0.25rem;
}

.reviewing-copy .confirm-modal-message {
  margin-bottom: 0;
}

.reviewing-spinner {
  display: none;
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  margin-top: 0.1rem;
  border: 2.5px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
}

.batch-progress-dialog.is-reviewing .reviewing-spinner {
  display: inline-block;
  animation: reviewing-spin 0.75s linear infinite;
}

.batch-progress-dialog.is-reviewing .reviewing-copy .confirm-modal-title::after {
  content: "审核中";
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  vertical-align: 0.12rem;
  animation: reviewing-pulse 1.2s ease-in-out infinite;
}

.batch-progress-dialog.is-done .reviewing-copy .confirm-modal-title::after {
  content: "已完成";
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 0.72rem;
  font-weight: 600;
  vertical-align: 0.12rem;
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: #e6ebf0;
  overflow: hidden;
  margin: 0.75rem 0 0.4rem;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.25s ease;
  position: relative;
}

.batch-progress-dialog.is-reviewing .progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.45),
    transparent
  );
  animation: reviewing-shimmer 1.2s linear infinite;
}

.progress-meta {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.batch-log {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
}

.batch-log li {
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.batch-log li:last-child {
  border-bottom: 0;
}

.batch-log-ok {
  color: var(--accent);
}

.batch-log-fail {
  color: var(--error);
}

.batch-log-running {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent);
  background: var(--accent-soft);
}

.batch-log-running::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid rgba(15, 92, 76, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: reviewing-spin 0.75s linear infinite;
  flex: 0 0 auto;
}

@keyframes reviewing-spin {
  to { transform: rotate(360deg); }
}

@keyframes reviewing-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@keyframes reviewing-shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .batch-progress-dialog.is-reviewing .reviewing-spinner,
  .batch-log-running::before,
  .batch-progress-dialog.is-reviewing .progress-fill::after,
  .batch-progress-dialog.is-reviewing .reviewing-copy .confirm-modal-title::after {
    animation: none;
  }
}

/* 快递账单对账 */
.weight-compare-page .wc-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.weight-compare-page .wc-section:last-child {
  border-bottom: 0;
}

.wc-section-title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.wc-progress-block {
  margin-top: 1rem;
  max-width: 40rem;
}

.wc-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}

.wc-stat {
  min-width: 6.5rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
}

.wc-stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted, #6b7280);
  margin-bottom: 0.2rem;
}

.wc-pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.shop-page-size-form {
  margin: 0 0 0 auto;
}

.shop-page-size-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.shop-page-size-select {
  appearance: none;
  min-width: 4.25rem;
  padding: 0.35rem 1.6rem 0.35rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.2.6 6 5.4 10.8.6 12 1.8 6 7.8 0 1.8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 0.65rem;
  cursor: pointer;
}

.wc-shipment-table {
  margin-top: 1rem;
  font-size: 0.92rem;
}

.wc-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 8.5rem;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.wc-action-btn.is-busy,
.wc-action-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  background: #6b7c8f;
  color: #fff;
  pointer-events: none;
}

.wc-action-btn.is-busy .fa-spinner {
  animation: wc-spin 0.8s linear infinite;
}

@keyframes wc-spin {
  to { transform: rotate(360deg); }
}

.picked-files {
  margin-top: 0.35rem;
}

.picked-files p {
  margin: 0;
}

.picked-files ul {
  margin: 0.25rem 0 0;
  padding-left: 1.15rem;
}

.picked-files li {
  padding: 0.08rem 0;
  word-break: break-all;
}

.picked-files details {
  margin-top: 0.35rem;
}

.picked-files summary {
  cursor: pointer;
  color: var(--accent);
}

.file-picked-list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
  font-size: 0.88rem;
  color: #1f2937;
  max-width: min(100%, 32rem);
}

.file-picked-list li {
  padding: 0.12rem 0;
  word-break: break-all;
}

.file-picked-list .file-picked-meta {
  color: var(--muted, #6b7280);
  font-size: 0.8rem;
  padding-bottom: 0.2rem;
}

.import-log-filter {
  margin-bottom: 1rem;
}

.import-log-filter .form-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
}

.import-log-filter label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.88rem;
  color: var(--muted, #6b7280);
}

.import-log-filter select {
  min-width: 8rem;
}

.op-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
  white-space: nowrap;
}

.op-action i {
  font-size: 0.92em;
}

.op-action-import {
  color: #0f766e;
}

.op-action-delete {
  color: #b45309;
}

.op-action-fee-export {
  color: #1d4ed8;
}

.period-delete-progress {
  display: inline-block;
  max-width: 22rem;
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.35;
  word-break: break-all;
}

/* ---------- Office gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 1rem;
}

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

.gallery-card-preview {
  display: block;
  aspect-ratio: 4 / 3;
  background: #f3f5f7;
}

.gallery-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-card-meta {
  padding: 0.65rem 0.75rem 0.75rem;
  display: grid;
  gap: 0.35rem;
}

.gallery-card-name {
  font-size: 0.9rem;
  line-height: 1.3;
  word-break: break-all;
}

.gallery-card-time {
  font-size: 0.8rem;
}

/* ---------- Office API manage ---------- */
.api-manage-section {
  margin-bottom: 1.5rem;
}

.api-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.api-secret-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.api-secret-row label {
  flex: 1 1 18rem;
  display: grid;
  gap: 0.35rem;
}

.api-secret-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
}

.api-call-steps {
  margin: 0.5rem 0 0.75rem 1.25rem;
  line-height: 1.6;
}

.api-call-steps code,
.api-example {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
}

.api-example {
  margin: 0;
  padding: 0.85rem 1rem;
  background: #f3f5f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.api-select-card {
  cursor: pointer;
}

.api-select-card.is-selected {
  border-color: var(--accent, #2563eb);
  box-shadow: 0 0 0 1px var(--accent, #2563eb);
}

.api-select-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.pdd-query-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 22rem;
}

.pdd-table .col-check {
  width: 2.75rem;
  vertical-align: middle;
}

.pdd-check-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0 auto;
  cursor: pointer;
}

.pdd-check-label input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.pdd-check-box {
  box-sizing: border-box;
  width: 1.15rem;
  height: 1.15rem;
  border: 1.5px solid #94a3b8;
  border-radius: 4px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.pdd-check-label:hover .pdd-check-box {
  border-color: var(--accent, #2563eb);
}

.pdd-check-label input:focus-visible + .pdd-check-box {
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: 2px;
}

.pdd-check-label input:checked + .pdd-check-box {
  border-color: var(--accent, #2563eb);
  background: var(--accent, #2563eb);
  box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.85rem 0.85rem;
}

.pdd-check-label input:indeterminate + .pdd-check-box {
  border-color: var(--accent, #2563eb);
  background: var(--accent, #2563eb);
  box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M3.5 8h9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.85rem 0.85rem;
}

.pdd-detail-dialog {
  max-width: 32rem;
  width: min(92vw, 32rem);
}

.confirm-modal-dialog.collect-log-json-dialog {
  width: min(92vw, 56rem);
  max-height: min(88vh, 40rem);
  display: flex;
  flex-direction: column;
}

.collect-log-json-pre {
  flex: 1 1 auto;
  min-height: 8rem;
  max-height: min(60vh, 28rem);
  overflow: auto;
  margin: 0 0 1rem;
  padding: 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
}

.pdd-detail-dl {
  margin: 0 0 1rem;
  display: grid;
  gap: 0.85rem;
}

.pdd-detail-dl dt {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
}

.pdd-detail-dl dd {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  word-break: break-all;
}

.pdd-detail-dl #pdd-detail-link {
  display: inline-block;
  max-width: 100%;
}



