:root {
  color-scheme: light;
  --bg: #ece9e2;
  --surface: #fffdf8;
  --surface-soft: #f7f1e8;
  --line: #d5cbbd;
  --text: #24303c;
  --muted: #6f776f;
  --brand: #245c8f;
  --brand-dark: #16446f;
  --ok: #0f766e;
  --warn: #b45309;
  --danger: #b42318;
  --shadow: 0 1px 2px rgba(43, 35, 25, .05), 0 14px 38px rgba(43, 35, 25, .08);
  --copy-strong: #24303c;
  --copy-muted: #6f776f;
  --copy-soft: #a69d90;
  --accent-soft: #245c8f;
  --tag-ok-bg: #e2f3ef;
  --tag-ok-border: rgba(15, 118, 110, 0.22);
  --tag-ok-text: #0f766e;
  --tag-warn-bg: #fbefd8;
  --tag-warn-border: rgba(180, 83, 9, 0.24);
  --tag-warn-text: #b45309;
  --tag-danger-bg: #f8e4df;
  --tag-danger-border: rgba(180, 35, 24, 0.22);
  --tag-danger-text: #b42318;
  --btn-bg: #fffdfa;
  --btn-border: #d5cbbd;
  --btn-text: #24303c;
  --btn-hover-bg: #f4eadc;
  --btn-hover-text: #245c8f;
  --btn-primary-bg: #245c8f;
  --btn-primary-hover-bg: #16446f;
  --btn-primary-shadow: 0 0 0 3px rgba(36, 92, 143, .16);
  --layout-sidebar-width: 230px;
  --layout-left-panel-width: 380px;
  --layout-page-x: 28px;
  --layout-page-max-width: 1500px;
  --radius-card: 0;
  --radius-panel: 0;
  --radius-control: 0;
  --radius-pill: 999px;
  --label-letter-spacing: 0.03em;
}

* {
  box-sizing: border-box;
}

img,
svg {
  max-width: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  min-width: 0;
}

.main,
.content,
.card,
.card-body,
.stack,
.actions,
.header-actions,
.page-title,
.console-header,
.merchant-hero-panel,
.dashboard-home-copy {
  min-width: 0;
}

.page-title h1,
.console-header h2,
.card h2,
.merchant-hero-panel h1,
.merchant-hero-panel h3,
.dashboard-home-copy h3 {
  overflow-wrap: anywhere;
}

button {
  border: 0;
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
}

input,
select {
  height: 40px;
  padding: 0 11px;
}

textarea {
  min-height: 76px;
  padding: 10px 11px;
  resize: vertical;
}

.content input,
.content select,
.content textarea,
.modal input,
.modal select,
.modal textarea {
  color: #3f4b5c;
  font-size: 13px;
  font-weight: 400;
}

.content input::placeholder,
.content textarea::placeholder,
.modal input::placeholder,
.modal textarea::placeholder {
  color: #96a2b2;
  font-size: 13px;
  font-weight: 400;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(18, 100, 216, 0.12);
}

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

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

.auth-box h1,
.page-title h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.auth-box p,
.page-title p,
.muted {
  color: var(--muted);
  line-height: 1.55;
}

.merchant-auth {
  min-height: 100vh;
  place-items: stretch;
  padding: clamp(18px, 3vw, 42px);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.95), rgba(236, 233, 226, 0.92)),
    var(--bg);
}

.merchant-auth-shell {
  width: min(1420px, 100%);
  min-height: min(760px, calc(100vh - clamp(36px, 6vw, 84px)));
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.55fr);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.merchant-auth-window,
.merchant-login-panel {
  min-width: 0;
}

.merchant-auth-window {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: clamp(20px, 3vw, 36px);
  padding: clamp(28px, 4vw, 54px);
  border-right: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(36, 92, 143, 0.08), transparent 46%),
    var(--surface);
}

.merchant-auth-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--copy-muted);
  font-size: 14px;
  font-weight: 800;
}

.merchant-auth-logo {
  width: min(260px, 48vw);
  height: 74px;
  object-fit: contain;
  object-position: left center;
}

.merchant-auth-copy {
  align-self: center;
  max-width: 940px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--brand);
  font-size: 15px;
  font-weight: 860;
}

.merchant-auth-copy h1 {
  max-width: 980px;
  margin: 0;
  color: var(--text);
  font-size: clamp(36px, 3.25vw, 48px);
  line-height: 1.18;
  letter-spacing: 0;
}

.merchant-auth-copy p:not(.eyebrow) {
  max-width: 780px;
  margin: 18px 0 0;
  color: var(--copy-muted);
  font-size: clamp(17px, 1.25vw, 21px);
  line-height: 1.6;
}

.merchant-auth-capabilities {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.merchant-auth-capabilities article {
  min-height: 126px;
  padding: 20px;
  display: grid;
  align-content: start;
  gap: 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 241, 232, 0.42);
}

.merchant-auth-capabilities strong {
  color: var(--text);
  font-size: 18px;
}

.merchant-auth-capabilities span,
.merchant-auth-footer span,
.merchant-login-panel p,
.merchant-login-signals span,
.merchant-login-help {
  color: var(--copy-muted);
  line-height: 1.55;
}

.merchant-auth-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 8px;
}

.merchant-auth-footer strong {
  color: var(--brand);
  font-size: 18px;
}

.merchant-login-panel {
  display: grid;
  align-content: center;
  gap: 24px;
  padding: clamp(28px, 3.5vw, 48px);
  background: var(--surface-soft);
}

.merchant-login-panel h2 {
  margin: 0;
  color: var(--text);
  font-size: 32px;
  line-height: 1.18;
}

.merchant-login-panel p {
  margin: 14px 0 0;
}

.merchant-login-form {
  display: grid;
  gap: 16px;
}

.merchant-login-form .field {
  margin-top: 0;
}

.merchant-login-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.merchant-login-submit {
  width: fit-content;
  min-height: 52px;
  margin-top: 0;
  padding-inline: 32px;
  border-radius: var(--radius-pill);
  font-size: 16px;
}

.merchant-register-entry {
  width: fit-content;
  min-height: 52px;
  border-radius: var(--radius-pill);
  padding-inline: 28px;
  background: var(--surface);
}

.merchant-login-signals {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.merchant-login-signals div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(213, 203, 189, 0.75);
}

.merchant-login-signals strong {
  color: var(--brand);
}

.merchant-login-help {
  margin: 0;
  font-size: 13px;
}

.merchant-login-help strong {
  color: var(--text);
}

.merchant-invite-modal {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 24px;
  max-width: 620px;
}

.merchant-invite-mark {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
}

.merchant-invite-mark span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.merchant-invite-mark strong {
  color: var(--brand);
  font-size: 22px;
  line-height: 1;
}

.merchant-invite-modal .modal-actions {
  grid-column: 2;
  justify-content: flex-start;
}

@media (max-width: 900px) {
  .merchant-auth {
    padding: 14px;
  }

  .merchant-auth-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .merchant-auth-window {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 28px;
  }

  .merchant-auth-brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .merchant-auth-logo {
    width: 210px;
    height: 58px;
  }

  .merchant-auth-copy h1 {
    font-size: 34px;
  }

  .merchant-auth-capabilities {
    grid-template-columns: 1fr;
  }

  .merchant-auth-capabilities article {
    min-height: 0;
  }

  .merchant-auth-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .merchant-login-panel {
    padding: 28px;
  }

  .merchant-invite-modal {
    grid-template-columns: 1fr;
  }

  .merchant-invite-modal .modal-actions {
    grid-column: auto;
  }
}

.compact-text {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}

.field {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.field label {
  color: var(--copy-muted);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.01em;
}

.btn {
  min-height: 38px;
  border-radius: 8px;
  padding: 0 13px;
  font-weight: 700;
  background: #eef3fa;
  color: var(--text);
}

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

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

.btn.danger {
  background: #fff1f1;
  color: var(--danger);
}

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

.text-link {
  display: inline;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

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

.inline-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  white-space: nowrap;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--layout-sidebar-width) minmax(0, 1fr);
}

.sidebar {
  background: #111827;
  color: #e7edf6;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 7px;
  font-weight: 800;
  font-size: 13px;
  color: #dbe7f8;
}

.brand img {
  width: 148px;
  max-width: 100%;
  height: auto;
  display: block;
}

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

.nav button {
  min-height: 40px;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
  padding: 0 12px;
  font-weight: 700;
}

.nav button.active,
.nav button:hover {
  background: #243145;
  color: #fff;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: start;
}

.content {
  padding: 24px;
  display: grid;
  gap: 18px;
  align-content: start;
}

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

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0;
  padding: 15px 16px;
  font-size: 16px;
  border-bottom: 1px solid var(--line);
}

.card-body {
  padding: 16px;
}

.metric {
  display: grid;
  gap: 7px;
}

.metric strong {
  font-size: 28px;
}

.trend-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.trend-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 36px;
  gap: 10px;
  align-items: center;
  min-width: 0;
  font-size: 13px;
}

.trend-row span {
  color: var(--muted);
}

.trend-row strong {
  text-align: right;
}

.trend-bar {
  height: 8px;
  border-radius: var(--radius-pill);
  background: #edf2f8;
  overflow: hidden;
}

.trend-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

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

.detail-row {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.detail-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

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

.detail-row strong {
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.table-wrap {
  overflow-x: auto;
}

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

.roles-table {
  min-width: 0;
  table-layout: auto;
}

.roles-table th:nth-child(1),
.roles-table td:nth-child(1) {
  width: 64px;
}

.roles-table th:nth-child(4),
.roles-table td:nth-child(4),
.roles-table th:nth-child(5),
.roles-table td:nth-child(5) {
  width: 86px;
}

.roles-table th:nth-child(6),
.roles-table td:nth-child(6) {
  width: 72px;
}

.roles-table th:nth-child(7),
.roles-table td:nth-child(7) {
  width: 118px;
}

.roles-table .actions {
  justify-content: flex-start;
  flex-wrap: nowrap;
}

.roles-table .btn {
  white-space: nowrap;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

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

.inline-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-form select {
  width: min(360px, 100%);
}

.inline-form input {
  width: min(180px, 100%);
}

.stack {
  display: grid;
  gap: 16px;
}

.compact-card .card-body {
  padding: 12px 16px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.filter-row label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.filter-row select {
  width: 116px;
  flex: 0 0 auto;
}

.filter-row input {
  min-width: 0;
  flex: 1 1 220px;
}

.filter-row .btn {
  flex: 0 0 auto;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
}

.status {
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.status[data-status]:empty {
  display: none;
}

.status.ok {
  color: var(--ok);
}

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

.merchant-search-results {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.merchant-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.merchant-result-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.merchant-result-main strong,
.merchant-result-main span,
.selected-merchant {
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.merchant-result-main strong {
  font-size: 14px;
}

.merchant-result-main span,
.selected-merchant {
  color: var(--muted);
  font-size: 13px;
}

.merchant-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.merchant-summary strong {
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.merchant-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  white-space: nowrap;
  overflow-wrap: anywhere;
}

.hint {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
}

.confirm-modal {
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  padding: 20px;
}

.order-confirm-modal {
  width: min(620px, 100%);
}

.notice-letter-modal {
  width: min(760px, 100%);
}

.store-assign-modal {
  width: min(720px, 100%);
}

.role-edit-modal {
  width: min(520px, 100%);
}

.view-shipping .merchant-shipping-filter-controls {
  display: grid !important;
  grid-template-columns: minmax(0, 10rem) minmax(18rem, 1fr) minmax(14rem, .9fr) auto !important;
  column-gap: 28px !important;
  row-gap: 16px !important;
  max-width: 1040px !important;
  align-items: end !important;
}

.view-shipping .merchant-shipping-filter-controls label {
  min-width: 0 !important;
}

.view-shipping .merchant-shipping-filter-controls select,
.view-shipping .merchant-shipping-filter-controls input {
  width: 100% !important;
  min-width: 0 !important;
}

@media (max-width: 960px) {
  .view-shipping .merchant-shipping-filter-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .view-shipping .merchant-shipping-filter-controls {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

.store-assign-groups {
  display: grid;
  gap: 14px;
  max-height: min(62vh, 560px);
  margin-top: 16px;
  overflow: auto;
  padding-right: 4px;
}

.store-assign-group {
  border: 1px solid var(--theme-border-soft, var(--line));
  border-radius: var(--theme-radius-card, 4px);
  background: var(--theme-surface, var(--surface));
}

.store-assign-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--theme-border-soft, var(--line));
  background: var(--theme-surface-high, var(--surface-soft));
}

.store-assign-group-head strong {
  color: var(--theme-text, var(--text));
  font-size: 14px;
}

.store-assign-group-head span {
  color: var(--theme-muted, var(--muted));
  font-size: 12px;
}

.store-assign-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
  padding: 12px;
}

.store-assign-option {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
  min-height: 54px;
  padding: 10px;
  border: 1px solid var(--theme-border-soft, var(--line));
  border-radius: var(--theme-radius-card, 4px);
  background: var(--theme-surface-high, var(--surface-soft));
  cursor: pointer;
}

.store-assign-option input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.store-assign-option strong,
.store-assign-option em {
  display: block;
  font-style: normal;
}

.store-assign-option strong {
  color: var(--theme-text, var(--text));
  font-size: 13px;
}

.store-assign-option em {
  margin-top: 3px;
  color: var(--theme-muted, var(--muted));
  font-size: 12px;
}

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

.notice-letter-modal-head > div {
  min-width: 0;
}

.notice-letter-modal-head .eyebrow {
  display: block;
  margin: 0;
}

.notice-letter-modal-head h2 {
  margin-top: 4px;
  white-space: normal;
}

.notice-letter-modal-head h3 {
  white-space: normal;
}

.notice-letter-modal-head p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--copy-muted);
  font-size: 13px;
  font-weight: 560;
  line-height: 1.55;
}

.notice-letter-preview {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.notice-letter-preview textarea {
  min-height: 260px;
  resize: vertical;
  white-space: pre-wrap;
}

.submit-mail-summary {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: var(--radius-control);
}

.submit-mail-summary .detail-row {
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.submit-mail-summary .detail-row span {
  color: var(--copy-muted);
  font-size: 12px;
  font-weight: 780;
}

.submit-mail-summary .detail-row strong {
  color: var(--copy-strong);
  font-size: 13px;
  font-weight: 720;
}

.todo-tags-strip span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
}

.todos-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  align-items: start;
}

.todo-waterfall-panel {
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: var(--radius-card);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

.sent-note-panel {
  grid-column: 1;
  border: 1px solid var(--theme-border-soft);
  border-radius: 4px;
  background-color: var(--theme-surface);
  box-shadow: var(--theme-shadow-card);
  overflow: hidden;
}

.sent-note-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--theme-border-soft);
}

.sent-note-head h3 {
  margin: 4px 0 0;
  color: var(--theme-text);
  font-size: 22px;
  font-weight: 860;
  line-height: 1.15;
}

.sent-note-head p {
  margin: 7px 0 0;
  color: var(--theme-muted);
  font-size: 13px;
  font-weight: 560;
  line-height: 1.45;
}

.sent-note-head > span {
  color: var(--theme-primary);
  font-size: 13px;
  font-weight: 800;
}

.sent-note-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.sent-note-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--theme-border-soft);
  border-left: 4px solid var(--theme-border-strong);
  border-radius: 4px;
  background-color: var(--theme-surface);
  padding: 13px 14px;
}

.sent-note-item.is-done {
  border-left-color: var(--theme-success);
  background-color: var(--theme-surface-high);
}

.sent-note-main {
  min-width: 0;
}

.sent-note-main strong {
  display: block;
  color: var(--theme-text);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sent-note-main p {
  margin: 6px 0 0;
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 520;
}

.sent-note-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--theme-muted);
  font-size: 12px;
  white-space: nowrap;
}

.sent-note-status strong {
  color: var(--theme-text);
  font-size: 13px;
  font-weight: 800;
}

.completed-note-block {
  border-top: 1px solid var(--theme-border-soft);
  background-color: var(--theme-surface-high);
  padding: 14px;
}

.completed-note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.completed-note-head span {
  color: var(--theme-text);
  font-size: 14px;
  font-weight: 820;
}

.completed-note-head strong {
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 720;
}

.completed-note-list {
  display: grid;
  gap: 8px;
}

.completed-note-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--theme-border-soft);
  border-radius: 4px;
  background-color: var(--theme-surface);
  padding: 10px 11px;
}

.completed-note-item strong {
  display: block;
  color: var(--theme-muted);
  font-size: 13px;
  font-weight: 680;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.completed-note-item p {
  margin: 5px 0 0;
  color: var(--theme-muted);
  font-size: 11px;
  font-weight: 560;
}

.staff-store-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.staff-store-picker-row .btn {
  min-height: var(--theme-control-height) !important;
  height: var(--theme-control-height) !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.staff-store-selected-list {
  min-height: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 0 0;
}

.staff-store-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 8px 5px 10px;
  border: 1px solid var(--theme-border-soft);
  background: var(--theme-surface-high);
  color: var(--theme-text);
  font-size: 12px;
  font-weight: 560;
}

.staff-store-chip button {
  min-height: 24px !important;
  padding: 0 8px !important;
  border: 1px solid var(--theme-border-soft);
  background: var(--theme-surface);
  color: var(--theme-muted);
  font-size: 11px;
  font-weight: 560;
  cursor: pointer;
}

.staff-store-chip button:hover {
  color: var(--theme-danger);
  border-color: var(--theme-danger-border);
  background: var(--theme-danger-soft);
}

.team-member-list {
  display: grid;
  gap: 12px;
}

#teamTable,
#teamTable.table-wrap,
#teamTable.card-body {
  overflow: visible !important;
}

.view-team .table-shell-card {
  overflow: visible !important;
}

#teamTable {
  position: relative;
  z-index: 30;
}

.team-member-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(130px, 0.72fr) minmax(170px, 0.8fr) auto minmax(290px, auto);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--theme-border-soft);
  background: var(--theme-surface);
}

.team-member-row.is-menu-open {
  z-index: 200;
}

.team-member-person,
.team-member-access,
.team-member-stores {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.team-member-person strong,
.team-member-access strong,
.team-member-stores strong {
  color: var(--theme-text);
  font-weight: 760;
  overflow-wrap: anywhere;
}

.team-member-person span,
.team-member-person em,
.team-member-access span,
.team-member-stores span {
  color: var(--theme-muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-member-person span,
.team-member-stores span {
  white-space: nowrap;
}

.team-member-stores.is-danger strong,
.team-member-stores.is-danger span {
  color: var(--theme-danger);
}

.team-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  position: relative;
}

.team-action-row > .btn,
.team-more-actions > summary {
  min-height: 38px !important;
  padding: 0 18px !important;
}

.team-more-actions {
  position: relative;
  z-index: 1;
}

.team-more-actions[open] {
  z-index: 300;
}

.team-more-actions > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
  color: var(--theme-text);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.team-more-actions > summary::-webkit-details-marker {
  display: none;
}

.team-more-menu {
  position: absolute;
  z-index: 400;
  right: 0;
  top: calc(100% + 8px);
  width: 150px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
  box-shadow: var(--shadow-md);
}

.team-more-menu .btn {
  width: 100%;
  justify-content: center;
  min-height: 36px !important;
  padding: 0 12px !important;
}

@media (max-width: 1440px) {
  .team-member-row {
    grid-template-columns: minmax(220px, 1.4fr) minmax(120px, 0.7fr) minmax(160px, 0.8fr) auto;
  }

  .team-member-actions {
    grid-column: 1 / -1;
  }

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

@media (max-width: 860px) {
  .team-member-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .team-member-person span,
  .team-member-stores span {
    white-space: normal;
  }
}

.important-email-status-grid,
.important-email-mailbox-panel {
  display: grid;
  gap: 12px;
}

.important-email-status-grid dl {
  display: grid;
  gap: 4px;
  margin: 0;
}

.important-email-status-grid dt,
.important-email-detail-box span {
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 650;
}

.important-email-status-grid dd,
.important-email-detail-box strong {
  margin: 0;
  color: var(--theme-text);
  font-size: 13px;
  font-weight: 650;
}

.important-email-mailbox-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(88px, 0.35fr);
  gap: 12px;
}

.important-email-mailbox-form.is-hidden,
.important-email-rule-form.is-hidden {
  display: none;
}

.important-email-mailbox-form .full {
  grid-column: 1 / -1;
}

.important-email-panel-actions {
  display: flex;
  justify-content: flex-end;
}

.important-email-panel-actions .btn {
  min-height: var(--theme-control-height-sm);
}

.important-email-mailbox-list {
  display: grid;
  gap: 8px;
}

.important-email-rule-list {
  margin-top: 12px;
}

.important-email-rule-list.is-compact {
  margin-top: 0;
}

.important-email-mailbox-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--theme-border-soft);
  background: var(--theme-surface-high);
}

.important-email-mailbox-list article > div:not(.important-email-mailbox-actions) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.important-email-card-title {
  min-width: 0;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px !important;
  align-items: center;
}

.important-email-mailbox-list strong {
  min-width: 0;
  color: var(--theme-text);
  font-size: 13px;
  font-weight: 680;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.important-email-mailbox-list span:not(.tag) {
  color: var(--theme-muted);
  font-size: 12px;
  line-height: 1.45;
}

.important-email-mailbox-actions {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
}

.important-email-mailbox-actions .btn,
.important-email-mailbox-actions .tag {
  min-height: var(--theme-control-height-sm) !important;
  display: inline-flex !important;
  align-items: center !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  font-size: 13px !important;
  line-height: 1 !important;
}

.important-email-setting-list {
  display: grid;
  gap: 8px;
}

.important-email-setting-list label {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
  min-height: 30px;
  color: var(--theme-text);
  font-size: 13px;
  font-weight: 560;
}

.important-email-setting-list input[type="checkbox"] {
  width: 16px !important;
  min-width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 2px !important;
  box-shadow: none !important;
  transform: none !important;
  accent-color: var(--theme-primary);
}

.important-email-setting-list label > span {
  min-width: 0;
  color: var(--theme-text);
  font-size: 13px;
  font-weight: 560;
  line-height: 1.45;
}

.important-email-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--theme-border-soft);
}

.important-email-tabs .btn {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.important-email-tabs .btn span {
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.72;
}

.important-email-head-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
}

.important-email-head-actions .reviews-table-meta,
.important-email-head-actions .reviews-table-meta span,
.important-email-head-actions .btn {
  min-height: var(--theme-control-height) !important;
  display: inline-flex !important;
  align-items: center !important;
}

.important-email-head-actions .reviews-table-meta span,
.important-email-head-actions .btn {
  padding-left: 18px !important;
  padding-right: 18px !important;
  font-size: 13px !important;
  line-height: 1 !important;
}

.important-email-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.important-email-list {
  min-height: 340px;
  border: 1px solid var(--theme-border-soft);
  background: var(--theme-surface);
}

.important-email-empty {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.important-email-empty strong,
.important-email-detail h3 {
  color: var(--theme-text);
  font-size: 18px;
  font-weight: 700;
}

.important-email-empty p,
.important-email-detail p {
  margin: 0;
  color: var(--theme-muted);
  font-size: 13px;
  line-height: 1.55;
}

.important-email-row {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--theme-border-soft);
  background: var(--theme-surface);
}

.important-email-row-head {
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.important-email-row strong {
  min-width: 0;
  color: var(--theme-text);
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.important-email-row .btn.danger {
  width: auto !important;
  min-width: max-content !important;
  min-height: var(--theme-control-height-sm) !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}

.important-email-account {
  max-width: 220px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid var(--theme-border-soft);
  background: var(--theme-surface-high);
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 650;
  line-height: 1.2 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.important-email-category-tag {
  width: auto;
  min-width: max-content;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid var(--theme-primary);
  background: var(--theme-primary-soft);
  color: var(--theme-primary) !important;
  font-size: 12px !important;
  font-weight: 760;
  line-height: 1.2 !important;
  white-space: nowrap;
}

.important-email-row-head .important-email-account,
.important-email-row-head .important-email-category-tag {
  min-height: 26px;
  padding: 5px 9px;
  font-size: 12px !important;
  line-height: 1.2 !important;
  box-sizing: border-box;
}

.important-email-row p {
  margin: 0;
  color: var(--theme-muted);
  font-size: 12px;
  line-height: 1.55;
}

.important-email-row span,
.danger-text {
  color: var(--theme-muted);
  font-size: 12px;
  line-height: 1.45;
}

.danger-text {
  color: var(--theme-danger) !important;
}

.important-email-detail {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
}

.important-email-detail-box {
  display: grid;
  gap: 5px;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid var(--theme-border-soft);
  background: var(--theme-surface-high);
}

.account-health-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--theme-border-soft);
  border-bottom: 1px solid var(--theme-border-soft);
  background: var(--theme-surface-high);
}

.account-health-summary article {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-right: 1px solid var(--theme-border-soft);
}

.account-health-summary article:last-child {
  border-right: 0;
}

.account-health-summary span {
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 650;
}

.account-health-summary strong {
  color: var(--theme-text);
  font-size: 26px;
  font-weight: 760;
  line-height: 1;
}

.account-health-form textarea {
  resize: vertical;
}

.buyer-review-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--theme-border-soft);
  border-bottom: 1px solid var(--theme-border-soft);
  background: var(--theme-surface-high);
}

.buyer-review-summary article {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-right: 1px solid var(--theme-border-soft);
}

.buyer-review-summary article:last-child {
  border-right: 0;
}

.buyer-review-summary span {
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 650;
}

.buyer-review-summary strong {
  color: var(--theme-text);
  font-size: 26px;
  font-weight: 760;
  line-height: 1;
}

.buyer-review-stats-card .card-body {
  padding-top: 18px;
}

.buyer-review-user-stats {
  display: grid;
  gap: 12px;
}

.buyer-review-user-stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
}

.buyer-review-user-stat strong,
.buyer-review-user-stat span {
  display: block;
}

.buyer-review-user-stat strong {
  color: var(--theme-text);
  font-size: 15px;
  font-weight: 760;
}

.buyer-review-user-stat > div:first-child span {
  margin-top: 4px;
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
}

.buyer-review-user-stat-counts {
  display: flex;
  gap: 8px;
}

.buyer-review-user-stat-counts span {
  min-width: 58px;
  padding: 8px 10px;
  border: 1px solid var(--theme-border-soft);
  background: var(--theme-surface-high);
  color: var(--theme-muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.buyer-review-user-stat-counts b {
  display: block;
  color: var(--theme-primary);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.05;
}

.buyer-review-rating-control {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.buyer-review-rating-control label {
  margin: 0;
}

.buyer-review-rating-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.buyer-review-rating-control span {
  min-height: var(--theme-control-height-sm);
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--theme-border);
  background: var(--theme-button-bg);
  color: var(--theme-text);
  font-size: 13px;
  font-weight: 700;
}

.buyer-review-rating-control input:checked + span {
  border-color: var(--theme-primary);
  background: var(--theme-primary-soft);
  color: var(--theme-primary);
}

.buyer-review-filter-controls {
  grid-template-columns: minmax(0, 12rem) minmax(0, 9rem) minmax(20rem, 1fr) auto auto;
  column-gap: 24px;
  row-gap: 14px;
  max-width: 1080px;
}

.buyer-review-filter-controls input,
.buyer-review-filter-controls select {
  width: 100%;
}

.buyer-review-thumb {
  width: 72px;
  height: 54px;
  padding: 0;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
  overflow: hidden;
  cursor: pointer;
}

.buyer-review-form .field-help {
  margin-top: 6px;
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 600;
}

.buyer-review-form .field-help.is-ok {
  color: var(--theme-success);
}

.buyer-review-form .field-help.is-warn {
  color: var(--theme-warning);
}

.buyer-review-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.buyer-review-stars {
  color: #b4600b;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.buyer-review-image-modal {
  width: min(920px, calc(100vw - 48px));
}

.buyer-review-image-preview {
  padding: 18px;
  border-top: 1px solid var(--theme-border-soft);
  background: var(--theme-surface-high);
}

.buyer-review-image-preview img {
  max-width: 100%;
  max-height: 70vh;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.warranty-claims-workbench {
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(520px, 1.45fr) minmax(320px, .9fr);
  gap: var(--theme-space-4);
  align-items: start;
}

.warranty-claims-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--theme-border-soft);
  border-bottom: 1px solid var(--theme-border-soft);
  background: var(--theme-surface-high);
}

.warranty-claims-summary article {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-right: 1px solid var(--theme-border-soft);
  border-bottom: 1px solid var(--theme-border-soft);
}

.warranty-claims-summary article:nth-child(2n) {
  border-right: 0;
}

.warranty-claims-summary article:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.warranty-claims-summary span,
.warranty-claim-card small,
.warranty-claim-card em {
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 650;
}

.warranty-claims-summary strong {
  color: var(--theme-text);
  font-size: 24px;
  font-weight: 760;
  line-height: 1;
}

.warranty-claim-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--theme-space-3);
  padding: var(--theme-space-4);
  border-bottom: 1px solid var(--theme-border-soft);
}

.warranty-claim-filter label {
  display: grid;
  gap: var(--theme-space-2);
}

.warranty-claim-filter .full {
  grid-column: 1 / -1;
}

