:root {
  --navy: #101b33;
  --blue: #2f6fd6;
  --primary: #2f6fd6;
  --line: #e7ebf1;
  --bg: #f4f6f9;
  --text: #1f2937;
  --muted: #6b7280;
  --soft: #fff8ec;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 480px) 1fr;
  background:
    linear-gradient(120deg, rgba(16, 27, 51, .92), rgba(47, 111, 214, .78)),
    url("https://images.unsplash.com/photo-1554224155-6726b3ff858f?auto=format&fit=crop&w=1600&q=80") center/cover;
}
.login-panel {
  margin: 8vh 0 8vh 8vw;
  padding: 42px;
  align-self: center;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(8, 20, 45, .24);
}
.brand-mark, .brand-inline span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: #c8912b;
  font-weight: 800;
}
.login-panel h1 { margin: 18px 0 8px; font-size: 32px; }
.login-panel p { margin: 0 0 28px; color: var(--muted); line-height: 1.8; }
.login-form { display: grid; gap: 16px; }
.login-form label, .steps label {
  display: grid;
  gap: 8px;
  color: #374151;
  font-weight: 600;
}
input, select {
  height: 38px;
  padding: 0 12px;
  border: 1px solid #cfd6e3;
  border-radius: 4px;
  background: #fff;
}
.login-form button, .primary {
  height: 40px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: var(--blue);
  font-weight: 700;
}
.login-error {
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 4px;
  color: #991b1b;
  background: #fff1f2;
}
.login-alt { display: grid; gap: 10px; margin-top: 18px; color: var(--muted); }
.login-alt button {
  height: 38px;
  border: 1px solid var(--blue);
  border-radius: 4px;
  color: var(--blue);
  background: #fff;
}
.login-preview {
  align-self: end;
  justify-self: start;
  width: min(560px, 80%);
  margin: 0 0 12vh 8vw;
  color: #fff;
}
.preview-card {
  padding: 28px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}
.preview-card span, .preview-card small { display: block; opacity: .82; }
.preview-card strong { display: block; margin: 8px 0; font-size: 30px; }
.preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.preview-grid div { padding: 16px; border-radius: 6px; background: rgba(255,255,255,.16); }
.preview-grid b { display: block; font-size: 28px; }

