:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2933;
  background: #f6f7f9;
  --page-bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-muted: #eef2f7;
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --border: #d8e0eb;
  --border-soft: #e6edf5;
  --primary: #172554;
  --primary-hover: #1e3a8a;
  --success: #047857;
  --success-bg: #ecfdf5;
  --warning: #c2410c;
  --warning-bg: #fff7ed;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --info: #1d4ed8;
  --info-bg: #eff6ff;
  --radius: 10px;
  --radius-lg: 12px;
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 10px 24px rgba(15, 23, 42, 0.06);
  --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

body {
  background: var(--page-bg);
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.site-footer {
  color: #64748b;
  font-size: 12px;
  padding: 18px 24px 24px;
  text-align: center;
}

.site-footer a {
  color: #64748b;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

* {
  box-sizing: border-box;
}

header {
  background: var(--primary);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 22px rgba(15, 23, 42, 0.16);
  color: #fff;
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 90;
}

main {
  padding: 16px 22px 26px;
}

h1 {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.25;
  margin: 0;
}

button,
input,
select,
textarea {
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  font: inherit;
  font-size: 13px;
  line-height: 1.35;
  min-height: 36px;
  padding: 8px 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

button {
  align-items: center;
  background: #fff;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  gap: 6px;
  justify-content: center;
  white-space: nowrap;
}

input,
select,
textarea {
  background: #fff;
  color: var(--text-main);
  min-width: 0;
  width: 100%;
}

textarea {
  overflow-wrap: anywhere;
}

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

button:hover:not(:disabled),
.image-upload-label:hover,
.note-image-upload-button:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
.image-upload-label:focus-within,
.note-image-upload-button:focus-within {
  border-color: #2563eb;
  box-shadow: var(--focus-ring);
  outline: none;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

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

th,
td {
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
  line-height: 1.45;
  padding: 9px 10px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--surface-soft);
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  position: sticky;
  top: 0;
  white-space: nowrap;
  z-index: 1;
}

td {
  color: var(--text-body);
  overflow-wrap: anywhere;
}

tr:nth-child(4n + 1),
tr:nth-child(4n + 2) {
  background: #fff;
}

tr:nth-child(4n + 3),
tr:nth-child(4n + 4) {
  background: #f6f7f9;
}

tbody tr:hover {
  background: #f8fbff;
}

.toolbar {
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 12px 14px;
}

.admin-toast {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  min-width: 160px;
  padding: 10px 14px;
  position: fixed;
  right: 24px;
  top: 18px;
  transform: translateY(0);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 1000;
}

.admin-toast.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

.admin-toast.success {
  background: #0f766e;
}

.admin-toast.error {
  background: #991b1b;
}

button.busy {
  opacity: 0.72;
  pointer-events: none;
}

.muted {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.status-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-gutter: stable;
}

.status-tabs .status-tab {
  flex: 0 0 168px;
}

.status-tabs .status-tab .tab-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-tabs .status-tab .count {
  flex: 0 0 auto;
}

.module-tabs {
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: visible;
  padding: 9px 10px;
  position: sticky;
  scrollbar-gutter: stable;
  top: 50px;
  z-index: 70;
}

.module-tab-row {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-gutter: stable;
}

.module-tab-row + .module-tab-row {
  border-top: 1px solid #e8eef7;
  padding-top: 8px;
}

.module-tab-group {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  min-width: 0;
}

.module-tab-row-products .module-tab-group {
  flex: 1 1 auto;
}

.module-tab-group-title {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: var(--text-muted);
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  padding: 5px 9px;
}

.module-tab-group-items {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 8px;
}

.module-tab-row-products .module-tab-group-items {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-gutter: stable;
}

.role-bar {
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 10px 14px;
}

.role-title {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.role-select {
  max-width: 220px;
}

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

.logout-button {
  background: #f8fafc;
  border-color: var(--border);
  color: var(--text-body);
  font-weight: 800;
  min-height: 34px;
  min-width: 92px;
  padding: 7px 12px;
}

.login-wrap {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 140px);
}

.login-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
  max-width: 520px;
  padding: 24px;
  width: 100%;
}

.login-card h2 {
  font-size: 22px;
  margin: 0 0 6px;
}

.login-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  font-weight: 800;
  margin-top: 12px;
  padding: 9px 10px;
}

.password-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  margin-bottom: 12px;
  padding: 12px;
}

.admin-user-form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.admin-users-list {
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 300px);
  overflow: auto;
  padding-right: 4px;
}

.admin-user-card {
  background: #fff;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  padding: 14px;
}

.message-page-shell {
  display: grid;
  gap: 12px;
  margin: 0 auto;
  max-width: 1480px;
  width: 100%;
}

.customer-form.message-form {
  border-color: #d8e0eb;
  padding: 12px;
}

.message-form-head {
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
}

.message-form-copy {
  min-width: 0;
}

.message-editor-layout {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 460px);
}

.message-main-panel,
.message-side-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.message-side-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
}

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

.message-side-wide {
  grid-column: 1 / -1;
}

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

.message-form input,
.message-form select {
  min-height: 36px;
}

.customer-form.message-form textarea {
  line-height: 1.5;
  min-height: 126px;
}

.message-poster-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 164px;
}

.message-poster-row input[type="file"] {
  font-size: 12px;
  min-height: 36px;
  padding: 6px 8px;
}

.message-poster-preview {
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  display: block;
  height: 104px;
  margin-top: 8px;
  object-fit: cover;
  width: 184px;
}

.message-uploading {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
}

.message-switch-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.message-toggle,
.message-check {
  align-items: center;
  background: #fff;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  color: #334155;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  min-height: 36px;
  min-width: 120px;
  padding: 0 10px;
}

.message-toggle input,
.message-check input {
  flex: 0 0 auto;
  margin: 0;
  width: auto;
}

.message-check-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.message-list-panel {
  background: #fff;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 12px;
}

.home-settings-form {
  display: grid;
  gap: 16px;
}

.home-settings-section {
  display: grid;
  gap: 10px;
}

.home-settings-section-head {
  align-items: end;
  display: flex;
  justify-content: space-between;
}

.home-settings-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