.warranty-claim-filter input,
.warranty-claim-filter select {
  width: 100%;
}

.warranty-claims-queue,
.warranty-claims-queue .side-card-heading,
.warranty-claim-filter,
.warranty-claim-list,
.warranty-claim-filter label,
.warranty-claim-filter input,
.warranty-claim-filter select {
  min-width: 0;
}

.warranty-claims-queue {
  overflow: hidden;
}

.warranty-claims-queue .side-card-heading strong,
.warranty-claims-queue .side-card-heading p {
  overflow-wrap: anywhere;
}

.warranty-claim-list {
  display: grid;
  gap: var(--theme-space-3);
  padding: var(--theme-space-4);
}

.warranty-claim-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
  color: var(--theme-text);
  text-align: left;
  cursor: pointer;
  min-width: 0;
  white-space: normal !important;
}

.warranty-claim-card.active {
  border-color: var(--theme-primary);
  background: var(--theme-primary-soft);
}

.warranty-claim-card .tag {
  justify-self: start;
  grid-column: 1 / 2;
  grid-row: 1;
}

.warranty-claim-card strong {
  grid-column: 2 / 3;
  grid-row: 1;
  font-size: 16px;
  font-weight: 760;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.warranty-claim-card span:not(.tag) {
  grid-column: 1 / -1;
  grid-row: 2;
  font-weight: 700;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.warranty-claim-card small,
.warranty-claim-card em {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

.warranty-claim-card span:not(.tag),
.warranty-claim-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warranty-claim-card small {
  grid-column: 1 / 2;
  grid-row: 3;
}

.warranty-claim-card em {
  grid-column: 2 / 3;
  grid-row: 3;
  justify-self: end;
  padding: 4px 8px;
  border: 1px solid var(--theme-border-soft);
  background: var(--theme-surface-high);
  font-style: normal;
}

.warranty-claim-detail-head {
  align-items: start;
}

.warranty-claim-detail-head > .tag {
  justify-self: end;
}

.warranty-claim-detail-body {
  display: grid;
  gap: var(--theme-space-4);
}

.warranty-claim-section {
  display: grid;
  gap: var(--theme-space-3);
  padding: var(--theme-space-4);
  border: 1px solid var(--theme-border-soft);
  background: var(--theme-surface-high);
}

.warranty-claim-section h4 {
  margin: 0;
  color: var(--theme-text);
  font-size: 18px;
  font-weight: 780;
}

.warranty-claim-info-grid,
.warranty-claim-audit-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--theme-space-3);
}

.warranty-claim-info-grid article,
.warranty-claim-audit-result article {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
}

.warranty-claim-info-grid span,
.warranty-claim-audit-result span,
.warranty-claim-side-list article span {
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 650;
}

.warranty-claim-info-grid strong,
.warranty-claim-audit-result strong,
.warranty-claim-side-list article strong {
  color: var(--theme-text);
  font-size: 15px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.warranty-claim-audit-form {
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
}

.warranty-claim-side-list {
  display: grid;
  gap: var(--theme-space-3);
}

.warranty-claim-side-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--theme-space-3);
  padding: 12px 14px;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface-high);
}

.warranty-claim-side-list article.ok {
  border-color: var(--theme-success-border);
  background: var(--theme-success-soft);
}

.warranty-claim-completeness {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-left: 4px solid var(--theme-primary);
  background: var(--theme-surface);
}

.warranty-claim-completeness strong {
  font-size: 26px;
  line-height: 1;
}

.warranty-claim-completeness span {
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 650;
}

.warranty-claim-product-rules {
  display: grid;
  gap: var(--theme-space-3);
}

.warranty-claim-product-rules article {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface-high);
}

.warranty-claim-product-rules strong {
  color: var(--theme-text);
  font-size: 16px;
  font-weight: 780;
}

.warranty-claim-product-rules span,
.warranty-claim-product-rules p {
  margin: 0;
  color: var(--theme-muted);
  font-size: 13px;
  line-height: 1.55;
}

.warranty-claim-product-rules em {
  color: var(--theme-primary);
  font-style: normal;
  font-weight: 760;
}

.reward-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--theme-border-soft);
  border-bottom: 1px solid var(--theme-border-soft);
  background: var(--theme-surface-high);
}

.reward-summary-grid article {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-right: 1px solid var(--theme-border-soft);
}

.reward-summary-grid article:last-child {
  border-right: 0;
}

.reward-summary-grid span {
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 650;
}

.reward-summary-grid strong {
  color: var(--theme-text);
  font-size: 24px;
  font-weight: 760;
  line-height: 1;
}

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

.mini-stat {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: var(--theme-surface-high);
  border: 1px solid var(--theme-border-soft);
}

.mini-stat span {
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 650;
}

.mini-stat strong {
  color: var(--theme-text);
  font-size: 24px;
  font-weight: 760;
  line-height: 1;
}

.customer-manual-form.is-editing {
  outline: 2px solid rgba(36, 92, 143, 0.22);
  outline-offset: 3px;
}

.customer-page .customer-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  margin-top: 2px;
  padding-top: 6px;
}

.customer-page .customer-form-actions .btn {
  width: auto;
  min-width: 112px;
}

.customer-page .customer-filter-form {
  display: grid;
  grid-template-columns: minmax(0, 10rem) minmax(16rem, 1fr) auto auto;
  gap: 14px;
  align-items: end;
  max-width: 920px;
}

.customer-page .customer-filter-form label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.customer-page .customer-filter-form .btn {
  align-self: end;
  width: auto;
  min-width: 88px;
  min-height: 41px !important;
  padding: 9px 22px !important;
  font-size: 13px !important;
  line-height: 1 !important;
}

.customer-page .customer-filter-form .search-pill-filter input {
  border-radius: var(--radius-pill);
  padding-inline: 16px;
}

.todo-summary-card.tone-confirm,
.todo-summary-card.tone-service,
.todo-summary-card.tone-delivery,
.todo-summary-card.tone-survey,
.todo-summary-card.tone-review,
.todo-summary-card.tone-after-sales,
.todo-summary-card.tone-claim,
.todo-summary-card.tone-warranty,
.todo-summary-card.tone-reward,
.todo-summary-card.tone-neutral,
.view-todos .todo-summary-card.tone-confirm,
.view-todos .todo-summary-card.tone-service,
.view-todos .todo-summary-card.tone-delivery,
.view-todos .todo-summary-card.tone-survey,
.view-todos .todo-summary-card.tone-review,
.view-todos .todo-summary-card.tone-after-sales,
.view-todos .todo-summary-card.tone-claim,
.view-todos .todo-summary-card.tone-warranty,
.view-todos .todo-summary-card.tone-reward,
.view-todos .todo-summary-card.tone-neutral {
  --template-tone: var(--theme-primary);
  --template-tone-bg: color-mix(in srgb, var(--theme-primary) 11%, var(--theme-surface));
  --template-tone-border: color-mix(in srgb, var(--theme-primary) 34%, var(--theme-border-soft));
  border-color: var(--template-tone-border) !important;
  background:
    linear-gradient(90deg, var(--template-tone) 0 4px, transparent 4px),
    var(--template-tone-bg) !important;
}

.todo-summary-card.tone-confirm,
.view-todos .todo-summary-card.tone-confirm {
  --template-tone: #245c8f;
}

.todo-summary-card.tone-service,
.view-todos .todo-summary-card.tone-service {
  --template-tone: #2f766d;
}

.todo-summary-card.tone-delivery,
.view-todos .todo-summary-card.tone-delivery {
  --template-tone: #a7651c;
}

.todo-summary-card.tone-survey,
.view-todos .todo-summary-card.tone-survey {
  --template-tone: #5f6f89;
}

.todo-summary-card.tone-review,
.view-todos .todo-summary-card.tone-review {
  --template-tone: #9a4b3f;
}

.todo-summary-card.tone-after-sales,
.view-todos .todo-summary-card.tone-after-sales {
  --template-tone: #4f6f52;
}

.todo-summary-card.tone-claim,
.view-todos .todo-summary-card.tone-claim {
  --template-tone: #7f4e7a;
}

.todo-summary-card.tone-warranty,
.view-todos .todo-summary-card.tone-warranty {
  --template-tone: #6a6542;
}

.todo-summary-card.tone-reward,
.view-todos .todo-summary-card.tone-reward {
  --template-tone: #8a5a2b;
}

.todo-summary-card.tone-neutral,
.view-todos .todo-summary-card.tone-neutral {
  --template-tone: var(--theme-muted);
}

.todo-summary-card:is(.tone-confirm, .tone-service, .tone-delivery, .tone-survey, .tone-review, .tone-after-sales, .tone-claim, .tone-warranty, .tone-reward, .tone-neutral) strong,
.view-todos .todo-summary-card:is(.tone-confirm, .tone-service, .tone-delivery, .tone-survey, .tone-review, .tone-after-sales, .tone-claim, .tone-warranty, .tone-reward, .tone-neutral) strong {
  color: var(--template-tone) !important;
}

.todo-flow-tags .template-task-tag {
  --template-tone: var(--theme-primary);
  --template-tone-bg: color-mix(in srgb, var(--theme-primary) 12%, var(--theme-surface-high));
  --template-tone-border: color-mix(in srgb, var(--theme-primary) 35%, var(--theme-border-soft));
  border-color: var(--template-tone-border) !important;
  background: var(--template-tone-bg) !important;
  color: var(--template-tone) !important;
}

.todo-flow-tags .template-task-tag.template-confirm {
  --template-tone: #245c8f;
}

.todo-flow-tags .template-task-tag.template-service {
  --template-tone: #2f766d;
}

.todo-flow-tags .template-task-tag.template-delivery {
  --template-tone: #a7651c;
}

.todo-flow-tags .template-task-tag.template-survey {
  --template-tone: #5f6f89;
}

.todo-flow-tags .template-task-tag.template-review {
  --template-tone: #9a4b3f;
}

.todo-flow-tags .template-task-tag.template-after-sales {
  --template-tone: #4f6f52;
}

.todo-flow-tags .template-task-tag.template-claim {
  --template-tone: #7f4e7a;
}

.todo-flow-tags .template-task-tag.template-warranty {
  --template-tone: #6a6542;
}

.todo-flow-tags .template-task-tag.template-reward {
  --template-tone: #8a5a2b;
}

.todo-flow-tags .template-task-tag.template-neutral {
  --template-tone: var(--theme-muted);
}

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

.customer-addresses-table th:nth-child(1),
.customer-addresses-table td:nth-child(1) {
  width: 34%;
}

.customer-addresses-table th:nth-child(2),
.customer-addresses-table td:nth-child(2) {
  width: 22%;
}

.customer-addresses-table th:nth-child(3),
.customer-addresses-table td:nth-child(3) {
  width: 11%;
  text-align: center;
}

.customer-addresses-table th:nth-child(4),
.customer-addresses-table td:nth-child(4) {
  width: 21%;
}

.customer-addresses-table th:nth-child(5),
.customer-addresses-table td:nth-child(5) {
  width: 12%;
  text-align: right;
}

.customer-addresses-table td {
  vertical-align: top;
}

.customer-addresses-table td:nth-child(1) strong {
  display: block;
  margin-bottom: 6px;
  overflow: hidden;
  color: var(--theme-text);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-addresses-table .compact-text {
  display: -webkit-box;
  overflow: hidden;
  color: var(--theme-muted);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.customer-addresses-table td:nth-child(2) .compact-text,
.customer-addresses-table td:nth-child(4) .compact-text {
  -webkit-line-clamp: 1;
}

.customer-addresses-table td:nth-child(5) .btn {
  min-width: 72px;
  white-space: nowrap;
}

.reward-form textarea {
  resize: vertical;
}

.rewards-policy-form .input-with-unit {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.rewards-policy-form .input-with-unit input {
  min-width: 0;
  border-right: 0 !important;
}

.rewards-policy-form .input-with-unit span {
  min-width: 54px;
  min-height: var(--theme-control-height);
  border-color: var(--theme-border);
  border-radius: 0;
  background: var(--theme-surface-high);
  color: var(--theme-muted);
}

.reward-name-cell {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.reward-name-cell strong {
  display: block;
  color: var(--theme-text);
  font-size: 13px;
  font-weight: 700;
}

.reward-name-cell span {
  display: block;
  margin-top: 4px;
  color: var(--theme-muted);
  font-size: 12px;
  line-height: 1.4;
}

.reward-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border: 1px solid var(--theme-border-soft);
  background: var(--theme-surface-high);
}

.reward-thumb.empty {
  display: grid;
  place-items: center;
  color: var(--theme-muted);
  font-size: 11px;
  font-weight: 650;
}

.reward-flow-steps {
  display: grid;
  gap: 10px;
}

.reward-flow-steps span {
  padding: 10px 12px;
  border: 1px solid var(--theme-border-soft);
  background: var(--theme-surface-high);
  color: var(--theme-text);
  font-size: 13px;
  font-weight: 650;
}

#rewardsTable.table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
}

#rewardsTable .rewards-table {
  width: 100% !important;
  min-width: 1060px !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

#rewardsTable .rewards-table th,
#rewardsTable .rewards-table td {
  padding-left: 14px !important;
  padding-right: 14px !important;
  vertical-align: middle !important;
}

#rewardsTable .rewards-table th:nth-child(1),
#rewardsTable .rewards-table td:nth-child(1) {
  width: 30% !important;
}

#rewardsTable .rewards-table th:nth-child(2),
#rewardsTable .rewards-table td:nth-child(2) {
  width: 17% !important;
}

#rewardsTable .rewards-table th:nth-child(3),
#rewardsTable .rewards-table td:nth-child(3),
#rewardsTable .rewards-table th:nth-child(4),
#rewardsTable .rewards-table td:nth-child(4) {
  width: 8% !important;
}

#rewardsTable .rewards-table th:nth-child(5),
#rewardsTable .rewards-table td:nth-child(5),
#rewardsTable .rewards-table th:nth-child(6),
#rewardsTable .rewards-table td:nth-child(6) {
  width: 11% !important;
}

#rewardsTable .rewards-table th:nth-child(7),
#rewardsTable .rewards-table td:nth-child(7) {
  width: 15% !important;
}

#rewardsTable .reward-name-cell,
#rewardsTable .reward-name-cell > div,
#rewardsTable .compact-text {
  min-width: 0 !important;
  max-width: 100% !important;
}

#rewardsTable .reward-name-cell strong,
#rewardsTable .reward-name-cell span,
#rewardsTable .compact-text {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#rewardsTable .reward-thumb {
  flex: 0 0 auto !important;
}

#rewardsTable .rewards-table .btn {
  width: auto !important;
  min-width: max-content !important;
  max-width: max-content !important;
  min-height: var(--theme-control-height-sm) !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}

.returns-process-note {
  display: grid;
  gap: 10px;
}

.returns-process-note span {
  padding: 10px 12px;
  border: 1px solid var(--theme-border-soft);
  background: var(--theme-surface-high);
  color: var(--theme-text);
  font-size: 13px;
  font-weight: 650;
}

.todo-waterfall-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 24px 26px 18px;
  border-bottom: 1px solid rgba(14, 165, 233, 0.12);
}

.todo-waterfall-head h3 {
  margin: 4px 0 0;
  color: var(--copy-strong);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
}

.todo-waterfall-head p {
  margin: 9px 0 0;
  color: var(--copy-muted);
  font-size: 14px;
  font-weight: 620;
  line-height: 1.5;
}

.todo-waterfall-head > span {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
}

.todo-queue-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: 10px;
  padding: 14px 20px 0;
  border-top: 1px solid var(--theme-border-soft);
  background: var(--theme-surface);
}

.todo-queue-filter {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-sizing: border-box;
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  padding: 8px 22px 8px 16px;
  border: 1px solid var(--theme-border);
  border-radius: 0;
  background: var(--theme-button-bg);
  color: var(--theme-muted);
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
  white-space: nowrap;
}

.todo-queue-filter span {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border: 1px solid #f97316;
  border-radius: 999px;
  background: #fff1e7;
  color: #c2410c;
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
  pointer-events: none;
}

.todo-queue-filter span[hidden] {
  display: none !important;
}

.todo-queue-filter.is-active {
  border-color: var(--theme-primary);
  background: var(--theme-primary-soft);
  color: var(--theme-primary);
}

.todo-queue-filter.is-active span {
  border-color: #ea580c;
  background: #ea580c;
  color: #fff7ed;
}

.todo-waterfall-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  overflow: auto;
}

.todo-waterfall-list.is-note-scope-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-content: flex-start;
  justify-content: flex-start;
}

.todo-waterfall-list.is-note-scope-list .todo-flow-item {
  min-height: 0;
  height: auto;
  align-self: stretch;
}

.todo-waterfall-panel.is-note-scope-panel {
  height: auto;
  grid-template-rows: auto auto auto;
}

.todo-waterfall-panel.is-note-scope-panel .todo-waterfall-list {
  min-height: 0;
  overflow: visible;
}

.todo-flow-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.todo-flow-main {
  min-width: 0;
}

.todo-flow-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.todo-flow-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--copy-muted);
  font-size: 11px;
  font-weight: 650;
}

.todo-flow-item strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 820;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.todo-flow-item p {
  display: block;
  margin: 6px 0 0;
  color: var(--copy-muted);
  font-size: 12px;
  font-weight: 440;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.todo-flow-item .todo-note-case-context {
  color: var(--text);
  font-weight: 650;
}

.todo-flow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  padding-left: 12px;
}

.todo-flow-action {
  min-height: 30px;
  min-width: 56px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--copy-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
}

.todo-flow-action:hover {
  border-color: var(--theme-border-strong);
  background-color: var(--theme-surface-high);
  color: var(--theme-text);
}

.todo-waterfall-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.todo-waterfall-card strong {
  display: block;
  margin-top: 6px;
  color: var(--copy-strong);
  font-size: 17px;
  font-weight: 880;
}

.todo-waterfall-card p {
  margin: 8px 0 0;
  color: var(--copy-muted);
  font-size: 13px;
  font-weight: 560;
  line-height: 1.45;
}