.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  color: #fff;
  background: var(--navy);
}
.user-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.top-left, .top-right, .main-nav, .toolbar, .date-row, .section-head, .modal-actions { display: flex; align-items: center; gap: 10px; }
.user-nav-left, .user-nav-right { min-width: 0; }
.user-nav-right { margin-left: auto; }
.brand-inline { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; margin-right: 18px; }
.plain-btn, .platform-btn, .main-nav button {
  border: 0;
  color: inherit;
  background: transparent;
}
.company-btn {
  height: 32px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 4px;
  color: #dbeafe;
  background: rgba(255,255,255,.08);
}
.shop-workspace .company-btn {
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workspace-version-meta {
  max-width: 360px;
  overflow: hidden;
  color: #dbeafe;
  font-size: 12px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kjs-top-dropdown {
  position: fixed;
  z-index: 120;
  min-width: 160px;
  padding: 5px 0;
  color: #4b5563;
  background: #fff;
  border: 1px solid #d6dbe4;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
}
.workspace-switch-dropdown {
  min-width: 238px;
}
.user-account-dropdown {
  min-width: 148px;
}
.platform-version-dropdown {
  min-width: 216px;
}
.kjs-top-dropdown button,
.kjs-top-dropdown a {
  display: block;
  width: 100%;
  min-height: 28px;
  padding: 4px 18px;
  border: 0;
  color: #4b5563;
  background: #fff;
  font-size: 12px;
  line-height: 20px;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}
.kjs-top-dropdown button:hover,
.kjs-top-dropdown button:focus,
.kjs-top-dropdown a:hover,
.kjs-top-dropdown a:focus {
  color: var(--blue);
  background: #f4f7fb;
}
.kjs-top-dropdown button:disabled {
  color: #98a2b3;
  cursor: default;
}
.kjs-top-dropdown .workspace-current-shop {
  min-height: 46px;
  color: #344054;
  background: #f8fafc;
}
.kjs-top-dropdown .user-account-current {
  min-height: 44px;
  color: #344054;
  background: #f8fafc;
}
.kjs-top-dropdown .workspace-current-shop span,
.kjs-top-dropdown .workspace-current-shop small,
.kjs-top-dropdown .user-account-current span,
.kjs-top-dropdown .user-account-current small {
  display: block;
  overflow: hidden;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kjs-top-dropdown .workspace-current-shop small {
  color: #667085;
}
.kjs-top-dropdown .user-account-current small {
  color: #667085;
}
.platform-version-dropdown button span,
.platform-version-dropdown button small {
  display: block;
  overflow: hidden;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.platform-version-dropdown button small {
  color: #667085;
}
.platform-version-dropdown .platform-version-active {
  color: var(--blue);
  background: #f4f7fb;
  font-weight: 700;
}
.platform-version-dropdown .platform-version-active small {
  color: #436a9e;
  font-weight: 400;
}
.kjs-top-dropdown .workspace-action-strong {
  color: var(--blue);
  font-weight: 700;
}
.kjs-top-dropdown-divider {
  margin: 4px 0;
  border-top: 1px solid #e4e7ec;
}
.kjs-top-dropdown-header {
  padding: 5px 18px 3px;
  color: #98a2b3;
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
}
.platform-btn {
  height: 56px;
  padding: 0 18px;
  background: #28477f;
  font-weight: 700;
}
.search-input {
  width: 230px;
  height: 32px;
  border: 0;
  background: rgba(255,255,255,.14);
  color: #fff;
}
#user-menu {
  min-width: 64px;
  white-space: nowrap;
}
.main-nav {
  position: sticky;
  top: 56px;
  z-index: 29;
  height: 42px;
  padding-left: 170px;
  background: #182747;
  color: #d6e3ff;
  overflow: visible;
}
.main-nav-item {
  position: relative;
  height: 42px;
}
.main-nav button,
.main-nav-trigger {
  height: 42px;
  padding: 0 16px;
}
.main-nav-trigger {
  min-width: 0;
  font-weight: 700;
}
.main-nav .nav-active {
  color: #ffd24d;
  background: transparent;
}
.shop-workspace .main-nav .nav-active { color: #ffd24d; }
.main-nav-dropdown {
  position: absolute;
  top: 42px;
  left: 0;
  z-index: 80;
  display: none;
  min-width: 122px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  padding: 6px 0;
  color: #4b5563;
  background: #fff;
  border: 1px solid #d6dbe4;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .16);
}
.main-nav-item:hover .main-nav-dropdown,
.main-nav-item:focus-within .main-nav-dropdown {
  display: block;
}
.main-nav-link {
  display: block;
  width: 100%;
  height: auto;
  min-height: 30px;
  padding: 5px 18px;
  color: #4b5563;
  line-height: 20px;
  text-align: left;
  white-space: nowrap;
  background: #fff;
}
.main-nav-link:hover,
.main-nav-link:focus,
.main-nav-link.dropdown-active {
  color: var(--blue);
  background: #f4f7fb;
}
.main-nav-group-title {
  padding: 7px 18px 3px;
  color: #98a2b3;
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}
.workspace { display: grid; grid-template-columns: 176px 1fr; min-height: calc(100vh - 98px); }
.app-shell.sidebar-collapsed .workspace { grid-template-columns: 54px 1fr; }
.sidebar {
  padding: 22px 14px;
  background: #eef2f7;
  border-right: 1px solid var(--line);
  transition: width .18s ease, padding .18s ease;
}
.sidebar a, .side-group b, .side-group span {
  display: block;
  padding: 10px 12px;
  border-radius: 4px;
}
.side-active { color: var(--blue); background: #dde8fa; font-weight: 800; }
.side-group { margin-top: 8px; }
.side-group b { margin-top: 8px; }
.side-group span { color: #8a94a6; padding-left: 24px; }
.sidebar .side-child { padding-left: 24px; color: #8a94a6; }
.side-group-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 0;
  border-radius: 4px;
  color: #344054;
  background: transparent;
  font-weight: 700;
  text-align: left;
}
.side-group-toggle:hover { background: #e6edf7; }
.side-group-toggle span {
  padding: 0;
  color: inherit;
}
.side-group-toggle i {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}
.submenu-list {
  display: grid;
  gap: 2px;
}
.side-group.closed .submenu-list { display: none; }
.sidebar-collapse-btn {
  display: block;
  color: var(--muted);
  margin-top: 8px;
  border-top: 1px solid #dbe2ec;
}
.app-shell.sidebar-collapsed .sidebar { padding: 16px 8px; }
.app-shell.sidebar-collapsed .sidebar a:not(.sidebar-collapse-btn),
.app-shell.sidebar-collapsed .side-group { display: none; }
.app-shell.sidebar-collapsed .sidebar-collapse-btn {
  padding: 10px 0;
  text-align: center;
}
.content { padding: 18px 48px 18px 18px; overflow: auto; }
.shop-workspace .main-content > .notice,
.shop-workspace .main-content > .toolbar {
  display: none;
}
.container-fluid {
  width: 100%;
  max-width: none;
}
.main-content {
  width: 100%;
  min-width: 0;
}
.shop-workspace-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 8px 12px;
  color: #475467;
  background: #f7f9fc;
  border: 1px solid #dbe2ec;
  border-radius: 3px;
  font-size: 12px;
  line-height: 20px;
}
.shop-workspace-banner b { color: #344054; }
.shop-workspace-banner span { color: #667085; }
.shop-dashboard-topline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  padding: 4px 8px;
  border: 1px solid #dbe2ec;
  background: #f7f9fc;
  color: #475467;
  font-size: 12px;
  line-height: 20px;
}
.shop-dashboard-topline b {
  flex: 0 0 auto;
  color: #344054;
  font-weight: 700;
  white-space: nowrap;
}
.shop-dashboard-topline-tags {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}
.shop-dashboard-topline-tags span {
  overflow: hidden;
  color: #667085;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-dashboard-topline-tags i {
  margin-right: 3px;
  color: #344054;
  font-style: normal;
}
.shop-dashboard-topline button {
  flex: 0 0 auto;
  min-height: 22px;
  padding: 0 4px;
}
.shop-dashboard-status-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(128px, 1fr));
  margin: 0 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  line-height: 20px;
}
.shop-dashboard-status-strip div {
  min-width: 0;
  padding: 7px 10px;
  border-right: 1px solid var(--line);
}
.shop-dashboard-status-strip div:last-child { border-right: 0; }
.shop-dashboard-status-strip span,
.shop-dashboard-status-strip small {
  display: block;
  overflow: hidden;
  color: #667085;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-dashboard-status-strip b {
  display: block;
  overflow: hidden;
  color: #1f2937;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-dashboard-reminders {
  margin-top: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.shop-dashboard-reminders .section-head {
  margin: 0;
  padding: 5px 10px;
  border-bottom: 1px solid var(--line);
}
.shop-dashboard-reminders .section-head h2 {
  font-size: 14px;
  line-height: 18px;
}
.shop-dashboard-reminder-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}
.shop-dashboard-reminder {
  display: grid;
  grid-template-columns: minmax(60px, .8fr) minmax(54px, .6fr) minmax(120px, 1.4fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px 10px;
  border-right: 1px solid var(--line);
  color: #475467;
  font-size: 12px;
  line-height: 18px;
}
.shop-dashboard-reminder:last-child { border-right: 0; }
.shop-dashboard-reminder span,
.shop-dashboard-reminder small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-dashboard-reminder b {
  color: #475467;
  font-weight: 700;
}
.shop-dashboard-reminder.done b { color: #3c8b22; }
.shop-dashboard-reminder.warn b,
.shop-dashboard-reminder.pending b { color: #b35c00; }
.shop-dashboard-reminder button {
  min-height: 24px;
  padding: 0 6px;
}
.shop-dashboard-refund-scope {
  display: grid;
  grid-template-columns: auto minmax(150px, 1.2fr) repeat(3, minmax(150px, 1fr));
  align-items: stretch;
  margin: -2px 0 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: #475467;
  font-size: 12px;
  line-height: 18px;
}
.shop-dashboard-refund-scope > b,
.shop-dashboard-refund-scope > span,
.shop-dashboard-refund-scope > div {
  min-width: 0;
  padding: 4px 8px;
  border-right: 1px solid var(--line);
}
.shop-dashboard-refund-scope > div:last-child {
  border-right: 0;
}
.shop-dashboard-refund-scope > b {
  color: #344054;
  line-height: 20px;
  background: #fbfcfe;
}
.shop-dashboard-refund-scope > span {
  overflow: hidden;
  color: #b35c00;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #fffaf2;
}
.shop-dashboard-refund-scope div span,
.shop-dashboard-refund-scope div small,
.shop-dashboard-refund-scope div strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-dashboard-refund-scope div span,
.shop-dashboard-refund-scope div small {
  color: #667085;
}
.shop-dashboard-refund-scope div strong {
  color: #344054;
}
.shop-dashboard-refund-scope div.active {
  background: #f5f9ff;
}
.shop-dashboard-refund-scope div.active strong {
  color: #0f64d8;
}
.shop-dashboard-section-head {
  align-items: flex-end;
  gap: 10px;
  margin: 8px 0 6px;
  padding: 0;
}
.shop-dashboard-section-head > div:first-child {
  min-width: 220px;
}
.shop-dashboard-section-head h2 {
  font-size: 14px;
  line-height: 20px;
}
.shop-dashboard-original-metrics {
  margin: 0 0 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: #344054;
  font-size: 12px;
  line-height: 20px;
}
.shop-dashboard-original-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}
.shop-dashboard-original-title b {
  font-size: 13px;
  line-height: 20px;
}
.shop-dashboard-original-title span {
  color: #667085;
}
.shop-dashboard-original-grid {
  display: grid;
  grid-template-columns: minmax(78px, .8fr) repeat(10, minmax(86px, 1fr));
  overflow-x: auto;
}
.shop-dashboard-original-grid div {
  min-width: 0;
  padding: 4px 7px;
  border-right: 1px solid var(--line);
  text-align: center;
}
.shop-dashboard-original-grid div:last-child {
  border-right: 0;
}
.shop-dashboard-original-grid span,
.shop-dashboard-original-grid small {
  display: block;
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-dashboard-original-grid b {
  display: block;
  overflow: hidden;
  color: #2f9423;
  font-size: 16px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-dashboard-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px;
  line-height: 20px;
}
.section-head.shop-dashboard-section-head .shop-dashboard-head-actions button {
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
}
.shop-dashboard-wide-table.shop-dashboard-sales-table th,
.shop-dashboard-wide-table.shop-dashboard-sales-table td,
.shop-dashboard-wide-table.shop-dashboard-operation-table th,
.shop-dashboard-wide-table.shop-dashboard-operation-table td,
.shop-dashboard-wide-table.shop-dashboard-rank-table th,
.shop-dashboard-wide-table.shop-dashboard-rank-table td,
.shop-dashboard-wide-table.shop-dashboard-refund-table th,
.shop-dashboard-wide-table.shop-dashboard-refund-table td,
.shop-dashboard-wide-table.shop-dashboard-snapshot-table th,
.shop-dashboard-wide-table.shop-dashboard-snapshot-table td {
  padding: 4px 7px;
  line-height: 20px;
}
.shop-dashboard-wide-table.shop-dashboard-sales-table th,
.shop-dashboard-wide-table.shop-dashboard-operation-table th,
.shop-dashboard-wide-table.shop-dashboard-rank-table th,
.shop-dashboard-wide-table.shop-dashboard-refund-table th,
.shop-dashboard-wide-table.shop-dashboard-snapshot-table th {
  color: #4b5563;
  font-weight: 600;
  background: #f5f7fb;
}
.shop-dashboard-wide-table.shop-dashboard-sales-table th:not(:first-child),
.shop-dashboard-wide-table.shop-dashboard-sales-table td:not(:first-child),
.shop-dashboard-wide-table.shop-dashboard-operation-table th:not(:first-child),
.shop-dashboard-wide-table.shop-dashboard-operation-table td:not(:first-child),
.shop-dashboard-wide-table.shop-dashboard-rank-table th:not(:first-child),
.shop-dashboard-wide-table.shop-dashboard-rank-table td:not(:first-child),
.shop-dashboard-wide-table.shop-dashboard-refund-table th:not(:first-child),
.shop-dashboard-wide-table.shop-dashboard-refund-table td:not(:first-child),
.shop-dashboard-wide-table.shop-dashboard-snapshot-table th:not(:first-child),
.shop-dashboard-wide-table.shop-dashboard-snapshot-table td:not(:first-child) {
  text-align: center;
}
.dashboard-value {
  display: inline-block;
  font-weight: 700;
  white-space: nowrap;
}
.dashboard-value.money,
.dashboard-value.profit,
.dashboard-value.rate {
  color: #228b22;
}
.dashboard-value.refund {
  color: #b35c00;
}
.dashboard-value.cost {
  color: #4b5563;
}
.dashboard-value.negative {
  color: #d14343;
}
.shop-dashboard-wide-table .muted-cell {
  margin-top: 0;
  color: #8a94a6;
  line-height: 16px;
}
.shop-home-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 6px;
  border: 1px solid var(--line);
  background: #fff;
}
.shop-home-toolbar .kjs-report-tabs {
  flex: 0 1 auto;
  margin: 0;
  padding: 4px 8px;
  border: 0;
  border-right: 1px solid var(--line);
}
.shop-home-toolbar .kjs-report-tabs button,
.shop-home-toolbar .segmented button,
.shop-home-control-line > button {
  min-height: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 3px;
}
.compact-tabs button { min-width: 72px; }
.shop-dashboard-last-action {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-dashboard-export-toolbar {
  margin-bottom: 8px;
  padding: 6px 8px;
}
.shop-dashboard-export-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.shop-dashboard-action-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #fff;
  color: #475467;
  font-size: 12px;
  line-height: 20px;
}
.shop-dashboard-action-tools div {
  min-width: 0;
}
.shop-dashboard-action-tools b,
.shop-dashboard-action-tools span {
  display: inline-block;
  margin-right: 8px;
}
.shop-dashboard-action-tools button {
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #cfd6e3;
  border-radius: 3px;
  background: #fff;
  white-space: nowrap;
}
.shop-dashboard-action-log-block {
  margin-top: 0;
}
.shop-dashboard-action-log-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #fbfcfe;
  color: #667085;
  font-size: 12px;
  line-height: 20px;
}
.shop-dashboard-action-log-filter span {
  margin-right: 2px;
}
.shop-dashboard-action-log-filter button {
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #cfd6e3;
  border-radius: 3px;
  background: #fff;
}
.shop-dashboard-action-log-filter button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.shop-profit-report-action {
  white-space: nowrap;
}
.shop-profit-filter-toolbar {
  margin-bottom: 6px;
  border: 1px solid var(--line);
  background: #fff;
}
.shop-profit-filter-toolbar .segmented,
.shop-profit-filter-toolbar .report-controls {
  gap: 5px;
  padding: 4px 8px;
}
.shop-profit-filter-toolbar button,
.shop-profit-filter-toolbar select,
.shop-profit-filter-toolbar input {
  min-height: 24px;
  height: 24px;
  border-radius: 3px;
  font-size: 12px;
  line-height: 20px;
}
.shop-profit-filter-toolbar .segmented button,
.shop-profit-filter-toolbar .report-controls button {
  min-height: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 3px;
}
.shop-profit-filter-toolbar select,
.shop-profit-filter-toolbar input {
  padding: 0 7px;
}
.shop-profit-filter-toolbar span {
  color: #667085;
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
}
.shop-profit-scope-band {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 0;
  margin: 0 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  line-height: 20px;
  overflow-x: auto;
}
.shop-profit-scope-cell {
  min-width: 150px;
  padding: 6px 9px;
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.shop-profit-scope-cell:last-child {
  border-right: 0;
}
.shop-profit-scope-cell span,
.shop-profit-scope-cell small {
  display: block;
  color: #667085;
}
.shop-profit-scope-cell b {
  display: block;
  color: #1f7a1f;
  font-size: 14px;
  line-height: 22px;
}
.shop-profit-report-scroll {
  margin-bottom: 10px;
}
.shop-profit-date-detail-scroll {
  margin-bottom: 10px;
}
.shop-profit-item-rank-scroll {
  margin-bottom: 10px;
}
.shop-profit-trend-scroll {
  margin-bottom: 10px;
}
.shop-sku-report-scroll {
  margin-bottom: 10px;
}
.shop-refund-profit-scroll {
  margin-bottom: 10px;
}
.shop-expense-detail-scroll {
  margin-bottom: 10px;
}
.shop-profit-item-report-scroll {
  margin-bottom: 10px;
}
.shop-profit-item-detail-breakdown-scroll {
  margin-bottom: 10px;
}
.shop-profit-report-table th,
.shop-profit-report-table td,
.shop-profit-date-detail-table th,
.shop-profit-date-detail-table td,
.shop-profit-item-rank-table th,
.shop-profit-item-rank-table td,
.shop-profit-trend-table th,
.shop-profit-trend-table td,
.shop-sku-report-table th,
.shop-sku-report-table td,
.shop-refund-profit-table th,
.shop-refund-profit-table td,
.shop-expense-detail-table th,
.shop-expense-detail-table td,
.shop-profit-item-report-table th,
.shop-profit-item-report-table td,
.shop-profit-item-detail-breakdown-table th,
.shop-profit-item-detail-breakdown-table td {
  padding: 4px 7px;
  line-height: 20px;
  white-space: nowrap;
}
.shop-profit-report-table,
.shop-profit-date-detail-table,
.shop-profit-item-rank-table,
.shop-profit-trend-table,
.shop-sku-report-table,
.shop-refund-profit-table,
.shop-expense-detail-table,
.shop-profit-item-report-table,
.shop-profit-item-detail-breakdown-table {
  table-layout: fixed;
}
.shop-profit-item-detail-breakdown-table {
  width: 510px;
  min-width: 510px;
}
.shop-profit-item-report-table {
  width: 1340px;
  min-width: 1340px;
}
.shop-profit-date-detail-table {
  width: 1592px;
  min-width: 1592px;
}
.shop-profit-item-rank-table {
  width: 952px;
  min-width: 952px;
}
.shop-profit-trend-table {
  width: 740px;
  min-width: 740px;
}
.shop-sku-report-table {
  width: 1630px;
  min-width: 1630px;
}
.shop-refund-profit-table {
  width: 1360px;
  min-width: 1360px;
}
.shop-expense-detail-table {
  width: 1430px;
  min-width: 1430px;
}
.shop-profit-report-table th,
.shop-profit-date-detail-table th,
.shop-profit-item-rank-table th,
.shop-profit-trend-table th,
.shop-sku-report-table th,
.shop-refund-profit-table th,
.shop-expense-detail-table th,
.shop-profit-item-report-table th,
.shop-profit-item-detail-breakdown-table th {
  background: #f6f8fb;
  color: #495366;
  font-weight: 600;
}
.shop-profit-item-detail-breakdown-table th:nth-child(1),
.shop-profit-item-detail-breakdown-table td:nth-child(1) {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  text-align: left;
}
.shop-profit-item-detail-breakdown-table th:nth-child(2),
.shop-profit-item-detail-breakdown-table td:nth-child(2) {
  width: 132px;
  min-width: 132px;
  max-width: 132px;
  text-align: right;
}
.shop-profit-item-detail-breakdown-table th:nth-child(3),
.shop-profit-item-detail-breakdown-table td:nth-child(3) {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  text-align: left;
  white-space: normal;
}
.shop-profit-item-report-table th:not(:nth-child(2)),
.shop-profit-item-report-table td:not(:nth-child(2)) {
  text-align: center;
}
.shop-profit-item-report-table th:nth-child(1),
.shop-profit-item-report-table td:nth-child(1) {
  width: 56px;
  min-width: 56px;
  max-width: 56px;
}
.shop-profit-item-report-table th:nth-child(2),
.shop-profit-item-report-table td:nth-child(2) {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  text-align: left;
  white-space: normal;
}
.shop-profit-item-report-table th:nth-child(3),
.shop-profit-item-report-table td:nth-child(3) {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
}
.shop-profit-item-report-table th:nth-child(4),
.shop-profit-item-report-table td:nth-child(4),
.shop-profit-item-report-table th:nth-child(6),
.shop-profit-item-report-table td:nth-child(6),
.shop-profit-item-report-table th:nth-child(7),
.shop-profit-item-report-table td:nth-child(7),
.shop-profit-item-report-table th:nth-child(8),
.shop-profit-item-report-table td:nth-child(8),
.shop-profit-item-report-table th:nth-child(9),
.shop-profit-item-report-table td:nth-child(9) {
  width: 108px;
  min-width: 108px;
  max-width: 108px;
}
.shop-profit-item-report-table th:nth-child(5),
.shop-profit-item-report-table td:nth-child(5) {
  width: 112px;
  min-width: 112px;
  max-width: 112px;
}
.shop-profit-item-report-table th:nth-child(10),
.shop-profit-item-report-table td:nth-child(10),
.shop-profit-item-report-table th:nth-child(11),
.shop-profit-item-report-table td:nth-child(11) {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
}
.shop-profit-item-report-table th:nth-child(12),
.shop-profit-item-report-table td:nth-child(12) {
  width: 130px;
  min-width: 130px;
  max-width: 130px;
}
.shop-profit-date-detail-table th:not(:first-child),
.shop-profit-date-detail-table td:not(:first-child) {
  text-align: center;
}
.shop-profit-date-detail-table th:first-child,
.shop-profit-date-detail-table td:first-child {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  text-align: left;
}
.shop-profit-date-detail-table th:nth-child(2),
.shop-profit-date-detail-table td:nth-child(2),
.shop-profit-date-detail-table th:nth-child(4),
.shop-profit-date-detail-table td:nth-child(4),
.shop-profit-date-detail-table th:nth-child(5),
.shop-profit-date-detail-table td:nth-child(5),
.shop-profit-date-detail-table th:nth-child(6),
.shop-profit-date-detail-table td:nth-child(6),
.shop-profit-date-detail-table th:nth-child(7),
.shop-profit-date-detail-table td:nth-child(7),
.shop-profit-date-detail-table th:nth-child(8),
.shop-profit-date-detail-table td:nth-child(8),
.shop-profit-date-detail-table th:nth-child(9),
.shop-profit-date-detail-table td:nth-child(9),
.shop-profit-date-detail-table th:nth-child(10),
.shop-profit-date-detail-table td:nth-child(10),
.shop-profit-date-detail-table th:nth-child(12),
.shop-profit-date-detail-table td:nth-child(12),
.shop-profit-date-detail-table th:nth-child(13),
.shop-profit-date-detail-table td:nth-child(13),
.shop-profit-date-detail-table th:nth-child(14),
.shop-profit-date-detail-table td:nth-child(14),
.shop-profit-date-detail-table th:nth-child(15),
.shop-profit-date-detail-table td:nth-child(15) {
  width: 108px;
  min-width: 108px;
  max-width: 108px;
}
.shop-profit-date-detail-table th:nth-child(3),
.shop-profit-date-detail-table td:nth-child(3) {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}
.shop-profit-date-detail-table th:nth-child(11),
.shop-profit-date-detail-table td:nth-child(11),
.shop-profit-date-detail-table th:nth-child(16),
.shop-profit-date-detail-table td:nth-child(16) {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
}
.shop-profit-item-rank-table th:not(:nth-child(2)),
.shop-profit-item-rank-table td:not(:nth-child(2)) {
  text-align: center;
}
.shop-profit-item-rank-table th:nth-child(1),
.shop-profit-item-rank-table td:nth-child(1) {
  width: 56px;
  min-width: 56px;
  max-width: 56px;
}
.shop-profit-item-rank-table th:nth-child(2),
.shop-profit-item-rank-table td:nth-child(2) {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  text-align: left;
  white-space: normal;
}
.shop-profit-item-rank-table th:nth-child(3),
.shop-profit-item-rank-table td:nth-child(3),
.shop-profit-item-rank-table th:nth-child(4),
.shop-profit-item-rank-table td:nth-child(4),
.shop-profit-item-rank-table th:nth-child(5),
.shop-profit-item-rank-table td:nth-child(5),
.shop-profit-item-rank-table th:nth-child(6),
.shop-profit-item-rank-table td:nth-child(6) {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
}
.shop-profit-item-rank-table th:nth-child(7),
.shop-profit-item-rank-table td:nth-child(7) {
  width: 86px;
  min-width: 86px;
  max-width: 86px;
}
.shop-profit-item-rank-table th:nth-child(8),
.shop-profit-item-rank-table td:nth-child(8) {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
}
.shop-profit-trend-table th:not(:first-child),
.shop-profit-trend-table td:not(:first-child) {
  text-align: center;
}
.shop-profit-trend-table th:first-child,
.shop-profit-trend-table td:first-child {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  text-align: left;
}
.shop-profit-trend-table th:nth-child(2),
.shop-profit-trend-table td:nth-child(2),
.shop-profit-trend-table th:nth-child(3),
.shop-profit-trend-table td:nth-child(3),
.shop-profit-trend-table th:nth-child(4),
.shop-profit-trend-table td:nth-child(4),
.shop-profit-trend-table th:nth-child(5),
.shop-profit-trend-table td:nth-child(5),
.shop-profit-trend-table th:nth-child(6),
.shop-profit-trend-table td:nth-child(6) {
  width: 108px;
  min-width: 108px;
  max-width: 108px;
}
.shop-profit-trend-table th:nth-child(7),
.shop-profit-trend-table td:nth-child(7) {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
}
.shop-sku-report-table th:not(:nth-child(2)):not(:nth-child(3)):not(:nth-child(4)):not(:nth-child(5)),
.shop-sku-report-table td:not(:nth-child(2)):not(:nth-child(3)):not(:nth-child(4)):not(:nth-child(5)) {
  text-align: center;
}
.shop-sku-report-table th:nth-child(1),
.shop-sku-report-table td:nth-child(1) {
  width: 56px;
  min-width: 56px;
  max-width: 56px;
}
.shop-sku-report-table th:nth-child(2),
.shop-sku-report-table td:nth-child(2) {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  text-align: left;
  white-space: normal;
}
.shop-sku-report-table th:nth-child(3),
.shop-sku-report-table td:nth-child(3) {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  text-align: left;
}
.shop-sku-report-table th:nth-child(4),
.shop-sku-report-table td:nth-child(4) {
  width: 138px;
  min-width: 138px;
  max-width: 138px;
  text-align: left;
}
.shop-sku-report-table th:nth-child(5),
.shop-sku-report-table td:nth-child(5) {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
  text-align: left;
  white-space: normal;
}
.shop-sku-report-table th:nth-child(6),
.shop-sku-report-table td:nth-child(6),
.shop-sku-report-table th:nth-child(8),
.shop-sku-report-table td:nth-child(8),
.shop-sku-report-table th:nth-child(9),
.shop-sku-report-table td:nth-child(9),
.shop-sku-report-table th:nth-child(10),
.shop-sku-report-table td:nth-child(10),
.shop-sku-report-table th:nth-child(12),
.shop-sku-report-table td:nth-child(12) {
  width: 108px;
  min-width: 108px;
  max-width: 108px;
}
.shop-sku-report-table th:nth-child(7),
.shop-sku-report-table td:nth-child(7) {
  width: 112px;
  min-width: 112px;
  max-width: 112px;
}
.shop-sku-report-table th:nth-child(11),
.shop-sku-report-table td:nth-child(11) {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
}
.shop-sku-report-table th:nth-child(13),
.shop-sku-report-table td:nth-child(13),
.shop-sku-report-table th:nth-child(14),
.shop-sku-report-table td:nth-child(14) {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
}
.shop-sku-report-table th:nth-child(15),
.shop-sku-report-table td:nth-child(15) {
  width: 130px;
  min-width: 130px;
  max-width: 130px;
}
.shop-refund-profit-table th:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:nth-child(4)):not(:nth-child(5)),
.shop-refund-profit-table td:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:nth-child(4)):not(:nth-child(5)) {
  text-align: center;
}
.shop-refund-profit-table th:nth-child(1),
.shop-refund-profit-table td:nth-child(1) {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  text-align: left;
}
.shop-refund-profit-table th:nth-child(2),
.shop-refund-profit-table td:nth-child(2) {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  text-align: left;
}
.shop-refund-profit-table th:nth-child(3),
.shop-refund-profit-table td:nth-child(3) {
  width: 190px;
  min-width: 190px;
  max-width: 190px;
  text-align: left;
  white-space: normal;
}
.shop-refund-profit-table th:nth-child(4),
.shop-refund-profit-table td:nth-child(4) {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
  text-align: left;
}
.shop-refund-profit-table th:nth-child(5),
.shop-refund-profit-table td:nth-child(5) {
  width: 128px;
  min-width: 128px;
  max-width: 128px;
  text-align: left;
  white-space: normal;
}
.shop-refund-profit-table th:nth-child(6),
.shop-refund-profit-table td:nth-child(6),
.shop-refund-profit-table th:nth-child(7),
.shop-refund-profit-table td:nth-child(7),
.shop-refund-profit-table th:nth-child(8),
.shop-refund-profit-table td:nth-child(8),
.shop-refund-profit-table th:nth-child(9),
.shop-refund-profit-table td:nth-child(9) {
  width: 108px;
  min-width: 108px;
  max-width: 108px;
}
.shop-refund-profit-table th:nth-child(10),
.shop-refund-profit-table td:nth-child(10) {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}
.shop-refund-profit-table th:nth-child(11),
.shop-refund-profit-table td:nth-child(11) {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
}
.shop-expense-detail-table th:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:nth-child(4)):not(:nth-child(7)):not(:nth-child(8)),
.shop-expense-detail-table td:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:nth-child(4)):not(:nth-child(7)):not(:nth-child(8)) {
  text-align: center;
}
.shop-expense-detail-table th:nth-child(1),
.shop-expense-detail-table td:nth-child(1) {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  text-align: left;
}
.shop-expense-detail-table th:nth-child(2),
.shop-expense-detail-table td:nth-child(2) {
  width: 112px;
  min-width: 112px;
  max-width: 112px;
  text-align: left;
}
.shop-expense-detail-table th:nth-child(3),
.shop-expense-detail-table td:nth-child(3) {
  width: 88px;
  min-width: 88px;
  max-width: 88px;
  text-align: left;
}
.shop-expense-detail-table th:nth-child(4),
.shop-expense-detail-table td:nth-child(4) {
  width: 178px;
  min-width: 178px;
  max-width: 178px;
  text-align: left;
  white-space: normal;
}
.shop-expense-detail-table th:nth-child(5),
.shop-expense-detail-table td:nth-child(5),
.shop-expense-detail-table th:nth-child(6),
.shop-expense-detail-table td:nth-child(6) {
  width: 108px;
  min-width: 108px;
  max-width: 108px;
}
.shop-expense-detail-table th:nth-child(7),
.shop-expense-detail-table td:nth-child(7) {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  text-align: left;
  white-space: normal;
}
.shop-expense-detail-table th:nth-child(8),
.shop-expense-detail-table td:nth-child(8) {
  width: 270px;
  min-width: 270px;
  max-width: 270px;
  text-align: left;
  white-space: normal;
}
.shop-expense-detail-table th:nth-child(9),
.shop-expense-detail-table td:nth-child(9) {
  width: 108px;
  min-width: 108px;
  max-width: 108px;
}
.shop-expense-detail-table th:nth-child(10),
.shop-expense-detail-table td:nth-child(10) {
  width: 190px;
  min-width: 190px;
  max-width: 190px;
}
.shop-profit-report-table th:not(:first-child),
.shop-profit-report-table td:not(:first-child) {
  text-align: center;
}
.shop-profit-report-table th:first-child,
.shop-profit-report-table td:first-child {
  width: 168px;
  min-width: 168px;
  max-width: 168px;
  text-align: left;
  white-space: normal;
}
.shop-profit-report-table th:nth-child(2),
.shop-profit-report-table td:nth-child(2),
.shop-profit-report-table th:nth-child(4),
.shop-profit-report-table td:nth-child(4),
.shop-profit-report-table th:nth-child(5),
.shop-profit-report-table td:nth-child(5),
.shop-profit-report-table th:nth-child(6),
.shop-profit-report-table td:nth-child(6),
.shop-profit-report-table th:nth-child(7),
.shop-profit-report-table td:nth-child(7),
.shop-profit-report-table th:nth-child(8),
.shop-profit-report-table td:nth-child(8),
.shop-profit-report-table th:nth-child(9),
.shop-profit-report-table td:nth-child(9),
.shop-profit-report-table th:nth-child(10),
.shop-profit-report-table td:nth-child(10),
.shop-profit-report-table th:nth-child(12),
.shop-profit-report-table td:nth-child(12),
.shop-profit-report-table th:nth-child(13),
.shop-profit-report-table td:nth-child(13),
.shop-profit-report-table th:nth-child(14),
.shop-profit-report-table td:nth-child(14),
.shop-profit-report-table th:nth-child(15),
.shop-profit-report-table td:nth-child(15) {
  width: 108px;
  min-width: 108px;
  max-width: 108px;
}
.shop-profit-report-table th:nth-child(3),
.shop-profit-report-table td:nth-child(3) {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}
.shop-profit-report-table th:nth-child(11),
.shop-profit-report-table td:nth-child(11),
.shop-profit-report-table th:nth-child(16),
.shop-profit-report-table td:nth-child(16) {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
}
.shop-profit-report-table th:nth-child(17),
.shop-profit-report-table td:nth-child(17) {
  width: 178px;
  min-width: 178px;
  max-width: 178px;
}
.expense-scope-band {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 0;
  margin: 0 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  line-height: 20px;
  overflow-x: auto;
}
.expense-scope-cell {
  min-width: 170px;
  padding: 6px 9px;
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.expense-scope-cell:last-child {
  border-right: 0;
}
.expense-scope-cell span,
.expense-scope-cell small {
  display: block;
  color: #667085;
}
.expense-scope-cell b {
  display: block;
  color: #1f7a1f;
  font-size: 14px;
  line-height: 22px;
}
.expense-scope-cell.active {
  background: #f4fbf1;
  box-shadow: inset 0 2px 0 #2f8f2f;
}
.expense-scope-cell div {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
}
.expense-scope-cell .link-btn,
.expense-scope-cell button {
  min-height: 20px;
  padding: 0;
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
}
.shop-home-control-line {
  flex: 1 1 520px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px 8px;
  color: #475467;
  font-size: 12px;
  line-height: 20px;
}
.shop-home-date-tools,
.shop-home-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.shop-home-date-tools {
  flex: 1 1 360px;
}
.shop-home-actions {
  justify-content: flex-end;
  flex: 0 1 auto;
  margin-left: auto;
}
.shop-home-actions button {
  white-space: nowrap;
}
.date-range-text {
  min-width: 158px;
  padding: 1px 7px;
  border: 1px solid #cfd6e3;
  background: #fff;
}
.date-shift-btn {
  width: 46px;
  min-height: 26px;
  padding: 0;
}
.shop-dashboard-snapshot-strip {
  margin-bottom: 6px;
  border: 1px solid var(--line);
  background: #fff;
}
.shop-dashboard-snapshot-strip .section-head {
  margin: 0;
  padding: 4px 8px;
  border-bottom: 1px solid var(--line);
}
.shop-dashboard-snapshot-strip .section-head h2 {
  font-size: 14px;
  line-height: 18px;
}
.shop-dashboard-snapshot-strip .section-head button {
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
}
.shop-dashboard-snapshot-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}
.shop-dashboard-snapshot-card {
  min-width: 0;
  padding: 5px 8px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  text-align: left;
}
.shop-dashboard-snapshot-card:last-child { border-right: 0; }
.shop-dashboard-snapshot-card.active {
  background: #f5f9ff;
}
.shop-dashboard-snapshot-card span,
.shop-dashboard-snapshot-card small {
  display: block;
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-dashboard-snapshot-card b {
  display: block;
  overflow: hidden;
  color: #228b22;
  font-size: 16px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-dashboard-original-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: #667085;
  font-size: 12px;
  line-height: 20px;
}
.shop-dashboard-original-controls b {
  color: #344054;
  font-size: 12px;
  line-height: 20px;
}
.shop-dashboard-original-controls button {
  height: 22px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 3px;
}
.shop-dashboard-table-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: #667085;
  font-size: 12px;
  line-height: 20px;
}
.shop-dashboard-table-controls > div:first-child {
  min-width: 180px;
}
.shop-dashboard-table-controls b,
.shop-dashboard-table-controls span {
  font-size: 12px;
  line-height: 20px;
}
.shop-dashboard-table-controls b {
  display: block;
  color: #344054;
}
.shop-dashboard-table-sort,
.shop-dashboard-table-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.shop-dashboard-table-controls button {
  height: 22px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 3px;
}
.shop-dashboard-table-actions {
  margin-left: auto;
}
.shop-dashboard-table-actions .link-btn {
  border: 0;
  background: transparent;
}
.shop-home-kpis {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 0;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.shop-home-kpis div {
  min-height: 58px;
  padding: 6px 10px;
  border-right: 1px solid var(--line);
}
.shop-home-kpis div:last-child { border-right: 0; }
.shop-home-kpis span,
.shop-home-kpis small {
  display: block;
  color: #667085;
  line-height: 18px;
}
.shop-home-kpis b {
  display: block;
  margin: 2px 0 0;
  color: #1f2937;
  font-size: 17px;
  line-height: 20px;
}
#side-toolbar {
  position: fixed;
  right: 8px;
  top: 170px;
  z-index: 25;
  display: grid;
  gap: 8px;
}
#side-toolbar button {
  width: 40px;
  min-height: 42px;
  padding: 6px;
  border: 1px solid #d6deea;
  border-radius: 4px;
  color: #344054;
  background: #fff;
  box-shadow: 0 8px 18px rgba(16, 27, 51, .08);
}
#side-toolbar button:hover {
  color: var(--blue);
  border-color: #b9cbea;
}
.notice {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  background: #eaf2ff;
  border: 1px solid #cfe0ff;
  border-radius: 4px;
}
.notice a { color: var(--blue); }
.toolbar {
  margin-top: 14px;
  justify-content: space-between;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
}
.toolbar button, .date-row button, .section-head button {
  height: 34px;
  padding: 0 12px;
  border: 1px solid #cfd6e3;
  border-radius: 4px;
  background: #fff;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  margin: 14px 0;
}
.metrics article {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.metrics span, .metrics small { color: var(--muted); }
.metrics strong { display: block; margin: 8px 0; font-size: 26px; }
.profit-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.profit-panel > div {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.profit-panel span { color: var(--muted); }
.profit-panel strong { display: block; margin-top: 8px; font-size: 24px; }
.category-summary {
  grid-column: 1 / -1;
}
.section-head.compact { margin-bottom: 8px; }
.section-head.compact span { color: var(--muted); }
.bar-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr 90px;
  gap: 10px;
  align-items: center;
  padding: 7px 0;
}
.bar-track {
  height: 8px;
  border-radius: 999px;
  background: #e9edf4;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--blue);
}
.filter-panel, .data-section {
  background: #fff;
  border: 1px solid var(--line);
  padding: 14px;
}
.monthly-section { margin-bottom: 14px; }
.section-head > span { color: var(--muted); }
.date-row { flex-wrap: wrap; margin-bottom: 14px; }
.date-row .primary { border: 0; color: #fff; }
.fee-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 8px 16px;
  max-height: 230px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
}
.fee-grid label { display: flex; gap: 6px; align-items: center; color: #4b5563; }
.fee-grid input { width: 14px; height: 14px; }
.data-section { margin-top: 14px; }
.module-section { margin-top: 14px; }
.content.module-mode .profit-panel,
.content.module-mode .metrics,
.content.module-mode .monthly-section,
.content.module-mode .filter-panel,
.content.module-mode .legacy-expenses {
  display: none;
}
.section-head { justify-content: space-between; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 18px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 11px 12px; border: 1px solid var(--line); text-align: left; }
th { background: #f8fafc; color: #475569; }
td a { color: var(--blue); margin-right: 12px; }
.kjs-table-scroll {
  width: 100%;
  margin: 0 0 12px;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
}
.kjs-table-scroll table {
  border: 0;
}
.kjs-table-scroll th,
.kjs-table-scroll td {
  border-top: 0;
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
}
.kjs-table-scroll th:first-child,
.kjs-table-scroll td:first-child {
  border-left: 0;
}
.kjs-table-scroll th:last-child,
.kjs-table-scroll td:last-child {
  border-right: 0;
}
.table-action-strip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: max-content;
  white-space: nowrap;
}
.table-action-strip .link-btn {
  margin-right: 0;
}
.shop-expense-rule-scroll {
  position: relative;
  max-width: 100%;
}
.shop-expense-rule-scroll .table-scroll-hint {
  color: #344054;
}
.shop-expense-rule-table th,
.shop-expense-rule-table td {
  min-width: 86px;
  padding: 5px 8px;
}
.shop-expense-rule-table th:last-child,
.shop-expense-rule-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 3;
  min-width: 168px;
  background: #fff;
  box-shadow: -10px 0 14px rgba(255,255,255,.92);
}
.shop-expense-rule-table th:last-child {
  z-index: 4;
  background: #f8fafc;
}
.shop-expense-rule-deleted-table th:last-child,
.shop-expense-rule-deleted-table td:last-child {
  min-width: 88px;
}
.shop-dashboard-wide-scroll {
  position: relative;
  max-width: 100%;
}
.shop-dashboard-wide-scroll::after {
  position: sticky;
  right: 0;
  bottom: 0;
  display: block;
  width: 56px;
  height: 0;
  margin-left: auto;
  content: "";
  box-shadow: -16px 0 18px rgba(255,255,255,.92);
  pointer-events: none;
}
.table-scroll-hint {
  position: sticky;
  right: 0;
  z-index: 5;
  float: right;
  margin: 4px 6px -26px 0;
  padding: 1px 6px;
  border: 1px solid #dbe2ec;
  border-radius: 2px;
  background: rgba(255,255,255,.96);
  color: #667085;
  font-size: 12px;
  line-height: 18px;
  pointer-events: none;
}
.table-scroll-hint::after {
  content: " →";
  color: #0f64d8;
}
.shop-dashboard-refund-scroll .table-scroll-hint {
  color: #b35c00;
}
.shop-dashboard-wide-table th,
.shop-dashboard-wide-table td {
  min-width: 82px;
  padding: 5px 8px;
  vertical-align: middle;
}
.shop-dashboard-sales-table,
.shop-dashboard-operation-table,
.shop-dashboard-rank-table,
.shop-dashboard-refund-table {
  table-layout: fixed;
}
.shop-dashboard-wide-table th:first-child,
.shop-dashboard-wide-table td:first-child {
  min-width: 124px;
  max-width: 154px;
}
.shop-dashboard-sales-table th:nth-child(1),
.shop-dashboard-sales-table td:nth-child(1),
.shop-dashboard-operation-table th:nth-child(1),
.shop-dashboard-operation-table td:nth-child(1) {
  width: 168px;
  min-width: 168px;
  max-width: 168px;
  white-space: normal;
}
.shop-dashboard-rank-table th:nth-child(1),
.shop-dashboard-rank-table td:nth-child(1) {
  width: 52px;
  min-width: 52px;
  max-width: 52px;
}
.shop-dashboard-rank-table th:nth-child(2),
.shop-dashboard-rank-table td:nth-child(2) {
  width: 168px;
  min-width: 168px;
  max-width: 168px;
  white-space: normal;
}
.shop-dashboard-sales-table th:nth-child(2),
.shop-dashboard-sales-table td:nth-child(2),
.shop-dashboard-operation-table th:nth-child(2),
.shop-dashboard-operation-table td:nth-child(2),
.shop-dashboard-rank-table th:nth-child(3),
.shop-dashboard-rank-table td:nth-child(3),
.shop-dashboard-refund-table th:nth-child(2),
.shop-dashboard-refund-table td:nth-child(2) {
  width: 88px;
  min-width: 88px;
  max-width: 88px;
}
.shop-dashboard-sales-table th:nth-child(3),
.shop-dashboard-sales-table td:nth-child(3),
.shop-dashboard-sales-table th:nth-child(4),
.shop-dashboard-sales-table td:nth-child(4),
.shop-dashboard-sales-table th:nth-child(8),
.shop-dashboard-sales-table td:nth-child(8),
.shop-dashboard-sales-table th:nth-child(9),
.shop-dashboard-sales-table td:nth-child(9),
.shop-dashboard-sales-table th:nth-child(10),
.shop-dashboard-sales-table td:nth-child(10),
.shop-dashboard-sales-table th:nth-child(11),
.shop-dashboard-sales-table td:nth-child(11),
.shop-dashboard-operation-table th:nth-child(3),
.shop-dashboard-operation-table td:nth-child(3),
.shop-dashboard-operation-table th:nth-child(4),
.shop-dashboard-operation-table td:nth-child(4),
.shop-dashboard-operation-table th:nth-child(8),
.shop-dashboard-operation-table td:nth-child(8),
.shop-dashboard-operation-table th:nth-child(9),
.shop-dashboard-operation-table td:nth-child(9),
.shop-dashboard-operation-table th:nth-child(10),
.shop-dashboard-operation-table td:nth-child(10),
.shop-dashboard-operation-table th:nth-child(11),
.shop-dashboard-operation-table td:nth-child(11),
.shop-dashboard-rank-table th:nth-child(4),
.shop-dashboard-rank-table td:nth-child(4),
.shop-dashboard-rank-table th:nth-child(5),
.shop-dashboard-rank-table td:nth-child(5),
.shop-dashboard-rank-table th:nth-child(9),
.shop-dashboard-rank-table td:nth-child(9),
.shop-dashboard-rank-table th:nth-child(10),
.shop-dashboard-rank-table td:nth-child(10),
.shop-dashboard-rank-table th:nth-child(11),
.shop-dashboard-rank-table td:nth-child(11),
.shop-dashboard-refund-table th:nth-child(3),
.shop-dashboard-refund-table td:nth-child(3),
.shop-dashboard-refund-table th:nth-child(4),
.shop-dashboard-refund-table td:nth-child(4),
.shop-dashboard-refund-table th:nth-child(5),
.shop-dashboard-refund-table td:nth-child(5),
.shop-dashboard-refund-table th:nth-child(10),
.shop-dashboard-refund-table td:nth-child(10),
.shop-dashboard-refund-table th:nth-child(11),
.shop-dashboard-refund-table td:nth-child(11),
.shop-dashboard-refund-table th:nth-child(12),
.shop-dashboard-refund-table td:nth-child(12) {
  width: 104px;
  min-width: 104px;
  max-width: 104px;
}
.shop-dashboard-sales-table th:nth-child(5),
.shop-dashboard-sales-table td:nth-child(5),
.shop-dashboard-sales-table th:nth-child(6),
.shop-dashboard-sales-table td:nth-child(6),
.shop-dashboard-operation-table th:nth-child(5),
.shop-dashboard-operation-table td:nth-child(5),
.shop-dashboard-operation-table th:nth-child(6),
.shop-dashboard-operation-table td:nth-child(6),
.shop-dashboard-rank-table th:nth-child(6),
.shop-dashboard-rank-table td:nth-child(6),
.shop-dashboard-rank-table th:nth-child(7),
.shop-dashboard-rank-table td:nth-child(7) {
  width: 128px;
  min-width: 128px;
  max-width: 128px;
}
.shop-dashboard-sales-table th:nth-child(7),
.shop-dashboard-sales-table td:nth-child(7),
.shop-dashboard-operation-table th:nth-child(7),
.shop-dashboard-operation-table td:nth-child(7),
.shop-dashboard-rank-table th:nth-child(8),
.shop-dashboard-rank-table td:nth-child(8) {
  width: 86px;
  min-width: 86px;
  max-width: 86px;
}
.shop-dashboard-sales-table th:nth-child(12),
.shop-dashboard-sales-table td:nth-child(12),
.shop-dashboard-operation-table th:nth-child(12),
.shop-dashboard-operation-table td:nth-child(12),
.shop-dashboard-rank-table th:nth-child(12),
.shop-dashboard-rank-table td:nth-child(12),
.shop-dashboard-refund-table th:nth-child(9),
.shop-dashboard-refund-table td:nth-child(9) {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
}
.shop-dashboard-refund-table th:nth-child(1),
.shop-dashboard-refund-table td:nth-child(1) {
  width: 168px;
  min-width: 168px;
  max-width: 168px;
  white-space: normal;
}
.shop-dashboard-refund-table th:nth-child(6),
.shop-dashboard-refund-table td:nth-child(6),
.shop-dashboard-refund-table th:nth-child(7),
.shop-dashboard-refund-table td:nth-child(7) {
  width: 112px;
  min-width: 112px;
  max-width: 112px;
}
.shop-dashboard-refund-table th:nth-child(8),
.shop-dashboard-refund-table td:nth-child(8) {
  width: 116px;
  min-width: 116px;
  max-width: 116px;
}
.shop-dashboard-wide-table .muted-cell {
  white-space: normal;
}
.expense-report-table th,
.expense-report-table td {
  padding: 4px 8px;
  line-height: 20px;
  white-space: nowrap;
}
.expense-report-table {
  width: 1580px;
  min-width: 1580px;
  table-layout: fixed;
}
.expense-report-table th:first-child,
.expense-report-table td:first-child {
  width: 230px;
  min-width: 230px;
  max-width: 230px;
  white-space: normal;
}
.expense-report-table th:nth-child(2),
.expense-report-table td:nth-child(2) {
  width: 116px;
  min-width: 116px;
  max-width: 116px;
}
.expense-report-table th:nth-child(3),
.expense-report-table td:nth-child(3) {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  text-align: center;
}
.expense-report-table th:nth-child(4),
.expense-report-table td:nth-child(4),
.expense-report-table th:nth-child(5),
.expense-report-table td:nth-child(5) {
  width: 88px;
  min-width: 88px;
  max-width: 88px;
  text-align: center;
}
.expense-report-table th:nth-child(6),
.expense-report-table td:nth-child(6) {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  white-space: normal;
}
.expense-report-table th:nth-child(7),
.expense-report-table td:nth-child(7) {
  width: 124px;
  min-width: 124px;
  max-width: 124px;
  text-align: center;
}
.expense-report-table th:nth-child(8),
.expense-report-table td:nth-child(8) {
  min-width: 132px;
  max-width: 132px;
  width: 132px;
}
.expense-report-table th:nth-child(9),
.expense-report-table td:nth-child(9) {
  width: 132px;
  min-width: 132px;
  max-width: 132px;
  text-align: center;
}
.expense-report-table th:nth-child(10),
.expense-report-table td:nth-child(10) {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
}
.expense-report-table-scroll {
  max-width: 100%;
}
.sticky-first-table th:first-child,
.sticky-first-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 1px 0 0 var(--line);
}
.sticky-first-table th:first-child {
  z-index: 4;
  background: #f8fafc;
}
.sticky-last-table th:last-child,
.sticky-last-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -1px 0 0 var(--line);
}
.sticky-last-table th:last-child {
  z-index: 4;
  background: #f8fafc;
}
.expense-report-table th:last-child,
.expense-report-table td:last-child {
  width: 252px;
  min-width: 252px;
  max-width: 252px;
}
.expense-import-return-notice {
  margin: 0 0 12px;
}
.table-row-muted {
  opacity: .55;
  background: #fafbfc;
}
.table-row-muted td:first-child {
  text-decoration: line-through;
}
.table-row-highlight {
  background: #eef6ff;
}
.table-row-highlight td:first-child {
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  padding: 42px 20px;
  background: rgba(15, 23, 42, .55);
  overflow: auto;
}
.modal-panel {
  position: relative;
  width: min(880px, 96vw);
  margin: auto;
  padding: 24px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 18px 60px rgba(2, 8, 23, .32);
}
.narrow-modal { width: min(640px, 96vw); }
.modal-panel h2 { margin: 0 0 14px; }
#detail-modal .modal-panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 84px);
}
#detail-modal h2 {
  flex: 0 0 auto;
}
#detail-content {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}
#detail-content .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 12;
  flex-wrap: wrap;
  padding: 10px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,.82), #fff 38%);
  box-shadow: 0 -10px 18px rgba(255,255,255,.9);
}
#detail-content .modal-actions button {
  min-height: 32px;
  font-size: 12px;
  line-height: 20px;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 0;
  background: transparent;
  font-size: 22px;
  color: #94a3b8;
}
.warning {
  padding: 12px;
  border: 1px solid #f5d8aa;
  border-radius: 4px;
  background: var(--soft);
  color: #9a5b12;
}
.steps {
  display: grid;
  grid-template-columns: 1.1fr 1fr .7fr;
  gap: 18px;
  margin: 18px 0;
}
.single-step { grid-template-columns: 1fr; }
.steps h3 { margin: 0 0 12px; font-size: 15px; }
.steps p { color: var(--muted); line-height: 1.7; }
.import-table td { vertical-align: top; }
.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 8px 12px;
  max-height: 430px;
  overflow: auto;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
}
.check-list label { display: flex; align-items: center; gap: 8px; }
.check-list input { width: 14px; height: 14px; }
.modal-actions {
  justify-content: flex-end;
  margin-top: 16px;
}
.modal-actions button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #cfd6e3;
  border-radius: 4px;
  background: #fff;
}
.modal-actions .primary {
  border: 0;
  background: var(--blue);
}
.modal-actions .danger {
  border: 0;
  color: #fff;
  background: #c0392b;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.detail-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  background: #f8fafc;
}
.detail-grid span { display: block; color: var(--muted); margin-bottom: 6px; }
.link-btn {
  border: 0;
  padding: 0;
  color: var(--blue);
  background: transparent;
}
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.module-card {
  padding: 14px;
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 6px;
}
.module-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 7px;
}
.module-card strong { font-size: 22px; }
.subnav-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.subnav-row span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: #475569;
}
.subnav-row button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: #475569;
}
.subnav-row .subnav-active {
  color: var(--blue);
  border-color: #bcd3fb;
  background: #edf4ff;
  font-weight: 700;
}
.tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: #edf4ff;
  color: var(--blue);
}
.muted-cell {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.rule-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) 140px 90px auto auto;
  gap: 10px;
  margin: 10px 0 16px;
}

