:root {
  --bg: #f3efe7;
  --panel: rgba(255, 252, 247, 0.9);
  --ink: #1f241f;
  --muted: #687066;
  --brand: #156c52;
  --brand-soft: #d8ebe3;
  --accent: #c76b2d;
  --line: rgba(31, 36, 31, 0.1);
  --shadow: 0 16px 40px rgba(39, 56, 44, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI Variable", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(199, 107, 45, 0.16), transparent 24%),
    linear-gradient(180deg, #f8f5ef 0%, var(--bg) 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  width: min(1560px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.workspace-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.workspace-shell.is-hidden {
  display: none;
}

.workspace-sidebar {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 18px;
}

.workspace-content {
  min-width: 0;
}

.mobile-workspace-back {
  display: none;
}

.page-view {
  display: none;
  min-width: 0;
}

.page-view.active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero.is-hidden {
  display: none;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.05;
}

.hero-copy {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

#noticeMessage {
  white-space: pre-line;
}

.hero-panel,
.panel,
.summary-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-panel {
  padding: 22px 24px;
  align-self: end;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-advanced {
  margin-top: 12px;
  padding-top: 4px;
}

.auth-advanced summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 600;
  user-select: none;
}

.auth-advanced label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.divider {
  height: 1px;
  margin: 18px 0 14px;
  background: var(--line);
}

.hero-panel p,
.hero-panel ol {
  margin: 0;
}

.hero-panel ol {
  padding-left: 18px;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.8;
}

.sidebar-brand,
.sidebar-section,
.page-header {
  padding: 22px 24px;
}

.sidebar-brand h2 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.15;
}

.sidebar-brand {
  display: grid;
  gap: 10px;
}

.sidebar-section-title {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.module-nav {
  display: grid;
  gap: 8px;
  margin: 0;
}

.nav-group {
  display: grid;
  gap: 8px;
}

.module-nav a {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.nav-group-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  box-shadow: none;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.nav-group-button:hover,
.module-nav .nav-group-trigger:hover {
  transform: none;
}

.module-nav a:hover {
  color: var(--brand);
  border-color: rgba(21, 108, 82, 0.28);
}

.nav-group-button:hover {
  color: var(--brand);
  border-color: rgba(21, 108, 82, 0.28);
}

.module-nav a.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.nav-group.is-expanded > .nav-group-button,
.module-nav .nav-group-trigger.is-expanded:not(.active) {
  background: rgba(216, 235, 227, 0.72);
  border-color: rgba(21, 108, 82, 0.24);
  color: var(--brand);
}

.nav-group:not(.has-visible-children) .nav-expand-indicator {
  display: none;
}

.sub-nav {
  display: grid;
  gap: 8px;
  padding-left: 18px;
}

.nav-group.is-collapsible:not(.is-expanded) > .sub-nav,
.nav-group:not(.has-visible-children) > .sub-nav {
  display: none;
}

.nav-expand-indicator {
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 180ms ease;
}

.nav-group.is-expanded .nav-expand-indicator {
  transform: rotate(45deg);
}

.module-nav .nav-sub-link {
  width: calc(100% - 6px);
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  background: rgba(244, 248, 244, 0.92);
}

.sidebar-context {
  display: grid;
  gap: 14px;
}

.module-scope {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.module-scope select {
  min-width: 220px;
}

.page-header {
  margin-bottom: 18px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.page-breadcrumb {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.page-header h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
}

.sidebar-user {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.sidebar-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.subtle-pill {
  background: rgba(21, 108, 82, 0.08);
  color: var(--brand);
}

.summary-grid,
.panel-grid,
.data-grid,
.detail-grid {
  display: grid;
  gap: 18px;
}

.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.summary-card {
  padding: 18px 20px;
}

.summary-action-card {
  width: 100%;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.55);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.summary-action-card:hover:not(:disabled) {
  border-color: rgba(21, 108, 82, 0.28);
  box-shadow: 0 18px 40px rgba(39, 56, 44, 0.14);
}

.summary-action-card:disabled {
  cursor: default;
  opacity: 0.72;
}

.summary-action-card span {
  color: var(--muted);
}

.summary-action-card strong {
  color: var(--ink);
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.summary-card strong {
  font-size: 32px;
  font-weight: 700;
}

.security-overview-panel {
  padding: 22px 24px;
}

.security-summary-grid {
  margin: 14px 0 0;
}

.panel-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.security-banner {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(31, 46, 40, 0.08);
  border-radius: 16px;
  background: rgba(226, 240, 233, 0.7);
  line-height: 1.6;
}

.security-overview-panel .table-wrap {
  margin-top: 16px;
}

.panel-grid {
  grid-template-columns: 1.15fr 1.1fr 0.95fr;
  margin-bottom: 18px;
}

.data-grid {
  grid-template-columns: 1fr;
}

.detail-grid {
  grid-template-columns: 1fr;
  margin-top: 18px;
}

.module-double,
.module-split {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  min-width: 0;
}

.module-double {
  grid-template-columns: 1.05fr 1.25fr;
}

.after-sales-layout {
  grid-template-columns: minmax(360px, 0.92fr) minmax(760px, 1.58fr);
}

.module-split {
  grid-template-columns: 1fr;
}

.employee-layout {
  grid-template-columns: 1fr;
}

.module-double > *,
.module-split > * {
  min-width: 0;
}

.panel {
  padding: 24px 26px;
  width: 100%;
  min-width: 0;
}

.panel h2 {
  margin: 0;
  font-size: 20px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-panel-footer-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.toolbar-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-inline input {
  min-width: 260px;
}

.operations-strip {
  display: grid;
  gap: 14px;
  margin: 18px 0 8px;
}

.product-filters,
.product-batch-actions,
.table-footer,
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-filters {
  align-items: flex-end;
}

.product-filters input,
.product-filters select {
  min-width: 160px;
  flex: 1 1 160px;
}

.filter-actions-inline {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.product-toolbar-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

.product-batch-actions {
  justify-content: flex-start;
}

.audit-toolbar-actions {
  justify-content: flex-end;
}

.batch-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.batch-actions-inline {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.form-grid .field-block {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.merchant-case-list {
  display: grid;
  gap: 14px;
}

.merchant-case-empty {
  padding: 18px 20px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: #fffaf3;
}

.merchant-case-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.merchant-case-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-detail-image-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.product-detail-image-card[draggable="true"] {
  cursor: grab;
}

.product-detail-image-card.is-dragging {
  opacity: 0.56;
  transform: scale(0.985);
}

.product-detail-image-card.is-drop-target {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(28, 122, 91, 0.14);
}

.merchant-case-fields {
  display: grid;
  gap: 14px;
}

.merchant-case-grid,
.merchant-case-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.merchant-case-preview-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: #fffaf3;
}

.merchant-case-preview-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.merchant-case-preview-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  object-fit: cover;
  background: #f3efe7;
}

.merchant-case-preview-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 18px;
  border-radius: 14px;
  background: #f3efe7;
  color: var(--muted);
  text-align: center;
}

.merchant-process-preview {
  margin-top: 4px;
}

.merchant-case-upload-row {
  margin-top: 8px;
}

.service-item-field {
  align-self: stretch;
}

.service-item-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.form-grid .service-item-option {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

.form-grid .service-item-option span {
  display: inline-block;
  color: var(--ink);
}

.button-like {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 44px;
}

.product-image-manager,
.product-detail-images-block {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
}

.product-image-manager-head {
  display: grid;
  gap: 4px;
}

.product-image-manager-head > span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.product-image-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(260px, 1.15fr);
  gap: 16px;
  align-items: stretch;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fffaf3;
}

.product-cover-preview {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.product-cover-preview-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #f3efe7;
}

.product-cover-preview-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.product-cover-preview-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.product-cover-preview-copy {
  display: grid;
  gap: 8px;
}

.product-cover-preview-copy strong {
  font-size: 15px;
}

.product-image-controls {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.product-cover-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.product-cover-upload-row .button-like,
.product-cover-upload-row button {
  min-width: 96px;
}

.product-image-url-field {
  min-width: 0;
}

.product-carousel-manager {
  order: -1;
}

.required-mark {
  color: var(--danger);
  font-style: normal;
}

.product-carousel-board {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
  margin-top: 14px;
}

.product-carousel-grid {
  display: contents;
}

.product-carousel-card,
.product-carousel-add-tile {
  position: relative;
  width: 136px;
  min-height: 196px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffaf3;
}

.product-carousel-card {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.product-carousel-add-tile {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border-style: dashed;
  color: var(--muted);
  cursor: pointer;
}

.product-carousel-add-tile small {
  color: var(--muted);
}

.product-carousel-add-tile.is-disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.product-carousel-plus {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(28, 122, 91, 0.1);
  color: var(--accent);
  font-size: 34px;
  line-height: 38px;
  text-align: center;
}

.product-carousel-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  background: #f3efe7;
}

.product-carousel-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.product-carousel-placeholder,
.product-carousel-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.product-carousel-placeholder {
  height: 100%;
  padding: 12px;
  font-size: 13px;
}

.product-carousel-empty {
  width: 220px;
  min-height: 196px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fffaf3;
}

.product-carousel-badge {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.product-carousel-url-input {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12px;
}

.product-carousel-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.product-carousel-actions button {
  min-height: 32px;
  padding: 4px 6px;
  font-size: 12px;
}

.product-detail-image-card[draggable="true"] {
  cursor: grab;
}

.product-detail-image-card.is-dragging {
  opacity: 0.56;
  transform: scale(0.985);
}

.product-detail-image-card.is-drop-target {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(28, 122, 91, 0.14);
}

.product-title-cell {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.product-cover-thumb {
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f3efe7;
}

.product-cover-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.product-cover-thumb-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.product-title-copy {
  min-width: 0;
}

.service-item-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--brand);
}

.full {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fffdf9;
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: rgba(199, 58, 58, 0.72);
  background: rgba(255, 243, 242, 0.95);
  box-shadow: 0 0 0 3px rgba(199, 58, 58, 0.08);
}

.field-error-text {
  margin-top: -2px;
  color: #c73a3a;
  font-size: 12px;
  line-height: 1.5;
}

input:disabled,
select:disabled,
textarea:disabled {
  background: #f3f0e8;
  color: #8b8175;
  cursor: not-allowed;
}

textarea {
  resize: vertical;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

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

.upload-selection-panel {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: #fffaf3;
}

.upload-selection-trigger {
  cursor: pointer;
}

.upload-selection-trigger:focus-visible {
  outline: 3px solid rgba(47, 111, 79, 0.22);
  outline-offset: 2px;
}

.upload-selection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.upload-selection-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.upload-picker-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: #0f7d57;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.upload-selection-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.upload-selection-item {
  flex: 0 0 208px;
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.upload-selection-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #f3efe7;
}

.upload-selection-image,
.upload-selection-placeholder {
  width: 100%;
  height: 100%;
}

.upload-selection-image {
  display: block;
  object-fit: cover;
}

.upload-selection-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 14px;
  line-height: 1.6;
}

.upload-selection-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(31, 41, 55, 0.18);
}

.upload-selection-remove:hover,
.upload-selection-remove:focus-visible {
  background: #ffffff;
  color: #b42318;
  outline: 2px solid rgba(180, 35, 24, 0.24);
  outline-offset: 2px;
}

.upload-selection-remove:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

.upload-selection-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.upload-selection-name {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  white-space: normal;
  word-break: break-word;
}

.upload-selection-actions {
  display: flex;
  justify-content: flex-end;
}

button,
.button-like {
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  cursor: pointer;
  background: var(--brand);
  color: white;
  transition: transform 180ms ease, box-shadow 180ms ease;
  box-shadow: 0 8px 20px rgba(21, 108, 82, 0.2);
}

button:hover,
.button-like:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

button.ghost,
.button-like.ghost {
  background: var(--brand-soft);
  color: var(--brand);
  box-shadow: none;
}

.danger-light {
  background: rgba(179, 63, 25, 0.1);
  color: #b33f19;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 10px;
}

.risk-accounts-table td:nth-child(1) {
  min-width: 240px;
}

.risk-accounts-table td:nth-child(5) {
  min-width: 210px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: auto;
}

th,
td {
  padding: 14px 18px 14px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th:last-child,
td:last-child {
  padding-right: 0;
}

.orders-table {
  min-width: 1180px;
}

.notifications-table {
  min-width: 1120px;
}

.employees-table {
  min-width: 1140px;
}

.employees-table th,
.employees-table td {
  white-space: normal;
}

.customers-table,
.after-sales-table {
  min-width: 1180px;
}

.after-sales-table-full {
  min-width: 1180px;
}

.after-sales-table-full td:nth-child(1) {
  min-width: 180px;
}

.after-sales-table-full td:nth-child(2) {
  min-width: 200px;
}

.photo-archive-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
}

.photo-archive-card {
  flex: 0 0 208px;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdf9;
}

.photo-archive-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #f3efe7;
}

.photo-archive-image,
.photo-archive-placeholder {
  width: 100%;
  height: 100%;
}

.photo-archive-image {
  display: block;
  object-fit: cover;
}

.photo-archive-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 16px;
  line-height: 1.6;
}

.photo-archive-meta {
  display: grid;
  gap: 6px;
}

.photo-archive-stage {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.photo-archive-actions {
  display: flex;
  justify-content: flex-start;
}

.photo-archive-empty {
  padding: 18px 0;
}

.cell-stack {
  display: grid;
  gap: 6px;
  min-width: 220px;
  white-space: normal;
}

.employee-account-cell {
  min-width: 180px;
}

.employee-account-code {
  font-family: "Consolas", "SFMono-Regular", monospace;
  letter-spacing: 0.02em;
  word-break: break-all;
}

.cell-wrap {
  min-width: 280px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.55;
}

.employee-profile-cell {
  min-width: 210px;
  white-space: normal;
}

.employee-profile-cell .employee-account-code {
  font-size: 14px;
  word-break: break-all;
}

.employee-permissions-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
  white-space: normal;
}

.employee-permissions-cell {
  min-width: 180px;
}

.employee-permission-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.5;
  white-space: normal;
}

.employee-permission-inline-label {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.employee-permission-inline-value {
  color: var(--muted);
  font-size: 12px;
  white-space: normal;
  word-break: break-word;
}

.table-primary {
  font-weight: 600;
  color: var(--ink);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
}

.table-actions button {
  white-space: nowrap;
  min-width: max-content;
}

.employee-table-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(108px, 1fr));
  gap: 8px;
  min-width: 232px;
  width: 100%;
}

.employee-table-actions button {
  width: 100%;
  justify-content: center;
}

.employee-actions-cell {
  min-width: 232px;
}

.table-footer {
  margin-top: 14px;
}

.modal-backdrop,
.loading-mask {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(22, 28, 24, 0.32);
  backdrop-filter: blur(8px);
  z-index: 50;
}

#passwordChangeModal {
  z-index: 60;
}

#confirmModal {
  z-index: 70;
}

#noticeModal {
  z-index: 80;
}