.todo-waterfall-card em {
  align-self: start;
  color: var(--copy-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.todo-summary-side {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  display: grid;
  gap: 12px;
}

.todo-summary-card {
  --todo-card-bg: rgba(71, 85, 105, 0.84);
  --todo-card-border: rgba(255, 255, 255, 0.22);
  min-height: 126px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--todo-card-border);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 16px 36px rgba(15, 23, 42, 0.12);
  color: rgba(255, 255, 255, 0.78);
  text-align: left;
  cursor: pointer;
}

.todo-summary-card.is-active {
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 18px 44px rgba(15, 23, 42, 0.2);
}

.todo-summary-card.tone-slate {
  --todo-card-bg: rgba(71, 85, 105, 0.86);
}

.todo-summary-card.tone-steel {
  --todo-card-bg: rgba(51, 83, 103, 0.86);
}

.todo-summary-card.tone-navy {
  --todo-card-bg: rgba(39, 64, 92, 0.87);
}

.todo-summary-card.tone-indigo {
  --todo-card-bg: rgba(58, 67, 113, 0.86);
}

.todo-summary-card.tone-graphite {
  --todo-card-bg: rgba(55, 65, 81, 0.88);
}

.todo-summary-card span {
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 850;
}

.todo-summary-card strong {
  color: #fff;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}

.todo-summary-card p {
  margin: 0;
  font-size: 12px;
  font-weight: 560;
  line-height: 1.4;
}

.todo-summary-card em {
  width: fit-content;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.todo-current-head strong {
  display: block;
  margin-top: 3px;
  color: var(--copy-strong);
  font-size: 18px;
  font-weight: 880;
}

.todo-current-head > span {
  color: var(--copy-muted);
  font-size: 13px;
  font-weight: 760;
}

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

.quick-note-form textarea {
  min-height: 128px;
  resize: vertical;
}

.todo-note-counter {
  justify-self: end;
  margin-top: -4px;
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 620;
}

.todo-note-counter.is-warning {
  color: #c2410c;
}

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

.quick-note-actions {
  display: flex;
  justify-content: flex-end;
}

.todo-completed-area {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--theme-border-soft);
  background: var(--theme-surface);
}

.todo-completed-details {
  display: block;
}

.todo-completed-head {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.todo-completed-head::-webkit-details-marker {
  display: none;
}

.todo-completed-head span {
  display: grid;
  gap: 3px;
}

.todo-completed-head small {
  color: var(--theme-primary);
  font-size: 12px;
  font-weight: 760;
}

.todo-completed-head strong {
  color: var(--theme-text);
  font-size: 16px;
  font-weight: 760;
}

.todo-completed-head em {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--theme-border-soft);
  background: var(--theme-surface-high);
  color: var(--theme-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.todo-completed-head em::after {
  content: "展开";
  margin-left: 8px;
  color: var(--theme-primary);
  font-weight: 700;
}

.todo-completed-details[open] .todo-completed-head em::after {
  content: "收起";
}

.todo-completed-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.todo-completed-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--theme-border-soft);
  border-left: 4px solid var(--theme-success);
  background: var(--theme-surface-high);
}

.todo-completed-item strong {
  display: block;
  color: var(--theme-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.todo-completed-item p {
  display: block;
  margin: 6px 0 0;
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 440;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-note-panel {
  display: grid;
  gap: 12px;
}

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

.my-note-head span {
  color: var(--theme-text);
  font-size: 15px;
  font-weight: 800;
}

.my-note-head strong {
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 700;
}

.my-note-list {
  display: grid;
  gap: 8px;
}

.my-note-section {
  display: grid;
  gap: 8px;
}

.my-note-section > span {
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 800;
}

.my-note-item {
  border: 1px solid var(--theme-border-soft);
  border-left: 4px solid var(--theme-border-strong);
  border-radius: 4px;
  background-color: var(--theme-surface);
  padding: 12px 12px 11px;
}

.my-note-item div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.my-note-item span {
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 800;
}

.my-note-item small,
.my-note-item em {
  color: var(--theme-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.my-note-item p {
  margin: 0 0 8px;
  color: var(--theme-text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.my-note-item footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.todo-note-actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
}

.todo-note-complete,
.todo-note-delete {
  border: 1px solid var(--theme-border);
  border-radius: var(--ms-button-border-radius, 12px);
  background-color: var(--theme-surface-high);
  color: var(--theme-text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  padding: 7px 12px;
}

.todo-note-complete:hover,
.todo-note-delete:hover {
  background-color: var(--theme-surface-highest);
}

.todo-note-delete {
  color: var(--theme-danger);
}

.todo-flow-action.danger {
  color: var(--theme-danger) !important;
}

.my-note-priority-important {
  border-left-color: var(--theme-warning);
}

.my-note-priority-urgent {
  border-left-color: var(--theme-danger);
}

.my-note-item.is-completed {
  border-left-color: var(--theme-success);
  background-color: var(--theme-surface-high);
}

.my-note-item.is-completed p {
  color: var(--theme-muted);
}

.my-note-more {
  display: grid;
  gap: 8px;
}

.my-note-more summary {
  border: 1px solid var(--theme-border-soft);
  border-radius: 4px;
  background-color: var(--theme-surface-high);
  color: var(--theme-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
  padding: 9px 11px;
}

.my-note-more-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.todos-main-layout {
  gap: 18px !important;
}

.merchant-review-layout > aside.stack .quick-note-form textarea {
  min-height: 108px;
}

.merchant-review-layout > aside.stack > .card:first-child {
  background-color: var(--theme-surface) !important;
}

.my-note-panel {
  border-top: 1px solid var(--theme-border-soft);
  padding-top: 14px;
}

.my-note-head {
  border-left: 3px solid var(--theme-primary);
  padding-left: 10px;
}

.my-note-item {
  background-color: var(--theme-surface-high) !important;
  box-shadow: none !important;
}

.todo-waterfall-panel {
  border: 1px solid var(--theme-border) !important;
  background-color: var(--theme-surface) !important;
  box-shadow: var(--theme-shadow-card) !important;
}

.todo-waterfall-head {
  background-color: var(--theme-surface-high) !important;
  padding: 26px 28px 20px !important;
}

.todo-waterfall-head h3 {
  color: var(--theme-text) !important;
  font-size: 30px !important;
  font-weight: 880 !important;
}

.todo-waterfall-head > span {
  border: 1px solid var(--theme-border);
  border-radius: 999px;
  background-color: var(--theme-surface);
  color: var(--theme-primary) !important;
  padding: 8px 12px;
}

.todo-waterfall-list {
  background-color: var(--theme-surface) !important;
  padding: 16px !important;
}

.todo-flow-item {
  border-color: var(--theme-border) !important;
  background-color: var(--theme-surface) !important;
  padding: 16px !important;
}

.todo-flow-item:nth-child(even) {
  background-color: var(--theme-surface) !important;
}

.todo-note-priority-important {
  background-color: var(--theme-warning-soft) !important;
}

.todo-note-priority-urgent {
  background-color: var(--theme-danger-soft) !important;
}

.sent-note-panel {
  border-color: var(--theme-border-soft) !important;
  background-color: var(--theme-surface-high) !important;
  box-shadow: none !important;
}

.sent-note-head {
  background-color: var(--theme-surface-high) !important;
  padding: 18px 20px 14px !important;
}

.sent-note-head h3 {
  font-size: 20px !important;
  font-weight: 800 !important;
}

.sent-note-list {
  padding: 12px !important;
}

.sent-note-item {
  background-color: var(--theme-surface) !important;
  border-left-color: var(--theme-border-strong) !important;
  box-shadow: none !important;
}

.completed-note-block {
  background-color: var(--theme-surface-high) !important;
}

.completed-note-head span,
.completed-note-head strong,
.completed-note-item strong,
.completed-note-item p {
  color: var(--theme-muted) !important;
}

.cancel-order-summary {
  border-color: rgba(239, 68, 68, 0.22);
}

.parsed-order-summary {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-radius: var(--radius-control);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.parsed-order-summary strong {
  color: var(--text);
  font-size: 16px;
}

.order-items-confirm-list {
  gap: 12px;
}

.order-item-row {
  align-items: end;
}

.order-item-actions-field {
  min-width: 0;
}

.order-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.quick-parse-body {
  position: relative;
  overflow: hidden;
}

.quick-parse-stage[hidden] {
  display: none;
}

.quick-parse-confirm {
  min-height: 310px;
  padding: 2px 0 0;
}

.inline-order-confirm-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.inline-order-confirm-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 850;
  line-height: 1.18;
}

.inline-order-confirm-head p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
  line-height: 1.45;
}

.confirm-modal h2 {
  margin: 0;
  font-size: 18px;
}

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

.confirm-modal .field {
  margin-top: 14px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: #eef5ff;
  color: #1452a1;
  font-size: 12px;
  font-weight: 800;
}

.tag.warn {
  background: #fff6dd;
  color: var(--warn);
}

.tag.danger {
  background: #fff1f1;
  color: var(--danger);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, var(--layout-left-panel-width)) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.points-layout {
  align-items: stretch;
}

.ai-layout {
  align-items: start;
}

.ai-main {
  min-width: 0;
}

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

.ai-provider-card {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(14, 165, 233, 0.16);
  border-radius: 24px;
}

.ai-provider-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.ai-provider-card-head div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ai-provider-card-head span {
  color: var(--accent-soft);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.ai-provider-card-head strong {
  color: var(--copy-strong);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.25;
}

.ai-provider-card-head em {
  flex: 0 0 auto;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  padding: 5px 10px;
  border: 1px solid var(--tag-warn-border);
  background: var(--tag-warn-bg);
  color: var(--tag-warn-text);
  font-size: 12px;
  font-style: normal;
  font-weight: 820;
  white-space: nowrap;
}

.ai-provider-card-head em.ok {
  border-color: var(--tag-ok-border);
  background: var(--tag-ok-bg);
  color: var(--tag-ok-text);
}

.ai-provider-fields {
  grid-template-columns: 1fr;
  gap: 10px;
}

.ai-provider-fields .full {
  grid-column: auto;
}

.ai-provider-card .field {
  margin-top: 0;
}

.ai-provider-card .settings-actions {
  padding-top: 12px;
}

.ai-provider-card .settings-actions .btn {
  width: 100%;
}

.ai-key-switch {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-usage-scroll {
  max-height: 420px;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  padding-right: 10px;
}

.ai-usage-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(14, 165, 233, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.46);
}

.ai-usage-item > div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ai-usage-item strong {
  color: var(--copy-strong);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.3;
}

.ai-usage-item span,
.ai-usage-item p {
  margin: 0;
  color: var(--copy-muted);
  font-size: 12px;
  font-weight: 560;
  line-height: 1.45;
}

.ai-usage-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ai-usage-item-meta > span:not(.tag) {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--copy-soft);
  font-weight: 760;
}

.points-list-column {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
}

.points-list-column > .card:last-child {
  min-height: 0;
}

.points-list-column > .card:last-child .table-wrap {
  height: 100%;
  overflow: auto;
}

.merchant-points-layout {
  align-items: start;
}

.merchant-points-side {
  gap: 16px;
}

.merchant-point-balance-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--theme-border-soft);
  background: var(--theme-surface-high);
  padding: 18px;
}

.merchant-point-balance-card span {
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 760;
}

.merchant-point-balance-card strong {
  color: var(--theme-primary);
  font-size: 38px;
  font-weight: 860;
  line-height: 1;
}

.merchant-point-balance-card p {
  margin: 0;
  color: var(--theme-muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.merchant-redeem-form .form-actions {
  justify-content: flex-start;
}

.merchant-points-main {
  min-width: 0;
}

.reviews-filter-bar {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(14, 165, 233, 0.12);
  background: rgba(255, 255, 255, 0.38);
}

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

.reviews-table-head h3 {
  font-size: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-soft);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.reviews-table-copy {
  max-width: 46rem;
  margin: 8px 0 0;
  color: var(--copy-muted);
  font-size: 13px;
  font-weight: 560;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.reviews-table-meta {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  padding-top: 4px;
}

.reviews-table-meta span {
  min-width: 0;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.68);
  color: var(--accent-soft);
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

.reviews-filter-controls {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 8.6rem) minmax(0, 12rem) auto auto;
  gap: 12px;
  align-items: end;
}

.points-filter-controls {
  grid-template-columns: minmax(0, 8.6rem) minmax(0, 1fr) auto auto;
}

.merchant-filter-controls {
  grid-template-columns: minmax(0, 10rem) minmax(14rem, 1fr) auto auto;
  max-width: 760px;
}

.merchant-order-filter-controls {
  grid-template-columns: minmax(0, 10rem) minmax(0, 12.5rem) minmax(16rem, 1fr) auto;
  max-width: 920px;
}

.merchant-order-filter-controls .mail-status-filter select {
  min-width: 12.5rem;
}

.merchant-order-filter-controls .search-pill-filter input {
  border-radius: var(--radius-pill);
  padding-inline: 16px;
}

.merchant-shipping-filter-controls {
  grid-template-columns: minmax(0, 9rem) minmax(14rem, 1.1fr) minmax(12rem, .9fr) auto;
  max-width: 860px;
}

.merchant-shipping-filter-controls input,
.merchant-shipping-filter-controls select {
  width: 100%;
}

.product-filter-controls {
  grid-template-columns: minmax(0, 11rem) minmax(0, 8rem) minmax(14rem, 1fr) auto auto;
  max-width: 980px;
}

.product-side-summary {
  display: grid;
  gap: 0;
  padding: 0;
}

.product-side-summary article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--theme-border-soft);
}

.product-side-summary article:first-child {
  border-top: 0;
}

.product-side-summary span {
  color: var(--theme-muted);
  font-size: 13px;
  font-weight: 650;
}

.product-side-summary strong {
  color: var(--theme-text);
  font-size: 20px;
  font-weight: 760;
}

.product-table-actions {
  align-items: center;
  gap: 12px;
}

.product-description-preview {
  margin-top: 6px;
}

.products-table {
  min-width: 1040px;
  table-layout: fixed;
}

.products-table th:nth-child(1),
.products-table td:nth-child(1) {
  width: 34%;
}

.products-table th:nth-child(2),
.products-table td:nth-child(2) {
  width: 18%;
}

.products-table th:nth-child(3),
.products-table td:nth-child(3) {
  width: 10%;
}

.products-table th:nth-child(4),
.products-table td:nth-child(4) {
  width: 14%;
}

.products-table th:nth-child(5),
.products-table td:nth-child(5) {
  width: 10%;
}

.products-table th:nth-child(6),
.products-table td:nth-child(6) {
  width: 14%;
}

.product-name-cell {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.product-name-cell strong {
  color: var(--theme-text);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.product-name-cell span,
.product-maker-cell {
  color: var(--theme-muted);
  font-size: 13px;
  font-weight: 560;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.product-warranty-cell,
.products-table .tag {
  white-space: nowrap;
}

.products-table td:last-child .btn {
  min-width: max-content !important;
  white-space: nowrap !important;
}

.product-editor-modal {
  width: min(860px, calc(100vw - 48px));
}

.product-editor-form textarea {
  resize: vertical;
}

.reviews-filter-controls label {
  display: grid;
  gap: 6px;
  margin: 0;
}

.reviews-filter-controls label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: var(--label-letter-spacing);
}

.reviews-filter-controls select,
.reviews-filter-controls input[type="search"] {
  min-height: 41px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--input);
  color: var(--ink);
  font-weight: 760;
}

.reviews-filter-controls .btn {
  width: 100%;
}

.review-policy-field {
  display: grid;
  gap: 10px;
}

.review-policy-field + .field-help {
  margin-top: 18px !important;
}

.collapse-body > .status {
  padding: 16px 40px 24px !important;
}

.card-section-divider {
  width: 42px;
  height: 2px;
  margin: 16px 0;
  border-radius: var(--radius-pill);
  background: rgba(14, 165, 233, 0.24);
}

.card-section-divider-top {
  margin-top: 0;
}

.field-title {
  color: var(--copy-muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: var(--label-letter-spacing);
}

.review-policy-options {
  display: grid;
  gap: 8px;
}

.review-policy-options label {
  min-width: 0;
  display: block;
  cursor: pointer;
}

.review-policy-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.review-policy-options span {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: var(--radius-pill);
  padding: 9px 14px;
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42), 0 12px 26px rgba(37, 99, 235, 0.12);
}

.review-policy-options input:focus-visible + span {
  outline: 2px solid rgba(14, 165, 233, 0.38);
  outline-offset: 2px;
}

.review-policy-save {
  width: 100%;
}

.registration-valid-days-field {
  gap: 8px;
}

.input-with-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.input-with-unit input {
  width: 100%;
}

.input-with-unit span {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(14, 165, 233, 0.16);
  border-radius: var(--radius-pill);
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--copy-muted);
  font-size: 13px;
  font-weight: 820;
}

.field-help {
  margin: 0;
  color: var(--copy-soft);
  font-size: 12px;
  font-weight: 560;
  line-height: 1.5;
}

.field.is-disabled {
  opacity: 0.62;
}

.field.is-disabled select,
.field.is-disabled input {
  cursor: not-allowed;
}

.notice-placeholder-card {
  display: grid;
  gap: 14px;
}

.notice-placeholder-group {
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(14, 165, 233, 0.1);
  padding-top: 10px;
}

.notice-placeholder-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.notice-placeholder-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.notice-placeholder-group summary::-webkit-details-marker {
  display: none;
}

.notice-placeholder-group h4 {
  margin: 0;
  color: var(--copy-strong);
  font-size: 13px;
  font-weight: 900;
}

.notice-placeholder-group summary span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(14, 165, 233, 0.14);
  border-radius: var(--radius-pill);
  padding: 3px 9px;
  color: var(--accent-soft);
  font-size: 11px;
  font-weight: 820;
  background: rgba(239, 248, 255, 0.58);
}

.notice-placeholder-group:not([open]) summary span::before {
  content: "展开";
}

.notice-placeholder-group:not([open]) summary span {
  font-size: 0;
}

.notice-placeholder-group:not([open]) summary span::before {
  font-size: 11px;
}

.notice-placeholder-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.notice-placeholder-token {
  width: 100%;
  min-width: 0;
  appearance: none;
  border: 1px solid rgba(14, 165, 233, 0.16);
  border-radius: 18px;
  padding: 9px 11px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.5);
  color: var(--copy-muted);
  cursor: pointer;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.notice-placeholder-token:hover {
  border-color: rgba(14, 165, 233, 0.32);
  background: rgba(224, 242, 254, 0.5);
}

.notice-placeholder-token code {
  overflow-wrap: anywhere;
  color: #0369a1;
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 850;
}

.notice-placeholder-token span {
  color: var(--copy-soft);
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.notice-template-table th,
.notice-template-table td {
  vertical-align: middle;
}

.notice-template-table td {
  padding-top: 19px;
  padding-bottom: 19px;
}

.notice-template-table .order-no {
  font-size: 15px;
  font-weight: 920;
}

.notice-template-table .order-subtle {
  font-size: 13px;
  line-height: 1.55;
}

.notice-template-table td:nth-child(1),
.notice-template-table td:nth-child(2),
.notice-template-table td:nth-child(3),
.notice-template-table td:nth-child(5),
.notice-template-table td:nth-child(6) {
  white-space: nowrap;
}

.notice-template-table td:nth-child(4) {
  min-width: 18rem;
}

.notice-template-fixed-id {
  color: var(--copy-muted);
  font-size: 13px;
  font-weight: 760;
}

.notice-template-send-node {
  color: var(--accent-soft);
  font-size: 13px;
  font-weight: 850;
}

.notice-template-actions {
  align-items: center;
}

.notice-template-action-hint {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: var(--radius-pill);
  padding: 5px 10px;
  background: rgba(254, 243, 199, 0.56);
  color: #b45309;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.notice-template-action-hint.is-ready {
  border-color: rgba(20, 184, 166, 0.2);
  background: rgba(204, 251, 241, 0.5);
  color: #0f766e;
}

.notice-template-action-hint.is-risky {
  border-color: rgba(239, 68, 68, 0.26);
  background: rgba(254, 226, 226, 0.6);
  color: #b91c1c;
}

.notice-template-risk-toggle {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  background: var(--theme-surface-high);
  color: var(--copy-strong);
  font-size: 13px;
  font-weight: 780;
}

.notice-template-risk-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--theme-primary);
}

.notice-template-drawer {
  padding-top: 12px;
}

.notice-template-editor {
  gap: 14px;
  padding: 4px 0 6px;
}

.notice-template-editor textarea {
  min-height: 180px;
  resize: vertical;
}

.notice-template-editor-actions {
  display: flex;
  justify-content: flex-end;
}

.shipping-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--layout-left-panel-width)) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.merchant-review-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--layout-left-panel-width)) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.logs-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--layout-left-panel-width)) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.collapse-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.collapse-panel summary {
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.collapse-summary-heading {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.collapse-summary-heading > span {
  color: var(--accent-soft);
  font-size: 13px;
  font-weight: 820;
  line-height: 1.2;
}

.collapse-summary-heading strong {
  color: var(--copy-strong);
  font-size: 20px;
  font-weight: 820;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.collapse-summary-heading p {
  margin: 0;
  color: var(--copy-muted);
  font-size: 13px;
  font-weight: 540;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.collapse-toggle {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(14, 165, 233, 0.14);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  background: rgba(239, 248, 255, 0.72);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.collapse-toggle::before {
  content: "展开";
}

.collapse-panel[open] .collapse-toggle::before {
  content: "收起";
}

.collapse-body {
  padding: 0 0 16px;
}

.collapse-body > .card {
  border-width: 0;
  border-radius: 0;
  box-shadow: none;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--layout-left-panel-width)) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.shipping-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.merchant-review-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

#merchantDetailPanel:empty {
  display: none;
}

.logs-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.admins-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.invites-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

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

.logs-type-segmented {
  width: fit-content;
}

.shipping-status-segmented {
  width: fit-content;
}

.shipping-reconciliation {
  display: grid;
  gap: 10px;
  padding: 0 16px 12px;
  border-bottom: 1px solid rgba(14, 165, 233, 0.14);
}

.reconciliation-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0 0;
}

.reconciliation-head > div {
  min-width: 0;
}

.reconciliation-head > .btn {
  flex: 0 0 auto;
  min-height: 34px;
  padding-inline: 14px;
}

.reconciliation-head strong {
  display: block;
  color: var(--copy-strong);
  font-size: 15px;
  line-height: 1.35;
}

.reconciliation-head p {
  margin: 4px 0 0;
  color: var(--copy-muted);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reconciliation-table td {
  vertical-align: top;
}

.reconciliation-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.reconciliation-cell > strong {
  margin-right: 2px;
}

.reconciliation-cell .tag {
  margin-right: 4px;
}

.reconciliation-cell .compact-text {
  flex-basis: 100%;
  margin-top: 0;
}

.reconciliation-table .btn {
  margin-left: 2px;
  margin-top: 0;
  min-height: 32px;
  padding-inline: 12px;
  font-size: 12px;
}

.roles-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--layout-left-panel-width)) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.roles-left,
.roles-main {
  min-width: 0;
}

.roles-main {
  display: grid;
  gap: 16px;
}

.roles-create-card .field {
  margin-top: 0;
}

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

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

.shipping-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--layout-left-panel-width)) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.easypost-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--layout-left-panel-width)) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

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

.status-tile {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
}