.rule-form input,
.rule-form select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
}

.rule-form button {
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: var(--primary);
  color: #fff;
}

.preview-panel {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid #cfe0ff;
  border-radius: 6px;
  background: #f7fbff;
}

.kjs-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  margin: 12px 0 16px;
}

.kjs-steps section {
  padding: 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
}

.kjs-steps b {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
}

.kjs-steps p {
  color: var(--muted);
  line-height: 1.7;
}

.ad-import-steps section {
  font-size: 12px;
}

.ad-import-flow {
  display: grid;
  gap: 0;
  margin: 10px 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
}

.ad-import-flow-row {
  display: grid;
  grid-template-columns: 110px minmax(420px, 1fr) minmax(220px, 360px);
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 8px 12px;
  border-bottom: 1px solid #edf1f7;
}

.ad-import-flow-row:last-child {
  border-bottom: 0;
}

.ad-import-flow-step b,
.ad-import-flow-step span,
.ad-import-flow-hint {
  display: block;
  line-height: 20px;
}

.ad-import-flow-step b {
  color: #1f2937;
  font-size: 13px;
}

.ad-import-flow-step span,
.ad-import-flow-hint {
  color: #667085;
}

.ad-import-flow-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.ad-import-flow-controls select,
.ad-import-flow-controls input[type="file"] {
  min-width: 180px;
  max-width: 260px;
  height: 30px;
  border: 1px solid #cfd6e3;
  border-radius: 3px;
  background: #fff;
  font-size: 12px;
}

