:root {
    color-scheme: light;
    --canvas: #f5f6f8;
    --surface: #ffffff;
    --surface-soft: #f0f2f5;
    --ink: #111827;
    --muted: #687386;
    --faint: #9aa4b2;
    --line: #e2e6eb;
    --line-strong: #cdd4dd;
    --blue: #2563eb;
    --blue-soft: #eff6ff;
    --green: #16856b;
    --green-soft: #eaf8f2;
    --orange: #b85d14;
    --orange-soft: #fff4e7;
    --red: #b42318;
    --red-soft: #fff0ee;
    --radius: 8px;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 5px 18px rgba(16, 24, 40, 0.04);
}

/* Dynamic page states must remain mutually exclusive regardless of component display rules. */
[hidden] {
    display: none !important;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    background: var(--canvas);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

body {
    min-width: 320px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select {
    font: inherit;
}

button, .button, .icon-button, select {
    cursor: pointer;
}

svg {
    display: inline-block;
    vertical-align: middle;
    width: 15px;
    height: 15px;
    max-width: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.shell {
    width: min(1320px, calc(100% - 48px));
    margin: 0 auto;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--ink);
    color: #fff;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.header-content {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-badge {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: var(--ink);
    color: #fff;
}

.brand-svg {
    width: 16px;
    height: 16px;
}

.brand-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .02em;
}

.site-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 4px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 16px;
    border-radius: 6px;
    color: #64748b;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent !important;
    border-bottom: 1px solid transparent !important;
    cursor: pointer;
    line-height: 1;
    user-select: none;
}

.nav-link:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.75);
}

.nav-link.active {
    background: #ffffff;
    color: #0f172a;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.95) !important;
}

.nav-icon {
    width: 15px;
    height: 15px;
    color: #94a3b8;
    transition: color 0.18s ease, transform 0.18s ease;
    flex-shrink: 0;
    margin-right: 1px;
}

.nav-link:hover .nav-icon {
    color: #475569;
}

.nav-link.active .nav-icon {
    color: #2563eb;
    transform: scale(1.06);
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.header-actions-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-actions-group .sync-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 11.5px;
    box-shadow: none;
}

.header-actions-group .header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    padding: 0 13px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
}

.main-content {
    flex: 1 0 auto;
    padding: 22px 0 64px;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 26px;
}

.eyebrow {
    margin: 0 0 7px;
    color: var(--blue);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
}

h1, h2, p {
    margin-top: 0;
}

.page-heading h1 {
    margin-bottom: 6px;
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: -.03em;
}

.page-subtitle {
    max-width: 650px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 13px;
}

.heading-actions-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.sync-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 2px var(--green-soft);
    display: inline-block;
    flex-shrink: 0;
}

.sync-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.sync-time {
    color: var(--ink);
    font-weight: 750;
    letter-spacing: -0.01em;
}

.heading-actions, .result-tools, .inline-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.button {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
    transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}