.home-setting-card {
  background: #f8fafc;
  border: 1px solid #d8e0eb;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.home-setting-row-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.home-setting-toggle,
.home-hot-toggle {
  min-width: auto;
}

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

.home-banner-form-grid > .field-label:first-child {
  grid-column: 1 / -1;
}

.home-banner-preview {
  background: #fff;
  border: 1px solid #d8e0eb;
  border-radius: 10px;
  display: block;
  height: 132px;
  margin-top: 8px;
  object-fit: cover;
  width: 280px;
}

.home-hot-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.home-hot-row {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #d8e0eb;
  border-radius: 10px;
  display: grid;
  gap: 8px;
  grid-template-columns: 58px minmax(0, 1fr);
  padding: 10px;
}

.home-hot-row .field-label {
  gap: 5px;
}

.home-hot-row input[type="text"],
.home-hot-row input:not([type]) {
  font-size: 13px;
  min-height: 34px;
}

.message-filter-toolbar {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(220px, 1fr) 148px 148px auto auto minmax(160px, auto);
  margin-bottom: 10px;
}

.message-filter-toolbar .summary-line {
  justify-self: end;
}

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

.message-admin-card {
  background: #fff;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 82px;
  padding: 12px;
}

.message-admin-main {
  display: grid;
  gap: 12px;
  grid-template-columns: 96px minmax(0, 1fr);
  min-width: 0;
}

.message-admin-thumb {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  height: 68px;
  object-fit: cover;
  width: 96px;
}

.message-admin-thumb.empty-thumb {
  align-items: center;
  color: #94a3b8;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
}

.message-admin-body {
  min-width: 0;
}

.message-admin-title-row {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.message-admin-title {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-admin-status {
  background: #eef2ff;
  border-radius: 999px;
  color: #3730a3;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 8px;
}

.message-admin-status.published {
  background: #dcfce7;
  color: #166534;
}

.message-admin-status.stopped {
  background: #f1f5f9;
  color: #475569;
}

.message-admin-meta,
.message-admin-content {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  margin-top: 4px;
}

.message-admin-content {
  color: #334155;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.message-admin-actions {
  align-content: start;
  display: grid;
  gap: 8px;
}

.message-admin-actions button {
  width: 100%;
}

.message-read-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  padding: 10px;
}

.message-read-head {
  align-items: center;
  color: #334155;
  display: flex;
  font-size: 12px;
  font-weight: 900;
  gap: 10px;
  justify-content: space-between;
}

.message-read-list {
  display: grid;
  gap: 6px;
}

.message-read-row {
  align-items: start;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  padding: 8px 10px;
}

.message-read-name {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.message-read-meta,
.message-read-time {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.message-read-time {
  text-align: right;
}

@media (max-width: 1100px) {
  .message-editor-layout {
    grid-template-columns: 1fr;
  }

  .message-filter-toolbar {
    grid-template-columns: minmax(220px, 1fr) repeat(2, 148px) auto auto;
  }

  .message-filter-toolbar .summary-line {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

.admin-user-card-head {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(280px, 1.15fr) minmax(320px, 1fr) auto;
}

.admin-user-card-title {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(180px, 1fr);
  margin-bottom: 10px;
}

.admin-user-id {
  background: #eef2ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
  white-space: nowrap;
}

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

.admin-user-card-permissions {
  min-width: 0;
}

.admin-user-section-title {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 6px;
}

.admin-user-collapse {
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  overflow: hidden;
}

.admin-user-collapse + .admin-user-collapse {
  margin-top: 8px;
}

.admin-user-collapse summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 10px;
  list-style: none;
  min-height: 42px;
  padding: 9px 12px;
}

.admin-user-collapse summary::-webkit-details-marker {
  display: none;
}

.admin-user-collapse summary::after {
  color: #64748b;
  content: "展开";
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
}

.admin-user-collapse[open] summary {
  border-bottom: 1px solid #e5eaf2;
}

.admin-user-collapse[open] summary::after {
  content: "收起";
}

.admin-user-collapse-title {
  color: #0f172a;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 900;
}

.admin-user-collapse-summary {
  color: #64748b;
  flex: 1;
  font-size: 12px;
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-collapse-body {
  padding: 10px 12px 12px;
}

.admin-user-card-foot {
  border-top: 1px solid #e5e7eb;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(280px, 1fr) auto;
  margin-top: 12px;
  padding-top: 12px;
}

.admin-user-timestamps {
  align-self: center;
  color: #64748b;
  font-size: 12px;
  line-height: 1.65;
}

.admin-user-actions {
  align-items: start;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.admin-password-cell {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(120px, 1fr) auto;
}

.admin-user-meta {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 4px;
}

.permission-module-panel {
  display: grid;
  gap: 6px;
}

.permission-module-note {
  margin-top: 0;
}

.permission-module-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.permission-module-option {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  color: #334155;
  display: flex;
  font-size: 12px;
  font-weight: 900;
  gap: 6px;
  min-height: 32px;
  padding: 6px 8px;
}

.permission-module-option input {
  margin: 0;
  width: auto;
}

.permission-module-panel.disabled .permission-module-option {
  opacity: 0.62;
}

.sales-channel-section {
  margin-top: 10px;
}

.sales-channel-picker,
.sales-product-picker {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}

.sales-channel-check,
.sales-product-check {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  color: #334155;
  display: flex;
  font-size: 12px;
  font-weight: 900;
  gap: 6px;
  min-height: 32px;
  padding: 6px 8px;
}

.sales-channel-check.none,
.sales-product-check.none {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}

.sales-channel-check.all,
.sales-product-check.all {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #166534;
}

.sales-channel-check input,
.sales-product-check input {
  margin: 0;
  width: auto;
}

.password-panel-actions {
  align-items: end;
  display: flex;
}

.module-tab {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
  font-weight: 800;
  min-height: 32px;
  min-width: 88px;
  padding: 6px 10px;
}

.module-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.status-tab {
  align-items: center;
  background: #fff;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 44px;
  padding: 9px 11px;
}

.status-tab.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.status-tab.active .count {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.tab-title {
  font-size: 15px;
  font-weight: 800;
}

.count {
  border: 1px solid #d8e0eb;
  border-radius: 999px;
  color: #475569;
  font-size: 12px;
  padding: 2px 8px;
}

.list-toolbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
  position: sticky;
  top: 104px;
  z-index: 60;
}

.product-list-toolbar {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.product-list-toolbar > input {
  flex: 0 1 560px;
  max-width: 560px;
  min-width: 320px;
  width: auto;
}

.product-list-toolbar > select {
  flex: 0 0 180px;
  width: auto;
}

.product-list-toolbar > button {
  flex: 0 0 auto;
}

.product-list-toolbar .product-brand-bulk-compare-on {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #047857;
}

.product-list-toolbar .product-brand-bulk-compare-off {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.product-list-toolbar .product-brand-bulk-compare-all {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.list-toolbar .summary-line,
.tech-filter-summary,
.customer-filter-summary,
.after-sale-filter-summary,
.k-order-toolbar-summary,
.k-order-import-toolbar .summary-line {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.list-toolbar .summary-line {
  margin-left: auto;
  text-align: right;
}

.list-toolbar input,
.list-toolbar select,
.list-toolbar button,
.product-list-toolbar input,
.product-list-toolbar select,
.product-list-toolbar button,
.tech-filter-toolbar input,
.tech-filter-toolbar select,
.tech-filter-toolbar button,
.customer-filter-toolbar input,
.customer-filter-toolbar select,
.customer-filter-toolbar button,
.after-sale-filter-toolbar input,
.after-sale-filter-toolbar select,
.after-sale-filter-toolbar button,
.k-order-toolbar input,
.k-order-toolbar select,
.k-order-toolbar button {
  min-height: 38px;
}

.list-toolbar button,
.tech-filter-toolbar button,
.customer-filter-toolbar button,
.after-sale-filter-toolbar button,
.k-order-toolbar button,
.product-list-toolbar button {
  min-width: 72px;
}

.finance-toolbar {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
  padding: 12px;
  position: sticky;
  top: 104px;
  z-index: 60;
}

.finance-toolbar-section {
  border: 1px solid transparent;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 8px;
}

.finance-toolbar-section.export {
  background: #f8fafc;
  border-color: #d8e0eb;
}

.finance-toolbar-title {
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.finance-toolbar-fields {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.finance-toolbar-search {
  flex: 1 1 280px;
  min-width: 240px;
}

.finance-toolbar-customer {
  flex: 1 1 220px;
  min-width: 190px;
}

.finance-toolbar-filter {
  flex: 0 0 140px;
}

.finance-toolbar-date {
  flex: 0 0 150px;
}

.finance-toolbar-summary {
  border-top: 1px solid #e2e8f0;
  grid-column: 1 / -1;
  padding-top: 10px;
}

.finance-toolbar-hint {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.pagination-bar {
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  margin-top: 10px;
  padding: 10px 12px;
}

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

.pagination-actions select {
  min-width: 96px;
}

#order-search {
  flex: 1 1 360px;
  max-width: 560px;
}

#order-date-from,
#order-date-to {
  flex: 0 0 150px;
}

.manual-order-form-grid {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(170px, 1fr) minmax(116px, 0.68fr) minmax(104px, 0.62fr) minmax(122px, 0.72fr) minmax(120px, 0.7fr) minmax(160px, 0.95fr) 64px minmax(104px, 0.62fr) minmax(280px, 1.65fr) minmax(220px, 1.25fr);
}

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

.manual-order-form-grid .manual-customer {
  grid-column: 1;
}

.manual-order-form-grid .manual-sales {
  grid-column: 2;
}

.manual-order-form-grid .manual-receiver {
  grid-column: 3;
}

.manual-order-form-grid .manual-phone {
  grid-column: 4;
}

.manual-order-form-grid .manual-region {
  grid-column: 5;
}

.manual-order-form-grid .manual-address {
  grid-column: 6;
}

.manual-order-form-grid .manual-quantity {
  grid-column: 7;
}

.manual-order-form-grid .manual-amount {
  grid-column: 8;
}

.manual-order-form-grid .manual-product {
  grid-column: 9;
}

.manual-order-form-grid .manual-remark {
  grid-column: 10;
}

.customer-form.manual-order-form textarea {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  font: inherit;
  height: 42px;
  min-height: 42px;
  overflow: auto;
  padding: 8px 10px;
  resize: none;
}

.manual-order-form {
  border-color: #d8e0eb;
  overflow-x: visible;
}

.manual-order-toggle-button {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  min-width: 118px;
}

.manual-order-toggle-button:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.customer-form.manual-order-form input,
.customer-form.manual-order-form select,
.customer-form.manual-order-form textarea {
  height: 42px;
}

.note-image-editor {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 8px;
}

.note-image-drop {
  align-items: center;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 800;
  gap: 8px;
  justify-content: space-between;
}

.note-image-upload-button {
  align-items: center;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  white-space: nowrap;
}

.note-image-ocr-button {
  align-items: center;
  background: #0f172a;
  border: 1px solid #0f172a;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  gap: 6px;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  white-space: nowrap;
}

.note-image-ocr-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.note-image-upload-button input {
  display: none;
}

.note-image-count {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.note-image-drop input {
  max-width: 180px;
}

.note-image-editor.compact {
  align-self: stretch;
  background: transparent;
  border: 0;
  gap: 4px;
  margin-top: 0;
  min-width: 118px;
  padding: 0;
}

.note-image-editor.compact .note-image-drop {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  flex-wrap: nowrap;
  gap: 6px;
  height: 42px;
  justify-content: center;
  padding: 0 8px;
}

.note-image-editor.compact .note-image-hint {
  display: none;
}

.note-image-editor.compact .note-image-upload-button {
  border-color: transparent;
  min-height: 28px;
  padding: 0 4px;
}

.note-image-editor.compact .note-image-ocr-button {
  min-height: 28px;
  padding: 0 7px;
}

.note-image-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
}

.note-image-editor.compact .note-image-list {
  display: flex;
  gap: 4px;
  max-width: 118px;
  overflow-x: auto;
}

.note-image-item {
  background: #fff;
  border: 1px solid #d8e0eb;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.note-image-item img,
.order-note-image,
.tech-note-image {
  background: #eef2f7;
  display: block;
  width: 100%;
}

.note-image-item img {
  aspect-ratio: 9 / 16;
  object-fit: contain;
}

.note-image-editor.compact .note-image-item {
  flex: 0 0 30px;
  height: 30px;
}

.note-image-editor.compact .note-image-item img {
  aspect-ratio: auto;
  height: 30px;
  object-fit: cover;
  width: 30px;
}

.note-image-remove {
  background: rgba(15, 23, 42, 0.86);
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  padding: 5px 7px;
  position: absolute;
  right: 6px;
  top: 6px;
}

.note-image-editor.compact .note-image-remove {
  font-size: 10px;
  padding: 2px 4px;
  right: 1px;
  top: 1px;
}

.note-image-preview {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  margin-top: 8px;
}

.note-image-preview a {
  background: #f8fafc;
  border: 1px solid #d8e0eb;
  border-radius: 6px;
  overflow: hidden;
}

.order-note-image,
.tech-note-image {
  max-height: 320px;
  object-fit: contain;
}

.manual-order-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
  justify-content: flex-end;
}

#product-search {
  flex: 1 1 360px;
  max-width: 520px;
}

#customer-search {
  flex: 1 1 360px;
  max-width: 520px;
}

#finance-search {
  flex: 1 1 360px;
  max-width: 520px;
}

#log-search {
  flex: 1 1 360px;
  max-width: 520px;
}

#log-module,
#log-date-from,
#log-date-to {
  flex: 0 0 150px;
}

.log-head {
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 12px;
}

.log-title {
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
}

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

.log-range-actions button.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.summary-line {
  flex: 0 0 auto;
}

.table-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  max-height: calc(100vh - 230px);
  overflow: auto;
}

.orders-table {
  min-width: 1180px;
}

.products-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1500px;
  table-layout: fixed;
}

.products-table.generic-products-table {
  min-width: 1700px;
}

.products-table.admin-products-table {
  min-width: 1950px;
}

.products-table th {
  background: #f8fafc;
  border-bottom: 1px solid #dbe4ef;
  color: #334155;
  height: 42px;
  letter-spacing: 0;
  position: sticky;
  top: 0;
  z-index: 2;
}

.products-table td {
  background: #fff;
  border-bottom: 1px solid #edf2f7;
  padding: 8px;
  vertical-align: top;
}

.products-table tbody tr:hover td {
  background: #f8fbff;
}

.product-table-wrap {
  max-height: calc(100vh - 250px);
}

.products-table th:last-child,
.products-table td:last-child {
  box-shadow: -1px 0 0 #edf2f7;
  position: sticky;
  right: 0;
  z-index: 2;
}

.products-table th:last-child {
  z-index: 3;
}

.products-table input,
.products-table select {
  border-color: #d4deeb;
  border-radius: 6px;
  font-size: 12px;
  min-height: 32px;
  padding: 6px 8px;
}

.products-table input[data-product-field="model"] {
  color: #0f172a;
  font-weight: 800;
}

.products-table input[data-product-field="k_order_name"] {
  background: #f8fafc;
  color: #1e3a8a;
  font-weight: 800;
}

.products-table .mini-grid {
  gap: 6px;
}

.table-wrap .products-table {
  table-layout: fixed;
}

.product-price-cell {
  background: #fbfdff;
}

.product-price-editor {
  display: grid;
  gap: 6px;
}

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

.product-price-jd-line {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(120px, 180px);
}

.product-price-field {
  color: #475569;
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 4px;
  line-height: 1.2;
  min-width: 0;
}

.product-price-field input {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.product-price-field.k-order input {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.product-price-field.jd-self input {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.product-price-field.jd-link input,
.product-price-field.jd-sku input,
.product-price-field.jd-stock input,
.product-price-field.jd-checked-at input {
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.product-status-stack .check-line,
.product-activity-cell .check-line,
.product-admin-inline .check-line {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  min-height: 28px;
  padding: 0 7px;
}

.product-row-meta {
  align-items: center;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  min-width: 112px;
}

.product-row-meta span {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  line-height: 1;
  padding: 4px 8px;
}

.product-jd-link-field,
.product-jd-sku-field {
  color: #475569;
  display: grid;
  font-size: 11px;
  font-weight: 900;
  min-width: 0;
}

.product-jd-link-field input,
.product-jd-sku-field input {
  font-size: 12px;
  font-weight: 800;
}

.product-id-link-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: max-content minmax(220px, 0.78fr) minmax(92px, 0.22fr);
}

.product-info-cell {
  min-width: 0;
}

.product-info-grid,
.product-spec-inline,
.product-admin-inline,
.product-remark-line {
  display: grid;
  gap: 6px;
  min-width: 0;
}

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

.product-spec-inline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 6px;
}

.product-mainboard-spec-inline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-admin-inline {
  align-items: center;
  grid-template-columns: minmax(62px, 0.7fr) minmax(62px, 0.7fr) minmax(72px, 0.8fr);
}

.product-ops-cell .product-remark-line {
  grid-template-columns: 1fr;
  margin-top: 6px;
}

.product-remark-line {
  margin-top: 6px;
}

.product-sort-input {
  text-align: center;
}

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

.product-status-stack {
  display: grid;
  gap: 6px;
}

.product-image-list-cell {
  overflow: visible;
}

.product-image-collapse {
  position: relative;
}

.product-image-collapse summary {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: 40px minmax(0, 1fr);
  list-style: none;
  min-height: 46px;
  padding: 5px 7px;
}

.product-image-collapse summary::-webkit-details-marker {
  display: none;
}

.product-image-thumb {
  align-items: center;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  color: #94a3b8;
  display: flex;
  font-size: 10px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  overflow: hidden;
  width: 40px;
}

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

.product-image-summary {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.product-image-summary strong {
  color: #0f172a;
  font-size: 12px;
  line-height: 1.1;
}

.product-image-summary em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.product-image-collapse-body {
  margin-top: 8px;
  position: relative;
  z-index: 4;
}

.product-image-list-cell .product-image-editor {
  min-width: 300px;
}

.product-image-editor {
  background: #f8fafc;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  min-width: 320px;
  padding: 10px;
}

.product-image-editor-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.product-image-editor-title {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.product-image-count {
  background: #eef2ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 8px;
}

.product-image-preview {
  align-items: stretch;
  background: #fff;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  color: #64748b;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: 82px;
  overflow: hidden;
  padding: 6px;
  width: 100%;
}

.product-image-item,
.product-image-empty {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.product-image-empty {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 900;
}

.product-image-item img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.product-image-remove {
  align-items: center;
  background: rgba(15, 23, 42, 0.82);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  height: 20px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 3px;
  top: 3px;
  width: 20px;
}

.product-image-url {
  width: 100%;
}

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

.product-image-actions .image-upload-label,
.product-image-actions .image-clear-button {
  flex: 0 0 auto;
  min-height: 30px;
}

.image-upload-label {
  align-items: center;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
}

.image-upload-label input {
  display: none;
}

.image-clear-button {
  min-height: 30px;
  padding: 0 10px;
}

.product-image-url-panel {
  border-top: 1px solid #e2e8f0;
  padding-top: 2px;
}

.product-image-url-panel summary {
  color: #64748b;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.4;
  list-style: none;
}

.product-image-url-panel summary::-webkit-details-marker {
  display: none;
}

.product-image-url-panel summary::after {
  content: "展开";
  margin-left: 6px;
}

.product-image-url-panel[open] summary::after {
  content: "收起";
}

.product-image-url-panel input {
  margin-top: 6px;
}

.product-image-note {
  color: #64748b;
  font-size: 11px;
  line-height: 1.4;
}

.product-form {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  margin-bottom: 12px;
  padding: 12px;
}

.jd-sync-panel {
  background: #fff;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  margin-bottom: 12px;
  overflow: hidden;
}

.jd-sync-panel-head {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 0.65fr) minmax(360px, 1fr);
  list-style: none;
  min-height: 54px;
  padding: 10px 14px;
}

.jd-sync-panel-head::-webkit-details-marker {
  display: none;
}

.jd-sync-title-group {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.jd-sync-panel-head strong {
  color: #0f172a;
  font-weight: 900;
}

.jd-sync-panel-head em,
.jd-sync-key-state {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.jd-sync-summary-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.jd-sync-summary-meta span {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 7px 10px;
}

.jd-sync-toggle-label {
  background: #0f1b3d !important;
  border-color: #0f1b3d !important;
  color: #fff !important;
}

.jd-sync-toggle-label b {
  font-style: normal;
}

.jd-sync-toggle-label .when-open,
.jd-sync-panel[open] .jd-sync-toggle-label .when-closed {
  display: none;
}

.jd-sync-panel[open] .jd-sync-toggle-label .when-open {
  display: inline;
}

.jd-sync-body {
  background: #f8fbff;
  border-top: 1px solid #e2e8f0;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.jd-sync-body-note {
  align-items: center;
  background: #fff;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 800;
  gap: 8px;
  justify-content: space-between;
  padding: 10px 12px;
}

.jd-sync-body-note strong {
  color: #0f172a;
  font-weight: 900;
}

.jd-sync-key-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(280px, 1fr) auto;
}

.jd-sync-union-card {
  background: #fff;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.jd-sync-form-row.jd-sync-union-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.jd-sync-form-row.jd-sync-union-grid .jd-sync-union-wide {
  grid-column: span 2;
}

.jd-sync-union-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.jd-sync-union-meta span {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 6px 8px;
}

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

.customer-price-tier-field {
  display: grid;
  gap: 5px;
}

.customer-price-tier-field span {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.customer-price-tier-field input {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  min-height: 34px;
  padding: 7px 9px;
}

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

.jd-sync-card {
  background: #fbfdff;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.jd-sync-card.active {
  border-color: #2563eb;
  box-shadow: inset 3px 0 0 #2563eb;
}

.jd-sync-card.running {
  border-color: #22c55e;
  box-shadow: inset 3px 0 0 #22c55e;
}

.jd-sync-card-head,
.jd-sync-metrics,
.jd-sync-checks,
.jd-sync-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.jd-sync-card-head {
  justify-content: space-between;
}

.jd-sync-card-head strong {
  color: #0f172a;
  font-weight: 900;
}

.jd-sync-card-head span,
.jd-sync-metrics span,
.jd-sync-checks .check-line {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 5px 8px;
}

.jd-sync-metrics {
  color: #475569;
}

.jd-sync-progress-grid {
  display: grid;
  gap: 6px;
}

.jd-sync-progress-grid div {
  align-items: center;
  background: #eef2f7;
  border-radius: 999px;
  display: grid;
  gap: 6px;
  grid-template-columns: 64px minmax(0, 1fr) 38px;
  min-height: 22px;
  overflow: hidden;
  padding: 3px 8px;
  position: relative;
}

.jd-sync-progress-grid span,
.jd-sync-progress-grid em {
  color: #334155;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  position: relative;
  z-index: 1;
}

.jd-sync-progress-grid b {
  background: #bfdbfe;
  border-radius: 999px;
  bottom: 3px;
  left: 76px;
  position: absolute;
  top: 3px;
  z-index: 0;
}

.jd-sync-form-row {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr 0.8fr;
}

.jd-sync-form-row label {
  color: #475569;
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 4px;
}

.jd-sync-form-row input,
.jd-sync-form-row select {
  min-height: 34px;
}

.jd-sync-last {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.jd-sync-run-progress {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 8px;
}

.jd-sync-run-line {
  align-items: center;
  display: flex;
  font-size: 12px;
  gap: 8px;
  justify-content: space-between;
}

.jd-sync-run-line strong {
  color: #166534;
  font-weight: 900;
}

.jd-sync-run-line span,
.jd-sync-run-meta {
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.jd-sync-run-bar {
  background: #dcfce7;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.jd-sync-run-bar b {
  animation: jdSyncRunPulse 1.2s ease-in-out infinite;
  background: linear-gradient(90deg, #22c55e, #86efac);
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 18px;
}

.jd-sync-run-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes jdSyncRunPulse {
  0% {
    opacity: 0.75;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.75;
  }
}

.jd-sync-message summary {
  color: #1d4ed8;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.jd-sync-message pre {
  background: #0f172a;
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 11px;
  line-height: 1.45;
  margin: 6px 0 0;
  max-height: 120px;
  overflow: auto;
  padding: 8px;
  white-space: pre-wrap;
}

.jd-sync-actions {
  justify-content: flex-end;
}

@media (max-width: 1500px) {
  .jd-sync-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .jd-sync-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jd-sync-form-row.jd-sync-union-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .jd-sync-grid {
    grid-template-columns: 1fr;
  }

  .jd-sync-form-row.jd-sync-union-grid {
    grid-template-columns: 1fr;
  }

  .jd-sync-form-row.jd-sync-union-grid .jd-sync-union-wide {
    grid-column: auto;
  }

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

.product-create-collapse {
  overflow: hidden;
  padding: 0;
}

.product-create-summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  list-style: none;
  min-height: 48px;
  padding: 10px 12px;
}

.product-create-summary::-webkit-details-marker {
  display: none;
}

.product-create-title {
  display: grid;
  gap: 2px;
}

.product-create-title strong {
  color: #0f172a;
  font-weight: 900;
}

.product-create-title em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.product-create-toggle {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
}

.product-create-toggle-open {
  display: none;
}

.product-create-collapse[open] .product-create-toggle-closed {
  display: none;
}

.product-create-collapse[open] .product-create-toggle-open {
  display: inline;
}

.product-create-body {
  border-top: 1px solid #e2e8f0;
  padding: 12px;
}

.product-create-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.75fr);
}

.product-create-main,
.product-create-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.product-create-section {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.product-create-section + .product-create-section {
  border-top: 1px solid #e2e8f0;
  padding-top: 14px;
}

.product-create-section-head {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.product-create-section-head strong {
  color: #0f172a;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 900;
}

.product-create-section-head em {
  color: #64748b;
  flex: 1 1 auto;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.product-create-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
}

.product-create-side .product-create-fields,
.product-create-fields-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-create-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.product-create-field > span {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.product-create-field input,
.product-create-field select {
  min-height: 38px;
  width: 100%;
}

.product-create-field-wide {
  grid-column: span 2;
}

.product-create-field-full {
  grid-column: 1 / -1;
}

.product-create-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-create-toggles .check-line {
  min-height: 38px;
  padding: 0 12px;
}

.product-create-submit-row {
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
}

.product-create-submit-row .primary-button {
  min-width: 132px;
}

.product-create-media {
  border-top: 1px solid #e2e8f0;
  grid-column: 1 / -1;
  padding-top: 14px;
}

.product-create-media .product-image-editor {
  background: #fff;
  min-width: 0;
}

@media (max-width: 1500px) {
  .product-create-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .product-create-fields,
  .product-create-side .product-create-fields,
  .product-create-fields-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .product-create-fields,
  .product-create-side .product-create-fields,
  .product-create-fields-compact {
    grid-template-columns: 1fr;
  }

  .product-create-field-wide,
  .product-create-field-full {
    grid-column: 1 / -1;
  }

  .product-create-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-create-section-head em {
    text-align: left;
  }
}

.product-create-quick {
  display: grid;
  gap: 10px;
}

.product-create-quick-grid {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(16, minmax(0, 1fr));
}

.product-create-quick .product-create-field {
  grid-column: span 2;
}

.product-create-quick .product-create-field-wide {
  grid-column: span 4;
}

.product-create-quick .product-create-field-full {
  grid-column: 1 / -1;
}

.product-create-quick .product-create-field > span {
  font-size: 11px;
  line-height: 1.1;
}

.product-create-quick .product-create-field input,
.product-create-quick .product-create-field select {
  min-height: 34px;
  padding: 6px 9px;
}

.product-create-submit {
  grid-column: span 2;
  min-height: 34px;
  width: 100%;
}

.product-create-check {
  align-self: end;
  grid-column: span 2;
  min-height: 34px;
}

.product-create-more {
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
}

.product-create-more summary {
  align-items: center;
  color: #334155;
  cursor: pointer;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  list-style: none;
  min-height: 30px;
}

.product-create-more summary::-webkit-details-marker {
  display: none;
}

.product-create-more summary strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.product-create-more summary span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.product-create-more summary::after {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  content: "展开";
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 8px;
}

.product-create-more[open] summary::after {
  content: "收起";
}

.product-create-more-body {
  display: grid;
  gap: 10px;
  padding-top: 8px;
}

.product-create-more .product-image-editor {
  background: #fff;
  min-width: 0;
}

.product-create-more .product-image-preview {
  height: 72px;
}

@media (max-width: 1500px) {
  .product-create-quick-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .product-create-quick .product-create-field {
    grid-column: span 3;
  }

  .product-create-quick .product-create-field-wide {
    grid-column: span 6;
  }

  .product-create-submit,
  .product-create-check {
    grid-column: span 3;
  }
}

@media (max-width: 980px) {
  .product-create-quick-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .product-create-quick .product-create-field,
  .product-create-submit,
  .product-create-check {
    grid-column: span 3;
  }

  .product-create-quick .product-create-field-wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .product-create-quick-grid {
    grid-template-columns: 1fr;
  }

  .product-create-quick .product-create-field,
  .product-create-quick .product-create-field-wide,
  .product-create-submit,
  .product-create-check {
    grid-column: 1 / -1;
  }

  .product-create-more summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

.product-form-title {
  font-weight: 800;
  margin-bottom: 10px;
}

.product-form .form-grid {
  align-items: center;
  grid-template-columns: 1.15fr 0.8fr 0.8fr 0.75fr 0.75fr 0.75fr 0.95fr 0.95fr 1fr auto;
}

.product-form .primary-button {
  min-height: 36px;
}

.product-form .check-line {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  justify-content: center;
  min-height: 36px;
  padding: 0 8px;
}

.product-own-toggle {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #334155;
  font-weight: 900;
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

.product-own-toggle.active {
  background: #ecfdf5;
  border-color: #86efac;
  color: #047857;
}

.customer-form {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  margin-bottom: 12px;
  padding: 14px;
}

.customer-form-header {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.customer-form-title {
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
}

.customer-form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1.2fr 0.8fr 0.9fr 0.9fr 0.8fr 0.9fr 0.9fr;
}

.tech-job-form-grid {
  align-items: stretch;
  grid-template-columns: 130px 160px 170px 160px 280px minmax(430px, 0.95fr) minmax(460px, 1fr);
  min-width: 1810px;
}

.tech-job-form {
  border-color: #d8e0eb;
  overflow-x: auto;
}

.tech-job-form textarea {
  min-height: 42px;
  resize: vertical;
}

.tech-job-form input,
.tech-job-form select,
.tech-job-form textarea {
  height: 42px;
}

.salesperson-picker {
  align-items: start;
  display: block;
  min-width: 0;
  position: relative;
}

.salesperson-picker-row {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.salesperson-collab-button {
  font-size: 12px;
  min-width: 58px;
  padding: 0 8px;
  white-space: nowrap;
}

.salesperson-collab-panel {
  align-items: stretch;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  gap: 6px;
  min-height: 42px;
  padding: 0;
  width: 100%;
}

.salesperson-collab-panel[hidden] {
  display: none;
}

.salesperson-collab-control {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
}

.salesperson-collab-help {
  display: none;
}

.salesperson-collab-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
}

.salesperson-collab-chip {
  align-items: center;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: #1e3a8a;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  gap: 4px;
  min-height: 26px;
  padding: 0 8px;
}

.salesperson-collab-chip button {
  border: 0;
  box-shadow: none;
  height: 20px;
  min-height: 20px;
  padding: 0 2px;
}

.tech-note-input-row {
  align-items: start;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.tech-job-form-grid .tech-source-field {
  grid-column: 1;
}

.tech-job-form-grid .tech-order-no-field {
  grid-column: 2;
}

.tech-job-form-grid .tech-customer-field {
  grid-column: 3;
}

.tech-job-form-grid .tech-time-field {
  grid-column: 4;
}

.tech-job-form-grid .tech-sales-field {
  grid-column: 5;
}

.tech-job-form-grid .tech-amount-field {
  grid-column: 4;
}

.tech-job-form-grid .tech-config-field {
  grid-column: 6;
}

.tech-job-form-grid .tech-remark-field {
  grid-column: 7;
}

.tech-job-form-grid .tech-config-field textarea,
.tech-job-form-grid .tech-remark-field textarea {
  height: 42px;
  min-height: 42px;
}

.tech-order-no-field.hidden {
  display: none;
}

.tech-job-form-grid.no-order-no {
  grid-template-columns: 130px 170px 160px 280px minmax(460px, 0.95fr) minmax(480px, 1fr);
  min-width: 1720px;
}

.tech-job-form-grid.no-order-no .tech-customer-field {
  grid-column: 2;
}

.tech-job-form-grid.no-order-no .tech-time-field {
  grid-column: 3;
}

.tech-job-form-grid.no-order-no .tech-sales-field {
  grid-column: 4;
}

.tech-job-form-grid.no-order-no .tech-amount-field {
  grid-column: 3;
}

.tech-job-form-grid.no-order-no .tech-config-field {
  grid-column: 5;
}

.tech-job-form-grid.no-order-no .tech-remark-field {
  grid-column: 6;
}

.tech-status-tabs {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.tech-status-tabs .status-tab {
  transition: none;
}

.tech-filter-toolbar {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(320px, 1fr) 160px 150px 150px auto auto minmax(220px, auto);
}

.tech-filter-toolbar input {
  height: 38px;
}

.tech-filter-toolbar button {
  height: 38px;
  padding: 0 14px;
}

.tech-filter-summary {
  align-self: center;
  min-width: 0;
  white-space: nowrap;
}

.customer-filter-toolbar {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(320px, 1fr) 140px 160px auto minmax(240px, auto);
}

.customer-filter-toolbar input,
.customer-filter-toolbar select {
  height: 38px;
}

.customer-filter-toolbar button {
  height: 38px;
  padding: 0 14px;
}

.customer-filter-summary {
  align-self: center;
  min-width: 0;
  white-space: nowrap;
}

.tech-job-list {
  contain: layout paint;
  display: grid;
  gap: 10px;
}

.tech-results-shell {
  min-height: 220px;
  position: relative;
}

.tech-results-shell.is-refreshing .tech-job-list,
.tech-results-shell.is-refreshing .pagination-bar,
.tech-results-shell.is-refreshing .tech-summary-panel {
  opacity: 0.72;
}

.tech-results-update {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1d4ed8;
  display: flex;
  font-size: 12px;
  font-weight: 900;
  justify-content: center;
  margin-bottom: 10px;
  min-height: 34px;
  position: sticky;
  top: 8px;
  z-index: 5;
}

.tech-summary-panel {
  align-items: start;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(120px, 0.35fr) minmax(260px, 1fr) minmax(280px, 1fr);
  margin-bottom: 10px;
  padding: 12px;
}

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

.tech-summary-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.tech-summary-value {
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
}

.tech-summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tech-summary-tag {
  appearance: none;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #334155;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
}

.tech-summary-tag:hover:not(.active):not(:disabled),
.tech-summary-tag:focus-visible:not(.active):not(:disabled) {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #0f172a;
}

.tech-summary-tag.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
}

.tech-summary-tag.active:hover,
.tech-summary-tag.active:focus-visible {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.tech-summary-tag:disabled {
  background: #f8fafc;
  color: #64748b;
  cursor: default;
  opacity: 0.75;
}

.tech-performance-page {
  display: grid;
  gap: 14px;
}

.tech-performance-filter {
  align-items: end;
  background: #fff;
  border: 1px solid #dbe6f3;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(130px, 0.5fr)) repeat(3, minmax(150px, 0.75fr)) auto;
  padding: 12px;
}

.tech-performance-filter label {
  color: #475569;
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 5px;
}

.tech-performance-filter input,
.tech-performance-filter select {
  height: 38px;
}

.tech-performance-filter button {
  height: 38px;
  padding: 0 16px;
}

.tech-performance-note {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.tech-performance-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.tech-performance-kpi {
  background: #fff;
  border: 1px solid #dbe6f3;
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.035);
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 12px;
}

.tech-performance-kpi span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.tech-performance-kpi strong {
  color: #0f172a;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.1;
}

.tech-performance-kpi em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.tech-performance-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(520px, 1.35fr) minmax(320px, 0.85fr);
}

.tech-performance-card {
  background: #fff;
  border: 1px solid #dbe6f3;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  min-width: 0;
  padding: 12px;
}

.tech-performance-card.wide {
  grid-column: 1 / -1;
}

.tech-performance-card-head {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tech-performance-card-title {
  color: #0f172a;
  font-size: 15px;
  font-weight: 950;
}

.tech-performance-card-subtitle {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.tech-performance-table {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.tech-performance-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 42px minmax(130px, 1.1fr) repeat(6, minmax(74px, 0.62fr));
  min-width: 860px;
  padding: 9px 10px;
}

.tech-performance-table-tech .tech-performance-row {
  grid-template-columns: 42px minmax(130px, 1.1fr) repeat(7, minmax(74px, 0.62fr));
  min-width: 960px;
}

.tech-performance-row:nth-child(odd):not(.head) {
  background: #f8fbff;
}

.tech-performance-row.head {
  background: #eef5ff;
  color: #475569;
  font-size: 12px;
  font-weight: 950;
}

.tech-performance-row strong {
  color: #0f172a;
  font-weight: 950;
}

.tech-performance-name {
  min-width: 0;
}

.tech-performance-name strong,
.tech-performance-name span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tech-performance-name span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.tech-performance-bar-list {
  display: grid;
  gap: 9px;
}

.tech-performance-bar-row {
  display: grid;
  gap: 6px;
}

.tech-performance-bar-meta {
  align-items: center;
  color: #334155;
  display: flex;
  font-size: 12px;
  font-weight: 900;
  justify-content: space-between;
}

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

.tech-performance-bar-fill {
  background: #1d4ed8;
  border-radius: inherit;
  height: 100%;
  min-width: 2px;
}

.tech-performance-trend {
  align-items: end;
  border-bottom: 1px solid #dbe6f3;
  display: grid;
  gap: 4px;
  grid-auto-flow: column;
  grid-auto-columns: minmax(16px, 1fr);
  height: 150px;
  padding-top: 6px;
}

.tech-performance-trend-bar {
  align-items: end;
  display: flex;
  height: 100%;
  justify-content: center;
}

.tech-performance-trend-bar span {
  background: linear-gradient(180deg, #2563eb, #93c5fd);
  border-radius: 6px 6px 0 0;
  display: block;
  min-height: 2px;
  width: 70%;
}

.tech-performance-trend-labels {
  color: #64748b;
  display: flex;
  font-size: 11px;
  font-weight: 800;
  justify-content: space-between;
  margin-top: 6px;
}

.tech-job-card {
  background: #fff;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  content-visibility: auto;
  contain-intrinsic-size: auto 260px;
  overflow-x: auto;
  padding: 8px 10px;
}

.tech-job-card.locked {
  background: #fbfdff;
}

.tech-job-card.editing {
  border-color: #0f172a;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
}

.tech-job-card.is-collapsed {
  padding-bottom: 8px;
}

.tech-job-card-head {
  align-items: center;
  border-bottom: 1px solid #eef2f7;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(190px, 0.95fr) minmax(220px, 1.2fr) auto;
  margin-bottom: 8px;
  padding-bottom: 6px;
}

.tech-job-card.is-collapsed .tech-job-card-head {
  border-bottom: 0;
  margin-bottom: 6px;
  padding-bottom: 0;
}

.tech-job-head-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tech-job-compact-line {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(180px, 0.85fr) minmax(240px, 1fr) minmax(340px, 1.45fr) minmax(180px, 0.8fr);
  min-width: 980px;
}

.tech-job-compact-pill {
  align-items: center;
  background: #fff;
  border: 1px solid #c7d7f5;
  border-radius: 6px;
  color: #0f172a;
  display: flex;
  font-size: 13px;
  font-weight: 900;
  gap: 6px;
  height: 30px;
  min-width: 0;
  overflow: hidden;
  padding: 0 9px;
  white-space: nowrap;
}

.tech-job-compact-pill span:first-child {
  color: #1d4ed8;
  flex: 0 0 auto;
  font-size: 12px;
}

.tech-job-compact-pill strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tech-job-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.tech-lock-note {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.tech-job-card.locked input:disabled,
.tech-job-card.locked select:disabled,
.tech-job-card.locked textarea:disabled {
  -webkit-text-fill-color: #0f172a;
  background: #f8fafc;
  color: #0f172a;
  opacity: 1;
}

.tech-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 6px 9px;
}

.tech-type-badge {
  background: #eff6ff;
  color: #1d4ed8;
}

.tech-status-badge {
  background: #f1f5f9;
  color: #334155;
}

.tech-status-badge.pending {
  background: #fff7ed;
  color: #c2410c;
}

.tech-status-badge.processing {
  background: #ecfeff;
  color: #0e7490;
}

.tech-status-badge.done {
  background: #ecfdf5;
  color: #047857;
}

.tech-status-badge.cancelled {
  background: #fef2f2;
  color: #b91c1c;
}

.tech-job-card-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: 78px minmax(176px, 1.08fr) 108px 124px 76px minmax(132px, 0.9fr) 92px 76px minmax(218px, 1.18fr) minmax(196px, 1.05fr);
  min-width: 1328px;
}

.tech-job-note-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 8px;
}

.tech-job-card textarea {
  height: 34px;
  min-height: 34px;
  resize: vertical;
}

.tech-job-card input,
.tech-job-card select {
  height: 32px;
}

.tech-job-card-grid .field-label {
  gap: 4px;
  min-width: 0;
}

.tech-job-card-grid input,
.tech-job-card-grid select,
.tech-job-card-grid textarea {
  font-size: 12px;
  padding-left: 7px;
  padding-right: 7px;
}

.tech-job-card-grid .tech-source-field {
  grid-column: 1;
}

.tech-job-card-grid .tech-order-no-field {
  grid-column: 2;
}

.tech-job-card-grid .tech-customer-field {
  grid-column: 3;
}

.tech-job-card-grid .tech-time-field {
  grid-column: 4;
}

.tech-job-card-grid .tech-sales-field {
  grid-column: 6;
}

.tech-job-card-grid .tech-amount-field {
  grid-column: 5;
}

.tech-job-card-grid .tech-type-field {
  grid-column: 7;
}

.tech-job-card-grid .tech-status-field {
  grid-column: 8;
}

.tech-job-card-grid.no-order-no {
  grid-template-columns: 78px 112px 124px 76px minmax(132px, 0.9fr) 92px 76px minmax(250px, 1.35fr) minmax(214px, 1.15fr);
  min-width: 1208px;
}

.tech-job-card-grid.no-order-no .tech-customer-field {
  grid-column: 2;
}

.tech-job-card-grid.no-order-no .tech-time-field {
  grid-column: 3;
}

.tech-job-card-grid.no-order-no .tech-sales-field {
  grid-column: 5;
}

.tech-job-card-grid.no-order-no .tech-amount-field {
  grid-column: 4;
}

.tech-job-card-grid.no-order-no .tech-type-field {
  grid-column: 6;
}

.tech-job-card-grid.no-order-no .tech-status-field {
  grid-column: 7;
}

.tech-job-card-grid .tech-config-field {
  grid-column: 9;
}

.tech-job-card-grid .tech-remark-field {
  grid-column: 10;
}

.tech-job-card-grid .tech-config-field textarea,
.tech-job-card-grid .tech-remark-field textarea {
  height: 32px;
  min-height: 32px;
}

.tech-remark-read-row {
  align-items: stretch;
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(0, 1fr) 52px;
}

.tech-remark-view-button {
  align-self: stretch;
  min-height: 32px;
  padding: 0 6px;
}

.tech-remark-view-button:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.tech-remark-dialog-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.42);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 24px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1000;
}

.tech-remark-dialog {
  background: #fff;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.22);
  display: grid;
  gap: 14px;
  max-height: min(78vh, 760px);
  max-width: 860px;
  padding: 18px;
  width: min(860px, 100%);
}

.tech-remark-dialog-head {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.tech-remark-dialog-title {
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
}

.tech-remark-dialog-meta {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  margin-top: 4px;
}

.tech-remark-dialog-close {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-size: 22px;
  height: 36px;
  justify-content: center;
  padding: 0;
  width: 36px;
}

.tech-remark-dialog-text {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
  min-height: 240px;
  padding: 14px;
  resize: vertical;
  white-space: pre-wrap;
  width: 100%;
}

.tech-remark-dialog-images {
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
}

.tech-remark-dialog-images .note-image-preview {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 0;
}

.tech-remark-dialog-images .note-image-preview a {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 180px;
  padding: 8px;
}

.tech-remark-dialog-images .order-note-image,
.tech-remark-dialog-images .tech-note-image {
  max-height: min(52vh, 560px);
  width: 100%;
}

.tech-job-card-grid.no-order-no .tech-config-field {
  grid-column: 8;
}

.tech-job-card-grid.no-order-no .tech-remark-field {
  grid-column: 9;
}

.tech-runtime-meta {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
  padding: 6px 10px;
}

.tech-runtime-item {
  color: #475569;
  font-size: 12px;
  line-height: 1.4;
}

.tech-runtime-item strong {
  color: #0f172a;
}

.tech-proof-link {
  align-items: center;
  color: #1d4ed8;
  display: inline-flex;
  gap: 8px;
  text-decoration: none;
}

.tech-proof-thumb {
  background: #eef2f7;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  display: block;
  height: 36px;
  object-fit: cover;
  width: 64px;
}

.field-label {
  color: #64748b;
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
}

.field-label.wide {
  grid-column: span 2;
}

.mini-field-label {
  color: #64748b;
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
}

.customer-form textarea,
.customers-table textarea,
.tech-job-card textarea {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-sizing: border-box;
  color: #0f172a;
  font: inherit;
  min-height: 72px;
  padding: 8px 10px;
  resize: vertical;
  width: 100%;
}

.customer-form.tech-job-form textarea {
  height: 42px;
  min-height: 42px;
  overflow: auto;
  resize: none;
}

.tech-job-card textarea {
  height: 34px;
  min-height: 34px;
  overflow: auto;
  resize: none;
}

.tech-job-card .note-image-editor.compact {
  min-width: 108px;
}

.tech-job-card .note-image-editor.compact .note-image-drop {
  height: 34px;
  padding: 0 6px;
}

.tech-job-card .note-image-editor.compact .note-image-upload-button {
  min-height: 26px;
}

.after-sales-page {
  display: grid;
  gap: 12px;
}

.after-sale-status-tabs {
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  margin-bottom: 0;
}

.after-sale-status-tabs .status-tab {
  align-items: start;
  background: #fff;
  border-color: #e2e8f0;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 4px;
  min-height: 70px;
  padding: 11px 12px;
  position: relative;
  text-align: left;
}

.after-sale-status-tabs .status-tab::before {
  background: #cbd5e1;
  border-radius: 999px;
  content: "";
  height: 4px;
  left: 12px;
  position: absolute;
  right: 12px;
  top: 0;
}

.after-sale-status-tabs .status-tab.open::before,
.after-sale-status-tabs .status-tab.processing::before {
  background: #2563eb;
}

.after-sale-status-tabs .status-tab.pending::before {
  background: #f97316;
}

.after-sale-status-tabs .status-tab.done::before {
  background: #10b981;
}

.after-sale-status-tabs .status-tab.cancelled::before {
  background: #64748b;
}

.after-sale-status-tabs .status-tab.active {
  background: #eef4ff;
  border-color: #93c5fd;
  color: var(--primary);
}

.after-sale-status-tabs .status-tab.active .count {
  background: #fff;
  border-color: #bfdbfe;
  color: var(--primary);
}

.after-sale-status-tabs .tab-title {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.after-sale-status-tabs .count {
  border: 0;
  color: #0f172a;
  font-size: 22px;
  font-weight: 950;
  justify-content: flex-start;
  line-height: 1.05;
  min-width: 0;
  padding: 0;
}

.after-sale-filter-toolbar {
  align-items: end;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(360px, 1.8fr) repeat(4, minmax(126px, 0.78fr)) minmax(116px, 0.65fr) 132px 132px auto auto;
  margin-bottom: 0;
  padding: 12px;
}

.after-sale-filter-toolbar input,
.after-sale-filter-toolbar select,
.after-sale-filter-toolbar button,
.after-sale-edit-grid input,
.after-sale-edit-grid select,
.after-sale-create-grid input,
.after-sale-create-grid select {
  border-color: #d8e0eb;
  border-radius: 10px;
  height: 38px;
}

.after-sale-filter-toolbar .primary-button,
.after-sale-log-editor .primary-button,
.after-sale-create-entry .primary-button,
.after-sale-create .primary-button {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.after-sale-filter-toolbar .primary-button:hover:not(:disabled),
.after-sale-log-editor .primary-button:hover:not(:disabled),
.after-sale-create-entry .primary-button:hover:not(:disabled),
.after-sale-create .primary-button:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.after-sale-filter-summary {
  align-self: center;
  color: #64748b;
  grid-column: 1 / -1;
  min-width: 0;
  text-align: right;
}

.after-sale-summary-panel {
  border-radius: 12px;
  grid-template-columns: minmax(130px, 0.35fr) minmax(260px, 1fr) minmax(260px, 1fr);
  margin-bottom: 0;
}

.after-sale-create-entry,
.after-sale-create {
  border-radius: 12px;
}

.after-sale-create-entry .customer-form-header,
.after-sale-create .customer-form-header {
  align-items: center;
}

.after-sale-create-grid,
.after-sale-edit-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.after-sale-create-grid .wide,
.after-sale-edit-grid .wide {
  grid-column: span 5;
}

.after-sale-create-grid textarea,
.after-sale-edit-grid textarea,
.after-sale-log-editor textarea {
  border-color: #d8e0eb;
  border-radius: 10px;
  min-height: 58px;
}

.after-sale-card {
  border-color: #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  overflow-x: visible;
  padding: 14px;
}

.after-sale-card.locked {
  background: #fff;
}

.after-sale-card.collapsed {
  padding: 10px 14px;
}

.after-sale-card.collapsed .after-sale-compact-head {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.after-sale-card.expanded .after-sale-compact-head,
.after-sale-card.editing .after-sale-compact-head {
  border-bottom: 1px solid #edf2f7;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.after-sale-compact-head {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(300px, 1.2fr) minmax(320px, 1.5fr) auto;
  min-width: 0;
}

.after-sale-compact-main,
.after-sale-compact-meta,
.after-sale-compact-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.after-sale-compact-main {
  flex-wrap: nowrap;
}

.after-sale-compact-main .order-no,
.after-sale-compact-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.after-sale-compact-main .order-no {
  flex: 0 1 auto;
  min-width: 150px;
}

.after-sale-compact-meta {
  justify-content: flex-end;
}

.after-sale-compact-meta span {
  min-width: 0;
}

.after-sale-compact-issue {
  color: #475569;
  flex: 1 1 auto;
  font-size: 12px;
  font-weight: 800;
  min-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.after-sale-compact-actions {
  justify-content: flex-end;
}

.after-sale-compact-actions button {
  min-height: 34px;
  white-space: nowrap;
}

.after-sale-detail-body {
  display: grid;
  gap: 10px;
}

.after-sale-card .tech-job-card-head {
  align-items: start;
  border-bottom: 1px solid #edf2f7;
  grid-template-columns: minmax(260px, 1.05fr) minmax(280px, 1.2fr) auto;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.after-sale-title-line {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.after-sale-read-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 8px;
}

.after-sale-read-item {
  background: #f8fafc;
  border: 0;
  border-radius: 10px;
  color: #0f172a;
  display: grid;
  gap: 3px;
  min-height: 54px;
  padding: 9px 10px;
}

.after-sale-read-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.after-sale-read-value {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.after-sale-read-panel {
  background: #fff;
  border: 0;
  border-radius: 12px;
  display: grid;
  gap: 7px;
  margin-top: 8px;
  padding: 10px 0 0;
}

.after-sale-read-panel.result {
  background: #f8fafc;
  padding: 10px;
}

.after-sale-read-panel-title,
.after-sale-section-title {
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
}

.after-sale-read-panel-text {
  color: #0f172a;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.after-sale-source-box,
.after-sale-log-panel {
  background: #f8fafc;
  border: 0;
  border-radius: 12px;
  color: #475569;
  display: grid;
  gap: 10px;
  line-height: 1.5;
  margin-top: 10px;
  padding: 12px;
}

.after-sale-source-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.after-sale-source-item {
  background: #fff;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  display: grid;
  gap: 4px;
  padding: 9px;
}

.after-sale-source-item.wide {
  grid-column: span 2;
}

.after-sale-source-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.after-sale-source-value {
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.after-sale-log-list {
  display: grid;
  gap: 0;
  padding-left: 18px;
  position: relative;
}

.after-sale-log-list::before {
  background: #dbeafe;
  bottom: 8px;
  content: "";
  left: 5px;
  position: absolute;
  top: 8px;
  width: 2px;
}

.after-sale-log-item {
  background: #fff;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
  padding: 9px 10px;
  position: relative;
}

.after-sale-log-item::before {
  background: #2563eb;
  border: 3px solid #f8fafc;
  border-radius: 999px;
  content: "";
  height: 10px;
  left: -19px;
  position: absolute;
  top: 14px;
  width: 10px;
}

.after-sale-log-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.after-sale-log-editor {
  align-items: start;
  border-top: 1px solid #e2e8f0;
  display: grid;
  gap: 8px;
  grid-template-columns: 136px minmax(260px, 1fr) 200px auto;
  padding-top: 10px;
}

.k-order-page {
  --k-order-blue: #1d4ed8;
  --k-order-blue-dark: #172554;
  --k-order-border: #dbe6f3;
  --k-order-panel: #ffffff;
  --k-order-soft: #f6f9fd;
  background: #f4f8fc;
  border: 1px solid #e6edf7;
  border-radius: 14px;
  display: grid;
  gap: 14px;
  padding: 14px;
}

.k-order-page button {
  border-color: #d6e1ef;
}

.k-order-page button:hover:not(:disabled) {
  background: #f1f7ff;
  border-color: #93c5fd;
  color: var(--k-order-blue-dark);
}

.k-order-page .primary-button,
.k-order-page .manual-order-toggle-button {
  background: var(--k-order-blue-dark);
  border-color: var(--k-order-blue-dark);
  color: #fff;
}

.k-order-page .primary-button:hover:not(:disabled),
.k-order-page .manual-order-toggle-button:hover:not(:disabled) {
  background: var(--k-order-blue);
  border-color: var(--k-order-blue);
  color: #fff;
}

.k-order-page input,
.k-order-page select,
.k-order-page textarea {
  border-color: #cfdae8;
}

.k-order-page input:focus,
.k-order-page select:focus,
.k-order-page textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13);
}

.k-order-control-panel {
  background: var(--k-order-panel);
  border: 1px solid var(--k-order-border);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
}

.k-order-status-tabs {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  margin-bottom: 0;
  min-width: 0;
}

.k-order-status-tabs .status-tab {
  background: #f8fbff;
  border-color: #dbe6f3;
  border-radius: 10px;
  box-shadow: none;
  min-height: 46px;
}

.k-order-status-tabs .status-tab.active {
  background: var(--k-order-blue-dark);
  border-color: var(--k-order-blue-dark);
  box-shadow: 0 8px 18px rgba(23, 37, 84, 0.14);
}

.k-order-toolbar {
  background: #f8fbff;
  border: 1px solid #e7eef7;
  border-radius: 10px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(300px, 1.5fr) minmax(120px, 0.52fr) minmax(150px, 0.7fr) minmax(132px, 0.56fr) minmax(132px, 0.56fr);
  margin-bottom: 0;
  min-width: 0;
  padding: 10px;
}

.k-order-toolbar input,
.k-order-toolbar select,
.k-order-toolbar button {
  height: 38px;
}

.k-order-toolbar-summary {
  align-self: center;
  grid-column: 1 / -1;
  padding-right: 2px;
  text-align: right;
}

.k-order-toolbar-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.k-order-toolbar-actions .k-order-new-button {
  background: #2563eb;
  border-color: #1d4ed8;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
  min-width: 132px;
  position: relative;
}

.k-order-toolbar-actions .k-order-new-button::before {
  background: #bfdbfe;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(191, 219, 254, 0.35);
  content: "";
  height: 7px;
  position: absolute;
  right: 10px;
  top: 8px;
  width: 7px;
}

.k-order-toolbar-actions .k-order-new-button:hover:not(:disabled) {
  background: #1d4ed8;
  border-color: #1e40af;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

.k-order-export-panel {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe6f3;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(190px, 0.62fr) minmax(0, 1.8fr) auto;
  min-width: 0;
  padding: 10px;
}

.k-order-export-panel.attention {
  background: #fbfdff;
  border-color: #b9c9e6;
}

.k-order-export-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.k-order-export-title strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.k-order-export-title span,
.k-order-export-warning {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.k-order-export-tags {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.k-order-export-tags span {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #d8e2f0;
  border-radius: 999px;
  color: #0f172a;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  gap: 6px;
  line-height: 1.2;
  max-width: 240px;
  min-height: 28px;
  overflow: hidden;
  padding: 5px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.k-order-export-tags b {
  color: #35507a;
}

.k-order-export-warning {
  grid-column: 2 / 4;
  justify-self: end;
}

.k-order-form,
.k-shop-panel {
  background: var(--k-order-panel);
  border-color: var(--k-order-border);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
  min-width: 0;
}

.k-order-form > .customer-form-header,
.k-shop-panel > .customer-form-header,
.k-order-import-panel > .customer-form-header {
  border-bottom: 1px solid #e7eef7;
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.k-order-form.is-collapsed > .customer-form-header {
  margin-bottom: 0;
}

.k-order-form-header-actions {
  align-self: center;
}

.k-order-collapse-button {
  background: #eff6ff;
  border-color: #93c5fd;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-weight: 950;
  min-width: 118px;
  padding-left: 14px;
  padding-right: 14px;
}

.k-order-collapse-button:hover:not(:disabled) {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #172554;
}

.k-order-form.is-collapsed .k-order-collapse-button {
  background: #2563eb;
  border-color: #1d4ed8;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
  color: #fff;
  min-width: 132px;
}

.k-order-form.is-collapsed .k-order-collapse-button:hover:not(:disabled) {
  background: #1d4ed8;
  border-color: #1e40af;
  color: #fff;
}

.k-order-collapsed-summary {
  align-items: center;
  background: #f8fbff;
  border: 1px solid #e4ecf6;
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
}

.k-order-collapsed-summary span {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
  padding: 5px 9px;
}

.k-order-collapsed-summary b {
  color: #172554;
  margin-right: 4px;
}

.k-order-form-grid,
.k-shop-form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(10, minmax(96px, 1fr));
}

.k-order-form-shell {
  counter-reset: k-order-step;
  display: grid;
  gap: 12px;
}

.k-order-entry-section {
  background: #fbfdff;
  border: 1px solid #e4ecf6;
  border-radius: 12px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.k-order-entry-section.money {
  background: #f8fbff;
}

.k-order-section-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.k-order-section-title {
  align-items: center;
  color: #0f172a;
  display: inline-flex;
  font-size: 14px;
  font-weight: 950;
  gap: 8px;
}

.k-order-entry-section .k-order-section-title::before {
  align-items: center;
  background: #eaf2ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: var(--k-order-blue);
  content: counter(k-order-step);
  counter-increment: k-order-step;
  display: inline-flex;
  font-size: 12px;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.k-order-section-note {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.k-order-form-grid .span-2,
.k-shop-form-grid .span-2 {
  grid-column: span 2;
}

.k-order-form-grid .span-3,
.k-shop-form-grid .span-3 {
  grid-column: span 3;
}

.k-order-info-grid {
  grid-template-columns: 130px minmax(240px, 1.05fr) minmax(250px, 1.1fr) minmax(320px, 1.35fr) 130px minmax(170px, 0.7fr) minmax(260px, 1.1fr);
}

.k-order-info-grid.no-platform-meta {
  grid-template-columns: 130px minmax(240px, 1.05fr) minmax(250px, 1.1fr) minmax(320px, 1.35fr) 130px minmax(170px, 0.7fr) minmax(260px, 1.1fr);
}

.k-order-info-grid .span-2,
.k-order-info-grid .span-3 {
  grid-column: auto;
}

.k-order-info-grid.no-platform-meta .k-order-company-field {
  grid-column: span 2;
}

.k-order-contact-paste-field {
  min-width: 0;
}

.k-order-contact-paste {
  height: 38px;
}

.k-order-money-grid {
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.55fr) minmax(120px, 0.48fr) minmax(150px, 0.58fr) minmax(160px, 0.62fr);
}

.k-order-money-grid .span-2 {
  grid-column: auto;
}

.k-order-money-grid .k-order-readonly-money {
  text-align: right;
}

.k-order-items-panel,
.k-order-items-section {
  background: #f8fbff;
  border: 1px solid #e4ecf6;
  border-radius: 10px;
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
}

.k-order-items-section {
  margin-top: 0;
}

.k-order-items-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.k-order-template-panel {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  display: grid;
  gap: 7px;
  padding: 8px 10px;
}

.k-order-template-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.k-order-template-title {
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
}

.k-order-template-note {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.k-order-template-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, 188px);
  overflow-x: auto;
  padding-bottom: 2px;
}

.k-order-template-card {
  cursor: grab;
  min-height: 78px;
  position: relative;
  width: 188px;
}

.k-order-template-card.dragging {
  opacity: 0.45;
}

.k-order-template-card.drag-over .k-order-template-apply {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.k-order-template-apply {
  align-content: center;
  background: #f8fbff;
  border-color: #cfe0f4;
  display: grid;
  gap: 3px;
  grid-template-rows: minmax(34px, auto) auto;
  height: 78px;
  justify-items: center;
  padding: 8px 30px 8px;
  text-align: center;
  width: 188px;
}

.k-order-template-apply strong {
  color: #020617;
  display: grid;
  font-size: 13px;
  font-weight: 950;
  gap: 1px;
  line-height: 1.28;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  width: 100%;
}

.k-order-template-apply strong span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.k-order-template-apply span {
  color: #334155;
  font-size: 11px;
  font-weight: 950;
}

.k-order-template-drag-handle {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  cursor: grab;
  font-size: 10px;
  font-weight: 950;
  left: 4px;
  line-height: 1;
  padding: 3px 4px;
  position: absolute;
  top: 4px;
  user-select: none;
}

.k-order-template-delete {
  border-radius: 999px;
  font-size: 11px;
  height: 22px;
  min-width: 22px;
  padding: 0;
  position: absolute;
  right: 4px;
  top: 4px;
  width: 22px;
}

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

.k-order-item-table-head {
  background: #eef5ff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  color: #475569;
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 8px;
  grid-template-columns: 108px minmax(260px, 1.6fr) 72px 98px 108px 82px 98px 108px minmax(120px, 0.8fr) auto;
  align-items: center;
  padding: 8px;
}

.k-order-item-row {
  background: #fff;
  border: 1px solid #e4ecf6;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 108px minmax(260px, 1.6fr) 72px 98px 108px 82px 98px 108px minmax(120px, 0.8fr) auto;
  padding: 8px;
}

.k-order-item-row.is-zero-price-locked {
  background: #eff6ff;
  border-color: #93c5fd;
}

.k-order-item-actions {
  align-items: center;
  display: grid;
}

.k-order-item-actions button {
  height: 38px;
  min-width: 72px;
  padding: 6px 10px;
}

.k-order-table-add-action {
  align-items: center;
  display: flex;
  justify-content: flex-end;
}

.k-order-table-add-action button {
  background: #f8fbff;
  border-color: #c7d9f2;
  border-radius: 6px;
  color: #1e3a8a;
  font-size: 12px;
  height: 28px;
  min-height: 28px;
  min-width: 64px;
  padding: 3px 8px;
}

.k-order-item-row input,
.k-order-item-row select,
.k-order-item-row button,
.k-shop-form-grid input,
.k-shop-form-grid select,
.k-order-form-grid input,
.k-order-form-grid select {
  height: 38px;
}

.k-order-form-grid textarea {
  min-width: 0;
  width: 100%;
}

.k-order-readonly-money,
.k-order-item-row input[readonly] {
  background: #f8fbff;
  color: #334155;
  font-weight: 900;
}

.k-order-item-row .k-order-zero-price-input[readonly] {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.k-order-entry-section.money .k-order-readonly-money {
  background: #fff;
}

.k-order-receivable .k-order-readonly-money {
  color: #b91c1c;
}

.k-order-shop-field {
  gap: 6px;
}

.k-order-shop-picker {
  display: block;
}

.k-order-item-row .k-order-item-remark {
  min-width: 0;
}

.k-order-form-footer {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.k-order-total-strip {
  align-items: center;
  background: var(--k-order-blue-dark);
  border-radius: 10px;
  color: #dbeafe;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
  padding: 10px 12px;
}

.k-order-footer-actions {
  background: #f8fbff;
  border: 1px solid #dbe6f3;
  border-radius: 10px;
  padding: 10px 12px;
}

.k-order-footer-actions button {
  min-height: 38px;
  min-width: 112px;
}

.k-order-total-strip strong {
  color: #fff;
  font-size: 16px;
}

.k-order-total-strip b {
  color: inherit;
}

.k-order-summary-panel {
  border-color: var(--k-order-border);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.035);
  grid-template-columns: minmax(120px, 0.35fr) minmax(260px, 0.8fr) minmax(300px, 1fr);
  margin-bottom: 0;
}

.k-order-money-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.k-order-money-row span {
  background: #eef5ff;
  border-radius: 999px;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 8px;
}

.k-shop-list {
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
}

.k-shop-chip {
  background: #f8fafc;
  border-radius: 999px;
  min-height: 30px;
  padding: 5px 9px;
}

.k-shop-chip-group {
  align-items: center;
  display: inline-flex;
  gap: 4px;
}

.k-shop-delete {
  background: #fff7ed;
  border-color: #fed7aa;
  border-radius: 999px;
  color: #c2410c;
  min-height: 30px;
  padding: 5px 9px;
}

.k-order-import-panel {
  background: var(--k-order-panel);
  border-color: var(--k-order-border);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.k-order-import-toolbar {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 0.8fr) 120px minmax(280px, 1fr) auto;
  margin-top: 10px;
}

.k-order-import-toolbar input,
.k-order-import-toolbar select,
.k-order-import-toolbar button {
  min-height: 38px;
}

.k-order-import-help {
  align-self: end;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  color: #64748b;
  display: grid;
  font-size: 12px;
  gap: 2px;
  min-height: 38px;
  padding: 7px 10px;
}

.k-order-import-help strong {
  color: #0f172a;
  font-size: 13px;
}

.k-order-import-summary,
.k-order-import-sheets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.k-order-import-summary span,
.k-order-import-sheets span {
  background: #eef2ff;
  border-radius: 999px;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
}

.k-order-import-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.k-order-import-row {
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) 170px;
  padding: 10px;
}

.k-order-import-row.duplicate {
  border-color: #fbbf24;
}

.k-order-import-row.imported {
  background: #f0fdf4;
  opacity: 0.82;
}

.k-order-import-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.k-order-import-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.k-order-import-title strong {
  color: #0f172a;
  font-size: 15px;
}

.k-order-import-side {
  color: #64748b;
  display: grid;
  font-size: 12px;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.k-order-import-side strong {
  color: #b91c1c;
  font-size: 16px;
}

.k-order-import-warning,
.k-order-import-duplicate {
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 8px;
}

.k-order-import-warning {
  background: #fef2f2;
  color: #b91c1c;
}

.k-order-import-duplicate {
  background: #fffbeb;
  color: #b45309;
}

.k-order-results-panel,
.k-order-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.k-order-card {
  background: #fff;
  border-color: var(--k-order-border);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.045);
  overflow-x: visible;
  padding: 14px;
}

.k-order-card.is-collapsed {
  padding: 10px 12px;
}

.k-order-card.is-approved {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.k-order-card.has-return-changes {
  border-color: #93c5fd;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.08);
}

.k-order-card .tech-job-card-head {
  align-items: center;
  border-bottom-color: #e7eef7;
  column-gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(480px, max-content);
  padding-bottom: 8px;
}

.k-order-card.is-approved .tech-job-card-head {
  grid-template-columns: minmax(0, 1fr) minmax(540px, max-content);
}

.k-order-card.is-collapsed .tech-job-card-head {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.k-order-card .tech-job-actions {
  align-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: 100%;
  min-width: 0;
}

.k-order-card.is-approved .tech-job-actions {
  justify-content: flex-end;
  min-width: 540px;
  width: auto;
}

.k-order-card.is-collapsed .tech-job-actions {
  align-self: center;
}

.k-order-head-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.k-order-head-top {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px 12px;
  min-width: 0;
}

.k-order-key-row {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(120px, 0.75fr) minmax(180px, 0.95fr) minmax(260px, 1.8fr);
  min-width: 0;
}

.k-order-key-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #b8cdf5;
  border-radius: 9px;
  box-shadow: none;
  display: flex;
  gap: 6px;
  min-height: 28px;
  min-width: 0;
  overflow: hidden;
  padding: 4px 9px;
}

.k-order-key-card span {
  color: #315f9f;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.k-order-key-card strong {
  color: #0f172a;
  flex: 0 1 auto;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.k-order-key-card em {
  color: #0f172a;
  flex: 1 1 auto;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.k-order-key-card em::before {
  color: #94a3b8;
  content: "/ ";
}

.k-order-key-card.order-no {
  background: #ffffff;
  border-color: #9fbcf3;
}

.k-order-key-card.order-no .k-order-platform-order-no {
  cursor: grab;
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 1px;
  scrollbar-color: #9fbcf3 transparent;
  scrollbar-width: thin;
  text-overflow: clip;
  -webkit-overflow-scrolling: touch;
}

.k-order-key-card.order-no .k-order-platform-order-no.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.k-order-key-card.order-no .k-order-platform-order-no::-webkit-scrollbar {
  height: 4px;
}

.k-order-key-card.order-no .k-order-platform-order-no::-webkit-scrollbar-thumb {
  background: #9fbcf3;
  border-radius: 999px;
}

.k-order-key-card.order-no .k-order-platform-order-no::-webkit-scrollbar-track {
  background: transparent;
}

.k-order-copy-button {
  align-items: center;
  background: #eef4ff;
  border: 1px solid #b8cdf5;
  border-radius: 6px;
  color: #2454a6;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 900;
  height: 20px;
  justify-content: center;
  line-height: 1;
  min-width: 34px;
  padding: 0 6px;
}

.k-order-copy-button:hover {
  background: #dbeafe;
  border-color: #8fb3f1;
}

.k-order-copy-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.k-order-key-card.customer {
  background: #ffffff;
  border-color: #9fbcf3;
}

.k-order-key-card.is-return-changed,
.k-order-card-grid .is-return-changed,
.after-sale-source-value.is-return-changed {
  background: #eff6ff;
  border: 1px solid #60a5fa;
  border-radius: 9px;
  border-color: #60a5fa;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.16) inset;
}

.after-sale-source-value.is-return-changed {
  padding: 6px 8px;
}

.k-order-card-subline {
  align-items: center;
  color: #475569;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  font-size: 12px;
  font-weight: 800;
  gap: 6px 10px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.k-order-card-subline > span:not(.k-order-finance-status) {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.k-order-card.is-approved .k-order-card-subline {
  color: #334155;
  gap: 6px 12px;
}

.k-order-card.is-approved .k-order-key-card {
  border-color: #c6d6f4;
}

.k-order-finance-status {
  background: #ffffff;
  border: 1px solid #b8cdf5;
  border-radius: 999px;
  color: #0f172a;
  display: inline-flex;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  padding: 4px 7px;
}

.k-order-finance-status.done {
  background: #ffffff;
  border-color: #9fbcf3;
  color: #0f172a;
}

.k-order-finance-status.pending {
  background: #ffffff;
  border-color: #9fbcf3;
  color: #0f172a;
}

.k-order-finance-status.cancelled {
  background: #ffffff;
  border-color: #b8cdf5;
  color: #0f172a;
}

.k-order-return-change-badge {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.k-order-detail-toggle {
  min-width: 72px;
}

.k-order-detail-toggle[aria-expanded="true"] {
  background: #eaf3ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.k-order-card-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  margin-top: 8px;
}

.k-order-card-grid div {
  background: #f8fbff;
  border: 1px solid #e7eef7;
  border-radius: 9px;
  display: grid;
  gap: 3px;
  padding: 8px 10px;
}

.k-order-card-grid span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.k-order-card-grid strong {
  color: #0f172a;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.k-order-return-change-panel {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
}

.k-order-return-change-head {
  align-items: center;
  color: #1e3a8a;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.k-order-return-change-head strong {
  font-size: 13px;
  font-weight: 950;
}

.k-order-return-change-head span {
  color: #2563eb;
  font-size: 12px;
  font-weight: 850;
}

.k-order-return-change-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.k-order-return-change-item {
  align-items: center;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #0f172a;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 100%;
  padding: 5px 7px;
}

.k-order-return-change-item span {
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 950;
}

.k-order-return-change-item strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.k-order-return-change-item em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.k-order-detail-box {
  background: #f8fbff;
  border: 1px solid #e4ecf6;
  border-radius: 12px;
}

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

.k-order-detail-grid .wide {
  grid-column: 1 / -1;
}

.k-order-items-table-wrap {
  background: #ffffff;
  border: 1px solid #dbe6f3;
  border-radius: 10px;
  overflow-x: auto;
}

.k-order-items-table {
  border-collapse: collapse;
  min-width: 980px;
  table-layout: fixed;
  width: 100%;
}

.k-order-items-table th,
.k-order-items-table td {
  border-bottom: 1px solid #e7eef7;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  padding: 8px 10px;
  text-align: center;
  vertical-align: middle;
}

.k-order-items-table th {
  background: #eef5ff;
  color: #475569;
  white-space: nowrap;
}

.k-order-items-table tr:last-child td {
  border-bottom: 0;
}

.k-order-items-table tr.is-return-changed td {
  background: #eff6ff;
  border-bottom-color: #bfdbfe;
}

.k-order-items-table .category {
  width: 8%;
}

.k-order-items-table .item-name {
  text-align: left;
  width: 34%;
}

.k-order-items-table .quantity {
  width: 7%;
}

.k-order-items-table .money-col,
.k-order-items-table .rate {
  white-space: nowrap;
}

.k-order-items-table .remark {
  color: #475569;
  font-weight: 700;
  width: 14%;
}

.k-order-item-name-main {
  font-weight: 900;
  overflow-wrap: anywhere;
}

.k-order-item-name-spec {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.customers-table {
  min-width: 1580px;
  table-layout: fixed;
  width: 100%;
}

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

.customers-table input,
.customers-table select {
  font-size: 13px;
  padding: 6px 8px;
}

.customer-col-account {
  width: 200px;
}

.customer-col-company {
  width: 220px;
}

.customer-col-contact {
  width: 250px;
}

.customer-col-level {
  width: 170px;
}

.customer-col-terms {
  width: 430px;
}

.customer-col-status {
  width: 105px;
}

.customer-col-time {
  width: 135px;
}

.customer-col-actions {
  width: 110px;
}

.finance-table {
  min-width: 1220px;
}

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

.finance-summary-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  min-height: 70px;
  padding: 12px;
}

.finance-summary-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.finance-summary-value {
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
  margin-top: 6px;
}

.finance-summary-value.warn {
  color: #b42318;
}

.finance-status-pill {
  border: 1px solid #d8e0eb;
  border-radius: 999px;
  color: #475569;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
}

.finance-status-pill.warn {
  background: #fef3f2;
  border-color: #fca5a5;
  color: #b42318;
}

.finance-reminder {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  margin-bottom: 12px;
  overflow: hidden;
}

.finance-reminder-header {
  align-items: center;
  background: #f8fafc;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.finance-reminder-title {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.finance-reminder-summary {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.finance-reminder-cards {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 10px 12px 0;
}

.finance-reminder-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 9px 10px;
}

.finance-reminder-card.warn {
  background: #fff7ed;
  border-color: #fed7aa;
}

.finance-reminder-card.danger {
  background: #fef3f2;
  border-color: #fca5a5;
}

.finance-reminder-card strong {
  color: #0f172a;
  display: block;
  font-size: 16px;
  line-height: 1.25;
  margin-top: 4px;
}

.finance-reminder-card.danger strong {
  color: #b42318;
}

.finance-reminder-table {
  max-height: 260px;
  overflow: auto;
  padding: 10px 12px 12px;
}

.finance-receivables .finance-reminder-table {
  max-height: 520px;
}

.finance-reminder-table table {
  min-width: 960px;
}

.finance-inline-detail-row td {
  background: #f8fafc;
  padding: 0;
}

.finance-inline-detail {
  border-top: 1px solid #e2e8f0;
  padding: 12px;
}

.finance-inline-detail-header {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.finance-inline-detail-title {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.finance-inline-detail .finance-detail-grid {
  grid-template-columns: 1fr;
}

.finance-payment-fields {
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
}

.finance-payment-remark {
  flex: 1 1 260px;
  min-width: 220px;
}

.finance-detail {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  margin-top: 12px;
  padding: 12px;
}

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

.finance-detail-title {
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
}

.finance-detail-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.finance-detail-section {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: auto;
}

.finance-detail-section.full {
  grid-column: 1 / -1;
}

.finance-detail-section-title {
  align-items: center;
  background: #f8fafc;
  color: #334155;
  display: flex;
  font-size: 13px;
  font-weight: 900;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
}

.finance-detail-section-title button {
  padding: 4px 8px;
}

.finance-collapsed-note {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  padding: 12px 10px;
}

.finance-order-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.finance-order-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
  overflow: hidden;
}

.finance-order-card.active {
  border-color: #93c5fd;
  box-shadow: 0 0 0 1px rgba(147, 197, 253, 0.45);
}

.finance-order-card-header {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1.4fr) minmax(120px, 0.45fr) minmax(180px, 0.7fr) auto;
  padding: 10px 12px;
}

.finance-order-no {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.finance-order-meta {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 4px;
}

.finance-order-amount {
  color: #b42318;
  font-weight: 900;
  text-align: right;
}

.finance-order-actions {
  text-align: right;
}

.finance-order-actions button {
  min-width: 64px;
  padding: 5px 10px;
}

.finance-order-detail-panel {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 10px;
}

.finance-order-detail-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.finance-order-detail-block {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: auto;
}

.finance-order-detail-block.full {
  grid-column: 1 / -1;
}

.finance-order-detail-title {
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  padding: 8px 10px;
}

.finance-order-detail-block table {
  min-width: 520px;
}

.finance-detail-section table {
  min-width: 560px;
}

.customer-company-cell {
  min-width: 0;
}

.customer-account-cell {
  min-width: 0;
}

.customer-stack {
  display: grid;
  gap: 5px;
  grid-template-rows: 34px 34px;
}

.customer-stack input {
  box-sizing: border-box;
  height: 34px;
}

.customer-account-cell .admin-password-cell {
  display: block;
}

.customer-code-line {
  align-items: center;
  color: #64748b;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  height: 34px;
  line-height: 1.2;
}

.customer-source-pill {
  background: #eef6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  margin-left: 8px;
  padding: 2px 8px;
}

.customer-source-pill.pending {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.customer-contact-cell {
  min-width: 0;
}

.customer-contact-grid {
  display: grid;
  gap: 5px;
  grid-template-rows: 34px 34px;
}

.customer-contact-grid input {
  box-sizing: border-box;
  height: 34px;
}

.customer-level-cell select {
  min-width: 142px;
}

.customer-terms-cell {
  min-width: 0;
}

.customer-cash-note {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 6px;
}

.customer-basic-note {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #64748b;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  min-height: 36px;
  padding: 8px 10px;
}

.customer-custom-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 6px;
}

.customer-custom-line {
  display: grid;
  gap: 4px;
}

.customer-custom-line span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.form-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1.1fr 0.8fr 0.7fr 0.7fr 0.7fr 0.7fr 1fr 1.3fr auto;
}

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

.customer-terms-cell .mini-grid {
  grid-template-columns: minmax(130px, 0.9fr) minmax(150px, 1.1fr);
}

.check-line {
  align-items: center;
  display: flex;
  gap: 6px;
}

.check-line input {
  width: auto;
}

.product-model-cell {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.product-spec-cell {
  min-width: 0;
}

.product-activity-cell {
  min-width: 0;
}

.product-save-cell {
  text-align: center;
}

.product-row-actions {
  align-items: stretch;
  display: grid;
  gap: 6px;
}

.product-save-cell .primary-button,
.product-save-cell .danger-button {
  min-width: 64px;
}

.product-delete-button {
  font-size: 12px;
  min-height: 30px;
  padding: 5px 8px;
}

.order-no {
  color: #0f172a;
  font-weight: 800;
}

.order-meta-line {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.order-source-badge {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 4px 7px;
}

.address-cell {
  max-width: 320px;
}

.order-remark-line {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 6px;
  padding: 5px 7px;
}

.amount {
  color: #b42318;
  font-weight: 800;
}

.log-value {
  color: #64748b;
  font-size: 12px;
  max-width: 520px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-module-pill {
  background: #eef2ff;
  border: 1px solid #dbe4ff;
  border-radius: 999px;
  color: #334155;
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
}

.log-target-cell {
  min-width: 180px;
}

.log-change-cell {
  min-width: 260px;
}

.amount-cell {
  align-items: center;
  display: flex;
  gap: 8px;
}

.finance-hint {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 5px;
}

.finance-hint.warn {
  color: #b42318;
  font-weight: 700;
}

.finance-line {
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 6px;
}

.finance-line strong {
  color: #0f172a;
}

.finance-line.warn strong {
  color: #b42318;
}

.detail-button {
  padding: 5px 8px;
}

.ship-form {
  display: grid;
  gap: 6px;
  min-width: 360px;
}

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

.ship-line {
  color: #334155;
  line-height: 1.35;
}

.proof-thumb {
  border: 1px solid #d8e0eb;
  border-radius: 6px;
  display: block;
  height: 64px;
  margin-top: 8px;
  object-fit: cover;
  width: 112px;
}

.proof-section {
  align-items: flex-end;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  margin-top: 12px;
  padding-top: 10px;
}

.primary-button {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 900;
}

.primary-button:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.complete-button {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
  font-weight: 900;
}

.complete-button:hover:not(:disabled) {
  background: #065f46;
  border-color: #065f46;
}

.cancel-button {
  background: #fff;
  border-color: #fecaca;
  color: var(--danger);
  font-weight: 900;
}

.action-cell {
  white-space: nowrap;
}

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

.settle-form {
  display: grid;
  gap: 8px;
  min-width: 360px;
}

.settle-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.settle-field {
  display: grid;
  gap: 4px;
}

.settle-field span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.settle-field input,
.settle-field select {
  width: 100%;
}

.settle-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.detail-row td {
  background: #eef2f7;
  padding: 10px;
}

.detail-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
}

.edit-input {
  max-width: 110px;
}

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

.danger-button {
  background: #fff;
  border-color: #fecaca;
  color: var(--danger);
  font-weight: 900;
}

.cancel-button:hover:not(:disabled),
.danger-button:hover:not(:disabled) {
  background: var(--danger-bg);
  border-color: #fca5a5;
  color: #991b1b;
}

.empty {
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  padding: 28px 12px;
  text-align: center;
}

.role-bar,
.password-panel,
.customer-form,
.product-form,
.finance-toolbar,
.finance-summary-card,
.finance-reminder,
.finance-detail,
.message-list-panel,
.message-admin-card,
.tech-summary-panel,
.tech-job-card,
.admin-user-card,
.pagination-bar,
.log-head,
.table-wrap,
.detail-panel {
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
}

.login-card,
.admin-user-card,
.tech-job-card.editing {
  box-shadow: var(--shadow-card);
}

.customer-form-header,
.message-form-head,
.finance-detail-header,
.finance-inline-detail-header,
.finance-reminder-header,
.admin-user-card-foot,
.tech-job-card-head {
  gap: 12px;
}

.list-toolbar,
.finance-toolbar-fields,
.log-range-actions,
.account-actions,
.actions,
.pagination-actions,
.admin-user-actions,
.tech-job-actions,
.settle-actions {
  gap: 8px;
}

.module-tab,
.status-tab {
  border-color: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  color: var(--text-main);
}

.module-tab:hover:not(:disabled),
.status-tab:hover:not(:disabled) {
  border-color: #94a3b8;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.module-tab.active,
.status-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.status-tab .count,
.count {
  align-items: center;
  background: #fff;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-width: 28px;
}

.status-tab.active .count {
  background: rgba(255, 255, 255, 0.12);
}

.after-sale-status-tabs .status-tab.active {
  background: #eef4ff;
  border-color: #93c5fd;
  color: var(--primary);
}

.after-sale-status-tabs .count,
.after-sale-status-tabs .status-tab.active .count {
  background: transparent;
  color: #0f172a;
}

.field-label,
.mini-field-label {
  color: #475569;
  font-weight: 800;
  gap: 6px;
  line-height: 1.35;
}

.muted,
.admin-user-meta,
.finance-hint,
.finance-line,
.message-admin-meta,
.message-read-meta,
.tech-runtime-item,
.product-image-note,
.customer-cash-note,
.customer-basic-note,
.panel-hint {
  overflow-wrap: anywhere;
}

.customer-form-title,
.log-title,
.finance-detail-title,
.finance-inline-detail-title,
.finance-reminder-title,
.message-admin-title,
.admin-user-section-title,
.finance-toolbar-title,
.product-form-title {
  color: var(--text-main);
  line-height: 1.3;
}

.message-admin-status {
  background: var(--warning-bg);
  border: 1px solid #fed7aa;
  color: var(--warning);
}

.message-admin-status.published {
  background: var(--success-bg);
  border-color: #bbf7d0;
  color: #166534;
}

.message-admin-status.stopped {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

.finance-status-pill,
.order-source-badge,
.customer-source-pill,
.log-module-pill,
.tech-badge,
.admin-user-id {
  align-items: center;
  display: inline-flex;
  line-height: 1.1;
  white-space: nowrap;
}

.finance-status-pill.warn,
.finance-reminder-card.danger,
.finance-summary-value.warn,
.finance-hint.warn,
.finance-line.warn strong {
  color: var(--danger);
}

.tech-status-badge.pending {
  background: var(--warning-bg);
  color: var(--warning);
}

.tech-status-badge.processing {
  background: #ecfeff;
  color: #0e7490;
}

.tech-status-badge.done {
  background: var(--success-bg);
  color: var(--success);
}

.tech-status-badge.cancelled {
  background: var(--danger-bg);
  color: var(--danger);
}

.permission-module-option,
.sales-channel-check,
.sales-product-check,
.message-toggle,
.message-check,
.check-line,
.customer-basic-note,
.tech-summary-tag {
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.permission-module-option:has(input:checked),
.sales-channel-check:has(input:checked),
.sales-product-check:has(input:checked),
.message-toggle:has(input:checked),
.message-check:has(input:checked) {
  background: var(--info-bg);
  border-color: #93c5fd;
  color: var(--info);
}

.sales-channel-check.none:has(input:checked),
.sales-product-check.none:has(input:checked) {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #334155;
}

.sales-channel-check.all:has(input:checked),
.sales-product-check.all:has(input:checked) {
  background: var(--success-bg);
  border-color: #bbf7d0;
  color: #166534;
}

.admin-user-card-permissions {
  display: grid;
  gap: 8px;
}

.admin-user-card-title,
.admin-user-card-grid,
.admin-user-form-grid,
.permission-module-grid,
.sales-channel-picker,
.sales-product-picker,
.message-side-grid,
.finance-order-detail-grid,
.settle-grid,
.ship-grid,
.mini-grid {
  align-items: start;
}

.table-wrap {
  scrollbar-gutter: stable;
}

.table-wrap table {
  table-layout: auto;
}

.orders-table td,
.finance-table td,
.products-table td,
.customers-table td {
  vertical-align: top;
}

.log-value,
.message-admin-title,
.rank-name,
.summary-line {
  min-width: 0;
}

.hidden {
  display: none;
}

@media (max-width: 1500px) {
  .manual-order-form-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .manual-order-form .manual-receiver,
  .manual-order-form .manual-phone,
  .manual-order-form .manual-region,
  .manual-order-form .manual-quantity,
  .manual-order-form .manual-amount,
  .manual-order-form .manual-sales {
    grid-column: span 2;
  }

  .manual-order-form .manual-customer {
    grid-column: span 3;
  }

  .manual-order-form .manual-address {
    grid-column: span 3;
  }

  .manual-order-form .manual-product,
  .manual-order-form .manual-remark {
    grid-column: span 6;
  }

  .manual-order-form {
    overflow-x: visible;
  }

  .tech-job-form-grid,
  .tech-job-form-grid.no-order-no {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    min-width: 0;
  }

  .tech-job-form-grid .tech-source-field,
  .tech-job-form-grid.no-order-no .tech-source-field {
    grid-column: span 2;
  }

  .tech-job-form-grid .tech-order-no-field {
    grid-column: span 2;
  }

  .tech-job-form-grid .tech-customer-field,
  .tech-job-form-grid.no-order-no .tech-customer-field {
    grid-column: span 2;
  }

  .tech-job-form-grid .tech-time-field,
  .tech-job-form-grid.no-order-no .tech-time-field {
    grid-column: span 2;
  }

  .tech-job-form-grid .tech-sales-field,
  .tech-job-form-grid.no-order-no .tech-sales-field {
    grid-column: span 2;
  }

  .tech-job-form-grid .tech-amount-field,
  .tech-job-form-grid.no-order-no .tech-amount-field {
    grid-column: span 2;
  }

  .tech-job-form-grid .tech-config-field,
  .tech-job-form-grid.no-order-no .tech-config-field {
    grid-column: span 6;
  }

  .tech-job-form-grid .tech-remark-field,
  .tech-job-form-grid.no-order-no .tech-remark-field {
    grid-column: span 6;
  }

  .tech-job-form {
    overflow-x: visible;
  }

  .tech-filter-toolbar {
    grid-template-columns: minmax(260px, 1fr) 150px 150px auto auto minmax(160px, auto);
  }

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

  .tech-performance-filter {
    grid-template-columns: repeat(2, minmax(130px, 0.5fr)) repeat(2, minmax(150px, 0.75fr)) auto;
  }

  .tech-performance-kpis {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

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

  .after-sale-filter-toolbar {
    grid-template-columns: minmax(320px, 1.4fr) repeat(3, minmax(120px, 0.8fr)) repeat(2, 132px) auto auto;
  }

  .after-sale-summary-panel {
    grid-template-columns: minmax(120px, 0.4fr) minmax(240px, 1fr) minmax(240px, 1fr);
  }

  .after-sale-read-grid,
  .after-sale-source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .k-order-toolbar {
    grid-template-columns: minmax(260px, 1.4fr) repeat(4, minmax(112px, 0.55fr));
  }

  .k-order-import-toolbar {
    grid-template-columns: minmax(220px, 1fr) 120px minmax(220px, 1fr) auto;
  }

  .k-order-form-grid,
  .k-shop-form-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .k-order-info-grid {
    grid-template-columns: 120px minmax(220px, 0.95fr) minmax(260px, 1.1fr) minmax(300px, 1.25fr);
  }

  .k-order-info-grid.no-platform-meta {
    grid-template-columns: 120px minmax(220px, 0.95fr) minmax(260px, 1.1fr) minmax(300px, 1.25fr);
  }

  .k-order-info-grid:not(.no-platform-meta) .span-3 {
    grid-column: span 2;
  }

  .k-order-money-grid {
    grid-template-columns: minmax(220px, 0.95fr) minmax(300px, 1.35fr) minmax(108px, 0.48fr) minmax(130px, 0.58fr) minmax(140px, 0.62fr);
  }

  .k-order-item-row {
    grid-template-columns: 94px minmax(220px, 1.4fr) 66px 88px 96px 72px 88px 96px minmax(100px, 0.7fr) auto;
  }

  .k-order-item-table-head {
    grid-template-columns: 94px minmax(220px, 1.4fr) 66px 88px 96px 72px 88px 96px minmax(100px, 0.7fr) auto;
  }

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

  .k-order-card .tech-job-card-head {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .k-order-card.is-approved .tech-job-card-head {
    grid-template-columns: 1fr;
  }

  .k-order-card.is-collapsed .tech-job-card-head,
  .k-order-card.is-approved.is-collapsed .tech-job-card-head {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) minmax(460px, max-content);
  }

  .k-order-key-row {
    grid-template-columns: minmax(110px, 0.72fr) minmax(160px, 0.9fr) minmax(240px, 1.8fr);
  }

  .k-order-card .tech-job-actions {
    justify-content: flex-start;
  }

  .k-order-card.is-collapsed .tech-job-actions {
    justify-content: flex-end;
    min-width: 460px;
    width: auto;
  }

  .k-order-card.is-approved .tech-job-actions {
    min-width: 0;
    width: 100%;
  }

  .k-order-card.is-approved.is-collapsed .tech-job-actions {
    min-width: 460px;
    width: auto;
  }

  .k-order-export-panel {
    grid-template-columns: minmax(180px, 0.75fr) minmax(0, 1.6fr) auto;
  }
}

@media (max-width: 760px) {
  main {
    padding: 16px 14px;
  }

  .role-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .role-select {
    max-width: none;
  }

  .module-tabs {
    flex-direction: column;
    align-items: stretch;
    overflow-x: visible;
    position: static;
  }

  .module-tab-row {
    align-items: stretch;
    flex-direction: column;
    overflow-x: visible;
  }

  .module-tab-group {
    align-items: flex-start;
    flex-direction: column;
  }

  .module-tab-group-items,
  .status-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .module-tab-row-products .module-tab-group-items {
    overflow-x: visible;
  }

  .module-tab,
  .status-tabs .status-tab {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }

  .list-toolbar,
  .product-list-toolbar,
  .tech-filter-toolbar,
  .customer-filter-toolbar,
  .after-sale-filter-toolbar,
  .k-order-toolbar,
  .k-order-import-toolbar,
  .message-filter-toolbar,
  .finance-toolbar {
    position: static;
  }

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

  .jd-sync-key-row,
  .jd-sync-form-row,
  .product-id-link-row {
    grid-template-columns: 1fr;
  }

  .jd-sync-actions {
    justify-content: flex-start;
  }

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

  .manual-order-form .manual-receiver,
  .manual-order-form .manual-phone,
  .manual-order-form .manual-region,
  .manual-order-form .manual-address,
  .manual-order-form .manual-product,
  .manual-order-form .manual-quantity,
  .manual-order-form .manual-amount,
  .manual-order-form .manual-customer,
  .manual-order-form .manual-sales,
  .manual-order-form .manual-remark {
    grid-column: 1 / -1;
  }

  .customer-form-grid,
  .tech-job-note-grid,
  .admin-user-form-grid,
  .admin-user-card-head,
  .admin-user-card-grid,
  .admin-user-card-foot,
  .password-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-user-card-permissions,
  .admin-user-card-foot,
  .admin-user-actions {
    grid-column: 1 / -1;
  }

  .admin-user-actions {
    justify-content: flex-start;
  }

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

  .tech-job-head-meta {
    justify-content: flex-start;
  }

  .product-form button,
  .customer-form button,
  .password-panel button {
    width: 100%;
  }

  #product-search,
  #customer-search,
  #admin-user-search,
  #finance-search,
  #order-search {
    flex-basis: 100%;
    max-width: none;
  }

  .finance-summary-grid,
  .finance-reminder-cards,
  .finance-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-toolbar {
    grid-template-columns: 1fr;
  }

  .finance-toolbar-filter,
  .finance-toolbar-date,
  .finance-toolbar-search,
  .finance-toolbar-customer {
    flex: 1 1 100%;
    min-width: 0;
  }

  .finance-order-card-header {
    grid-template-columns: 1fr;
  }

  .finance-order-amount,
  .finance-order-actions {
    text-align: left;
  }

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

  .tech-performance-filter,
  .tech-performance-kpis,
  .tech-performance-grid {
    grid-template-columns: 1fr;
  }

  .tech-performance-card {
    overflow-x: auto;
  }

  .tech-filter-toolbar #tech-job-search,
  .tech-filter-summary {
    grid-column: 1 / -1;
  }

  .after-sale-status-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .after-sale-filter-toolbar,
  .after-sale-create-grid,
  .after-sale-edit-grid,
  .after-sale-summary-panel,
  .after-sale-read-grid,
  .after-sale-source-grid,
  .after-sale-log-editor {
    grid-template-columns: 1fr;
  }

  .after-sale-filter-summary,
  .after-sale-create-grid .wide,
  .after-sale-edit-grid .wide,
  .after-sale-source-item.wide {
    grid-column: 1 / -1;
  }

  .after-sale-card .tech-job-card-head {
    grid-template-columns: 1fr;
  }

  .after-sale-compact-head {
    grid-template-columns: 1fr;
  }

  .after-sale-compact-main,
  .after-sale-compact-meta,
  .after-sale-compact-actions {
    justify-content: flex-start;
  }

  .after-sale-compact-meta {
    flex-wrap: wrap;
  }

  .k-order-status-tabs,
  .k-order-toolbar,
  .k-order-export-panel,
  .k-order-form-grid,
  .k-shop-form-grid,
  .k-order-import-toolbar,
  .k-order-item-table-head,
  .k-order-item-row,
  .k-order-summary-panel,
  .k-order-card-grid,
  .k-order-detail-grid,
  .k-order-import-row {
    grid-template-columns: 1fr;
  }

  .k-order-key-row,
  .k-order-card .tech-job-card-head {
    grid-template-columns: 1fr;
  }

  .k-order-card.is-collapsed .tech-job-card-head,
  .k-order-card.is-approved.is-collapsed .tech-job-card-head {
    grid-template-columns: 1fr;
  }

  .k-order-card.is-collapsed .tech-job-actions,
  .k-order-card.is-approved.is-collapsed .tech-job-actions {
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
  }

  .k-order-head-top,
  .k-order-card-subline {
    flex-wrap: wrap;
    white-space: normal;
  }

  .k-order-toolbar-summary,
  .k-order-export-warning,
  .k-order-info-grid.no-platform-meta .k-order-company-field,
  .k-order-form-grid .span-2,
  .k-order-form-grid .span-3,
  .k-shop-form-grid .span-2,
  .k-shop-form-grid .span-3 {
    grid-column: 1 / -1;
  }

  .k-order-import-side {
    justify-items: start;
    text-align: left;
  }

  .k-order-template-head {
    align-items: stretch;
    flex-direction: column;
  }

  .k-order-template-card {
    min-height: 72px;
    width: 100%;
  }

  .k-order-template-apply {
    height: 72px;
    width: 100%;
  }

  .k-order-template-card .k-order-template-delete {
    min-width: 22px;
    width: 22px;
  }

  .k-order-footer-actions {
    justify-content: stretch;
  }

  .k-order-footer-actions button {
    flex: 1 1 100%;
  }

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

  .customer-filter-toolbar #customer-search,
  .customer-filter-summary {
    grid-column: 1 / -1;
  }

  .message-form-head {
    align-items: stretch;
    flex-direction: column;
  }

  .message-editor-layout,
  .message-side-grid,
  .message-filter-toolbar,
  .message-admin-card,
  .message-admin-main,
  .message-read-row,
  .message-poster-row {
    grid-template-columns: 1fr;
  }

  .message-side-wide,
  .message-wide {
    grid-column: 1 / -1;
  }

  .message-filter-toolbar .summary-line {
    justify-self: start;
  }

  .home-settings-grid,
  .home-banner-form-grid,
  .home-hot-row {
    grid-template-columns: 1fr;
  }

  .home-hot-list {
    grid-template-columns: 1fr;
  }

  .home-setting-row-head,
  .home-settings-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .home-banner-preview {
    width: 100%;
  }

  .message-admin-thumb,
  .message-poster-preview {
    height: 120px;
    width: 100%;
  }

  .message-read-time {
    text-align: left;
  }

  .settle-form {
    min-width: 0;
  }

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

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

  .settle-actions button {
    min-height: 44px;
    width: 100%;
  }
}
