:root {
  --bg: #f6f0e8;
  --bg-soft: #efe5d8;
  --surface: #fffdf9;
  --surface-soft: #faf4ec;
  --surface-strong: #ffffff;
  --text: #1d2330;
  --muted: #6c675f;
  --primary: #22314d;
  --primary-strong: #172237;
  --accent: #c67a52;
  --accent-soft: #efe1d5;
  --border: rgba(34, 49, 77, 0.12);
  --border-strong: rgba(34, 49, 77, 0.18);
  --shadow: 0 18px 40px rgba(25, 31, 42, 0.12);
  --shadow-soft: 0 8px 22px rgba(25, 31, 42, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --sidebar-width: 320px;
  --sticky-shop-width: 140px;
  --sticky-status-width: 112px;
}

* {
  box-sizing: border-box;
}

html {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 32%),
    linear-gradient(180deg, #f3ebe0 0%, #f8f4ed 100%);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Avenir Next", "SF Pro Display", "Segoe UI Variable Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 28%),
    radial-gradient(circle at 90% 10%, rgba(198, 122, 82, 0.12), transparent 22%),
    linear-gradient(180deg, #f4ede2 0%, #f9f5ee 100%);
  line-height: 1.5;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  filter: blur(10px);
}

body::before {
  top: -120px;
  left: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6), transparent 62%);
}

body::after {
  right: -100px;
  bottom: 8vh;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198, 122, 82, 0.16), transparent 66%);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-strong);
}

button,
input,
select,
textarea {
  font: inherit;
}

code {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

::selection {
  background: rgba(198, 122, 82, 0.18);
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(34, 49, 77, 0.18);
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-track {
  background: transparent;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: calc(100vw - 8px);
  margin: 0 auto;
  padding: 14px;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 24px;
}

.topbar {
  position: sticky;
  top: 24px;
  align-self: start;
  min-height: calc(100vh - 48px);
  padding: 24px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #162236 0%, #22314d 52%, #141b29 100%);
  box-shadow: 0 24px 54px rgba(16, 20, 30, 0.22);
  color: #f7f3ec;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow: hidden;
  isolation: isolate;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: auto -80px -90px auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198, 122, 82, 0.36), transparent 62%);
}

.brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fff2e2, #d39065);
  color: #172033;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.14em;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
}

.title {
  font-size: 22px;
  font-weight: 700;
  color: #fffaf3;
}

.subtitle {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(247, 243, 236, 0.62);
}

.nav {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 18px;
  padding-right: 4px;
}

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

.nav-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(247, 243, 236, 0.52);
}

.nav-group {
  display: grid;
  gap: 10px;
}

.nav-link {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fbf6ef;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.nav-link:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
  color: #fffaf3;
}

.nav-link.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(198, 122, 82, 0.22));
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
}

.nav-link-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  color: #fff7ed;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.nav-link.active .nav-link-icon {
  background: linear-gradient(135deg, #fff3e4, #d39267);
  color: #172033;
}

.nav-link-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.nav-link-meta strong {
  font-size: 15px;
  font-weight: 700;
  color: inherit;
}

.nav-link-meta small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  color: rgba(247, 243, 236, 0.66);
}

.nav-link.active .nav-link-meta small {
  color: rgba(255, 250, 243, 0.82);
}

.userbox {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.userbox-identity {
  display: grid;
  gap: 4px;
}

.userbox-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(247, 243, 236, 0.56);
}

.userbox-identity strong {
  font-size: 18px;
  color: #fffaf3;
}

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

.userbox .btn {
  width: 100%;
  justify-content: center;
}

.workspace {
  min-width: 0;
  min-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 20px;
}

.workspace-header {
  position: sticky;
  top: 24px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  padding: 24px 28px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(255, 252, 247, 0.96), rgba(248, 242, 233, 0.92));
  border: 1px solid rgba(34, 49, 77, 0.1);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.workspace-heading {
  max-width: 780px;
  display: grid;
  gap: 10px;
}

.workspace-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.workspace-heading h1 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.workspace-copy {
  margin: 0;
  max-width: 720px;
  font-size: 15px;
  color: var(--muted);
}

.workspace-meta {
  min-width: min(48%, 520px);
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 12px;
}

.workspace-meta-card {
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.workspace-meta-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.workspace-meta-value {
  display: block;
  font-size: 15px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.content {
  min-width: 0;
  min-height: 0;
  display: grid;
  gap: 18px;
  align-content: start;
}

.card {
  position: relative;
  min-width: 0;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  animation: card-rise 0.45s ease both;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.card > * {
  position: relative;
  z-index: 1;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.card h3 {
  margin: 0;
  font-size: 17px;
}

.card p {
  margin: 0;
}

.card p + p {
  margin-top: 8px;
}

.hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.form-label {
  min-width: 180px;
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.input,
.textarea,
select.input {
  min-width: 160px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: #fffcf8;
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 1px 1px rgba(34, 49, 77, 0.03);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease;
}

.input.small {
  min-width: 126px;
  min-height: 38px;
  padding: 8px 12px;
  font-size: 13px;
}

.textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
}

.input:focus,
.textarea:focus,
select.input:focus {
  outline: none;
  border-color: rgba(34, 49, 77, 0.34);
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(34, 49, 77, 0.08),
    0 12px 24px rgba(34, 49, 77, 0.08);
  transform: translateY(-1px);
}

.input::placeholder,
.textarea::placeholder {
  color: #a19689;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, #fffefb, #f5ede4);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
  box-shadow: 0 6px 16px rgba(34, 49, 77, 0.06);
}

.btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #ffffff, #f8f0e7);
  box-shadow: 0 10px 20px rgba(34, 49, 77, 0.08);
}

.btn:disabled,
.btn.disabled {
  opacity: 0.52;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  transform: none;
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), #314766 70%, var(--accent));
  color: #fffaf3;
  box-shadow: 0 12px 24px rgba(34, 49, 77, 0.18);
}

.btn.primary:hover {
  background: linear-gradient(135deg, var(--primary-strong), #253853 62%, #b56c46);
}

.btn.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), #314766 72%, var(--accent));
  color: #fffaf3;
  box-shadow: 0 10px 20px rgba(34, 49, 77, 0.16);
}

.btn.active:hover {
  background: linear-gradient(135deg, var(--primary-strong), #253853 62%, #b56c46);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.72);
}

.btn.ghost:hover {
  background: #ffffff;
}

.btn.ghost.danger {
  background: #fff0ea;
  color: #9a5031;
  border-color: rgba(154, 80, 49, 0.18);
}

.btn.ghost.danger:hover {
  background: #ffe6dd;
}

.btn-xs {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 12px;
  font-size: 12px;
}

.filter-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f2ece2;
  border: 1px solid rgba(34, 49, 77, 0.08);
  color: #5d584f;
  font-size: 12px;
  font-weight: 700;
}

.badge.ok {
  background: #e9efe8;
  color: #355244;
}

.badge.warn {
  background: #fff1e7;
  color: #9a5533;
}

.badge.running {
  background: #eceff5;
  color: #2a3f63;
}

.empty {
  padding: 28px 18px !important;
  text-align: center;
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}

.table-wrap {
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(180deg, #fffdf9, #fcf7ef);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.table-wrap.fixed-header {
  max-height: min(56vh, 640px);
}

.table-wrap.fixed-header table {
  border-collapse: separate;
  border-spacing: 0;
}

.data-table,
.table-wrap table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid rgba(34, 49, 77, 0.08);
  text-align: left;
  vertical-align: top;
  background: transparent;
}

th {
  position: relative;
  background: #f6efe5;
  color: #6a655c;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-wrap.fixed-header thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  box-shadow: inset 0 -1px 0 rgba(34, 49, 77, 0.08);
}

tbody tr:nth-child(even) td {
  background: rgba(250, 246, 239, 0.52);
}

tbody tr:hover td {
  background: rgba(243, 235, 223, 0.68);
}

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

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

.cell-title {
  font-weight: 700;
  color: var(--text);
}

.cell-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.col-hidden {
  display: none !important;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  min-width: 220px;
  max-width: min(420px, calc(100vw - 24px));
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(25, 34, 50, 0.94);
  color: #fffaf3;
  box-shadow: 0 18px 36px rgba(15, 20, 30, 0.28);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.page-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(18, 24, 38, 0.28);
  backdrop-filter: blur(4px);
}

.page-mask.show {
  display: flex;
}

.page-mask-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  padding: 20px 24px;
  border-radius: 20px;
  background: #fffdf9;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.page-mask-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(34, 49, 77, 0.18);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

.page-mask-text {
  font-weight: 700;
  color: var(--text);
}

.result-box {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #f8f2e9;
  color: var(--text);
}

.result-box.ok {
  background: #edf4ef;
  color: #355244;
  border-color: rgba(53, 82, 68, 0.16);
}

.result-box.warn {
  background: #fff3eb;
  color: #965234;
  border-color: rgba(150, 82, 52, 0.16);
}

.shops-page {
  display: grid;
  gap: 18px;
}

.shops-create-card,
.shops-panel {
  padding: 26px 28px;
}

.shops-create-head,
.shops-panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.shops-intro {
  max-width: 720px;
  display: grid;
  gap: 8px;
}

.shops-eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #9b5936;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.shops-metrics {
  width: min(100%, 620px);
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
}