.button svg, .icon-button svg, .search-field svg, .store-ext-btn svg, .badge-icon, .chip-icon {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.button-primary {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.button-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.button-primary-subtle {
    border-color: #bfdbfe;
    background: var(--blue-soft);
    color: var(--blue);
}

.button-primary-subtle:hover {
    border-color: var(--blue);
    background: #dbeafe;
    color: #1d4ed8;
}

.button-danger {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.button-danger:hover:not(:disabled) {
    border-color: #fca5a5;
    background: #fee2e2;
    color: #991b1b;
}

.button-dark {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.button-dark:hover {
    background: #273244;
}

.button-quiet {
    border-color: var(--line);
    background: var(--surface);
    color: var(--muted);
}

.button-quiet:hover, .button-outline:hover {
    border-color: var(--line-strong);
    color: var(--ink);
    background: var(--surface-soft);
}

.button-outline {
    min-height: 32px;
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink);
}

.button-small {
    min-height: 30px;
    padding: 0 10px;
    font-size: 11px;
    gap: 5px;
}

.button-reset {
    min-height: 38px;
    padding: 0 12px;
}

.icon-button {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--muted);
}

.icon-button:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 650;
}

.flash-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flash-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.flash-success {
    border-color: #a7f3d0;
    background: var(--green-soft);
    color: #065f46;
}

.flash-error {
    border-color: #fecaca;
    background: var(--red-soft);
    color: #991b1b;
}

.flash-close {
    width: 24px;
    height: 24px;
    border-color: transparent;
    background: transparent;
    color: currentColor;
}

.refresh-progress {
    margin-bottom: 18px;
    padding: 16px 18px;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    background: #f8fbff;
    box-shadow: var(--shadow);
}

.refresh-progress-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.refresh-progress-label {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.refresh-progress-header strong {
    display: block;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.4;
}

.refresh-progress-message {
    max-width: 720px;
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.refresh-progress-count {
    flex: 0 0 auto;
    padding-top: 4px;
    color: #1d4ed8;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.refresh-progress-track {
    height: 7px;
    overflow: hidden;
    margin-top: 14px;
    border-radius: 4px;
    background: #dbeafe;
}

.refresh-progress-track > span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #2563eb;
    transition: width 180ms ease;
}

.refresh-progress-list {
    display: grid;
    gap: 7px;
    max-height: 230px;
    margin: 14px 0 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.refresh-progress-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-left: 3px solid #94a3b8;
    border-radius: 5px;
    background: var(--surface);
    font-size: 12px;
}

.refresh-progress-copy {
    min-width: 0;
}

.refresh-progress-store {
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.refresh-progress-item-message {
    display: block;
    overflow: hidden;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.refresh-progress-state {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.refresh-progress-item.is-started {
    border-left-color: #2563eb;
    background: #eff6ff;
}

.refresh-progress-item.is-started .refresh-progress-state {
    color: #1d4ed8;
    font-weight: 650;
}

.refresh-progress-item.is-completed {
    border-left-color: #10b981;
}

.refresh-progress-item.is-completed .refresh-progress-state {
    color: #047857;
}

.refresh-progress-item.is-skipped {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.refresh-progress-item.is-skipped .refresh-progress-state {
    color: #b45309;
}

.refresh-progress-item.is-failed {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.refresh-progress-item.is-failed .refresh-progress-state {
    color: #b91c1c;
}

.button.is-busy {
    cursor: wait;
}

.button:disabled,
.meta-time-refresh:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

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

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

.metric {
    min-height: 108px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.metric-accent {
    border-top: 3px solid var(--orange);
    padding-top: 14px;
}

.metric-label, .metric-note {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.metric strong {
    color: var(--ink);
    font-size: 26px;
    line-height: 1.1;
    letter-spacing: -.03em;
}

.metric-date {
    font-size: 15px !important;
    font-family: inherit;
}

/* 店铺专属视图卡片 (Store Hero Banner) */
.store-hero-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 18px 22px;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
}

.store-hero-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.store-hero-avatar {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #dbeafe;
    color: var(--blue);
    flex-shrink: 0;
    overflow: hidden;
}

.store-hero-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.store-hero-avatar svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.store-hero-info {
    min-width: 0;
}

.store-hero-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.store-hero-tag {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue);
    background: rgba(37, 99, 235, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.store-hero-name {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.store-hero-meta {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.store-hero-count strong {
    color: var(--ink);
    font-weight: 750;
}

.store-hero-divider {
    color: var(--line-strong);
}

.store-hero-url {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--faint);
}

.store-hero-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.control-panel {
    margin-bottom: 18px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.catalog-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-field {
    min-width: 240px;
    flex: 1 1 300px;
    height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--faint);
    background: var(--surface);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.search-field:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-soft);
}

.search-field input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font-size: 12px;
}

.search-field input::placeholder {
    color: var(--faint);
}

.search-reset {
    color: var(--faint);
    font-size: 18px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
}

.search-reset:hover {
    color: var(--ink);
    background: var(--surface-soft);
}

.catalog-form select {
    height: 38px;
    max-width: 180px;
    min-width: 120px;
    padding: 0 26px 0 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    outline: 0;
    background: var(--surface);
    color: var(--ink);
    font-size: 12px;
    font-weight: 500;
}

.catalog-form select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-soft);
}

.group-account-filter {
    height: 38px;
    min-width: 156px;
    max-width: 190px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    outline: 0;
    background: var(--surface);
    color: var(--ink);
    font-size: 12px;
}

.group-account-filter:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-soft);
}

.price-range {
    height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 206px;
}

.price-range label {
    min-width: 0;
    flex: 1 1 0;
}

.price-range input {
    box-sizing: border-box;
    width: 100%;
    height: 38px;
    min-width: 0;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    outline: 0;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 12px;
}

.price-range input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-soft);
}

.price-range-separator {
    color: var(--muted);
    flex: 0 0 auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.check-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.check-control input {
    accent-color: var(--blue);
    cursor: pointer;
}

.results-header {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.result-count-group {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.result-count {
    color: var(--ink);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.03em;
}

.result-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.active-store-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 11px;
    font-weight: 700;
}

.active-store-indicator a {
    color: var(--blue);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
}

.active-store-indicator a:hover {
    color: #1d4ed8;
}

.result-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 视图切换按钮 (网格 / 列表) */
.view-switcher {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.view-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 24px;
    padding: 0 9px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
    transition: all .12s ease;
}

.view-btn svg {
    width: 13px;
    height: 13px;
}

.view-btn:hover {
    color: var(--ink);
    background: var(--surface-soft);
}

.view-btn.active {
    color: var(--ink);
    background: var(--surface-soft);
    font-weight: 750;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.segmented-control {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.segmented-control a {
    padding: 4px 10px;
    border-radius: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
    transition: background .12s ease, color .12s ease;
}

.segmented-control a:hover, .segmented-control a.active {
    background: var(--surface-soft);
    color: var(--ink);
}

.segmented-control a.disabled {
    pointer-events: none;
    opacity: .45;
}

/* ==================== 商品单行列表 (Product Row List) ==================== */
.product-row-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 单行商品项卡片 (Sleek 2-Tier Horizontal Row Card) */
.product-row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 13px 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03), 0 1px 2px rgba(15, 23, 42, 0.02);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.product-row-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 18px -3px rgba(15, 23, 42, 0.07), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    transform: translateY(-1px);
}

.product-row-item.is-inactive {
    background: #fafbfc;
    border-color: #f1f5f9;
    opacity: 0.85;
}

/* 左侧主体区：左上（店铺+分类+库存+时间+刷新）与 左下（状态+标题） */
.row-left-section {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

/* 左上：店铺、分类、库存、时间与刷新按钮栏 (统一 22px 高度) */
.row-top-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* 店铺胶囊 - 极简中性配色，降低视觉重心 */
.meta-store-pill {
    display: inline-flex;
    align-items: stretch;
    border-radius: 4px;
    background: #f1f5f9;
    overflow: hidden;
    height: 20px;
    max-width: 320px;
}

.meta-store-name {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 7px;
    color: #475569;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background .12s ease, color .12s ease;
}

.meta-store-name:hover {
    background: #e2e8f0;
    color: #2563eb;
}

.meta-store-name svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

.meta-store-name .store-brand-icon {
    width: 13px !important;
    height: 13px !important;
    min-width: 13px;
    max-width: 13px;
    min-height: 13px;
    max-height: 13px;
    flex: 0 0 13px;
    display: block;
    object-fit: contain;
    border-radius: 3px;
    background: #fff;
}

.meta-store-ext {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border-left: 1px solid #e2e8f0;
    color: #64748b;
    text-decoration: none;
    transition: background .12s ease, color .12s ease;
    flex-shrink: 0;
}

.meta-store-ext svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

.meta-store-ext:hover {
    background: #e2e8f0;
    color: #1d4ed8;
}

/* 分类标签 - 极简统一 */
.meta-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 20px;
    padding: 0 7px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 500;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meta-category-badge svg {
    width: 11px;
    height: 11px;
    color: #64748b;
    flex-shrink: 0;
}

/* 库存标签 - 清爽淡绿 */
.meta-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 20px;
    padding: 0 6px;
    border-radius: 4px;
    background: #f0fdf4;
    color: #166534;
    font-size: 11px;
    font-weight: 500;
}

.meta-stock-badge svg {
    width: 11px;
    height: 11px;
    color: #16a34a;
    flex-shrink: 0;
}

/* 商品创建时间 - 极简统一 */
.meta-create-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
}

.meta-create-time-badge svg {
    width: 11px;
    height: 11px;
    color: #94a3b8;
    flex-shrink: 0;
}

.mobile-only-badge {
    display: none !important;
}

/* 时间与刷新组合胶囊 - 极简统一 */
.meta-time-pill {
    display: inline-flex;
    align-items: stretch;
    border-radius: 4px;
    background: #f1f5f9;
    overflow: hidden;
    height: 20px;
}

.meta-time-content {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 7px;
    color: #64748b;
    font-size: 11px;
    font-weight: 400;
}

.meta-time-content svg {
    width: 11px;
    height: 11px;
    color: #94a3b8;
    flex-shrink: 0;
}

.meta-time-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: none;
    border-left: 1px solid #e2e8f0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    transition: background .12s ease, color .12s ease;
    flex-shrink: 0;
    height: 100%;
}

.meta-time-refresh svg {
    width: 11px;
    height: 11px;
    color: currentColor;
}

.meta-time-refresh:hover {
    background: #e2e8f0;
    color: #2563eb;
}

.meta-time-refresh:hover svg {
    transform: rotate(180deg);
    transition: transform .35s ease;
}

/* 左下：状态 + 标题行 */
.row-bottom-title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

/* 兼容旧版本 JS 缓存的 fallback (隐藏文字，只留圆点) */
.meta-status-badge {
    font-size: 0 !important;
    color: transparent !important;
    border: none !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center;
    gap: 0 !important;
}

.meta-status-badge.status-active .status-dot {
    background-color: var(--green);
}

.meta-status-badge.status-inactive .status-dot {
    background-color: var(--orange);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
    display: inline-block;
}

.status-dot.status-active {
    background-color: var(--green);
}

.status-dot.status-inactive {
    background-color: var(--orange);
}

.status-dot.status-outofstock {
    background-color: var(--red);
}

/* 已下架的商品，标题加一个中划线，不改颜色，去掉加粗 */
.product-row-item.is-inactive .row-product-title,
.product-row-item.is-inactive .row-title-link {
    text-decoration: line-through;
    font-weight: normal;
}

/* 缺货的商品，标题改成浅灰色 */
.product-row-item.is-outofstock .row-product-title,
.product-row-item.is-outofstock .row-title-link {
    color: var(--faint) !important;
}
.product-row-item.is-outofstock .row-title-link:hover {
    color: var(--blue) !important;
}

.row-product-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink);
    letter-spacing: -0.01em;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-title-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ink);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .12s ease;
}

