:root {
    --bg: #f7f6f2;
    --bg-soft: #eef5fb;
    --bg-warm: #fbf4eb;
    --panel: rgba(255, 255, 255, 0.84);
    --panel-strong: rgba(255, 255, 255, 0.94);
    --panel-solid: rgba(255, 255, 255, 0.98);
    --ink: #25333d;
    --muted: #74818b;
    --line: rgba(76, 103, 122, 0.12);
    --brand: #a67f59;
    --brand-deep: #876548;
    --brand-soft: rgba(166, 127, 89, 0.10);
    --sky: #cfe5f3;
    --sky-deep: #8ab5cc;
    --good: #5f8a77;
    --bad: #d07b6e;
    --warning: #b59872;
    --shadow: 0 24px 52px rgba(57, 78, 95, 0.08);
    --shadow-soft: 0 14px 32px rgba(57, 78, 95, 0.05);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

body {
    margin: 0;
    font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(207, 229, 243, 0.56), transparent 25%),
        radial-gradient(circle at right top, rgba(251, 244, 235, 0.92), transparent 28%),
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.78), transparent 22%),
        linear-gradient(180deg, #fdfdfb 0%, var(--bg) 46%, #edf3f7 100%);
}

a {
    color: inherit;
}

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 320px 1fr;
    position: relative;
}

.shell::before {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    width: 42vw;
    height: 48vh;
    pointer-events: none;
    background: radial-gradient(circle, rgba(207, 229, 243, 0.34), transparent 68%);
}

.shell::after {
    content: "";
    position: fixed;
    left: 0;
    bottom: 0;
    width: 36vw;
    height: 38vh;
    pointer-events: none;
    background: radial-gradient(circle, rgba(251, 244, 235, 0.48), transparent 72%);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 26px 20px;
    border-right: 1px solid rgba(76, 103, 122, 0.08);
    background: rgba(249, 250, 251, 0.72);
    backdrop-filter: blur(18px);
    z-index: 4;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
}

.brand {
    padding: 24px 22px 20px;
    border-radius: 28px;
    border: 1px solid rgba(76, 103, 122, 0.10);
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 253, 0.90)),
        linear-gradient(180deg, rgba(251, 244, 235, 0.88), rgba(255, 255, 255, 0.22));
    box-shadow: 0 20px 40px rgba(57, 78, 95, 0.08);
}

.brand small {
    display: block;
    margin-bottom: 10px;
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--muted);
}

.brand h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.08;
    letter-spacing: 0.01em;
}

.brand p {
    margin: 12px 0 0;
    font-size: 13px;
    line-height: 1.72;
    color: var(--muted);
}

.sidebar-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px solid rgba(76, 103, 122, 0.09);
    background: rgba(255, 255, 255, 0.62);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(180deg, #7bc2a2, #4ea07f);
    box-shadow: 0 0 0 6px rgba(95, 138, 119, 0.12);
}

.sidebar-status strong,
.sidebar-card strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.sidebar-status span,
.sidebar-card span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.62;
}

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

.nav a {
    display: block;
    padding: 16px 16px;
    text-decoration: none;
    border-radius: 18px;
    border: 1px solid rgba(76, 103, 122, 0.06);
    background: rgba(255, 255, 255, 0.48);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.nav a:hover,
.nav a.active {
    transform: translateY(-1px);
    border-color: rgba(166, 127, 89, 0.16);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 14px 30px rgba(57, 78, 95, 0.06);
}

.nav span {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--muted);
}

.sidebar-foot {
    margin-top: auto;
}

.sidebar-card {
    padding: 16px 16px;
    border-radius: 20px;
    border: 1px solid rgba(76, 103, 122, 0.08);
    background: rgba(255, 255, 255, 0.60);
}

.sidebar-card-label {
    margin: 0 0 6px;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.main {
    position: relative;
    padding: 30px;
    z-index: 20;
}

.main > * {
    animation: riseIn 0.45s ease both;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    position: relative;
    z-index: 5;
}

.topbar-note-group,
.topbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.topbar-note {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.70);
    border: 1px solid rgba(76, 103, 122, 0.08);
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.04em;
}

.topbar-note.soft {
    background: rgba(207, 229, 243, 0.34);
    color: #5c7c91;
}

.hero,
.panel,
.stat-card {
    border: 1px solid rgba(76, 103, 122, 0.10);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    z-index: 2;
    padding: 30px 32px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92)),
        linear-gradient(120deg, rgba(251, 244, 235, 0.46), rgba(207, 229, 243, 0.18));
}