#loadingMask {
  z-index: 90;
}

.toast-notice {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  max-width: min(480px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(21, 108, 82, 0.96);
  color: #f7fbf8;
  box-shadow: 0 14px 32px rgba(21, 108, 82, 0.22);
  z-index: 95;
  text-align: center;
}

.toast-notice.is-hidden {
  display: none;
}

.modal-backdrop.is-hidden,
.loading-mask.is-hidden {
  display: none;
}

.modal-card,
.loading-card {
  width: min(480px, 100%);
  padding: 24px;
  border-radius: 22px;
  background: rgba(255, 252, 247, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}

.employee-modal-card {
  width: min(1120px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.receipt-bind-modal-card {
  width: min(860px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
}

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

.receipt-bind-summary {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

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

.receipt-bind-summary-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf3;
}

.receipt-bind-summary-grid strong,
.receipt-bind-summary-grid small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

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

.receipt-service-list span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #edf6f1;
  color: var(--ink);
  font-size: 13px;
}

.receipt-scan-panel {
  display: grid;
  gap: 10px;
}

.receipt-scan-view {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #17211d;
}

.receipt-scan-view video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.receipt-scan-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  color: #f8fbf7;
  text-align: center;
  background: rgba(23, 33, 29, 0.74);
}

.receipt-scan-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.employee-modal-card .modal-form {
  grid-template-columns: 1fr;
}

.modal-card h3,
.loading-card strong {
  display: block;
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.2;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.order-row {
  cursor: pointer;
}

.order-row:hover {
  background: rgba(216, 235, 227, 0.45);
}

.detail-empty {
  padding: 16px 0 8px;
  color: var(--muted);
}

.detail-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.detail-summary-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
}

.detail-summary-group-left {
  grid-template-columns: minmax(320px, 1.2fr) minmax(220px, 0.88fr);
}

.detail-summary-group-right {
  grid-template-columns: minmax(200px, 0.92fr) minmax(220px, 1fr);
}

.detail-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.65);
}

.detail-card span,
.detail-meta-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.detail-card strong,
.detail-meta-grid strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
}

