:root {
  --sidebar-width: 216px;
  --sidebar-collapsed: 68px;
  --canvas: #f8f9fa;
  --surface: #ffffff;
  --sidebar: #f7f7f7;
  --text: #343a40;
  --muted: #7b8187;
  --faint: #a3a9ad;
  --line: #e5e7eb;
  --line-soft: #eef0f2;
  --accent: #2490ef;
  --accent-dark: #1474c8;
  --accent-soft: #edf6ff;
  --success: #278a68;
  --success-soft: #e6f5ee;
  --warning: #b7791f;
  --warning-soft: #fff5dc;
  --font: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 1024px; background: var(--canvas); }
body { margin: 0; color: var(--text); background: var(--canvas); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid rgba(36, 144, 239, .35); outline-offset: 2px; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; width: var(--sidebar-width); flex-direction: column; overflow: hidden; color: #555b60; background: var(--sidebar); border-right: 1px solid var(--line); transition: width .2s ease; }
.brand-area { padding: 9px 8px 7px; }
.workspace-switcher { display: grid; width: 100%; grid-template-columns: 32px minmax(0, 1fr) 16px; align-items: center; gap: 9px; min-height: 50px; padding: 7px 8px; color: var(--text); border-radius: 7px; background: transparent; text-align: left; }
.workspace-switcher:hover { background: #eceeef; }
.brand-mark { display: grid; width: 32px; height: 32px; place-items: center; color: #fff; border-radius: 7px; background: var(--accent); }
.brand-mark svg { width: 19px; height: 19px; stroke-width: 1.85; }
.brand-copy { display: grid; min-width: 0; gap: 0; line-height: 1.2; }
.brand-copy strong { overflow: hidden; color: #292e33; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy span { overflow: hidden; color: #8a9095; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-chevron { width: 15px; height: 15px; color: #777e84; }

.sidebar-utility { display: grid; gap: 2px; padding: 6px 8px 10px; border-bottom: 1px solid var(--line-soft); }
.utility-item { position: relative; display: flex; width: 100%; height: 33px; align-items: center; gap: 11px; padding: 0 8px; color: #62686e; border-radius: 6px; background: transparent; text-align: left; font-size: 13px; }
.utility-item:hover { background: #eceeef; color: #343a40; }
.utility-item svg { width: 16px; height: 16px; color: #6f767c; }
.utility-item kbd { margin-left: auto; padding: 1px 4px; color: #a1a6aa; border: 0; background: transparent; font-size: 10px; }
.notification-dot { position: absolute; top: 8px; left: 20px; width: 5px; height: 5px; border: 1px solid var(--sidebar); border-radius: 50%; background: #e87967; }

.primary-nav { display: grid; gap: 2px; padding: 8px; overflow-y: auto; scrollbar-width: thin; }
.nav-item { position: relative; display: flex; width: 100%; min-height: 35px; align-items: center; gap: 11px; padding: 0 9px; color: #60666c; border-radius: 6px; background: transparent; text-align: left; transition: background .16s ease, color .16s ease; }
.nav-item:hover { color: #2e3439; background: #eceeef; }
.nav-item.is-active { color: #343a40; background: var(--surface); border: 1px solid #e4e6e8; box-shadow: 0 1px 2px rgba(24, 32, 38, .05); }
.nav-item.is-parent-active { color: #343a40; background: #eceeef; }
.nav-icon { width: 16px; height: 16px; flex: 0 0 16px; color: #777e84; }
.nav-item.is-active .nav-icon, .nav-item.is-parent-active .nav-icon { color: var(--accent); }
.nav-item span { flex: 1; font-size: 13px; }
.chevron { width: 14px; height: 14px; color: #9aa0a5; transition: transform .16s ease; }
.nav-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.sub-nav { display: grid; max-height: 0; gap: 1px; margin-left: 25px; overflow: hidden; opacity: 0; transition: max-height .18s ease, opacity .18s ease; }
.nav-group.is-open .sub-nav { max-height: 260px; margin-bottom: 3px; opacity: 1; }
.sub-nav button { position: relative; min-height: 30px; padding: 0 10px; color: #777d83; border-radius: 5px; background: transparent; text-align: left; font-size: 12px; }
.sub-nav button:hover { color: #343a40; background: #eceeef; }
.sub-nav button.is-active { color: var(--accent-dark); background: var(--accent-soft); font-weight: 500; }
.sub-nav button.is-active::before { position: absolute; top: 7px; bottom: 7px; left: -3px; width: 2px; border-radius: 2px; background: var(--accent); content: ""; }
.sub-nav .sub-nav-add { margin-top: 4px; padding-top: 7px; color: var(--accent); border-top: 1px solid var(--line-soft); font-size: 11px; }
.sub-nav .sub-nav-add:hover { color: var(--accent-dark); background: transparent; }

.sidebar-footer { margin-top: auto; padding: 9px 8px; border-top: 1px solid var(--line); }
.user-profile { display: grid; width: 100%; grid-template-columns: 30px minmax(0, 1fr) 14px; align-items: center; gap: 9px; min-height: 43px; padding: 5px 8px; color: #555b60; border-radius: 6px; background: transparent; text-align: left; }
.user-profile:hover { background: #eceeef; }
.avatar { display: grid; width: 29px; height: 29px; place-items: center; color: #6e54bd; border-radius: 50%; background: #eeeaff; font-size: 12px; font-weight: 600; }
.user-copy { display: grid; gap: 0; line-height: 1.2; }
.user-copy strong { color: #444a50; font-size: 12px; font-weight: 500; }
.user-copy small { color: #999fa4; font-size: 10px; }
.user-profile > svg { width: 14px; height: 14px; color: #989ea3; }

.main-content { width: calc(100% - var(--sidebar-width)); min-height: 100vh; margin-left: var(--sidebar-width); transition: width .2s ease, margin-left .2s ease; }
.topbar { display: flex; height: 53px; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.breadcrumbs { display: flex; align-items: center; gap: 9px; color: #949a9f; font-size: 13px; }
.breadcrumbs svg { width: 15px; height: 15px; }
.breadcrumbs strong { color: #343a40; font-weight: 500; }
.topbar-actions { display: flex; align-items: center; gap: 13px; color: #9aa0a5; }
.current-date { color: #9aa0a5; font-size: 11px; white-space: nowrap; }
.icon-button, .collapse-button { display: grid; width: 28px; height: 30px; place-items: center; padding: 0; color: #7f868b; border-radius: 5px; background: transparent; font-size: 18px; letter-spacing: 2px; }
.icon-button:hover, .collapse-button:hover { background: #f0f1f2; color: #343a40; }
.collapse-button { border-left: 1px solid var(--line); border-radius: 0; font-size: 20px; letter-spacing: 0; }

.page-content { position: relative; max-width: 1180px; margin: 0 auto; padding: 28px 30px 48px; }
.is-hidden { display: none !important; }
.page-content::before { display: none; }
.welcome-row { display: flex; min-height: 86px; align-items: flex-start; justify-content: space-between; }
.eyebrow { margin: 0 0 5px; color: #9aa0a5; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 5px; color: #2f3439; font-size: 25px; font-weight: 500; letter-spacing: -.035em; }
.welcome-note { margin: 0; color: var(--muted); font-size: 12px; }
.pattern-note { display: none; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric-card, .panel { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: none; }
.metric-card { min-height: 142px; padding: 16px; }
.metric-icon { display: grid; width: 29px; height: 29px; place-items: center; margin-bottom: 10px; border-radius: 6px; }
.metric-icon svg { width: 16px; height: 16px; }
.metric-icon.teal { color: var(--accent); background: var(--accent-soft); }
.metric-icon.orange { color: #d97752; background: #fff2eb; font-size: 18px; font-weight: 500; }
.metric-label { color: #747b81; font-size: 12px; }
.metric-number { margin: 2px 0 7px; color: #343a40; font-size: 25px; font-weight: 500; letter-spacing: -.04em; }
.metric-number small { color: #868d92; font-size: 11px; font-weight: 400; letter-spacing: 0; }
.metric-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #9aa0a5; font-size: 10px; white-space: nowrap; }
.metric-meta strong { color: var(--success); font-size: 11px; font-weight: 500; }
.alert-card .metric-meta strong { color: #d97752; }
.progress { height: 5px; margin-top: 10px; overflow: hidden; border-radius: 4px; background: #edf0f2; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.trend-bars { display: flex; height: 15px; align-items: end; justify-content: end; gap: 3px; margin-top: 7px; }
.trend-bars i { display: block; width: 4px; border-radius: 2px 2px 0 0; background: #b9dafa; }
.trend-bars i:nth-child(1) { height: 5px; }.trend-bars i:nth-child(2) { height: 8px; }.trend-bars i:nth-child(3) { height: 6px; }.trend-bars i:nth-child(4) { height: 11px; }.trend-bars i:nth-child(5) { height: 9px; }.trend-bars i:nth-child(6) { height: 14px; }.trend-bars i:nth-child(7) { height: 15px; background: var(--accent); }
.inline-link, .text-button { display: inline-flex; align-items: center; gap: 5px; padding: 0; color: var(--accent); background: transparent; font-size: 11px; }
.inline-link svg, .text-button svg { width: 13px; height: 13px; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(350px, .9fr); gap: 12px; margin-top: 12px; }
.panel { padding: 18px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-heading h2 { margin: 0; color: #3c4247; font-size: 16px; font-weight: 500; letter-spacing: -.02em; }
.text-button { margin-top: 5px; color: #8b9297; }
.text-button:hover, .inline-link:hover { color: var(--accent-dark); }
.filter-tabs { display: flex; justify-content: flex-end; gap: 2px; margin-top: -27px; margin-bottom: 10px; }
.filter-tabs button { padding: 4px 8px; color: #a0a6aa; border-radius: 4px; background: transparent; font-size: 10px; }
.filter-tabs button.is-active { color: var(--accent); background: var(--accent-soft); font-weight: 500; }
.production-list { display: grid; }
.production-row { display: grid; grid-template-columns: 40px minmax(135px, 1fr) minmax(140px, 1.2fr) 40px 62px; align-items: center; gap: 10px; min-height: 66px; border-top: 1px solid var(--line-soft); }
.product-thumb { width: 40px; height: 44px; border-radius: 5px; background: #eee; }
.product-thumb.jacket { background: linear-gradient(120deg, #dad1c4 0 43%, #eee8dd 44% 61%, #c8bdae 62%); }.product-thumb.tee { background: linear-gradient(115deg, #6b9691 0 42%, #b5cfcb 43% 59%, #4b7571 60%); }.product-thumb.pants { background: linear-gradient(70deg, #a7947c 0 42%, #c3b39f 43% 61%, #89765f 62%); }.product-thumb.dress { background: repeating-linear-gradient(25deg, #e7d7d5 0 4px, #a69eb4 5px 8px); }
.production-info { display: grid; gap: 2px; min-width: 0; }.production-info strong { overflow: hidden; color: #454b50; font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }.production-info span, .production-value > span { overflow: hidden; color: #969da2; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.production-value { min-width: 0; }.production-value .progress { margin-top: 5px; }.production-rate { color: var(--accent); font-size: 11px; font-weight: 500; }
.status-pill { display: inline-flex; width: fit-content; align-items: center; justify-content: center; min-width: 48px; padding: 3px 7px; border-radius: 4px; font-size: 9px; white-space: nowrap; }.status-pill.done { color: var(--success); background: var(--success-soft); }.status-pill.active { color: #317cba; background: var(--accent-soft); }.status-pill.pending { color: var(--warning); background: var(--warning-soft); }.status-pill.neutral { color: #858c91; background: #f0f2f3; }
.inventory-body { display: grid; grid-template-columns: 1fr 1.25fr; align-items: center; gap: 12px; min-height: 170px; padding-top: 7px; }.donut-chart { position: relative; display: grid; width: 136px; height: 136px; place-items: center; margin: auto; border-radius: 50%; background: conic-gradient(var(--accent) 0 36.8%, #79a9cc 36.8% 55.4%, #b7d9f2 55.4% 77.5%, #6fb8a3 77.5% 93.9%, #dbe3e8 93.9% 100%); }.donut-chart::before { position: absolute; width: 94px; height: 94px; border-radius: 50%; background: #fff; content: ""; }.donut-chart > div { position: relative; z-index: 1; display: grid; justify-items: center; gap: 2px; }.donut-chart strong { color: #40464b; font-size: 17px; font-weight: 500; letter-spacing: -.04em; }.donut-chart span { color: #92999e; text-align: center; font-size: 9px; line-height: 1.35; }.legend { display: grid; gap: 8px; }.legend div { display: grid; grid-template-columns: 8px 1fr 42px 52px; align-items: center; gap: 6px; color: #7c8388; font-size: 10px; }.legend strong { color: #747b80; font-weight: 500; }.legend em { color: #454b50; font-style: normal; text-align: right; }.dot { width: 8px; height: 8px; border-radius: 50%; }.dot.fabric { background: var(--accent); }.dot.trim { background: #79a9cc; }.dot.semi { background: #b7d9f2; }.dot.finish { background: #6fb8a3; }.dot.other { background: #dbe3e8; }
.inventory-callout { display: flex; align-items: center; gap: 9px; margin-top: 8px; padding: 10px; border-radius: 6px; background: #f5f9fc; }.callout-icon { display: grid; width: 29px; height: 29px; place-items: center; color: var(--accent); border-radius: 6px; background: var(--accent-soft); font-size: 20px; }.inventory-callout div:nth-child(2) { display: grid; flex: 1; gap: 2px; }.inventory-callout strong { color: #4d687d; font-size: 11px; font-weight: 500; }.inventory-callout span { color: #92999e; font-size: 9px; }.inventory-callout > svg { width: 14px; height: 14px; color: #91a8b7; }

.orders-panel { margin-top: 12px; }.table-wrap { margin-top: 10px; overflow-x: auto; }table { width: 100%; border-collapse: collapse; min-width: 820px; }th, td { padding: 10px 8px; border-top: 1px solid var(--line-soft); text-align: left; white-space: nowrap; }th { color: #989fa4; background: #fafbfb; font-size: 10px; font-weight: 500; }td { color: #737b80; font-size: 10px; }td:first-child, td:nth-child(2), td:nth-child(3) { color: #4a5258; font-weight: 500; }.accent-text { color: var(--accent); font-weight: 500; }
.page-header { display: flex; min-height: 96px; align-items: flex-start; justify-content: space-between; gap: 20px; }.page-description { margin: 0; color: var(--muted); font-size: 12px; }.primary-button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; color: #fff; border-radius: 6px; background: var(--accent); font-size: 12px; font-weight: 500; }.primary-button:hover { background: var(--accent-dark); }.primary-button span { font-size: 16px; font-weight: 300; line-height: 1; }
.resource-tabs { display: flex; gap: 2px; margin: 0 0 12px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: #f2f3f4; overflow-x: auto; }.resource-tabs button { min-height: 31px; padding: 0 14px; color: #81888d; border-radius: 5px; background: transparent; font-size: 11px; white-space: nowrap; }.resource-tabs button:hover { color: #4b5358; }.resource-tabs button.is-active { color: #3b5f7b; background: #fff; box-shadow: 0 1px 2px rgba(24, 32, 38, .06); font-weight: 500; }
.records-panel { padding: 16px 18px 18px; }.record-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }.record-search { display: flex; width: min(360px, 100%); height: 35px; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #9aa0a5; }.record-search svg { width: 15px; height: 15px; }.record-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }.record-search input::placeholder { color: #aab0b4; }.record-filters { display: flex; gap: 7px; }.filter-button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; color: #70787e; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 10px; }.filter-button svg { width: 12px; height: 12px; }.filter-button:hover { background: #f5f7f8; }.record-summary { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; color: #9ca2a6; font-size: 10px; }.record-summary .text-button { margin-top: 0; }.record-table { min-width: 760px; }.record-table th, .record-table td { padding-top: 11px; padding-bottom: 11px; }.record-table td:first-child { color: #4a78a0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }.record-table td:nth-child(2) { color: #4a5258; font-family: var(--font); font-weight: 500; }.record-table tr:hover td { background: #fafcfd; }.record-status { display: inline-flex; padding: 3px 7px; border-radius: 4px; color: var(--success); background: var(--success-soft); font-size: 9px; }.record-status.warning { color: var(--warning); background: var(--warning-soft); }
.empty-state { display: grid; min-height: 180px; place-items: center; color: #9da4a8; font-size: 11px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; background: rgba(38, 46, 52, .28); backdrop-filter: blur(2px); }.modal-card { width: min(560px, 100%); padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 18px 50px rgba(22, 32, 40, .16); }.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; }.modal-heading h2 { margin: 0; color: #3b4247; font-size: 19px; font-weight: 500; }.modal-close { width: 28px; height: 28px; color: #8b9297; border-radius: 5px; background: #f3f4f5; font-size: 20px; line-height: 1; }.modal-close:hover { color: #3b4247; background: #eceeef; }.modal-note { margin: 7px 0 18px; color: #9aa0a5; font-size: 10px; }.modal-note.is-error { color: #c65e48; }.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }.form-field { display: grid; gap: 5px; }.form-field label { color: #687076; font-size: 11px; font-weight: 500; }.form-field input, .form-field select { width: 100%; height: 36px; padding: 0 10px; color: var(--text); border: 1px solid var(--line); border-radius: 6px; outline: 0; background: #fbfcfc; font-size: 11px; }.form-field input:focus, .form-field select:focus { border-color: #8fc3ee; box-shadow: 0 0 0 3px rgba(36, 144, 239, .1); }.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }.secondary-button { min-height: 36px; padding: 0 14px; color: #687076; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 12px; }.secondary-button:hover { background: #f5f7f8; }
.form-field-wide { grid-column: 1 / -1; }

.sidebar.is-collapsed { width: var(--sidebar-collapsed); }.sidebar.is-collapsed .workspace-switcher { grid-template-columns: 32px; justify-content: center; padding-right: 0; padding-left: 0; }.sidebar.is-collapsed .brand-copy, .sidebar.is-collapsed .workspace-chevron, .sidebar.is-collapsed .utility-item span, .sidebar.is-collapsed .utility-item kbd, .sidebar.is-collapsed .nav-item span, .sidebar.is-collapsed .chevron, .sidebar.is-collapsed .user-copy, .sidebar.is-collapsed .user-profile > svg { display: none; }.sidebar.is-collapsed .utility-item, .sidebar.is-collapsed .nav-item { justify-content: center; padding: 0; }.sidebar.is-collapsed .user-profile { grid-template-columns: 30px; justify-content: center; padding: 5px 0; }.sidebar.is-collapsed .nav-group { position: relative; }.sidebar.is-collapsed .sub-nav { position: absolute; top: 0; left: 51px; z-index: 11; width: 180px; padding: 5px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 8px 24px rgba(28, 36, 42, .12); }.sidebar.is-collapsed .nav-group.is-open .sub-nav { margin-bottom: 0; }.sidebar.is-collapsed + .main-content { width: calc(100% - var(--sidebar-collapsed)); margin-left: var(--sidebar-collapsed); }

@media (max-width: 1260px) { .page-content { padding-right: 24px; padding-left: 24px; }.current-date { display: none; }.metric-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .content-grid { grid-template-columns: 1fr; }.record-filters { display: none; }.product-overview { grid-template-columns: 1fr; }.profile-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }.basic-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.detail-definition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.colorway-list { grid-template-columns: 1fr; }.file-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.inline-editor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .profile-header { display: block; }.profile-actions { padding-top: 0; }.profile-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }.custom-notes { grid-template-columns: 1fr; gap: 7px; }.detail-definition-grid, .basic-info-grid, .inline-editor-grid, .file-card-grid { grid-template-columns: 1fr; } }

/* Product archive readability and image preview */
.page-header h1 { font-size: 36px; }
.page-header .eyebrow { font-size: 13px; }
.page-header .page-description { font-size: 16px; }
.resource-tabs button { min-height: 42px; padding-right: 21px; padding-left: 21px; font-size: 15px; }
.record-search { height: 46px; }
.record-search input { font-size: 15px; }
.filter-button { min-height: 42px; font-size: 14px; }
.record-summary { font-size: 14px; }
.record-summary .text-button { font-size: 14px; }
.record-table th { font-size: 14px; }
.record-table td { font-size: 15px; }
.record-table td:first-child { font-size: 14px; }
.record-status { padding: 5px 10px; font-size: 13px; }
.record-image-heading { width: 84px; }
.record-image-cell { width: 84px; padding-right: 4px !important; padding-left: 4px !important; }
.record-image-preview, .record-image-placeholder { display: grid; width: 58px; height: 68px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #f2f5f6; color: #7d9aad; font-size: 20px; font-weight: 500; }
.record-image-preview img { display: block; width: 100%; height: 100%; object-fit: cover; } /* base preview */
@media (max-width: 900px) { .page-header h1 { font-size: 32px; }.page-header .page-description { font-size: 14px; }.record-table th { font-size: 13px; }.record-table td { font-size: 14px; } }

/* BOM workspace: a calm library on the left and a focused version editor on the right. */
.bom-page { max-width: 1480px; }
.bom-page-header { min-height: 112px; }
.bom-toolbar-panel { padding: 17px 20px 15px; }
.bom-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.bom-search { width: min(460px, 100%); }
.bom-status-tabs { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: #f4f6f7; }
.bom-status-tabs button { min-height: 34px; padding: 0 15px; color: #7d878e; border-radius: 5px; background: transparent; font-size: 13px; }
.bom-status-tabs button:hover { color: #3d596f; }
.bom-status-tabs button.is-active { color: #2f6f9f; background: #fff; box-shadow: 0 1px 3px rgba(34, 62, 80, .08); font-weight: 600; }
.bom-toolbar-note { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 13px; color: #9aa4ab; font-size: 12px; }
.bom-toolbar-note span:first-child { color: #6d7981; font-weight: 500; }
.bom-workspace { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.bom-list-panel, .bom-detail-panel { min-width: 0; padding: 20px; }
.bom-panel-heading, .bom-material-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.bom-panel-heading h2, .bom-material-heading h3 { margin: 0; color: #3c4247; font-size: 19px; font-weight: 600; }
.bom-count { display: grid; min-width: 28px; height: 28px; place-items: center; color: #3f759c; border-radius: 50%; background: var(--accent-soft); font-size: 12px; font-weight: 600; }
.bom-list { display: grid; gap: 8px; margin-top: 18px; }
.bom-list-item { display: grid; gap: 7px; width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: left; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.bom-list-item:hover { border-color: #b7d7ed; background: #fbfdff; }
.bom-list-item.is-selected { border-color: #8fc3ee; background: #f7fbff; box-shadow: 0 0 0 2px rgba(36, 144, 239, .08); }
.bom-list-item-top, .bom-list-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bom-list-item-top strong { overflow: hidden; color: #47769a; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.bom-list-product { overflow: hidden; color: #4b555d; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.bom-list-meta { color: #949fa6; font-size: 11px; }
.bom-list-meta strong { color: #4b7da2; font-size: 12px; font-weight: 600; }
.bom-empty { display: grid; min-height: 150px; place-items: center; color: #a0a9ae; font-size: 13px; }
.bom-detail-empty { min-height: 380px; }
.bom-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
.bom-detail-title-line { display: flex; align-items: center; gap: 10px; }
.bom-detail-title-line h2 { margin: 0; color: #2f424f; font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.bom-detail-product { margin: 6px 0 0; color: #697780; font-size: 14px; }
.bom-detail-product span { margin-left: 8px; color: #4e80a6; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.bom-detail-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.bom-detail-actions .primary-button, .bom-detail-actions .secondary-button { min-height: 38px; font-size: 13px; }
.bom-meta-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 18px; border: 1px solid var(--line-soft); border-radius: 7px; overflow: hidden; }
.bom-meta-grid > div { display: grid; gap: 5px; min-height: 72px; padding: 13px 15px; background: #fbfcfc; }
.bom-meta-grid span, .bom-note > span { color: #89959d; font-size: 12px; }
.bom-meta-grid strong { color: #4e5e68; font-size: 14px; font-weight: 600; }
.bom-note { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 7px; background: #f6f9fb; }
.bom-note p { margin: 0; color: #697780; font-size: 13px; }
.bom-material-heading { align-items: flex-end; margin-top: 25px; }
.bom-material-tabs { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: #f4f6f7; }
.bom-material-tabs button { min-height: 33px; padding: 0 12px; color: #7d878e; border-radius: 5px; background: transparent; font-size: 12px; }
.bom-material-tabs button.is-active { color: #2f6f9f; background: #fff; box-shadow: 0 1px 3px rgba(34, 62, 80, .08); font-weight: 600; }
.bom-material-tabs em { margin-left: 3px; color: #a0a9ae; font-size: 11px; font-style: normal; }
.bom-table-wrap { margin-top: 13px; overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 7px; }
.bom-table { min-width: 1110px; }
.bom-table th, .bom-table td { padding: 12px 10px; font-size: 12px; vertical-align: middle; }
.bom-table th { color: #87939b; background: #f8fafb; font-size: 11px; font-weight: 600; }
.bom-table td { color: #68757e; }
.bom-table td:first-child { width: 70px; }
.bom-table tbody tr:hover td { background: #fbfdff; }
.bom-type-label { display: inline-flex; padding: 4px 7px; border-radius: 4px; font-size: 11px; }
.bom-type-label.fabric { color: #39759d; background: #eaf5fc; }.bom-type-label.trim { color: #657c95; background: #eef2f7; }.bom-type-label.packaging { color: #7b8060; background: #f4f3e5; }
.bom-code-cell { color: #4a78a0 !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.bom-name-cell { color: #4c5961 !important; font-weight: 600; }
.bom-cost-cell { color: #407aa5 !important; font-weight: 600; }
.bom-cell-input { width: 100%; min-width: 54px; height: 34px; padding: 0 7px; color: #45515a; border: 1px solid #9bc9ee; border-radius: 5px; outline: 0; background: #f7fbff; font-size: 12px; }
.bom-cell-input:focus { box-shadow: 0 0 0 3px rgba(36, 144, 239, .1); }
.bom-code-input { color: #4a78a0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.bom-calculated { color: #547f9e !important; white-space: nowrap; }
.bom-delete-item { color: #a16d6d; font-size: 12px; }
.bom-delete-item:hover { color: #bd4f4f; }
.bom-add-item { margin-top: 14px; }
.bom-cost-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.bom-cost-summary > div { display: grid; gap: 4px; min-height: 78px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfc; }
.bom-cost-summary span { color: #89959d; font-size: 12px; }
.bom-cost-summary strong { color: #485a65; font-size: 21px; font-weight: 650; }
.bom-cost-summary small { color: #929da4; font-size: 12px; font-weight: 400; }
.bom-cost-summary .bom-total-card { border-color: #b8daef; background: linear-gradient(135deg, #f4faff, #fbfdff); }
.bom-total-card strong { color: #2e78ac; }
@media (max-width: 1120px) { .bom-workspace { grid-template-columns: 1fr; }.bom-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }.bom-detail-heading { display: block; }.bom-detail-actions { justify-content: flex-start; margin-top: 16px; } }
@media (max-width: 760px) { .bom-toolbar { display: grid; }.bom-status-tabs { width: fit-content; }.bom-toolbar-note { display: grid; gap: 4px; }.bom-list { grid-template-columns: 1fr; }.bom-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.bom-material-heading { display: grid; gap: 12px; }.bom-cost-summary { grid-template-columns: 1fr; } }

/* Image review and colorway readability */
.style-image-thumb { position: relative; display: block; min-height: 104px; padding: 0; overflow: hidden; border: 0; border-radius: 6px; background: #eef1f3; cursor: zoom-in; }
.style-image-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .18s ease; }
.style-image-thumb:hover img { transform: scale(1.025); }
.style-image-thumb-badge { position: absolute; right: 7px; bottom: 7px; padding: 4px 7px; color: #fff; border-radius: 4px; background: rgba(29, 45, 56, .72); font-size: 11px; opacity: 0; transition: opacity .18s ease; }
.style-image-thumb:hover .style-image-thumb-badge, .style-image-thumb:focus-visible .style-image-thumb-badge { opacity: 1; }
.style-image-thumb:focus-visible { outline: 2px solid #55a9eb; outline-offset: 2px; }
.colorway-detail-list { display: grid; gap: 7px; margin-top: 2px; }
.colorway-detail-item { display: grid; grid-template-columns: minmax(82px, .72fr) minmax(0, 1.28fr); gap: 9px; align-items: baseline; padding-bottom: 6px; border-bottom: 1px solid var(--line-soft); }
.colorway-detail-item em { overflow: hidden; color: #8c959b; font-size: 13px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.colorway-detail-item strong { overflow: hidden; color: #56616a; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.image-lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 30px; background: rgba(15, 24, 31, .78); }
.image-lightbox-card { position: relative; display: grid; width: min(92vw, 1100px); height: min(90vh, 850px); grid-template-columns: 58px minmax(0, 1fr) 58px; grid-template-rows: minmax(0, 1fr) 56px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .24); border-radius: 12px; background: #f8fafb; box-shadow: 0 24px 70px rgba(0, 0, 0, .28); }
.image-lightbox-stage { display: grid; grid-column: 2; min-width: 0; min-height: 0; place-items: center; padding: 26px; background: #eef2f4; }
.image-lightbox-stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.image-lightbox-nav { display: grid; width: 38px; height: 38px; place-self: center; place-items: center; color: #53748b; border: 1px solid #cbd9e1; border-radius: 50%; background: rgba(255, 255, 255, .85); font-size: 30px; line-height: 1; }
.image-lightbox-nav:hover:not(:disabled) { color: #fff; border-color: var(--accent); background: var(--accent); }
.image-lightbox-nav:disabled { visibility: hidden; }
.image-lightbox-prev { grid-column: 1; grid-row: 1; }
.image-lightbox-next { grid-column: 3; grid-row: 1; }
.image-lightbox-footer { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 14px; padding: 0 20px; border-top: 1px solid var(--line); background: #fff; }
.image-lightbox-footer span { color: #7e8b94; font-size: 13px; }
.image-lightbox-delete { color: #a16d6d; font-size: 13px; }
.image-lightbox-delete:hover { color: #bd4f4f; }
.image-lightbox-close { position: absolute; z-index: 2; top: 12px; right: 12px; display: grid; width: 34px; height: 34px; place-items: center; color: #66757f; border: 1px solid #d5e0e5; border-radius: 6px; background: rgba(255, 255, 255, .9); font-size: 24px; line-height: 1; }
.image-lightbox-close:hover { color: #293b47; background: #fff; }
body.image-lightbox-open { overflow: hidden; }
@media (max-width: 620px) { .image-lightbox { padding: 12px; }.image-lightbox-card { width: 100%; height: min(88vh, 680px); grid-template-columns: 42px minmax(0, 1fr) 42px; }.image-lightbox-stage { padding: 12px; }.image-lightbox-nav { width: 32px; height: 32px; font-size: 24px; }.image-lightbox-footer { padding: 0 12px; }.colorway-detail-item { grid-template-columns: minmax(72px, .8fr) minmax(0, 1.2fr); } }

.material-version-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 14px; padding: 13px 15px; border: 1px solid #dce8f0; border-radius: 8px; background: #f7fbfe; }
.material-version-current { display: flex; align-items: baseline; gap: 9px; white-space: nowrap; }
.material-version-current span, .material-version-actions label > span { color: #8a969e; font-size: 13px; }
.material-version-current strong { color: #2f6f9f; font-size: 18px; font-weight: 600; }
.material-version-current em { padding: 3px 7px; color: #317c72; border-radius: 4px; background: #e4f4ef; font-size: 11px; font-style: normal; }
.material-version-actions { display: flex; align-items: flex-end; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.material-version-actions label { display: grid; gap: 5px; }
.material-version-actions select { min-width: 150px; height: 38px; padding: 0 10px; color: #4e5d66; border: 1px solid #cfdde6; border-radius: 6px; outline: 0; background: #fff; font-size: 13px; }
.material-version-actions .secondary-button { min-height: 38px; font-size: 13px; }
.material-version-actions button:disabled { color: #aab4ba; border-color: #e1e6e9; background: #f5f7f8; cursor: not-allowed; }
@media (max-width: 900px) { .material-version-bar { align-items: flex-start; flex-direction: column; }.material-version-actions { justify-content: flex-start; } }

.section-hint { margin: 7px 0 0; color: #8c959b; font-size: 13px; line-height: 1.5; }
.material-tabs { display: flex; gap: 4px; margin: 0 0 18px; padding: 4px; border: 1px solid var(--line); border-radius: 7px; background: #f2f3f4; overflow-x: auto; }
.material-tabs button { min-height: 40px; padding: 0 20px; color: #7d878e; border-radius: 5px; background: transparent; font-size: 14px; white-space: nowrap; }
.material-tabs button.is-active { color: #2f6f9f; background: #fff; box-shadow: 0 1px 2px rgba(24, 32, 38, .06); font-weight: 600; }
.material-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.material-summary-card { display: grid; gap: 5px; min-height: 88px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfc; }
.material-summary-card span { color: #7d878e; font-size: 13px; }
.material-summary-card strong { color: #3c4247; font-size: 24px; font-weight: 600; }
.material-summary-card strong small { color: #8c959b; font-size: 13px; font-weight: 400; }
.material-summary-card em { color: #94a0a8; font-size: 12px; font-style: normal; }
.materials-table { overflow-x: auto; }
.materials-table table { min-width: 760px; }
.materials-table td:first-child { color: #4a78a0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.material-editor-card { margin-top: 14px; padding: 18px; border: 1px solid #cfe2f2; border-radius: 9px; background: #f8fbfe; }
.material-editor-card:first-child { margin-top: 0; }
.material-editor-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.material-editor-card-heading div { display: grid; gap: 4px; }
.material-editor-card-heading span { color: #8c9ba7; font-size: 12px; }
.material-editor-card-heading strong { color: #3c4247; font-size: 16px; font-weight: 600; }
.material-field-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px 15px; }
.material-field { display: grid; gap: 6px; min-width: 0; }
.material-field-wide { grid-column: span 2; }
.material-field > span { color: #6d7880; font-size: 13px; }
.material-field input, .material-field select, .material-field textarea { width: 100%; min-width: 0; height: 42px; padding: 0 10px; color: #45515a; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: #fff; font: inherit; font-size: 14px; }
.material-field textarea { height: 74px; padding-top: 9px; line-height: 1.5; resize: vertical; }
.material-field input:focus, .material-field select:focus, .material-field textarea:focus { border-color: #8fc3ee; box-shadow: 0 0 0 3px rgba(36, 144, 239, .1); }
.material-custom-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 17px; padding-top: 15px; border-top: 1px solid #dce9f3; color: #6d7880; font-size: 13px; font-weight: 600; }
.material-custom-heading .profile-add-link { min-height: 32px; padding: 0 10px; font-size: 13px; font-weight: 500; }
.material-custom-fields { display: grid; gap: 9px; margin-top: 10px; }
.material-custom-row { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(0, 1.5fr) 46px; gap: 9px; align-items: center; }
.material-custom-row input { width: 100%; height: 40px; padding: 0 10px; color: #45515a; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: #fff; font-size: 14px; }
.material-custom-row input:focus { border-color: #8fc3ee; box-shadow: 0 0 0 3px rgba(36, 144, 239, .1); }
@media (max-width: 900px) { .material-summary { grid-template-columns: 1fr; }.material-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .material-field-grid { grid-template-columns: 1fr; }.material-field-wide { grid-column: auto; }.material-editor-card { padding: 14px; }.material-summary-card strong { font-size: 20px; }.material-custom-row { grid-template-columns: 1fr; } }

/* Final detail-page readability overrides */
.profile-title-line h1 { font-size: 38px; }
.profile-code { font-size: 15px; }
.profile-status { font-size: 14px; }
.profile-section-heading h2 { font-size: 24px; }
.profile-section-heading .secondary-button { min-height: 42px; padding: 0 16px; font-size: 14px; }
.profile-facts span, .basic-info-grid span, .detail-definition-grid span { font-size: 15px; }
.profile-facts strong, .basic-info-grid strong, .detail-definition-grid strong { font-size: 16px; }
.profile-facts > div { grid-template-columns: 92px 1fr; min-height: 62px; }
.profile-tabs button { min-height: 44px; padding: 0 22px; font-size: 15px; }
.profile-section { min-height: 340px; padding: 30px; }
.basic-info-grid > div { min-height: 92px; padding: 18px; }
.custom-notes { grid-template-columns: 92px 1fr; margin-top: 24px; padding: 20px; }
.custom-notes span { font-size: 15px; }
.custom-notes textarea { min-height: 78px; font-size: 16px; }
.detail-definition-grid { gap: 0 38px; }
.detail-definition-grid > div { grid-template-columns: 104px minmax(0, 1fr); min-height: 66px; }
.profile-subsection { margin-top: 30px; padding-top: 22px; }
.profile-subsection h3 { margin-bottom: 14px; font-size: 16px; }
.profile-edit-actions { margin-top: 14px; }
.profile-edit-actions .text-button, .profile-subsection-heading .text-button { font-size: 14px; }
.profile-mini-table th, .profile-mini-table td { padding: 16px 14px; font-size: 15px; }
.profile-mini-table th { font-size: 14px; }
.profile-operation-total { display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; margin-top: 18px; color: #6c767d; font-size: 14px; }
.profile-operation-total strong { color: #2f6f9f; font-size: 18px; font-weight: 600; }
.profile-operation-total span + span { color: #a0a8ad; }
.operation-input { width: 100%; min-width: 0; height: 40px; padding: 0 10px; color: #45515a; border: 1px solid #8fc3ee; border-radius: 5px; outline: 0; background: #f7fbff; font-size: 14px; }
.operation-input:focus { box-shadow: 0 0 0 3px rgba(36, 144, 239, .1); }
.operation-code-input { color: #4a78a0; background: #eef6fd; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.profile-mini-table td:has(.operation-input) { padding: 7px; }
.profile-action-heading, .profile-action-cell { min-width: 148px; }
.operation-row-actions { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.icon-text-button { display: inline-grid; width: 27px; height: 27px; place-items: center; color: #4d7da5; border: 1px solid #c8ddec; border-radius: 4px; background: #f7fbff; font-size: 15px; line-height: 1; }
.icon-text-button:hover { color: #fff; border-color: var(--accent); background: var(--accent); }
.profile-delete-button { font-size: 13px; }
.form-field textarea { width: 100%; min-height: 92px; padding: 10px; color: var(--text); border: 1px solid var(--line); border-radius: 6px; outline: 0; background: #fbfcfc; font: inherit; font-size: 14px; line-height: 1.6; resize: vertical; }
.form-field textarea:focus { border-color: #8fc3ee; box-shadow: 0 0 0 3px rgba(36, 144, 239, .1); }
.custom-notes textarea[readonly] { color: #667178; cursor: default; }
.colorway-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.colorway-card { grid-template-columns: 112px minmax(0, 1fr); gap: 18px; min-height: 154px; padding: 16px; border-radius: 9px; }
.colorway-image { min-height: 120px; border-radius: 7px; font-size: 32px; }
.colorway-copy { gap: 7px; }
.colorway-copy strong { font-size: 16px; }
.colorway-copy span { font-size: 14px; }
.colorway-edit-button { margin-top: 8px; font-size: 14px; }
.colorway-editor { margin-top: 18px; padding: 20px; border: 1px solid #cfe2f2; border-radius: 10px; background: #f8fbfe; }
.colorway-editor-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.colorway-editor-heading h3 { margin: 0; color: #3c4247; font-size: 18px; font-weight: 600; }
.colorway-editor-heading > span { color: #94a2ad; font-size: 13px; }
.colorway-editor-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; align-items: start; }
.colorway-upload-panel { display: grid; gap: 10px; }
.colorway-image-preview { display: grid; width: 150px; height: 150px; place-items: center; overflow: hidden; border: 1px dashed #b9cfdf; border-radius: 8px; background: #fff; color: #9aa8b2; font-size: 13px; }
.colorway-image-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.colorway-upload-panel .file-input-label { justify-content: center; height: 38px; font-size: 13px; }
.colorway-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.colorway-form-grid label { display: grid; gap: 6px; }
.colorway-form-grid label > span { color: #6d7880; font-size: 13px; }
.colorway-form-grid input { width: 100%; height: 42px; padding: 0 11px; color: var(--text); border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 14px; }
.colorway-form-grid input:focus { border-color: #8fc3ee; outline: 0; box-shadow: 0 0 0 3px rgba(36, 144, 239, .1); }
.colorway-editor .inline-editor-actions { margin-top: 20px; }
@media (max-width: 900px) {
  .profile-title-line h1 { font-size: 32px; }
  .profile-section { padding: 24px; }
  .colorway-list { grid-template-columns: 1fr; }
  .colorway-editor-body { grid-template-columns: 130px minmax(0, 1fr); }
  .colorway-image-preview { width: 130px; height: 130px; }
  .profile-mini-table { overflow-x: auto; }
}
@media (max-width: 620px) {
  .profile-title-line h1 { font-size: 28px; }
  .profile-section { padding: 18px; }
  .profile-facts span, .basic-info-grid span, .detail-definition-grid span, .custom-notes span { font-size: 13px; }
  .profile-facts strong, .basic-info-grid strong, .detail-definition-grid strong, .custom-notes textarea { font-size: 14px; }
  .colorway-editor-body, .colorway-form-grid { grid-template-columns: 1fr; }
  .colorway-image-preview { width: 100%; height: 180px; }
}

/* Detail readability, structured operations and compact colorway editor */
.profile-title-line h1 { font-size: 38px; }
.profile-code { font-size: 15px; }
.profile-status { font-size: 14px; }
.profile-section-heading h2 { font-size: 24px; }
.profile-section-heading .secondary-button { min-height: 42px; padding: 0 16px; font-size: 14px; }
.profile-facts span, .basic-info-grid span, .detail-definition-grid span { font-size: 15px; }
.profile-facts strong, .basic-info-grid strong, .detail-definition-grid strong { font-size: 16px; }
.profile-facts > div { grid-template-columns: 92px 1fr; min-height: 62px; }
.profile-tabs button { min-height: 44px; padding: 0 22px; font-size: 15px; }
.profile-section { min-height: 340px; padding: 30px; }
.basic-info-grid > div { min-height: 92px; padding: 18px; }
.custom-notes { grid-template-columns: 92px 1fr; margin-top: 24px; padding: 20px; }
.custom-notes span { font-size: 15px; }
.custom-notes textarea { min-height: 78px; font-size: 16px; }
.detail-definition-grid { gap: 0 38px; }
.detail-definition-grid > div { grid-template-columns: 104px minmax(0, 1fr); min-height: 66px; }
.profile-subsection { margin-top: 30px; padding-top: 22px; }
.profile-subsection h3 { margin-bottom: 14px; font-size: 16px; }
.profile-edit-actions { margin-top: 14px; }
.profile-edit-actions .text-button, .profile-subsection-heading .text-button { font-size: 14px; }
.profile-mini-table th, .profile-mini-table td { padding: 16px 14px; font-size: 15px; }
.profile-mini-table th { font-size: 14px; }
.profile-operation-total { display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; margin-top: 18px; color: #6c767d; font-size: 14px; }
.profile-operation-total strong { color: #2f6f9f; font-size: 18px; font-weight: 600; }
.profile-operation-total span + span { color: #a0a8ad; }
.operation-input { width: 100%; min-width: 0; height: 40px; padding: 0 10px; color: #45515a; border: 1px solid #8fc3ee; border-radius: 5px; outline: 0; background: #f7fbff; font-size: 14px; }
.operation-input:focus { box-shadow: 0 0 0 3px rgba(36, 144, 239, .1); }
.operation-code-input { color: #4a78a0; background: #eef6fd; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.profile-mini-table td:has(.operation-input) { padding: 7px; }
.profile-action-heading, .profile-action-cell { min-width: 148px; }
.operation-row-actions { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.icon-text-button { display: inline-grid; width: 27px; height: 27px; place-items: center; color: #4d7da5; border: 1px solid #c8ddec; border-radius: 4px; background: #f7fbff; font-size: 15px; line-height: 1; }
.icon-text-button:hover { color: #fff; border-color: var(--accent); background: var(--accent); }
.profile-delete-button { font-size: 13px; }
.form-field textarea { width: 100%; min-height: 92px; padding: 10px; color: var(--text); border: 1px solid var(--line); border-radius: 6px; outline: 0; background: #fbfcfc; font: inherit; font-size: 14px; line-height: 1.6; resize: vertical; }
.form-field textarea:focus { border-color: #8fc3ee; box-shadow: 0 0 0 3px rgba(36, 144, 239, .1); }
.custom-notes textarea[readonly] { color: #667178; cursor: default; }

.colorway-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.colorway-card { grid-template-columns: 112px minmax(0, 1fr); gap: 18px; min-height: 154px; padding: 16px; border-radius: 9px; }
.colorway-image { min-height: 120px; border-radius: 7px; font-size: 32px; }
.colorway-copy { gap: 7px; }
.colorway-copy strong { font-size: 16px; }
.colorway-copy span { font-size: 14px; }
.colorway-edit-button { margin-top: 8px; font-size: 14px; }
.colorway-editor { margin-top: 18px; padding: 20px; border: 1px solid #cfe2f2; border-radius: 10px; background: #f8fbfe; }
.colorway-editor-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.colorway-editor-heading h3 { margin: 0; color: #3c4247; font-size: 18px; font-weight: 600; }
.colorway-editor-heading > span { color: #94a2ad; font-size: 13px; }
.colorway-editor-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; align-items: start; }
.colorway-upload-panel { display: grid; gap: 10px; }
.colorway-image-preview { display: grid; width: 150px; height: 150px; place-items: center; overflow: hidden; border: 1px dashed #b9cfdf; border-radius: 8px; background: #fff; color: #9aa8b2; font-size: 13px; }
.colorway-image-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.colorway-upload-panel .file-input-label { justify-content: center; height: 38px; font-size: 13px; }
.colorway-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.colorway-form-grid label { display: grid; gap: 6px; }
.colorway-form-grid label > span { color: #6d7880; font-size: 13px; }
.colorway-form-grid input { width: 100%; height: 42px; padding: 0 11px; color: var(--text); border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 14px; }
.colorway-form-grid input:focus { border-color: #8fc3ee; outline: 0; box-shadow: 0 0 0 3px rgba(36, 144, 239, .1); }
.colorway-editor .inline-editor-actions { margin-top: 20px; }

@media (max-width: 900px) {
  .profile-title-line h1 { font-size: 32px; }
  .profile-section { padding: 24px; }
  .colorway-list { grid-template-columns: 1fr; }
  .colorway-editor-body { grid-template-columns: 130px minmax(0, 1fr); }
  .colorway-image-preview { width: 130px; height: 130px; }
  .profile-mini-table { overflow-x: auto; }
}
@media (max-width: 620px) {
  .profile-title-line h1 { font-size: 28px; }
  .profile-section { padding: 18px; }
  .profile-facts span, .basic-info-grid span, .detail-definition-grid span, .custom-notes span { font-size: 13px; }
  .profile-facts strong, .basic-info-grid strong, .detail-definition-grid strong, .custom-notes textarea { font-size: 14px; }
  .colorway-editor-body, .colorway-form-grid { grid-template-columns: 1fr; }
  .colorway-image-preview { width: 100%; height: 180px; }
}
.profile-header { min-height: 122px; }
.profile-title-line h1 { font-size: 30px; }
.profile-code { font-size: 12px; }
.profile-actions { padding-top: 31px; }
.profile-status { padding: 6px 10px; font-size: 11px; }
.product-overview { gap: 32px; min-height: 314px; padding: 26px; }
.style-image-dropzone { min-height: 270px; }
.image-helper { font-size: 11px; }
.profile-facts { gap: 0 34px; }
.profile-facts > div { grid-template-columns: 78px 1fr; min-height: 51px; }
.profile-facts span, .basic-info-grid span, .detail-definition-grid span { font-size: 12px; }
.profile-facts strong, .basic-info-grid strong, .detail-definition-grid strong { font-size: 13px; }
.profile-tabs { margin: 17px 0 16px; padding: 4px; }
.profile-tabs button { min-height: 38px; padding: 0 18px; font-size: 13px; }
.profile-section { min-height: 300px; padding: 24px; }
.profile-section-heading { margin-bottom: 22px; }
.profile-section-heading h2 { font-size: 19px; }
.basic-info-grid > div { min-height: 78px; padding: 15px; }
.custom-notes { margin-top: 20px; padding: 16px; }
.custom-notes span { font-size: 12px; }
.custom-notes textarea { min-height: 62px; font-size: 13px; }
.detail-definition-grid > div { min-height: 53px; }
.profile-mini-table th, .profile-mini-table td { padding: 13px 11px; font-size: 12px; }
.file-card { min-height: 120px; padding: 16px; }
.file-card strong { font-size: 13px; }
.file-card span { font-size: 12px; }
.file-card small { font-size: 11px; }
.profile-section-heading .secondary-button { min-height: 36px; }
.editable-cell[contenteditable="true"], .editable-structure-value[contenteditable="true"], .editable-file-value[contenteditable="true"] { min-width: 42px; padding: 4px 6px; border: 1px solid #8fc3ee; border-radius: 4px; outline: 0; background: #f7fbff; box-shadow: 0 0 0 2px rgba(36, 144, 239, .08); }
.editable-structure-value[contenteditable="true"] { display: block; }
.secondary-button.is-editing { color: #fff; border-color: var(--accent); background: var(--accent); }
.colorway-edit-button { margin-top: 3px; font-size: 12px; }
@media (max-width: 900px) { .product-overview { grid-template-columns: 1fr; }.profile-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }.basic-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.detail-definition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.colorway-list { grid-template-columns: 1fr; }.file-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.inline-editor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .profile-header { display: block; }.profile-actions { padding-top: 0; }.profile-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }.custom-notes { grid-template-columns: 1fr; gap: 7px; }.detail-definition-grid, .basic-info-grid, .inline-editor-grid, .file-card-grid { grid-template-columns: 1fr; } }
.profile-header { min-height: 122px; }
.profile-title-line h1 { font-size: 30px; }
.profile-code { font-size: 12px; }
.profile-actions { padding-top: 31px; }
.profile-status { padding: 6px 10px; font-size: 11px; }
.product-overview { gap: 32px; min-height: 314px; padding: 26px; }
.style-image-dropzone { min-height: 270px; }
.image-helper { font-size: 11px; }
.profile-facts { gap: 0 34px; }
.profile-facts > div { grid-template-columns: 78px 1fr; min-height: 51px; }
.profile-facts span, .basic-info-grid span, .detail-definition-grid span { font-size: 12px; }
.profile-facts strong, .basic-info-grid strong, .detail-definition-grid strong { font-size: 13px; }
.profile-tabs { margin: 17px 0 16px; padding: 4px; }
.profile-tabs button { min-height: 38px; padding: 0 18px; font-size: 13px; }
.profile-section { min-height: 300px; padding: 24px; }
.profile-section-heading { margin-bottom: 22px; }
.profile-section-heading h2 { font-size: 19px; }
.basic-info-grid > div { min-height: 78px; padding: 15px; }
.custom-notes { margin-top: 20px; padding: 16px; }
.custom-notes span { font-size: 12px; }
.custom-notes textarea { min-height: 62px; font-size: 13px; }
.detail-definition-grid > div { min-height: 53px; }
.profile-mini-table th, .profile-mini-table td { padding: 13px 11px; font-size: 12px; }
.file-card { min-height: 120px; padding: 16px; }
.file-card strong { font-size: 13px; }
.file-card span { font-size: 12px; }
.file-card small { font-size: 11px; }
.profile-section-heading .secondary-button { min-height: 36px; }
.editable-cell[contenteditable="true"], .editable-structure-value[contenteditable="true"], .editable-file-value[contenteditable="true"] { min-width: 42px; padding: 4px 6px; border: 1px solid #8fc3ee; border-radius: 4px; outline: 0; background: #f7fbff; box-shadow: 0 0 0 2px rgba(36, 144, 239, .08); }
.editable-structure-value[contenteditable="true"] { display: block; }
.secondary-button.is-editing { color: #fff; border-color: var(--accent); background: var(--accent); }
.colorway-edit-button { margin-top: 3px; font-size: 12px; }
@media (max-width: 900px) { .product-overview { grid-template-columns: 1fr; }.profile-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }.basic-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.detail-definition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.colorway-list { grid-template-columns: 1fr; }.file-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.inline-editor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .profile-header { display: block; }.profile-actions { padding-top: 0; }.profile-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }.custom-notes { grid-template-columns: 1fr; gap: 7px; }.detail-definition-grid, .basic-info-grid, .inline-editor-grid, .file-card-grid { grid-template-columns: 1fr; } }

/* Larger working canvas for production records */
body { font-size: 15px; }
.page-content { max-width: 1480px; padding: 36px 32px 64px; }
.page-header { min-height: 112px; }
.page-description { font-size: 14px; }
h1 { font-size: 30px; }
.primary-button { min-height: 42px; padding: 0 17px; font-size: 13px; }
.resource-tabs { margin-bottom: 16px; padding: 4px; }
.resource-tabs button { min-height: 38px; padding: 0 17px; font-size: 13px; }
.records-panel { padding: 21px 22px 23px; }
.record-search { width: min(430px, 100%); height: 41px; }
.record-search input { font-size: 13px; }
.filter-button { min-height: 38px; font-size: 12px; }
.record-summary { margin-top: 17px; font-size: 12px; }
.record-table th, .record-table td { padding-top: 14px; padding-bottom: 14px; }
.record-table th { font-size: 12px; }
.record-table td { font-size: 12px; }
.record-table td:first-child { font-size: 12px; }
.record-status { padding: 4px 9px; font-size: 11px; }
.profile-header { min-height: 122px; }
.profile-title-line h1 { font-size: 30px; }
.profile-code { font-size: 12px; }
.profile-actions { padding-top: 31px; }
.profile-status { padding: 6px 10px; font-size: 11px; }
.product-overview { gap: 32px; min-height: 314px; padding: 26px; }
.style-image-dropzone { min-height: 270px; }
.image-helper { font-size: 11px; }
.profile-facts { gap: 0 34px; }
.profile-facts > div { grid-template-columns: 78px 1fr; min-height: 51px; }
.profile-facts span, .basic-info-grid span, .detail-definition-grid span { font-size: 12px; }
.profile-facts strong, .basic-info-grid strong, .detail-definition-grid strong { font-size: 13px; }
.profile-tabs { margin: 17px 0 16px; padding: 4px; }
.profile-tabs button { min-height: 38px; padding: 0 18px; font-size: 13px; }
.profile-section { min-height: 300px; padding: 24px; }
.profile-section-heading { margin-bottom: 22px; }
.profile-section-heading h2 { font-size: 19px; }
.basic-info-grid > div { min-height: 78px; padding: 15px; }
.custom-notes { margin-top: 20px; padding: 16px; }
.custom-notes span { font-size: 12px; }
.custom-notes textarea { min-height: 62px; font-size: 13px; }
.detail-definition-grid > div { min-height: 53px; }
.profile-mini-table th, .profile-mini-table td { padding: 13px 11px; font-size: 12px; }
.file-card { min-height: 120px; padding: 16px; }
.file-card strong { font-size: 13px; }
.file-card span { font-size: 12px; }
.file-card small { font-size: 11px; }
.profile-section-heading .secondary-button { min-height: 36px; }
.editable-cell[contenteditable="true"], .editable-structure-value[contenteditable="true"], .editable-file-value[contenteditable="true"] { min-width: 42px; padding: 4px 6px; border: 1px solid #8fc3ee; border-radius: 4px; outline: 0; background: #f7fbff; box-shadow: 0 0 0 2px rgba(36, 144, 239, .08); }
.editable-structure-value[contenteditable="true"] { display: block; }
.secondary-button.is-editing { color: #fff; border-color: var(--accent); background: var(--accent); }
.colorway-edit-button { margin-top: 3px; font-size: 12px; }
@media (max-width: 900px) { .page-content { padding: 30px 24px 52px; }.product-overview { grid-template-columns: 1fr; }.profile-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }.basic-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.detail-definition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.colorway-list { grid-template-columns: 1fr; }.file-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.inline-editor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .page-content { padding: 24px 16px 42px; }.profile-header { display: block; }.profile-actions { padding-top: 0; }.profile-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }.custom-notes { grid-template-columns: 1fr; gap: 7px; }.detail-definition-grid, .basic-info-grid, .inline-editor-grid, .file-card-grid { grid-template-columns: 1fr; } }
.record-status.active { color: #317cba; background: var(--accent-soft); }
.record-status.neutral { color: #858c91; background: #f0f2f3; }
.record-table tr.is-clickable { cursor: pointer; }
.record-table tr.is-clickable:hover td { background: var(--accent-soft); }

.profile-header { display: flex; min-height: 104px; align-items: flex-start; justify-content: space-between; gap: 20px; }
.back-link { display: inline-flex; margin: 0 0 13px; padding: 0; color: #7d858a; background: transparent; font-size: 11px; }
.back-link:hover { color: var(--accent-dark); }
.profile-title-line { display: flex; align-items: baseline; gap: 12px; }
.profile-title-line h1 { margin-bottom: 0; }
.profile-code { color: #4a78a0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.profile-actions { display: flex; align-items: center; gap: 10px; padding-top: 25px; }
.profile-status { display: inline-flex; padding: 5px 9px; color: #317cba; border-radius: 5px; background: var(--accent-soft); font-size: 10px; }
.product-overview { display: grid; grid-template-columns: minmax(230px, .7fr) minmax(0, 1.3fr); gap: 24px; min-height: 262px; padding: 20px; }
.product-media-column { min-width: 0; }
.style-image-dropzone { position: relative; display: grid; min-height: 220px; place-items: center; overflow: hidden; border: 1px dashed #cfd7dd; border-radius: 8px; background: #f7f9fa; color: #8e989f; cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.style-image-dropzone:hover, .style-image-dropzone.is-dragover { border-color: #76b7ee; background: var(--accent-soft); }
.style-image-empty { display: grid; justify-items: center; gap: 7px; text-align: center; }
.style-image-empty strong { color: #68747c; font-size: 13px; font-weight: 500; }
.style-image-empty span { color: #9aa4ab; font-size: 10px; }
.style-image-gallery { display: grid; width: 100%; height: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 7px; }
.style-image-thumb { min-height: 104px; overflow: hidden; border-radius: 6px; background: #eef1f3; }
.style-image-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.image-helper { margin: 8px 0 0; color: #9aa3a9; font-size: 10px; text-align: center; }
.profile-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: center; gap: 0 28px; }
.profile-facts > div { display: grid; grid-template-columns: 72px 1fr; align-items: center; min-height: 42px; border-bottom: 1px solid var(--line-soft); }
.profile-facts span, .basic-info-grid span, .detail-definition-grid span { color: #8c959b; font-size: 11px; }
.profile-facts strong, .basic-info-grid strong, .detail-definition-grid strong { overflow: hidden; color: #4a5258; font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.profile-tabs { display: flex; gap: 3px; margin: 14px 0 12px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: #f2f3f4; overflow-x: auto; }
.profile-tabs button { min-height: 32px; padding: 0 16px; color: #81888d; border-radius: 5px; background: transparent; font-size: 11px; white-space: nowrap; }
.profile-tabs button:hover { color: #4b5358; }.profile-tabs button.is-active { color: #3b5f7b; background: #fff; box-shadow: 0 1px 2px rgba(24, 32, 38, .06); font-weight: 500; }
.profile-section { display: none; min-height: 240px; }.profile-section.is-active { display: block; }
.profile-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }.profile-section-heading h2 { margin: 0; color: #3c4247; font-size: 16px; font-weight: 500; }
.basic-info-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line-soft); border-radius: 7px; overflow: hidden; }
.basic-info-grid > div { display: grid; gap: 4px; min-height: 64px; padding: 12px; background: #fbfcfc; }
.custom-notes { display: grid; grid-template-columns: 74px 1fr; gap: 16px; margin-top: 16px; padding: 13px; border-radius: 7px; background: #f7f9fa; }.custom-notes span { color: #8c959b; font-size: 11px; }.custom-notes p { margin: 0; color: #667178; font-size: 12px; }.custom-notes textarea { width: 100%; min-height: 52px; padding: 0; color: #667178; border: 0; outline: 0; resize: vertical; background: transparent; font: inherit; font-size: 12px; line-height: 1.6; }.custom-notes textarea::placeholder { color: #a5adb2; }
.detail-definition-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }.detail-definition-grid > div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; align-items: center; min-height: 45px; border-bottom: 1px solid var(--line-soft); }
.profile-subsection { margin-top: 24px; padding-top: 17px; border-top: 1px solid var(--line-soft); }.profile-subsection h3 { margin: 0 0 10px; color: #5c666c; font-size: 12px; font-weight: 500; }
.profile-subsection-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.profile-subsection-heading h3 { margin-bottom: 0; }
.profile-edit-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.profile-subsection-heading .profile-edit-actions { margin-top: 0; }
.structure-edit-row { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(110px, .8fr) minmax(180px, 1.4fr) 58px; gap: 8px; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line-soft); }
.structure-edit-row input { width: 100%; height: 35px; padding: 0 9px; color: #4a5258; border: 1px solid #8fc3ee; border-radius: 5px; outline: 0; background: #f7fbff; font: inherit; font-size: 12px; }
.profile-delete-button { color: #a16d6d; font-size: 11px; }
.profile-delete-button:hover { color: #bd4f4f; }
.profile-action-heading, .profile-action-cell { width: 70px; }
.colorway-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }.colorway-card { display: grid; grid-template-columns: 82px 1fr; gap: 13px; padding: 11px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }.colorway-image { display: grid; min-height: 98px; place-items: center; overflow: hidden; border-radius: 5px; background: linear-gradient(135deg, #232323, #777); color: #fff; font-size: 25px; }.colorway-image img { display: block; width: 100%; height: 100%; object-fit: cover; }.colorway-copy { display: grid; align-content: center; gap: 5px; }.colorway-copy strong { color: #4a5258; font-size: 12px; font-weight: 500; }.colorway-copy span { color: #8c959b; font-size: 10px; }
.inline-editor { margin-top: 12px; padding: 13px; border: 1px solid #d8e7f4; border-radius: 7px; background: #f7fbff; }.inline-editor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }.inline-editor input, .file-input-label { display: flex; width: 100%; height: 34px; align-items: center; padding: 0 9px; color: #59636a; border: 1px solid var(--line); border-radius: 5px; background: #fff; font-size: 10px; }.file-input-label { color: #4b78a0; cursor: pointer; }.file-input-label:hover { background: var(--accent-soft); }.inline-editor-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 12px; }
.profile-mini-table { overflow-x: auto; }.profile-mini-table table { min-width: 560px; }.profile-mini-table th, .profile-mini-table td { padding: 10px 9px; }.profile-mini-table th { background: #fafbfb; }.profile-empty { display: grid; min-height: 120px; place-items: center; color: #9da4a8; font-size: 11px; }
.file-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }.file-card { display: grid; gap: 5px; min-height: 100px; padding: 13px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfc; }.file-card strong { color: #4a78a0; font-size: 12px; font-weight: 500; }.file-card span { color: #737d84; font-size: 10px; }.file-card small { color: #a0a8ad; font-size: 9px; }
@media (max-width: 900px) { .product-overview { grid-template-columns: 1fr; }.profile-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }.basic-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.detail-definition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.colorway-list { grid-template-columns: 1fr; }.file-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.inline-editor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .profile-header { display: block; }.profile-actions { padding-top: 0; }.profile-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }.custom-notes { grid-template-columns: 1fr; gap: 7px; }.detail-definition-grid, .basic-info-grid, .inline-editor-grid, .file-card-grid { grid-template-columns: 1fr; } }
.page-header h1 { font-size: 36px; }
.page-header .eyebrow { font-size: 13px; }
.page-header .page-description { font-size: 16px; }
.resource-tabs button { min-height: 42px; padding-right: 21px; padding-left: 21px; font-size: 15px; }
.record-search { height: 46px; }
.record-search input { font-size: 15px; }
.filter-button { min-height: 42px; font-size: 14px; }
.record-summary { font-size: 14px; }
.record-summary .text-button { font-size: 14px; }
.record-table th { font-size: 14px; }
.record-table td { font-size: 15px; }
.record-table td:first-child { font-size: 14px; }
.record-status { padding: 5px 10px; font-size: 13px; }
.record-image-heading { width: 84px; }
.record-image-cell { width: 84px; padding-right: 4px !important; padding-left: 4px !important; }
.record-image-preview, .record-image-placeholder { display: grid; width: 58px; height: 68px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #f2f5f6; color: #7d9aad; font-size: 20px; font-weight: 500; }
.record-image-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Effective detail-page readability overrides */
.profile-subsection-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-top: 18px; }
.profile-subsection-footer .profile-edit-actions { margin-top: 0; }
.profile-add-link { display: inline-flex; min-height: 38px; align-items: center; padding: 0 13px; color: #1d6fa9; border: 1px solid #9bc9ee; border-radius: 6px; background: #edf7ff; font-size: 14px; font-weight: 600; }
.profile-add-link:hover { color: #fff; border-color: var(--accent); background: var(--accent); }
.detail-definition-grid .structure-edit-row { grid-column: 1 / -1; grid-template-columns: minmax(140px, .35fr) minmax(0, 1fr) 58px !important; align-items: center; min-height: 58px; }
.structure-edit-row input { height: 42px; font-size: 14px; }
.piece-input, .size-cell-input, .size-header-edit input { width: 100%; height: 42px; padding: 0 10px; color: #45515a; border: 1px solid #8fc3ee; border-radius: 5px; outline: 0; background: #f7fbff; font-size: 14px; }
.piece-code-input { color: #4a78a0; background: #eef6fd; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.size-editor-table th, .size-editor-table td { padding: 8px; }
.size-header-edit { display: flex; align-items: center; gap: 5px; }
.size-header-edit input { border-color: #c8ddec; background: #fff; font-weight: 600; }
.size-column-delete { color: #a16d6d; font-size: 19px; }
.colorway-form-column { min-width: 0; }
.colorway-fields-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 10px; color: #65727b; font-size: 14px; font-weight: 600; }
.colorway-fields-heading .profile-add-link { min-height: 32px; padding: 0 10px; font-size: 13px; font-weight: 500; }
.colorway-fields { display: grid; gap: 9px; }
.colorway-field-row { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(0, 1.5fr) 46px; gap: 9px; align-items: center; }
.colorway-field-row input { width: 100%; height: 40px; padding: 0 10px; color: #45515a; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 14px; }
.colorway-field-row input:focus { border-color: #8fc3ee; outline: 0; box-shadow: 0 0 0 3px rgba(36, 144, 239, .1); }
.colorway-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.colorway-delete-button { color: #a16d6d; font-size: 13px; }
.colorway-delete-button:hover { color: #bd4f4f; }
.profile-title-line h1 { font-size: 38px; }
.profile-code { font-size: 15px; }
.profile-status { font-size: 14px; }
.profile-section-heading h2 { font-size: 24px; }
.profile-section-heading .secondary-button { min-height: 42px; padding: 0 16px; font-size: 14px; }
.profile-facts span, .basic-info-grid span, .detail-definition-grid span { font-size: 15px; }
.profile-facts strong, .basic-info-grid strong, .detail-definition-grid strong { font-size: 16px; }
.profile-facts > div { grid-template-columns: 92px 1fr; min-height: 62px; }
.profile-tabs button { min-height: 44px; padding: 0 22px; font-size: 15px; }
.profile-section { min-height: 340px; padding: 30px; }
.basic-info-grid > div { min-height: 92px; padding: 18px; }
.custom-notes { grid-template-columns: 92px 1fr; margin-top: 24px; padding: 20px; }
.custom-notes span { font-size: 15px; }
.custom-notes textarea { min-height: 78px; font-size: 16px; }
.detail-definition-grid { gap: 0 38px; }
.detail-definition-grid > div { grid-template-columns: 104px minmax(0, 1fr); min-height: 66px; }
.profile-subsection { margin-top: 30px; padding-top: 22px; }
.profile-subsection h3 { margin-bottom: 14px; font-size: 16px; }
.profile-edit-actions .text-button, .profile-subsection-heading .text-button { font-size: 14px; }
.profile-mini-table th, .profile-mini-table td { padding: 16px 14px; font-size: 15px; }
.profile-mini-table th { font-size: 14px; }
.profile-operation-total { display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; margin-top: 18px; color: #6c767d; font-size: 14px; }
.profile-operation-total strong { color: #2f6f9f; font-size: 18px; font-weight: 600; }
.operation-input { width: 100%; min-width: 0; height: 40px; padding: 0 10px; color: #45515a; border: 1px solid #8fc3ee; border-radius: 5px; outline: 0; background: #f7fbff; font-size: 14px; }
.operation-code-input { color: #4a78a0; background: #eef6fd; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.profile-mini-table td:has(.operation-input) { padding: 7px; }
.profile-action-heading, .profile-action-cell { min-width: 148px; }
.operation-row-actions { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.icon-text-button { display: inline-grid; width: 27px; height: 27px; place-items: center; color: #4d7da5; border: 1px solid #c8ddec; border-radius: 4px; background: #f7fbff; font-size: 15px; }
.form-field textarea { width: 100%; min-height: 92px; padding: 10px; color: var(--text); border: 1px solid var(--line); border-radius: 6px; outline: 0; background: #fbfcfc; font: inherit; font-size: 14px; line-height: 1.6; resize: vertical; }
.custom-notes textarea[readonly] { color: #667178; cursor: default; }
.colorway-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.colorway-card { grid-template-columns: 112px minmax(0, 1fr); gap: 18px; min-height: 154px; padding: 16px; border-radius: 9px; }
.colorway-image { min-height: 120px; border-radius: 7px; font-size: 32px; }
.colorway-copy { gap: 7px; }
.colorway-copy strong { font-size: 16px; }
.colorway-copy span { font-size: 14px; }
.colorway-edit-button { margin-top: 8px; font-size: 14px; }
.colorway-editor { margin-top: 18px; padding: 20px; border: 1px solid #cfe2f2; border-radius: 10px; background: #f8fbfe; }
.colorway-editor-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.colorway-editor-heading h3 { margin: 0; color: #3c4247; font-size: 18px; font-weight: 600; }
.colorway-editor-heading > span { color: #94a2ad; font-size: 13px; }
.colorway-editor-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; align-items: start; }
.colorway-upload-panel { display: grid; gap: 10px; }
.colorway-image-preview { display: grid; width: 150px; height: 150px; place-items: center; overflow: hidden; border: 1px dashed #b9cfdf; border-radius: 8px; background: #fff; color: #9aa8b2; font-size: 13px; }
.colorway-image-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.colorway-upload-panel .file-input-label { justify-content: center; height: 38px; font-size: 13px; }
.colorway-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.colorway-form-grid label { display: grid; gap: 6px; }
.colorway-form-grid label > span { color: #6d7880; font-size: 13px; }
.colorway-form-grid input { width: 100%; height: 42px; padding: 0 11px; color: var(--text); border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 14px; }
.colorway-editor .inline-editor-actions { margin-top: 20px; }
@media (max-width: 900px) { .profile-title-line h1 { font-size: 32px; } .profile-section { padding: 24px; } .colorway-list { grid-template-columns: 1fr; } .colorway-editor-body { grid-template-columns: 130px minmax(0, 1fr); } .colorway-image-preview { width: 130px; height: 130px; } }
@media (max-width: 620px) { .profile-title-line h1 { font-size: 28px; } .profile-section { padding: 18px; } .profile-facts span, .basic-info-grid span, .detail-definition-grid span, .custom-notes span { font-size: 13px; } .profile-facts strong, .basic-info-grid strong, .detail-definition-grid strong, .custom-notes textarea { font-size: 14px; } .colorway-editor-body, .colorway-form-grid { grid-template-columns: 1fr; } .colorway-image-preview { width: 100%; height: 180px; } }
@media (max-width: 900px) { .page-header h1 { font-size: 32px; }.page-header .page-description { font-size: 14px; }.record-table th { font-size: 13px; }.record-table td { font-size: 14px; } }

/* 生产进度：状态既用颜色也用中文，外发厂名允许换行。 */
.production-stage { display: inline-flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 7px; background: #f1f3f5; color: #64748b; min-width: 88px; }
.production-stage.active { background: #e8f1ff; color: #2563eb; }
.production-stage.done { background: #e7f6ee; color: #15803d; }
.production-stage.overdue { background: #fff0f0; color: #dc2626; }
.production-stage.missing { background: transparent; }
.production-stage-button { border: 0; padding: 0; background: transparent; cursor: pointer; text-align: left; }
.production-stage-button:hover { outline: 2px solid #9cbbe8; border-radius: 7px; }
.production-filters { flex-wrap: wrap; gap: 12px; }
.production-filters label { display: flex; align-items: center; gap: 5px; }
.production-filters .combo { min-width: 180px; }
.production-board td { vertical-align: middle; }