.row-title-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-title-link:hover {
    color: var(--blue);
}

.title-arrow {
    width: 12px;
    height: 12px;
    color: #94a3b8;
    flex-shrink: 0;
    transition: transform .15s ease, color .15s ease;
}

.row-title-link:hover .title-arrow {
    color: var(--blue);
    transform: translate(1px, -1px);
}

/* 右侧区域：双价面板 (付款价着重加深、销售价弱化) */
.row-right-section {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.row-pricing-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
}

/* 主价格 (付款金额，着重加深) */
.pricing-main-amount {
    display: inline-flex;
    align-items: baseline;
    gap: 1.5px;
    color: #e11d48;
    font-family: "Inter", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-feature-settings: "tnum" 1, "cv05" 1;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.pricing-main-amount .currency {
    font-size: 13px;
    font-weight: 700;
    color: #e11d48;
    font-family: inherit;
}

.pricing-main-amount .amount {
    font-size: 21px;
    font-weight: 750;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #e11d48;
    font-family: inherit;
}

/* 下方辅助显示：销售价 */
.pricing-list-row {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 4px;
    font-size: 11px;
    color: #64748b;
    line-height: 1;
}

.pricing-tag-list {
    font-size: 10px;
    font-weight: 500;
    color: #94a3b8;
}

.pricing-num-list {
    font-family: "Inter", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #64748b;
    font-size: 11.5px;
    letter-spacing: -0.01em;
}

.empty-panel {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    text-align: center;
    box-shadow: var(--shadow);
}

.empty-panel.compact {
    min-height: 200px;
}

.empty-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--surface-soft);
    color: var(--muted);
}

