:root {
    color-scheme: light;
    --primary: #33287b;
    --azure: #6cbae9;
    --accent: #33287b;
    --ink: #163262;
    --muted: #657289;
    --bg: #f0f2f5;
    --surface: #fff;
    --line: #dfe5ee;
    --table-head: #f7f9fc;
    --table-line: #edf0f5;
    --badge-bg: #ebedf9;
    --notice-bg: #eaf0fb;
    --notice-line: #c9d9ee;
    --error-bg: #fff0ed;
    --error-line: #f0d3cd;
    --error-ink: #a03e2d;
    --success-bg: #eaf5f1;
    --success-ink: #23664c;
    --warning-bg: #fff5df;
    --warning-ink: #805b12;
    --shadow: #16326204;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --accent: #6cbae9;
    --ink: #e0e8f5;
    --muted: #a2b1c9;
    --bg: #101722;
    --surface: #1a2433;
    --line: #33425a;
    --table-head: #202d40;
    --table-line: #2e3c51;
    --badge-bg: #273b54;
    --notice-bg: #20354d;
    --notice-line: #3c5c80;
    --error-bg: #3b2529;
    --error-line: #79434b;
    --error-ink: #ffb5a8;
    --success-bg: #203b36;
    --success-ink: #96d9ba;
    --warning-bg: #3b3423;
    --warning-ink: #f0cf83;
    --shadow: #00000026;
}
* { box-sizing: border-box; }
[v-cloak] { display: none; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.6 "Source Han Sans SC", "Noto Sans CJK SC", "PingFang SC", "Microsoft Yahei", sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--azure); outline-offset: 3px; }
button:disabled { opacity: .6; cursor: wait; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 32px; line-height: 1.3; letter-spacing: -.03em; }
h2 { font-size: 19px; line-height: 1.4; }
h3 { font-size: 15px; line-height: 1.6; }
small { font-size: 12px; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.mono, .material-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1200px; padding: 20px 32px; margin: auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 24px; color: var(--ink); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 142px; height: auto; display: block; }
:root[data-theme="dark"] .brand-logo { filter: brightness(0) invert(1); }
.brand-divider { height: 28px; width: 1px; background: var(--line); }
.brand-product { font-weight: 600; font-size: 16px; white-space: nowrap; }
.theme-switcher { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); flex-shrink: 0; }
.theme-switcher button { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--muted); }
.theme-switcher button:hover { background: var(--table-head); color: var(--ink); }
.theme-switcher button[aria-pressed="true"] { color: var(--accent); background: var(--badge-bg); }
.theme-switcher svg { width: 18px; height: 18px; }
.main-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 40px 32px 56px; flex: 1; }
.site-footer { width: 100%; max-width: 1136px; margin: auto; padding: 20px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.site-footer span:last-child { letter-spacing: .12em; }
.card { min-width: 0; padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 4px 20px var(--shadow); }
.eyebrow { display: block; margin-bottom: 10px; color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: .14em; }
.section-kicker { display: block; color: var(--muted); font-size: 11px; letter-spacing: .08em; margin-bottom: 6px; }
.button { min-height: 42px; border: 1px solid transparent; border-radius: 8px; padding: 10px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; line-height: 1.4; text-decoration: none; }
.button:hover { text-decoration: none; }
.button-primary { background: var(--primary); color: #fff; }
.button-primary:hover:not(:disabled) { background: #40338e; }
.button-secondary { color: var(--ink); background: var(--surface); border-color: var(--line); }
.button-secondary:hover:not(:disabled) { background: var(--table-head); }
.notice { padding: 14px 18px; border: 1px solid var(--notice-line); border-radius: 10px; background: var(--notice-bg); overflow-wrap: anywhere; }
.notice-error { color: var(--error-ink); border-color: var(--error-line); background: var(--error-bg); }
.login-layout { min-height: 65vh; display: grid; grid-template-columns: 1fr 420px; gap: 80px; align-items: center; max-width: 980px; margin: 36px auto; }
.login-intro h1 { font-size: 44px; line-height: 1.4; margin: 22px 0; }
.login-intro > p { color: var(--muted); font-size: 17px; line-height: 1.9; }
.feature-list { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; color: var(--muted); font-size: 12px; }
.feature-list span { border-left: 2px solid var(--azure); padding-left: 10px; }
.login-card { padding: 36px; border-top: 3px solid var(--primary); }
.login-card h2 { font-size: 24px; margin: 8px 0; }
.login-button { width: 100%; margin-top: 32px; min-height: 48px; justify-content: space-between; }
.login-button:disabled { justify-content: center; }
.login-card .notice { margin-top: 20px; }
.login-note { color: var(--muted); font-size: 12px; text-align: center; margin-top: 18px; }
.identity-summary { background: var(--table-head); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; margin-top: 20px; }
.identity-summary span { color: var(--muted); }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; }
.page-heading h1 { margin-bottom: 8px; }
.account-actions { display: flex; align-items: center; gap: 20px; }
.account-info { display: flex; flex-direction: column; text-align: right; }
.account-info span { color: var(--muted); font-size: 12px; }
.search-card { margin-bottom: 24px; }
.search-label { display: block; font-weight: 600; margin-bottom: 10px; }
.search-controls { display: flex; gap: 12px; }
.search-input-wrap { flex: 1; min-width: 0; position: relative; }
.search-input-wrap svg { position: absolute; width: 20px; height: 20px; top: 15px; left: 15px; color: var(--muted); pointer-events: none; }
.search-input-wrap input { width: 100%; height: 50px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); padding: 12px 16px 12px 46px; }
.search-input-wrap input::placeholder { color: var(--muted); opacity: 1; }
.search-button { min-width: 136px; }
.search-hint { display: block; font-size: 12px; margin-top: 10px; }
.dashboard > .notice { margin-bottom: 24px; }
.results { display: grid; gap: 24px; }
.material-overview { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; }
.material-heading { min-width: 0; }
.material-heading h2 { font-size: 26px; overflow-wrap: anywhere; margin-bottom: 10px; }
.material-code { color: var(--accent); background: var(--badge-bg); display: inline-block; padding: 3px 10px; border-radius: 5px; overflow-wrap: anywhere; }
.metric-group { display: flex; gap: 32px; flex-shrink: 0; }
.metric { display: flex; flex-direction: column; align-items: flex-end; }
.metric > span, .metric small { color: var(--muted); font-size: 12px; }
.metric strong { font-size: 30px; font-variant-numeric: tabular-nums; line-height: 1.5; }
.spec-block { padding: 20px 0; margin-top: 12px; border-bottom: 1px solid var(--line); }
.spec-block p { margin-top: 5px; overflow-wrap: anywhere; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; margin: 8px 0 0; }
.detail-grid > div, .price-details > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--table-line); min-width: 0; }
dt { color: var(--muted); flex-shrink: 0; }
dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.detail-grid dd { font-weight: 500; }
.result-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.result-nav a { padding: 8px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: 13px; }
.result-nav a:hover { color: var(--accent); background: var(--badge-bg); text-decoration: none; }
.result-nav span { margin-left: 8px; color: var(--muted); font-variant-numeric: tabular-nums; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.heading-note { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 8px; }
.section-status { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.count-label { color: var(--muted); font-size: 12px; white-space: nowrap; }
.badge { display: inline-block; padding: 3px 9px; font-size: 12px; line-height: 1.6; border-radius: 5px; color: var(--accent); background: var(--badge-bg); }
.badge-success { color: var(--success-ink); background: var(--success-bg); }
.badge-warning { color: var(--warning-ink); background: var(--warning-bg); }
.badge-error { color: var(--error-ink); background: var(--error-bg); }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 16px; }
.price-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--table-head); }
.latest-price-card { border-color: var(--accent); }
.latest-badge { margin-bottom: 12px; }
.price-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.price-heading h3 { overflow-wrap: anywhere; }
.price-value { text-align: right; flex-shrink: 0; }
.price-value strong { color: var(--accent); font-size: 24px; font-variant-numeric: tabular-nums; }
.price-value small { display: block; color: var(--muted); }
.price-details { margin: 16px 0 0; font-size: 12px; }
.price-details > div:last-child { border-bottom: 0; }
.section-empty { background: var(--table-head); border-radius: 8px; color: var(--muted); text-align: center; padding: 24px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--table-line); }
thead { background: var(--table-head); color: var(--muted); }
th { font-weight: 500; }
tbody tr:hover { background: var(--table-head); }
.number-cell { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
tfoot { background: var(--table-head); }
tfoot th, tfoot td { font-weight: 600; border-bottom: 0; }
.bom-node { padding-left: 18px; border-left: 1px solid var(--line); }
.card > .bom-node { border-left: 0; padding-left: 0; }
.bom-row { padding: 16px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--table-head); }
.bom-row-error { background: var(--error-bg); border-color: var(--error-line); }
.bom-row-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.bom-identity { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.bom-toggle { width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface); flex-shrink: 0; }
.bom-leaf { width: 28px; flex-shrink: 0; }
.bom-description { min-width: 0; }
.bom-title { display: flex; flex-wrap: wrap; gap: 4px 10px; overflow-wrap: anywhere; }
.bom-meta { color: var(--muted); font-size: 12px; margin-top: 4px; overflow-wrap: anywhere; }
.bom-cost { text-align: right; flex-shrink: 0; }
.bom-cost strong { font-size: 20px; color: var(--accent); }
.bom-cost small { display: block; color: var(--muted); }
.error-text { color: var(--error-ink); }
.empty-state { text-align: center; padding: 64px 24px; }
.empty-state h2 { margin: 20px 0 8px; }
.empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: var(--badge-bg); color: var(--accent); margin: auto; }
.empty-icon svg { width: 32px; height: 32px; }
.spinner { width: 17px; height: 17px; display: inline-block; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
.large-spinner { width: 32px; height: 32px; color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-error-container { display: grid; place-items: center; min-height: 65vh; }
.auth-error-card { width: 100%; max-width: 500px; }
.auth-error-card h1 { font-size: 24px; margin: 20px 0; overflow-wrap: anywhere; }
.auth-error-card .identity-summary { margin-bottom: 16px; }
.auth-error-card nav { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (max-width: 900px) {
    .login-layout { gap: 40px; grid-template-columns: 1fr 380px; }
    .login-intro h1 { font-size: 36px; }
    .material-overview { flex-wrap: wrap; }
    .metric-group { gap: 40px; }
    .metric { align-items: flex-start; }
    .account-info { max-width: 180px; overflow-wrap: anywhere; }
}
@media (max-width: 640px) {
    .header-inner { padding: 14px 16px; gap: 12px; }
    .brand { gap: 12px; }
    .brand-logo { width: 106px; }
    .brand-divider, .brand-product { display: none; }
    .main-container { padding: 28px 16px 40px; }
    .site-footer { width: calc(100% - 32px); }
    .login-layout { grid-template-columns: 1fr; gap: 28px; margin: 12px auto; min-height: 0; max-width: 420px; }
    .login-intro h1 { font-size: 32px; margin: 14px 0; }
    .login-intro > p { font-size: 14px; }
    .feature-list { margin-top: 20px; }
    .login-card { padding: 28px; }
    .page-heading { align-items: flex-start; flex-direction: column; gap: 20px; }
    h1 { font-size: 28px; }
    .account-actions { width: 100%; justify-content: space-between; }
    .account-info { text-align: left; max-width: 60%; }
    .card { padding: 20px; }
    .search-controls { flex-direction: column; }
    .search-button { min-height: 46px; }
    .material-heading h2 { font-size: 23px; }
    .metric-group { flex-wrap: wrap; gap: 20px 32px; width: 100%; }
    .metric strong { font-size: 26px; overflow-wrap: anywhere; }
    .detail-grid { grid-template-columns: 1fr; }
    .section-heading { align-items: flex-start; gap: 12px; }
    .section-status { max-width: 50%; }
    .bom-node { padding-left: 10px; }
    .bom-row { padding: 12px; }
    .bom-row-header { flex-direction: column; gap: 8px; }
    .bom-cost { align-self: flex-end; }
    .bom-leaf { display: none; }
    .price-card { padding: 16px; }
    .price-heading { flex-wrap: wrap; }
    .empty-state { padding: 44px 20px; }
}
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