.ad-import-flow-controls button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #cfd6e3;
  border-radius: 3px;
  background: #fff;
  font-size: 12px;
}

.ad-import-status-strip {
  display: grid;
  grid-template-columns: 1.35fr 0.7fr 0.8fr 1.15fr;
  margin: 0 0 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.ad-import-status-strip div {
  min-width: 0;
  min-height: 50px;
  padding: 7px 10px;
  border-right: 1px solid var(--line);
}

.ad-import-status-strip div:last-child {
  border-right: 0;
}

.ad-import-status-strip span,
.ad-import-status-strip small {
  display: block;
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-import-status-strip b {
  display: block;
  overflow: hidden;
  color: #1f2937;
  font-size: 15px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-import-mapping-panel {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
}

.ad-import-mapping-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
}

.ad-import-mapping-head b {
  margin-right: 4px;
  color: #1f2937;
  font-size: 13px;
}

.ad-import-mapping-head span {
  flex: 1 1 300px;
  color: #667085;
  line-height: 20px;
}

.ad-import-mapping-head button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #cfd6e3;
  border-radius: 3px;
  background: #fff;
  font-size: 12px;
}

.ad-import-mapping-head .primary {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.ad-import-mapping-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 0;
}

.ad-import-mapping-grid label {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 10px;
  border-right: 1px solid var(--line);
}

.ad-import-mapping-grid label:last-child {
  border-right: 0;
}

.ad-import-mapping-grid span {
  color: #667085;
  line-height: 18px;
}

.ad-import-mapping-grid select {
  width: 100%;
  height: 30px;
  min-width: 0;
  border: 1px solid #cfd6e3;
  border-radius: 3px;
  background: #fff;
  font-size: 12px;
}

.ad-import-mode-card {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid #d7deea;
  border-radius: 3px;
  background: #fff;
  font-weight: 600;
}

.ad-import-mode-card.active {
  border-color: #8eb1e6;
  color: var(--blue);
  background: #f4f8ff;
}

.ad-import-requirements {
  font-size: 12px;
}

.compact-list {
  grid-template-columns: 1fr;
  max-height: 220px;
}

.kjs-report-tabs,
.kjs-report-toolbar,
.segmented,
.report-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.kjs-report-tabs,
.kjs-report-toolbar {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.kjs-report-toolbar {
  display: grid;
  grid-template-columns: 1fr;
}

.kjs-report-tabs button,
.segmented button,
.report-controls button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #cfd6e3;
  border-radius: 4px;
  background: #fff;
}

.kjs-report-tabs .primary,
.segmented .primary,
.report-controls .primary {
  border: 0;
  color: #fff;
  background: var(--blue);
}

.module-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(140px, 180px)) auto auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
}

