:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-alt: #f8fafb;
  --ink: #172127;
  --muted: #68777c;
  --dim: #94a0a3;
  --line: #e1e7e7;
  --soft: #edf2f1;
  --navy: #15252b;
  --green: #27845f;
  --green-soft: #e8f4ee;
  --amber: #b9762e;
  --amber-soft: #fff3df;
  --red: #c1545c;
  --red-soft: #fff0f1;
  --shadow: 0 12px 30px rgba(30, 49, 53, .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px "DM Sans", sans-serif; overflow-x: hidden; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(39,132,95,.28); outline-offset: 2px; }
.app-shell { display: flex; min-height: 100dvh; }
.sidebar { width: 252px; flex: 0 0 252px; background: var(--navy); color: #eaf1f1; padding: 24px 15px 18px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; }
.brand { color: #fff; text-decoration: none; display: grid; grid-template-columns: 38px auto; grid-template-rows: auto auto; gap: 0 10px; align-items: center; margin: 0 10px 30px; font: 700 19px "Onest", sans-serif; letter-spacing: -.03em; }
.brand-mark { grid-row: 1 / 3; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #b9e5cf; color: var(--navy); }
.brand small { color: #91a4a4; font: 9px "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
.workspace { border-block: 1px solid rgba(255,255,255,.12); padding: 14px 10px; margin-bottom: 19px; position: relative; }
.workspace span { display: block; color: #789090; font: 9px "DM Mono", monospace; letter-spacing: .08em; margin-bottom: 7px; }
.workspace strong { font-size: 13px; }
.workspace i { position: absolute; right: 10px; bottom: 15px; color: #99abab; font-style: normal; }
.side-nav { display: grid; gap: 4px; }
.side-nav .tab { border: 0; background: transparent; color: #a9b9b8; text-align: left; padding: 12px 11px; border-radius: 7px; font: 500 14px "DM Sans", sans-serif; display: flex; align-items: center; gap: 11px; transition: background .18s, color .18s; }
.side-nav .tab b { width: 18px; color: #79918f; font-size: 17px; font-weight: 400; }
.side-nav .tab em { margin-left: auto; color: #78908e; font: 11px "DM Mono", monospace; font-style: normal; }
.side-nav .tab:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav .tab.active { background: #d5f0df; color: #173b31; }
.side-nav .tab.active b, .side-nav .tab.active em { color: var(--green); }
.sidebar-bottom { margin-top: auto; display: grid; gap: 17px; }
.nav-status { display: flex; align-items: center; gap: 9px; color: #b8c5c4; font-size: 12px; padding: 0 10px; }
.nav-status i, .system-chip i { width: 7px; height: 7px; background: #6bd89d; border-radius: 50%; box-shadow: 0 0 0 4px rgba(107,216,157,.13); }
.operator { display: flex; align-items: center; gap: 10px; padding: 13px 10px 0; border-top: 1px solid rgba(255,255,255,.12); color: #eaf2f1; font-size: 12px; }
.operator small { display: block; color: #879c9a; font-size: 10px; margin-top: 3px; }
.profile { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: #36544e; color: #d5f0df; font: 11px "DM Mono", monospace; }
.workspace-main { flex: 1; min-width: 0; padding: 0 34px 20px; }
.topbar { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.topbar-title { min-width: 0; }
.breadcrumb, .eyebrow { color: var(--dim); font: 10px "DM Mono", monospace; letter-spacing: .11em; text-transform: uppercase; }
.topbar h1 { margin: 6px 0 0; font: 600 27px "Onest", sans-serif; letter-spacing: -.03em; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.global-search, .local-search { display: flex; align-items: center; gap: 8px; height: 38px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 0 11px; color: var(--dim); }
.global-search { width: 250px; }
.local-search { width: min(440px, 100%); }
.global-search input, .local-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.global-search input::placeholder, .local-search input::placeholder { color: #a4afb1; }
.system-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid #cce7d8; border-radius: 7px; color: var(--green); background: var(--green-soft); font: 11px "DM Mono", monospace; }
.primary-button, .quiet-button, .text-button, .icon-button { border: 0; border-radius: 7px; min-height: 38px; padding: 0 14px; font-weight: 600; transition: transform .18s, background .18s, border-color .18s; }
.primary-button { background: var(--green); color: #fff; box-shadow: 0 5px 14px rgba(39,132,95,.16); }
.primary-button:hover { background: #1f704f; transform: translateY(-1px); }
.quiet-button { color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.quiet-button:hover { border-color: #b6c7c4; background: var(--surface-alt); }
.text-button { color: var(--green); background: transparent; padding-inline: 0; }
.icon-button { width: 38px; padding: 0; display: grid; place-items: center; background: var(--surface); color: var(--muted); border: 1px solid var(--line); font-size: 18px; }
.view { display: none; padding: 30px 0 0; }
.view.active { display: block; }
.command-strip { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.command-strip h2, .view-heading h2 { margin: 7px 0 0; font: 600 clamp(1.8rem, 3vw, 2.55rem)/1.05 "Onest", sans-serif; letter-spacing: -.04em; }
.command-strip h2 em { color: var(--green); font-style: normal; }
.command-strip-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.metrics { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.metric { min-height: 120px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 17px 18px; position: relative; box-shadow: var(--shadow); }
.metric span, .metric small { display: block; color: var(--muted); font-size: 12px; }
.metric strong { display: block; margin: 12px 0 5px; font: 600 31px "Onest", sans-serif; letter-spacing: -.04em; }
.metric small { color: var(--dim); }
.metric i { position: absolute; right: 18px; top: 17px; color: var(--green); font-style: normal; }
.metric-warning strong { color: var(--amber); }
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 19px; box-shadow: var(--shadow); }
.panel-top, .view-heading, .section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.panel h3 { margin: 7px 0 0; font: 600 18px "Onest", sans-serif; letter-spacing: -.03em; }
.summary-list, .job-list { margin-top: 17px; }
.summary-item, .job { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--soft); }
.summary-item:first-child, .job:first-child { border-top: 0; padding-top: 0; }
.summary-item span, .job strong { font-weight: 600; }
.summary-item small, .job small { color: var(--muted); font-size: 11px; }
.state { display: inline-flex; align-items: center; min-height: 25px; padding: 0 8px; border-radius: 99px; background: var(--green-soft); color: var(--green); font: 11px "DM Mono", monospace; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.table-wrap.compact { box-shadow: none; margin-top: 15px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--soft); vertical-align: middle; }
th { color: var(--dim); background: var(--surface-alt); font: 10px "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
tbody tr { transition: background .16s; }
tbody tr:hover, tbody tr:focus { background: #f7fbf9; outline: 0; }
tbody tr:last-child td { border-bottom: 0; }
.product-name strong { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.product-name small, .source-trace a, .price-conversion { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.source-trace { max-width: 260px; }
.source-trace a { color: var(--green); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trace-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--green); }
.price { white-space: nowrap; font-weight: 600; }
.price-conversion { max-width: 175px; white-space: normal; font-weight: 400; }
.stock { color: var(--muted); white-space: nowrap; }
.view-heading { align-items: end; margin-bottom: 22px; }
.view-heading p { max-width: 610px; margin: 10px 0 0; color: var(--muted); line-height: 1.5; }
.heading-stat { text-align: right; }.heading-stat strong { display: block; font: 600 29px "Onest", sans-serif; }.heading-stat span { color: var(--muted); font-size: 12px; }
.toolbar { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.source-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.source-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: var(--shadow); }
.source-card h3 { margin: 18px 0 8px; font: 600 18px "Onest", sans-serif; }.source-card p { min-height: 42px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; word-break: break-word; }.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 18px; }.mono { font: 11px "DM Mono", monospace; color: var(--dim); }.toggle { accent-color: var(--green); width: 17px; height: 17px; }
.category-tree { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; }.category-node { display: flex; align-items: center; gap: 10px; min-height: 49px; padding-top: 9px; padding-bottom: 9px; border-bottom: 1px solid var(--soft); }.category-node:last-child { border-bottom: 0; }.category-node .folder { color: var(--green); }.category-node strong { font-weight: 600; }.category-node small { margin-left: auto; margin-right: 16px; color: var(--dim); font: 11px "DM Mono", monospace; }
footer { display: flex; justify-content: space-between; color: var(--dim); padding: 27px 0 4px; font-size: 11px; }
.loading { color: var(--muted); padding: 16px 0; }.form-error { color: var(--red); min-height: 20px; }.badge { padding: 8px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font: 11px "DM Mono", monospace; }
dialog { width: min(620px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); border: 0; border-radius: 10px; padding: 0; color: var(--ink); background: var(--surface); box-shadow: 0 24px 80px rgba(19,38,42,.25); } dialog::backdrop { background: rgba(17,34,38,.48); } dialog form, .product-detail { padding: 24px; } dialog label { display: grid; gap: 7px; margin: 16px 0; color: var(--muted); font-size: 12px; } dialog input, dialog select { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; background: var(--surface-alt); color: var(--ink); } fieldset { border: 1px solid var(--line); border-radius: 7px; padding: 3px 14px 8px; } legend { padding: 0 5px; color: var(--dim); font: 10px "DM Mono", monospace; text-transform: uppercase; }
.dialog-head { display: flex; justify-content: space-between; gap: 12px; } .dialog-head h2 { margin: 7px 0 0; font: 600 25px "Onest", sans-serif; } .detail-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0; } .detail-gallery img { width: 100%; aspect-ratio: 1; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-alt); } .gallery-empty { grid-column: 1 / -1; padding: 32px; text-align: center; color: var(--muted); background: var(--surface-alt); border-radius: 6px; }
.detail-price { display: grid; grid-template-columns: 1fr 30px 1fr; align-items: center; gap: 8px; padding: 17px 0; border-block: 1px solid var(--line); } .detail-price small, .detail-facts span { display: block; color: var(--muted); font-size: 11px; } .detail-price strong { display: block; margin-top: 7px; font: 600 21px "Onest", sans-serif; } .detail-arrow { color: var(--green); text-align: center; font-size: 20px; } .detail-conversion { margin: 10px 0 0; color: var(--muted); font-size: 12px; } .detail-source-lineage { display: grid; gap: 6px; padding: 15px 0; font-size: 12px; } .detail-source-lineage span { color: var(--muted); } .detail-source-lineage a { color: var(--green); overflow-wrap: anywhere; }
.detail-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 15px 0; border-block: 1px solid var(--line); } .detail-facts b { display: block; margin-top: 6px; font-size: 12px; } .detail-description { color: #46565a; line-height: 1.65; white-space: pre-wrap; } .detail-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
@media (max-width: 1040px) { .sidebar { width: 214px; flex-basis: 214px; }.workspace-main { padding-inline: 22px; }.top-actions .global-search { width: 190px; }.metrics { grid-template-columns: repeat(2, 1fr); }.metric-wide { grid-column: span 2; } }
@media (max-width: 760px) { .app-shell { display: block; }.sidebar { position: static; width: 100%; height: auto; padding: 12px 14px 10px; }.brand { margin: 0 4px 12px; }.workspace, .sidebar-bottom { display: none; }.side-nav { display: flex; overflow-x: auto; gap: 5px; padding-bottom: 2px; }.side-nav .tab { flex: 0 0 auto; padding: 9px 10px; font-size: 12px; }.side-nav .tab b { display: none; }.workspace-main { padding: 0 14px 18px; }.topbar { min-height: 74px; align-items: flex-start; padding: 15px 0; }.topbar-title h1 { font-size: 22px; }.top-actions { gap: 6px; }.top-actions .global-search, .top-actions .system-chip { display: none; }.top-actions .primary-button { padding-inline: 10px; font-size: 12px; }.command-strip { display: block; }.command-strip-actions { margin-top: 18px; }.metrics, .overview-grid { grid-template-columns: 1fr; }.metric-wide { grid-column: auto; }.metric { min-height: 105px; }.view-heading { display: block; }.heading-stat { margin-top: 16px; text-align: left; }.toolbar { align-items: stretch; }.local-search { flex: 1; }.toolbar .quiet-button { flex: 0 0 auto; }.table-wrap { margin-inline: -1px; }.source-grid { grid-template-columns: 1fr; }.detail-facts { grid-template-columns: repeat(2, 1fr); }.detail-gallery { grid-template-columns: repeat(3, 1fr); }footer { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