.comparison-hero {
    overflow: hidden;
    z-index: 2;
}

.hero::before {
    content: "";
    position: absolute;
    left: -40px;
    bottom: -56px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 244, 235, 0.58), transparent 68%);
}

.hero::after {
    content: "";
    position: absolute;
    right: -54px;
    top: -70px;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(207, 229, 243, 0.48), transparent 70%);
}

.hero > * {
    position: relative;
    z-index: 2;
}

.stats,
.overview-ribbon,
.layout,
.section-stack,
.comparison-ribbon {
    position: relative;
    z-index: 1;
}

/* 筛选器展开时提升整个 hero/panel 的层级 */
.hero:focus-within,
.hero.select-open {
    overflow: visible;
    z-index: 100;
}

.hero-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 320px);
    gap: 18px;
    align-items: start;
    margin-bottom: 22px;
}

.hero-copy {
    max-width: 780px;
}

.hero-aside {
    align-self: stretch;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(76, 103, 122, 0.08);
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero h2,
.panel h3 {
    margin: 0 0 8px;
}

.hero h2 {
    margin-top: 14px;
    font-size: 34px;
    line-height: 1.06;
    letter-spacing: -0.02em;
}

.hero p,
.muted {
    color: var(--muted);
    line-height: 1.72;
}

.hero p {
    max-width: 760px;
    margin: 0;
}

.hero-chip-list {
    display: grid;
    gap: 10px;
}

.hero-chip {
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px solid rgba(76, 103, 122, 0.08);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-soft);
}

.hero-chip span {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--muted);
}

.hero-chip strong {
    display: block;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    word-break: break-word;
}

.panel {
    position: relative;
    padding: 24px;
    overflow: visible;
    z-index: 2;
}

.panel:focus-within,
.panel.select-open {
    z-index: 100;
}

.flash-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

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

.panel-head h3 {
    font-size: 21px;
    letter-spacing: -0.01em;
}

.filter-form,
.comparison-form {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    align-items: end;
    position: relative;
    z-index: 25;
}

.filter-group {
    position: relative;
    display: grid;
    gap: 6px;
    z-index: 30;
    min-width: 0;
}

.filter-group.wide {
    grid-column: span 2;
}

.filter-group label {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.06em;
}

.filter-group input,
.filter-group select,
.filter-group textarea {
    width: 100%;
    padding: 13px 14px;
    border-radius: 16px;
    border: 1px solid rgba(76, 103, 122, 0.10);
    background: rgba(255, 255, 255, 0.86);
    color: var(--ink);
    font: inherit;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.filter-group textarea {
    min-height: 160px;
    resize: vertical;
}

.filter-group input:focus,
.filter-group select:focus,
.filter-group textarea:focus,
.multi-select[open] .multi-select-trigger,
.custom-select.open .custom-select-trigger {
    border-color: rgba(143, 176, 196, 0.48);
    box-shadow: 0 0 0 4px rgba(207, 229, 243, 0.32);
    background: rgba(255, 255, 255, 0.96);
}

.filter-actions,
.edit-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
}

.button,
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid transparent;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.button {
    color: #fff;
    background: linear-gradient(135deg, #b58a62, #9d7aa1, #89b9cf);
    box-shadow: 0 14px 28px rgba(104, 131, 152, 0.18);
}

.button:hover,
.page-link:hover {
    transform: translateY(-1px);
}

.button.small {
    min-height: 40px;
    padding: 0 13px;
    font-size: 13px;
}

.button.secondary,
.page-link {
    border-color: rgba(76, 103, 122, 0.10);
    color: var(--ink);
    background: rgba(255, 255, 255, 0.90);
    box-shadow: none;
}

.custom-select-native {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.custom-select {
    position: relative;
}

.custom-select.is-empty .custom-select-value {
    opacity: 0.22;
}

.custom-select.open {
    z-index: 1600;
}

.custom-select-trigger,
.multi-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 50px;
    width: 100%;
    padding: 13px 14px;
    border-radius: 16px;
    border: 1px solid rgba(76, 103, 122, 0.10);
    background: rgba(255, 255, 255, 0.86);
    color: var(--ink);
    cursor: pointer;
}

.custom-select-value,
.multi-select-value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-panel,
.multi-select-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1800;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid rgba(76, 103, 122, 0.10);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 22px 42px rgba(57, 78, 95, 0.10);
    backdrop-filter: blur(18px);
}