.module-filter input,
.module-filter select {
  min-width: 0;
}

.module-filter button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #cfd6e3;
  border-radius: 4px;
  background: #fff;
}

.module-filter .primary {
  border: 0;
  background: var(--blue);
  color: #fff;
}

.trade-filter-grid,
.item-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.trade-filter-grid input,
.trade-filter-grid select,
.item-filter-grid input,
.item-filter-grid select {
  min-width: 0;
}

.kjs-pager-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.expense-type-tree {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
}
.expense-type-tree-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.expense-type-tree label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  margin: 0 14px 4px 0;
  color: #374151;
}
.expense-type-tree input {
  width: 13px;
  height: 13px;
  margin: 0;
}
.expense-type-all,
.expense-type-parent {
  font-weight: 700;
}
.expense-type-parent.partial {
  color: #9a5b12;
}
.expense-type-count {
  margin-left: 4px;
  color: #98a2b3;
  font-weight: 400;
}
.expense-type-group {
  padding-top: 6px;
  border-top: 1px solid #edf1f7;
}
.expense-type-group.partial {
  background: #fffdf7;
}
.expense-type-group:first-of-type {
  margin-top: 6px;
}
.expense-type-group-head {
  display: flex;
  align-items: center;
  gap: 4px;
}
.expense-type-toggle {
  width: 32px;
  min-height: 22px;
  padding: 0;
  border: 1px solid #d7dde8;
  border-radius: 2px;
  color: #4b5563;
  background: #fff;
  font-size: 12px;
  line-height: 20px;
}
.expense-type-group.collapsed {
  padding-bottom: 4px;
}
.expense-type-children {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2px;
  padding-left: 18px;
}
.expense-type-children[hidden] {
  display: none;
}
.expense-type-actions {
  display: inline-flex;
  gap: 4px;
  margin-left: 2px;
  white-space: nowrap;
}
.expense-type-actions .link-btn {
  padding: 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  font-size: 12px;
}
.expense-type-quick {
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #cfd6e3;
  border-radius: 2px;
  color: #26364f;
  background: #f7f9fc;
  font-size: 12px;
  line-height: 20px;
}
.expense-type-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.expense-type-receipt {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -2px 0 10px;
  color: #667085;
  font-size: 12px;
  line-height: 20px;
}
.expense-action-menu {
  position: relative;
  display: inline-flex;
}
.expense-action-trigger {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #cfd6e3;
  border-radius: 4px;
  background: #fff;
}
.expense-action-dropdown {
  position: absolute;
  top: 34px;
  left: 0;
  z-index: 70;
  display: none;
  min-width: 190px;
  padding: 5px 0;
  border: 1px solid #d6dbe4;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .16);
}
.expense-action-menu:hover .expense-action-dropdown,
.expense-action-menu:focus-within .expense-action-dropdown {
  display: block;
}
.expense-action-dropdown button {
  display: block;
  width: 100%;
  min-height: 28px;
  padding: 4px 14px;
  border: 0;
  color: #4b5563;
  background: #fff;
  font-size: 12px;
  line-height: 20px;
  text-align: left;
}
.expense-action-dropdown button:hover,
.expense-action-dropdown button:focus {
  color: var(--blue);
  background: #f4f7fb;
}