.status-tile span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.status-tile strong {
  display: block;
  margin-top: 9px;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

.integration-note {
  border-inline-start: 3px solid var(--brand);
  padding: 10px 12px;
  background: #f7fbff;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.integrations-identity,
.integrations-code-blocks {
  display: grid;
  gap: 12px;
}

.integrations-identity article,
.integration-key-preview,
.integration-endpoint-card,
.integrations-code-blocks article {
  border: 1px solid var(--theme-border-soft);
  background: var(--theme-surface-high);
  padding: 14px;
}

.integrations-identity span,
.integration-key-preview span,
.integration-endpoint-card span,
.integrations-code-blocks span {
  display: block;
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 760;
  margin-bottom: 7px;
}

.integrations-identity strong,
.integration-key-preview strong,
.integration-endpoint-card strong {
  display: block;
  color: var(--theme-text);
  font-size: 18px;
  font-weight: 820;
  overflow-wrap: anywhere;
}

.integration-key-preview p,
.integration-endpoint-card p {
  margin: 9px 0 0;
  color: var(--theme-muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.integration-endpoint-card strong {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 16px;
}

.integration-endpoint-card em {
  border: 1px solid var(--theme-primary-border);
  background: var(--theme-primary-soft);
  color: var(--theme-primary);
  padding: 5px 8px;
  font-style: normal;
  font-size: 12px;
  font-weight: 850;
}

.integrations-code-blocks pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--theme-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
}

.integrations-test-form {
  align-items: end;
}

@media (max-width: 980px) {
  .integrations-endpoint-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.merchant-ai-status-slot {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.merchant-ai-key-status {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--theme-border-soft, var(--line));
  background: var(--theme-surface-high, var(--surface));
  color: var(--theme-text, var(--text));
}

.merchant-ai-key-status strong {
  color: var(--theme-text, var(--text));
  font-size: 15px;
  font-weight: 850;
}

.merchant-ai-key-status span {
  color: var(--theme-muted, var(--muted));
  font-size: 13px;
  line-height: 1.5;
}

.merchant-ai-key-status div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.merchant-ai-key-status b {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--theme-border-soft, var(--line));
  background: var(--theme-surface, var(--surface));
  color: var(--theme-muted, var(--muted));
  font-size: 12px;
  font-weight: 760;
}

.merchant-ai-key-status.is-merchant {
  border-color: color-mix(in srgb, var(--theme-success, #047857) 30%, var(--theme-border-soft, var(--line)));
  background: color-mix(in srgb, var(--theme-success, #047857) 8%, var(--theme-surface-high, var(--surface)));
}

.merchant-ai-key-status.is-platform {
  border-color: color-mix(in srgb, var(--theme-primary, #2563eb) 30%, var(--theme-border-soft, var(--line)));
  background: color-mix(in srgb, var(--theme-primary, #2563eb) 7%, var(--theme-surface-high, var(--surface)));
}

.merchant-ai-key-status.is-disabled {
  opacity: 0.75;
}

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

.merchant-ai-usage-tile {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--theme-border-soft, var(--line));
  background: var(--theme-surface-high, var(--surface));
  color: var(--theme-text, var(--text));
}

.merchant-ai-usage-tile span {
  color: var(--theme-muted, var(--muted));
  font-size: 12px;
  font-weight: 760;
}

.merchant-ai-usage-tile strong {
  color: var(--theme-text, var(--text));
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 880;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.merchant-ai-usage-tile small {
  color: var(--theme-muted, var(--muted));
  font-size: 12px;
  line-height: 1.45;
}

.merchant-ai-config-grid {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(160px, 190px) minmax(240px, 1fr);
  gap: 14px;
  align-items: start;
}

.merchant-ai-config-grid .field {
  margin-top: 0;
}

.merchant-ai-config-grid select {
  width: 100%;
}

.merchant-ai-limit-fields {
  padding: 14px;
  border: 1px solid var(--theme-border-soft, var(--line));
  background: var(--theme-surface-high, var(--surface));
}

.merchant-ai-limit-fields .field {
  margin-top: 0;
}

.merchant-ai-limit-fields.is-disabled {
  opacity: 0.62;
}

.merchant-ai-limit-fields.is-disabled input {
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .customer-page .customer-filter-form {
    grid-template-columns: 1fr;
  }

  .customer-page .customer-filter-form .btn,
  .customer-page .customer-form-actions .btn {
    width: 100%;
  }

  .merchant-ai-usage-grid {
    grid-template-columns: 1fr;
  }

  .merchant-ai-config-grid {
    grid-template-columns: 1fr;
  }
}

.settings-stack {
  display: grid;
  gap: 18px;
}

.settings-block {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.settings-block:first-child {
  border-top: 0;
  padding-top: 0;
}

.settings-block h3 {
  margin: 0 0 2px;
  font-size: 14px;
  line-height: 1.3;
}

.settings-block-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.settings-block-heading span {
  color: var(--accent-soft);
  font-size: 12px;
  font-weight: 850;
}

.settings-block-heading strong {
  color: var(--copy-strong);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.25;
}

.settings-block-heading p {
  margin: 0;
  color: var(--copy-muted);
  font-size: 13px;
  font-weight: 560;
  line-height: 1.55;
}

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

.settings-actions {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.security-form {
  display: grid;
  gap: 14px;
  max-width: 520px;
}

.account-security-layout {
  align-items: stretch;
}

.account-identity-card .card-body,
.account-password-card .card-body {
  padding: 18px 20px 20px;
}

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

.account-identity-list .detail-row {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.36);
  padding: 12px 14px;
}

.account-identity-list .detail-row strong {
  text-align: right;
  overflow-wrap: anywhere;
}

.account-password-card .security-form {
  max-width: 480px;
}

.account-password-card .form-actions {
  justify-content: stretch;
}

.account-password-card .form-actions .btn {
  width: 100%;
}

.password-page > .card {
  grid-column: 1;
}

.security-form > div:first-child strong {
  font-size: 15px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.permission-groups,
.permission-tree {
  display: grid;
  gap: 12px;
}

.permission-editor-body {
  padding: 18px 20px 20px;
}

.permission-editor-form {
  display: grid;
  gap: 16px;
}

.permission-current-role {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(14, 165, 233, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.48);
}

.permission-current-role span {
  color: var(--copy-muted);
  font-size: 13px;
  font-weight: 760;
}

.permission-current-role strong {
  color: var(--copy-strong);
  font-size: 15px;
  font-weight: 850;
  text-align: right;
  overflow-wrap: anywhere;
}

.permission-tree-node {
  display: grid;
  gap: 12px;
}

.permission-tree > .permission-tree-node + .permission-tree-node {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.permission-menu-card {
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.permission-menu-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.permission-branch {
  display: grid;
  gap: 12px;
  margin-inline-start: 118px;
}

.permission-child-menus {
  display: grid;
  gap: 14px;
}

.permission-level-2 .permission-menu-card {
  min-width: 0;
}

.permission-level-2 .permission-branch {
  margin-inline-start: 72px;
}

.permission-section {
  display: grid;
  gap: 8px;
  padding: 0;
}

.permission-section-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.permission-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px 14px;
  align-items: start;
}

.check-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  align-items: start;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.permission-list .check-row {
  width: 100%;
}

.check-row input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.permission-save-bar {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.permission-save-bar .btn {
  min-width: 160px;
}

.check-row strong {
  display: block;
  font-size: 13px;
}

.check-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-word;
}

.tree-check-row,
.permission-menu-card .check-row {
  flex: 1;
  width: auto;
  border: 0;
  background: transparent;
  padding: 0;
  min-height: 0;
}

.tree-check-row strong,
.permission-menu-card .check-row strong {
  color: var(--text);
  font-size: 15px;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

  .grid,
  .grid.two,
  .split,
  .shipping-layout,
  .shipping-settings-layout,
  .easypost-layout,
  .merchant-review-layout,
  .logs-layout,
  .account-layout,
  .roles-layout,
  .form-grid,
  .package-grid,
  .permission-list {
    grid-template-columns: 1fr;
  }

  .permission-branch,
  .permission-level-2 .permission-branch {
    margin-inline-start: 24px;
  }
}

/* Legacy visual bridge
   Do not add new colors here. These old variables are kept only so existing
   page CSS can resolve to the design-system tokens declared later. */
:root {
  --bg: var(--theme-page-bg, #f0f1f3);
  --surface: var(--theme-surface, #ffffff);
  --surface-soft: var(--theme-surface-high, #f7f8fa);
  --line: var(--theme-border, #cfd6df);
  --line-strong: var(--theme-border-strong, #b8c1cc);
  --ink: var(--theme-text, #20242c);
  --text: var(--theme-text, #20242c);
  --muted: var(--theme-muted, #697386);
  --dim: var(--theme-disabled, #a7b0bf);
  --brand: var(--theme-primary, #155bd6);
  --brand-dark: var(--theme-primary-strong, #0f4fc4);
  --ok: var(--theme-success, #15803d);
  --warn: var(--theme-warning, #d97706);
  --danger: var(--theme-danger, #dc2626);
  --shadow: var(--theme-shadow-card, 0 1px 2px rgba(16, 24, 40, .06));
  --input: var(--theme-input-bg, #ffffff);
  --hover: var(--theme-button-hover-bg, #f4f6f8);
  --brand-soft: var(--theme-primary-soft, #eef4ff);
  --warn-soft: var(--theme-warning-soft, #fff7ed);
  --danger-soft: var(--theme-danger-soft, #fef2f2);
  --copy-strong: var(--theme-text, #20242c);
  --copy-muted: var(--theme-muted, #697386);
  --copy-soft: var(--theme-disabled, #a7b0bf);
  --accent-soft: var(--theme-primary, #155bd6);
  --tag-ok-bg: var(--theme-success-soft, #ecfdf3);
  --tag-ok-border: var(--theme-success-border, rgba(21, 128, 61, 0.18));
  --tag-ok-text: var(--theme-success, #15803d);
  --tag-warn-bg: var(--theme-warning-soft, #fff7ed);
  --tag-warn-border: var(--theme-warning-border, rgba(217, 119, 6, 0.24));
  --tag-warn-text: var(--theme-warning, #d97706);
  --tag-danger-bg: var(--theme-danger-soft, #fef2f2);
  --tag-danger-border: var(--theme-danger-border, rgba(220, 38, 38, 0.2));
  --tag-danger-text: var(--theme-danger, #dc2626);
  --btn-bg: var(--theme-button-bg, #ffffff);
  --btn-border: var(--theme-border, #cfd6df);
  --btn-text: var(--theme-text, #20242c);
  --btn-hover-bg: var(--theme-button-hover-bg, #f4f6f8);
  --btn-hover-text: var(--theme-primary, #155bd6);
  --btn-primary-bg: var(--theme-primary, #155bd6);
  --btn-primary-hover-bg: var(--theme-primary-strong, #0f4fc4);
  --btn-primary-shadow: var(--theme-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .14));
  --left-panel-bg: var(--theme-left-nav-bg, #ffffff);
  --left-panel-bg-soft: var(--theme-surface, #ffffff);
  --left-panel-border: var(--theme-border-soft, #dfe4eb);
  --left-panel-shadow: var(--theme-shadow-card, 0 1px 2px rgba(16, 24, 40, .06));
  --layout-sidebar-width: 230px;
  --layout-left-panel-width: 380px;
  --layout-page-x: 28px;
  --layout-page-max-width: 1500px;
  --radius-card: 4px;
  --radius-panel: 4px;
  --radius-control: 4px;
  --radius-pill: 4px;
  --label-letter-spacing: 0.03em;
}

body {
  background: #f0f1f3;
  background-attachment: fixed;
  color: var(--text);
}

a {
  color: inherit;
}

input,
select,
textarea {
  border-color: var(--line);
  background: var(--input);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--theme-primary, var(--brand));
  box-shadow: var(--theme-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .14));
}

.auth-box,
.card,
.collapse-panel,
.confirm-modal {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.auth-box {
  border-radius: var(--radius-control);
}

.btn {
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--text);
  box-shadow: none;
}

.btn:hover {
  border-color: var(--theme-border-strong, var(--line-strong));
  background: var(--theme-button-hover-bg, var(--hover));
  color: var(--theme-primary, var(--brand));
}

.btn.primary {
  border-color: var(--theme-primary, var(--btn-primary-bg));
  background: var(--theme-primary, var(--btn-primary-bg));
  color: var(--theme-on-primary, #fff);
  box-shadow: var(--btn-primary-shadow);
}

.btn.primary:hover {
  background: var(--theme-primary-strong, var(--btn-primary-hover-bg));
  color: var(--theme-on-primary, #fff);
}

.btn.danger {
  border-color: var(--theme-danger-border, var(--tag-danger-border));
  background: var(--theme-danger-soft, var(--danger-soft));
  color: var(--theme-danger, var(--danger));
}

.app-shell {
  grid-template-columns: var(--layout-sidebar-width) minmax(0, 1fr);
  max-width: none;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  gap: 0;
  padding: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.42);
  color: var(--text);
  box-shadow:
    inset -1px 0 0 rgba(125, 211, 252, 0.08),
    18px 0 50px rgba(17, 24, 39, 0.04);
  backdrop-filter: blur(26px) saturate(142%);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.brand {
  min-height: 112px;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 22px 18px 18px;
  color: var(--text);
  font-size: 13px;
  text-align: center;
}

.brand img {
  width: 188px;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.nav {
  gap: 7px;
  padding: 5px 12px 18px;
}

.nav-group {
  display: grid;
  gap: 5px;
}

.nav-group + .nav-group {
  margin-top: 8px;
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 14px;
  color: var(--copy-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.nav-group-toggle:hover {
  color: var(--brand);
  background: transparent;
  box-shadow: none;
  transform: none;
}

.nav-group-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}

.nav-group.open .nav-group-chevron {
  transform: rotate(225deg);
}

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

.nav-group-items[hidden] {
  display: none;
}

.nav-group-items button {
  min-height: 42px;
  margin-left: 8px;
  padding-left: 18px;
  font-size: 13px;
}

.nav button {
  position: relative;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 800;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.14s ease, box-shadow 0.16s ease;
}

.nav button:hover {
  transform: translateX(2px);
  border-color: rgba(255, 255, 255, 0.56);
  color: var(--brand);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 10px 24px rgba(17, 24, 39, 0.055);
}

.nav button.active {
  transform: translateX(8px);
  border-color: rgba(255, 255, 255, 0.68);
  color: var(--brand);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -12px 24px rgba(29, 78, 216, 0.035),
    0 14px 30px rgba(17, 24, 39, 0.08);
}

.nav .nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 0 14px;
  border-color: transparent;
  color: var(--copy-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.nav .nav-group-toggle:hover {
  transform: none;
  border-color: transparent;
  background: transparent;
  color: var(--brand);
  box-shadow: none;
}

.nav .nav-group-items button {
  min-height: 42px;
  margin-left: 8px;
  padding-left: 18px;
  font-size: 13px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.34);
}

.console-header {
  min-height: 82px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  width: min(calc(100% - (var(--layout-page-x) * 2)), var(--layout-page-max-width));
  margin: 18px var(--layout-page-x) 0;
}

.console-session {
  min-width: 0;
}

.console-header h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(26px, 2.15vw, 34px);
  font-weight: 740;
  line-height: 1.08;
  letter-spacing: 0;
}

.console-header .eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.2;
}

.console-subtitle {
  max-width: 44rem;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 560;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
}

.header-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
}

.shell-status {
  width: min(calc(100% - (var(--layout-page-x) * 2)), var(--layout-page-max-width));
  margin: 14px var(--layout-page-x) 0;
}

.shell-status:has(.status[data-status]:empty) {
  display: none;
}

.shell-status .status {
  min-height: 0;
  padding: 12px 16px;
  border: 1px solid rgba(14, 165, 233, 0.14);
  border-left-width: 3px;
  border-radius: var(--radius-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 12px 30px rgba(15, 23, 42, 0.045);
  backdrop-filter: blur(20px) saturate(136%);
  color: var(--copy-muted);
  font-weight: 620;
}

.shell-status .status.ok {
  border-color: rgba(20, 184, 166, 0.18);
  border-left-color: rgba(20, 184, 166, 0.62);
  color: #117363;
}

.shell-status .status.error {
  border-color: rgba(239, 68, 68, 0.16);
  border-left-color: rgba(239, 68, 68, 0.62);
  color: #9f3535;
}

.module-hero {
  margin-bottom: 20px;
}

.merchant-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 16px;
  align-items: stretch;
}

.merchant-hero-panel {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  padding: 23px 25px;
  border: 1px solid rgba(14, 165, 233, 0.16);
  border-radius: var(--radius-panel);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.merchant-hero-panel > * {
  position: relative;
  z-index: 1;
}

.merchant-hero-primary {
  border-color: rgba(255, 255, 255, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -18px 34px rgba(14, 165, 233, 0.05),
    0 18px 48px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(24px) saturate(145%);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.merchant-hero-primary::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius-panel) - 1px);
  opacity: 0.92;
  pointer-events: none;
  transform: translate3d(-1.2%, 0, 0);
  animation: heroGlassDrift 14s ease-in-out infinite alternate;
}

.merchant-hero-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  mix-blend-mode: soft-light;
  pointer-events: none;
  background-size: 132% 100%, 100% 100%;
  animation: heroGlassSheen 18s ease-in-out infinite alternate;
}

.merchant-hero-primary:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -18px 34px rgba(14, 165, 233, 0.06),
    0 22px 56px rgba(15, 23, 42, 0.09);
}

@keyframes heroGlassDrift {
  0% {
    transform: translate3d(-1.2%, -0.4%, 0) scale(1);
    opacity: 0.86;
  }
  100% {
    transform: translate3d(1.2%, 0.5%, 0) scale(1.015);
    opacity: 0.96;
  }
}

@keyframes heroGlassSheen {
  0% {
    background-position: 0% 0%, 0 0;
    opacity: 0.74;
  }
  100% {
    background-position: 100% 0%, 0 0;
    opacity: 0.96;
  }
}

.merchant-hero-guide {
  border-color: rgba(255, 255, 255, 0.54);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    inset 0 -14px 30px rgba(14, 165, 233, 0.04),
    0 16px 42px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(22px) saturate(138%);
}

.merchant-hero-guide::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius-panel) - 1px);
  opacity: 0.86;
  pointer-events: none;
}

.merchant-hero-guide::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.merchant-hero-panel h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(22px, 2vw, 29px);
  font-weight: 650;
  line-height: 1.14;
  letter-spacing: 0;
}

.merchant-hero-panel h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 780;
  line-height: 1.05;
  letter-spacing: 0;
}

.merchant-hero-panel p:not(.eyebrow) {
  max-width: 58rem;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.merchant-step-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.merchant-step-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: var(--radius-pill);
  background: rgba(224, 244, 255, 0.68);
  color: #0369a1;
  font-size: 13px;
  font-weight: 650;
}

.module-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.page-title-copy {
  display: grid;
  align-content: center;
}

.page-title-side {
  display: grid;
  align-content: center;
}

.page-title-side .actions {
  justify-content: flex-start;
}

@media (prefers-reduced-motion: reduce) {
  .merchant-hero-primary,
  .merchant-hero-primary::before,
  .merchant-hero-primary::after {
    animation: none;
    transition: none;
  }

  .merchant-hero-primary:hover {
    transform: none;
  }
}

.content {
  width: min(calc(100% - (var(--layout-page-x) * 2)), var(--layout-page-max-width));
  margin-inline: var(--layout-page-x) 0;
  padding: 18px 0 var(--layout-page-x);
  gap: 20px;
}

.page-title h1 {
  font-size: 28px;
  font-weight: 850;
  letter-spacing: 0;
}

.page-title p,
.muted,
.status {
  color: var(--muted);
}

.card {
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: var(--radius-card);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.11);
  overflow: hidden;
}

.card.edit-focus-active {
  border-color: rgba(14, 165, 233, 0.44);
  box-shadow:
    0 0 0 3px rgba(14, 165, 233, 0.1),
    0 24px 62px rgba(14, 165, 233, 0.16);
}

.card.edit-focus-pulse {
  animation: edit-focus-pulse 1.45s ease-out;
}

@keyframes edit-focus-pulse {
  0% {
    box-shadow:
      0 0 0 0 rgba(14, 165, 233, 0.3),
      0 18px 44px rgba(14, 165, 233, 0.12);
    transform: translateY(0);
  }
  40% {
    box-shadow:
      0 0 0 8px rgba(14, 165, 233, 0.08),
      0 24px 58px rgba(14, 165, 233, 0.18);
    transform: translateY(-2px);
  }
  100% {
    box-shadow:
      0 0 0 3px rgba(14, 165, 233, 0.1),
      0 24px 62px rgba(14, 165, 233, 0.16);
    transform: translateY(0);
  }
}

.card h2 {
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.06);
  color: var(--text);
  font-size: 16px;
  letter-spacing: 0;
}

.card-body {
  padding: 18px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  color: var(--text);
  font-size: 30px;
  font-weight: 850;
}

th,
td {
  border-bottom-color: var(--line);
}

th {
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: var(--label-letter-spacing);
}

tbody tr:nth-child(even) td {
  background: rgba(148, 163, 184, 0.05);
}

tbody tr:hover td {
  background: rgba(14, 165, 233, 0.09);
}

.reviews-data-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0 11px;
  table-layout: auto;
}

.reviews-data-table.roles-table {
  min-width: 0;
  table-layout: auto;
}

.reviews-data-table tbody tr {
  background: var(--theme-table-row-bg);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.reviews-data-table tbody tr:nth-child(even) {
  background: var(--theme-table-row-alt-bg);
}

.reviews-data-table tbody tr:hover {
  background: var(--theme-table-row-hover-bg);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.reviews-data-table th,
.reviews-data-table td {
  border-bottom: 0;
  word-break: normal;
  overflow-wrap: anywhere;
}

.reviews-data-table th {
  padding: 6px 13px;
  background: transparent;
  color: var(--copy-soft);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.01em;
}

.reviews-data-table td {
  padding: 15px 13px;
  background: transparent;
  color: var(--copy-strong);
  font-size: 14px;
  font-weight: 560;
  border-top: 1px solid var(--theme-table-row-border);
  border-bottom: 1px solid var(--theme-table-row-border);
  transition: border-color 0.18s ease;
}

.reviews-data-table .tag {
  white-space: nowrap;
}

.table-code,
.table-text-strong {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
}

.table-text-strong {
  font-weight: 850;
}

.reviews-data-table tbody tr:hover td {
  border-color: rgba(14, 165, 233, 0.24);
}

.reviews-data-table td:first-child {
  border-inline-start: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px 0 0 18px;
}

.reviews-data-table td:last-child {
  border-right: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 0 18px 18px 0;
}

.merchant-orders-table th,
.merchant-orders-table td {
  vertical-align: middle;
}

.merchant-orders-table tbody tr[data-merchant-order-row] {
  cursor: default;
}

.merchant-orders-table .order-no {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.merchant-orders-table .order-subtle {
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  line-height: 1.45;
}

.merchant-orders-table .order-store-product {
  display: flex;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}

.merchant-orders-table .order-store-product > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.merchant-orders-table .order-store-product > small {
  min-width: 0;
  color: var(--copy-soft);
  font-size: 11px;
  font-weight: 520;
  line-height: 1.35;
}

.merchant-orders-table .order-address {
  display: inline-block;
  max-width: 18rem;
  white-space: normal;
}

.merchant-orders-table .order-date-sort {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  box-shadow: none !important;
  transform: none !important;
}

.merchant-orders-table .order-date-sort-icon {
  color: var(--theme-primary);
  font-size: 10px;
  line-height: 1;
}

.merchant-orders-table tr.is-canceled td {
  opacity: 0.56;
  background: rgba(148, 163, 184, 0.08);
}

.merchant-orders-table tr.is-canceled .order-no {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(100, 116, 139, 0.6);
}

.merchant-orders-table tr.is-expanded td {
  border-bottom-color: rgba(148, 163, 184, 0.14);
  box-shadow: none;
}

.merchant-orders-table tr.is-expanded td:first-child {
  border-radius: 0;
}

.merchant-orders-table tr.is-expanded td:last-child {
  border-radius: 0;
}

.merchant-order-drawer-row {
  transform: translateY(-11px);
  cursor: default;
}

.merchant-order-drawer-row td {
  padding: 0 13px 13px;
  border-top: 0;
  border-radius: 0 !important;
  border-inline-start: 1px solid rgba(148, 163, 184, 0.14);
  border-right: 1px solid rgba(148, 163, 184, 0.14);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: none !important;
}

.merchant-order-drawer {
  display: grid;
  gap: 0;
  padding: 0 8px 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}

.merchant-order-drawer * {
  user-select: text;
  -webkit-user-select: text;
}

.merchant-order-drawer-section {
  display: grid;
  gap: 5px;
  padding: 12px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.merchant-order-drawer-section:first-child {
  border-top: 0;
}

.merchant-order-drawer-section span {
  color: var(--accent-soft);
  font-size: 12px;
  font-weight: 850;
}

.merchant-order-drawer-section strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 820;
}

.merchant-order-drawer-section p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  line-height: 1.55;
}

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

.merchant-order-detail-grid dl {
  min-width: 0;
  display: grid;
  gap: 3px;
  margin: 0;
}

.merchant-order-detail-grid dt {
  color: var(--theme-muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

.merchant-order-detail-grid dd {
  min-width: 0;
  margin: 0;
  color: var(--theme-text);
  font-size: 12px;
  font-weight: 520;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .merchant-order-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.merchant-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  min-width: 210px;
}

.merchant-order-actions .btn {
  flex: 0 0 auto;
  width: 76px;
  min-width: 76px;
  min-height: 34px;
  padding: 7px 10px;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1;
}

.merchant-order-actions .btn.primary,
.merchant-order-actions .btn.danger {
  width: 84px;
  min-width: 84px;
}

.order-more-actions {
  position: relative;
  flex: 0 0 auto;
}

.order-more-actions summary {
  list-style: none;
  cursor: pointer;
}

.order-more-actions summary::-webkit-details-marker {
  display: none;
}

.order-more-actions > div {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  right: 0;
  min-width: 112px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface-highest);
  box-shadow: var(--theme-shadow-card);
}

.order-more-actions > div .btn {
  width: 100%;
  min-width: 96px;
  justify-content: center;
}

#merchantOrdersTable.table-wrap {
  overflow: visible !important;
}

.merchant-orders-table,
.merchant-orders-table tbody,
.merchant-orders-table tr,
.merchant-orders-table td {
  overflow: visible;
}

.merchant-order-actions .btn.soft-primary {
  border-color: var(--theme-primary);
  background: var(--theme-primary-soft);
  color: var(--theme-primary);
  box-shadow: none;
}

.order-action-with-status {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
}

.order-action-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--theme-success);
  box-shadow:
    0 0 0 2px var(--theme-surface),
    0 0 0 4px var(--theme-success-border);
}

.tag {
  border: 1px solid var(--line);
  background: var(--hover);
  color: var(--text);
  flex: 0 0 auto;
  justify-content: center;
  min-inline-size: max-content;
  max-width: max-content;
  font-weight: 800;
  letter-spacing: var(--label-letter-spacing);
  text-transform: uppercase;
  white-space: nowrap;
}

.tag:not(.warn):not(.danger) {
  border-color: var(--tag-ok-border);
  background: var(--tag-ok-bg);
  color: var(--tag-ok-text);
}

.tag.warn {
  border-color: var(--tag-warn-border);
  background: var(--tag-warn-bg);
  color: var(--tag-warn-text);
}

.preference-dock {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 60;
  pointer-events: none;
}

.preference-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  min-height: 44px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.ai-assistant-entry {
  min-height: 44px;
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-pill);
  padding: 0 18px;
  background: var(--theme-button-bg);
  color: var(--theme-primary);
  font-size: 13px;
  font-weight: 850;
  box-shadow: var(--theme-shadow-card);
  backdrop-filter: blur(18px);
  white-space: nowrap;
}

.ai-assistant-entry:hover {
  transform: translateY(-1px);
  border-color: var(--theme-primary);
}

.preference-title {
  padding: 0 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: var(--label-letter-spacing);
  text-transform: uppercase;
  white-space: nowrap;
}

.preference-button {
  min-height: 32px;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 0 12px;
  background: var(--hover);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.preference-button:hover {
  color: var(--brand);
  box-shadow: none;
}

.btn,
.modal-actions .btn,
.form-actions .btn,
.actions .btn,
.segmented .btn {
  --btn-radius: var(--radius-pill);
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--btn-border);
  border-radius: var(--btn-radius);
  padding: 9px 18px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 13px;
  font-weight: 780;
  line-height: 1.25;
  white-space: normal;
  box-shadow: var(--theme-shadow-input, none);
  backdrop-filter: blur(12px) saturate(128%);
}

.btn:hover,
.modal-actions .btn:hover,
.form-actions .btn:hover,
.actions .btn:hover,
.segmented .btn:hover {
  border-color: rgba(14, 165, 233, 0.24);
  background: var(--btn-hover-bg);
  color: var(--btn-hover-text);
}

.btn.primary,
.modal-actions .btn.primary,
.form-actions .btn.primary,
.actions .btn.primary,
.segmented .btn.primary {
  border-radius: var(--btn-radius);
  border-color: var(--theme-primary, var(--btn-primary-bg));
  background: var(--theme-primary, var(--btn-primary-bg));
  color: var(--theme-on-primary, #fff);
  box-shadow: var(--btn-primary-shadow);
}

.btn.primary:hover,
.modal-actions .btn.primary:hover,
.form-actions .btn.primary:hover,
.actions .btn.primary:hover,
.segmented .btn.primary:hover {
  border-color: var(--theme-primary-strong, var(--btn-primary-hover-bg));
  background: var(--theme-primary-strong, var(--btn-primary-hover-bg));
  color: var(--theme-on-primary, #fff);
}

.btn.danger,
.modal-actions .btn.danger,
.form-actions .btn.danger,
.actions .btn.danger {
  border-color: var(--tag-danger-border);
  color: var(--theme-danger, var(--danger));
  box-shadow: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.roles-table .actions .btn {
  white-space: nowrap;
}

.admins-table th:nth-child(1),
.admins-table td:nth-child(1) {
  width: 64px;
}

.admins-table th:nth-child(5),
.admins-table td:nth-child(5),
.admins-table th:nth-child(6),
.admins-table td:nth-child(6) {
  width: 86px;
}

.admins-table th:nth-child(7),
.admins-table td:nth-child(7) {
  width: 210px;
}

.admins-table .actions {
  justify-content: flex-start;
  gap: 8px;
}

.admins-table .actions .btn {
  white-space: nowrap;
}

.redeem-codes-table th:nth-child(1),
.redeem-codes-table td:nth-child(1) {
  width: 64px;
}

.redeem-codes-table th:nth-child(3),
.redeem-codes-table td:nth-child(3),
.redeem-codes-table th:nth-child(4),
.redeem-codes-table td:nth-child(4) {
  width: 86px;
}

.redeem-codes-table th:nth-child(6),
.redeem-codes-table td:nth-child(6) {
  width: 110px;
}

.redeem-codes-table th:nth-child(7),
.redeem-codes-table td:nth-child(7) {
  width: 92px;
}

.redeem-codes-table .actions .btn,
.redeem-codes-table .btn {
  white-space: nowrap;
}

.shipping-orders-table {
  table-layout: fixed;
}

.shipping-orders-table th,
.shipping-orders-table td {
  min-width: 0;
  overflow-wrap: anywhere;
  vertical-align: top;
  word-break: normal;
}

.shipping-orders-table td:nth-child(3),
.shipping-orders-table td:nth-child(4) {
  vertical-align: middle;
}

.shipping-orders-table th:nth-child(1),
.shipping-orders-table td:nth-child(1) {
  width: 190px;
}

.shipping-orders-table th:nth-child(3),
.shipping-orders-table td:nth-child(3) {
  width: 128px;
}

.shipping-orders-table th:nth-child(4),
.shipping-orders-table td:nth-child(4) {
  width: 430px;
}

.shipping-order-submeta {
  margin-top: 4px;
  color: color-mix(in srgb, var(--muted) 72%, transparent);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: 0;
}

.shipping-orders-table .actions {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: flex-start;
}

.shipping-orders-table .actions .btn {
  width: auto;
  min-width: 0;
  padding-inline: 12px;
  white-space: nowrap;
}

.shipping-orders-table .tag {
  vertical-align: middle;
}

.shipping-orders-table .compact-text,
.shipping-orders-table .shipping-order-submeta {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.invites-table th:nth-child(1),
.invites-table td:nth-child(1) {
  width: 64px;
}

.invites-table th:nth-child(4),
.invites-table td:nth-child(4),
.invites-table th:nth-child(5),
.invites-table td:nth-child(5) {
  width: 86px;
}

.invites-table th:nth-child(7),
.invites-table td:nth-child(7) {
  width: 150px;
}

.invites-table .actions {
  justify-content: flex-start;
  gap: 8px;
}

.invites-table .actions .btn {
  white-space: nowrap;
}

.split > .stack:first-child {
  gap: 0;
}

.split > .stack:first-child > .card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.split > .stack:first-child > .card + .card {
  border-top: 1px solid var(--left-panel-border);
}

.split > .stack:first-child > .card:first-child {
  border-radius: var(--radius-panel) var(--radius-panel) 0 0;
}

.split > .stack:first-child > .card:last-child {
  border-radius: 0 0 var(--radius-panel) var(--radius-panel);
}

.merchant-review-layout > aside.stack > .card::before,
.merchant-review-layout > aside.stack .collapse-panel::before,
.shipping-layout > aside.stack > .card::before,
.shipping-layout > aside.stack .collapse-panel::before,
.logs-layout > aside.stack > .card::before,
.logs-layout > aside.stack .collapse-panel::before,
.roles-left > .card::before,
.easypost-layout > .card:first-child::before,
.account-layout > .card:first-child::before,
.split > .stack:first-child::before,
.split > .stack:first-child > .card::before,
.split > .card:first-child::before,
.split > form.card:first-child::before {
  display: none;
}

.merchant-review-layout > aside.stack > .card > *,
.merchant-review-layout > aside.stack .collapse-panel > *,
.shipping-layout > aside.stack > .card > *,
.shipping-layout > aside.stack .collapse-panel > *,
.logs-layout > aside.stack > .card > *,
.logs-layout > aside.stack .collapse-panel > *,
.roles-left > .card > *,
.easypost-layout > .card:first-child > *,
.account-layout > .card:first-child > *,
.split > .stack:first-child > *,
.split > .stack:first-child > .card > *,
.split > .card:first-child > *,
.split > form.card:first-child > * {
  position: relative;
  z-index: 1;
}

.merchant-review-layout > aside.stack > .card h2,
.shipping-layout > aside.stack > .card h2,
.logs-layout > aside.stack > .card h2,
.roles-left > .card h2,
.easypost-layout > .card:first-child h2,
.account-layout > .card:first-child h2,
.split > .stack:first-child > .card h2,
.split > .card:first-child h2,
.split > form.card:first-child h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: 0;
  background: transparent;
}

.logs-layout > aside.stack > .card h2 {
  border-bottom: 0;
}

.side-card-heading {
  display: grid;
  gap: 8px;
  padding: 18px 20px 4px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.merchant-review-layout > aside.stack .side-card-heading {
  background: transparent;
}

.merchant-review-layout > aside.stack .collapse-body > .card,
.logs-layout > aside.stack .collapse-body > .card {
  border: 0;
  border-radius: 0;
  box-shadow: var(--left-panel-shadow);
}

.merchant-review-main > .card,
.merchant-review-main #merchantDetailPanel > .card,
.shipping-main > .card,
.logs-main > .card,
.roles-main > .card,
.easypost-layout > .card:last-child,
.account-layout > .card:last-child,
.table-shell-card,
.points-list-column > .card:last-child,
.split > div > .card,
.split > div > section.card {
  margin-top: 0;
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: var(--radius-card);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.11);
}

.merchant-review-main > .card .table-wrap,
.merchant-review-main #merchantDetailPanel > .card .table-wrap,
.shipping-main > .card .table-wrap,
.logs-main > .card .table-wrap,
.roles-main > .card .table-wrap,
.easypost-layout > .card:last-child .table-wrap,
.account-layout > .card:last-child .table-wrap,
.table-shell-card .table-wrap,
.points-list-column > .card:last-child .table-wrap,
.split > div > .card .table-wrap,
.split > div > section.card .table-wrap {
  padding: 12px 16px 16px;
}

.merchant-review-main > .card h2,
.merchant-review-main #merchantDetailPanel > .card h2,
.shipping-main > .card h2,
.logs-main > .card h2,
.roles-main > .card h2,
.easypost-layout > .card:last-child h2,
.account-layout > .card:last-child h2,
.table-shell-card h2,
.points-list-column > .card:last-child h2,
.split > div > .card h2,
.split > div > section.card h2 {
  border-bottom: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.06);
}

@media (max-width: 1180px) {
  .ai-provider-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-workbench,
  .dashboard-queue-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .split,
  .shipping-layout,
  .merchant-review-layout,
  .logs-layout,
  .account-layout,
  .shipping-settings-layout,
  .easypost-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .split > .card:first-child,
  .split > form.card:first-child,
  .split > .stack:first-child,
  .shipping-layout > aside.stack,
  .merchant-review-layout > aside.stack,
  .logs-layout > aside.stack,
  .account-layout > .card:first-child,
  .easypost-layout > .card:first-child {
    max-width: var(--layout-left-panel-width);
  }

  .roles-layout {
    grid-template-columns: minmax(0, 1fr);
  }

.roles-left {
    max-width: var(--layout-left-panel-width);
  }

  .reviews-filter-controls,
  .points-filter-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .table-wrap {
    overflow-x: hidden;
  }

  .reviews-data-table,
  .reviews-data-table thead,
  .reviews-data-table tbody,
  .reviews-data-table tr,
  .reviews-data-table th,
  .reviews-data-table td {
    display: block;
    width: 100%;
  }

  .reviews-data-table {
    border-spacing: 0;
  }

  .reviews-data-table thead {
    display: none;
  }

  .reviews-data-table tbody {
    display: grid;
    gap: 12px;
  }

  .reviews-data-table tbody tr {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
  }

  .reviews-data-table td {
    display: grid;
    grid-template-columns: minmax(5.5rem, 32%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-width: 0;
    padding: 0;
    border: 0;
    line-height: 1.45;
  }

  .reviews-data-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: var(--label-letter-spacing);
  }

  .reviews-data-table td:first-child,
  .reviews-data-table td:last-child {
    border: 0;
    border-radius: 0;
  }

  .reviews-data-table .actions {
    min-width: 0;
  }

  .reviews-data-table .tag {
    justify-self: start;
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .brand {
    min-height: 82px;
  }

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

  .content {
    width: auto;
    padding: 18px;
  }

  .console-header {
    width: auto;
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    margin: 18px 18px 0;
  }

  .shell-status {
    width: auto;
    margin: 0 18px;
  }

  .console-subtitle {
    white-space: normal;
  }

  .dashboard-home-hero {
    grid-template-columns: 1fr;
    padding: 20px;
    border-radius: 20px;
  }

  .dashboard-workbench-main {
    padding: 14px;
    border-radius: 20px;
  }

  .merchant-hero-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-metrics,
  .dashboard-note-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-note-card {
    border-right: 0 !important;
    border-bottom: 1px solid var(--theme-border-soft) !important;
  }

  .dashboard-note-card:last-child {
    border-bottom: 0 !important;
  }

  .preference-dock {
    position: static;
    padding: 12px 12px 0;
    pointer-events: auto;
  }

  .preference-switcher {
    justify-content: center;
    border-radius: var(--radius-control);
  }
}

/* MyWSS design system layer
   Maintenance rule: change colors, radius, spacing, and shadows in tokens first.
   Page styles should compose these components instead of redefining colors. */
:root {
  color-scheme: light;
  --theme-page-bg: #ece9e2;
  --theme-left-nav-bg: #f8f3ea;
  --theme-surface: #fffdf8;
  --theme-surface-high: #f7f1e8;
  --theme-surface-highest: #eee6da;
  --theme-surface-raised: #fffaf1;
  --theme-input-bg: #fffdfa;
  --theme-button-bg: #fffdfa;
  --theme-button-hover-bg: #f4eadc;
  --theme-border: #d5cbbd;
  --theme-border-soft: #e3dacd;
  --theme-border-strong: #b9aa99;
  --theme-text: #24303c;
  --theme-muted: #6f776f;
  --theme-disabled: #a69d90;
  --theme-primary: #245c8f;
  --theme-primary-strong: #16446f;
  --theme-primary-soft: #e4eef7;
  --theme-on-primary: #ffffff;
  --theme-success: #0f766e;
  --theme-success-soft: #e2f3ef;
  --theme-success-border: rgba(15, 118, 110, 0.22);
  --theme-warning: #b45309;
  --theme-warning-soft: #fbefd8;
  --theme-warning-border: rgba(180, 83, 9, 0.24);
  --theme-danger: #b42318;
  --theme-danger-soft: #f8e4df;
  --theme-danger-border: rgba(180, 35, 24, 0.22);
  --theme-on-danger: #ffffff;
  --theme-table-row-bg: #fffdf8;
  --theme-table-row-alt-bg: #faf5ed;
  --theme-table-row-hover-bg: #edf4f7;
  --theme-table-row-border: #e2d7c8;
  --theme-table-radius: 14px;
  --theme-ai-bg: var(--theme-surface);
  --theme-ai-border: var(--theme-border);
  --theme-ai-panel-bg: var(--theme-surface-high);
  --theme-ai-chip-bg: var(--theme-surface-highest);
  --theme-ai-chip-text: var(--theme-text);
  --theme-return-bg: rgba(180, 83, 9, 0.08);
  --theme-return-border: rgba(180, 83, 9, 0.22);
  --theme-space-1: 4px;
  --theme-space-2: 8px;
  --theme-space-3: 12px;
  --theme-space-4: 16px;
  --theme-space-5: 20px;
  --theme-space-6: 24px;
  --theme-control-height-sm: 34px;
  --theme-control-height: 42px;
  --theme-control-height-lg: 48px;
  --theme-radius-card: 0;
  --theme-radius-control: 0;
  --theme-radius-dialog: 0;
  --theme-shadow-card: 0 1px 2px rgba(43, 35, 25, .05), 0 14px 38px rgba(43, 35, 25, .08);
  --theme-shadow-input: inset 0 1px 2px rgba(43, 35, 25, .06);
  --theme-shadow-focus: 0 0 0 3px rgba(36, 92, 143, .16);

  --bg: var(--theme-page-bg);
  --surface: var(--theme-surface);
  --surface-soft: var(--theme-surface-high);
  --surface-muted: var(--theme-surface-highest);
  --left-panel-bg: var(--theme-surface);
  --left-panel-bg-soft: var(--theme-surface);
  --line: var(--theme-border);
  --line-strong: var(--theme-border-strong);
  --input: var(--theme-input-bg);
  --hover: var(--theme-button-hover-bg);
  --ink: var(--theme-text);
  --text: var(--theme-text);
  --muted: var(--theme-muted);
  --dim: var(--theme-disabled);
  --copy-strong: var(--theme-text);
  --copy-muted: var(--theme-muted);
  --copy-soft: var(--theme-disabled);
  --brand: var(--theme-primary);
  --brand-dark: var(--theme-primary-strong);
  --brand-soft: var(--theme-primary-soft);
  --accent-soft: var(--theme-primary);
  --ok: var(--theme-success);
  --warn: var(--theme-warning);
  --warn-soft: var(--theme-warning-soft);
  --danger: var(--theme-danger);
  --danger-soft: var(--theme-danger-soft);
  --btn-bg: var(--theme-button-bg);
  --btn-border: var(--theme-border);
  --btn-text: var(--theme-text);
  --btn-hover-bg: var(--theme-button-hover-bg);
  --btn-hover-text: var(--theme-primary);
  --btn-primary-bg: var(--theme-primary);
  --btn-primary-hover-bg: var(--theme-primary-strong);
  --shadow: var(--theme-shadow-card);
  --radius-card: var(--theme-radius-card);
  --radius-panel: var(--theme-radius-card);
  --radius-control: var(--theme-radius-control);
  --radius-pill: var(--theme-radius-control);
  --ms-button-border-radius: var(--theme-radius-control);
  --control-height-sm: var(--theme-control-height-sm);
  --control-height: var(--theme-control-height);
  --control-height-lg: var(--theme-control-height-lg);
}

body.theme-dark {
  color-scheme: dark;
  --theme-page-bg: #151412;
  --theme-left-nav-bg: #181713;
  --theme-surface: #211f1a;
  --theme-surface-high: #29261f;
  --theme-surface-highest: #332f26;
  --theme-surface-raised: #2a261f;
  --theme-input-bg: #24211c;
  --theme-button-bg: #26231e;
  --theme-button-hover-bg: #302b23;
  --theme-border: #3b352b;
  --theme-border-soft: #302b24;
  --theme-border-strong: #5a4d3e;
  --theme-text: #ede5d8;
  --theme-muted: #a79c8c;
  --theme-disabled: #70675a;
  --theme-primary: #8fb9dd;
  --theme-primary-strong: #b7d8f1;
  --theme-primary-soft: #243746;
  --theme-on-primary: #10202b;
  --theme-success: #6fc7b8;
  --theme-success-soft: #1e3a35;
  --theme-success-border: rgba(111, 199, 184, 0.26);
  --theme-warning: #e2b15c;
  --theme-warning-soft: #3b2f1d;
  --theme-warning-border: rgba(226, 177, 92, 0.26);
  --theme-danger: #f28b82;
  --theme-danger-soft: #3d2421;
  --theme-danger-border: rgba(242, 139, 130, 0.26);
  --theme-on-danger: #1c0f0d;
  --theme-table-row-bg: #211f1a;
  --theme-table-row-alt-bg: #26231d;
  --theme-table-row-hover-bg: #29313a;
  --theme-table-row-border: #393329;
  --theme-table-radius: 14px;
  --theme-ai-bg: var(--theme-surface);
  --theme-ai-border: var(--theme-border);
  --theme-ai-panel-bg: var(--theme-surface-high);
  --theme-ai-chip-bg: var(--theme-surface-highest);
  --theme-ai-chip-text: var(--theme-text);
  --theme-return-bg: rgba(226, 177, 92, 0.1);
  --theme-return-border: rgba(226, 177, 92, 0.25);
  --theme-shadow-card: 0 1px 2px rgba(0, 0, 0, .28), 0 18px 46px rgba(0, 0, 0, .32);
  --theme-shadow-input: inset 0 1px 2px rgba(0, 0, 0, .22);
  --theme-shadow-focus: 0 0 0 3px rgba(143, 185, 221, .18);

  --bg: var(--theme-page-bg);
  --surface: var(--theme-surface);
  --surface-soft: var(--theme-surface-high);
  --surface-muted: var(--theme-surface-highest);
  --left-panel-bg: var(--theme-left-nav-bg);
  --left-panel-bg-soft: var(--theme-surface);
  --line: var(--theme-border);
  --line-strong: var(--theme-border-strong);
  --input: var(--theme-input-bg);
  --hover: var(--theme-button-hover-bg);
  --ink: var(--theme-text);
  --text: var(--theme-text);
  --muted: var(--theme-muted);
  --dim: var(--theme-disabled);
  --copy-strong: var(--theme-text);
  --copy-muted: var(--theme-muted);
  --copy-soft: var(--theme-disabled);
  --brand: var(--theme-primary);
  --brand-dark: var(--theme-primary-strong);
  --brand-soft: var(--theme-primary-soft);
  --accent-soft: var(--theme-primary);
  --ok: var(--theme-success);
  --warn: var(--theme-warning);
  --warn-soft: var(--theme-warning-soft);
  --danger: var(--theme-danger);
  --danger-soft: var(--theme-danger-soft);
  --btn-bg: var(--theme-button-bg);
  --btn-border: var(--theme-border);
  --btn-text: var(--theme-text);
  --btn-hover-bg: var(--theme-button-hover-bg);
  --btn-hover-text: var(--theme-primary);
  --btn-primary-bg: var(--theme-primary);
  --btn-primary-hover-bg: var(--theme-primary-strong);
  --shadow: var(--theme-shadow-card);
}

body {
  background: var(--theme-page-bg) !important;
  color: var(--theme-text) !important;
  font-family: -apple-system, "Segoe UI", sans-serif !important;
}

body *,
body *::before,
body *::after {
  background-image: none !important;
  text-shadow: none !important;
}

body,
button,
input,
select,
textarea {
  letter-spacing: 0 !important;
}

.sidebar {
  background-color: var(--theme-left-nav-bg) !important;
  border-right: 1px solid var(--theme-border-soft) !important;
}

.nav button {
  border-radius: var(--theme-radius-card) !important;
  background-color: transparent !important;
  color: var(--theme-text) !important;
  box-shadow: none !important;
}

.nav button:hover,
.nav button.active {
  background-color: var(--theme-surface-highest) !important;
  color: var(--theme-primary) !important;
}

.auth-box,
.card,
.collapse-panel,
.confirm-modal,
.preference-switcher,
.merchant-hero-panel,
.dashboard-home-hero,
.dashboard-workbench-main,
.dashboard-note-card,
.dashboard-metric-card,
.dashboard-focus-card,
.table-shell-card,
.todo-waterfall-panel,
.sent-note-panel,
.completed-note-block,
.submit-mail-summary,
.parsed-order-summary,
.cancel-order-summary,
.status-tile,
.integration-note,
.permission-current-role,
.permission-menu-card,
.check-row,
.ai-provider-card,
.ai-usage-item {
  border: 1px solid var(--theme-border-soft) !important;
  border-radius: var(--theme-radius-card) !important;
  background-color: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  box-shadow: var(--theme-shadow-card) !important;
}

.card-body,
.table-wrap,
.reviews-filter-bar,
.merchant-order-drawer-row td {
  background-color: var(--theme-surface) !important;
  border-color: var(--theme-border-soft) !important;
}

.table-wrap {
  overflow: auto !important;
}

.side-card-heading,
.collapse-panel summary,
.table-head,
.reviews-table-head,
.todo-waterfall-head,
.card h2,
.table-shell-card h2 {
  min-height: auto !important;
  padding: 18px 20px 14px !important;
  border-bottom: 1px solid var(--theme-border-soft) !important;
  background-color: transparent !important;
}

.side-card-heading span,
.collapse-summary-heading > span,
.eyebrow,
.todo-waterfall-head > span,
.reviews-table-head > span,
.table-head > span,
.dashboard-section-heading span {
  margin: 0 !important;
  color: var(--theme-primary) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.side-card-heading strong,
.collapse-summary-heading strong,
.reviews-table-head h3,
.todo-waterfall-head h3,
.table-head h3,
.card h2,
.table-shell-card h2,
.dashboard-section-heading h3 {
  margin: 7px 0 0 !important;
  color: var(--theme-text) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.28 !important;
  letter-spacing: 0 !important;
}

.side-card-heading p,
.collapse-summary-heading p,
.reviews-table-copy,
.todo-waterfall-head p,
.table-head p,
.dashboard-section-heading p {
  margin: 8px 0 0 !important;
  color: var(--theme-muted) !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
  letter-spacing: 0 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

button,
input,
select,
textarea,
.btn,
.preference-button,
.notice-placeholder-token,
.review-policy-options span,
.merchant-step-pills span,
.reviews-table-meta span {
  border-radius: var(--theme-radius-control) !important;
}

input,
select,
textarea,
.content input,
.content select,
.content textarea,
.modal input,
.modal select,
.modal textarea {
  min-height: var(--theme-control-height) !important;
  padding: 9px 13px !important;
  border-color: var(--theme-border) !important;
  background-color: var(--theme-input-bg) !important;
  color: var(--theme-text) !important;
  box-shadow: var(--theme-shadow-input) !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
}

textarea,
.content textarea,
.modal textarea {
  min-height: 96px !important;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--theme-border-strong) !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--theme-primary) !important;
  box-shadow: var(--theme-shadow-input), var(--theme-shadow-focus) !important;
}

.content input::placeholder,
.content textarea::placeholder,
.modal input::placeholder,
.modal textarea::placeholder,
#orderImportForm textarea::placeholder,
#orderImportForm input::placeholder,
.quick-parse-body textarea::placeholder,
.quick-parse-body input::placeholder {
  color: var(--theme-disabled) !important;
  font-weight: 300 !important;
  opacity: .72 !important;
}

.order-import-dropzone {
  position: relative !important;
  display: grid !important;
  gap: 8px !important;
  min-height: 118px !important;
  padding: 22px !important;
  place-items: center !important;
  border: 1px dashed var(--theme-border-strong, var(--line)) !important;
  background: var(--theme-surface-high, var(--surface-soft)) !important;
  color: var(--theme-text, var(--text)) !important;
  cursor: pointer !important;
  text-align: center !important;
}

.order-import-dropzone input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
}

.order-import-dropzone strong {
  font-size: 16px !important;
  font-weight: 820 !important;
}

.order-import-dropzone span {
  color: var(--theme-muted, var(--muted)) !important;
  font-size: 13px !important;
  font-weight: 560 !important;
}

.order-import-dropzone.is-dragging {
  border-color: var(--theme-primary, var(--brand)) !important;
  background: var(--theme-primary-soft, rgba(36, 92, 143, .1)) !important;
}

.btn,
.modal-actions .btn,
.form-actions .btn,
.actions .btn,
.segmented .btn,
.preference-button,
.soft-primary,
.todo-flow-action,
.todo-note-complete,
.todo-note-delete {
  width: auto !important;
  min-width: 0 !important;
  min-height: var(--theme-control-height-sm) !important;
  height: auto !important;
  padding: 8px 15px !important;
  border: 1px solid var(--theme-border) !important;
  border-radius: var(--theme-radius-control) !important;
  background: var(--theme-button-bg) !important;
  color: var(--theme-text) !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  transform: none !important;
}

.form-actions,
.modal-actions,
.actions,
.after-sales-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--theme-space-3) !important;
  align-items: center;
}

.filter-row,
.reviews-filter-controls,
.merchant-filter-controls,
.merchant-order-filter-controls,
.points-filter-controls,
.product-filter-controls,
.after-sales-filter-row,
.after-sales-overview-filter {
  gap: var(--theme-space-3) !important;
}

.filter-row,
.reviews-filter-controls,
  .merchant-filter-controls,
  .merchant-order-filter-controls,
  .merchant-shipping-filter-controls,
  .buyer-review-filter-controls,
  .points-filter-controls,
  .product-filter-controls {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
}

.merchant-shipping-filter-controls {
  display: grid !important;
  grid-template-columns: minmax(0, 9rem) minmax(14rem, 1.1fr) minmax(12rem, .9fr) auto !important;
  align-items: end !important;
  max-width: 860px !important;
}

.buyer-review-filter-controls {
  display: grid !important;
  grid-template-columns: minmax(0, 12rem) minmax(0, 9rem) minmax(20rem, 1fr) auto auto !important;
  column-gap: 24px !important;
  row-gap: 14px !important;
  align-items: end !important;
  max-width: 1080px !important;
}

.filter-row label,
.reviews-filter-controls label,
.after-sales-overview-filter label {
  display: grid !important;
  gap: var(--theme-space-2) !important;
  min-width: 160px !important;
}

.field label,
.filter-row label > span,
.reviews-filter-controls label > span,
.after-sales-overview-filter label > span {
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
}

.btn:hover,
.modal-actions .btn:hover,
.form-actions .btn:hover,
.actions .btn:hover,
.segmented .btn:hover,
.preference-button:hover,
.soft-primary:hover,
.todo-flow-action:hover,
.todo-note-complete:hover,
.todo-note-delete:hover {
  border-color: var(--theme-border-strong) !important;
  background: var(--theme-button-hover-bg) !important;
  color: var(--theme-primary) !important;
  transform: none !important;
}

.btn.primary,
.modal-actions .btn.primary,
.form-actions .btn.primary,
.actions .btn.primary,
.segmented .btn.primary,
.preference-button.active {
  border-color: var(--theme-primary) !important;
  background: var(--theme-primary) !important;
  color: var(--theme-on-primary) !important;
  font-weight: 650 !important;
}

.btn.primary:hover,
.modal-actions .btn.primary:hover,
.form-actions .btn.primary:hover,
.actions .btn.primary:hover,
.segmented .btn.primary:hover,
.preference-button.active:hover {
  border-color: var(--theme-primary-strong) !important;
  background: var(--theme-primary-strong) !important;
  color: var(--theme-on-primary) !important;
}

.btn.danger,
.modal-actions .btn.danger,
.form-actions .btn.danger,
.actions .btn.danger,
.todo-flow-action.danger,
.todo-note-delete {
  border-color: var(--theme-danger-soft) !important;
  background: var(--theme-danger-soft) !important;
  color: var(--theme-danger) !important;
}

.btn.danger:hover,
.modal-actions .btn.danger:hover,
.form-actions .btn.danger:hover,
.actions .btn.danger:hover,
.todo-flow-action.danger:hover,
.todo-note-delete:hover {
  border-color: var(--theme-danger) !important;
  background: var(--theme-danger) !important;
  color: var(--theme-on-danger) !important;
}

.tag,
.badge,
.badge-ok,
.badge-err,
.badge-blue,
.badge-warn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 4px 9px !important;
  border: 1px solid var(--theme-border) !important;
  border-radius: 999px !important;
  background: var(--theme-surface-high) !important;
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  white-space: nowrap !important;
}

.tag.warn,
.badge-warn {
  border-color: var(--theme-warning-border) !important;
  background: var(--theme-warning-soft) !important;
  color: var(--theme-warning) !important;
}

.tag.danger,
.badge-err {
  border-color: var(--theme-danger-border) !important;
  background: var(--theme-danger-soft) !important;
  color: var(--theme-danger) !important;
}

.tag.ok,
.badge-ok {
  border-color: var(--theme-success-border) !important;
  background: var(--theme-success-soft) !important;
  color: var(--theme-success) !important;
}

.status,
.status.compact {
  color: var(--theme-muted) !important;
  background: transparent !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.status.ok {
  border-color: var(--theme-success-border) !important;
  background: var(--theme-success-soft) !important;
  color: var(--theme-success) !important;
}

.status.error {
  border-color: var(--theme-danger-border) !important;
  background: var(--theme-danger-soft) !important;
  color: var(--theme-danger) !important;
}

table,
.reviews-data-table {
  color: var(--theme-text) !important;
}

th,
.reviews-data-table th {
  background: transparent !important;
  color: var(--theme-muted) !important;
  border-color: var(--theme-border-soft) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

td,
.reviews-data-table td {
  color: var(--theme-text) !important;
  border-color: var(--theme-table-row-border) !important;
}

tbody tr:nth-child(even) td {
  background: var(--theme-table-row-alt-bg) !important;
}

tbody tr:hover td {
  background: var(--theme-table-row-hover-bg) !important;
}

.reviews-data-table tbody tr {
  background: var(--theme-table-row-bg) !important;
  box-shadow: none !important;
}

.reviews-data-table tbody tr:nth-child(even) {
  background: var(--theme-table-row-alt-bg) !important;
}

.reviews-data-table tbody tr:hover {
  background: var(--theme-table-row-hover-bg) !important;
  box-shadow: none !important;
}

.reviews-data-table td:first-child {
  border-inline-start: 1px solid var(--theme-table-row-border) !important;
  border-radius: var(--theme-table-radius) 0 0 var(--theme-table-radius) !important;
}

.reviews-data-table td:last-child {
  border-right: 1px solid var(--theme-table-row-border) !important;
  border-radius: 0 var(--theme-table-radius) var(--theme-table-radius) 0 !important;
}

.preference-switcher {
  border-radius: 999px !important;
  padding: 6px 8px !important;
  box-shadow: var(--theme-shadow-card) !important;
}

.preference-title {
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.shell-status .status {
  border-color: var(--theme-border-soft) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-muted) !important;
  box-shadow: var(--theme-shadow-card) !important;
}

.shell-status .status.ok {
  color: var(--theme-success) !important;
}

.shell-status .status.error {
  color: var(--theme-danger) !important;
}

.merchant-hero-panel,
.merchant-hero-primary,
.merchant-hero-guide,
.page-title-copy,
.page-title-side,
.merchant-hero-panel:hover,
.merchant-hero-primary:hover,
.merchant-hero-guide:hover {
  background-color: var(--theme-surface) !important;
  border: 1px solid var(--theme-border-soft) !important;
  box-shadow: var(--theme-shadow-card) !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
  cursor: default !important;
}

.merchant-hero-primary::before,
.merchant-hero-primary::after,
.merchant-hero-guide::before,
.merchant-hero-guide::after,
.page-title-copy::before,
.page-title-copy::after,
.page-title-side::before,
.page-title-side::after {
  display: none !important;
}

.todo-summary-card,
.todo-summary-card.tone-slate,
.todo-summary-card.tone-steel,
.todo-summary-card.tone-navy,
.todo-summary-card.tone-indigo,
.todo-summary-card.tone-graphite,
.todo-summary-card.is-active {
  min-height: 116px !important;
  display: grid !important;
  grid-template-rows: auto 1fr auto !important;
  gap: 8px !important;
  padding: 16px !important;
  border: 1px solid var(--theme-border-soft) !important;
  border-radius: var(--theme-radius-card) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  box-shadow: none !important;
}

.todo-summary-card strong {
  align-self: center !important;
  color: var(--theme-warning) !important;
  font-family: -apple-system, "Segoe UI", sans-serif !important;
  font-size: 36px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

.todo-summary-card span {
  color: var(--theme-text) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

.todo-summary-card p,
.todo-summary-card em {
  align-self: end !important;
  margin: 0 !important;
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.25 !important;
}

.todo-waterfall-list {
  background: var(--theme-surface) !important;
}

.todo-flow-item,
.sent-note-item,
.completed-note-item,
.my-note-item {
  border-color: var(--theme-border-soft) !important;
  border-radius: var(--theme-radius-card) !important;
  background: var(--theme-surface) !important;
  box-shadow: none !important;
}

.todo-flow-item:nth-child(even) {
  background: var(--theme-surface-high) !important;
}

.todo-flow-item:hover {
  background: var(--theme-surface-highest) !important;
}

.todo-note-priority-normal,
.my-note-priority-normal {
  border-left: 4px solid var(--theme-border-strong) !important;
}

.todo-note-priority-important,
.my-note-priority-important {
  border-left: 4px solid var(--theme-warning) !important;
}

.todo-note-priority-urgent,
.my-note-priority-urgent {
  border-left: 4px solid var(--theme-danger) !important;
}

.todo-flow-tags span,
.todo-note-priority-important .todo-flow-tags span:last-child,
.my-note-priority-important > div > span {
  border-color: var(--theme-border-soft) !important;
  background: var(--theme-surface-high) !important;
  color: var(--theme-muted) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.todo-flow-item .todo-note-case-context {
  color: var(--theme-text) !important;
  font-weight: 650 !important;
}

.todo-note-priority-important .todo-flow-tags span:last-child,
.my-note-priority-important > div > span {
  border-color: var(--theme-warning-border) !important;
  background: var(--theme-warning-soft) !important;
  color: var(--theme-warning) !important;
}

.review-policy-options span,
.review-policy-options input:checked + span {
  box-shadow: none !important;
}

.review-policy-options span {
  border-color: var(--theme-border) !important;
  background: var(--theme-input-bg) !important;
  color: var(--theme-text) !important;
}

.review-policy-options input:checked + span {
  border-color: var(--theme-primary) !important;
  background: var(--theme-primary-soft) !important;
  color: var(--theme-primary) !important;
}

.card-section-divider {
  height: 1px !important;
  border-radius: 0 !important;
  background-color: var(--theme-border-soft) !important;
  box-shadow: none !important;
}

.field-help {
  margin: 0 !important;
  color: var(--theme-muted) !important;
  background: transparent !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
  box-shadow: none !important;
}

.dashboard-home-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr) !important;
  gap: 0 !important;
  align-items: stretch !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.dashboard-home-copy {
  min-height: 236px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
  align-content: center !important;
  justify-items: start !important;
  padding: 32px 36px !important;
  border-right: 1px solid var(--theme-border-soft) !important;
}

.dashboard-home-copy h3 {
  max-width: 680px !important;
  margin: 0 !important;
  color: var(--theme-text) !important;
  font-size: 32px !important;
  font-weight: 760 !important;
  line-height: 1.16 !important;
  letter-spacing: 0 !important;
}

.dashboard-home-copy > p {
  max-width: 640px !important;
  margin: 0 !important;
  color: var(--theme-muted) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
}

.dashboard-note-grid {
  width: 100%;
  max-width: 640px;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0 !important;
  margin-top: 8px !important;
  border-top: 1px solid var(--theme-border-soft) !important;
  border-bottom: 1px solid var(--theme-border-soft) !important;
}

.dashboard-note-card {
  min-width: 0 !important;
  min-height: 74px !important;
  display: grid !important;
  align-content: center !important;
  gap: 6px !important;
  padding: 14px 18px !important;
  border: 0 !important;
  border-right: 1px solid var(--theme-border-soft) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.dashboard-note-card:last-child {
  border-right: 0 !important;
}

.dashboard-note-card span {
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
}

.dashboard-note-card strong {
  color: var(--theme-text) !important;
  font-size: 18px !important;
  font-weight: 760 !important;
  line-height: 1.2 !important;
}

.dashboard-hero-metrics {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1px !important;
  background: var(--theme-border-soft) !important;
}

.dashboard-metric-card,
.dashboard-metric-card.dashboard-metric-sea,
.dashboard-metric-card.dashboard-metric-gold,
.dashboard-metric-card.dashboard-metric-rose {
  min-height: 110px !important;
  display: grid !important;
  align-content: center !important;
  gap: 7px !important;
  padding: 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--theme-surface) !important;
  box-shadow: none !important;
}

.dashboard-metric-card span,
.dashboard-month-chart-head span,
.dashboard-month-legend span,
.dashboard-month-line-meta span {
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.dashboard-metric-card strong {
  color: var(--theme-text) !important;
  font-size: 34px !important;
  font-weight: 760 !important;
  line-height: .95 !important;
}

.dashboard-metric-card small {
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
}

.dashboard-after-sales {
  width: 100%;
  max-width: 640px;
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.dashboard-after-sales-head {
  display: grid;
  gap: 4px;
}

.dashboard-after-sales-head span {
  color: var(--theme-primary);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

.dashboard-after-sales-head strong {
  color: var(--theme-text);
  font-size: 18px;
  font-weight: 760;
  line-height: 1.2;
}

.dashboard-after-sales-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--theme-border-soft);
  border-bottom: 1px solid var(--theme-border-soft);
}

.dashboard-after-sales-grid article {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border-right: 1px solid var(--theme-border-soft);
  background: transparent;
}

.dashboard-after-sales-grid article:last-child {
  border-right: 0;
}

.dashboard-after-sales-grid span {
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

.dashboard-after-sales-grid strong {
  color: var(--theme-text);
  font-size: 26px;
  font-weight: 760;
  line-height: 1;
}

.dashboard-after-sales-grid small {
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
}

.dashboard-mini-card-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 74px;
  gap: 12px;
  margin-top: 14px;
  align-items: stretch;
}

.dashboard-mini-card {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  align-content: end;
  gap: 7px;
  grid-column: span 1;
  grid-row: span 2;
  padding: 16px;
  border: 1px solid var(--theme-border-soft);
  background: var(--theme-surface);
}

.dashboard-mini-card-feature {
  grid-column: span 2;
  grid-row: span 2;
  padding: 20px;
}

.dashboard-mini-card-wide {
  grid-column: span 2;
}

.dashboard-mini-card-tall {
  grid-row: span 2;
}

.dashboard-mini-card:nth-child(11),
.dashboard-mini-card:nth-child(15),
.dashboard-mini-card:nth-child(20) {
  grid-column: span 2;
}

.dashboard-mini-card span {
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

.dashboard-mini-card strong {
  color: var(--theme-text);
  font-size: 25px;
  font-weight: 760;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.dashboard-mini-card-feature strong {
  font-size: 34px;
}

.dashboard-mini-card small {
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
}

#dashboardMonthHero,
#merchantDashboardMonthHero {
  margin-top: 18px !important;
}

.dashboard-home-hero-reverse {
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr) !important;
}

.dashboard-home-hero-reverse .dashboard-home-copy {
  border-right: 0 !important;
  border-left: 1px solid var(--theme-border-soft) !important;
}

.dashboard-month-chart {
  min-height: 220px !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 18px !important;
  padding: 24px !important;
  background: var(--theme-surface) !important;
}

.dashboard-month-chart-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 14px !important;
}

.dashboard-month-chart-head strong {
  display: block !important;
  margin-top: 6px !important;
  color: var(--theme-text) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}

.dashboard-month-legend {
  flex: 0 0 auto !important;
  display: inline-grid !important;
  grid-template-columns: auto auto auto auto !important;
  gap: 7px !important;
  align-items: center !important;
  padding: 8px 10px !important;
  border: 1px solid var(--theme-border-soft) !important;
  border-radius: var(--theme-radius-card) !important;
  background: var(--theme-surface-high) !important;
}

.dashboard-month-legend i,
.dashboard-month-legend b {
  width: 10px !important;
  height: 10px !important;
  display: inline-block !important;
  border-radius: 2px !important;
}

.dashboard-month-legend i {
  background: var(--theme-primary) !important;
}

.dashboard-month-legend b {
  background: var(--theme-border-strong) !important;
}

.dashboard-month-line-chart {
  min-height: 126px !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  gap: 8px !important;
}

.dashboard-month-line-chart svg {
  width: 100% !important;
  min-height: 142px !important;
  display: block !important;
  overflow: visible !important;
}

.dashboard-month-grid line {
  stroke: var(--theme-border-soft) !important;
  stroke-width: 1 !important;
}

.dashboard-month-line {
  fill: none !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  stroke-width: 3 !important;
}

.dashboard-month-line.current {
  stroke: var(--theme-primary) !important;
}

.dashboard-month-line.previous {
  stroke: var(--theme-border-strong) !important;
  stroke-width: 2 !important;
}

.dashboard-month-points circle {
  pointer-events: none !important;
}

.dashboard-month-points .current {
  fill: var(--theme-primary) !important;
}

.dashboard-month-points .previous {
  fill: var(--theme-border-strong) !important;
}

.dashboard-month-hitpoint {
  cursor: pointer !important;
  outline: none !important;
}

.dashboard-month-hitpoint rect {
  fill: transparent !important;
}

.dashboard-month-hitpoint line {
  opacity: 0 !important;
  stroke: var(--theme-primary) !important;
  stroke-width: 1 !important;
  stroke-dasharray: 3 3 !important;
  pointer-events: none !important;
}

.dashboard-month-hitpoint foreignObject {
  opacity: 0 !important;
  pointer-events: none !important;
}

.dashboard-month-hitpoint:hover line,
.dashboard-month-hitpoint:focus line {
  opacity: .65 !important;
}

.dashboard-month-hitpoint:hover foreignObject,
.dashboard-month-hitpoint:focus foreignObject {
  opacity: 1 !important;
}

.dashboard-month-tooltip {
  box-sizing: border-box !important;
  display: grid !important;
  gap: 2px !important;
  min-height: 68px !important;
  padding: 7px 9px !important;
  border: 1px solid var(--theme-border-strong, var(--line)) !important;
  background: rgba(255, 253, 248, .96) !important;
  color: var(--theme-text, var(--text)) !important;
  font-size: 10px !important;
  line-height: 1.25 !important;
  box-shadow: 0 8px 18px rgba(36, 48, 60, .12) !important;
}

[data-theme="dark"] .dashboard-month-tooltip {
  background: rgba(31, 35, 42, .96) !important;
}

.dashboard-month-tooltip strong {
  color: var(--theme-primary, var(--brand)) !important;
  font-size: 11px !important;
  font-weight: 780 !important;
}

.dashboard-month-tooltip span {
  color: var(--theme-muted, var(--muted)) !important;
  font-weight: 620 !important;
}

.dashboard-month-line-chart text {
  fill: var(--theme-muted) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
}

.modal-backdrop .confirm-modal,
.confirm-modal,
.order-confirm-modal,
.notice-letter-modal,
[role="dialog"],
.modal {
  border-radius: var(--theme-radius-dialog) !important;
}

.modal-backdrop .confirm-modal *,
.confirm-modal *,
.order-confirm-modal *,
.notice-letter-modal *,
[role="dialog"] *,
.modal * {
  box-shadow: none !important;
}

.radio,
.checkbox,
input[type="radio"],
input[type="checkbox"],
.permission-menu-card,
.permission-menu-card .check-row,
.permission-list .check-row,
.check-row {
  box-shadow: none !important;
}

.after-sales-workbench {
  display: grid;
  gap: 16px;
}

.after-sales-mode-tabs {
  display: inline-flex;
  gap: 6px;
  width: fit-content;
  padding: 5px;
  margin-bottom: 16px;
  border: 1px solid var(--theme-border-soft, var(--line));
  border-radius: var(--radius-panel);
  background: var(--theme-surface, var(--surface));
}

.after-sales-mode-tabs button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.after-sales-mode-tabs button.active {
  background: var(--theme-primary);
  color: var(--theme-on-primary);
  box-shadow: none;
}

.after-sales-overview {
  display: grid;
  gap: 16px;
}

.after-sales-overview-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.after-sales-overview-metric {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--theme-border-soft, var(--line));
  border-radius: var(--radius-panel);
  background: var(--theme-surface, var(--surface));
}

.after-sales-overview-metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.after-sales-overview-metric strong {
  color: var(--text);
  font-size: 25px;
  font-weight: 820;
  line-height: 1;
  word-break: break-word;
}

.after-sales-overview-metric small {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.35;
}

.after-sales-overview-metric.primary {
  border-color: var(--theme-primary);
  background: var(--theme-primary-soft);
}

.after-sales-overview-metric.success {
  border-color: var(--theme-success-border);
  background: var(--theme-success-soft);
}

.after-sales-overview-metric.warn {
  border-color: var(--theme-warning-border);
  background: var(--theme-warning-soft);
}

.after-sales-overview-metric.danger {
  border-color: var(--theme-danger-border);
  background: var(--theme-danger-soft);
}

.after-sales-overview-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.38fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.after-sales-overview-side,
.after-sales-overview-main {
  min-width: 0;
}

.after-sales-overview-filter {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.after-sales-overview-filter label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.after-sales-overview-filter input,
.after-sales-overview-filter select {
  width: 100%;
}

.after-sales-overview-filter .btn {
  margin-top: 8px;
}

.after-sales-overview-buckets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 16px 18px;
  border-bottom: 1px solid var(--theme-border-soft, var(--line));
}

.after-sales-overview-buckets button {
  min-height: var(--theme-control-height);
  padding: 0 18px;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface-high);
  color: var(--theme-muted);
  font-size: 14px;
  font-weight: 820;
}

.after-sales-overview-buckets button.active {
  border-color: var(--theme-primary);
  background: var(--theme-primary-soft);
  color: var(--theme-primary);
}

.after-sales-todo-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.after-sales-todo-form label:nth-of-type(3),
.after-sales-todo-form .after-sales-actions {
  grid-column: 1 / -1;
}

.after-sales-collapsible-filter {
  overflow: hidden;
}

.after-sales-collapsible-filter summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  cursor: pointer;
  list-style: none;
}

.after-sales-collapsible-filter summary::-webkit-details-marker {
  display: none;
}

.after-sales-collapsible-filter summary span {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.after-sales-collapsible-filter summary small {
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.after-sales-collapsible-filter summary strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 780;
}

.after-sales-collapsible-filter summary em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.after-sales-collapsible-filter summary b {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--theme-border-soft, var(--line));
  border-radius: var(--radius-control);
  color: var(--brand);
  font-size: 13px;
  font-weight: 780;
}

.after-sales-collapsible-filter[open] summary {
  border-bottom: 1px solid var(--theme-border-soft, var(--line));
}

.after-sales-collapsible-filter[open] summary b {
  color: var(--muted);
}

.after-sales-collapsible-filter[open] summary b::before {
  content: "收起";
}

.after-sales-collapsible-filter[open] summary b {
  font-size: 0;
}

.after-sales-collapsible-filter[open] summary b::before {
  font-size: 13px;
}

.after-sales-context-collapse summary {
  padding: 16px;
}

.after-sales-context-collapse summary strong {
  font-size: 17px;
}

.after-sales-context-collapse summary em {
  font-size: 12px;
}

.after-sales-static-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--theme-border-soft, var(--line));
}

.after-sales-static-head span {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.after-sales-static-head small {
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.after-sales-static-head strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 780;
}

.after-sales-static-head em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.after-sales-head-action {
  flex: 0 0 auto;
  min-width: 0 !important;
  min-height: 34px !important;
  padding: 0 14px !important;
  border-radius: var(--radius-control) !important;
  font-size: 13px !important;
  font-weight: 780 !important;
}

.after-sales-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--theme-space-3);
  justify-content: flex-end;
  align-items: center;
  margin-top: var(--theme-space-3);
}

.after-sales-actions .btn {
  width: auto;
  min-width: 112px;
  min-height: var(--theme-control-height) !important;
}

.after-sales-actions select {
  width: auto;
  min-width: 136px;
  max-width: 220px;
  min-height: var(--theme-control-height) !important;
}

.after-sales-risk-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.after-sales-risk-list article {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--theme-border-soft, var(--line));
  border-radius: var(--radius-control);
  background: var(--theme-surface-high, var(--input));
}

.after-sales-risk-list strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 780;
}

.after-sales-risk-list span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.after-sales-overview-table th,
.after-sales-overview-table td {
  white-space: nowrap;
}

.after-sales-command-bar {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--theme-border-soft, var(--line));
  border-radius: var(--radius-panel);
  background: var(--theme-surface, var(--surface));
}

.after-sales-create-entry {
  grid-template-columns: 1fr;
  align-items: start;
}

.after-sales-create-copy {
  display: grid;
  gap: 8px;
}

.after-sales-quick-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.72fr) auto;
  gap: 12px;
  align-items: end;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--theme-border-soft);
}

.after-sales-quick-search > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.after-sales-quick-search h3 {
  margin: 0;
}

.after-sales-quick-search p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.after-sales-quick-search label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.after-sales-quick-search .btn {
  min-height: var(--theme-control-height);
}

.after-sales-command-bar h3 {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 760;
  letter-spacing: 0;
}

.after-sales-create-copy p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.after-sales-order-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.45fr) auto auto;
  gap: 10px;
  align-items: center;
}

.after-sales-create-form {
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 0.34fr) minmax(150px, 0.28fr);
  align-items: end;
}

.after-sales-create-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.after-sales-create-form label.full {
  grid-column: 1 / -1;
}

.after-sales-create-form textarea {
  min-height: 92px;
  resize: vertical;
}

.after-sales-create-actions {
  grid-column: 1 / -1;
}

.after-sales-order-preview {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(120px, 0.32fr));
  gap: 12px;
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px solid var(--theme-success-border);
  border-radius: var(--radius-panel);
  background: var(--theme-success-soft);
}

.after-sales-create-entry .after-sales-order-preview {
  margin-top: -2px;
}

.after-sales-create-compact {
  margin-bottom: 12px;
  padding: 16px;
}

.after-sales-create-compact .after-sales-quick-search {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.after-sales-create-compact .after-sales-quick-search .btn {
  justify-self: end;
}

.after-sales-create-compact .after-sales-create-copy {
  gap: 6px;
}

.after-sales-create-compact .after-sales-command-bar h3,
.after-sales-create-compact h3 {
  font-size: 17px;
}

.after-sales-create-compact .after-sales-create-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.after-sales-create-compact .after-sales-create-form > label:first-child {
  grid-column: 1 / -1;
}

.after-sales-create-compact .after-sales-create-form .after-sales-half-field {
  grid-column: auto;
}

.after-sales-create-compact .after-sales-create-actions {
  justify-content: flex-end;
  margin-top: 2px;
}

.after-sales-create-compact .after-sales-create-actions .btn {
  min-width: 104px;
}

.after-sales-create-compact .after-sales-order-preview {
  grid-template-columns: 1fr;
}

.after-sales-order-preview > div,
.after-sales-order-preview dl {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 0;
}

.after-sales-order-preview strong,
.after-sales-order-preview dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 780;
  line-height: 1.35;
  word-break: break-word;
}

.after-sales-order-preview span,
.after-sales-order-preview dt {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.after-sales-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(420px, 1.35fr) minmax(300px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.after-sales-queue,
.after-sales-context {
  min-width: 0;
}

.after-sales-context {
  display: grid;
  gap: 16px;
  align-content: start;
}

.after-sales-panel {
  overflow: hidden;
  box-shadow: none !important;
}

.after-sales-panel + .after-sales-panel {
  margin-top: 16px;
}

.after-sales-filter-row,
.after-sales-type-filter,
.after-sales-composer-tabs,
.after-sales-composer-actions,
.after-sales-case-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.after-sales-filter-row {
  padding: 14px 16px 12px;
}

.after-sales-filter-row button,
.after-sales-type-filter span,
.after-sales-composer-tabs button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--theme-border-soft, var(--line));
  border-radius: var(--radius-control);
  background: var(--theme-surface-high, var(--input));
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.after-sales-filter-row button.active,
.after-sales-composer-tabs button.active {
  border-color: var(--theme-primary);
  background: var(--theme-primary-soft);
  color: var(--theme-primary);
}

.after-sales-type-filter {
  padding: 0 16px 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.after-sales-type-filter span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.after-sales-case-list {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.after-sales-completed-queue {
  margin-top: 16px;
}

.after-sales-completed-queue > summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 18px 16px;
  cursor: default;
  list-style: none;
}

.after-sales-completed-queue > summary::-webkit-details-marker {
  display: none;
}

.after-sales-completed-queue > summary span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.after-sales-completed-queue > summary small,
.after-sales-completed-queue > summary em {
  color: var(--theme-muted);
  font-style: normal;
  font-size: 12px;
  line-height: 1.45;
}

.after-sales-completed-queue > summary strong {
  color: var(--theme-text);
  font-size: 18px;
  font-weight: 820;
}

.after-sales-completed-queue > summary b {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface-high);
  color: var(--theme-primary);
  font-size: 13px;
  font-weight: 820;
  cursor: pointer;
}

.after-sales-completed-queue[open] > summary b {
  color: var(--theme-text);
}

.after-sales-completed-queue[open] > summary b {
  font-size: 0;
}

.after-sales-completed-queue[open] > summary b::after {
  content: "收起";
  font-size: 13px;
}

.after-sales-completed-case {
  background: color-mix(in srgb, var(--theme-surface-high) 76%, var(--theme-bg)) !important;
}

.after-sales-completed-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 16px 16px;
}

.after-sales-completed-actions .btn {
  width: auto !important;
}

.after-sales-filter-row + .after-sales-type-filter {
  padding-top: 0;
}

.after-sales-queue-status {
  align-items: center;
}

.after-sales-queue-status button {
  flex: 0 0 auto;
}

.after-sales-queue-types {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.after-sales-queue-types span {
  width: auto;
  min-height: 30px;
  padding: 0 12px;
}

.after-sales-case {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--theme-border-soft, var(--line));
  border-radius: var(--radius-panel);
  background: var(--theme-surface-high, var(--surface));
  color: inherit;
  text-align: left;
}

.after-sales-case:hover,
.after-sales-case.active {
  border-color: var(--theme-primary);
  background: var(--theme-primary-soft);
  transform: none;
}

.after-sales-completed-notice {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin: 0 0 22px;
  padding: 26px 34px;
  border: 1px solid color-mix(in srgb, var(--theme-success, #047857) 18%, var(--theme-border));
  background: var(--theme-success-soft, #ecfdf3);
  color: var(--theme-text);
}

.after-sales-completed-notice div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.after-sales-completed-notice strong {
  color: var(--theme-success, #047857);
  font-size: 18px;
  font-weight: 860;
}

.after-sales-completed-notice p {
  margin: 0;
  color: var(--theme-muted);
  font-size: 13px;
  line-height: 1.55;
}

.after-sales-completed-notice .btn {
  flex: 0 0 auto;
  width: auto !important;
}

.after-sales-workbench.is-completed-case .after-sales-composer,
.after-sales-workbench.is-completed-case .after-sales-logistics-panel,
.after-sales-workbench.is-completed-case .after-sales-expense-panel,
.after-sales-workbench.is-completed-case .after-sales-todo-panel {
  filter: grayscale(1);
  opacity: 0.58;
  cursor: not-allowed;
}

.after-sales-workbench.is-completed-case .after-sales-composer button,
.after-sales-workbench.is-completed-case .after-sales-composer select,
.after-sales-workbench.is-completed-case .after-sales-composer textarea,
.after-sales-workbench.is-completed-case .after-sales-logistics-panel button,
.after-sales-workbench.is-completed-case .after-sales-logistics-panel input,
.after-sales-workbench.is-completed-case .after-sales-logistics-panel select,
.after-sales-workbench.is-completed-case .after-sales-expense-panel button,
.after-sales-workbench.is-completed-case .after-sales-expense-panel input,
.after-sales-workbench.is-completed-case .after-sales-todo-panel button,
.after-sales-workbench.is-completed-case .after-sales-todo-panel select,
.after-sales-workbench.is-completed-case .after-sales-todo-panel textarea {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-high) !important;
  color: var(--theme-muted) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

.after-sales-workbench.is-completed-case .after-sales-close-panel {
  filter: grayscale(1);
}

.after-sales-workbench.is-completed-case [data-after-sales-reopen] {
  filter: none;
  opacity: 1;
  pointer-events: auto;
}

.after-sales-readonly-collapse {
  margin-top: 12px;
  border: 1px solid var(--theme-border-soft, var(--line));
  background: color-mix(in srgb, var(--theme-surface-high, var(--input)) 72%, var(--theme-bg, transparent));
}

.after-sales-context > .after-sales-readonly-collapse:first-child {
  margin-top: 0;
}

.after-sales-readonly-collapse > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  list-style: none;
  cursor: pointer;
}

.after-sales-readonly-collapse > summary::-webkit-details-marker {
  display: none;
}

.after-sales-readonly-collapse > summary span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.after-sales-readonly-collapse > summary strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
}

.after-sales-readonly-collapse > summary em {
  color: var(--theme-muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.after-sales-readonly-collapse > summary b {
  flex: 0 0 auto;
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 760;
}

.after-sales-readonly-collapse[open] > summary {
  border-bottom: 1px solid var(--theme-border-soft, var(--line));
}

.after-sales-readonly-collapse[open] > summary b {
  color: var(--theme-primary);
}

.after-sales-readonly-collapse[open] > summary b::before {
  content: "收起";
}

.after-sales-readonly-collapse[open] > summary b {
  font-size: 0;
}

.after-sales-readonly-collapse[open] > summary b::before {
  font-size: 12px;
}

.after-sales-readonly-collapse-body {
  padding: 2px 14px 14px;
}

.after-sales-readonly-collapse-body .after-sales-composer,
.after-sales-readonly-collapse-body .after-sales-logistics-panel,
.after-sales-readonly-collapse-body .after-sales-expense-panel,
.after-sales-readonly-collapse-body .after-sales-todo-panel {
  margin-top: 0;
}

.after-sales-case-top,
.after-sales-case-meta,
.after-sales-timeline-head,
.after-sales-shipping-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.after-sales-case-top strong,
.after-sales-case-title {
  color: var(--text);
  font-weight: 850;
}

.after-sales-case-top strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.after-sales-case-title {
  font-size: 14px;
}

.after-sales-case-copy {
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  line-height: 1.48;
}

.after-sales-priority,
.after-sales-type,
.after-sales-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-control);
  font-size: 11px;
  font-weight: 820;
  white-space: nowrap;
}

.after-sales-priority {
  border: 1px solid var(--theme-warning-border);
  background: var(--theme-warning-soft);
  color: var(--theme-warning);
}

.after-sales-type {
  border: 1px solid var(--theme-primary);
  background: var(--theme-primary-soft);
  color: var(--theme-primary);
}

.after-sales-type.claim,
.after-sales-type.chargeback {
  border-color: var(--theme-danger-border);
  background: var(--theme-danger-soft);
  color: var(--theme-danger);
}

.after-sales-type.refused,
.after-sales-type.lost {
  border-color: var(--theme-warning-border);
  background: var(--theme-warning-soft);
  color: var(--theme-warning);
}

.after-sales-status {
  border: 1px solid var(--theme-success-border);
  background: var(--theme-success-soft);
  color: var(--theme-success);
}

.after-sales-status.pending {
  border-color: var(--theme-warning-border);
  background: var(--theme-warning-soft);
  color: var(--theme-warning);
}

.after-sales-status.done {
  border-color: var(--theme-border-soft);
  background: var(--theme-surface-high);
  color: var(--muted);
}

.after-sales-main-panel {
  padding: 18px;
}

.after-sales-case-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding-top: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--theme-border-soft, var(--line));
}

.after-sales-case-header h3 {
  margin: 4px 0 8px;
  color: var(--text);
  font-size: 22px;
  font-weight: 780;
  letter-spacing: 0;
}

.after-sales-case-header p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.56;
}

.after-sales-case-owner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.after-sales-case-owner span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--theme-border-soft, var(--line));
  border-radius: var(--radius-control);
  background: var(--theme-surface-high, var(--input));
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.after-sales-order-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(90px, 0.45fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--theme-border-soft, var(--line));
  border-radius: var(--radius-panel);
  background: var(--theme-surface-high, var(--input));
}

.after-sales-order-strip.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  gap: 8px;
  padding: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.after-sales-order-tools {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  padding-bottom: 2px;
}

.after-sales-queue-pager .btn {
  width: auto !important;
  min-width: 0 !important;
  min-height: var(--theme-control-height) !important;
  padding-inline: 16px !important;
}

.after-sales-queue-pager .pager {
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 14px 14px 0;
}

.after-sales-queue-pager .pager .muted {
  font-size: 12px;
  white-space: nowrap;
}

.view-afterSales .status:not(.ok):not(.error),
.view-afterSales .status.compact:not(.ok):not(.error) {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.after-sales-contact-modal .field + .field {
  margin-top: 12px;
}

.after-sales-order-strip.compact dl {
  gap: 3px;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid var(--theme-border-soft, var(--line));
  border-radius: var(--radius-panel);
  background: var(--theme-surface-high, var(--input));
}

.after-sales-order-strip.compact dl.full {
  grid-column: 1 / -1;
}

.after-sales-order-strip.compact dl.full dd {
  white-space: normal;
}

.after-sales-order-strip dl {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 0;
}

.after-sales-order-strip dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.after-sales-order-strip dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.after-sales-logistics-flow-panel {
  overflow: hidden;
}

.after-sales-logistics-flow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.after-sales-logistics-flow-column {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.after-sales-logistics-flow-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--theme-border-soft, var(--line));
  background: var(--theme-surface-high, var(--input));
}

.after-sales-logistics-flow-title strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 780;
}

.after-sales-logistics-flow-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.after-sales-logistics-flow-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.after-sales-logistics-flow-list article {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--theme-border-soft, var(--line));
  background: var(--theme-surface, var(--surface));
}

.after-sales-logistics-flow-item {
  grid-template-columns: minmax(0, 1fr);
}

.after-sales-logistics-flow-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.after-sales-logistics-direction {
  min-width: 42px;
  padding: 5px 8px;
  border: 1px solid var(--theme-border-soft, var(--line));
  background: var(--theme-surface-high, var(--input));
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  text-align: center;
}

.after-sales-logistics-direction.return {
  color: var(--theme-warning);
}

.after-sales-logistics-flow-list b {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.after-sales-logistics-flow-list strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  font-weight: 820;
  line-height: 1.3;
}

.after-sales-logistics-flow-list small,
.after-sales-logistics-flow-list p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 660;
  line-height: 1.45;
}

.after-sales-logistics-status-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.after-sales-logistics-status-steps button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--theme-border-soft, var(--line));
  background: var(--theme-surface-high, var(--input));
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}

.after-sales-logistics-status-steps button span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 14px;
  height: 14px;
  border: 1px solid var(--theme-border-soft, var(--line));
  background: var(--theme-surface, var(--surface));
  color: transparent;
  font-size: 11px;
  font-weight: 900;
}

.after-sales-logistics-status-steps button.done {
  border-color: var(--theme-success-border, var(--theme-border-soft));
  background: var(--theme-success-soft, var(--theme-surface-high));
  color: var(--text);
}

.after-sales-logistics-status-steps button.done span {
  border-color: var(--theme-success-border, var(--theme-border-soft));
  background: var(--theme-success, var(--theme-primary));
  color: var(--theme-on-primary, #fff);
}

.after-sales-logistics-status-steps button.next {
  border-color: var(--theme-warning-border, var(--theme-border-strong));
  background: var(--theme-surface, var(--surface));
  color: var(--text);
  cursor: pointer;
}

.after-sales-logistics-status-steps button:disabled:not(.done) {
  opacity: 0.52;
}

.after-sales-composer {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--theme-border-soft, var(--line));
  border-radius: var(--radius-panel);
  background: var(--theme-surface-high, var(--input));
}

.after-sales-composer textarea {
  resize: vertical;
}

.after-sales-logistics-panel,
.after-sales-expense-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 22px 14px 14px;
  border: 1px solid var(--theme-border-soft, var(--line));
  border-radius: var(--radius-panel);
  background: var(--theme-surface-high, var(--input));
}

.after-sales-logistics-panel {
  opacity: 0.96;
}

.after-sales-expense-panel {
  opacity: 0.9;
  background: color-mix(in srgb, var(--theme-surface-high, var(--input)) 72%, transparent);
}

.after-sales-logistics-grid,
.after-sales-expense-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 10px;
}

.after-sales-expense-grid {
  grid-template-columns: minmax(140px, 0.42fr) minmax(0, 1fr);
}

.after-sales-logistics-grid label,
.after-sales-expense-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.after-sales-logistics-grid label.full,
.after-sales-expense-grid label.full {
  grid-column: 1 / -1;
}

.after-sales-logistics-grid span,
.after-sales-expense-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.after-sales-logistics-actions,
.after-sales-expense-actions {
  justify-content: flex-end;
}

.after-sales-secondary-save {
  border-color: var(--theme-border-strong, #d6cec0) !important;
  background: var(--theme-surface, #fff) !important;
  color: var(--theme-text, #24313f) !important;
  box-shadow: none !important;
}

.after-sales-secondary-save:hover {
  border-color: var(--theme-border-strong, #d6cec0) !important;
  background: var(--theme-surface-high, var(--input)) !important;
  color: var(--theme-text, #24313f) !important;
}

.after-sales-quick-kind {
  display: flex;
  flex-wrap: wrap;
  gap: var(--theme-space-2);
  margin-bottom: var(--theme-space-3);
}

.after-sales-quick-kind button {
  min-height: var(--theme-control-height-sm);
  padding: 0 12px;
  border: 1px solid var(--theme-border-soft, var(--line));
  border-radius: var(--radius-control);
  background: var(--theme-surface, var(--surface));
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.after-sales-quick-kind button.active {
  border-color: var(--theme-primary);
  background: var(--theme-primary-soft);
  color: var(--theme-primary);
}

.after-sales-actions [data-after-sales-kind].active {
  border-color: var(--theme-primary) !important;
  background: var(--theme-primary-soft) !important;
  color: var(--theme-primary) !important;
}

.after-sales-composer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--theme-space-3);
}

.after-sales-composer-actions select {
  width: auto;
  min-width: 0;
}

.after-sales-composer-actions input,
.after-sales-composer-actions .btn {
  width: auto;
  min-width: 0;
}

#afterSalesTimelineForm .after-sales-composer-actions:first-child {
  margin-bottom: 12px;
}

#afterSalesTimelineForm .after-sales-composer-actions:first-child select {
  min-width: 136px;
  max-width: 220px;
}

#afterSalesTimelineForm textarea {
  display: block;
  width: 100%;
}

#afterSalesTimelineForm .after-sales-composer-actions:last-child .btn {
  width: auto;
  min-width: 132px;
}

#afterSalesTimelineForm .after-sales-actions {
  justify-content: flex-end;
  align-items: center;
  margin-top: 10px;
}

#afterSalesTimelineForm .after-sales-actions select,
#afterSalesTimelineForm .after-sales-actions .btn {
  box-sizing: border-box;
  height: var(--theme-control-height) !important;
  min-height: var(--theme-control-height) !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-radius: var(--radius-control);
  line-height: calc(var(--theme-control-height) - 2px);
}

#afterSalesTimelineForm .after-sales-actions select {
  min-width: 150px;
  display: inline-flex;
  align-items: center;
  padding-left: 14px;
  padding-right: 38px;
  font-size: 14px;
  font-weight: 700;
}

#afterSalesTimelineForm .after-sales-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.after-sales-timeline {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-left: 10px;
}

.after-sales-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
}

.after-sales-timeline-item::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: -18px;
  left: 8px;
  width: 1px;
  background: var(--theme-border-soft, var(--line));
}

.after-sales-timeline-item:last-child::before {
  display: none;
}

.after-sales-timeline-dot {
  z-index: 1;
  width: 17px;
  height: 17px;
  margin-top: 4px;
  border: 3px solid var(--theme-surface, var(--surface));
  border-radius: 50%;
  background: var(--theme-primary);
  box-shadow: 0 0 0 1px var(--theme-primary-soft);
}

.after-sales-timeline-card {
  padding: 13px 14px;
  border: 1px solid var(--theme-border-soft, var(--line));
  border-radius: var(--radius-panel);
  background: var(--theme-surface, var(--surface));
}

.after-sales-timeline-head strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.after-sales-timeline-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.after-sales-timeline-card p {
  margin: 8px 0 0;
  color: var(--copy-muted, var(--muted));
  font-size: 13px;
  line-height: 1.62;
}

.after-sales-info-list {
  display: grid;
  gap: 10px;
  padding: 16px 16px 16px;
}

.after-sales-ai-body {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 18px;
  height: 100%;
  min-height: 0;
  padding: 0 28px 28px;
}

.after-sales-ai-dock {
  margin: 0 0 18px;
  overflow: hidden;
  color: var(--theme-text);
  border: 1px solid var(--theme-ai-border);
  border-radius: var(--theme-radius-card);
  background: color-mix(in srgb, var(--theme-primary) 5%, var(--theme-surface));
  box-shadow: var(--theme-shadow-card);
}

.after-sales-ai-dock[open] {
  height: 800px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.after-sales-ai-dock > summary {
  list-style: none;
  cursor: pointer;
}

.after-sales-ai-dock > summary::-webkit-details-marker {
  display: none;
}

.after-sales-ai-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 0;
  background: var(--theme-surface);
}

.after-sales-ai-head > div:first-child {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-align: left;
}

.after-sales-ai-head::before {
  content: "";
  flex: 0 0 3px;
  width: 3px;
  height: 24px;
  align-self: center;
  border-radius: 3px;
  background: var(--theme-primary);
}

.after-sales-ai-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 820;
  letter-spacing: 0;
}

.after-sales-ai-head p:not(.eyebrow) {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.after-sales-ai-head-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
}

.after-sales-ai-head-actions span {
  min-height: var(--theme-control-height);
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border: 1px solid var(--theme-ai-border);
  border-radius: 0;
  background: var(--theme-ai-chip-bg);
  color: var(--theme-ai-chip-text);
  font-size: 14px;
  font-weight: 820;
  box-shadow: none;
}

.after-sales-ai-head-actions .after-sales-ai-model-status {
  border-color: #a8d8c2;
  background: #e7f4ee;
  color: #176b4d;
}

.after-sales-ai-expand {
  width: auto !important;
  max-width: max-content !important;
  min-height: var(--theme-control-height) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid #c9d3e1 !important;
  padding: 0 20px !important;
  border-radius: 0 !important;
  background: #f3f6fa !important;
  color: #245c8f !important;
  font-size: 14px !important;
  font-weight: 820 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

.after-sales-ai-expand::before {
  content: "查看 AI 建议";
}

.after-sales-ai-dock[open] .after-sales-ai-expand::before {
  content: "收起 AI 建议";
}

.after-sales-ai-actions {
  display: flex;
  flex-wrap: wrap;
  align-self: end;
  gap: 12px;
}

.after-sales-ai-mode-indicator {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: var(--theme-control-height-sm) !important;
  padding: 8px 15px !important;
  border: 1px solid #bfd0dc !important;
  border-radius: 999px !important;
  background: #edf3f7 !important;
  color: #2f5f87 !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 760 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

.after-sales-ai-mode-indicator::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #2f5f87;
  box-shadow: 0 0 0 3px color-mix(in srgb, #2f5f87 16%, transparent);
}

body.theme-dark .after-sales-ai-mode-indicator {
  border-color: #385e78 !important;
  background: #202a36 !important;
  color: #ddecf7 !important;
}

body.theme-dark .after-sales-ai-mode-indicator::before {
  background: #afc7e8;
  box-shadow: 0 0 0 3px color-mix(in srgb, #afc7e8 18%, transparent);
}

.after-sales-ai-dialog {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: stretch;
  height: 100%;
  min-height: 260px;
  max-height: none;
  overflow-y: auto;
  padding: 22px;
  border: 1px solid var(--theme-border-soft);
  border-radius: var(--theme-radius-dialog);
  background: color-mix(in srgb, var(--theme-primary) 3%, var(--theme-surface-high));
  box-shadow: var(--theme-shadow-input);
  scrollbar-color: #8f8b83 transparent;
  scrollbar-width: auto;
}

.after-sales-ai-dialog::-webkit-scrollbar {
  width: 18px;
}

.after-sales-ai-dialog::-webkit-scrollbar-track {
  background: transparent;
}

.after-sales-ai-dialog::-webkit-scrollbar-thumb {
  min-height: 72px;
  border: 4px solid transparent;
  background-clip: content-box;
  border-radius: 0;
  background-color: #8f8b83;
}

.after-sales-ai-dialog::-webkit-scrollbar-thumb:hover {
  background-color: #706c65;
}

.after-sales-ai-message {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: min(78%, 760px);
  padding: 0;
}

.after-sales-ai-message.assistant {
  align-self: flex-start;
  padding-left: 34px;
}

.after-sales-ai-message.user {
  align-self: flex-end;
  align-items: flex-end;
  padding-right: 34px;
}

.after-sales-ai-message::before {
  position: absolute;
  top: 0;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--theme-border);
  border-radius: 50%;
  background: var(--theme-surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.after-sales-ai-message.assistant::before {
  left: 0;
  content: "AI";
  color: var(--theme-primary);
}

.after-sales-ai-message.user::before {
  right: 0;
  content: "我";
}

.after-sales-ai-message strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.after-sales-ai-message p {
  margin: 0;
  padding: 13px 15px;
  border: 1px solid var(--theme-border-soft);
  border-radius: 14px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.68;
  box-shadow: var(--theme-shadow-xs);
}

.after-sales-ai-message.assistant p {
  border-top-left-radius: 4px;
  background: color-mix(in srgb, var(--theme-primary) 6%, var(--theme-surface));
}

.after-sales-ai-message.user p {
  border-top-right-radius: 4px;
  border-color: color-mix(in srgb, var(--theme-primary) 26%, var(--theme-border-soft));
  background: color-mix(in srgb, var(--theme-primary) 8%, var(--theme-surface));
}

.after-sales-ai-message + .after-sales-ai-message {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.after-sales-ai-message ol {
  margin: 0;
  padding-left: 22px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
}

.after-sales-ai-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-self: end;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--theme-border-soft);
  border-radius: var(--theme-radius-dialog);
  background: var(--theme-ai-panel-bg);
}

.after-sales-ai-input textarea {
  min-height: 56px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  resize: vertical;
}

.after-sales-ai-input .btn {
  align-self: end;
  min-height: 46px !important;
  padding: 0 24px !important;
  border-radius: 999px !important;
}

.after-sales-ai-dock button:disabled,
.after-sales-ai-dock textarea:disabled {
  cursor: wait;
  opacity: 0.68;
}

.after-sales-info-list dl {
  display: grid;
  gap: 4px;
  margin: 0;
}

.after-sales-info-list dt,
.after-sales-note-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.after-sales-info-list dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 680;
  line-height: 1.45;
}

.after-sales-todo-form .after-sales-actions {
  margin-top: 8px;
  padding-bottom: 2px;
}

.after-sales-close-btn {
  border-color: var(--theme-danger-border) !important;
  background: transparent !important;
  color: var(--theme-danger, var(--danger)) !important;
}

.after-sales-close-btn:hover {
  border-color: var(--theme-danger, var(--danger)) !important;
  background: var(--theme-danger-soft, var(--danger-soft)) !important;
  color: var(--theme-danger, var(--danger)) !important;
}

.after-sales-close-panel-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.after-sales-close-panel-body span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.after-sales-close-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.after-sales-close-panel-body .after-sales-close-btn {
  width: 100%;
  min-height: 42px;
}

.after-sales-close-panel-body.is-done .after-sales-close-actions {
  justify-content: flex-start;
  gap: 12px;
}

.after-sales-close-panel-body.is-done .btn {
  width: auto !important;
  min-height: 42px;
}

.after-sales-closed-state,
.after-sales-closed-state:disabled {
  opacity: 1;
  cursor: default;
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-high) !important;
  color: var(--theme-muted) !important;
}

.after-sales-close-modal .field {
  display: grid;
  gap: 7px;
}

.after-sales-close-modal textarea {
  min-height: 104px;
}

.after-sales-timeline-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.after-sales-timeline-filter button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--theme-border-soft, var(--line));
  border-radius: var(--radius-control);
  background: var(--theme-surface-high, var(--input));
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.after-sales-timeline-filter button.active {
  border-color: var(--theme-primary);
  background: var(--theme-primary-soft);
  color: var(--theme-primary);
}

.after-sales-note-list {
  display: grid;
  gap: 10px;
  padding: 16px 16px 16px;
}

.after-sales-note-list article {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--theme-border-soft, var(--line));
  border-radius: var(--radius-panel);
  background: var(--theme-surface-high, var(--input));
}

.after-sales-note-headline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.after-sales-note-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid var(--theme-warning-border);
  border-radius: var(--radius-control);
  background: var(--theme-warning-soft);
  color: var(--theme-warning);
  font-size: 11px;
  font-weight: 780;
  white-space: nowrap;
}

.after-sales-note-status.done {
  border-color: var(--theme-success-border);
  background: var(--theme-success-soft);
  color: var(--theme-success);
}

.after-sales-note-list p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 640;
  line-height: 1.48;
}

@media (max-width: 980px) {
  .dashboard-home-hero,
  .dashboard-home-hero-reverse {
    grid-template-columns: 1fr !important;
  }

  .after-sales-command-bar,
  .after-sales-grid,
  .after-sales-overview-grid {
    grid-template-columns: 1fr;
  }

  .after-sales-create-form,
  .after-sales-order-preview {
    grid-template-columns: 1fr 1fr;
  }

  .after-sales-overview-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .after-sales-order-search {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-home-copy,
  .dashboard-home-hero-reverse .dashboard-home-copy {
    min-height: auto !important;
    padding: 26px 28px !important;
    border-right: 0 !important;
    border-left: 0 !important;
    border-bottom: 1px solid var(--theme-border-soft) !important;
  }
}

@media (max-width: 640px) {
  .dashboard-hero-metrics {
    grid-template-columns: 1fr !important;
  }

  .dashboard-month-line-chart {
    overflow-x: auto !important;
    padding-bottom: 4px !important;
  }

  .dashboard-month-line-chart svg {
    min-width: 520px !important;
  }

  .dashboard-month-chart-head {
    display: grid !important;
  }

  .dashboard-home-copy,
  .dashboard-home-hero-reverse .dashboard-home-copy {
    padding: 22px !important;
  }

  .dashboard-home-copy h3 {
    font-size: 26px !important;
    line-height: 1.18 !important;
  }

  .dashboard-after-sales-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-after-sales-grid article:nth-child(2n) {
    border-right: 0;
  }

  .dashboard-after-sales-grid article:nth-child(n + 3) {
    border-top: 1px solid var(--theme-border-soft);
  }

  .dashboard-mini-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 72px;
  }

  .dashboard-mini-card,
  .dashboard-mini-card-wide,
  .dashboard-mini-card-tall,
  .dashboard-mini-card-feature {
    grid-column: span 1;
    grid-row: span 2;
  }

  .after-sales-order-search,
  .after-sales-case-header,
  .after-sales-create-form,
  .after-sales-order-preview {
    grid-template-columns: 1fr;
  }

  .after-sales-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .after-sales-actions .btn {
    width: 100%;
  }

  .after-sales-order-strip {
    grid-template-columns: 1fr 1fr;
  }

  .after-sales-logistics-flow-grid {
    grid-template-columns: 1fr;
  }

  .after-sales-logistics-status-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .after-sales-composer-actions {
    grid-template-columns: 1fr 1fr;
  }

  .after-sales-logistics-grid,
  .after-sales-expense-grid {
    grid-template-columns: 1fr;
  }

  #afterSalesTimelineForm .after-sales-composer-actions:first-child {
    display: grid;
    grid-template-columns: 1fr;
  }

  #afterSalesTimelineForm .after-sales-composer-actions:first-child select {
    width: 100%;
    max-width: none;
  }

  .after-sales-ai-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .after-sales-ai-head,
  .after-sales-ai-input {
    grid-template-columns: 1fr;
    display: grid;
  }

  .after-sales-mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .after-sales-overview-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .after-sales-overview-table th,
  .after-sales-overview-table td {
    white-space: normal;
  }

  .after-sales-return-grid {
    grid-template-columns: 1fr;
  }

  .after-sales-order-strip {
    grid-template-columns: 1fr;
  }
}

/* Shape system
   Every component uses square 0px corners. Buttons are the only capsule shape
   and always size to their content, including inside mobile layouts. */
:root,
body.theme-dark {
  --theme-radius-card: 0;
  --theme-radius-control: 0;
  --theme-radius-dialog: 0;
  --theme-table-radius: 0;
  --radius-card: 0;
  --radius-panel: 0;
  --radius-control: 0;
  --radius-pill: 999px;
  --ms-button-border-radius: 0;
}

:where(
  .auth-box,
  .card,
  .card-body,
  .collapse-panel,
  .confirm-modal,
  .modal,
  [role="dialog"],
  .table-shell-card,
  .table-wrap,
  .reviews-filter-bar,
  .side-card-heading,
  .table-head,
  .reviews-table-head,
  .todo-waterfall-panel,
  .todo-flow-item,
  .todo-summary-card,
  .dashboard-home-hero,
  .dashboard-workbench-main,
  .dashboard-note-card,
  .dashboard-metric-card,
  .dashboard-focus-card,
  .merchant-hero-panel,
  .merchant-order-drawer-row td,
  .parsed-order-summary,
  .submit-mail-summary,
  .cancel-order-summary,
  .status,
  .tag,
  .badge,
  .badge-ok,
  .badge-warn,
  .badge-err,
  .badge-blue,
  .preference-switcher,
  .notice-placeholder-token,
  .review-policy-options span,
  .merchant-step-pills span,
  .reviews-table-meta span,
  .permission-menu-card,
  .check-row,
  .ai-provider-card,
  .ai-usage-item,
  .after-sales-panel,
  .after-sales-mode-tabs,
  .after-sales-overview-metric,
  .after-sales-command-bar,
  .after-sales-order-preview,
  .after-sales-case,
  .after-sales-composer,
  .after-sales-logistics-flow-panel,
  .after-sales-logistics-panel,
  .after-sales-expense-panel,
  .after-sales-timeline-card,
  .after-sales-note-list article,
  .after-sales-ai-dock,
  .after-sales-ai-dialog,
  .after-sales-ai-input,
  .after-sales-priority,
  .after-sales-type,
  .after-sales-status,
  .after-sales-note-status,
  input,
  select,
  textarea,
  table,
  th,
  td,
  .reviews-data-table td,
  .reviews-data-table td:first-child,
  .reviews-data-table td:last-child
) {
  border-radius: 0 !important;
}

:where(
  button,
  .btn,
  .modal-actions .btn,
  .form-actions .btn,
  .actions .btn,
  .segmented .btn,
  .preference-button,
  .collapse-toggle,
  .soft-primary,
  .todo-queue-filter,
  .todo-flow-action,
  .todo-note-complete,
  .todo-note-delete,
  .merchant-order-actions .btn,
  .reviews-filter-controls .btn,
  .after-sales-actions .btn,
  .after-sales-quick-kind button,
  .after-sales-filter-row button,
  .after-sales-composer-tabs button,
  .after-sales-mode-tabs button,
  .nav button
) {
  width: auto !important;
  min-width: max-content !important;
  max-width: max-content !important;
  min-height: var(--theme-control-height-sm) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
}

:where(.after-sales-actions, .form-actions, .modal-actions, .actions) {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}

/* Theme patch: reviews meta chips
   Keep historical review meta pills on the shared surface tokens so dark
   theme never falls back to legacy translucent white backgrounds. */
.reviews-table-meta span {
  border-color: var(--theme-border-soft) !important;
  background: var(--theme-surface-high) !important;
  color: var(--theme-muted) !important;
  box-shadow: none !important;
}

body.theme-dark .reviews-table-meta span {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-raised) !important;
  color: var(--theme-text) !important;
}

.reviews-filter-controls > .btn,
.reviews-filter-controls label + .btn {
  align-self: end !important;
  min-height: 41px !important;
  padding: 9px 22px !important;
  font-size: 13px !important;
  line-height: 1 !important;
}

.merchant-step-pills span {
  border-color: var(--theme-border-soft) !important;
  background: var(--theme-surface-high) !important;
  color: var(--theme-muted) !important;
  box-shadow: none !important;
}

body.theme-dark .merchant-step-pills span {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-raised) !important;
  color: var(--theme-text) !important;
}

/* Theme patch: after-sales AI workspace
   AI is part of the after-sales workspace, not a separate color theme. */
.after-sales-ai-dock {
  border-color: #d8d4ca !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  box-shadow: var(--theme-shadow-card) !important;
}

.after-sales-ai-body {
  background: linear-gradient(180deg, var(--theme-surface) 0%, #f7f4ee 18%, #f3f0e9 100%) !important;
}

.after-sales-ai-dialog,
.after-sales-ai-input {
  border-color: #d8d4ca !important;
  background: #fbfaf7 !important;
  color: var(--theme-text) !important;
}

.after-sales-ai-head-actions span,
.after-sales-ai-expand {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-highest) !important;
  color: var(--theme-text) !important;
  box-shadow: none !important;
}

.after-sales-ai-expand {
  border-color: #c9d3e1 !important;
  background: #f3f6fa !important;
  color: #245c8f !important;
}

.after-sales-ai-expand:hover {
  border-color: #aebbd0 !important;
  background: #e8eef6 !important;
  color: #1f527f !important;
}

.after-sales-ai-head-actions .after-sales-ai-model-status {
  border-color: #a8d8c2 !important;
  background: #e7f4ee !important;
  color: #176b4d !important;
}

body.theme-dark .after-sales-ai-expand {
  border-color: #3a4a5e !important;
  background: #202a36 !important;
  color: #afc7e8 !important;
}

body.theme-dark .after-sales-ai-expand:hover {
  border-color: #4a6078 !important;
  background: #263443 !important;
  color: #c2d6f0 !important;
}

body.theme-dark .after-sales-ai-head-actions .after-sales-ai-model-status {
  border-color: #2f6f55 !important;
  background: #19362b !important;
  color: #8ee0b7 !important;
}

.after-sales-ai-message p,
.after-sales-ai-message ol {
  color: var(--theme-text) !important;
}

.after-sales-ai-message strong {
  color: var(--theme-muted) !important;
}

.after-sales-ai-message.assistant p {
  border-color: #ded8cd !important;
  background: #f6f3ed !important;
}

.after-sales-ai-message.user p {
  border-color: #d7dce2 !important;
  background: #f2f4f6 !important;
}

body.theme-dark .after-sales-ai-message.assistant p {
  border-color: #3d3931 !important;
  background: #211f1a !important;
}

body.theme-dark .after-sales-ai-message.user p {
  border-color: #343943 !important;
  background: #1b1f26 !important;
}

body.theme-dark .after-sales-ai-dock {
  border-color: #3d3931 !important;
  background: var(--theme-surface) !important;
}

body.theme-dark .after-sales-ai-body {
  background: linear-gradient(180deg, var(--theme-surface) 0%, #171611 22%, #181713 100%) !important;
}

body.theme-dark .after-sales-ai-dialog,
body.theme-dark .after-sales-ai-input {
  border-color: #3d3931 !important;
  background: #11110f !important;
}

body.theme-dark .after-sales-ai-dialog {
  scrollbar-color: #69635a transparent;
}

body.theme-dark .after-sales-ai-dialog::-webkit-scrollbar-track {
  background: transparent;
}

body.theme-dark .after-sales-ai-dialog::-webkit-scrollbar-thumb {
  border-color: transparent;
  background-color: #69635a;
}

body.theme-dark .after-sales-ai-dialog::-webkit-scrollbar-thumb:hover {
  background-color: #817a70;
}

.merchant-order-drawer-row,
.merchant-order-drawer-row:hover,
.merchant-order-drawer-row td,
.merchant-order-drawer-row:hover td,
.merchant-order-drawer {
  box-shadow: none !important;
}

.notice-placeholder-token {
  border-color: var(--theme-border-soft) !important;
  background: var(--theme-surface-high) !important;
  color: var(--theme-text) !important;
  box-shadow: none !important;
}

.notice-placeholder-token:hover {
  border-color: var(--theme-border-soft) !important;
  background: var(--theme-surface-high) !important;
}

.notice-placeholder-token code {
  color: var(--theme-primary) !important;
}

.notice-placeholder-token span {
  color: var(--theme-muted) !important;
}

body.theme-dark .notice-placeholder-token,
body.theme-dark .notice-placeholder-token:hover {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-raised) !important;
  color: var(--theme-text) !important;
}

.header-actions,
.header-actions .preference-switcher {
  border-radius: 0 !important;
}

.merchant-order-drawer-row,
.merchant-order-drawer-row:hover,
.merchant-order-drawer-row td,
.merchant-order-drawer-row:hover td,
.merchant-order-drawer,
.merchant-order-drawer:hover {
  transform: none !important;
}

.logs-layout .collapse-toggle,
.logs-layout .collapse-panel[open] .collapse-toggle {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-highest) !important;
  color: var(--theme-text) !important;
  box-shadow: none !important;
}

body.theme-dark .logs-layout .collapse-toggle,
body.theme-dark .logs-layout .collapse-panel[open] .collapse-toggle {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-raised) !important;
  color: var(--theme-text) !important;
}