.detail-card-order-no {
  min-width: 0;
}

.detail-card-customer {
  min-width: 0;
}

.detail-order-no-value {
  white-space: nowrap;
  font-size: 15px;
}

.detail-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.detail-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.detail-block {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.52);
}

.detail-block h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
}

.employee-permission-cell .chip-row {
  gap: 8px;
}

.employee-permission-cell .chip {
  padding: 6px 10px;
  font-size: 12px;
}

.employee-permission-cell .hint {
  line-height: 1.45;
}

.detail-note {
  margin: 16px 0 0;
  color: var(--ink);
  line-height: 1.7;
}

.anchor-point {
  position: relative;
  top: -16px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
}

.warning-pill {
  background: rgba(179, 63, 25, 0.12);
  color: #b33f19;
}

.status-subline {
  margin-top: 8px;
}

.permission-panel {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
}

.permission-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.permission-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.product-select,
.permission-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--brand);
}

.token-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px dashed rgba(21, 108, 82, 0.24);
  border-radius: 18px;
  background: rgba(216, 235, 227, 0.3);
}

.token-panel input {
  font-family: "Consolas", "SFMono-Regular", monospace;
  letter-spacing: 0.02em;
}

.modal-form {
  margin-top: 16px;
}

.settings-security {
  display: grid;
  gap: 14px;
}