.custom-select-panel {
    display: none;
}

.custom-select.open .custom-select-panel {
    display: block;
}

.custom-select-search,
.multi-select-search {
    margin-bottom: 8px;
}

.custom-select-search-input,
.multi-select-search-input {
    width: 100%;
    padding: 11px 13px;
    border-radius: 14px;
    border: 1px solid rgba(76, 103, 122, 0.10);
    background: linear-gradient(180deg, rgba(247, 250, 252, 0.96), rgba(255, 255, 255, 0.96));
    color: var(--ink);
    font: inherit;
    outline: none;
}

.custom-select-options,
.multi-option-list {
    display: grid;
    gap: 8px;
    max-height: 300px;
    overflow: auto;
}

.custom-option,
.multi-option {
    border-radius: 16px;
    border: 1px solid transparent;
    background: linear-gradient(180deg, rgba(247, 250, 252, 0.90), rgba(255, 255, 255, 0.98));
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.custom-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 11px 12px;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.multi-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
}

.custom-option:hover,
.custom-option.selected,
.multi-option:hover {
    transform: translateY(-1px);
    border-color: rgba(143, 176, 196, 0.24);
    background: rgba(255, 255, 255, 1);
}

.custom-option.clear {
    color: var(--muted);
}

.custom-option-mark {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--brand);
}

.custom-select-empty {
    padding: 12px;
    border-radius: 16px;
    background: rgba(247, 250, 252, 0.82);
    color: var(--muted);
    font-size: 13px;
}

.multi-select {
    position: relative;
    z-index: 1400;
    isolation: isolate;
}

.multi-select[open] {
    z-index: 1700;
}

.notice-banner {
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(76, 103, 122, 0.10);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-soft);
}

.notice-banner.success {
    border-color: rgba(95, 138, 119, 0.22);
    background: rgba(95, 138, 119, 0.10);
    color: var(--good);
}

.notice-banner.error {
    border-color: rgba(208, 123, 110, 0.22);
    background: rgba(208, 123, 110, 0.10);
    color: var(--bad);
}

.button.danger {
    background: rgba(208, 123, 110, 0.12);
    color: var(--bad);
    border-color: rgba(208, 123, 110, 0.18);
}

.button.danger:hover {
    background: rgba(208, 123, 110, 0.18);
    border-color: rgba(208, 123, 110, 0.28);
}

.brand-merge-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    margin-bottom: 18px;
    z-index: 30;
    position: relative;
}

.candidate-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.candidate-card {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(76, 103, 122, 0.08);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-soft);
}

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

.candidate-card-head strong {
    display: block;
    margin-top: 4px;
    font-size: 18px;
}

.candidate-items {
    display: grid;
    gap: 10px;
}

.candidate-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(247, 250, 252, 0.88);
}

.candidate-item span {
    font-weight: 600;
    word-break: break-word;
}

.candidate-item small {
    color: var(--muted);
    white-space: nowrap;
}

.latest-health-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.health-card {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(76, 103, 122, 0.08);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-soft);
}

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

.health-card-head strong {
    display: block;
    margin-top: 4px;
    font-size: 18px;
}

.health-meta,
.health-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.health-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    margin: 14px 0;
}

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

.health-details strong {
    display: block;
    font-size: 14px;
    word-break: break-word;
}

.health-missing {
    margin-bottom: 14px;
}

.health-missing > span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
}

.health-missing.ok {
    color: var(--good);
}

.multi-select summary {
    list-style: none;
}

.multi-select summary::-webkit-details-marker {
    display: none;
}

.multi-select-label {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.custom-select-arrow,
.multi-select-arrow {
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 0.18s ease;
}

.multi-select[open] .multi-select-arrow {
    transform: rotate(-135deg) translateY(-1px);
}

.multi-option input {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: var(--brand);
}

.multi-option-body {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.multi-option-body strong,
.multi-option-body small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multi-option-body small {
    color: var(--muted);
}

.stats {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.overview-ribbon,
.comparison-ribbon {
    margin-top: 24px;
    display: grid;
    gap: 14px;
}

.overview-ribbon {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.comparison-ribbon {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-card {
    position: relative;
    overflow: hidden;
    min-height: 160px;
    padding: 20px 20px 18px;
    border-radius: 24px;
    border: 1px solid rgba(76, 103, 122, 0.09);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 252, 0.88)),
        linear-gradient(120deg, rgba(251, 244, 235, 0.30), rgba(207, 229, 243, 0.12));
    box-shadow: var(--shadow-soft);
}

.summary-card::after {
    content: "";
    position: absolute;
    right: -26px;
    bottom: -34px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(207, 229, 243, 0.28), transparent 70%);
}

.summary-card-primary {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 252, 0.92)),
        linear-gradient(135deg, rgba(207, 229, 243, 0.42), rgba(251, 244, 235, 0.34));
}