.account-layout > .account-identity-card,
.account-layout > .account-identity-card .card-body,
.account-identity-list .detail-row {
  border-radius: 0 !important;
  box-shadow: none !important;
}

.account-layout > .account-identity-card {
  border-color: var(--theme-border-soft) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
}

.account-identity-list .detail-row {
  border-color: var(--theme-border-soft) !important;
  background: var(--theme-surface-high) !important;
  color: var(--theme-text) !important;
}

body.theme-dark .account-layout > .account-identity-card {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
}

body.theme-dark .account-identity-list .detail-row {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-raised) !important;
}

.account-security-layout {
  grid-template-columns: minmax(260px, 0.72fr) minmax(320px, 1fr) minmax(320px, 1fr) !important;
  gap: 18px;
}

.account-security-layout > .card {
  min-width: 0;
}

.account-security-layout .account-profile-card .card-body,
.account-security-layout .account-password-card .card-body {
  padding: 18px 20px 20px;
}

.account-security-layout .security-form {
  max-width: none;
}

.account-security-layout .form-actions {
  justify-content: flex-start;
}

.account-security-layout .account-password-card .form-actions .btn {
  width: auto;
}

@media (max-width: 1320px) {
  .account-security-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }

  .account-security-layout > .account-identity-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .account-security-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .account-security-layout > .account-identity-card {
    grid-column: auto;
  }
}