.empty-mark svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.empty-panel h2 {
    margin-bottom: 5px;
    font-size: 16px;
}

.empty-panel p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 12px;
}

.catalog-collect-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.catalog-collect-prompt p {
    margin: 0;
    color: var(--ink);
    font-weight: 600;
}

.catalog-collect-prompt .button {
    min-width: 112px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 24px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
}

.pagination-summary {
    min-width: 240px;
}

.pagination-indicator {
    line-height: 1.8;
}

.pagination-indicator strong {
    color: var(--ink);
    font-weight: 800;
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination .segmented-control {
    flex-wrap: wrap;
    justify-content: center;
}

.pagination .segmented-control a,
.pagination-ellipsis {
    min-width: 32px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
}

.pagination-ellipsis {
    color: var(--muted);
    font-weight: 750;
}

.pagination-size-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pagination-size-form label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
}

.pagination-size-form select {
    height: 34px;
    min-width: 72px;
    padding: 0 28px 0 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-soft);
    color: var(--ink);
    font-size: 12px;
    font-weight: 750;
}

.message-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.message-search-form .search-field {
    flex: 1;
}

.msg-source-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 4px 10px;
    border-radius: 6px;
}

.msg-source-tag svg {
    color: var(--faint);
}

.message-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.message-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px 18px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.03), 0 2px 6px rgba(16, 24, 40, 0.02);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.group-page-heading p { margin: 6px 0 0; color: var(--muted); }
.group-list { display: flex; flex-direction: column; gap: 10px; }
.group-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); animation: rowFadeInUp .24s ease both; animation-delay: calc(var(--item-index, 0) * .02s); }
.group-card:hover { border-color: #bfdbfe; box-shadow: 0 4px 14px rgba(37, 99, 235, .08); }
.group-card-main, .group-card-side { display: flex; align-items: center; min-width: 0; }
.group-card-main { gap: 14px; }
.group-card-side { flex-direction: column; align-items: flex-end; gap: 9px; flex-shrink: 0; }
.group-avatar-wrap { width: 52px; height: 52px; flex: 0 0 52px; display: grid; }
.group-avatar-wrap > .group-avatar { width: 52px; height: 52px; grid-area: 1 / 1; flex: none; }
.group-avatar { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 14px; object-fit: cover; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: 21px; font-weight: 800; border: 1px solid #dbeafe; }
.group-avatar-fallback { text-transform: uppercase; }
.group-card-copy { min-width: 0; }
.group-card-copy h2 { display: flex; align-items: center; gap: 7px; min-width: 0; margin: 0; font-size: 16px; line-height: 1.3; white-space: nowrap; }
.group-title-text { overflow: hidden; text-overflow: ellipsis; }
.entity-type-icon { display: inline-grid; width: 17px; height: 17px; flex: 0 0 17px; place-items: center; }
.entity-type-icon svg { width: 17px; height: 17px; }
.entity-type-icon-group { color: #2563eb; }
.entity-type-icon-channel { color: #059669; }
.entity-type-icon-unknown { color: #d97706; }
.group-username { display: inline-block; margin-top: 3px; color: var(--blue); font-family: "JetBrains Mono", monospace; font-size: 12px; }
.group-meta { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.group-meta-dot { color: var(--line-strong); }
.group-joined-accounts { max-width: 280px; color: #0f766e; font-size: 11px; text-align: right; overflow-wrap: anywhere; }
.group-updated { color: var(--faint); font-size: 11px; white-space: nowrap; }
.group-updated-actions { display: inline-flex; align-items: center; gap: 5px; }
.group-delete-button { display: inline-grid; width: 22px; height: 22px; place-items: center; padding: 0; color: #94a3b8; background: transparent; border: 1px solid transparent; border-radius: 5px; cursor: pointer; transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
.group-delete-button:hover:not(:disabled) { color: #dc2626; background: #fef2f2; border-color: #fecaca; }
.group-delete-button:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
.group-delete-button:disabled { cursor: wait; opacity: .55; }
.group-action-buttons { display: inline-flex; align-items: center; gap: 7px; }
.group-open-button { min-height: 30px; padding: 0 11px; font-size: 12px; }

.relay-list { display: flex; flex-direction: column; gap: 10px; }
.relay-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 17px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); animation: rowFadeInUp .24s ease both; animation-delay: calc(var(--item-index, 0) * .02s); }
.relay-card:hover { border-color: #bfdbfe; box-shadow: 0 4px 14px rgba(37, 99, 235, .08); }
.relay-card-main { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.relay-avatar { width: 52px; height: 52px; flex: 0 0 52px; display: grid; place-items: center; border-radius: 14px; font-size: 21px; font-weight: 800; border: 1px solid #dbeafe; }
.relay-avatar-newapi { color: var(--blue); background: var(--blue-soft); }
.relay-avatar-sub2api { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.relay-card-copy { min-width: 0; }
.relay-card-copy h2 { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; font-size: 16px; line-height: 1.35; }
.relay-title-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relay-type-tag { display: inline-flex; align-items: center; flex: 0 0 auto; padding: 2px 7px; border-radius: 5px; font-size: 10px; font-weight: 800; line-height: 1.35; }
.relay-type-tag-newapi { color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; }
.relay-type-tag-sub2api { color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0; }
.relay-site-url { display: block; margin-top: 4px; color: var(--blue); font: 12px "JetBrains Mono", monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relay-site-url:hover { text-decoration: underline; }
.relay-meta { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.relay-meta-dot { color: var(--line-strong); }
.relay-source { min-width: 250px; max-width: 38%; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; color: var(--muted); font-size: 11px; text-align: right; }
.relay-source-label { color: var(--faint); }
.relay-source a { color: var(--blue); font-weight: 700; overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }
.relay-source a:hover { text-decoration: underline; }
.relay-source code { max-width: 100%; overflow: hidden; text-overflow: ellipsis; color: var(--faint); font: 10px "JetBrains Mono", monospace; }
.relay-source-time { color: var(--faint); }

@media (max-width: 680px) {
    .group-card { align-items: flex-start; flex-direction: column; gap: 12px; }
    .group-card-side { width: 100%; align-items: flex-start; flex-direction: row; justify-content: space-between; flex-wrap: wrap; padding-left: 66px; }
    .group-joined-accounts { flex-basis: 100%; max-width: none; text-align: left; }
    .group-card-copy h2 { max-width: calc(100vw - 120px); }
    .relay-card { align-items: flex-start; flex-direction: column; gap: 12px; }
    .relay-card-main { width: 100%; }
    .relay-card-copy h2 { max-width: calc(100vw - 135px); }
    .relay-source { width: 100%; max-width: none; min-width: 0; align-items: flex-start; text-align: left; padding-left: 80px; }
}

.message-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 3px 12px rgba(16, 24, 40, 0.06);
}

.message-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03), 0 1px 2px rgba(15, 23, 42, 0.02);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.message-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05);
}

/* 头部信息栏：单行 (来源标签 + 群组超链接 + 发送人合并Tag ... 时间) */
.msg-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.msg-header-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1 1 auto;
    min-width: 0;
}

.source-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 550;
    line-height: 1.2;
    flex-shrink: 0;
}

.source-badge.source-chat {
    background: #fff7ed;
    color: #c2410c;
    border: none;
}

.source-badge.source-member {
    background: #eef2ff;
    color: #4f46e5;
    border: none;
}

.msg-chat-link,
.msg-chat-plain {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: color 0.15s ease;
    min-width: 0;
}

.msg-chat-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.msg-chat-link .tg-plane-icon {
    color: #0088cc;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.msg-chat-link:hover .tg-plane-icon {
    color: #2563eb;
}

.msg-chat-link-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
}

.msg-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    align-self: center;
    flex-shrink: 0;
    margin-left: auto;
    gap: 6px;
    line-height: 1;
}

.msg-time-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #64748b;
    font-size: 11.5px;
    padding: 2px 8px;
    height: 22px;
    box-sizing: border-box;
    border-radius: 5px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    line-height: 1;
    user-select: none;
}

.message-delete-button {
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    padding: 0;
    color: #94a3b8;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.message-delete-button:hover:not(:disabled) {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

.message-delete-button:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.message-delete-button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.meta-tg-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.meta-tg-chip.sender-chip {
    background: rgba(37, 99, 235, 0.07);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.2);
    max-width: 340px;
}

.meta-tg-chip.sender-chip:hover {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.35);
    color: #1d4ed8;
}

.user-mini-icon {
    flex-shrink: 0;
    color: currentColor;
    opacity: 0.85;
}

.sender-chip-name {
    font-weight: 650;
    color: #1e40af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

.meta-tg-chip.sender-chip.sender-chip-plain {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.meta-tg-chip.sender-chip.sender-chip-plain .sender-chip-name {
    color: #334155;
}

.msg-content-container {
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.msg-content-text {
    color: #1e293b;
    font-size: 13.5px;
    line-height: 1.75;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.msg-bio-container {
    padding: 10px 14px;
    background: #fcfcfd;
    border: 1px dashed #e2e8f0;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.msg-bio-header {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.msg-bio-text {
    color: #475569;
    font-size: 12.5px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* 正文与简介折叠/展开限制最高高度 */
.msg-expandable-box {
    position: relative;
    max-height: 160px;
    overflow: hidden;
    transition: max-height 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.msg-expandable-box.no-overflow .msg-expand-mask,
.msg-expandable-box.no-overflow .msg-expand-btn {
    display: none !important;
}

.msg-expand-mask {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(to bottom, rgba(248, 250, 252, 0) 0%, rgba(248, 250, 252, 0.75) 45%, rgba(248, 250, 252, 0.98) 100%);
    pointer-events: auto;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.msg-bio-container .msg-expand-mask {
    background: linear-gradient(to bottom, rgba(252, 252, 253, 0) 0%, rgba(252, 252, 253, 0.75) 45%, rgba(252, 252, 253, 0.98) 100%);
}

.msg-expand-btn {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 2px 8px;
    height: 22px;
    font-size: 12px;
    font-weight: 550;
    color: #64748b;
    background: transparent;
    border: none;
    border-radius: 4px;
    box-shadow: none;
    cursor: pointer;
    z-index: 2;
    transition: color 0.15s ease;
    user-select: none;
}

.msg-expand-btn:hover {
    color: #2563eb;
    background: transparent;
    box-shadow: none;
}

.msg-expand-icon {
    width: 12px;
    height: 12px;
    stroke-width: 2.2;
    transition: transform 0.2s ease;
}

.msg-expandable-box.is-expanded {
    max-height: none !important;
    overflow: visible;
    padding-bottom: 24px;
}

.msg-expandable-box.is-expanded .msg-expand-mask {
    display: none;
}

.msg-expandable-box.is-expanded .msg-expand-btn {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    box-shadow: none;
}

.msg-expandable-box.is-expanded .msg-expand-btn:hover {
    background: transparent;
    color: #475569;
}

.msg-expandable-box.is-expanded .msg-expand-icon {
    transform: rotate(180deg);
}

/* 消息内嵌链接与 TG Scheme 标签 - 极简超链接设计，减少视觉色彩杂乱 */
.msg-inline-link {
    display: inline-flex;
    align-items: center;
    gap: 2.5px;
    vertical-align: middle;
    margin: 0 1px;
    padding: 0 2px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    max-width: 100%;
    background: transparent;
    border: none;
}

.msg-inline-link span {
    max-width: 520px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.msg-inline-url {
    color: #2563eb;
}

.msg-inline-url:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.msg-inline-tg-url, .msg-inline-tg {
    color: #0284c7;
}

.msg-inline-tg-url:hover, .msg-inline-tg:hover {
    color: #0369a1;
    text-decoration: underline;
}

.link-out-icon, .tg-mini-icon {
    flex-shrink: 0;
}

/* ==================== 全局顶部微型进度条 (Top Slim Progress Bar) ==================== */
.top-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    z-index: 99999;
    background: linear-gradient(90deg, #2563eb 0%, #38bdf8 50%, #60a5fa 100%);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.7), 0 0 5px rgba(56, 189, 248, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: width 0.24s cubic-bezier(0.1, 0.9, 0.2, 1), opacity 0.28s ease;
}

.top-progress-bar.is-active::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progressShimmer 1.5s infinite;
}

/* ==================== 现代 Toast 消息通知容器与样式 ==================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    pointer-events: none;
    max-width: min(400px, calc(100vw - 32px));
}

.toast {
    position: relative;
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px 14px;
    background: rgba(15, 23, 42, 0.95);
    color: #f8fafc;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(12px);
    font-size: 13px;
    line-height: 1.45;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px) scale(0.96);
    transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1), transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.toast.hide {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
    pointer-events: none;
}

.toast-icon-wrap {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    margin-top: 1px;
}

.toast-icon-wrap svg {
    width: 18px;
    height: 18px;
}

.toast-success .toast-icon-wrap { color: #34d399; }
.toast-error .toast-icon-wrap { color: #f87171; }
.toast-warning .toast-icon-wrap { color: #fbbf24; }
.toast-info .toast-icon-wrap { color: #60a5fa; }

.toast-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.toast-title {
    font-weight: 700;
    font-size: 13px;
    color: #ffffff;
    letter-spacing: 0.01em;
}

.toast-message {
    font-size: 12px;
    color: #cbd5e1;
    word-break: break-word;
}

.toast-action-btn {
    margin-top: 6px;
    align-self: flex-start;
    padding: 3px 10px;
    font-size: 11.5px;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.toast-action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.toast-close-btn {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    background: transparent;
    border: none;
    color: #94a3b8;
    border-radius: 4px;
    padding: 0;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.toast-close-btn svg {
    width: 14px;
    height: 14px;
}

.toast-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.toast-progress-track {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
}

.toast-progress-bar {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    animation: toastCountdown linear forwards;
    transform-origin: left;
}

.toast-success .toast-progress-bar { background: #10b981; }
.toast-error .toast-progress-bar { background: #ef4444; }
.toast-warning .toast-progress-bar { background: #f59e0b; }
.toast-info .toast-progress-bar { background: #3b82f6; }

/* ==================== 动画与交互过渡状态 ==================== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes toastCountdown {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes rowFadeInUp {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-row-item {
    animation: rowFadeInUp 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--item-index, 0) * 0.02s);
}

.message-card {
    animation: rowFadeInUp 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--item-index, 0) * 0.02s);
}

/* 列表局部刷新半透明过渡态 */
.product-row-list.is-loading-overlay,
.message-list.is-loading-overlay {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* 单品刷新高亮与旋转 */
.product-row-item.is-refreshing {
    border-color: #93c5fd !important;
    background: #f0f7ff !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15) !important;
}

.product-row-item.is-refreshing .meta-time-refresh {
    color: var(--blue) !important;
}

.product-row-item.is-refreshing .meta-time-refresh svg {
    animation: spin 0.8s linear infinite !important;
}

.is-spinning {
    animation: spin 0.8s linear infinite !important;
}

/* 按钮 Loading 繁忙状态 */
.button.is-busy {
    opacity: 0.75;
    cursor: wait !important;
    pointer-events: none;
}

.button.is-busy svg {
    animation: spin 0.8s linear infinite !important;
}

/* 错误与空面板重试按钮 */
.empty-panel .retry-button {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.empty-panel .retry-button svg {
    width: 14px;
    height: 14px;
}

/* 复制小图标微交互 */
.copy-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    font-size: 11px;
    color: var(--muted);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.copy-action-btn:hover {
    color: var(--blue);
    border-color: #bfdbfe;
    background: #eff6ff;
}

.copy-action-btn svg {
    width: 12px;
    height: 12px;
}

.site-footer {
    margin-top: auto;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--faint);
    font-size: 11px;
}

.footer-content p {
    margin: 0;
}

@media (max-width: 960px) {
    .header-content {
        min-height: 56px;
        gap: 12px;
        flex-wrap: wrap;
        padding-top: 8px;
    }

    .site-nav {
        order: 3;
        width: 100%;
        height: auto;
        padding: 3px;
        display: flex;
        box-sizing: border-box;
    }

    .nav-link {
        flex: 1;
        justify-content: center;
    }

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

    .store-hero-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .store-hero-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .catalog-form {
        flex-wrap: wrap;
    }

    .catalog-form select {
        flex: 1 1 140px;
        max-width: none;
    }

    .group-account-filter {
        flex: 1 1 156px;
        max-width: none;
    }

    .price-range {
        flex: 1 1 206px;
    }

    .search-field {
        flex-basis: 100%;
    }

    .product-row-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px 16px;
    }

    .row-right-section {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding-top: 8px;
        border-top: 1px solid #f1f5f9;
    }

    .row-pricing-panel {
        margin-left: auto;
    }

    .mobile-only-badge {
        display: inline-flex !important;
    }

    .row-product-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .row-title-link {
        display: inline;
        white-space: normal;
        word-break: break-all;
    }

    .row-title-link span {
        white-space: normal;
    }

    .pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .pagination-summary {
        min-width: 0;
    }

    .pagination-controls {
        justify-content: space-between;
    }
}

@media (max-width: 680px) {
    .shell {
        width: min(100% - 24px, 1320px);
    }

    .main-content {
        padding-top: 20px;
    }

    .header-content {
        min-height: 50px;
        gap: 8px;
        padding-top: 6px;
    }

    .brand-title {
        font-size: 13px;
    }

    .site-nav {
        order: 3;
        width: 100%;
        height: auto;
    }

    .nav-link {
        padding: 0 10px;
        font-size: 12.5px;
    }

    .header-actions-group {
        gap: 6px;
    }

    .header-actions-group .sync-status-badge {
        height: 30px;
        padding: 0 8px;
        font-size: 11px;
    }

    .header-actions-group .sync-label {
        display: none;
    }

    .header-actions-group .header-btn {
        height: 30px;
        padding: 0 10px;
        font-size: 11.5px;
    }

    .refresh-progress {
        padding: 14px;
    }

    .refresh-progress-item {
        grid-template-columns: minmax(0, 1fr);
        gap: 3px;
    }

    .refresh-progress-state {
        text-align: left;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 20px;
    }

    .page-heading h1 {
        font-size: 24px;
    }

    .results-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .result-tools {
        width: 100%;
    }

    .segmented-control {
        display: flex;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        box-sizing: border-box;
    }

    .segmented-control::-webkit-scrollbar {
        display: none;
    }

    .segmented-control a {
        flex: 0 0 auto;
        text-align: center;
    }

    .results-header .segmented-control {
        width: 100% !important;
        display: flex !important;
        overflow-x: auto !important;
    }

    .results-header .segmented-control a {
        flex: 0 0 auto !important;
        text-align: center !important;
        padding: 4px 10px !important;
        font-size: 11px !important;
    }

    .pagination {
        padding: 10px 12px !important;
        gap: 8px !important;
    }

    .pagination-summary {
        text-align: center !important;
        width: 100% !important;
        margin-bottom: 4px !important;
        min-width: 0 !important;
    }

    .pagination-controls {
        width: 100% !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .pagination .segmented-control {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        justify-content: flex-start !important;
        width: 100% !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .pagination .segmented-control::-webkit-scrollbar {
        display: none !important;
    }

    .pagination .segmented-control a,
    .pagination-ellipsis {
        flex: 0 0 auto !important;
        min-width: 28px !important;
        height: 26px !important;
        padding: 0 6px !important;
        font-size: 11px !important;
    }

    .pagination-size-form {
        width: 100% !important;
        justify-content: center !important;
        margin-top: 4px !important;
    }

    /* Catalog Search and Filter Form Mobile Optimizations */
    .catalog-form {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .search-field {
        flex: 1 1 100% !important;
        min-width: 0 !important;
    }

    .catalog-form select {
        flex: 1 1 100% !important;
        max-width: none !important;
        width: 100%;
    }

    .group-account-filter {
        flex: 1 1 100% !important;
        max-width: none !important;
        width: 100%;
    }

    .price-range {
        flex: 1 1 100% !important;
        width: 100%;
    }

    .catalog-form .button-dark {
        flex: 1 1 0%;
        width: 100%;
    }

    .catalog-form .button-reset {
        flex: 1 1 0%;
        width: 100%;
        margin-left: 0;
    }

    /* Store Hero actions stack vertically */
    .store-hero-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 8px;
    }

    .store-hero-actions .button,
    .store-hero-actions .store-ext-btn {
        width: 100%;
        justify-content: center;
    }

    .metric-grid {
        gap: 8px;
    }

    .metric {
        min-height: 90px;
        padding: 12px;
    }

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

    .product-row-item {
        padding: 12px 14px;
        gap: 10px;
    }

    .row-top-meta {
        gap: 5px;
    }

    .row-top-meta .meta-create-time-badge {
        display: none !important;
    }

    .row-pricing-panel {
        flex-direction: row !important;
        align-items: baseline !important;
        gap: 12px !important;
        min-width: 0 !important;
        display: inline-flex !important;
    }

    .pricing-list-row {
        align-items: baseline !important;
        justify-content: flex-start !important;
    }

    .footer-content {
        flex-direction: column;
    }
}

@media (max-width: 440px) {
    .header-actions-group .sync-status-badge {
        display: none;
    }
}

@media (max-width: 500px) {
    .metric-grid {
        grid-template-columns: 1fr;
    }
    .skeleton-metric-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==================== 骨架屏加载动效 (Skeleton Loader & Shimmer Animation) ==================== */
.skeleton-shimmer {
    position: relative;
    overflow: hidden;
    background-color: var(--surface-soft) !important;
}

.skeleton-shimmer::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 20%,
        rgba(255, 255, 255, 0.7) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: skeleton-shimmer-anim 1.6s infinite;
}

@keyframes skeleton-shimmer-anim {
    100% {
        transform: translateX(100%);
    }
}

.skeleton-container {
    opacity: 0.85;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    width: 100%;
}

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

.skeleton-metric-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 20px;
    height: 94px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow);
}

.skeleton-control-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}

.skeleton-row-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.skeleton-row-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.skeleton-row-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

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

.skeleton-row-right {
    flex-shrink: 0;
    width: 140px;
    height: 52px;
    background: var(--surface-soft);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    padding: 8px 12px;
    gap: 6px;
}

.skeleton-msg-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.03), 0 2px 6px rgba(16, 24, 40, 0.02);
}

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

.skeleton-msg-author {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border-top: 1px solid #f3f4f6;
}

.skeleton-msg-content {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-text {
    display: inline-block;
    height: 12px;
    background-color: var(--line-strong);
    border-radius: 4px;
    vertical-align: middle;
}

@media (max-width: 960px) {
    .skeleton-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .skeleton-row-card {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .skeleton-row-right {
        width: 100%;
        align-items: flex-start;
    }
}