.shops-metric {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf9, #f6efe4);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.shops-metric-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}

.shops-metric strong {
  font-size: 28px;
  line-height: 1;
  color: var(--primary);
}

.shops-create-form .input {
  flex: 1 1 320px;
}

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

.shops-table {
  min-width: 1260px;
}

.shops-table th:nth-child(1) {
  min-width: 180px;
}

.shops-table th:nth-child(5) {
  min-width: 260px;
}

.shops-table th:nth-child(8) {
  min-width: 320px;
}

.shops-actions {
  min-width: 280px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-login-modal-content {
  width: min(360px, calc(100vw - 32px));
  padding: 14px;
  border-radius: 12px;
}

.shop-password-form {
  display: grid;
  gap: 10px;
}

.shop-password-label {
  width: 100%;
  min-width: 0;
  color: var(--text);
}

.shop-password-label .input {
  width: 100%;
}

.shop-password-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.shop-link {
  font-weight: 700;
  color: var(--primary);
}

.shop-link:hover {
  color: var(--accent);
}

.sync-split-layout {
  min-height: clamp(640px, 70vh, 820px);
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(0, 1.18fr);
  gap: 18px;
  align-items: stretch;
}

.sync-left-col,
.sync-right-col {
  min-width: 0;
  min-height: 0;
}

.sync-left-col {
  display: grid;
  grid-template-rows: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 18px;
}

.sync-right-col {
  display: flex;
}

.sync-shop-card,
.sync-func-card,
.sync-result-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.sync-shop-tools {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.72fr) auto auto;
  gap: 10px;
  align-items: center;
}

.sync-shop-tools .input {
  width: 100%;
  min-width: 0;
}

.sync-shop-wrap,
.task-table-wrap {
  flex: 1;
  min-height: 0;
  max-height: none;
}

.sync-global-bar {
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.sync-global-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sync-range-bar {
  margin: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  background: #f8fbff;
}

.sync-range-bar .input.small {
  width: 148px;
  min-height: 32px;
  padding: 5px 8px;
}

.range-separator,
.sync-range-hint {
  color: var(--muted);
  font-size: 12px;
}

.sync-range-hint.warn {
  color: #b7791f;
  font-weight: 700;
}

.sync-range-hint.danger {
  color: #c53030;
  font-weight: 700;
}

.sync-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.sync-feature-card {
  padding: 16px;
  display: grid;
  gap: 12px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fffefb, #f8f1e8);
}

.sync-feature-card h3 {
  font-size: 17px;
}

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

.sync-actions .btn {
  flex: 1 1 180px;
}

.sync-log {
  min-height: 110px;
  max-height: 160px;
  margin-bottom: 16px;
  overflow: auto;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #182236, #0f1727);
  color: #dfe7f5;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.jst-download-hero {
  display: grid;
  gap: 16px;
}

.jst-download-form {
  display: grid;
  gap: 14px;
}

.jst-download-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

.jst-download-fields label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.jst-download-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.jst-download-check {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: #f8fbff;
  border: 1px solid #dbe7f4;
  font-size: 13px;
}

.jst-download-fixed {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.jst-download-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid #dbe7f4;
  border-radius: 12px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.jst-download-note strong {
  flex: 0 0 auto;
  color: var(--text);
}

.jst-download-progress {
  display: grid;
  gap: 10px;
}

.jst-download-progress-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
}

.jst-download-progress-top > div {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fffdf8;
}

.jst-download-progress-top strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.jst-download-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf5;
}

.jst-download-bar > div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d74d8, #36a3ff);
  transition: width 0.25s ease;
}

.jst-download-message {
  min-height: 24px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 13px;
}

.jst-download-stats {
  margin-top: 14px;
}

.jst-download-history-table th,
.jst-download-history-table td {
  white-space: nowrap;
}

.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

@media (max-width: 1200px) {
  .jst-download-fields {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 720px) {
  .jst-download-fields,
  .jst-download-progress-top {
    grid-template-columns: 1fr;
  }
}

.sync-progress-panel {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #d8e4f2;
  background: #f8fbff;
  display: grid;
  gap: 8px;
}

.sync-progress-panel[data-state="running"] {
  border-color: #8bb9df;
  background: #f3f9ff;
}

.sync-progress-panel[data-state="failed"] {
  border-color: #f2b8b8;
  background: #fff7f7;
}

.sync-progress-head,
.sync-progress-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.sync-progress-head strong {
  font-size: 14px;
}

.sync-progress-head span,
.sync-progress-foot {
  color: var(--muted);
  font-size: 12px;
}

.sync-progress-track {
  position: relative;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf5;
  border: 1px solid #d6e0ec;
}

.sync-progress-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #3182ce, #38a169);
  transition: width 0.2s ease;
}

.sync-task-summary {
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sync-task-summary span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #dbe7f4;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.sync-task-summary strong {
  color: var(--text);
}

.task-tabs {
  margin: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-tab {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fffdf9;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.task-tab:hover {
  transform: translateY(-1px);
}

.task-tab.active {
  background: linear-gradient(135deg, var(--primary), #314766);
  border-color: transparent;
  color: #fffaf3;
}

.task-panels {
  flex: 1;
  min-height: 0;
}

.task-panel {
  display: none;
  height: 100%;
  min-height: 0;
}

.task-panel.active {
  display: block;
}

.task-table {
  min-width: 760px;
}

.task-table th:nth-child(1) {
  min-width: 180px;
}

.task-table th:nth-child(2) {
  min-width: 120px;
}

.task-table th:nth-child(3) {
  min-width: 180px;
}

.task-table th:nth-child(4) {
  min-width: 140px;
}

.task-table th:nth-child(5) {
  min-width: 170px;
}

.task-table th:nth-child(6),
.task-table th:nth-child(7) {
  min-width: 90px;
}

.task-row {
  cursor: pointer;
}

.task-detail-row td {
  background: rgba(246, 238, 227, 0.76);
}

.task-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 16px;
  font-size: 12px;
}

.task-detail-grid > div {
  display: grid;
  gap: 4px;
}

.task-detail-label {
  color: var(--muted);
  font-size: 12px;
}

.progress-line {
  position: relative;
  width: 160px;
  height: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: #efe7dc;
  border: 1px solid rgba(34, 49, 77, 0.08);
}

.progress-line span {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.progress-line em {
  position: relative;
  z-index: 1;
  display: block;
  line-height: 20px;
  text-align: center;
  color: #fffaf3;
  font-style: normal;
  font-size: 11px;
}

.workorder-titlebar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.workorder-titlebar h2 {
  margin: 0;
}

.workorder-filter-form {
  display: grid;
  gap: 12px;
}

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

.workorder-time-row {
  align-items: flex-start;
}

.workorder-time-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #faf5ed;
  border: 1px solid rgba(34, 49, 77, 0.08);
}

.workorder-keyword {
  min-width: 280px;
  flex: 1 1 280px;
}

.shop-picker-field {
  min-width: 260px;
  flex: 1 1 320px;
  max-width: 420px;
}

.shop-picker-trigger {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: #fffcf8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.shop-picker-trigger:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 49, 77, 0.32);
  box-shadow: 0 10px 20px rgba(34, 49, 77, 0.08);
}

.shop-picker-trigger-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font-weight: 600;
}

.shop-picker-trigger-count {
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
}

.workorder-quick-bar {
  margin-top: 12px;
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fcf7ef, #f5ede4);
  border: 1px solid rgba(34, 49, 77, 0.08);
}

.workorder-quick-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.workorder-chip-bar {
  margin-top: 12px;
}

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

.perm-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #fffaf3;
  border: 1px solid rgba(34, 49, 77, 0.1);
  color: var(--text);
  font-size: 12px;
}

.perm-chip input {
  margin: 0;
}

.chip-close {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.chip-close:hover {
  color: var(--text);
}

.workorder-list-toolbar,
.workorder-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

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

.workorder-pagination-meta {
  color: var(--muted);
  font-size: 13px;
}

.page-jump-input {
  width: 84px;
}

.workorder-table-wrap {
  max-height: min(58vh, 660px);
  padding: 0;
}

.workorder-table {
  width: max-content;
  min-width: 1460px;
  table-layout: fixed;
}

.workorder-table th,
.workorder-table td {
  height: 56px;
  vertical-align: middle;
  background-clip: padding-box;
}

.workorder-table .col-shop {
  width: var(--sticky-shop-width);
  min-width: var(--sticky-shop-width);
  max-width: var(--sticky-shop-width);
}

.workorder-table .col-status {
  width: var(--sticky-status-width);
  min-width: var(--sticky-status-width);
  max-width: var(--sticky-status-width);
}

.workorder-table .col-order {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
}

.workorder-table .col-title {
  width: 230px;
  min-width: 230px;
  max-width: 230px;
}

.workorder-table .col-goods {
  width: 250px;
  min-width: 250px;
  max-width: 250px;
}

.workorder-table .col-result {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
}

.workorder-table .col-note {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
}

.workorder-table .col-time {
  width: 190px;
  min-width: 190px;
  max-width: 190px;
}

.sticky-col {
  position: sticky;
  left: 0;
  z-index: 3;
  box-shadow: 1px 0 0 rgba(34, 49, 77, 0.08);
}

.sticky-shop {
  left: 0;
}

.sticky-status {
  left: var(--sticky-shop-width);
}

.workorder-table thead .sticky-col {
  z-index: 7;
}

.workorder-table tbody tr:nth-child(even) .sticky-col {
  background: rgba(250, 246, 239, 0.96);
}

.workorder-table tbody tr:hover .sticky-col {
  background: rgba(243, 235, 223, 0.98);
}

.th-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.th-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(34, 49, 77, 0.08);
  color: var(--primary);
}

.th-icon svg,
.btn-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.mono-cell {
  display: grid;
  gap: 8px;
}