.order-list,
.item-card-list,
.notice-stack {
  display: grid;
  gap: 12px;
}

.order-card,
.item-card-row,
.empty-card {
  border: 1px solid var(--line);
  background: #fff;
}

.trade-card-highlight {
  border-color: #93c5fd;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, .12);
}

.order-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.order-main span,
.order-product small,
.item-info small,
.item-cost-box small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.order-columns {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) minmax(150px, .7fr) minmax(180px, .8fr);
  gap: 12px;
  padding: 12px;
}

.order-columns > div,
.item-cost-box {
  min-width: 0;
}

.order-columns span,
.item-cost-box span {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.item-card-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.7fr) minmax(150px, .7fr) minmax(160px, .8fr) minmax(130px, .6fr);
  gap: 12px;
  padding: 12px;
}

.item-info strong,
.order-product strong {
  display: block;
  line-height: 1.5;
}

.ledger-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 0;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.ledger-day {
  min-height: 120px;
  padding: 10px;
  border-right: 1px solid var(--line);
}

.ledger-day:last-child { border-right: 0; }
.ledger-day b,
.ledger-day span {
  display: block;
}

.ledger-day span {
  margin-top: 18px;
  color: var(--muted);
}

.cost-type-tree {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.cost-type-tree section {
  border: 1px solid var(--line);
  background: #fff;
}

.cost-type-tree h3 {
  margin: 0;
  padding: 12px;
  font-size: 15px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.cost-group-row td {
  background: #fbfdff;
  font-weight: 700;
}

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

.menu-option {
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: left;
}

.menu-option b,
.menu-option span {
  display: block;
}

.menu-option span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.cost-type-form {
  grid-template-columns: minmax(180px, 1fr) 150px 180px minmax(150px, auto) minmax(150px, auto) auto;
}

.realtime-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.realtime-chart {
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.chart-bars {
  display: grid;
  gap: 6px;
}

.chart-bar-row {
  display: grid;
  grid-template-columns: 46px 1fr 96px;
  gap: 8px;
  align-items: center;
}

.chart-bar-row span,
.chart-bar-row b {
  font-size: 12px;
  color: var(--muted);
}

.chart-track {
  height: 8px;
  background: #edf1f7;
  overflow: hidden;
}

.chart-track i {
  display: block;
  height: 100%;
  background: var(--blue);
}

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-panel, .login-preview { margin: 24px; width: auto; }
  .topbar, .top-left, .top-right { height: auto; flex-wrap: wrap; }
  .topbar { padding: 12px; }
  .main-nav { padding-left: 0; overflow-x: auto; }
  .workspace { grid-template-columns: 1fr; }
  .app-shell.sidebar-collapsed .workspace { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 12px; }
  #side-toolbar {
    right: 8px;
    bottom: 8px;
    top: auto;
    grid-auto-flow: column;
  }
  #side-toolbar button { width: 38px; min-height: 36px; }
  .metrics, .profit-panel, .module-grid, .fee-grid, .steps, .check-list, .detail-grid, .rule-form, .module-filter, .kjs-steps, .ad-import-flow-row, .ad-import-status-strip, .ad-import-mapping-grid, .trade-filter-grid, .item-filter-grid, .order-columns, .item-card-row, .ledger-week-grid, .realtime-charts, .menu-grid, .cost-type-form { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 1fr; }
}