.ai-provider-card-head em,
.ai-provider-card-head em.warn,
.ai-provider-card-head em.ok {
  border-radius: 0 !important;
  box-shadow: none !important;
}

.ai-provider-card-head em,
.ai-provider-card-head em.warn {
  border-color: var(--theme-warning-border) !important;
  background: var(--theme-warning-soft) !important;
  color: var(--theme-warning) !important;
}

.ai-provider-card-head em.ok {
  border-color: var(--theme-success-border) !important;
  background: var(--theme-success-soft) !important;
  color: var(--theme-success) !important;
}

body.theme-dark .ai-provider-card-head em,
body.theme-dark .ai-provider-card-head em.warn {
  border-color: var(--theme-warning-border) !important;
  background: var(--theme-warning-soft) !important;
  color: var(--theme-warning) !important;
}

.invites-table th:nth-child(7),
.invites-table td:nth-child(7) {
  width: 210px !important;
  min-width: 210px !important;
  padding-left: 18px !important;
  padding-right: 18px !important;
}

.invites-table td:nth-child(7) {
  text-align: right !important;
}

.invites-table .actions {
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
}

.invites-table .actions .btn {
  flex: 0 0 auto !important;
}

.shipping-main,
.shipping-orders-card,
#shippingTable,
#shippingTable .table-wrap {
  min-width: 0 !important;
}