.settings-security label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-security input[readonly],
.settings-security textarea[readonly] {
  background: rgba(245, 248, 245, 0.92);
  color: var(--ink);
  cursor: default;
}

.settings-security textarea[readonly] {
  min-height: 110px;
  resize: vertical;
}

.settings-security .token-panel {
  margin-top: 0;
}

.template-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.compact-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.role-preset-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.role-preset-button.is-active {
  background: var(--brand);
  color: #fff;
}

.modal-card-wide {
  width: min(880px, 100%);
}

.json-block {
  margin: 0;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(31, 36, 31, 0.92);
  color: #f3efe7;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

@media (max-width: 980px) {
  .workspace-shell,
  .hero,
  .summary-grid,
  .panel-grid,
  .data-grid,
  .module-double,
  .detail-layout,
  .detail-summary-grid {
    grid-template-columns: 1fr;
  }

  .detail-summary-group,
  .detail-summary-group-left,
  .detail-summary-group-right {
    grid-template-columns: 1fr;
  }

  .module-nav {
    grid-template-columns: 1fr;
  }

  .permission-grid {
    grid-template-columns: 1fr;
  }

  .role-preset-bar {
    align-items: flex-start;
  }

  .template-toolbar {
    grid-template-columns: 1fr;
  }

  .template-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 1560px);
    padding-top: 18px;
  }

  .workspace-shell {
    gap: 14px;
  }

  .workspace-shell:not(.is-mobile-content) .workspace-content {
    display: none;
  }

  .workspace-shell.is-mobile-content .workspace-sidebar {
    display: none;
  }

  .workspace-sidebar {
    position: static;
  }

  .workspace-content {
    display: block;
  }

  .page-header {
    position: static;
    padding: 14px 14px 16px;
    border-radius: 18px;
  }

  .mobile-workspace-back {
    display: inline-flex;
    width: fit-content;
    min-height: 36px;
    margin-bottom: 10px;
    padding: 8px 12px;
    align-items: center;
    justify-content: center;
  }

  .page-breadcrumb {
    display: none;
  }

  .page-header h2 {
    margin-top: 4px;
    font-size: 24px;
  }

  .page-header .hero-copy {
    font-size: 14px;
    line-height: 1.55;
  }

  .panel {
    padding: 14px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .product-image-panel,
  .product-detail-image-body {
    grid-template-columns: 1fr;
  }

  .product-cover-preview {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .product-image-manager,
  .product-detail-images-block {
    padding: 12px;
  }

  .product-cover-upload-row {
    align-items: stretch;
  }

  .product-cover-upload-row .button-like,
  .product-cover-upload-row button {
    flex: 1 1 120px;
    min-width: 0;
  }

  .merchant-case-grid,
  .merchant-case-preview-grid {
    grid-template-columns: 1fr;
  }

  .service-item-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-toolbar {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .detail-panel-footer-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-inline {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
  }

  .toolbar-inline input,
  .toolbar-inline select,
  .product-filters input,
  .product-filters select {
    min-width: 0;
    min-height: 40px;
    height: 40px;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 14px;
  }

  .toolbar-inline input[type="search"],
  .toolbar-inline input[type="text"],
  .product-filters input[type="search"],
  .product-filters input[type="text"] {
    grid-column: 1 / -1;
  }

  .operations-strip {
    gap: 10px;
    margin: 12px 0 8px;
  }

  .product-filters,
  .product-batch-actions,
  .filter-actions-inline,
  .product-toolbar-actions,
  .panel-head-actions {
    width: 100%;
  }

  .product-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
  }

  .filter-actions-inline,
  .product-toolbar-actions {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-left: 0;
  }

  .filter-actions-inline button,
  .product-toolbar-actions button,
  .toolbar-inline button,
  .product-batch-actions button,
  .table-footer button,
  .table-footer select {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 14px;
    white-space: nowrap;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-head-actions .toolbar-inline {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .panel-head-actions .toolbar-inline input {
    grid-column: auto;
  }

  .panel-head-actions > button {
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 14px;
    font-size: 14px;
    white-space: nowrap;
  }

  .sidebar-actions {
    grid-template-columns: 1fr;
  }

  .product-batch-actions,
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .table-wrap {
    overflow-x: visible;
    margin-top: 8px;
  }

  .table-wrap table,
  .orders-table,
  .notifications-table,
  .employees-table,
  .customers-table,
  .after-sales-table,
  .after-sales-table-full {
    min-width: 0;
    width: 100%;
  }

  .table-wrap table {
    display: block;
    border-collapse: separate;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tbody {
    display: grid;
    gap: 10px;
  }

  .table-wrap tr {
    display: grid;
    gap: 8px;
    padding: 12px 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 253, 249, 0.96);
    box-shadow: 0 8px 24px rgba(64, 52, 38, 0.06);
  }

  .table-wrap td {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    min-width: 0 !important;
    padding: 0;
    border-bottom: 0;
    font-size: 13px;
    line-height: 1.5;
    white-space: normal;
    word-break: break-word;
  }

  .table-wrap td::before {
    content: attr(data-mobile-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
  }

  .table-wrap td[data-mobile-label=""],
  .table-wrap td[data-mobile-label="选择"],
  .table-wrap td[colspan] {
    grid-template-columns: 1fr;
  }

  .table-wrap td[data-mobile-label=""]::before,
  .table-wrap td[data-mobile-label="选择"]::before,
  .table-wrap td[colspan]::before {
    display: none;
  }

  .table-wrap td:last-child {
    grid-template-columns: 1fr;
    padding-top: 4px;
  }

  .table-wrap td:last-child::before {
    content: "操作";
  }

  .table-actions,
  .employee-table-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }

  .table-actions button,
  .employee-table-actions button {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 7px 8px;
    border-radius: 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  .product-title-cell,
  .employee-profile-cell {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 8px;
  }

  .product-cover-thumb {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .table-footer {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 8px;
  }

  .table-footer .hint {
    grid-column: auto;
    line-height: 1.6;
  }
}