.summary-label {
    position: relative;
    display: block;
    margin-bottom: 12px;
    font-size: 12px;
    letter-spacing: 0.10em;
    color: var(--muted);
    text-transform: uppercase;
}

.summary-value {
    position: relative;
    display: block;
    font-size: 26px;
    line-height: 1.12;
    letter-spacing: -0.03em;
    word-break: break-word;
}

.summary-card p {
    position: relative;
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.72;
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 24px 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 252, 0.90)),
        linear-gradient(120deg, rgba(251, 244, 235, 0.36), rgba(207, 229, 243, 0.16));
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -18px;
    bottom: -28px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(207, 229, 243, 0.34), transparent 68%);
}

.stat-card .label {
    position: relative;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 13px;
}

.stat-card .value {
    position: relative;
    font-size: 38px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
}

.stat-card .foot {
    position: relative;
    margin-top: 12px;
    font-size: 13px;
    color: var(--muted);
}

.layout {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 1.32fr 1fr;
    gap: 18px;
}

.section-stack {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.section-gap {
    margin-top: 24px;
}

.card-list,
.product-list,
.compare-list,
.job-list,
.insight-list,
.compare-note,
.note-list,
.helper-list {
    display: grid;
    gap: 12px;
}

.product-item,
.compare-item,
.job-item,
.insight-item,
.comment-card,
.note-card,
.empty-state,
.spotlight-card,
.helper-card {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(76, 103, 122, 0.09);
    background: var(--panel-strong);
    box-shadow: var(--shadow-soft);
}

.product-item,
.compare-item,
.spotlight-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.product-item:hover,
.compare-item:hover,
.spotlight-card:hover {
    transform: translateY(-2px);
    border-color: rgba(143, 176, 196, 0.22);
    box-shadow: 0 18px 32px rgba(57, 78, 95, 0.08);
}

.product-item h4,
.compare-item h4,
.insight-item h4,
.comment-card h4,
.spotlight-card h4 {
    margin: 0 0 6px;
    font-size: 17px;
    letter-spacing: -0.01em;
}

.product-list-enhanced .product-item {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.product-item-main {
    min-width: 0;
}

.compare-item-head,
.spotlight-card-head,
.comment-card-head,
.feature-comment-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.compare-item-side {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.compare-rank {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: rgba(207, 229, 243, 0.36);
    color: #5c7c91;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rank-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: rgba(251, 244, 235, 0.74);
    color: var(--brand-deep);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag,
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    font-size: 12px;
    white-space: nowrap;
}

.tag {
    padding: 7px 11px;
    background: rgba(166, 127, 89, 0.08);
    color: var(--brand);
}

.tag.good {
    background: rgba(95, 138, 119, 0.12);
    color: var(--good);
}

.tag.bad {
    background: rgba(208, 123, 110, 0.12);
    color: var(--bad);
}

.tag.warn {
    background: rgba(181, 152, 114, 0.14);
    color: var(--warning);
}

.pill {
    padding: 8px 13px;
    background: rgba(207, 229, 243, 0.34);
    color: #5c7c91;
}

.spotlight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.spotlight-metrics,
.compare-metrics,
.editor-meta-grid {
    display: grid;
    gap: 10px;
}

.spotlight-metrics,
.compare-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 16px;
}

.spotlight-stat,
.metric-tile,
.editor-meta-card {
    padding: 14px 14px;
    border-radius: 18px;
    border: 1px solid rgba(76, 103, 122, 0.08);
    background: rgba(255, 255, 255, 0.84);
}

.spotlight-stat span,
.metric-label,
.editor-meta-card span {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--muted);
}

.spotlight-stat strong,
.metric-value,
.editor-meta-card strong {
    display: block;
    font-size: 20px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    word-break: break-word;
}

.compare-metrics {
    margin-bottom: 14px;
}

.compare-callout {
    margin: 14px 0;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(76, 103, 122, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.90), rgba(247, 250, 252, 0.86));
}