.mono-cell code {
  display: block;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f7f0e6;
  border: 1px solid rgba(34, 49, 77, 0.08);
  color: var(--primary-strong);
}

.copy-btn,
.note-edit-btn {
  width: max-content;
}

.btn-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.text-ellipsis {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.note-view {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.note-view-text {
  display: block;
  flex: 1;
}

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

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

.local-note-input {
  min-height: 88px;
}

.time-stack {
  display: grid;
  gap: 8px;
}

.time-stack > div {
  display: grid;
  gap: 2px;
}

.time-stack > div > span {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.time-stack > div > small {
  font-size: 13px;
  color: var(--text);
}

.row-saving {
  opacity: 0.7;
}

.collab-quick-bar {
  margin-top: 14px;
}

.collab-export-table-wrap {
  max-height: min(56vh, 640px);
}

.collab-export-table {
  width: max-content;
  min-width: 1200px;
}

.collab-export-table .col-shop,
.collab-export-table td.col-shop {
  position: sticky;
  left: 0;
  z-index: 3;
  background: inherit;
  box-shadow: 1px 0 0 rgba(34, 49, 77, 0.08);
}

.cashier-bill-type-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cashier-bill-type-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f3ece1;
  border: 1px solid rgba(34, 49, 77, 0.08);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.column-picker-tools,
.shop-picker-tools {
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.shop-picker-tools .input {
  flex: 1 1 260px;
}

.column-picker-list,
.shop-picker-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}

.column-picker-list {
  max-height: min(48vh, 400px);
}

.shop-picker-list {
  max-height: min(50vh, 420px);
}

.column-picker-item,
.shop-picker-item {
  display: grid;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(34, 49, 77, 0.08);
  background: #fffdf9;
}

.column-picker-item {
  grid-template-columns: 24px minmax(0, 1fr);
}

.shop-picker-item {
  grid-template-columns: 24px minmax(0, 1fr) minmax(120px, 0.7fr);
}

.shop-picker-item:hover,
.column-picker-item:hover {
  background: #fbf5eb;
}

.shop-picker-name {
  min-width: 0;
  font-weight: 700;
  color: var(--text);
}

.shop-picker-account {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.shop-picker-empty,
.cashier-detail-empty {
  padding: 24px;
  border-radius: 18px;
  border: 1px dashed rgba(34, 49, 77, 0.12);
  background: #faf5ed;
  color: var(--muted);
  text-align: center;
}

.shop-picker-footer {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

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

.workorder-modal {
  width: min(880px, calc(100vw - 40px));
}

.shop-picker-modal {
  width: min(920px, calc(100vw - 40px));
}

.cashier-detail-modal {
  width: min(1120px, calc(100vw - 40px));
}

.cashier-detail-summary {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.cashier-detail-card {
  padding: 12px 14px;
  display: grid;
  gap: 6px;
  border-radius: 16px;
  background: #faf5ed;
  border: 1px solid rgba(34, 49, 77, 0.08);
}

.cashier-detail-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.cashier-detail-value {
  color: var(--text);
  font-weight: 600;
}

.cashier-detail-body {
  max-height: min(46vh, 420px);
  overflow: auto;
}

.cashier-detail-body table td {
  vertical-align: top;
}

.cashier-detail-desc {
  min-width: 260px;
}

.cashier-detail-desc-main {
  display: block;
  color: var(--text);
  font-weight: 600;
}

.cashier-detail-desc-sub {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.admin-rbac-page {
  min-height: clamp(640px, 70vh, 820px);
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.admin-rbac-left,
.admin-rbac-right {
  min-height: 0;
}

.admin-rbac-left {
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fbf6ee, #f4ecdf);
  border: 1px solid rgba(34, 49, 77, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-rbac-title,
.admin-panel-head,
.admin-save-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.admin-rbac-title h2,
.admin-panel-head h3 {
  margin: 0;
}

.admin-create-box,
.admin-panel {
  padding: 16px;
  border-radius: 18px;
  background: #fffdf9;
  border: 1px solid rgba(34, 49, 77, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.admin-user-list {
  flex: 1;
  min-height: 220px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(34, 49, 77, 0.08);
  background: #fffdf9;
}

.admin-user-item {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(34, 49, 77, 0.08);
  cursor: pointer;
  display: grid;
  gap: 6px;
  transition: background 0.18s ease;
}

.admin-user-item:last-child {
  border-bottom: none;
}

.admin-user-item:hover {
  background: #fbf5eb;
}

.admin-user-item.active {
  background: #f1e8dd;
}

.admin-user-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.admin-user-name {
  font-weight: 700;
  color: var(--text);
}

.admin-user-sub {
  font-size: 12px;
  color: var(--muted);
}

.admin-rbac-right {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 12px;
}

#admin-detail {
  display: grid;
  gap: 12px;
}

.admin-empty {
  padding: 28px;
  border-radius: 20px;
  border: 1px dashed rgba(34, 49, 77, 0.12);
  background: #faf5ed;
  color: var(--muted);
}

.admin-basic-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.admin-collapse {
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #faf5ed;
  border: 1px solid rgba(34, 49, 77, 0.08);
}

.admin-collapse summary {
  cursor: pointer;
  font-weight: 700;
}

.perm-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.perm-group-card {
  padding: 14px;
  display: grid;
  gap: 10px;
  border-radius: 18px;
  background: #fffdf9;
  border: 1px solid rgba(34, 49, 77, 0.08);
}

.perm-group-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.perm-group-title {
  font-weight: 700;
}

.perm-group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

.admin-shop-scope-wrap {
  max-height: min(34vh, 360px);
}

.admin-shop-scope-table th:nth-child(1) {
  min-width: 72px;
}

.admin-shop-scope-table th:nth-child(2) {
  min-width: 180px;
}

.admin-shop-scope-table th:nth-child(3) {
  min-width: 160px;
}

.admin-shop-scope-table th:nth-child(4) {
  min-width: 180px;
}

.admin-shop-scope-table th:nth-child(5) {
  min-width: 120px;
}

.subsidy-layout {
  min-height: clamp(520px, 58vh, 700px);
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(420px, 1.12fr);
  gap: 18px;
  align-items: stretch;
}

.subsidy-layout .table-wrap.fixed-header {
  max-height: none;
}

.subsidy-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(34, 49, 77, 0.08);
  background: #faf5ed;
}

.subsidy-panel-title {
  margin-bottom: 12px;
  font-weight: 700;
}

.subsidy-panel-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  border-radius: 16px;
  background: #fffdf9;
  border: 1px solid rgba(34, 49, 77, 0.08);
}

.row-selected {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.cookies-form {
  display: grid;
  gap: 12px;
}

.muted-mark {
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(18, 24, 38, 0.32);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: min(1040px, calc(100vw - 40px));
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 24px;
  background: #fffdf9;
  border: 1px solid var(--border);
  box-shadow: 0 28px 60px rgba(15, 20, 30, 0.22);
}

.modal-header {
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.modal-body {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(34, 49, 77, 0.08);
  background: #faf5ed;
}

.modal-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.modal-body th,
.modal-body td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(34, 49, 77, 0.08);
}

.login-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.72), transparent 22%),
    radial-gradient(circle at 85% 18%, rgba(198, 122, 82, 0.14), transparent 18%),
    linear-gradient(180deg, #f2ebdf 0%, #faf6ef 100%);
}

.login-wrap {
  width: min(460px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0;
  display: grid;
  place-items: center;
}

.login-scene {
  position: relative;
  overflow: hidden;
  padding: 36px;
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, #162236, #23314a 62%, #151d2b);
  color: #f7f3ec;
  box-shadow: 0 26px 60px rgba(15, 20, 30, 0.28);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-scene::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198, 122, 82, 0.28), transparent 65%);
}

.login-kicker {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(247, 243, 236, 0.62);
}

.login-title {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 620px;
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.login-copy {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 620px;
  font-size: 16px;
  color: rgba(247, 243, 236, 0.78);
}

.login-pills {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.login-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-panel {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.login-panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.login-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: rgba(247, 243, 236, 0.82);
}

.login-card {
  width: 100%;
  padding: 30px;
  border-radius: 28px;
  background: #fffdf9;
  border: 1px solid rgba(34, 49, 77, 0.1);
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.login-card h1,
.login-card h2 {
  margin: 0;
  font-size: 28px;
}

.login-brand {
  width: 72px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fffaf3;
  font-weight: 800;
  letter-spacing: 0.14em;
}

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

@media (max-width: 1480px) {
  :root {
    --sidebar-width: 292px;
  }

  .sync-shop-tools {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  }

  .sync-shop-tools .btn {
    width: 100%;
  }

  .workspace-meta {
    min-width: 0;
  }

  .shops-metrics {
    width: 100%;
  }
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 100%;
  }

  .app-shell {
    width: calc(100vw - 8px);
    padding: 16px;
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
    min-height: auto;
    border-radius: 26px;
  }

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

  .nav-section {
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
  }

  .workspace {
    min-height: 0;
  }

  .workspace-header {
    position: static;
    flex-direction: column;
    align-items: stretch;
    padding: 20px 22px;
  }

  .workspace-meta {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sync-split-layout,
  .admin-rbac-page,
  .subsidy-layout {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .sync-left-col {
    grid-template-rows: repeat(2, minmax(0, auto));
  }

  .table-wrap.fixed-header,
  .workorder-table-wrap,
  .collab-export-table-wrap,
  .admin-shop-scope-wrap,
  .cashier-detail-body {
    max-height: none;
  }

  .login-body {
    background:
      radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.65), transparent 22%),
      linear-gradient(180deg, #f2ebdf 0%, #faf6ef 100%);
  }

  .login-wrap {
    width: min(460px, calc(100vw - 32px));
  }
}

@media (max-width: 780px) {
  .app-shell {
    width: calc(100vw - 4px);
    padding: 10px;
    gap: 16px;
  }

  .topbar {
    padding: 20px;
  }

  .brand {
    align-items: flex-start;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .nav-section {
    padding: 12px;
  }

  .workspace-header,
  .card,
  .login-card,
  .login-scene {
    border-radius: 24px;
  }

  .workspace-meta {
    grid-template-columns: 1fr;
  }

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

  .sync-shop-tools {
    grid-template-columns: 1fr;
  }

  .sync-actions .btn {
    flex: 1 1 100%;
  }

  .workorder-quick-bar,
  .pagination,
  .workorder-list-toolbar,
  .workorder-pagination,
  .column-picker-tools,
  .shop-picker-tools,
  .shop-picker-footer,
  .modal-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .workorder-toolbar-left,
  .workorder-pagination-actions,
  .actions,
  .pagination-actions {
    width: 100%;
  }

  .shop-picker-item {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .shop-picker-account {
    grid-column: 2;
    text-align: left;
  }

  .login-wrap {
    width: calc(100vw - 24px);
    padding: 12px 0;
  }

  .login-card {
    padding: 24px;
  }
}

@media (max-width: 560px) {
  .btn,
  .input,
  .shop-picker-trigger {
    width: 100%;
  }

  .form-row,
  .filter-row,
  .workorder-filter-row,
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .shops-metrics {
    grid-template-columns: 1fr;
  }

  .workorder-time-group {
    width: 100%;
  }

  .modal {
    padding: 8px;
  }

  .modal-content,
  .cashier-detail-modal,
  .shop-picker-modal,
  .workorder-modal {
    width: calc(100vw - 16px);
    padding: 16px;
    border-radius: 20px;
  }

  .workspace-heading h1 {
    font-size: clamp(24px, 10vw, 36px);
  }

  .title {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@keyframes card-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ================================================================
   Compact Admin UI Overrides
   Reference source: F:\平多多-win\潘聚水潭-思域
   ================================================================ */

:root {
  --bg: #f0f2f5;
  --bg-soft: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #fafbfc;
  --surface-strong: #ffffff;
  --text: #1a1a1a;
  --muted: #666666;
  --primary: #1a6fb5;
  --primary-strong: #145d99;
  --accent: #1a6fb5;
  --accent-soft: #eaf1ff;
  --border: #e0e0e0;
  --border-strong: #c9cdd4;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.06);
  --radius-xl: 6px;
  --radius-lg: 6px;
  --radius-md: 4px;
  --radius-sm: 3px;
  --sidebar-width: 184px;
  --sticky-shop-width: 124px;
  --sticky-status-width: 92px;
}

html,
body {
  background: var(--bg);
}

body {
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.45;
}

body::before,
body::after {
  display: none;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  gap: 0;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  background: var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  padding: 10px 8px;
  gap: 8px;
  border-radius: 0;
  border-right: 1px solid var(--border);
  background: #f8fbff;
  box-shadow: none;
  color: var(--text);
}

.topbar::before {
  display: none;
}

.brand {
  padding: 8px;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.logo {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: none;
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.02em;
}

.title {
  font-size: 13px;
  line-height: 1.2;
  color: #274157;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subtitle {
  display: none;
}

.nav {
  gap: 5px;
  display: grid;
  overflow: auto;
  padding-right: 2px;
}

.nav-section {
  gap: 3px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.nav-section-label {
  padding: 2px 5px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.nav-group {
  display: grid;
  gap: 2px;
}

.nav-link {
  min-height: 0;
  grid-template-columns: 22px minmax(0, 1fr);
  padding: 3px 5px;
  gap: 5px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  color: #274157;
}

.nav-link:hover {
  transform: none;
  background: #eef4ff;
  border-color: #dbe7ff;
  color: var(--primary-strong);
}

.nav-link.active {
  background: #eaf1ff;
  border-color: #d7e5ff;
  color: var(--primary-strong);
  box-shadow: inset 0 0 0 1px #d7e5ff;
}

.nav-link-icon {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: #eaf1ff;
  color: var(--primary-strong);
  font-size: 9px;
  letter-spacing: 0;
}

.nav-link.active .nav-link-icon {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
}

.nav-link-meta {
  display: block;
  min-width: 0;
}

.nav-link-meta strong {
  display: block;
  font-size: 12px;
  line-height: 22px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-link-meta small {
  display: none;
}

.userbox {
  margin-top: auto;
  padding: 8px;
  gap: 5px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.userbox-label {
  font-size: 10px;
  letter-spacing: 0;
  color: var(--muted);
}

.userbox-identity strong {
  font-size: 12px;
  color: var(--text);
}

.userbox-meta {
  display: none;
}

.workspace {
  min-width: 0;
  min-height: 100vh;
  gap: 0;
}

.workspace-header {
  position: sticky;
  top: 0;
  z-index: 10;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px 18px;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(217, 226, 236, 0.8);
  background: rgba(243, 246, 251, 0.92);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.workspace-heading {
  gap: 6px;
  max-width: 900px;
}

.workspace-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.workspace-heading h1 {
  font-size: 28px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0;
}

.workspace-copy {
  max-width: 760px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.workspace-meta {
  min-width: 0;
  width: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.workspace-meta-card {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: none;
}

.workspace-meta-label {
  margin: 0 6px 0 0;
  display: inline;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--muted);
}

.workspace-meta-value {
  display: inline;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.content {
  padding: 12px 16px 16px;
  gap: 12px;
}

.card,
.section-card {
  padding: 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.card::before {
  display: none;
}

.card h2,
.section-head h2 {
  font-size: 15px;
  font-weight: 600;
}

.card h3 {
  font-size: 13px;
  font-weight: 600;
}

.section-head {
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.section-head p,
.section-copy,
.hint,
.filter-label,
.cell-sub,
.muted-mark,
.task-detail-label,
.form-label {
  color: var(--muted);
}

.section-copy {
  font-size: 12px;
}

.eyebrow {
  margin: 0 0 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
}

.form-row,
.filter-row,
.actions,
.workorder-filter-row {
  gap: 8px;
}

.input,
.textarea,
select.input {
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: #fff;
  box-shadow: none;
  font-size: 12px;
}

.input.small {
  min-height: 26px;
  padding: 4px 8px;
  font-size: 12px;
}

.textarea {
  min-height: 72px;
}

.input:focus,
.textarea:focus,
select.input:focus {
  border-color: #7ab3e0;
  box-shadow: 0 0 0 2px rgba(26, 111, 181, 0.15);
  transform: none;
}

.btn,
.primary-btn,
.secondary-btn {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 3px;
  border: 1px solid #c9cdd4;
  background: #fff;
  box-shadow: none;
  color: #333;
  font-size: 12px;
  font-weight: 500;
}

.btn:hover,
.secondary-btn:hover {
  transform: none;
  background: #f5f5f5;
  box-shadow: none;
}

.btn.primary,
.primary-btn,
.btn.active,
.task-tab.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: none;
}

.btn.primary:hover,
.primary-btn:hover,
.btn.active:hover,
.task-tab.active:hover {
  background: var(--primary-strong);
}

.btn.ghost,
.secondary-btn {
  border-color: #c9cdd4;
  background: #fff;
  color: #333;
}

.btn.ghost:hover {
  background: #f5f5f5;
}

.btn.ghost.danger {
  background: #fff;
  border-color: #f1c3bd;
  color: var(--danger, #b42318);
}

.btn-xs,
.task-tab {
  min-height: 26px;
  padding: 0 10px;
  border-radius: 3px;
  font-size: 12px;
}

.badge {
  min-height: 22px;
  padding: 1px 6px;
  border-radius: 2px;
  border: 1px solid #ddd;
  background: #f5f5f5;
  font-size: 11px;
  font-weight: 600;
  color: #666;
}

.badge.ok {
  background: #e6f7ee;
  border-color: #cbead9;
  color: #389e0d;
}

.badge.warn {
  background: #fff2e8;
  border-color: #f5d3bb;
  color: #d46b08;
}

.badge.running {
  background: #e6f7ff;
  border-color: #c9e5ff;
  color: #1a6fb5;
}

.table-wrap {
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}

.table-wrap.fixed-header {
  max-height: calc(100vh - 240px);
}

.data-table,
.table-wrap table {
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  padding: 6px 10px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 12px;
  vertical-align: middle;
}

th {
  background: #f5f7fa;
  color: #555;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.table-wrap.fixed-header thead th {
  background: #f5f7fa;
}

tbody tr:nth-child(even) td {
  background: #fff;
}

tbody tr:hover td {
  background: #f0f5ff;
}

.empty {
  padding: 18px 12px !important;
  color: #999;
  font-size: 12px;
}

.pagination,
.workorder-list-toolbar,
.workorder-pagination,
.column-picker-tools,
.shop-picker-tools,
.shop-picker-footer,
.sync-global-bar,
.workorder-titlebar,
.admin-panel-head,
.admin-save-bar,
.shops-create-head,
.shops-panel-head {
  gap: 8px;
}

.workorder-quick-bar,
.admin-rbac-left,
.admin-panel,
.admin-create-box,
.sync-feature-card,
.subsidy-panel,
.cashier-detail-card,
.shop-picker-empty,
.cashier-detail-empty {
  border-radius: 4px;
}

.workorder-quick-bar,
.workorder-time-group,
.sync-feature-card,
.admin-rbac-left,
.admin-panel,
.admin-create-box,
.subsidy-panel,
.cashier-detail-card,
.column-picker-item,
.shop-picker-item {
  border-color: var(--border);
  background: var(--surface-soft);
}

.workorder-table-wrap,
.collab-export-table-wrap,
.admin-shop-scope-wrap,
.cashier-detail-body {
  max-height: calc(100vh - 280px);
}

.workorder-table {
  min-width: 1250px;
}

.workorder-table .col-shop {
  width: var(--sticky-shop-width);
  min-width: var(--sticky-shop-width);
  max-width: var(--sticky-shop-width);
}

.workorder-table .col-status {
  width: var(--sticky-status-width);
  min-width: var(--sticky-status-width);
  max-width: var(--sticky-status-width);
}

.workorder-table .col-order {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
}

.workorder-table .col-title,
.workorder-table .col-goods,
.workorder-table .col-result {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
}

.workorder-table .col-note {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
}

.workorder-table .col-time {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
}

.sticky-col,
.workorder-table tbody tr:nth-child(even) .sticky-col {
  background: #fff;
}

.workorder-table tbody tr:hover .sticky-col {
  background: #f0f5ff;
}

.mono-cell code {
  padding: 4px 6px;
  border-radius: 3px;
  background: #fafbfc;
  border: 1px solid var(--border);
  font-size: 11px;
}

.time-stack {
  gap: 4px;
}

.time-stack > div > span {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: none;
}

.time-stack > div > small {
  font-size: 11px;
}

.collab-export-table {
  min-width: 980px;
}

.shops-table {
  min-width: 1020px;
}

.task-table {
  min-width: 700px;
}

.progress-line {
  width: 120px;
  height: 16px;
  border-radius: 999px;
  background: #edf2f7;
  border: 1px solid #d9e2ec;
}

.progress-line em {
  line-height: 14px;
  font-size: 10px;
  color: #fff;
}

.sync-split-layout,
.admin-rbac-page,
.subsidy-layout {
  gap: 12px;
}

.sync-split-layout {
  min-height: calc(100vh - 130px);
  grid-template-columns: minmax(330px, 0.95fr) minmax(0, 1.05fr);
}

.sync-left-col {
  gap: 12px;
}

.sync-feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.sync-shop-tools {
  grid-template-columns: minmax(0, 1.1fr) minmax(130px, 0.7fr) auto auto;
}

.sync-log {
  min-height: 96px;
  max-height: 140px;
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid #dbe7ff;
  background: #f8fbff;
  color: #274157;
}

.task-tabs {
  gap: 6px;
  margin-bottom: 8px;
}

.admin-rbac-page {
  grid-template-columns: 320px minmax(0, 1fr);
}

.perm-groups {
  gap: 8px;
}

.perm-group-card {
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #fff;
}

.modal {
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: none;
}

.modal-content {
  border-radius: 4px;
  border: 1px solid #ddd;
  background: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}

.modal-header {
  margin-bottom: 12px;
  font-size: 13px;
}

.modal-body {
  border-radius: 4px;
  border-color: var(--border);
  background: #fff;
}

.flash-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.flash {
  padding: 8px 12px;
  border-radius: 3px;
  border: 1px solid transparent;
  font-size: 12px;
}

.flash-danger {
  background: #fff2f0;
  border-color: #ffccc7;
  color: #cf1322;
}

.result-box {
  padding: 8px 12px;
  border-radius: 3px;
  font-size: 12px;
}

.toast {
  border-radius: 4px;
  background: rgba(26, 26, 26, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.login-body {
  background: #eef2f6;
}

.yicheng-login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) minmax(360px, 0.9fr);
  background: #eef2f6;
}

.yicheng-login-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #123047;
}

.yicheng-login-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.yicheng-login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 48, 71, 0.2), rgba(18, 48, 71, 0.78)),
    linear-gradient(180deg, rgba(18, 48, 71, 0.05), rgba(18, 48, 71, 0.5));
}

.yicheng-login-visual-copy {
  position: absolute;
  left: clamp(28px, 5vw, 72px);
  bottom: clamp(32px, 8vh, 96px);
  z-index: 1;
  max-width: 460px;
  color: #f9e38b;
}

.yicheng-login-visual-copy span {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(249, 227, 139, 0.78);
}

.yicheng-login-visual-copy h1 {
  margin: 0;
  font-size: clamp(44px, 6vw, 82px);
  line-height: 0.95;
  letter-spacing: 0.02em;
}

.yicheng-login-visual-copy p {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
}

.yicheng-login-card {
  align-self: center;
  justify-self: center;
  width: min(380px, calc(100vw - 48px));
  display: grid;
  gap: 18px;
  padding: 30px;
  border-radius: 10px;
  border: 1px solid #dfe6ef;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
}

.yicheng-login-brand {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.yicheng-login-brand img {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 14px 34px rgba(18, 48, 71, 0.2);
}

.yicheng-login-brand strong {
  color: #123047;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0.06em;
}

.yicheng-login-brand span {
  color: #6b7280;
  font-size: 12px;
}

.login-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
}

.login-form-grid label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.login-form-grid input {
  width: 100%;
}

.wide-btn {
  width: 100%;
}

@media (max-width: 920px) {
  .yicheng-login-shell {
    grid-template-columns: 1fr;
  }

  .yicheng-login-visual {
    min-height: 260px;
  }

  .yicheng-login-card {
    margin: 24px 0 36px;
  }
}

@media (max-width: 560px) {
  .yicheng-login-card {
    width: calc(100vw - 28px);
    padding: 22px;
  }

  .yicheng-login-visual {
    min-height: 220px;
  }
}

.subsidy-page-intro {
  gap: 12px;
}

.subsidy-note-text {
  margin-top: 6px;
}

.subsidy-note-actual {
  font-weight: 700;
  color: #1d5fd1;
}

.subsidy-cache-strip,
.subsidy-summary-grid {
  display: grid;
  gap: 10px;
}

.subsidy-cache-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.subsidy-cache-item,
.subsidy-summary-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.subsidy-cache-item strong,
.subsidy-summary-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.subsidy-cache-ok {
  color: #1f8f55;
}

.subsidy-cache-warn {
  color: #c57d17;
}

.subsidy-cache-note {
  background: #f8fbff;
  border: 1px solid #dbe7ff;
  color: #274157;
}

.subsidy-summary-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.subsidy-summary-label {
  font-size: 12px;
  color: var(--muted);
}

.subsidy-summary-card small {
  font-size: 11px;
  color: var(--muted);
}

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

.subsidy-table .subsidy-cell-meta,
.subsidy-table .subsidy-cell-links,
.subsidy-table .subsidy-cell-goods {
  min-width: 0;
}

.feature-submission-page,
.feature-detail-page {
  display: grid;
  gap: 12px;
}

.feature-submit-card,
.feature-list-card,
.feature-chat-shell {
  display: grid;
  gap: 12px;
}

.feature-board-head {
  align-items: center;
}

.feature-submit-total {
  min-width: 92px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-soft);
  text-align: right;
}

.feature-submit-total span {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  color: var(--muted);
}

.feature-submit-total strong {
  font-size: 20px;
  color: var(--primary);
}

.feature-submit-form {
  display: grid;
  grid-template-columns: 150px 220px minmax(260px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.feature-submit-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.feature-submit-content,
.feature-submit-images {
  grid-column: 1 / -1;
}

.feature-submit-images small {
  color: var(--muted);
  font-size: 11px;
}

.feature-submit-actions {
  justify-self: end;
}

.feature-status-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.feature-summary-card {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.feature-summary-card span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.feature-summary-card strong {
  font-size: 20px;
  color: var(--text);
}

.feature-issue-list {
  display: grid;
  gap: 6px;
}

.feature-issue-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.feature-issue-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.feature-issue-title {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.feature-issue-title a {
  color: var(--primary);
  font-weight: 700;
}

.feature-issue-title strong {
  color: var(--text);
}

.feature-issue-main p {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-issue-history-mini {
  display: grid;
  grid-template-columns: auto auto auto auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid #dbeafe;
  border-radius: 4px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 11px;
}

.feature-issue-history-mini strong,
.feature-issue-history-mini b {
  color: var(--text);
  font-size: 11px;
}

.feature-issue-history-mini b {
  color: var(--primary);
}

.feature-issue-history-mini em {
  font-style: normal;
}

.feature-issue-history-mini p {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.feature-issue-side {
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.feature-submission-url {
  width: max-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--primary);
  font-size: 12px;
}

.feature-submission-images {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.feature-submission-images-label {
  flex: 0 0 100%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.feature-submission-images a {
  width: 72px;
  height: 72px;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: #f5f7fa;
}

.feature-submission-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feature-submission-image-missing {
  display: inline-flex;
  width: 72px;
  height: 72px;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: 1px dashed var(--border);
  border-radius: 4px;
  color: var(--muted);
  background: #f5f7fa;
  font-size: 11px;
  text-align: center;
}

.feature-status-badge {
  min-width: 58px;
  justify-content: center;
}

.feature-status-open,
.feature-status-reopened {
  background: #fff7e6;
  border-color: #ffd591;
  color: #ad6800;
}

.feature-status-processing {
  background: #e6f7ff;
  border-color: #91d5ff;
  color: #096dd9;
}

.feature-status-need_more {
  background: #fff1f0;
  border-color: #ffa39e;
  color: #cf1322;
}

.feature-status-fixed {
  background: #f6ffed;
  border-color: #b7eb8f;
  color: #389e0d;
}

.feature-status-closed {
  background: #f5f5f5;
  border-color: #d9d9d9;
  color: #666;
}

.feature-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.feature-detail-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.feature-history-panel {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.feature-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.feature-history-head h3 {
  margin: 0;
  font-size: 15px;
}

.feature-history-head span {
  color: var(--muted);
  font-size: 12px;
}

.feature-history-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-history-list li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 8px;
}

.feature-history-dot {
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.feature-history-main {
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}

.feature-history-list li:last-child .feature-history-main {
  border-bottom: 0;
  padding-bottom: 0;
}

.feature-history-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.feature-history-title strong {
  color: var(--text);
}

.feature-history-title b,
.feature-history-title em {
  padding: 1px 5px;
  border-radius: 4px;
  background: #eef6ff;
  color: var(--primary);
  font-size: 11px;
  font-style: normal;
}

.feature-history-main p {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.feature-history-empty {
  color: var(--muted);
  font-size: 12px;
}

.feature-chat-window {
  min-height: 420px;
  max-height: calc(100vh - 360px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #f4f6f8;
}

.feature-chat-messages {
  display: grid;
  gap: 10px;
}

.feature-chat-row {
  display: flex;
  align-items: flex-start;
}

.feature-chat-row.is-user {
  justify-content: flex-end;
}

.feature-chat-row.is-reviewer {
  justify-content: flex-start;
}

.feature-chat-bubble {
  max-width: min(720px, 78%);
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.feature-chat-bubble.is-user {
  border-color: #b7dcff;
  background: #eaf5ff;
}

.feature-chat-bubble.is-reviewer {
  border-color: #b7eb8f;
  background: #f7ffef;
}

.feature-chat-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.feature-chat-meta strong {
  color: var(--text);
  font-size: 13px;
}

.feature-chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.65;
}

.feature-chat-composer {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 220px auto;
  gap: 8px;
  align-items: end;
}

.feature-chat-upload {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.subsidy-order-no,
.subsidy-goods-name {
  font-weight: 700;
  color: var(--text);
}

.subsidy-subline {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.subsidy-order-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

.subsidy-metric-stack {
  display: grid;
  gap: 3px;
  font-size: 12px;
}

.subsidy-metric-stack .is-positive {
  color: #c57d17;
  font-weight: 700;
}

.subsidy-metric-stack .is-negative {
  color: #cf1322;
  font-weight: 700;
}

.badge.danger {
  background: #fff2f0;
  color: #cf1322;
  border-color: #ffccc7;
}

.pdd-group-page {
  display: grid;
  gap: 18px;
}

.pdd-page-message {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.pdd-page-message.ok {
  background: #eef6ee;
  color: #2f5940;
}

.pdd-page-message.warn,
.warn-text {
  background: #fff0e8;
  color: #9a5031;
}

.pdd-group-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.pdd-group-overview-copy {
  display: grid;
  gap: 6px;
}

.pdd-group-kicker {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.pdd-group-stats {
  min-width: min(460px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 12px;
}

.pdd-group-stat {
  min-height: 92px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  display: grid;
  align-content: center;
  gap: 4px;
}

.pdd-group-stat span {
  font-size: 12px;
  color: var(--muted);
}

.pdd-group-stat strong {
  font-size: 28px;
  line-height: 1;
}

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

.pdd-subcategory-tab {
  min-height: 64px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-soft);
}

.pdd-subcategory-tab:hover {
  color: var(--primary-strong);
  border-color: rgba(34, 49, 77, 0.22);
  background: #ffffff;
}

.pdd-subcategory-tab span {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #eef0f4;
  color: #263a5c;
  font-size: 12px;
  font-weight: 800;
}

.pdd-subcategory-tab strong {
  font-size: 15px;
}

.pdd-subcategory-tab.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), #314766 72%, var(--accent));
  color: #fffaf3;
}

.pdd-subcategory-tab.active span {
  background: rgba(255, 255, 255, 0.18);
  color: #fffaf3;
}

.pdd-group-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 18px;
  align-items: start;
}

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

.pdd-product-filter {
  margin-bottom: 14px;
}

.pdd-product-table-wrap,
.pdd-selected-wrap {
  border-radius: var(--radius-md);
}

.pdd-product-table th,
.pdd-product-table td,
.pdd-selected-table th,
.pdd-selected-table td {
  vertical-align: middle;
}

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

.pdd-form-grid .form-label {
  min-width: 0;
}

.pdd-form-grid .input {
  width: 100%;
}

.pdd-manual-add {
  margin: 14px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.pdd-manual-add [data-manual-code] {
  flex: 1 1 220px;
}

.pdd-qty-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.pdd-qty-cell span {
  min-width: 28px;
  text-align: center;
  font-weight: 800;
}

.pdd-builder-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pdd-product-pagination {
  margin-top: 14px;
}

.pdd-combo-list .pdd-section-head {
  align-items: center;
}

.pdd-combo-records {
  display: grid;
  gap: 14px;
}

.pdd-combo-record {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(250, 244, 236, 0.72));
  display: grid;
  gap: 14px;
}

.pdd-combo-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.pdd-combo-main h3 {
  margin-top: 4px;
}

.pdd-combo-code {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef0f4;
  color: #263a5c;
  font-size: 12px;
  font-weight: 800;
}

.pdd-combo-badges,
.pdd-assignment-list,
.pdd-assign-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.pdd-assignment-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f3ede5;
  border: 1px solid var(--border);
  color: #5f564a;
  font-size: 12px;
  font-weight: 700;
}

.pdd-assign-form .input {
  flex: 1 1 190px;
}

.pdd-assign-form .btn {
  flex: 0 0 auto;
}

@media (max-width: 1280px) {
  .pdd-group-layout {
    grid-template-columns: 1fr;
  }

  .pdd-group-overview {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .pdd-group-stats,
  .pdd-subcategory-tabs,
  .pdd-form-grid {
    grid-template-columns: 1fr;
  }

  .pdd-section-head,
  .pdd-combo-main,
  .pdd-combo-list .pdd-section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .pdd-assign-form .btn,
  .pdd-builder-actions .btn {
    width: 100%;
  }
}

.pdd-group-stats {
  min-width: min(620px, 100%);
  grid-template-columns: repeat(4, minmax(96px, 1fr));
}

.pdd-product-table th:first-child,
.pdd-product-table td:first-child,
.pdd-selected-table th:first-child,
.pdd-selected-table td:first-child {
  width: 64px;
}

.pdd-product-thumb {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f7f4ef;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pdd-product-thumb.mini {
  width: 44px;
  height: 44px;
}

.pdd-product-thumb img,
.pdd-combo-thumb img,
.pdd-combo-image-preview img,
.pdd-combo-item-pill img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pdd-combo-builder {
  position: sticky;
  top: 18px;
}

.pdd-selected-summary {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.pdd-selected-summary > div {
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfaf7;
  display: grid;
  align-content: center;
  gap: 4px;
}

.pdd-selected-summary span {
  font-size: 12px;
  color: var(--muted);
}

.pdd-selected-summary strong {
  font-size: 18px;
  line-height: 1.1;
}

.pdd-combo-image-preview {
  min-height: 84px;
  margin-top: 12px;
  padding: 10px;
  border: 1px dashed rgba(34, 49, 77, 0.26);
  border-radius: 8px;
  background: #f7f4ef;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.pdd-combo-image-preview img {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
}

.pdd-combo-image-preview span {
  color: var(--muted);
  font-weight: 700;
}

.pdd-pricing-formulas,
.pdd-combo-formulas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pdd-pricing-formulas {
  margin-top: 12px;
}

.pdd-pricing-formulas[hidden] {
  display: none;
}

.pdd-pricing-formulas span,
.pdd-combo-formulas span {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fbfaf7;
  color: #5f564a;
  font-size: 12px;
  font-weight: 700;
}

.pdd-pricing-formulas .warn-text,
.pdd-combo-formulas .warn-text {
  border-color: #ffd6bd;
  background: #fff0e8;
  color: #9a5031;
}

.pdd-combo-filter {
  align-items: center;
}

.pdd-combo-filter select {
  flex: 0 0 130px;
}

.pdd-combo-record {
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: stretch;
}

.pdd-combo-thumb {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f7f4ef;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pdd-combo-body {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.pdd-combo-metrics,
.pdd-combo-item-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pdd-combo-metrics span,
.pdd-combo-item-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fbfaf7;
  color: #5f564a;
  font-size: 12px;
  font-weight: 700;
}

.pdd-combo-item-pill {
  max-width: min(320px, 100%);
  gap: 6px;
}

.pdd-combo-item-pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdd-combo-item-pill small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.pdd-combo-item-pill img {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 6px;
}

@media (max-width: 1280px) {
  .pdd-combo-builder {
    position: static;
  }
}

@media (max-width: 900px) {
  .pdd-group-stats,
  .pdd-selected-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pdd-combo-record {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .pdd-group-stats,
  .pdd-selected-summary {
    grid-template-columns: 1fr;
  }

  .pdd-combo-filter select {
    flex: 1 1 100%;
  }

  .pdd-combo-thumb {
    width: 100%;
    max-width: 180px;
  }
}

@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .workspace-header {
    position: static;
  }
}

@media (max-width: 720px) {
  .workspace-header,
  .content,
  .topbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .workspace-meta {
    width: 100%;
  }

  .sync-split-layout,
  .admin-rbac-page,
  .subsidy-layout,
  .feature-submit-form,
  .feature-chat-composer {
    grid-template-columns: 1fr;
  }

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

  .feature-issue-row {
    grid-template-columns: 1fr;
  }

  .feature-issue-side {
    justify-items: start;
  }

  .feature-chat-window {
    min-height: 320px;
    max-height: none;
  }

  .feature-chat-bubble {
    max-width: 94%;
  }

  .subsidy-cache-strip,
  .subsidy-summary-grid {
    grid-template-columns: 1fr;
  }

  .sync-shop-tools {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

/* Main sidebar: first-level menu with hover flyouts on desktop. */
@media (min-width: 1201px) {
  :root {
    --sidebar-width: 156px;
  }

  .topbar {
    z-index: 60;
    overflow: visible;
  }

  .nav {
    align-content: start;
    overflow: visible;
    gap: 6px;
  }

  .nav-section {
    position: relative;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .nav-section-label {
    position: relative;
    display: flex;
    min-height: 32px;
    align-items: center;
    justify-content: space-between;
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: var(--shadow);
    color: #263d55;
    cursor: default;
  }

  .nav-section-label::after {
    content: ">";
    color: #8aa0b5;
    font-size: 12px;
    line-height: 1;
  }

  .nav-section:hover .nav-section-label,
  .nav-section:has(.nav-link.active) .nav-section-label {
    border-color: #cfe0f8;
    background: #eaf1ff;
    color: var(--primary-strong);
  }

  .nav-section .nav-group {
    position: absolute;
    isolation: isolate;
    z-index: 80;
    top: 0;
    left: calc(100% + 2px);
    display: grid;
    width: 216px;
    max-height: min(72vh, 620px);
    gap: 3px;
    padding: 8px;
    border: 1px solid #d9e3ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow: auto;
    transform: translateX(-4px);
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
  }

  .nav-section .nav-group::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -10px;
    width: 10px;
  }

  .nav-section:hover .nav-group {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }

  .nav-section .nav-link {
    min-height: 34px;
    grid-template-columns: 24px minmax(0, 1fr);
    padding: 5px 7px;
    background: transparent;
  }

  .nav-section .nav-link-icon {
    width: 24px;
    height: 24px;
  }

  .nav-section .nav-link-meta strong {
    line-height: 20px;
  }

  .nav-section.is-current-section .nav-section-label,
  .nav-section:has(.nav-link.active) .nav-section-label {
    border-color: #b9d4f4;
    background: #eaf3ff;
  }

  .nav-section.is-current-section .nav-section-label::after,
  .nav-section:has(.nav-link.active) .nav-section-label::after {
    content: "v";
  }

  .nav-section.is-current-section .nav-group,
  .nav-section:has(.nav-link.active) .nav-group {
    position: static;
    width: auto;
    max-height: none;
    margin: 3px 0 0;
    padding: 3px 0 2px 6px;
    border: 0;
    border-left: 2px solid #cfe0f8;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    overflow: visible;
    transform: none;
  }

  .nav-section.is-current-section .nav-group::before,
  .nav-section:has(.nav-link.active) .nav-group::before {
    display: none;
  }
}

/* Keep the expanded current module inside a 1920x1080 workspace sidebar. */
@media (min-width: 1201px) and (max-height: 1100px) {
  .workspace-shell-page aside.topbar {
    gap: 5px;
    padding: 6px;
  }

  .workspace-shell-page .brand {
    min-height: 42px;
    padding: 5px 6px;
  }

  .workspace-shell-page .logo {
    width: 26px;
    min-width: 26px;
    height: 26px;
  }

  .workspace-shell-page .nav {
    gap: 3px;
  }

  .workspace-shell-page .nav-section-label {
    min-height: 27px;
    padding: 4px 7px;
  }

  .workspace-shell-page .nav-section.is-current-section .nav-group,
  .workspace-shell-page .nav-section:has(.nav-link.active) .nav-group {
    gap: 1px;
    margin-top: 1px;
    padding: 1px 0 1px 5px;
  }

  .workspace-shell-page .nav-section .nav-link {
    min-height: 25px;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 4px;
    padding: 2px 4px;
  }

  .workspace-shell-page .nav-section .nav-link-icon {
    width: 20px;
    height: 20px;
    font-size: 9px;
  }

  .workspace-shell-page .nav-section .nav-link-meta strong {
    font-size: 11px;
    line-height: 20px;
  }

  .workspace-shell-page .userbox {
    padding: 5px 6px;
    gap: 3px;
  }
}

@media (max-width: 1200px) {
  .nav-section-label {
    display: block;
    min-height: 0;
    cursor: default;
  }

  .nav-section .nav-group {
    display: grid;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }
}

/* Shop dashboard */
.shop-dashboard-page {
  display: grid;
  gap: 10px;
  color: #1f2937;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 12px;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

.shop-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 14px;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.shop-dashboard-hero h2,
.shop-dashboard-section-head h3,
.goods-panel h3,
.shop-dashboard-note h3 {
  margin: 0;
  color: #111827;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.shop-dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.shop-dashboard-sync-panel {
  display: grid;
  gap: 7px;
  padding: 8px 14px;
}

.shop-dashboard-sync-head,
.shop-dashboard-sync-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.shop-dashboard-sync-head strong {
  color: #111827;
  font-size: 13px;
}

.shop-dashboard-sync-panel[data-state="running"] .shop-dashboard-sync-head strong {
  color: #2563eb;
}

.shop-dashboard-sync-panel[data-state="failed"] .shop-dashboard-sync-head strong,
.shop-dashboard-sync-panel[data-state="partial"] .shop-dashboard-sync-head strong {
  color: #dc2626;
}

.shop-dashboard-sync-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.10);
}

.shop-dashboard-sync-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  transition: width 0.25s ease;
}

.shop-dashboard-sync-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
}

.shop-dashboard-sync-items:empty {
  display: none;
}

.shop-dashboard-sync-items span {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  padding: 3px 8px;
  color: #475569;
  background: rgba(34, 49, 77, 0.06);
  font-size: 12px;
}

.shop-dashboard-sync-items .ok {
  color: #047857;
  background: rgba(16, 185, 129, 0.10);
}

.shop-dashboard-sync-items .failed {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.10);
}

.shop-dashboard-filter {
  display: block;
  padding: 0;
}

.shop-dashboard-filter > summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
}

.shop-dashboard-filter > summary::-webkit-details-marker {
  display: none;
}

.shop-dashboard-filter > summary strong {
  margin-right: 8px;
  font-size: 14px;
}

.shop-dashboard-filter > summary span,
.shop-dashboard-filter > summary small {
  color: var(--muted);
  font-size: 12px;
}

.shop-dashboard-filter > summary small::after {
  content: " ▾";
  color: #2563eb;
}

.shop-dashboard-filter[open] > summary small::after {
  content: " ▴";
}

.shop-dashboard-filter-form {
  display: grid;
  gap: 10px;
  padding: 0 14px 12px;
  border-top: 1px solid rgba(34, 49, 77, 0.07);
}

.shop-dashboard-filter-row {
  display: grid;
  grid-template-columns: minmax(280px, 420px) auto;
  gap: 12px;
  align-items: end;
}

.shop-dashboard-filter-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.shop-dashboard-filter-row .input {
  min-height: 34px;
}

.shop-dashboard-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.shop-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 86px;
  overflow: auto;
  padding-right: 4px;
}

.shop-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(34, 49, 77, 0.12);
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff;
  white-space: nowrap;
}

.shop-filter-chip span {
  font-weight: 650;
}

.shop-filter-chip small {
  color: var(--muted);
}

.pdd-home-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(92px, 1fr));
  gap: 0;
  padding: 10px 16px;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.pdd-home-metric {
  min-width: 0;
  display: grid;
  gap: 5px;
  align-content: start;
  padding: 0 12px 0 0;
}

.pdd-home-label {
  width: max-content;
  max-width: 100%;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px dotted rgba(31, 41, 55, 0.28);
  white-space: nowrap;
}

.pdd-home-metric strong {
  color: #0b1220;
  font-size: 25px;
  line-height: 1;
  font-weight: 700;
}

.pdd-home-metric a,
.metric-helper {
  color: #2358e8;
  font-size: 12px;
}

.metric-breakdown {
  border: 0;
}

.metric-breakdown-summary {
  display: grid;
  gap: 5px;
  cursor: pointer;
}

.metric-breakdown:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.42);
  outline-offset: 3px;
  border-radius: 8px;
}

.metric-breakdown-list {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(34, 49, 77, 0.08);
  max-height: 180px;
  overflow: auto;
}

.metric-breakdown-list[hidden] {
  display: none !important;
}

.metric-breakdown-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  color: #475569;
  font-size: 12px;
}

.metric-breakdown-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-dashboard-shop-link {
  color: inherit;
  text-decoration: none;
}

.shop-dashboard-shop-link:hover {
  color: #2358e8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.shop-summary-name {
  font-weight: 760;
}

.metric-breakdown-list b {
  flex: 0 0 auto;
  color: #111827;
  font-weight: 760;
}

.metric-breakdown-list .is-muted span,
.metric-breakdown-list .is-muted b {
  color: #9ca3af;
}

.shop-dashboard-modal[hidden] {
  display: none;
}

.shop-dashboard-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
}

.shop-dashboard-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(3px);
}

.shop-dashboard-modal-card {
  position: relative;
  z-index: 1;
  width: min(680px, 96vw);
  max-height: min(720px, 88vh);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(34, 49, 77, 0.12);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

.shop-dashboard-modal-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(34, 49, 77, 0.08);
}

.shop-dashboard-modal-card h3 {
  margin: 2px 0 4px;
  font-size: 20px;
}

.shop-dashboard-modal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.shop-dashboard-modal-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 14px 20px 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  color: #475569;
}

.shop-dashboard-modal-total strong {
  color: #0f172a;
  font-size: 24px;
}

.shop-dashboard-modal-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding: 4px 20px 20px;
}

.shop-dashboard-modal-list div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid rgba(34, 49, 77, 0.07);
}

.shop-dashboard-modal-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #334155;
  font-weight: 650;
}

.shop-dashboard-modal-list a {
  color: inherit;
  text-decoration: none;
}

.shop-dashboard-modal-list a:hover {
  color: #2358e8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.shop-dashboard-modal-list b {
  flex: 0 0 auto;
  color: #111827;
  font-size: 15px;
}

.shop-dashboard-modal-list .is-muted {
  opacity: 0.55;
}

.shop-dashboard-realtime {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(380px, 1.1fr);
  gap: 14px;
  padding: 12px 14px;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.shop-dashboard-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 9px;
}

.shop-dashboard-section-head span {
  color: var(--muted);
  font-size: 11px;
}

.realtime-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 12px 20px;
}

.realtime-metric {
  display: grid;
  gap: 5px;
}

.realtime-metric span {
  width: max-content;
  max-width: 100%;
  color: #374151;
  border-bottom: 1px dotted rgba(31, 41, 55, 0.26);
  font-size: 13px;
  font-weight: 500;
}

.realtime-metric strong {
  font-size: 25px;
  color: #0b1220;
  line-height: 1;
  font-weight: 700;
}

.realtime-metric small {
  color: var(--muted);
  font-size: 12px;
}

.segmented-control {
  display: inline-flex;
  border: 1px solid rgba(37, 99, 235, 0.38);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.segmented-control button {
  border: 0;
  background: #fff;
  color: #1f2937;
  padding: 5px 9px;
  cursor: default;
  font-size: 12px;
}

.segmented-control button + button {
  border-left: 1px solid rgba(37, 99, 235, 0.28);
}

.segmented-control .is-active {
  color: #2563eb;
  background: #eff6ff;
}

.dashboard-inline-goods {
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid rgba(34, 49, 77, 0.08);
}

.shop-dashboard-chart {
  min-width: 0;
  position: relative;
  border-radius: 8px;
  background: #fbfcff;
  padding: 11px 12px 7px;
  border: 1px solid rgba(37, 99, 235, 0.08);
}

.chart-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 5px;
}

.chart-toolbar > strong {
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.chart-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

.chart-legend .today {
  background: #3778ff;
}

.chart-legend .yesterday {
  background: #ffb52e;
}

.shop-dashboard-chart svg {
  width: 100%;
  height: auto;
  min-height: 166px;
}

.shop-dashboard-chart text {
  fill: #7b8495;
  font-size: 11px;
}

.chart-grid {
  stroke: rgba(107, 114, 128, 0.16);
  stroke-dasharray: 4 8;
}

.chart-axis {
  stroke: rgba(107, 114, 128, 0.24);
}

.chart-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.8));
}

.chart-line.today {
  stroke: #2f6df6;
}

.chart-line.yesterday {
  stroke: #ffad2f;
}

.chart-data-point {
  fill: #ffffff;
  stroke-width: 2.2;
  pointer-events: none;
}

.chart-data-point.today {
  stroke: #2f6df6;
}

.chart-data-point.yesterday {
  stroke: #ffad2f;
}

.chart-hit-point {
  cursor: crosshair;
  fill: transparent;
  stroke: transparent;
  transition: opacity 0.12s ease;
}

.chart-tooltip {
  position: absolute;
  z-index: 4;
  min-width: 132px;
  pointer-events: none;
  border-radius: 8px;
  padding: 8px 10px;
  color: #111827;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(34, 49, 77, 0.14);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  font-size: 12px;
  line-height: 1.45;
}

.chart-tooltip strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.shop-dashboard-bottom-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(360px, 0.9fr);
  gap: 16px;
}

.goods-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(70px, 1fr));
  gap: 8px;
}

.goods-metric-grid div,
.goods-metric-grid details,
.goods-metric-grid article {
  display: grid;
  gap: 4px;
}

.goods-metric-grid span {
  color: #1f2937;
  font-size: 12px;
}

.goods-metric-grid strong {
  color: #05070c;
  font-size: 22px;
  line-height: 1;
}

.shop-dashboard-note p {
  margin: 0 0 14px;
  color: var(--muted);
}

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

.note-steps span {
  padding: 9px 10px;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  text-align: center;
}

.shop-dashboard-detail-card {
  padding: 14px 16px;
}

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

.shop-dashboard-shop {
  border: 1px solid rgba(34, 49, 77, 0.1);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.shop-dashboard-shop summary {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(360px, 1.5fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
}

.shop-dashboard-shop summary::-webkit-details-marker {
  display: none;
}

.shop-summary-main,
.shop-summary-metrics,
.shop-summary-status,
.shop-expanded-meta {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.shop-summary-main strong {
  width: 100%;
  font-size: 14px;
}

.shop-summary-main span,
.shop-summary-metrics span,
.shop-expanded-meta span {
  color: var(--muted);
  font-size: 12px;
}

.shop-summary-metrics span {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(34, 49, 77, 0.06);
}

.shop-expanded {
  padding: 0 12px 12px;
  border-top: 1px solid rgba(34, 49, 77, 0.08);
}

.shop-expanded-meta {
  padding: 10px 0;
}

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

.shop-expanded-grid > div {
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px;
}

.shop-expanded-grid h4 {
  margin: 0 0 10px;
  font-size: 13px;
}

.mini-metric-grid {
  display: grid;
  gap: 5px;
}

.mini-metric-grid span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.mini-metric-grid b {
  font-weight: 500;
}

.mini-metric-grid strong {
  color: #111827;
  font-weight: 760;
}

@media (max-width: 1360px) {
  .pdd-home-strip {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  .shop-dashboard-realtime,
  .shop-dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }

  .shop-dashboard-shop summary,
  .shop-expanded-grid {
    grid-template-columns: 1fr;
  }

  .shop-summary-status {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .shop-dashboard-hero,
  .shop-dashboard-filter-row,
  .realtime-metric-grid,
  .goods-metric-grid,
  .note-steps {
    grid-template-columns: 1fr;
  }

  .shop-dashboard-modal {
    align-items: end;
    padding: 10px;
  }

  .shop-dashboard-modal-card {
    width: 100%;
    max-height: 86vh;
    border-radius: 16px 16px 12px 12px;
  }

  .shop-dashboard-modal-card header {
    padding: 14px 14px 10px;
  }

  .shop-dashboard-modal-card h3 {
    font-size: 18px;
  }

  .shop-dashboard-modal-total {
    margin: 10px 14px 8px;
  }

  .shop-dashboard-modal-list {
    padding: 4px 14px 14px;
  }
}
/* Fixed-address workspace tabs. Business pages remain normal when opened directly. */
.workspace-shell-page {
  overflow: hidden;
}

.workspace-shell-page .app-shell {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 8px;
  gap: 8px;
}

.workspace-shell-page aside.topbar {
  top: 8px;
  min-height: calc(100vh - 16px);
  max-height: calc(100vh - 16px);
}

.workspace-shell-page .workspace {
  height: calc(100vh - 16px);
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
}

.workspace-shell-page .workspace-header {
  display: none;
}

.workspace-shell-page .content {
  height: 100%;
  min-height: 0;
  display: block;
}

.workspace-tabs-app {
  height: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #d9e0ea;
  border-radius: 6px;
  background: #fff;
}

.workspace-tabbar {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border-bottom: 1px solid #d9e0ea;
  background: #f3f5f8;
}

.workspace-tabstrip {
  min-width: 0;
  display: flex;
  align-items: end;
  gap: 2px;
  padding: 4px 5px 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.workspace-tab {
  position: relative;
  flex: 0 0 auto;
  width: 150px;
  height: 33px;
  padding: 0 30px 0 12px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  background: transparent;
  color: #526174;
  text-align: left;
  cursor: pointer;
}

.workspace-tab:hover {
  background: #e8edf4;
}

.workspace-tab.active {
  background: #fff;
  border-color: #d9e0ea;
  color: #14253b;
  font-weight: 600;
}

.workspace-tab.loading::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 13px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2677c9;
}

.workspace-tab-label {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  letter-spacing: 0;
}

.workspace-tab-close {
  position: absolute;
  right: 7px;
  top: 6px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  color: #778497;
  font-size: 16px;
  font-weight: 400;
}

.workspace-tab-close:hover {
  color: #bd2b2b;
  background: #feeaea;
}

.workspace-tab-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 5px;
  border-left: 1px solid #d9e0ea;
}

.workspace-tab-action {
  width: 29px;
  height: 29px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #4f6075;
  font-size: 17px;
  cursor: pointer;
}

.workspace-tab-action:hover {
  background: #e2e8f0;
  color: #1769aa;
}

.workspace-frame-stack {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: #f3f5f8;
}

.workspace-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #f3f5f8;
}

.workspace-embedded-page .app-shell {
  width: 100%;
  margin: 0;
  padding: 8px;
  grid-template-columns: minmax(0, 1fr);
}

.workspace-embedded-page aside.topbar {
  display: none;
}

.workspace-embedded-page .workspace {
  min-height: calc(100vh - 16px);
}

@media (max-width: 900px) {
  .workspace-shell-page .app-shell {
    padding: 0;
    grid-template-columns: 0 minmax(0, 1fr);
  }

  .workspace-shell-page aside.topbar {
    display: none;
  }

  .workspace-shell-page .workspace {
    height: 100vh;
  }

  .workspace-tabs-app {
    border-radius: 0;
  }
}