@media (max-width: 1180px) {
  .shipping-orders-table,
  .shipping-orders-table tbody,
  .shipping-orders-table tbody tr,
  .shipping-orders-table th,
  .shipping-orders-table td {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .shipping-orders-table tbody tr {
    overflow: hidden !important;
  }

  .shipping-orders-table td:nth-child(1),
  .shipping-orders-table td:nth-child(3),
  .shipping-orders-table td:nth-child(4) {
    width: 100% !important;
    min-width: 0 !important;
  }

  .shipping-orders-table .actions {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .shipping-orders-table .actions .btn {
    flex: 0 1 auto !important;
    max-width: 100% !important;
    white-space: nowrap !important;
  }

.shipping-orders-table .compact-text,
  .shipping-orders-table .shipping-order-submeta,
  .shipping-orders-table .table-code {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
  }

  .admins-table,
  .admins-table tbody,
  .admins-table tbody tr,
  .admins-table th,
  .admins-table td {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .admins-table tbody tr {
    overflow: hidden !important;
  }

  .admins-table td:nth-child(1),
  .admins-table td:nth-child(5),
  .admins-table td:nth-child(6),
  .admins-table td:nth-child(7) {
    width: 100% !important;
    min-width: 0 !important;
  }

  .admins-table .actions {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .admins-table .actions .btn {
    flex: 0 1 auto !important;
    max-width: 100% !important;
    white-space: nowrap !important;
  }

  .admins-table .table-text-strong,
  .admins-table td {
    overflow-wrap: anywhere !important;
  }
}

/* Sidebar navigation refinement
   Navigation is not a generic action button group. Keep it calm, readable,
   and full-width inside the sidebar. */
.sidebar {
  padding: 0 !important;
  background: var(--theme-left-nav-bg) !important;
}

.brand {
  min-height: 92px !important;
  padding: 18px 18px 14px !important;
}

.nav {
  gap: 0 !important;
  padding: 4px 18px 28px !important;
}

.nav-group {
  gap: 4px !important;
}

.nav-group + .nav-group {
  margin-top: 16px !important;
  padding-top: 8px !important;
}

.nav-group-toggle,
.nav .nav-group-toggle {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 30px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--theme-text) !important;
  font-size: 13px !important;
  font-weight: 680 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  box-shadow: none !important;
}

.nav-group-chevron {
  width: 7px !important;
  height: 7px !important;
  border-width: 2px !important;
  margin-left: 8px !important;
}

.nav-group-items {
  gap: 2px !important;
  padding-top: 4px !important;
}

.nav button:not(.nav-group-toggle),
.nav .nav-group-items button {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 34px !important;
  margin-left: 0 !important;
  padding: 0 12px 0 10px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--theme-text) !important;
  font-size: 14px !important;
  font-weight: 620 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  box-shadow: none !important;
  transform: none !important;
}

.nav button:not(.nav-group-toggle).active,
.nav .nav-group-items button.active {
  background: var(--theme-surface-high) !important;
  color: var(--theme-primary) !important;
  font-weight: 720 !important;
}

.nav button:not(.nav-group-toggle):hover,
.nav .nav-group-items button:hover {
  background: var(--theme-surface-high) !important;
  color: var(--theme-primary) !important;
}

body.theme-dark .nav button:not(.nav-group-toggle).active,
body.theme-dark .nav .nav-group-items button.active,
body.theme-dark .nav button:not(.nav-group-toggle):hover,
body.theme-dark .nav .nav-group-items button:hover {
  background: var(--theme-surface-raised) !important;
  color: var(--theme-primary) !important;
}

/* Collapse toggles use the shared button language. */
.collapse-toggle,
.after-sales-collapsible-filter summary b {
  width: auto !important;
  min-width: max-content !important;
  max-width: max-content !important;
  min-height: var(--theme-control-height-sm) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid var(--theme-border) !important;
  border-radius: 0 !important;
  padding: 0 14px !important;
  background: var(--theme-button-bg) !important;
  color: var(--theme-text) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

.collapse-toggle:hover,
.after-sales-collapsible-filter summary b:hover {
  border-color: var(--theme-border) !important;
  background: var(--theme-button-bg) !important;
  color: var(--theme-text) !important;
  transform: none !important;
  box-shadow: none !important;
}

.collapse-panel[open] .collapse-toggle,
.after-sales-collapsible-filter[open] summary b {
  border-color: var(--theme-border) !important;
  background: var(--theme-button-bg) !important;
  color: var(--theme-muted) !important;
}

body.theme-dark .collapse-toggle,
body.theme-dark .after-sales-collapsible-filter summary b,
body.theme-dark .collapse-panel[open] .collapse-toggle,
body.theme-dark .after-sales-collapsible-filter[open] summary b {
  border-color: var(--theme-border) !important;
  background: var(--theme-button-bg) !important;
  color: var(--theme-text) !important;
}

/* Merchant order drawer attaches to the expanded row. */
.merchant-orders-table tr.is-expanded td {
  border-bottom: 0 !important;
}

.merchant-order-drawer-row,
.merchant-order-drawer-row:hover {
  transform: translateY(-11px) !important;
}

.roles-permission-card .permission-menu-card .check-row {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Main sidebar navigation
   Final override for the left menu: left aligned, clearer hierarchy, and a
   visible active state. */
.sidebar {
  background: var(--theme-left-nav-bg) !important;
  border-right: 1px solid var(--theme-border-soft) !important;
  box-shadow: none !important;
}

.brand {
  justify-items: start !important;
  text-align: left !important;
  padding: 20px 20px 14px !important;
}

.brand img {
  width: 176px !important;
}

.nav {
  display: grid !important;
  gap: 4px !important;
  padding: 6px 14px 28px !important;
}

.nav-group {
  display: grid !important;
  gap: 4px !important;
}

.nav-group + .nav-group {
  margin-top: 12px !important;
  padding-top: 10px !important;
  border-top: 1px solid var(--theme-border-soft) !important;
}

.nav-group-toggle,
.nav .nav-group-toggle {
  width: 100% !important;
  min-height: 30px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 760 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  box-shadow: none !important;
}

.nav-group-toggle span:first-child {
  flex: 1 1 auto !important;
  text-align: left !important;
}

.nav-group.open > .nav-group-toggle {
  color: var(--theme-text) !important;
}

.nav-group-chevron {
  flex: 0 0 auto !important;
  opacity: 0.55 !important;
}

.nav-group-items {
  display: grid !important;
  gap: 2px !important;
  padding: 2px 0 0 !important;
}

.nav-group-items[hidden] {
  display: none !important;
}

.nav button:not(.nav-group-toggle),
.nav .nav-group-items button {
  position: relative !important;
  width: 100% !important;
  min-height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 0 10px 0 18px !important;
  border: 1px solid transparent !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: var(--theme-text) !important;
  font-size: 13px !important;
  font-weight: 560 !important;
  line-height: 1.2 !important;
  text-align: left !important;
  white-space: normal !important;
  box-shadow: none !important;
  transform: none !important;
}

.nav-item-label {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.nav-item-badge {
  position: absolute !important;
  top: -7px !important;
  right: -7px !important;
  min-width: 20px !important;
  height: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 6px !important;
  border: 1px solid #ea580c !important;
  border-radius: 999px !important;
  background: #ea580c !important;
  color: #fff7ed !important;
  font-size: 11px !important;
  font-weight: 780 !important;
  line-height: 1 !important;
  pointer-events: none !important;
}

.nav .nav-group-items button {
  margin-left: 0 !important;
}

.nav button:not(.nav-group-toggle)::before,
.nav .nav-group-items button::before {
  content: "" !important;
  position: absolute !important;
  left: 6px !important;
  top: 9px !important;
  bottom: 9px !important;
  width: 3px !important;
  border-radius: 3px !important;
  background: transparent !important;
}

.nav button:not(.nav-group-toggle):hover,
.nav .nav-group-items button:hover {
  background: var(--theme-surface-high) !important;
  border-color: var(--theme-border-soft) !important;
  color: var(--theme-primary) !important;
}

.nav button:not(.nav-group-toggle).active,
.nav .nav-group-items button.active {
  background: var(--theme-surface-highest) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-primary) !important;
  font-weight: 760 !important;
}

.nav button:not(.nav-group-toggle).active::before,
.nav .nav-group-items button.active::before {
  background: var(--theme-primary) !important;
}

body.theme-dark .nav-group + .nav-group {
  border-top-color: var(--theme-border-soft) !important;
}

body.theme-dark .nav button:not(.nav-group-toggle):hover,
body.theme-dark .nav .nav-group-items button:hover {
  background: var(--theme-surface-high) !important;
  border-color: var(--theme-border-soft) !important;
  color: var(--theme-primary) !important;
}

body.theme-dark .nav button:not(.nav-group-toggle).active,
body.theme-dark .nav .nav-group-items button.active {
  background: var(--theme-surface-highest) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-primary) !important;
}

/* Todos workbench layout refinement */
.view-todos .merchant-review-layout {
  align-items: start;
}

.view-todos .merchant-review-layout > aside.stack {
  gap: 16px;
}

.view-todos .todo-note-compose-card,
.view-todos .todo-my-note-card,
.view-todos .todo-waterfall-panel,
.view-todos .sent-note-panel,
.view-todos .todo-summary-card {
  border: 1px solid var(--theme-border-soft) !important;
  background: var(--theme-surface) !important;
  box-shadow: var(--theme-shadow-card) !important;
}

.view-todos .todo-my-note-card .card-body {
  padding-top: 14px;
}

.view-todos .my-note-panel {
  border-top: 0 !important;
  padding-top: 0 !important;
}

.view-todos .my-note-head {
  margin-bottom: 10px;
  padding-left: 0 !important;
  border-left: 0 !important;
}

.view-todos .my-note-head span,
.view-todos .completed-note-summary-copy > span {
  color: var(--theme-text);
  font-size: 13px;
  font-weight: 650;
}

.view-todos .my-note-head strong,
.view-todos .completed-note-summary-copy strong {
  color: var(--theme-muted);
  font-size: 12px;
  font-weight: 500;
}

.view-todos .todos-main-layout {
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 18px;
  align-items: start;
}

.view-todos .todo-waterfall-panel {
  min-height: 520px;
  height: auto;
}

.view-todos .todo-waterfall-head,
.view-todos .sent-note-head {
  background: transparent !important;
  padding: 18px 20px 14px !important;
}

.view-todos .todo-waterfall-head h3 {
  margin-top: 6px;
  font-size: 22px !important;
  font-weight: 700 !important;
}

.view-todos .todo-waterfall-head p,
.view-todos .sent-note-head p {
  font-size: 13px !important;
  font-weight: 400 !important;
}

.view-todos .todo-waterfall-head > span,
.view-todos .sent-note-head > span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px !important;
  border: 1px solid var(--theme-border-soft) !important;
  border-radius: var(--theme-radius-control) !important;
  background: var(--theme-surface-high) !important;
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.view-todos .todo-flow-item,
.view-todos .sent-note-item,
.view-todos .completed-note-item,
.view-todos .my-note-item {
  border-color: var(--theme-border-soft) !important;
  background: var(--theme-surface) !important;
}

.view-todos .todo-flow-item:nth-child(even),
.view-todos .sent-note-item:nth-child(even) {
  background: var(--theme-surface-high) !important;
}

.view-todos .sent-note-panel {
  overflow: hidden;
}

.view-todos .sent-note-head h3 {
  font-size: 18px !important;
  font-weight: 700 !important;
}

.view-todos .completed-note-block {
  padding: 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--theme-border-soft) !important;
  background: var(--theme-surface) !important;
}

.view-todos .completed-note-details {
  display: block;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.view-todos .completed-note-details summary {
  min-height: 48px;
  width: 100%;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 13px 12px;
  cursor: pointer;
  list-style: none;
  box-sizing: border-box;
}

.view-todos .completed-note-details summary::-webkit-details-marker {
  display: none;
}

.view-todos .completed-note-summary-copy {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.view-todos .completed-note-toggle {
  content: "展开";
  width: 54px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--theme-border-soft);
  background: var(--theme-surface);
  color: var(--theme-primary);
  font-size: 12px;
  font-weight: 600;
  box-sizing: border-box;
}

.view-todos .completed-note-toggle::before {
  content: "展开";
}

.view-todos .completed-note-details[open] .completed-note-toggle::before {
  content: "收起";
}

.view-todos .completed-note-list {
  padding: 0 12px 16px;
}

.view-todos .todo-summary-side {
  position: sticky;
  top: 18px;
  gap: 10px;
}

.view-todos .todo-summary-card,
.view-todos .todo-summary-card.tone-slate,
.view-todos .todo-summary-card.tone-steel,
.view-todos .todo-summary-card.tone-navy,
.view-todos .todo-summary-card.tone-indigo,
.view-todos .todo-summary-card.tone-graphite,
.view-todos .todo-summary-card.is-active {
  min-height: 78px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
  gap: 4px 10px !important;
  padding: 13px 14px !important;
  box-shadow: none !important;
}

.view-todos .todo-summary-card span {
  grid-column: 1;
  color: var(--theme-text) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1.25;
}

.view-todos .todo-summary-card strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center !important;
  color: var(--theme-warning) !important;
  font-size: 28px !important;
  font-weight: 800 !important;
}

.view-todos .todo-summary-card p,
.view-todos .todo-summary-card em {
  grid-column: 1;
  color: var(--theme-muted) !important;
  font-size: 11px !important;
  font-weight: 400 !important;
}

@media (max-width: 1180px) {
  .view-todos .todos-main-layout {
    grid-template-columns: 1fr;
  }

  .view-todos .todo-summary-side {
    position: static;
    grid-column: 1;
    grid-row: auto;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    overflow-x: auto;
  }
}

/* Merchant orders list rebuild
   This table intentionally does not use the shared reviews-data-table or the
   older merchant-orders-table styles. Keep the order list self-contained. */
#merchantOrdersTable.table-wrap {
  overflow: visible !important;
}

#merchantOrdersTable .merchant-orders-clean-table,
#merchantOrdersTable .merchant-orders-clean-table *,
#merchantOrdersTable .merchant-orders-clean-table *::before,
#merchantOrdersTable .merchant-orders-clean-table *::after {
  box-sizing: border-box;
}

