:root {
  color-scheme: light;
  --ink: #17221b;
  --muted: #607067;
  --pine: #173f2a;
  --bamboo: #c99a4d;
  --mist: #edf3ee;
  --paper: #f7f8f5;
  --line: #d8dfd9;
  --white: #ffffff;
  --shadow: 0 10px 28px rgba(24, 45, 31, .09);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 Arial, Helvetica, sans-serif; }
a { color: inherit; }
.site-header { height: 76px; padding: 0 4vw; background: var(--pine); color: white; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; font-weight: 700; color: var(--bamboo); }
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: .12em; }
.brand small { color: #cfdbd2; font-size: 13px; }
.header-nav { display: flex; align-items: center; gap: 20px; }
.header-nav a { color: #e7f0e9; font-size: 14px; font-weight: 700; text-decoration: none; }
.header-nav a:hover { text-decoration: underline; }
.local-badge { padding: 7px 11px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; color: #dce8df; font-size: 13px; }
.catalog-shell, .detail-shell { width: min(1480px, 92vw); margin: 0 auto; padding: 38px 0 70px; }
.catalog-heading, .product-header, .section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.eyebrow, .family, .asset-kind { margin: 0 0 5px; color: #52705d; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.05; letter-spacing: -.035em; }
.counts { display: flex; gap: 10px; flex-wrap: wrap; }
.counts span { min-width: 112px; padding: 12px 14px; background: white; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.counts strong { display: block; color: var(--pine); font-size: 22px; }
.filters { margin: 28px 0; padding: 16px; display: grid; grid-template-columns: minmax(240px, 1fr) minmax(210px, 280px) auto; gap: 14px; align-items: end; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
label span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
input, select, button { min-height: 46px; width: 100%; border: 1px solid #b9c6bc; border-radius: 8px; background: white; color: var(--ink); font: inherit; padding: 0 12px; }
button, .primary-action { border-color: var(--pine); background: var(--pine); color: white; font-weight: 700; cursor: pointer; text-decoration: none; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.product-card { overflow: hidden; display: grid; grid-template-rows: 190px 1fr; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); text-decoration: none; transition: transform .16s ease, box-shadow .16s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(24,45,31,.14); }
.product-image { background: #dfe8e1; display: grid; place-items: center; overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-placeholder { font-size: 54px; font-weight: 700; color: rgba(23,63,42,.32); }
.product-copy { padding: 18px; display: flex; flex-direction: column; min-width: 0; }
.product-copy h2 { margin: 0 0 8px; font-size: 21px; }
.product-copy p { margin: 0 0 16px; color: var(--muted); }
.asset-count { color: var(--pine); font-size: 14px; font-weight: 700; margin-top: auto; }
.asset-count-number { font-size: 16px; }
.upload-form { display: grid; gap: 18px; }
.upload-form label { display: grid; gap: 8px; font-weight: 700; }
.upload-form textarea { width: 100%; padding: 12px; font: inherit; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
.upload-form button { justify-self: start; }
.upload-form button:disabled { background: #d6d9d7; border-color: #d6d9d7; color: #646b67; cursor: not-allowed; opacity: 1; }
.product-card.product-card-no-assets, .product-list-group.product-card-no-assets { border-color: #c53030; box-shadow: 0 0 0 2px rgba(197, 48, 48, .25), 0 0 18px rgba(197, 48, 48, .25); }
.product-card-no-assets .asset-count { color: #c53030; text-decoration: none; }
.back-link { display: inline-block; margin-bottom: 26px; color: var(--pine); font-weight: 700; text-decoration: none; }
.product-header { align-items: start; padding: 0 0 30px; border-bottom: 1px solid var(--line); }
.product-name { max-width: 900px; margin: 10px 0; font-size: 20px; color: #34453a; }
.description { max-width: 840px; color: var(--muted); }
.asset-total { min-width: 145px; padding: 16px; background: var(--pine); color: white; border-radius: 12px; text-align: center; }
.asset-total strong, .asset-total span { display: block; }
.asset-total strong { font-size: 32px; }
.asset-total span { color: #d4e2d7; }
.spec-panel { margin: 28px 0; padding: 24px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.spec-panel h2, .assets-section h2 { margin: 0 0 18px; }
.spec-grid { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.spec-grid div { min-height: 80px; padding: 13px; background: white; }
dt { color: var(--muted); font-size: 13px; font-weight: 700; }
dd { margin: 6px 0 0; }
.assets-section { margin-top: 36px; }
.section-heading { align-items: center; }
.section-heading span { color: var(--muted); }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.asset-card { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 14px; }
.orphan-card { display: block; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease; }
.orphan-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.orphan-filters { grid-template-columns: 1fr auto; }
.asset-preview { position: relative; height: 225px; display: grid; place-items: center; background: #e4ebe5; text-decoration: none; overflow: hidden; }
.asset-preview img, .asset-preview object { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.file-type { display: grid; place-items: center; width: 88px; height: 112px; background: white; border: 1px solid #b9c6bc; border-radius: 8px; color: var(--pine); font-weight: 800; letter-spacing: .08em; box-shadow: var(--shadow); }
.asset-preview object + .file-type { position: absolute; right: 10px; bottom: 10px; width: auto; height: auto; padding: 5px 8px; border-radius: 5px; font-size: 12px; }
.asset-copy { padding: 17px; }
.asset-copy h3 { margin: 4px 0 8px; font-size: 18px; line-height: 1.25; }
.asset-copy h3 a { text-decoration: none; }
.asset-copy p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.asset-actions { display: flex; gap: 14px; }
.asset-actions a { color: var(--pine); font-weight: 700; font-size: 14px; }
.asset-detail-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr); gap: 32px; }
.large-preview { min-height: 600px; display: grid; place-items: center; overflow: hidden; background: #e4ebe5; border-radius: 14px; }
.large-preview img, .large-preview object { width: 100%; height: 100%; max-height: 78vh; object-fit: contain; }
.asset-information { padding: 8px 0; }
.asset-information h1 { font-size: clamp(30px, 4vw, 48px); }
.metadata { margin: 26px 0; }
.metadata div { padding: 11px 0; border-bottom: 1px solid var(--line); }
.primary-action { display: inline-block; padding: 12px 16px; border-radius: 8px; }
.secondary-action { display: inline-block; color: var(--pine); font-weight: 700; }
.relationship-form { margin-top: 28px; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.relationship-form select { margin-bottom: 12px; }
.relationship-form button { margin-top: 2px; }
.form-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.review-progress { float: right; margin: 0 0 12px 18px; padding: 8px 11px; background: var(--mist); border-radius: 8px; color: var(--muted); font-size: 13px; }
.review-progress strong { color: var(--pine); }
.success-message { margin: 20px 0 0; padding: 12px 15px; background: #e5f2e8; border: 1px solid #a7c7af; border-radius: 8px; color: #1d5a31; font-weight: 700; }
.asset-information h2 { margin-top: 34px; }
.linked-products { margin: 0; padding: 0; list-style: none; }
.linked-products li { border-top: 1px solid var(--line); }
.linked-products a { display: block; padding: 13px 0; text-decoration: none; }
.linked-products strong, .linked-products span { display: block; }
.linked-products span, .empty-copy { color: var(--muted); }
.empty-state { padding: 50px; border: 1px dashed #aebbb1; background: white; border-radius: 14px; text-align: center; }
.empty-state.standalone { width: min(620px, 90vw); margin: 80px auto; }
.access-shell { width: min(1000px, calc(100% - 48px)); margin: 0 auto; padding: 44px 0 72px; }
.access-heading h1 { font-size: clamp(32px, 4vw, 46px); }
.access-heading .description { max-width: 680px; margin: 16px 0 28px; }
.access-panel { margin-top: 24px; padding: 28px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.access-panel h2 { margin: 0 0 20px; font-size: 22px; }
.access-add-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; }
.access-add-form button { width: auto; padding-inline: 22px; }
.access-user-row { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 20px 0; border-top: 1px solid var(--line); }
.access-user-info { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; min-width: 0; }
.access-user-info strong { overflow-wrap: anywhere; }
.access-status { padding: 4px 10px; background: #f0f0ed; border-radius: 999px; color: var(--muted); font-size: 13px; }
.access-status.is-enabled { background: var(--mist); color: var(--pine); }
.access-user-row form { flex-shrink: 0; }
.access-user-row button { background: white; color: var(--pine); width: auto; }
.access-error { padding: 14px 18px; background: #fff0ed; border: 1px solid #d79b90; border-radius: 8px; }
.audit-panel .section-heading h2 { margin-bottom: 0; }
.audit-intro { margin: 12px 0 20px; }
.audit-filters { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(190px, 1fr) auto auto; gap: 12px; align-items: end; margin-bottom: 22px; }
.audit-filters button { width: auto; white-space: nowrap; }
.audit-filters > a { align-self: center; margin-top: 22px; font-size: 13px; color: var(--pine); }
.audit-table-scroll { max-height: 650px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.audit-table { width: 100%; min-width: 790px; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.audit-table th { position: sticky; top: 0; padding: 12px; text-align: left; background: var(--mist); z-index: 1; }
.audit-table th:nth-child(1) { width: 16%; }
.audit-table th:nth-child(2) { width: 18%; }
.audit-table th:nth-child(3) { width: 29%; }
.audit-table th:nth-child(4) { width: 14%; }
.audit-table th:nth-child(5) { width: 23%; }
.audit-table td { padding: 14px 12px; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.audit-table td strong, .audit-table td > span, .audit-table small { display: block; }
.audit-table small { margin-top: 5px; color: var(--muted); }
.audit-table details { margin-top: 7px; }
.audit-table summary { color: var(--pine); cursor: pointer; font-size: 12px; }
.audit-table .audit-result { display: inline-block; padding: 3px 6px; border-radius: 5px; color: var(--pine); background: var(--mist); }
.audit-table .audit-result-warning { color: #9a2727; background: #fff0ed; }
.audit-pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 18px; font-size: 13px; }
.audit-pagination a { color: var(--pine); font-weight: 700; }
@media (max-width: 860px) { .audit-filters { grid-template-columns: 1fr 1fr; } .audit-filters > a { margin-top: 0; } }
@media (max-width: 600px) { .audit-filters { grid-template-columns: 1fr; } .audit-panel .section-heading { align-items: start; flex-direction: column; gap: 8px; } }
.product-filters { grid-template-columns: minmax(220px, .8fr) minmax(290px, 1fr) minmax(420px, 1.4fr); align-items: center; padding: 28px; gap: 24px; min-height: 174px; }
.product-filters input[type="search"] { min-height: 54px; }
.family-filters { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 16px; margin: 0; padding: 0; border: 0; min-width: 0; align-items: start; }
.family-controls h2 { margin: 0 0 12px; color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.5; }
.family-choice { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; min-height: 32px; }
.family-choice input[type="checkbox"] { width: 20px; height: 20px; min-height: 20px; padding: 0; margin: 0; accent-color: var(--pine); flex-shrink: 0; }
.family-choice span { margin: 0; color: var(--ink); font-size: 15px; }
.family-choice small { color: var(--muted); font-weight: 400; }
.family-all { margin-bottom: 8px; }
.family-options { display: grid; grid-auto-flow: column; grid-template-rows: repeat(6, 32px); grid-auto-columns: max-content; gap: 4px 22px; overflow-x: auto; }
.results-summary { color: var(--muted); margin: -10px 0 20px; font-size: 14px; }
.results-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 16px; }
.results-toolbar .results-summary { margin: 0; }
.view-switch { display: flex; gap: 6px; }
.view-switch button { width: 42px; min-height: 40px; padding: 2px 8px; font-size: 26px; background: white; border: 1px solid var(--line); color: var(--pine); }
.view-switch button[aria-pressed="true"] { background: var(--pine); color: white; }
.product-list-group { padding: 20px; margin-bottom: 16px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.product-list-heading { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; }
.product-list-link { color: var(--pine); text-decoration: none; }
.list-count { white-space: nowrap; font-size: 14px; }
.product-linked-assets { padding-left: 32px; margin: 16px 0 0; }
.product-linked-assets li { padding: 8px 0; }
.product-linked-assets a { color: var(--ink); }
.asset-format { margin-left: 12px; color: var(--muted); font-size: 12px; }
#unlinked-assets .product-linked-assets { padding-left: 0; list-style: none; }
.product-linked-assets .unlinked-asset-row { display: flex; align-items: baseline; gap: 10px; }
.product-linked-assets .orphan-assignment-link { flex: 0 0 auto; color: #c53030; font-size: 13px; font-weight: 700; }
.asset-bullet { flex: 0 0 auto; }
.unlinked-asset-name { min-width: 0; overflow-wrap: anywhere; }
.cad-preview-shell { width: 100%; min-width: 0; align-self: stretch; display: flex; flex-direction: column; }
.cad-preview-frame { width: 100%; height: 520px; border: 0; background: #f6f8f7; border-radius: 8px; }
.cad-preview-expand { display: block; padding: 10px; font-size: 13px; color: var(--pine); text-align: center; }
.orphan-thumbnail, .orphan-tile-type, .orphan-tile-description { display: none; }
#unlinked-assets.is-tile-view { margin-top: 18px; border-color: #c53030; box-shadow: 0 0 0 2px rgba(197, 48, 48, .25), 0 0 18px rgba(197, 48, 48, .25); }
#unlinked-assets.is-tile-view .product-linked-assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 12px; margin-top: 18px; }
#unlinked-assets.is-tile-view .unlinked-asset-row:not([hidden]) { display: flex; flex-direction: column; align-items: stretch; gap: 0; height: 320px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); box-shadow: none; overflow: hidden; }
#unlinked-assets.is-tile-view .orphan-thumbnail { display: grid; place-items: center; flex: 0 0 132px; height: 132px; margin: -4px -4px 8px; overflow: hidden; border-radius: 5px; background: #edf1ed; text-decoration: none; }
#unlinked-assets.is-tile-view .orphan-thumbnail img { width: 100%; height: 132px; object-fit: contain; }
#unlinked-assets.is-tile-view .orphan-file-placeholder { font-size: 22px; font-weight: 700; color: var(--muted); }
#unlinked-assets.is-tile-view .asset-bullet, #unlinked-assets.is-tile-view .asset-format { display: none; }
#unlinked-assets.is-tile-view .unlinked-asset-name { order: 0; }
#unlinked-assets.is-tile-view .unlinked-asset-name > a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.35; font-weight: 700; text-decoration: none; }
#unlinked-assets.is-tile-view .unlinked-asset-name > a:hover { text-decoration: underline; }
#unlinked-assets.is-tile-view .orphan-tile-type { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.35; font-weight: 700; }
#unlinked-assets.is-tile-view .orphan-tile-description { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.35; }
#unlinked-assets.is-tile-view .orphan-assignment-link { order: 1; margin-top: auto; padding-top: 8px; align-self: flex-start; }
.product-card-no-assets .list-count, .no-linked-assets { color: #c53030; }
#product-results[hidden], #product-list-results[hidden], .product-list-group[hidden], .product-linked-assets li[hidden] { display: none; }
@media (max-width: 1250px) {
  .product-filters { grid-template-columns: 1fr 1.4fr; }
  .product-filters > label { grid-column: 1 / -1; }
}
.product-card[hidden], #no-product-results[hidden] { display: none; }
@media (max-width: 960px) {
  .product-filters { grid-template-columns: 1fr; gap: 22px; padding: 22px; }
}
@media (max-width: 600px) {
  .access-shell { width: calc(100% - 32px); padding-top: 28px; }
  .access-panel { padding: 20px; }
  .access-add-form { grid-template-columns: 1fr; }
  .access-add-form button { width: 100%; }
  .access-user-row { align-items: flex-start; flex-direction: column; gap: 14px; }
}
@media (max-width: 760px) {
  .site-header { padding: 0 20px; }
  .header-nav a { display: none; }
  .catalog-shell, .detail-shell { width: min(92vw, 680px); padding-top: 26px; }
  .catalog-heading, .product-header { align-items: start; flex-direction: column; }
  .filters { grid-template-columns: 1fr; }
  .asset-detail-grid { grid-template-columns: 1fr; }
  .large-preview { min-height: 360px; }
}