.compare-callout span {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--muted);
}

.compare-callout strong {
    display: block;
    font-size: 18px;
    line-height: 1.28;
}

.sku-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sku-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    padding: 9px 12px;
    border-radius: 16px;
    border: 1px solid rgba(76, 103, 122, 0.08);
    background: rgba(255, 255, 255, 0.94);
}

.sku-name {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ink);
}

.sku-price {
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(166, 127, 89, 0.10);
    color: var(--brand);
    font-size: 12px;
    font-weight: 600;
}

.score {
    min-width: 92px;
    text-align: right;
    font-size: 28px;
    font-weight: 700;
    color: var(--brand);
}

.chart-strip,
.bar {
    display: grid;
    gap: 10px;
}

.bar-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}

.track,
.stack {
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(76, 103, 122, 0.08);
}

.fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #a67f59, #d8b898);
}

.fill.bad {
    background: linear-gradient(90deg, #d07b6e, #ebb7ad);
}

.fill.warn {
    background: linear-gradient(90deg, #b59872, #e1cfb5);
}

.stack {
    display: flex;
    margin-top: 12px;
}

.stack .positive {
    background: linear-gradient(90deg, #5f8a77, #b8d2c4);
}

.stack .neutral {
    background: linear-gradient(90deg, #b59872, #e1cfb5);
}

.stack .negative {
    background: linear-gradient(90deg, #d07b6e, #ebb7ad);
}

.comment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 12px;
}

.feature-comment {
    padding: 22px;
    border-radius: 24px;
    border: 1px solid rgba(76, 103, 122, 0.08);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
}

.feature-comment.negative {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(252, 245, 244, 0.92)),
        linear-gradient(120deg, rgba(208, 123, 110, 0.10), rgba(255, 255, 255, 0.10));
}

.feature-comment.positive {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 247, 0.92)),
        linear-gradient(120deg, rgba(95, 138, 119, 0.10), rgba(255, 255, 255, 0.10));
}

.feature-comment.neutral {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 248, 244, 0.92)),
        linear-gradient(120deg, rgba(181, 152, 114, 0.10), rgba(255, 255, 255, 0.10));
}

.feature-comment-tone,
.comment-card-side {
    display: grid;
    gap: 6px;
    justify-items: end;
}

.feature-comment-tone span,
.feature-comment-tone small {
    color: var(--muted);
    font-size: 12px;
}

.feature-comment-tone strong {
    font-size: 24px;
    line-height: 1;
    text-transform: capitalize;
}

.comment-card-rich,
.insight-item-rich {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 252, 0.90)),
        linear-gradient(120deg, rgba(251, 244, 235, 0.18), rgba(207, 229, 243, 0.10));
}

.comment-box {
    min-height: 118px;
    padding: 15px;
    border-radius: 18px;
    border: 1px solid rgba(76, 103, 122, 0.08);
    background: rgba(255, 255, 255, 0.92);
    line-height: 1.68;
}

.comment-box strong {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--muted);
}

.table-wrap {
    overflow: auto;
    border-radius: 22px;
    border: 1px solid rgba(76, 103, 122, 0.08);
    background: rgba(255, 255, 255, 0.70);
    position: relative;
    z-index: 1;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.76);
    table-layout: auto;
}

th,
td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(76, 103, 122, 0.08);
    font-size: 13px;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: break-word;
}

td:first-child,
th:first-child {
    max-width: 200px;
}

/* 评论内容列限制宽度 */
td:nth-child(5),
td:nth-child(6) {
    max-width: 220px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

th {
    position: sticky;
    top: 0;
    background: rgba(244, 248, 251, 0.96);
    color: var(--muted);
    font-weight: 600;
    backdrop-filter: blur(10px);
}

tbody tr {
    transition: background 0.18s ease;
}

tbody tr:hover {
    background: rgba(244, 248, 251, 0.76);
}

.pagination {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.two-col,
.three-col,
.form-grid {
    display: grid;
    gap: 18px;
}

.edit-form {
    display: grid;
    gap: 18px;
}

.two-col {
    grid-template-columns: 1fr 1fr;
}

.three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

.form-section {
    margin-top: 4px;
}

.section-title {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(207, 229, 243, 0.34);
    color: #5c7c91;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-title-compact {
    margin: 18px 0 12px;
}

.field-help,
.footer-note,
.login-meta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.footer-note {
    margin-top: 18px;
}

.action-cell {
    white-space: nowrap;
    min-width: 200px;
}

.sku-table-cell {
    display: grid;
    gap: 8px;
    min-width: 200px;
}

.sku-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 11px;
    border-radius: 14px;
    border: 1px solid rgba(76, 103, 122, 0.08);
    background: rgba(255, 255, 255, 0.92);
}

.sku-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sku-row strong {
    flex-shrink: 0;
    color: var(--brand-deep);
}

.editor-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 14px;
}