#merchantOrdersTable .merchant-orders-clean-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  table-layout: auto;
  color: var(--theme-text);
  background: transparent !important;
}

#merchantOrdersTable .merchant-orders-clean-table th,
#merchantOrdersTable .merchant-orders-clean-table td {
  height: auto !important;
  min-height: 0 !important;
  padding: 18px 16px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--theme-border-soft) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--theme-text);
  font-size: 14px;
  line-height: 1.42;
  text-align: left;
  vertical-align: middle;
  transform: none !important;
}

#merchantOrdersTable .merchant-orders-clean-table th {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  background: var(--theme-surface-high) !important;
  color: var(--theme-muted) !important;
  font-size: 12px;
  font-weight: 620;
  letter-spacing: .02em;
  white-space: nowrap;
}

#merchantOrdersTable .merchant-orders-clean-table tbody tr,
#merchantOrdersTable .merchant-orders-clean-table tbody tr:hover {
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}

#merchantOrdersTable .merchant-orders-clean-table tbody tr:nth-child(odd) td,
#merchantOrdersTable .merchant-orders-clean-table tbody tr:nth-child(odd):hover td {
  background: var(--theme-table-row-bg) !important;
}

#merchantOrdersTable .merchant-orders-clean-table tbody tr:nth-child(even) td,
#merchantOrdersTable .merchant-orders-clean-table tbody tr:nth-child(even):hover td {
  background: var(--theme-table-row-alt-bg) !important;
}

#merchantOrdersTable .merchant-orders-clean-table tbody tr:hover td {
  border-bottom-color: var(--theme-border) !important;
}

#merchantOrdersTable .merchant-orders-clean-table th:nth-child(1),
#merchantOrdersTable .merchant-orders-clean-table td:nth-child(1) {
  width: var(--order-no-column-width, max-content);
  min-width: var(--order-no-column-width, max-content);
  max-width: var(--order-no-column-width, max-content);
  white-space: nowrap;
}

#merchantOrdersTable .merchant-orders-clean-table th:nth-child(2),
#merchantOrdersTable .merchant-orders-clean-table td:nth-child(2) {
  width: auto;
}

#merchantOrdersTable .merchant-orders-clean-table th:nth-child(3),
#merchantOrdersTable .merchant-orders-clean-table td:nth-child(3) {
  width: 12%;
}

#merchantOrdersTable .merchant-orders-clean-table th:nth-child(4),
#merchantOrdersTable .merchant-orders-clean-table td:nth-child(4) {
  width: 26%;
}

#merchantOrdersTable .order-number-cell {
  width: 100%;
  min-width: 0;
  display: grid !important;
  gap: 4px !important;
}

#merchantOrdersTable .order-no {
  display: block;
  max-width: 100%;
  color: var(--theme-text) !important;
  font-size: 14px !important;
  font-weight: 720 !important;
  line-height: 1.28 !important;
  overflow-wrap: normal;
  white-space: nowrap !important;
}

#merchantOrdersTable .order-number-cell > small {
  min-width: 0;
  display: block !important;
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 540 !important;
  line-height: 1.32 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#merchantOrdersTable .order-subtle {
  color: var(--theme-muted) !important;
  font-size: 13px !important;
  font-weight: 560 !important;
}

#merchantOrdersTable .order-store-product {
  min-width: 0;
  display: grid !important;
  gap: 4px !important;
}

#merchantOrdersTable .order-store-product > span {
  min-width: 0;
  color: var(--theme-text) !important;
  font-size: 13px !important;
  font-weight: 680 !important;
  line-height: 1.28 !important;
  overflow-wrap: anywhere;
}

#merchantOrdersTable .order-store-product > small {
  min-width: 0;
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 540 !important;
  line-height: 1.32 !important;
  overflow-wrap: anywhere;
}

#merchantOrdersTable .order-customer {
  min-width: 0;
  display: grid !important;
  gap: 4px !important;
}

#merchantOrdersTable .order-customer > span {
  min-width: 0;
  display: block !important;
  color: var(--theme-text) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.28 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#merchantOrdersTable .order-customer > small {
  min-width: 0;
  display: block !important;
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 520 !important;
  line-height: 1.32 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#merchantOrdersTable .merchant-orders-clean-table .tag {
  min-width: max-content !important;
  max-width: max-content !important;
  min-height: 30px !important;
  border-radius: 999px !important;
  padding: 0 11px !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

#merchantOrdersTable .merchant-order-actions {
  min-width: 0 !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 7px !important;
  overflow: visible !important;
}

#merchantOrdersTable .merchant-order-actions .btn,
#merchantOrdersTable .merchant-order-more-menu .btn[data-merchant-order-more-toggle] {
  width: auto !important;
  min-width: max-content !important;
  max-width: max-content !important;
  min-height: 34px !important;
  padding: 0 14px !important;
  border-radius: 0 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

#merchantOrdersTable .merchant-order-more-menu {
  position: relative !important;
  flex: 0 0 auto !important;
}

#merchantOrdersTable .merchant-order-more-menu > div {
  display: none !important;
}

.merchant-order-floating-menu {
  position: fixed !important;
  z-index: 9999 !important;
  min-width: 148px !important;
  display: grid !important;
  gap: 6px !important;
  padding: 8px !important;
  border: 1px solid var(--theme-border) !important;
  border-radius: 0 !important;
  background: var(--theme-surface-highest) !important;
  box-shadow: var(--theme-shadow-card) !important;
}

.merchant-order-floating-menu .btn {
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
  justify-content: center !important;
  min-height: 34px !important;
  border-radius: 0 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.merchant-order-floating-menu .btn.danger {
  border-color: var(--theme-danger) !important;
  background: var(--theme-danger) !important;
  color: var(--theme-on-danger) !important;
}

.order-view-summary {
  margin-bottom: 18px;
}

.order-view-items-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.order-view-items-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--theme-border-soft);
}

.order-view-items-head strong {
  color: var(--theme-text);
  font-size: 16px;
  font-weight: 760;
}

.order-view-item-row {
  align-items: end;
  padding: 12px;
  border: 1px solid var(--theme-border-soft);
  background: var(--theme-surface);
}

.order-view-item-row .field {
  margin: 0;
}

#merchantOrdersTable .order-action-with-status {
  position: relative;
  display: inline-flex;
}

#merchantOrdersTable .order-action-dot {
  top: -2px;
  right: -2px;
}

#merchantOrdersTable .order-date-sort,
#merchantOrdersTable .order-date-sort:hover {
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font: inherit !important;
  box-shadow: none !important;
  transform: none !important;
}

#merchantOrdersTable .order-date-sort-icon {
  color: var(--theme-primary) !important;
  font-size: 10px !important;
  line-height: 1 !important;
}

#merchantOrdersTable .merchant-orders-clean-table tr.is-canceled td {
  opacity: .62;
}

#merchantOrdersTable .merchant-orders-clean-table tr.is-canceled .order-no {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--theme-muted);
}

@media (max-width: 1180px) {
  #merchantOrdersTable.table-wrap {
    overflow-x: auto !important;
    overflow-y: visible !important;
  }

  .warranty-claims-workbench {
    grid-template-columns: 1fr;
  }

  .warranty-claim-info-grid,
  .warranty-claim-audit-result,
  .warranty-claim-audit-form {
    grid-template-columns: 1fr;
  }
}

/* After-sales queue cards should stay as readable stacked cards, not capsules. */
.after-sales-queue .after-sales-case-list {
  display: grid !important;
  gap: 10px !important;
  padding: 0 16px 16px !important;
}

.after-sales-queue .after-sales-case {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 7px !important;
  justify-content: stretch !important;
  align-items: stretch !important;
  padding: 14px !important;
  text-align: left !important;
  white-space: normal !important;
}

.after-sales-queue .after-sales-case > span {
  min-width: 0 !important;
  max-width: 100% !important;
}

.after-sales-queue .after-sales-case-top,
.after-sales-queue .after-sales-case-meta {
  width: 100% !important;
  min-width: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

.after-sales-queue .after-sales-case-title,
.after-sales-queue .after-sales-case-copy {
  display: block !important;
  width: 100% !important;
  overflow-wrap: anywhere !important;
  white-space: normal !important;
}

.after-sales-queue .after-sales-case-copy {
  line-height: 1.48 !important;
}

.shared-prompts-page textarea {
  min-height: 150px;
  line-height: 1.58;
}

.shared-prompts-page {
  grid-template-columns: minmax(0, var(--layout-left-panel-width)) minmax(0, 1fr);
}

.shared-prompt-editor label {
  color: var(--theme-text);
  font-size: 14px;
  font-weight: 700;
}

.shared-prompt-note {
  margin: 0;
}

.shared-prompt-preview-card .card-body {
  padding: 0;
}

.shared-prompt-preview {
  margin: 0;
  min-height: 620px;
  padding: 22px 24px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--theme-surface);
  color: var(--theme-text);
  font: 13px/1.72 -apple-system, "Segoe UI", sans-serif;
}

/* Global select controls stay square. Native opened option popovers are browser
   chrome; this keeps every CSS-controllable dropdown surface at 0 radius. */
select,
.content select,
.modal select,
.after-sales-actions select,
.after-sales-composer-actions select,
#afterSalesTimelineForm .after-sales-actions select {
  border-radius: 0 !important;
}

select option,
select optgroup {
  border-radius: 0 !important;
}

.merchant-order-drawer-row td,
.merchant-order-drawer-row:hover td {
  padding-top: 0 !important;
  border-top: 0 !important;
  box-shadow: none !important;
}

.merchant-order-drawer {
  margin-top: 0 !important;
  border-top: 0 !important;
}

/* Interaction reset + zebra rows
   Mouse hover should not create a separate visual state. Dense data views use
   zebra strips for scanning instead of hover color, lift, shadow, or motion. */
:where(
  button,
  .btn,
  .text-link,
  .nav button,
  .nav-group-toggle,
  .preference-button,
  .collapse-toggle,
  .soft-primary,
  .todo-flow-action,
  .todo-note-complete,
  .todo-note-delete,
  .merchant-hero-panel,
  .merchant-hero-primary,
  .merchant-hero-guide,
  .ai-assistant-entry,
  .review-policy-options span,
  .merchant-step-pills span,
  .notice-placeholder-token,
  .after-sales-case,
  .after-sales-ai-actions .btn,
  .after-sales-close-btn
):hover {
  transform: none !important;
  filter: none !important;
  box-shadow: none !important;
}

:where(input, select, textarea):hover {
  border-color: var(--theme-border) !important;
  background: var(--theme-input-bg) !important;
  box-shadow: var(--theme-shadow-input) !important;
}

:where(.btn, button, .preference-button, .soft-primary, .todo-queue-filter, .todo-flow-action, .todo-note-complete):hover {
  border-color: var(--theme-border) !important;
  background: var(--theme-button-bg) !important;
  color: var(--theme-text) !important;
}

.todo-queue-filter.is-active:hover {
  border-color: var(--theme-primary) !important;
  background: var(--theme-primary-soft) !important;
  color: var(--theme-primary) !important;
}

:where(.btn.primary, .preference-button.active, .soft-primary.active):hover {
  border-color: var(--theme-primary) !important;
  background: var(--theme-primary) !important;
  color: var(--theme-on-primary) !important;
}

:where(.btn.danger, .todo-flow-action.danger, .todo-note-delete):hover {
  border-color: var(--theme-danger-border) !important;
  background: var(--theme-danger-soft) !important;
  color: var(--theme-danger) !important;
}

tbody tr:nth-child(odd) td,
.reviews-data-table tbody tr:nth-child(odd) {
  background: var(--theme-table-row-bg) !important;
}

tbody tr:nth-child(even) td,
.reviews-data-table tbody tr:nth-child(even) {
  background: var(--theme-table-row-alt-bg) !important;
}

tbody tr:nth-child(odd):hover td,
.reviews-data-table tbody tr:nth-child(odd):hover {
  background: var(--theme-table-row-bg) !important;
}

tbody tr:nth-child(even):hover td,
.reviews-data-table tbody tr:nth-child(even):hover {
  background: var(--theme-table-row-alt-bg) !important;
}

:where(.todo-flow-item, .after-sales-case, .after-sales-note-list article):nth-child(odd):not(.active) {
  background: var(--theme-surface) !important;
}

:where(.todo-flow-item, .after-sales-case, .after-sales-note-list article):nth-child(even):not(.active) {
  background: var(--theme-surface-high) !important;
}

:where(.todo-flow-item, .after-sales-case, .after-sales-note-list article):hover:not(.active) {
  border-color: var(--theme-border-soft) !important;
}

/* List hover motion
   Keep buttons/forms static, but allow data/list rows to move slightly so
   operators can feel which row they are scanning. */
:where(
  tbody tr,
  .reviews-data-table tbody tr,
  .todo-flow-item,
  .after-sales-case,
  .after-sales-note-list article,
  .after-sales-timeline-card,
  .after-sales-note-list li
) {
  transition: transform 140ms ease, border-color 140ms ease !important;
}

:where(
  tbody tr,
  .reviews-data-table tbody tr,
  .todo-flow-item,
  .after-sales-case,
  .after-sales-note-list article,
  .after-sales-timeline-card,
  .after-sales-note-list li
):hover {
  transform: translateX(3px) !important;
}

.merchant-order-drawer-row {
  transform: translateY(-11px) !important;
}

.merchant-orders-table tr.is-expanded:hover + .merchant-order-drawer-row,
.merchant-order-drawer-row:hover {
  transform: translate(3px, -11px) !important;
}

.merchant-order-drawer-row:hover {
  transform: translateY(-11px) !important;
}

/* Warranty claim queue cards: keep this after global button rules. */
.warranty-claim-list .warranty-claim-card {
  width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  white-space: normal !important;
  overflow: hidden !important;
  text-align: left !important;
}

.warranty-claim-card-main,
.warranty-claim-card-meta {
  min-width: 0 !important;
  max-width: 100% !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  overflow: hidden !important;
}

.warranty-claim-card-main strong,
.warranty-claim-card-customer,
.warranty-claim-card-meta small {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.warranty-claim-card-main strong {
  flex: 1 1 auto !important;
}

.warranty-claim-card-customer {
  display: block !important;
  color: var(--theme-text) !important;
  font-weight: 760 !important;
}

.warranty-claim-card-meta {
  justify-content: space-between !important;
}

.warranty-claim-card-meta small {
  flex: 1 1 auto !important;
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

.warranty-claim-card-meta em {
  flex: 0 0 auto !important;
  padding: 4px 8px !important;
  border: 1px solid var(--theme-border-soft) !important;
  background: var(--theme-surface-high) !important;
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-style: normal !important;
  font-weight: 650 !important;
  white-space: nowrap !important;
}

/* Warranty claim queue final layout override: neutralize legacy child grid rules. */
.warranty-claim-list .warranty-claim-card > .warranty-claim-card-main {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
}

.warranty-claim-list .warranty-claim-card > .warranty-claim-card-customer {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
}

.warranty-claim-list .warranty-claim-card > .warranty-claim-card-meta {
  grid-column: 1 / -1 !important;
  grid-row: 3 !important;
}

.warranty-claim-list .warranty-claim-card > .warranty-claim-card-main strong,
.warranty-claim-list .warranty-claim-card > .warranty-claim-card-meta small,
.warranty-claim-list .warranty-claim-card > .warranty-claim-card-meta em {
  grid-column: auto !important;
  grid-row: auto !important;
  justify-self: auto !important;
}

/* Warranty claim queue compact mode: only order number and store. */
.warranty-claim-list .warranty-claim-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 6px !important;
  padding: 16px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.warranty-claim-list .warranty-claim-card > strong,
.warranty-claim-list .warranty-claim-card > small {
  grid-column: 1 / -1 !important;
  grid-row: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  justify-self: stretch !important;
}

.warranty-claim-list .warranty-claim-card > strong {
  color: var(--theme-text) !important;
  font-size: 16px !important;
  font-weight: 780 !important;
}

.warranty-claim-list .warranty-claim-card > small {
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

/* Warranty claim queue: status tag + order number, muted store below. */
.warranty-claim-list .warranty-claim-card > .warranty-claim-card-line {
  grid-column: 1 / -1 !important;
  grid-row: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

.warranty-claim-list .warranty-claim-card > .warranty-claim-card-line > .tag {
  flex: 0 0 auto !important;
}

.warranty-claim-list .warranty-claim-card > .warranty-claim-card-line > strong {
  flex: 1 1 auto !important;
  grid-column: auto !important;
  grid-row: auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.warranty-claim-list .warranty-claim-card > small {
  color: var(--theme-muted) !important;
  opacity: .78 !important;
}

/* Warranty claim queue width should align with the keyword filter input. */
.warranty-claims-queue .warranty-claim-list {
  width: 100% !important;
  padding-left: var(--theme-space-4) !important;
  padding-right: var(--theme-space-4) !important;
  box-sizing: border-box !important;
}

.warranty-claims-queue .warranty-claim-list .warranty-claim-card {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
}

/* Warranty claim queue store name aligns under the order number, not under the status tag. */
.warranty-claims-queue .warranty-claim-card > small {
  width: auto !important;
  margin-left: calc(76px + 10px) !important;
  justify-self: stretch !important;
}

/* Warranty claim queue exact alignment: order number and store share the second grid column. */
.warranty-claims-queue .warranty-claim-card {
  grid-template-columns: auto minmax(0, 1fr) !important;
  column-gap: 12px !important;
  row-gap: 6px !important;
}

.warranty-claims-queue .warranty-claim-card > .warranty-claim-card-line {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  column-gap: 12px !important;
  grid-column: 1 / -1 !important;
  align-items: center !important;
}

.warranty-claims-queue .warranty-claim-card > .warranty-claim-card-line > strong {
  grid-column: 2 / 3 !important;
}

.warranty-claims-queue .warranty-claim-card > small {
  grid-column: 2 / 3 !important;
  grid-row: 2 !important;
  margin-left: 0 !important;
  justify-self: start !important;
}

/* Warranty claim queue groups: pending first, approved/rejected archived below. */
.warranty-claim-group {
  display: grid !important;
  gap: 10px !important;
  min-width: 0 !important;
}

.warranty-claim-group + .warranty-claim-group {
  margin-top: 8px !important;
  padding-top: 16px !important;
  border-top: 1px solid var(--theme-border-soft) !important;
}

.warranty-claim-group-title {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 760 !important;
}

.warranty-claim-group-title em {
  min-width: 26px !important;
  padding: 3px 8px !important;
  border: 1px solid var(--theme-border-soft) !important;
  background: var(--theme-surface-high) !important;
  color: var(--theme-muted) !important;
  font-style: normal !important;
  text-align: center !important;
}

.warranty-claim-group-approved .warranty-claim-card,
.warranty-claim-group-rejected .warranty-claim-card {
  background: var(--theme-surface-high) !important;
}

.warranty-claim-group-approved .warranty-claim-card:not(.active),
.warranty-claim-group-rejected .warranty-claim-card:not(.active) {
  opacity: .82 !important;
}

/* Warranty claim archive lookup. */
.warranty-claim-archive-entry {
  padding: 0 var(--theme-space-4) var(--theme-space-4) !important;
  border-bottom: 1px solid var(--theme-border-soft) !important;
}

.warranty-claim-archive-entry .btn {
  width: 100% !important;
  justify-content: center !important;
}

.warranty-claim-archive-modal {
  width: min(980px, calc(100vw - 48px)) !important;
  max-height: min(820px, calc(100vh - 48px)) !important;
  overflow: hidden !important;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) !important;
}

.warranty-claim-archive-filter {
  display: grid !important;
  grid-template-columns: minmax(0, 10rem) minmax(0, 12rem) minmax(18rem, 1fr) auto !important;
  gap: var(--theme-space-3) !important;
  align-items: end !important;
  padding: var(--theme-space-4) !important;
  border-top: 1px solid var(--theme-border-soft) !important;
  border-bottom: 1px solid var(--theme-border-soft) !important;
}

.warranty-claim-archive-filter label {
  display: grid !important;
  gap: var(--theme-space-2) !important;
  min-width: 0 !important;
}

.warranty-claim-archive-filter label > span {
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

.warranty-claim-archive-list {
  min-height: 260px !important;
  overflow: auto !important;
  display: grid !important;
  align-content: start !important;
  gap: 10px !important;
  padding: var(--theme-space-4) !important;
}

.warranty-claim-archive-row {
  display: grid !important;
  grid-template-columns: auto minmax(11rem, .9fr) minmax(10rem, 1fr) minmax(12rem, .9fr) !important;
  gap: 12px !important;
  align-items: center !important;
  width: 100% !important;
  padding: 13px 14px !important;
  border: 1px solid var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  text-align: left !important;
  white-space: normal !important;
}

.warranty-claim-archive-row strong,
.warranty-claim-archive-row span:not(.tag),
.warranty-claim-archive-row small {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.warranty-claim-archive-row small {
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

@media (max-width: 760px) {
  .warranty-claim-archive-filter,
  .warranty-claim-archive-row {
    grid-template-columns: 1fr !important;
  }
}

/* Warranty archive modal sizing polish. */
.warranty-claim-archive-filter {
  grid-template-columns: minmax(0, 10rem) minmax(0, 12rem) minmax(18rem, 1fr) var(--theme-control-height) !important;
}

.warranty-claim-archive-filter .btn {
  width: var(--theme-control-height) !important;
  min-width: var(--theme-control-height) !important;
  height: var(--theme-control-height) !important;
  min-height: var(--theme-control-height) !important;
  padding: 0 !important;
  justify-content: center !important;
  align-self: end !important;
}

.warranty-claim-archive-list {
  width: 100% !important;
  box-sizing: border-box !important;
}

.warranty-claim-archive-row {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
  grid-template-columns: auto minmax(12rem, .95fr) minmax(10rem, 1fr) minmax(14rem, .9fr) !important;
}

/* Warranty audit inline feedback. */
.warranty-claim-audit-form [data-warranty-audit-message] {
  min-height: 24px !important;
  padding: 0 !important;
  text-align: left !important;
}

.warranty-claim-audit-form [data-warranty-audit-message]:empty {
  display: none !important;
}

/* Merchant profile summary card. */
.merchant-profile-layout {
  display: grid !important;
  width: min(100%, calc((100% - 16px) * 1.15 / 2)) !important;
  min-width: 0 !important;
}

.merchant-profile-layout > .card {
  width: 100% !important;
}

.merchant-profile-summary {
  display: grid !important;
  gap: var(--theme-space-4) !important;
  padding: var(--theme-space-4) !important;
  border: 1px solid var(--theme-border) !important;
  background: var(--theme-surface-high) !important;
}

.merchant-profile-summary-main {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: var(--theme-space-4) !important;
}

.merchant-profile-summary-main > div {
  display: grid !important;
  gap: 8px !important;
  min-width: 0 !important;
}

.merchant-profile-summary-main strong {
  color: var(--theme-text) !important;
  font-size: 26px !important;
  font-weight: 820 !important;
  line-height: 1.18 !important;
  overflow-wrap: anywhere !important;
}

.merchant-profile-code {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: var(--theme-space-3) !important;
  padding: 14px 16px !important;
  border-left: 4px solid var(--theme-primary) !important;
  background: var(--theme-surface) !important;
}

.merchant-profile-code span,
.merchant-profile-meta span {
  color: var(--theme-muted) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

.merchant-profile-code strong {
  color: var(--theme-primary) !important;
  font-size: 22px !important;
  font-weight: 820 !important;
  letter-spacing: .04em !important;
}

.merchant-profile-meta {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: var(--theme-space-3) !important;
}

.merchant-profile-meta article {
  display: grid !important;
  gap: 8px !important;
  min-width: 0 !important;
  padding: 13px 14px !important;
  border: 1px solid var(--theme-border-soft) !important;
  background: var(--theme-surface) !important;
}

.merchant-profile-meta strong {
  min-width: 0 !important;
  color: var(--theme-text) !important;
  font-size: 15px !important;
  font-weight: 760 !important;
  overflow-wrap: anywhere !important;
}

@media (max-width: 760px) {
  .merchant-profile-layout {
    width: 100% !important;
  }

  .merchant-profile-summary-main,
  .merchant-profile-code {
    display: grid !important;
  }

  .merchant-profile-meta {
    grid-template-columns: 1fr !important;
  }
}

/* Notice template placeholders: cleaner left utility panel. */
.notice-template-page .notice-placeholder-card {
  padding-left: 24px !important;
  padding-right: 24px !important;
  gap: 18px !important;
}

.notice-template-page .notice-placeholder-group {
  border-top: 0 !important;
  padding-top: 0 !important;
}

.notice-template-page .notice-placeholder-list {
  padding-left: 12px !important;
}

.notice-template-page .notice-placeholder-token {
  width: max-content !important;
  max-width: 100% !important;
}

/* Merchant orders final table sizing: prevent column squeeze while keeping the
   rebuilt order list aligned with the current design language. */
#merchantOrdersTable.table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
}

#merchantOrdersTable .merchant-orders-clean-table {
  width: 100% !important;
  min-width: 980px !important;
  table-layout: auto !important;
}

#merchantOrdersTable .merchant-orders-clean-table th,
#merchantOrdersTable .merchant-orders-clean-table td {
  padding-left: 14px !important;
  padding-right: 14px !important;
}

#merchantOrdersTable .merchant-orders-clean-table th:nth-child(1),
#merchantOrdersTable .merchant-orders-clean-table td:nth-child(1) {
  width: var(--order-no-column-width, max-content) !important;
  min-width: var(--order-no-column-width, max-content) !important;
  max-width: var(--order-no-column-width, max-content) !important;
  white-space: nowrap !important;
}

#merchantOrdersTable .merchant-orders-clean-table th:nth-child(2),
#merchantOrdersTable .merchant-orders-clean-table td:nth-child(2) {
  width: auto !important;
}

#merchantOrdersTable .merchant-orders-clean-table th:nth-child(3),
#merchantOrdersTable .merchant-orders-clean-table td:nth-child(3) {
  width: 12% !important;
}

#merchantOrdersTable .merchant-orders-clean-table th:nth-child(4),
#merchantOrdersTable .merchant-orders-clean-table td:nth-child(4) {
  width: 26% !important;
}

#merchantOrdersTable .order-no,
#merchantOrdersTable .order-subtle,
#merchantOrdersTable .order-number-cell,
#merchantOrdersTable .order-number-cell > small,
#merchantOrdersTable .order-customer,
#merchantOrdersTable .order-store-product,
#merchantOrdersTable .order-store-product > span,
#merchantOrdersTable .order-store-product > small {
  max-width: 100% !important;
}

#merchantOrdersTable .order-subtle,
#merchantOrdersTable .order-number-cell > small,
#merchantOrdersTable .order-customer > span,
#merchantOrdersTable .order-customer > small,
#merchantOrdersTable .order-store-product > span,
#merchantOrdersTable .order-store-product > small {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#merchantOrdersTable .merchant-order-actions {
  justify-content: flex-start !important;
}

#merchantOrdersTable .merchant-order-actions .btn,
#merchantOrdersTable .merchant-order-more-menu .btn[data-merchant-order-more-toggle] {
  min-height: var(--theme-control-height-sm) !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}

.merchant-login-submit {
  min-height: 52px !important;
  border-radius: var(--radius-pill) !important;
  padding-left: 32px !important;
  padding-right: 32px !important;
}
