:root {
  --text: #202532;
  --muted: #667085;
  --line: #d8dfeb;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --brand: #f06d00;
  --brand-strong: #df6200;
  --brand-weak: #fff2e8;
  --nav: #fffaf6;
  --good: #0f8f5f;
  --warn: #b45f06;
  --crm-sidebar-width: 153px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
}

.crm-auth-loading { min-height: 100vh; display: grid; place-items: center; color: var(--muted); background: var(--bg); }

.crm-recoverable-error p {
  margin: 0 0 14px;
}

.crm-recoverable-error button {
  border: 1px solid var(--orange);
  padding: 8px 18px;
  color: var(--orange);
  background: #fff;
  cursor: pointer;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.crm-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--crm-sidebar-width) minmax(0, 1fr);
  grid-template-rows: 50px minmax(0, 1fr);
  grid-template-areas: "appheader appheader" "sidebar main";
}

.crm-app-header { grid-area: appheader; display: flex; align-items: stretch; min-width: 0; background: #f06d00; color: #fff; box-shadow: 0 1px 3px rgba(91, 48, 12, .18); }
.crm-app-logo { width: var(--crm-sidebar-width); flex: 0 0 var(--crm-sidebar-width); display: flex; align-items: center; gap: 7px; padding: 0 12px; color: #fff; text-decoration: none; border-right: 1px solid rgba(255,255,255,.22); overflow: hidden; }
.crm-app-logo > span:first-child { display: grid; place-items: center; flex: 0 0 23px; width: 23px; height: 23px; background: #fff; color: #f06d00; border-radius: 4px; font-size: 12px; font-weight: 700; }
.crm-app-logo-copy { display: grid; flex: 1 1 auto; min-width: 0; gap: 1px; color: #fff; line-height: 1.15; white-space: nowrap; }
.crm-app-logo-copy strong { font-size: 14px; }
.crm-app-logo-copy small { color: rgba(255,255,255,.76); font-size: 9px; }
.crm-global-nav { display: flex; flex: 1 1 auto; align-items: stretch; min-width: 0; overflow-x: auto; }
.crm-global-nav a { position: relative; display: flex; align-items: center; gap: 5px; padding: 0 17px; color: rgba(255,255,255,.84); text-decoration: none; white-space: nowrap; }
.crm-global-nav a:hover, .crm-global-nav a.active { color: #fff; background: rgba(255,255,255,.1); }
.crm-global-nav a.active::after { content: ""; position: absolute; right: 12px; bottom: 0; left: 12px; height: 3px; background: #fff; }
.crm-app-notification-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: #e5484d; color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; }

.crm-notification-panel { position: fixed; z-index: 120; top: 54px; left: var(--notification-anchor-x, 50vw); display: flex; flex-direction: column; width: min(360px, calc(100vw - 24px)); height: min(520px, calc(100dvh - 66px)); max-height: min(520px, calc(100vh - 66px)); overflow: hidden; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); box-shadow: 0 12px 30px rgba(31, 36, 48, .2); }
.crm-notification-panel::before { content: ""; position: absolute; top: -7px; left: 50%; width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg); border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: #fff; }
.crm-notification-panel > header { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.crm-notification-panel > header div { display: flex; align-items: baseline; gap: 6px; }
.crm-notification-panel > header strong { color: #252b38; font-size: 15px; }
.crm-notification-panel > header span { color: #7b8495; font-size: 12px; }
.crm-notification-panel > header button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #6b7484; font-size: 20px; line-height: 1; }
.crm-notification-panel > header button:hover { background: #f4f5f7; color: #252b38; }
.crm-notification-list { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.crm-notification-breakdown { display: flex; gap: 16px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: #fff8f2; color: #697386; font-size: 12px; }
.crm-notification-breakdown strong { margin-left: 3px; color: var(--brand); }
.crm-notification-item.summary { background: #fff8f2; }
.crm-notification-item { position: relative; display: grid; gap: 4px; padding: 12px 72px 12px 14px; border-bottom: 1px solid #edf0f4; color: inherit; text-decoration: none; }
.crm-notification-item strong { overflow: hidden; color: #252b38; text-overflow: ellipsis; white-space: nowrap; }
.crm-notification-item small { overflow: hidden; color: #7b8495; text-overflow: ellipsis; white-space: nowrap; }
.crm-notification-item em { position: absolute; top: 50%; right: 14px; color: var(--brand); font-style: normal; font-size: 12px; transform: translateY(-50%); }
.crm-notification-item em.overdue { color: #c34232; }
.crm-notification-empty { padding: 26px 14px; color: #8a93a3; text-align: center; }
.crm-notification-panel > footer { padding: 10px 14px; border-top: 1px solid var(--line); background: #fafbfc; text-align: right; }
.crm-notification-panel > footer a { color: var(--brand); text-decoration: none; font-weight: 600; }
.crm-header-tools { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; margin-left: auto; }
.crm-header-tools .crm-user-menu { margin-left: 0; }
.crm-help-entry { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; height: 36px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; }
.crm-help-entry:hover { background: rgba(255,255,255,.16); }
.crm-help-entry-icon { display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid rgba(255,255,255,.68); border-radius: 50%; font-size: 13px; font-weight: 500; line-height: 1; }
.crm-release-backdrop { position: fixed; z-index: 310; inset: 0; display: none; place-items: center; padding: 24px; background: rgba(20,27,40,.48); }
.crm-release-backdrop.open { display: grid; }
.crm-release-dialog { display: grid; grid-template-rows: auto minmax(0,1fr) auto; width: min(560px, calc(100vw - 32px)); max-height: min(620px, calc(100vh - 32px)); overflow: hidden; border-radius: 8px; background: #fff; box-shadow: 0 24px 70px rgba(20,27,40,.28); }
.crm-release-dialog:focus { outline: none; }
.crm-release-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.crm-release-badge { display: inline-flex; margin-bottom: 7px; padding: 2px 8px; border-radius: 10px; background: var(--brand-weak); color: var(--brand); font-size: 11px; font-weight: 600; }
.crm-release-dialog h2 { margin: 0; color: #252b38; font-size: 21px; }
.crm-release-dialog header p { margin: 6px 0 0; color: #7b8495; font-size: 13px; }
.crm-release-dialog header button { width: 32px; height: 32px; border: 0; background: transparent; color: #6b7484; font-size: 25px; line-height: 1; }
.crm-release-dialog header button:hover { color: #252b38; }
.crm-release-content { overflow: auto; padding: 18px 24px; }
.crm-release-content section + section { margin-top: 18px; padding-top: 18px; border-top: 1px solid #edf0f4; }
.crm-release-section-label { margin-bottom: 10px; color: var(--brand); font-size: 12px; font-weight: 700; }
.crm-release-current { padding: 14px 16px; border: 1px solid #ffd7b8; border-radius: 6px; background: #fffaf6; }
.crm-release-history-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 0; padding: 16px 0 10px; border-top: 1px solid #e5e9ef; color: #2f3745; }
.crm-release-history-label strong { font-size: 15px; }
.crm-release-history-label span { color: #7b8495; font-size: 12px; }
.crm-release-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: #2f3745; }
.crm-release-heading strong { font-size: 16px; }
.crm-release-heading small { display: block; margin-top: 3px; color: #8a93a3; font-size: 11px; font-weight: 400; }
.crm-release-heading time { color: #7b8495; font-size: 12px; white-space: nowrap; }
.crm-release-content ul { display: grid; gap: 9px; margin: 0; padding-left: 20px; color: #596273; line-height: 1.65; }
.crm-release-dialog > footer { padding: 12px 24px; border-top: 1px solid var(--line); text-align: right; }
.crm-release-dialog > footer button { height: 36px; padding: 0 22px; border: 0; border-radius: 4px; background: var(--brand); color: #fff; }
.crm-help-backdrop { position: fixed; z-index: 300; inset: 0; display: none; place-items: center; padding: 4vh 24px; background: rgba(20,27,40,.48); }
.crm-help-backdrop.open { display: grid; }
.crm-help-dialog { display: grid; grid-template-rows: auto minmax(0,1fr) auto; width: min(1080px, calc(100vw - 32px)); max-height: 90vh; overflow: hidden; border-radius: 8px; background: #fff; box-shadow: 0 24px 70px rgba(20,27,40,.28); }
.crm-help-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.crm-help-dialog h2 { margin: 0; color: #252b38; font-size: 21px; }
.crm-help-page-badge { display: inline-flex; margin-bottom: 6px; padding: 2px 8px; border-radius: 10px; background: var(--brand-weak); color: var(--brand); font-size: 11px; font-weight: 600; }
.crm-help-dialog header p { margin: 6px 0 0; color: #7b8495; font-size: 13px; }
.crm-help-dialog header button { width: 32px; height: 32px; border: 0; background: transparent; color: #6b7484; font-size: 25px; }
.crm-help-content { overflow: auto; padding: 18px 24px; color: #343b49; }
.crm-help-content section { padding: 0 0 16px; margin: 0 0 16px; border-bottom: 1px solid #edf0f4; }
.crm-help-content section:last-child { margin-bottom: 0; border-bottom: 0; }
.crm-help-content h3 { margin: 0 0 7px; color: #2f3745 !important; font-size: 16px; font-weight: 700; }
.crm-help-content p { margin: 0; color: #596273; line-height: 1.75; }
.crm-help-content ol,.crm-help-content ul { display: grid; gap: 7px; margin: 0; padding-left: 22px; color: #596273; line-height: 1.65; }
.crm-help-highlight { margin-top: 12px; padding: 12px 14px; border-left: 3px solid var(--brand); background: #fff8f2; }
.crm-help-highlight strong { display: block; margin-bottom: 5px; color: #2b313d; }
.crm-help-warning { margin: 12px 0 16px; padding: 12px 14px; border-left: 3px solid #c34232; background: #fff3f1; }
.crm-help-warning strong { display: block; margin-bottom: 5px; color: #9d3027; }
.crm-help-flow { display: flex; align-items: stretch; gap: 8px; padding: 4px 0 6px; overflow-x: auto; }
.crm-help-flow-step { display: inline-flex; flex: 1 0 118px; align-items: center; gap: 8px; min-height: 48px; padding: 9px 11px; border: 1px solid #e3e7ed; border-radius: 5px; background: #fafbfc; color: #3f4858; line-height: 1.4; }
.crm-help-flow-step b { display: grid; flex: 0 0 22px; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; font-size: 11px; }
.crm-help-flow-arrow { display: grid; flex: 0 0 14px; place-items: center; color: #d66a11; font-size: 18px; }
.crm-help-content .crm-help-flow-note { margin-top: 7px; padding: 9px 11px; border-left: 3px solid #f1a363; background: #fff9f3; color: #76583f; font-size: 12px; }
.crm-help-dialog > footer { padding: 12px 24px; border-top: 1px solid var(--line); text-align: right; }
.crm-help-dialog > footer button { height: 36px; padding: 0 22px; border: 0; border-radius: 4px; background: var(--brand); color: #fff; }

.crm-user-menu { position: relative; z-index: 90; display: flex; flex: 0 0 auto; align-items: center; margin-left: auto; padding: 0 14px; }
.crm-user-chip { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 5px 4px; border: 0; border-radius: 6px; background: transparent; color: #fff; font-weight: 600; white-space: nowrap; }
.crm-user-chip:hover { background: rgba(255,255,255,.12); }
.crm-user-avatar { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(255,255,255,.48); border-radius: 50%; background: rgba(255,255,255,.28); font-weight: 400; }
.crm-user-chevron { width: 8px; height: 8px; margin: -3px 3px 0 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transform-origin: 50% 50%; transition: transform .15s ease; }
.crm-user-menu.open .crm-user-chevron { margin-top: 3px; transform: rotate(225deg); }
.crm-user-dropdown { position: absolute; top: calc(100% + 8px); right: 14px; display: none; width: 168px; padding: 10px; border-radius: 18px; background: #fff; color: #222; box-shadow: 0 10px 28px rgba(0,0,0,.18); }
.crm-user-menu.open .crm-user-dropdown { display: grid; gap: 4px; }
.crm-user-dropdown::before { content: ""; position: absolute; top: -8px; right: 24px; border-right: 8px solid transparent; border-bottom: 8px solid #fff; border-left: 8px solid transparent; }
.crm-user-dropdown a,
.crm-user-dropdown button { display: flex; width: 100%; align-items: center; gap: 10px; min-height: 42px; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; color: #222; text-decoration: none; text-align: left; font: inherit; font-size: 15px; }
.crm-user-dropdown a:hover,
.crm-user-dropdown button:hover { background: #f4f4f4; }
.crm-user-menu-icon { display: grid; place-items: center; width: 24px; font-size: 20px; line-height: 1; }

.crm-system-settings-backdrop { position: fixed; z-index: 360; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(26, 33, 44, .48); }
.crm-system-settings-backdrop[hidden] { display: none; }
.crm-system-settings-dialog { width: min(560px, calc(100vw - 32px)); border-radius: 10px; background: #fff; color: #252b38; box-shadow: 0 24px 70px rgba(20, 27, 38, .28); outline: none; }
.crm-system-settings-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px 18px; border-bottom: 1px solid var(--line); }
.crm-system-settings-dialog h2 { margin: 0 0 7px; font-size: 24px; }
.crm-system-settings-dialog header p { margin: 0; color: var(--muted); font-size: 13px; }
.crm-system-settings-dialog header button { border: 0; background: transparent; color: #697386; font-size: 28px; line-height: 1; }
.crm-system-settings-dialog form { padding: 24px 26px; }
.crm-system-settings-dialog label > span { display: block; margin-bottom: 10px; font-weight: 700; }
.crm-system-settings-dialog label > div { display: flex; align-items: center; gap: 10px; }
.crm-system-settings-dialog input { width: 150px; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 5px; font: inherit; }
.crm-system-settings-dialog select[name="trademarkIntakeResponsibleRole"] { width: 150px; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: inherit; font: inherit; }
.crm-system-settings-dialog label em { color: var(--muted); font-style: normal; }
.crm-system-settings-dialog label small { display: block; margin-top: 10px; color: var(--muted); line-height: 1.7; }
.crm-system-settings-dialog [data-crm-system-settings-status] { min-height: 22px; margin: 16px 0 0; color: #b45309; font-size: 13px; }
.crm-system-settings-dialog footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.crm-system-settings-dialog footer button { min-width: 92px; height: 38px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.crm-system-settings-dialog footer .primary { border-color: var(--brand); background: var(--brand); color: #fff; }

.crm-sound-settings-body { padding: 24px 26px 10px; }
.crm-sound-settings-body label > span { display: block; margin-bottom: 10px; font-weight: 700; }
.crm-sound-settings-body select { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: #252b38; font: inherit; }
.crm-sound-settings-body small { display: block; margin-top: 10px; color: var(--muted); line-height: 1.7; }
.crm-sound-settings-body [data-crm-sound-settings-status] { min-height: 22px; margin: 13px 0 0; color: #b45309; font-size: 13px; }
.crm-system-settings-dialog > footer { display: flex; justify-content: flex-end; gap: 10px; padding: 10px 26px 24px; }

.crm-sidebar {
  grid-area: sidebar;
  background: var(--nav);
  color: var(--text);
  padding: 14px 12px;
  border-right: 1px solid var(--line);
}

.crm-workspace-label { padding: 4px 10px 12px; color: #8a8f99; font-size: 13px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }

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

.crm-sidebar nav button,
.crm-sidebar nav a {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: #394150;
  text-align: left;
  padding: 11px 12px;
  border-radius: 6px;
  display: block;
  text-decoration: none;
}

.crm-nav-group { margin: 2px 0; }
.crm-nav-group-title { padding: 11px 12px 7px; color: #394150; font-weight: 600; }
.crm-nav-group.active > .crm-nav-group-title { color: var(--brand); }
.crm-nav-children { display: grid; gap: 2px; padding: 0 0 4px 2px; }
.crm-sidebar nav a.crm-nav-secondary { display: flex; align-items: center; padding: 8px 8px 8px 10px; color: #657084; font-size: 13px; white-space: nowrap; }
.crm-sidebar nav a.crm-nav-secondary::before { content: ""; display: inline-block; flex: 0 0 4px; width: 4px; height: 4px; margin: 0 7px 0 0; border-radius: 50%; background: #c2c8d2; }
.crm-sidebar nav a.crm-nav-secondary.active, .crm-sidebar nav a.crm-nav-secondary:hover { color: var(--brand); }
.crm-sidebar nav a.crm-nav-secondary.active::before { background: var(--brand); }

.crm-sidebar nav button.active,
.crm-sidebar nav button:hover,
.crm-sidebar nav a.active,
.crm-sidebar nav a:hover {
  background: #fff;
  border-color: var(--line);
  color: var(--brand);
  box-shadow: 0 1px 2px rgba(31, 36, 48, 0.05);
}

.crm-main {
  grid-area: main;
  min-width: 0;
  padding: 0;
}

@media (max-width: 760px) {
  .crm-shell { grid-template-columns: 1fr; grid-template-rows: 50px auto 1fr; grid-template-areas: "appheader" "sidebar" "main"; }
  .crm-app-logo { width: 176px; min-width: 176px; flex-basis: 176px; }
  .crm-sidebar { overflow-x: auto; }
  .crm-sidebar nav { display: flex; }
  .crm-sidebar nav a { white-space: nowrap; }
  .crm-workspace-label { display: none; }
  .crm-user-menu { padding: 0 8px; }
  .crm-user-chip > span:nth-child(2) { display: none; }
}

.crm-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
  padding: 18px 22px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.crm-topbar h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.crm-topbar p {
  margin: 5px 0 0;
  color: var(--muted);
}

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

.crm-actions button,
.crm-panel header button,
.customer-form button {
  min-height: 36px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 0 14px;
  border-radius: 6px;
}

.crm-actions .crm-import-action {
  border-color: #ff6a00;
  background: #ff6a00;
  color: #fff;
}

.crm-actions .crm-import-action:hover {
  border-color: #f05f00;
  background: #f05f00;
}

.crm-actions .crm-report-action {
  border-color: #ff6a00;
  color: #e85f00;
}

.crm-actions .crm-report-action:hover {
  background: #fff5ed;
}

.crm-alert,
.metric-grid,
.crm-panel {
  margin-left: 22px;
  margin-right: 22px;
}

.customer-form button {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.crm-alert {
  border: 1px solid #f0c36d;
  background: #fff8e8;
  color: #7a4a00;
  padding: 10px 12px;
  border-radius: 6px;
  margin-top: 16px;
  margin-bottom: 14px;
}

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

.metric {
  min-height: 94px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
}

.metric span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

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

.crm-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
  overflow: hidden;
}

.crm-panel header {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.crm-panel h2 {
  margin: 0;
  font-size: 16px;
}

.crm-panel header span {
  color: var(--muted);
}

.tab-panel-meta {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.tab-panel-meta-with-hint {
  justify-content: space-between;
  gap: 16px;
}

.panel-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

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

.crm-pagination {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding: 12px 20px;
  border-top: 1px solid #e7eaf0;
  background: #fff;
  color: #596174;
}

.crm-pagination-top {
  border-top: 0;
  border-bottom: 1px solid #e7eaf0;
}

.crm-pagination-pages,
.crm-pagination-jump,
.crm-pagination-size {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crm-pagination-page {
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d9deea;
  border-radius: 4px;
  background: #fff;
  color: #394150;
  padding: 0 9px;
  text-decoration: none;
}

.crm-pagination-page:hover {
  border-color: var(--brand);
  color: var(--brand);
}

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

.crm-pagination-page.disabled {
  border-color: #edf0f5;
  color: #c0c5cf;
  cursor: default;
}

.crm-pagination-ellipsis {
  min-width: 24px;
  color: #8a92a1;
  text-align: center;
}

.crm-pagination-jump input {
  width: 64px;
  height: 34px;
  border: 1px solid #d9deea;
  border-radius: 4px;
  padding: 0 8px;
  color: #303746;
  text-align: center;
}

.crm-pagination-jump button,
.crm-pagination-size select {
  height: 34px;
  border: 1px solid #d9deea;
  border-radius: 4px;
  background: #fff;
  color: #303746;
  padding: 0 13px;
}

.crm-pagination-jump button {
  cursor: pointer;
}

.crm-pagination-total {
  color: #4c5567;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .crm-pagination {
    align-items: flex-end;
    flex-wrap: wrap;
  }
}

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

th,
td {
  padding: 11px 14px;
  border-bottom: 1px solid #edf0f5;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

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

td strong {
  display: block;
  font-weight: 650;
}

td span:not(.status-pill):not(.monitor-dynamic-count) {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--brand-weak);
  color: var(--brand);
  font-size: 12px;
}

.create-panel {
  padding-bottom: 14px;
}

.customer-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) 150px 150px 150px minmax(180px, 1fr) 90px;
  gap: 10px;
  padding: 14px;
}

.customer-form input,
.customer-form select,
.import-form input,
.import-form select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
}

.import-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(220px, 1fr) 150px 90px minmax(220px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 14px;
}

.import-form button {
  min-height: 38px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  padding: 0 14px;
  border-radius: 6px;
}

.import-form button:disabled {
  opacity: 0.55;
  cursor: default;
}

.import-form span {
  color: var(--muted);
}

.filter-panel {
  overflow: visible;
}

.filter-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(150px, 1fr)) repeat(4, minmax(130px, 0.8fr)) 74px 74px;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.filter-form input,
.filter-form select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
}

.filter-form button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

.filter-form button[type="submit"] {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.filter-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #edf0f5;
}

.filter-summary strong {
  color: #263043;
}

.filter-summary span {
  color: var(--muted);
}

.facet-block {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 14px;
  padding: 14px;
  background: #fbfcfe;
}

.facet-block h3 {
  margin: 0 0 8px;
  color: #475467;
  font-size: 13px;
}

.facet-list,
.facet-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.facet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.facet-list button,
.facet-grid button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #e5e9f0;
  border-radius: 6px;
  background: #fff;
  color: #394150;
  padding: 0 10px;
}

.facet-list button.active,
.facet-grid button.active,
.facet-list button:hover,
.facet-grid button:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-weak);
}

.facet-list button strong,
.facet-grid button strong {
  color: #f06b1d;
  font-size: 12px;
}

.qds-filter-panel {
  margin: 16px 22px 14px;
  background: #f7f7f7;
  border: 0;
  border-radius: 0;
  color: #222;
}

.qds-filter-panel form {
  padding: 8px 14px 10px;
}

.qds-filter-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 58px;
  gap: 2px;
  align-items: center;
  min-height: 42px;
}

.qds-filter-label {
  border: 0;
  background: transparent;
  color: #555;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
  padding: 0;
}

.qds-filter-label:hover {
  color: #ff6a00;
}

.qds-filter-options {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.qds-filter-options > button {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #222;
  padding: 0;
  white-space: nowrap;
}

.qds-filter-options > button.qds-extra {
  display: none;
}

.qds-filter-row.expanded .qds-filter-options > button.qds-extra {
  display: inline-flex;
}

.qds-category-row .qds-filter-options {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 10px;
}

.qds-category-row .qds-filter-options > button {
  min-width: 0;
  justify-content: flex-start;
}

.qds-category-row .qds-filter-options > button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qds-filter-options > button.active,
.qds-filter-options > button:hover {
  color: #ff6a00;
}

.qds-filter-options > button strong {
  min-width: 18px;
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  background: #fff2e9;
  color: #ff6a00;
  font-size: 12px;
  font-weight: 600;
  padding: 0 5px;
}

.qds-more {
  justify-self: end;
  border: 0;
  background: transparent;
  color: #555;
  font-size: 13px;
}

.qds-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #222;
  white-space: nowrap;
}

.qds-check input {
  width: 14px;
  height: 14px;
  accent-color: #ff6a00;
}

.qds-small-input,
.qds-search-line input {
  height: 32px;
  border: 1px solid #d8dee9;
  border-radius: 4px;
  background: #fff;
  color: #222;
  padding: 0 12px;
}

.qds-small-input {
  width: 168px;
}

.qds-search-line {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 22px;
  gap: 10px;
  align-items: center;
  width: min(100%, 1010px);
}

.qds-search-line span {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #ff9b5a;
  border-radius: 50%;
  color: #ff6a00;
  font-size: 12px;
}

.qds-filter-footer {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #555;
  font-size: 13px;
}

.qds-filter-footer button {
  border: 0;
  background: transparent;
  color: #555;
}

.qds-filter-footer button[type="submit"] {
  min-height: 30px;
  border: 1px solid #ff8a3d;
  border-radius: 3px;
  background: #ff6a00;
  color: #fff;
  padding: 0 14px;
}

.trademark-assets-panel {
  overflow: visible;
}

.asset-list {
  display: grid;
  padding: 0;
}

.asset-card {
  position: relative;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr) 112px;
  gap: 18px;
  min-height: 204px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid #edf0f5;
  background: #fff;
}

.asset-card:last-child {
  border-bottom: 0;
}

.import-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(16, 24, 40, 0.34);
  padding: 24px;
}

.import-dialog-open .import-dialog-backdrop {
  display: flex;
}

.import-dialog {
  width: min(560px, 100%);
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.22);
}

.import-dialog header,
.import-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #edf0f5;
}

.import-dialog footer {
  justify-content: flex-end;
  border-top: 1px solid #edf0f5;
  border-bottom: 0;
}

.import-dialog h2 {
  margin: 0;
  font-size: 18px;
}

.import-dialog header button {
  border: 0;
  background: transparent;
  color: #667085;
  font-size: 24px;
}

.import-dialog-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.import-dialog-body label {
  display: grid;
  gap: 6px;
  color: #475467;
  font-size: 13px;
}

.import-dialog-body input,
.import-dialog-body select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 0 10px;
}

.import-dialog-body p,
.import-dialog-body span {
  margin: 0;
  color: var(--muted);
}

.import-dialog footer button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 0 14px;
}

.import-dialog footer button[data-action="importTrademarkAssets"] {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.report-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 52;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(16, 24, 40, 0.36);
  padding: 24px;
}

.report-dialog-open .report-dialog-backdrop {
  display: flex;
}

.report-dialog {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.22);
}

.report-dialog header,
.report-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid #edf0f5;
}

.report-dialog header h2,
.report-dialog header p {
  margin: 0;
}

.report-dialog header h2 {
  font-size: 19px;
}

.report-dialog header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.report-dialog header > button {
  border: 0;
  background: transparent;
  color: #667085;
  font-size: 24px;
}

.report-dialog-body {
  display: grid;
  gap: 16px;
  min-height: 280px;
  overflow: auto;
  padding: 20px;
}

.report-file-picker {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px dashed #ff9a52;
  border-radius: 6px;
  background: #fffaf6;
  cursor: pointer;
}

.report-file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.report-file-picker strong {
  color: #e85f00;
}

.report-file-picker span,
.report-match-note {
  color: var(--muted);
  font-size: 13px;
}

.report-notify-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 48px;
}

.report-notify-row > label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #475467;
}

.report-notify-row input[type="time"] {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
}

.report-switch input {
  width: 16px;
  height: 16px;
  accent-color: #ff6a00;
}

.report-match-note {
  margin: 0;
  padding: 10px 12px;
  background: #f7f8fa;
}

.report-upload-results {
  display: grid;
  gap: 8px;
}

.report-upload-results > p {
  margin: 0;
}

.report-result-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-left: 3px solid #12a06a;
  background: #f5fbf8;
}

.report-result-item.warning {
  border-left-color: #f79009;
  background: #fffaeb;
}

.report-result-item.error,
.report-result-error {
  border-left-color: #d92d20;
  background: #fef3f2;
  color: #b42318;
}

.report-result-item span {
  color: #667085;
  font-size: 13px;
}

.crm-file-drop {
  position: relative;
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 92px;
  padding: 14px 18px;
  overflow: hidden;
  border: 1px dashed #ff9a52;
  border-radius: 6px;
  background: #fffaf6;
  color: #667085;
  text-align: center;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
  cursor: pointer;
}

.crm-file-drop.is-dragover {
  border-color: var(--brand);
  background: #fff2e8;
  box-shadow: 0 0 0 3px rgba(255,106,0,.12);
}

.crm-file-drop.has-error { border-color: #d92d20; background: #fff5f4; }
.crm-file-drop.is-disabled { border-color: #d8ddea; background: #f4f5f7; opacity: .68; cursor: not-allowed; }
.crm-file-drop.is-disabled input[type="file"] { pointer-events: none; cursor: not-allowed; }
.crm-file-drop.is-disabled strong { color: #8a93a3; }
.crm-file-drop input[type="file"] { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.crm-file-drop strong { color: #d85f00; font-size: 14px; font-weight: 600; }
.crm-file-drop small { color: #7a8393; font-size: 12px; font-weight: 400; line-height: 1.45; }
.crm-file-drop [data-file-drop-name] { max-width: 100%; overflow: hidden; color: #596477; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.crm-file-drop.has-error [data-file-drop-name] { color: #b42318; }
.copyright-upload-dialog .wide { grid-column: 1/-1; }

.report-dialog footer {
  justify-content: flex-end;
  border-top: 1px solid #edf0f5;
  border-bottom: 0;
}

.report-dialog footer button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 16px;
}

.report-dialog footer button[data-action="uploadTrademarkReports"] {
  border-color: #ff6a00;
  background: #ff6a00;
  color: #fff;
}

@media (max-width: 720px) {
  .report-notify-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

.asset-pagination {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid #edf0f5;
  background: #fff;
}

.asset-pagination button {
  min-width: 34px;
  min-height: 32px;
  border: 1px solid #d8dee9;
  border-radius: 4px;
  background: #fff;
  color: #394150;
  padding: 0 10px;
}

.asset-pagination button.active {
  border-color: #ff6a00;
  background: #ff6a00;
  color: #fff;
}

.asset-pagination button:disabled {
  opacity: 0.45;
  cursor: default;
}

.asset-pagination span,
.asset-pagination em {
  color: var(--muted);
  font-style: normal;
}

.asset-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 32px;
}

.asset-thumb {
  width: 104px;
  height: 104px;
  object-fit: contain;
}

.asset-thumb-placeholder {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #111827;
  font-weight: 700;
  font-size: 18px;
}

.process-text,
.asset-side,
.asset-address span,
.asset-process span,
.asset-goods span {
  color: var(--muted);
  font-size: 12px;
}

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

.asset-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.asset-heading h3 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.asset-heading span,
.asset-archive-link {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 0;
  padding: 0 9px;
  border-radius: 3px;
  background: #eef5ff;
  color: #3578e5;
  font-size: 12px;
}

.asset-archive-link:hover {
  background: #e3efff;
}

.asset-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 10px 28px;
  margin: 0 0 11px;
}

.asset-facts div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: baseline;
  min-width: 0;
}

.asset-facts dt {
  color: #555f6d;
  font-size: 13px;
}

.asset-facts dd {
  margin: 0;
  overflow: hidden;
  color: #111827;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-facts .fact-status {
  color: #ff5b00;
}

.asset-facts .entity-fact {
  position: relative;
  overflow: visible;
}

.asset-facts .entity-fact dd {
  overflow: visible;
}

.entity-value-wrap {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  overflow: visible;
}

.entity-name-trigger {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 4px;
  color: #111827;
  font-weight: 400;
  text-align: left;
}

.entity-name-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-name-trigger i {
  width: 0;
  height: 0;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  border-bottom: 7px solid #ff6a00;
  transform: translateY(-1px);
}

.entity-value-wrap::before {
  position: absolute;
  top: 100%;
  left: -48px;
  z-index: 19;
  display: none;
  width: 456px;
  height: 16px;
  content: "";
}

.entity-value-wrap:has(.entity-popover.compact)::before {
  width: 316px;
}

.entity-value-wrap:hover::before {
  display: block;
}

.entity-popover {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  display: none;
  width: 432px;
  min-height: 42px;
  align-items: center;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #fff;
  border: 1px solid #eef0f4;
  box-shadow: 0 6px 18px rgba(31, 36, 48, 0.14);
  transform: translate(-36px, 2px);
}

.entity-popover.compact {
  width: 292px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.entity-value-wrap:hover .entity-popover {
  display: grid;
}

.asset-facts .entity-fact:nth-child(3n) .entity-popover {
  right: 0;
  left: auto;
  transform: translate(0, 2px);
}

.asset-facts .entity-fact:nth-child(3n) .entity-value-wrap::before {
  right: -12px;
  left: auto;
}

.entity-menu-item {
  position: relative;
  display: flex;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  background: #fff;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.entity-menu-item + .entity-menu-item {
  border-left: 1px solid #dfe3ea;
}

.entity-menu-item:hover {
  background: #fafbff;
  color: #ff6a00;
}

.entity-menu-item.monitor.monitored {
  color: #ff6a00;
}

.entity-menu-item b {
  position: relative;
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  color: inherit;
  font-size: 10px;
  font-style: normal;
  flex: 0 0 auto;
}

.entity-menu-item.all b {
  border: 2px solid #f59e0b;
  border-radius: 999px;
}

.entity-menu-item.all b::after {
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 8px;
  height: 2px;
  background: #f59e0b;
  border-radius: 999px;
  content: "";
  transform: rotate(45deg);
}

.entity-menu-item.business b {
  border-radius: 4px;
  background: #5b8def;
  color: #fff;
}

.entity-menu-item.business b::before {
  content: "商";
}

.entity-menu-item.monitor b {
  border: 2px solid #f59e0b;
  border-radius: 999px;
}

.entity-menu-item.monitor b::before,
.entity-menu-item.monitor b::after {
  position: absolute;
  background: #f59e0b;
  content: "";
}

.entity-menu-item.monitor b::before {
  top: -4px;
  bottom: -4px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
}

.entity-menu-item.monitor b::after {
  left: -4px;
  right: -4px;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
}

.asset-address,
.asset-process,
.asset-goods {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 8px;
  margin-top: 9px;
  color: #111827;
  font-size: 13px;
}

.asset-process,
.asset-goods {
  line-height: 1.55;
}

.asset-goods {
  align-items: start;
  grid-template-columns: 74px minmax(0, 1fr) auto;
}

.asset-goods p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-goods button {
  width: max-content;
  min-height: 24px;
  border: 0;
  border-radius: 3px;
  background: #f3f4f6;
  color: #8a93a3;
  padding: 0 9px;
}

.asset-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  text-align: right;
}

.asset-side a {
  color: #111827;
  font-size: 13px;
  text-decoration: none;
}

.asset-detail-link {
  border: 0 !important;
  background: transparent !important;
  color: #111827 !important;
  padding: 0 !important;
  min-height: auto !important;
  font-size: 13px;
}

.trademark-archive-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  background: rgba(255, 255, 255, 0.97);
}

.trademark-archive-open {
  overflow: hidden;
}

.trademark-archive-open .trademark-archive-backdrop {
  display: block;
}

.trademark-archive-dialog {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: 112px minmax(0, 1fr);
  background: #fff;
  color: #606266;
}

.trademark-archive-dialog > header {
  display: grid;
  place-items: center;
  padding: 28px 72px 12px;
}

.trademark-archive-dialog h2 {
  margin: 0;
  color: #606266;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0;
}

.trademark-archive-close {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #ff6a00;
  font-size: 34px;
  font-weight: 200;
  line-height: 1;
}

.trademark-archive-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 20px 28px;
}

.trademark-archive-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: #606266;
  font-size: 16px;
}

.trademark-archive-table th,
.trademark-archive-table td {
  border: 1px solid #a8a8a8;
  padding: 8px 14px;
  vertical-align: middle;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.trademark-archive-table th {
  width: 12%;
  background: #fff;
  font-weight: 600;
  text-align: right;
}

.trademark-archive-table td {
  width: 38%;
}

.trademark-archive-table .archive-mark-row {
  height: 278px;
}

.trademark-archive-table .archive-mark-cell {
  padding: 20px 70px;
}

.archive-mark-cell img {
  display: block;
  width: 100%;
  height: 230px;
  object-fit: contain;
}

.archive-mark-cell span {
  display: block;
  color: #111;
  font-size: clamp(26px, 3.1vw, 52px);
  text-align: center;
}

.trademark-archive-table .archive-status {
  color: #ff5b00;
  font-weight: 600;
}

.trademark-archive-table .archive-long-value {
  min-height: 72px;
  white-space: normal;
}

@media (max-width: 760px) {
  .trademark-archive-dialog {
    grid-template-rows: 82px minmax(0, 1fr);
  }

  .trademark-archive-dialog > header {
    padding: 20px 56px 8px;
  }

  .trademark-archive-dialog h2 {
    font-size: 19px;
  }

  .trademark-archive-scroll {
    padding: 8px 10px 20px;
  }

  .trademark-archive-table {
    min-width: 760px;
    font-size: 14px;
  }

  .trademark-archive-table .archive-mark-row {
    height: 210px;
  }
}

.asset-side button {
  min-height: 30px;
  border: 1px solid #9bceff;
  border-radius: 2px;
  background: #eef7ff;
  color: #1684ff;
  padding: 0 10px;
}

.asset-side button:hover,
.asset-side a:hover {
  color: #006fd6;
}

.asset-side button.asset-monitored {
  border-color: #ffd7bc;
  background: #fff5ee;
  color: #ff6a00;
}

.empty-cell,
.crm-loading {
  color: var(--muted);
  text-align: center;
  padding: 34px 14px;
  margin: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* Keep modal context and its close control available while long forms scroll. */
.order-editor > header,
.order-trademark-editor > header,
.workflow-modal > header,
.monitor-dialog > header,
.import-dialog > header,
.asset-claim-dialog > header,
.trademark-archive-dialog > header,
.report-dialog > header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
}

@media (max-width: 900px) {
  .crm-help-entry > span:last-child { display: none; }
  .crm-help-entry { width: 36px; justify-content: center; padding: 0; }
  .crm-help-backdrop { padding: 12px; }
  .crm-help-dialog { width: 100%; max-height: calc(100vh - 24px); }
  .crm-help-flow-step { flex-basis: 132px; }

  .crm-shell {
    grid-template-columns: 1fr;
  }

  .crm-sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .crm-brand {
    display: none;
  }

  .crm-sidebar nav {
    display: flex;
    overflow-x: auto;
  }

  .crm-sidebar nav button,
  .crm-sidebar nav a {
    width: auto;
    white-space: nowrap;
  }

  .crm-main {
    padding: 0;
  }

  .crm-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .crm-alert,
  .metric-grid,
  .crm-panel {
    margin-left: 14px;
    margin-right: 14px;
  }

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

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

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

  .filter-form,
  .facet-block,
  .facet-grid,
  .qds-filter-row,
  .qds-search-line {
    grid-template-columns: 1fr;
  }

  .qds-filter-panel {
    margin-left: 14px;
    margin-right: 14px;
  }

  .qds-more {
    justify-self: start;
  }

  .qds-category-row .qds-filter-options {
    grid-template-columns: 1fr;
  }

  .asset-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .asset-facts {
    grid-template-columns: 1fr;
  }

  .asset-side {
    align-items: flex-start;
    text-align: left;
  }

  .asset-mark {
    justify-content: flex-start;
    padding-top: 0;
  }
}