.editor-layout {
    align-items: start;
}

.editor-side-panel {
    position: sticky;
    top: 24px;
}

.action-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    min-width: 210px;
}

.action-cell form {
    margin: 0;
    flex-shrink: 0;
}

.action-cell .button.small {
    padding: 0 10px;
    min-height: 34px;
    font-size: 12px;
    border-radius: 12px;
}

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

.task-card {
    padding: 20px;
    border-radius: 24px;
    border: 1px solid rgba(76, 103, 122, 0.08);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-soft);
}

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

.task-block {
    padding: 14px 0;
    border-top: 1px solid rgba(76, 103, 122, 0.08);
}

.task-block:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.task-block-title {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.04em;
}

.task-meta-line,
.task-counters,
.task-error-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.task-message {
    color: var(--muted);
    line-height: 1.7;
    font-size: 13px;
}

.helper-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

.helper-card span {
    color: var(--muted);
    line-height: 1.72;
}

.insight-item p,
.comment-card p {
    margin: 12px 0 0;
    line-height: 1.72;
}

.empty-state {
    color: var(--muted);
    line-height: 1.76;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(460px, 100%);
    padding: 34px;
    border-radius: 30px;
    border: 1px solid rgba(76, 103, 122, 0.10);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.login-card h1 {
    margin: 0 0 10px;
    font-size: 32px;
}

.login-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.74;
}

.login-form {
    margin-top: 22px;
    display: grid;
    gap: 14px;
}

.alert {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(208, 123, 110, 0.18);
    background: rgba(208, 123, 110, 0.08);
    color: var(--bad);
    font-size: 14px;
}

.alert-success {
    margin-bottom: 14px;
    border-color: rgba(95, 138, 119, 0.18);
    background: rgba(95, 138, 119, 0.08);
    color: var(--good);
}

@media (max-width: 1400px) {
    .hero-shell {
        grid-template-columns: minmax(0, 1fr);
    }

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

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

@media (max-width: 1280px) {
    .filter-form,
    .comparison-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .filter-group.wide {
        grid-column: span 3;
    }

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

    .latest-health-grid {
        grid-template-columns: 1fr;
    }

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

    .stats,
    .three-col,
    .spotlight-grid,
    .comparison-ribbon {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(76, 103, 122, 0.08);
    }

    .layout,
    .two-col,
    .comment-grid,
    .stats,
    .three-col,
    .overview-ribbon,
    .comparison-ribbon,
    .filter-form,
    .comparison-form,
    .form-grid,
    .spotlight-grid,
    .spotlight-metrics,
    .compare-metrics,
    .editor-meta-grid {
        grid-template-columns: 1fr;
    }

    .filter-group.wide,
    .field-span-2 {
        grid-column: span 1;
    }

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

    .health-details {
        grid-template-columns: 1fr;
    }

    .compare-item-head,
    .spotlight-card-head,
    .comment-card-head,
    .feature-comment-head,
    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .compare-item-side {
        justify-content: flex-start;
    }

    .feature-comment-tone,
    .comment-card-side {
        justify-items: start;
    }

    .editor-side-panel {
        position: static;
    }
}

/* ─── Trigger Page ─────────────────────────────────────────────────────────── */

.trigger-form-wrap {
    display: grid;
    gap: 18px;
}

.trigger-form-wrap input[type="text"] {
    font-size: 15px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(76, 103, 122, 0.14);
    background: rgba(255, 255, 255, 0.92);
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.trigger-form-wrap input[type="text"]:focus {
    outline: none;
    border-color: var(--brand-deep);
    box-shadow: 0 0 0 3px rgba(76, 103, 122, 0.08);
}

.trigger-form-wrap input[type="text"]::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

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

.trigger-actions .button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.trigger-result {
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.6;
    animation: fadeIn 0.2s ease;
}

.trigger-result-success {
    border: 1px solid rgba(95, 138, 119, 0.2);
    background: rgba(95, 138, 119, 0.08);
    color: var(--good);
}

.trigger-result-error {
    border: 1px solid rgba(208, 123, 110, 0.2);
    background: rgba(208, 123, 110, 0.08);
    color: var(--bad);
}

.trigger-result-info {
    border: 1px solid rgba(76, 103, 122, 0.14);
    background: rgba(76, 103, 122, 0.05);
    color: var(--ink);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Live Progress Card ───────────────────────────────────────────────────── */

.live-card {
    padding: 20px 22px;
    border-radius: 20px;
    border: 1px solid rgba(76, 103, 122, 0.10);
    background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(248,250,252,0.90));
    animation: fadeIn 0.3s ease;
}

.live-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.live-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.live-card-title strong {
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-progress-pct {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.live-progress-bar {
    margin-bottom: 12px;
}

.live-progress-track {
    height: 8px;
    border-radius: 8px;
    background: rgba(76, 103, 122, 0.08);
    overflow: hidden;
}

.live-progress-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.live-progress-animated {
    position: relative;
    overflow: hidden;
}

.live-progress-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: shimmer 1.8s infinite;
}

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

.live-progress-done {
    background: var(--good) !important;
}

.live-message {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 10px;
    min-height: 18px;
}

.live-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid rgba(76, 103, 122, 0.06);
}

.live-stat {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

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

.live-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--brand-deep);
    letter-spacing: -0.01em;
}

.live-stat-unit {
    font-size: 12px;
    color: var(--muted);
}

/* ─── Task Timeline ────────────────────────────────────────────────────────── */

.task-timeline {
    display: grid;
    gap: 0;
}

.timeline-item {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(76, 103, 122, 0.06);
    animation: fadeIn 0.25s ease;
}

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

.timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 5px;
    background: var(--muted);
    position: relative;
}

.timeline-dot::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 4px;
    width: 2px;
    height: calc(100% + 14px);
    background: rgba(76, 103, 122, 0.08);
}

.timeline-item:last-child .timeline-dot::before {
    display: none;
}

.timeline-running .timeline-dot {
    background: var(--brand-deep);
    box-shadow: 0 0 0 4px rgba(76, 103, 122, 0.12);
    animation: pulse 2s infinite;
}

.timeline-completed .timeline-dot {
    background: var(--good);
}

.timeline-failed .timeline-dot {
    background: var(--bad);
}

.timeline-pending .timeline-dot {
    background: var(--muted);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(76, 103, 122, 0.1); }
    50% { box-shadow: 0 0 0 6px rgba(76, 103, 122, 0.06); }
}

.timeline-body {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.timeline-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.timeline-title {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.timeline-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--muted);
    flex-wrap: wrap;
}

.timeline-message {
    font-size: 12px;
    color: var(--ink);
    opacity: 0.7;
}

.timeline-error {
    font-size: 12px;
    color: var(--bad);
}

/* ─── Task Status Tags ─────────────────────────────────────────────────────── */

.task-status-tag {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 600;
    flex-shrink: 0;
}

.task-status-pending {
    background: rgba(76, 103, 122, 0.08);
    color: var(--muted);
}

.task-status-running {
    background: rgba(76, 103, 122, 0.12);
    color: var(--brand-deep);
}

.task-status-completed {
    background: rgba(95, 138, 119, 0.12);
    color: var(--good);
}

.task-status-failed {
    background: rgba(208, 123, 110, 0.12);
    color: var(--bad);
}

/* ─── Progress Track (timeline) ────────────────────────────────────────────── */

.progress-track {
    height: 4px;
    border-radius: 4px;
    background: rgba(76, 103, 122, 0.06);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--brand-deep);
    transition: width 0.5s ease;
}

.progress-fill-animated {
    position: relative;
}

.progress-fill-animated::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.8s infinite;
}

.progress-fill-done {
    background: var(--good);
}

/* ─── Helper Cards ─────────────────────────────────────────────────────────── */

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

.helper-card {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(76, 103, 122, 0.06);
    background: rgba(255, 255, 255, 0.7);
    display: grid;
    gap: 4px;
}

.helper-card strong {
    font-size: 13px;
}

.helper-card span {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}

.field-help {
    font-size: 12px;
    color: var(--muted);
}
