:root {
  color-scheme: light;
  --bg: #f2efe8;
  --panel: #fbfaf6;
  --ink: #1f211e;
  --muted: #74756f;
  --line: #d8d5cd;
  --green: #245943;
  --green-dark: #173d2e;
  --lime: #d8e54d;
  --red: #9e382f;
  --sidebar: #20231f;
  --sand: #e9e4d8;
  --shadow: 0 24px 80px rgba(31, 33, 30, .14);
  font-family: Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--ink); background: var(--bg); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.eyebrow { font: 600 .65rem/1.3 "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--green); }

.login-view { min-height: 100vh; padding: 34px 42px; background: linear-gradient(120deg, #eeebe3 0 61%, #e2ddd2 61%); }
.login-brand, .side-brand { display: flex; align-items: center; gap: 11px; text-transform: uppercase; }
.login-brand i, .side-brand i { width: 16px; height: 16px; display: block; background: var(--green); transform: rotate(45deg); box-shadow: 7px -7px 0 -3px var(--lime); }
.login-brand b, .side-brand b { font-size: .88rem; }
.login-brand span, .side-brand span { padding-left: 12px; border-left: 1px solid var(--line); font: 500 .62rem "JetBrains Mono", monospace; color: var(--muted); }
.login-layout { width: min(1220px, 100%); min-height: calc(100vh - 90px); margin: auto; display: grid; grid-template-columns: 1.2fr .65fr; gap: 11vw; align-items: center; }
.login-copy h1 { max-width: 760px; margin: 22px 0; font-size: clamp(4rem, 7.5vw, 7.8rem); line-height: .88; letter-spacing: -.075em; }
.login-copy p { max-width: 650px; color: var(--muted); font-size: 1.08rem; line-height: 1.6; }
.system-chain { display: flex; gap: 30px; margin-top: 60px; font: 600 .64rem "JetBrains Mono", monospace; color: var(--green); text-transform: uppercase; }
.login-card { background: var(--panel); padding: 38px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.login-card h2 { margin: 14px 0 30px; font-size: 2.2rem; letter-spacing: -.05em; }
.login-card label, .section-fields > label, .option-form-body > label { display: grid; gap: 8px; margin-bottom: 17px; }
.login-card label > span, .section-fields label > span, .option-form-body label > span, .form-grid label > span, .table-search span { font: 600 .61rem "JetBrains Mono", monospace; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.login-card input, .section-fields input, .section-fields textarea, .section-fields select, .option-form-body input, .option-form-body textarea, .option-form-body select { width: 100%; border: 1px solid var(--line); background: white; padding: 13px 14px; outline: none; border-radius: 2px; }
.login-card input:focus, .section-fields input:focus, .section-fields textarea:focus, .section-fields select:focus, .option-form-body input:focus, .option-form-body textarea:focus, .option-form-body select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(36, 89, 67, .09); }
.login-card button { width: 100%; display: flex; justify-content: space-between; border: 0; background: var(--green); color: white; padding: 15px 17px; font-weight: 700; }
.login-card small, .field-help { display: block; margin-top: 8px; color: var(--muted); font-size: .68rem; line-height: 1.4; }
.form-error { min-height: 1.2em; margin: 4px 0 12px; color: var(--red); font-size: .75rem; }

.admin-view { min-height: 100vh; display: grid; grid-template-columns: 232px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 20px; display: flex; flex-direction: column; background: var(--sidebar); color: white; }
.side-brand { padding: 0 8px 30px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.side-brand i { background: #77a88d; }
.side-brand span { border-color: rgba(255, 255, 255, .2); color: rgba(255, 255, 255, .5); }
.sidebar nav { display: grid; gap: 4px; margin-top: 24px; }
.nav-item { display: flex; align-items: center; gap: 14px; width: 100%; border: 0; background: transparent; color: rgba(255, 255, 255, .62); padding: 11px 12px; text-align: left; border-radius: 3px; font-weight: 600; }
.nav-item span { font: 500 .58rem "JetBrains Mono", monospace; color: rgba(216, 229, 77, .7); }
.nav-item:hover, .nav-item.is-active { background: rgba(255, 255, 255, .09); color: white; }
.side-system { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 15px 10px; border-block: 1px solid rgba(255, 255, 255, .12); }
.side-system i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(216, 229, 77, .1); }
.side-system div { display: grid; }
.side-system b { font-size: .68rem; }
.side-system span { margin-top: 3px; color: rgba(255, 255, 255, .48); font-size: .61rem; }
.side-link { display: flex; justify-content: space-between; margin-top: 18px; padding: 9px 10px; color: rgba(255, 255, 255, .7); font-size: .68rem; }

.workspace { min-width: 0; padding: 35px 42px 70px; }
.workspace-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.workspace-head h1 { margin: 9px 0 0; font-size: 2.5rem; letter-spacing: -.055em; }
.head-actions { display: flex; gap: 8px; align-items: center; }
.user-chip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; padding: 9px 12px; background: #e8e4dc; font-size: .68rem; }
.icon-button, .logout-button { border: 1px solid var(--line); background: transparent; padding: 9px 12px; }
.icon-button { font-size: 1.1rem; }
.icon-button.loading { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.logout-button { font-size: .68rem; }
.content-view { padding-top: 32px; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metric-card { min-height: 138px; padding: 20px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; }
.metric-card span { font: 600 .6rem "JetBrains Mono", monospace; color: var(--muted); text-transform: uppercase; }
.metric-card b { font-size: 2.6rem; letter-spacing: -.06em; }
.metric-card small { color: var(--green); font-size: .68rem; }
.control-banner { display: grid; grid-template-columns: 1fr 1.15fr auto; align-items: center; gap: 40px; margin: 18px 0; padding: 28px; background: var(--green); color: white; }
.control-banner .eyebrow { color: var(--lime); }
.control-banner h2 { margin: 9px 0 0; font-size: 1.8rem; letter-spacing: -.04em; }
.control-banner p { margin: 0; color: rgba(255, 255, 255, .7); font-size: .78rem; line-height: 1.55; }
.control-banner > b { padding: 9px 12px; border: 1px solid rgba(255, 255, 255, .25); font: 600 .62rem "JetBrains Mono", monospace; text-transform: uppercase; }
.overview-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); }
.panel-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 22px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 7px 0 0; font-size: 1.25rem; }
.panel-head button, .knowledge-head button { border: 0; background: var(--green); color: white; padding: 10px 12px; font-size: .68rem; font-weight: 700; }

.mini-project { display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; padding: 17px 22px; border-bottom: 1px solid var(--line); cursor: pointer; }
.mini-project:last-child { border-bottom: 0; }
.mini-project:hover { background: #f4f1e9; }
.mini-project b { font-size: .78rem; }
.mini-project small { grid-column: 1; color: var(--muted); font: 500 .61rem "JetBrains Mono", monospace; }
.status { display: inline-flex; align-items: center; width: max-content; padding: 5px 7px; border-radius: 100px; font-size: .58rem; font-weight: 700; }
.status-published, .status-completed, .status-current { background: #dcecdf; color: #266342; }
.status-draft, .status-planned { background: #ece6d8; color: #756445; }
.status-production { background: #e4ead0; color: #59651d; }
.status-assembly { background: #dce8ec; color: #2c5d6c; }
.status-archived, .status-retired { background: #e4e3e0; color: #666; }
.activity-list { padding: 4px 22px; }
.activity-item { display: grid; grid-template-columns: 10px 1fr; gap: 13px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.activity-item:last-child { border-bottom: 0; }
.activity-item > i { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--green); }
.activity-item div { display: grid; gap: 4px; }
.activity-item b { font-size: .72rem; line-height: 1.4; }
.activity-item span { color: var(--muted); font-size: .62rem; }
.activity-empty { padding: 30px 20px; color: var(--muted); font-size: .75rem; }

.section-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 16px; }
.section-toolbar p, .section-toolbar div p { max-width: 700px; margin: 6px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.table-search { display: grid; gap: 7px; }
.table-search input { min-width: 330px; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 7px 0; outline: none; }
.primary-button { border: 0; background: var(--green); color: white; padding: 12px 15px; font-weight: 700; font-size: .72rem; }
.primary-button:hover { background: var(--green-dark); }
.primary-button:disabled { opacity: .5; cursor: wait; }
.data-panel { overflow: hidden; }
.data-table { width: 100%; }
.table-row { display: grid; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); cursor: pointer; }
.product-table .table-row { grid-template-columns: 90px minmax(170px, 1.2fr) 90px 120px 110px 22px; }
.option-table .table-row { grid-template-columns: minmax(180px, 1.2fr) 130px 150px 100px 70px 22px; }
.table-row.table-header { background: #ebe8e0; cursor: default; padding-block: 11px; color: var(--muted); font: 600 .58rem "JetBrains Mono", monospace; text-transform: uppercase; }
.table-row:not(.table-header):hover { background: #f4f1e9; }
.table-row b { font-size: .77rem; }
.table-row small { display: block; margin-top: 3px; color: var(--muted); font-size: .61rem; }
.table-row .money { font: 600 .7rem "JetBrains Mono", monospace; }
.table-row .arrow { color: var(--green); font-weight: 800; }
.activity-full { padding-inline: 24px; }
.activity-full .activity-item { grid-template-columns: 14px minmax(220px, 1fr) 130px; }
.activity-full .activity-item > time { color: var(--muted); font: 500 .61rem "JetBrains Mono", monospace; }

.status-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.status-filters button { border: 1px solid var(--line); background: transparent; padding: 8px 11px; color: var(--muted); font-size: .65rem; }
.status-filters button.is-active { border-color: var(--green); background: var(--green); color: white; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.project-card { min-height: 225px; display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.project-card:hover { border-color: #9bab9f; box-shadow: 0 14px 35px rgba(31, 33, 30, .07); }
.project-card-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.project-card-code { font: 600 .6rem "JetBrains Mono", monospace; color: var(--green); }
.project-card h3 { margin: 28px 0 8px; font-size: 1.25rem; letter-spacing: -.035em; }
.project-card p { margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.project-card-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); font-size: .63rem; }
.project-card-foot span:last-child { color: var(--muted); text-align: right; }

.asset-list { width: 100%; }
.asset-row { display: grid; grid-template-columns: 42px minmax(220px, 1.2fr) minmax(180px, .8fr) 100px 100px 28px; gap: 16px; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--line); cursor: pointer; }
.asset-row:hover { background: #f4f1e9; }
.asset-icon { width: 38px; height: 38px; display: grid; place-items: center; background: var(--sand); color: var(--green); font: 700 .65rem "JetBrains Mono", monospace; }
.asset-main { min-width: 0; }
.asset-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .76rem; }
.asset-main small, .asset-link, .asset-meta { display: block; margin-top: 4px; color: var(--muted); font-size: .61rem; }
.asset-tag { width: max-content; padding: 5px 7px; background: #e9e5dc; color: var(--muted); font-size: .58rem; }
.asset-open { border: 0; background: transparent; color: var(--green); font-size: 1rem; }
.asset-versions-box { border: 1px solid var(--line); background: #f7f4ed; }
.asset-versions-box > header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.asset-versions-box > header div { display: grid; gap: 4px; }
.asset-versions-box > header b { font-size: .74rem; }
.asset-versions-box > header button { padding: 8px 10px; border: 1px solid var(--green); background: transparent; color: var(--green); font-size: .61rem; font-weight: 700; }
.admin-version-row { display: grid; grid-template-columns: 8px 1fr; gap: 11px; padding: 12px 16px; border-top: 1px solid var(--line); }
.admin-version-row:first-child { border-top: 0; }
.admin-version-row > i { width: 8px; height: 8px; margin-top: 4px; border: 1px solid var(--green); border-radius: 50%; }
.admin-version-row.is-current > i { background: var(--green); }
.admin-version-row b { display: block; font: 600 .62rem "JetBrains Mono", monospace; }
.admin-version-row small { display: block; margin-top: 3px; color: var(--muted); font-size: .56rem; }
.admin-version-row p { margin: 6px 0 0; color: var(--muted); font-size: .59rem; line-height: 1.45; }
.visual-pair-admin-list { display: grid; border-top: 1px solid var(--line); }
.visual-pair-admin-row { display: grid; grid-template-columns: 190px minmax(220px,1fr) 100px 20px; gap: 18px; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.visual-pair-admin-row:hover { background: #f4f1e9; }
.visual-pair-preview { display: grid; grid-template-columns: 1fr 1fr; aspect-ratio: 2.2; overflow: hidden; background: var(--sand); }
.visual-pair-preview span { display: grid; place-items: center; background: #ddd8cd center/cover no-repeat; color: var(--muted); font: 600 .48rem "JetBrains Mono", monospace; text-align: center; }
.visual-pair-preview span + span { border-left: 2px solid white; }
.visual-pair-admin-row > div:nth-child(2) > b { display: block; margin-top: 5px; font-size: .76rem; }
.visual-pair-admin-row > div:nth-child(2) > p { margin: 5px 0 0; color: var(--muted); font-size: .61rem; line-height: 1.4; }
.visual-pair-admin-meta { display: grid; gap: 7px; font-size: .57rem; }
.visual-pair-admin-meta span { color: var(--green); text-transform: uppercase; }
.visual-upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.visual-upload-grid section { display: grid; gap: 11px; padding: 15px; border: 1px solid var(--line); background: #f7f4ed; }
.visual-upload-grid section > label { display: grid; gap: 6px; }
.visual-upload-grid section > label > span { color: var(--muted); font-size: .61rem; }

.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.media-card { min-height: 260px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.media-card:hover { border-color: #9bab9f; }
.media-cover { min-height: 155px; position: relative; display: grid; place-items: center; background: linear-gradient(135deg, #d9d5ca, #b9c9be); background-position: center; background-size: cover; color: var(--green-dark); font: 700 .7rem "JetBrains Mono", monospace; }
.media-cover.video { background: #1e2923; color: white; }
.media-cover.video::after { content: "▶"; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .6); border-radius: 50%; padding-left: 3px; }
.media-card-body { display: grid; gap: 7px; padding: 15px 17px; }
.media-card-body b { font-size: .76rem; }
.media-card-body small { color: var(--muted); font-size: .61rem; }
.media-grid.compact, .project-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.media-grid.compact .media-card { min-height: 220px; }
.media-grid.compact .media-cover { min-height: 120px; }

.revision-list { display: grid; gap: 8px; }
.revision-row { display: grid; grid-template-columns: 100px 115px 130px 1fr 20px; align-items: center; gap: 15px; padding: 15px; border: 1px solid var(--line); cursor: pointer; }
.revision-row:hover { background: #f4f1e9; }
.revision-code { font: 700 .72rem "JetBrains Mono", monospace; }
.revision-row time, .revision-row p { margin: 0; color: var(--muted); font-size: .65rem; }
#revision-dialog { width: min(1060px, calc(100% - 30px)); }
.revision-editor { padding: 0; }
.revision-section { padding: 24px 26px; border-bottom: 1px solid var(--line); }
.revision-section .option-section-head { margin-bottom: 18px; }
.revision-section .option-section-head h3 { margin: 5px 0 0; font-size: 1rem; }
.revision-section .option-section-head p { margin: 5px 0 0; color: var(--muted); font-size: .63rem; line-height: 1.5; }
.outline-button { align-self: center; padding: 9px 11px; border: 1px solid var(--green); background: transparent; color: var(--green); font-size: .62rem; font-weight: 700; }
.cargo-editor, .option-spec-editor { display: grid; gap: 10px; }
.cargo-editor > .activity-empty, .option-spec-editor > .activity-empty { margin: 0; border: 1px dashed var(--line); }
.cargo-row { padding: 14px; border: 1px solid var(--line); background: #f7f5ef; }
.cargo-row-head { display: grid; grid-template-columns: 1.05fr .7fr 1.5fr 32px; gap: 9px; align-items: end; }
.cargo-dimensions { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; margin-top: 10px; }
.cargo-notes { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; margin-top: 10px; }
.cargo-row label, .option-spec-fields label { display: grid; gap: 5px; }
.cargo-row label > span, .option-spec-fields label > span { color: var(--muted); font: 600 .52rem "JetBrains Mono", monospace; text-transform: uppercase; }
.cargo-row input, .cargo-row select, .option-spec-fields input, .option-spec-fields select { min-width: 0; width: 100%; padding: 9px; border: 1px solid var(--line); background: white; font-size: .62rem; }
.cargo-row-head > button { width: 32px; height: 34px; border: 1px solid var(--line); background: transparent; color: var(--red); font-size: 1rem; }
.cargo-notes .switch-field { margin: 0 0 6px; white-space: nowrap; }
.option-spec-row { border: 1px solid var(--line); background: #f7f5ef; }
.option-spec-row > summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 14px; cursor: pointer; list-style: none; }
.option-spec-row > summary::-webkit-details-marker { display: none; }
.option-spec-row > summary div { display: grid; gap: 3px; }
.option-spec-row > summary b { font-size: .68rem; }
.option-spec-row > summary small, .option-spec-row > summary > span { color: var(--muted); font-size: .56rem; }
.option-spec-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.option-spec-notes { grid-column: span 2; }

.editor-dialog, .option-dialog { width: min(1040px, calc(100% - 30px)); max-height: calc(100vh - 30px); padding: 0; border: 0; background: var(--panel); box-shadow: 0 35px 110px rgba(0, 0, 0, .35); overflow: hidden; }
.option-dialog { width: min(720px, calc(100% - 30px)); }
.wide-dialog { width: min(850px, calc(100% - 30px)); }
.editor-dialog::backdrop, .option-dialog::backdrop { background: rgba(22, 24, 21, .7); backdrop-filter: blur(5px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px; border-bottom: 1px solid var(--line); background: #f1eee6; }
.dialog-head h2 { margin: 7px 0 0; font-size: 1.7rem; letter-spacing: -.04em; }
.close-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 1.25rem; }
.dialog-tabs { display: flex; overflow-x: auto; padding: 0 22px; border-bottom: 1px solid var(--line); background: #f8f6f0; }
.dialog-tabs button { flex: none; border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 14px 12px 12px; color: var(--muted); font-size: .66rem; font-weight: 700; }
.dialog-tabs button.is-active { border-color: var(--green); color: var(--green); }
.dialog-tabs span { display: inline-grid; place-items: center; min-width: 19px; height: 19px; margin-left: 4px; border-radius: 50%; background: #e5e1d8; font-size: .55rem; }
.editor-body { max-height: calc(100vh - 235px); overflow: auto; }
.form-section { display: grid; grid-template-columns: 60px 1fr; border-bottom: 1px solid var(--line); }
.section-number { padding: 27px 20px; color: var(--green); font: 600 .62rem "JetBrains Mono", monospace; background: #ece9e1; }
.section-fields { padding: 26px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
.section-fields textarea, .option-form-body textarea { resize: vertical; }
.price-history { display: flex; gap: 8px; overflow: auto; }
.inline-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.price-tier-grid { grid-template-columns: repeat(3, 1fr); }
.seo-fields { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; margin-top: 22px; }
.history-chip { padding: 9px 11px; background: #ece9e1; white-space: nowrap; font-size: .62rem; }
.history-chip b { display: block; margin-bottom: 3px; }
.history-chip span { color: var(--muted); }
.image-control { display: grid; grid-template-columns: 210px 1fr; gap: 22px; align-items: center; }
.image-preview { aspect-ratio: 1.35; display: grid; place-items: center; border: 1px dashed var(--line); background: #e7e2d8 center/cover no-repeat; color: var(--muted); font-size: .65rem; overflow: hidden; }
.file-button { display: grid; gap: 6px; cursor: pointer; }
.file-button input { position: absolute; opacity: 0; pointer-events: none; }
.file-button > span { width: max-content; padding: 11px 14px; background: var(--ink); color: white; font-size: .7rem; font-weight: 700; }
.file-button small { color: var(--muted); font-size: .63rem; }
.option-section-head, .knowledge-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; margin-bottom: 14px; }
.option-section-head h3, .knowledge-head h3 { margin: 0; font-size: 1rem; }
.option-section-head p { margin: 5px 0 0; color: var(--muted); font-size: .7rem; }
.option-section-head > span { font: 600 .61rem "JetBrains Mono", monospace; color: var(--green); }
.option-matrix { display: grid; gap: 7px; }
.option-link-row { display: grid; grid-template-columns: 24px 58px minmax(180px, 1fr) 130px 105px 105px; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line); }
.option-link-row:has(.link-enabled:checked) { border-color: #8aa993; background: #f0f5ee; }
.option-link-row .link-enabled { accent-color: var(--green); }
.option-link-name { display: grid; }
.option-link-name b { font-size: .72rem; }
.option-link-name small { margin-top: 3px; color: var(--muted); font-size: .6rem; }
.variant-hint { margin-top: 5px; color: var(--green); font-size: .58rem; }
.option-variant-image { width: 54px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); background: #e6e1d6 center/cover no-repeat; }
.option-variant-image i { padding: 3px 5px; background: rgba(251, 250, 246, .82); color: var(--muted); font: 600 .5rem "JetBrains Mono", monospace; font-style: normal; text-transform: uppercase; }
.variant-upload { position: relative; display: grid; place-items: center; min-height: 34px; border: 1px dashed #9ea59d; color: var(--green); font-size: .59rem; font-weight: 700; cursor: pointer; }
.variant-upload input { position: absolute; opacity: 0; pointer-events: none; }
.link-price { border: 1px solid var(--line); background: white; padding: 9px; min-width: 0; }
.default-check { display: flex; align-items: center; gap: 7px; font-size: .62rem; }
.knowledge-panel { min-height: 480px; padding: 26px; }
.dialog-footer { display: flex; align-items: center; gap: 14px; padding: 16px 25px; border-top: 1px solid var(--line); background: #eeebe3; }
.save-note { margin-left: auto; color: var(--muted); font-size: .64rem; }
.danger-button { border: 1px solid #d2aaa6; background: transparent; color: var(--red); padding: 10px 13px; font-size: .68rem; }
.option-form-body { max-height: calc(100vh - 170px); overflow: auto; padding: 26px; }
.option-cover-control { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; margin: 4px 0 20px; padding: 16px; background: #eeebe3; }
.option-cover-preview { aspect-ratio: 1.3; display: grid; place-items: center; border: 1px dashed var(--line); background: #ddd8cd center/cover no-repeat; color: var(--muted); font-size: .6rem; }
.switch-field { display: flex !important; grid-template-columns: auto 1fr; align-items: center; }
.switch-field input { width: auto; }
.snapshot-box, .linking-box { margin: 4px 0 18px; padding: 16px; background: #ece9e1; border-left: 3px solid var(--green); }
.public-case-box { margin: 16px 0; padding: 18px; border: 1px solid #a9baa9; background: #f1f5ee; }
.public-case-box .option-section-head { align-items: center; }
.snapshot-box p { margin: 7px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.linking-box .form-grid { margin-top: 15px; }
.form-hint { margin: 0; padding: 12px 14px; background: #ece9e1; color: var(--muted); font-size: .68rem; line-height: 1.5; }
.partner-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.partner-card { min-height: 285px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.partner-card:hover { border-color: #9bab9f; box-shadow: 0 14px 35px rgba(31, 33, 30, .07); }
.partner-card-cover { min-height: 92px; display: flex; align-items: end; justify-content: end; padding: 10px; background: linear-gradient(145deg,#d8d3c8,#b9c9be) center/cover no-repeat; }
.partner-card-cover span { padding: 5px 7px; background: rgba(251,250,246,.92); color: var(--green); font: 600 .52rem "JetBrains Mono",monospace; text-transform: uppercase; }
.partner-card-body { flex: 1; display: flex; flex-direction: column; padding: 18px 20px 20px; }
.partner-card-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.partner-card h3 { margin: 20px 0 7px; font-size: 1.28rem; letter-spacing: -.035em; }
.partner-card-body > p { margin: 0; color: var(--muted); font-size: .68rem; }
.partner-models { display: flex; flex-wrap: wrap; gap: 5px; margin: 18px 0; }
.partner-models span { padding: 5px 7px; background: #e6e9df; color: var(--green); font-size: .58rem; }
.partner-models small { color: var(--muted); font-size: .62rem; }
.partner-card .project-card-foot { margin-top: auto; }
.partner-editor { padding: 0; }
.partner-editor-section { padding: 24px 26px; border-bottom: 1px solid var(--line); }
.partner-editor-section .option-section-head { margin-bottom: 18px; }
.partner-editor-section .option-section-head h3 { margin: 5px 0 0; font-size: 1rem; }
.partner-editor-section .option-section-head p { margin: 5px 0 0; color: var(--muted); font-size: .62rem; line-height: 1.45; }
.public-partner-box { background: #f1f5ee; }
.partner-media-editor { display: grid; grid-template-columns: 1fr 1.5fr; gap: 12px; margin-bottom: 16px; }
.partner-media-slot { display: grid; gap: 9px; padding: 13px; border: 1px solid var(--line); background: #f7f5ef; }
.partner-media-slot label { display: grid; gap: 5px; }
.partner-media-slot label > span { color: var(--muted); font: 600 .52rem "JetBrains Mono",monospace; text-transform: uppercase; }
.partner-media-slot input { min-width: 0; width: 100%; padding: 9px; border: 1px solid var(--line); background: white; font-size: .62rem; }
.partner-media-preview { min-height: 125px; display: grid; place-items: center; border: 1px dashed #a8aaa3; background: #ded9ce center/cover no-repeat; color: var(--muted); font-size: .62rem; }
.partner-media-preview.is-logo { background-size: contain; background-repeat: no-repeat; }
.partner-gallery-preview { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 10px; }
.partner-gallery-preview figure { position: relative; aspect-ratio: 1.25; margin: 0; background: #ddd8ce center/cover no-repeat; }
.partner-gallery-preview figure button { position: absolute; top: 5px; right: 5px; width: 25px; height: 25px; border: 0; border-radius: 50%; background: rgba(31,33,30,.82); color: white; }
.partner-gallery-preview figure span { position: absolute; left: 6px; bottom: 6px; padding: 4px 5px; background: rgba(251,250,246,.9); color: var(--green); font-size: .48rem; }
.partner-gallery-preview > .activity-empty { grid-column: 1/-1; margin: 0; border: 1px dashed var(--line); }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.article-card { min-height: 230px; display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.article-card:hover { border-color: #9bab9f; box-shadow: 0 14px 35px rgba(31, 33, 30, .07); }
.article-card-head, .article-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.article-card-head > span:first-child { color: var(--green); font: 600 .58rem "JetBrains Mono", monospace; text-transform: uppercase; }
.article-card h3 { margin: 30px 0 8px; font-size: 1.15rem; letter-spacing: -.03em; }
.article-card p { margin: 0; color: var(--muted); font-size: .68rem; line-height: 1.55; }
.article-card-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .59rem; }
.partner-product-matrix { display: grid; gap: 9px; margin-top: 14px; }
.partner-access-row { padding: 13px; border: 1px solid var(--line); background: var(--panel); }
.partner-access-row:has(.partner-access-enabled:checked) { border-color: #8aa993; background: #f0f5ee; }
.partner-access-choice { display: flex; align-items: center; gap: 10px; }
.partner-access-choice input { width: auto; accent-color: var(--green); }
.partner-access-choice span { display: grid; gap: 3px; }
.partner-access-choice b { font-size: .7rem; }
.partner-access-choice small, .linking-help { color: var(--muted); font-size: .6rem; }
.partner-access-fields { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.partner-access-fields label, .partner-access-note { display: grid; gap: 5px; }
.partner-access-fields label > span, .partner-access-note > span { color: var(--muted); font: 600 .53rem "JetBrains Mono", monospace; text-transform: uppercase; }
.partner-access-fields input, .partner-access-fields select, .partner-access-note input { min-width: 0; width: 100%; padding: 8px 9px; border: 1px solid var(--line); background: white; font-size: .62rem; }
.partner-access-note { margin-top: 8px; }
.member-list { display: grid; gap: 7px; margin-top: 18px; }
.member-list article { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 13px; border: 1px solid var(--line); }
.member-list article div { display: grid; gap: 3px; }
.member-list article b { font-size: .68rem; }
.member-list article small { color: var(--muted); font-size: .6rem; }
.member-list-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.member-list-head h3 { margin: 6px 0 0; font-size: 1rem; }
.member-list-head p { margin: 5px 0 0; color: var(--muted); font-size: .62rem; line-height: 1.45; }
.member-rows { display: grid; gap: 7px; }
.member-list .member-access-row { display: grid; grid-template-columns: 38px minmax(180px, 1fr) 190px 130px; align-items: center; }
.member-avatar { width: 36px; height: 36px; display: grid !important; place-items: center; background: var(--green); color: white; font: 700 .58rem "JetBrains Mono", monospace; }
.member-access-row select { min-width: 0; padding: 9px; border: 1px solid var(--line); background: white; font-size: .61rem; }
.member-active { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .59rem; }
.member-active input { accent-color: var(--green); }
.pending-invitations { display: grid; gap: 7px; margin-top: 9px; padding: 14px; background: #f0eee7; border: 1px dashed #bbb8af; }
.pending-invitations article { background: var(--panel); }
.pending-invitations button { border: 0; background: transparent; color: var(--red); font-size: .6rem; }
.invite-result { padding: 18px; border: 1px solid #9eb5a5; background: #edf3ec; }
.invite-result p { color: var(--muted); font-size: .68rem; line-height: 1.5; }
.invite-result input { width: 100%; padding: 12px; border: 1px solid var(--line); background: white; font: 500 .6rem "JetBrains Mono", monospace; }
.invite-result div { display: flex; gap: 8px; margin-top: 12px; }
.invite-result .primary-button { display: inline-flex; align-items: center; text-decoration: none; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: 380px; padding: 14px 17px; background: var(--ink); color: white; box-shadow: var(--shadow); font-size: .72rem; transform: translateY(20px); opacity: 0; pointer-events: none; transition: .2s; }
.toast.is-visible { transform: none; opacity: 1; }
.toast.is-error { background: var(--red); }
.lead-counter { padding: 8px 11px; background: var(--lime); color: var(--green-dark); font: 700 .62rem "JetBrains Mono", monospace; }
.lead-list { display: grid; }
.lead-row { display: grid; grid-template-columns: minmax(170px,1.2fr) minmax(110px,.8fr) 120px 110px 105px 18px; gap: 15px; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.lead-row:hover { background: #f3f1e9; }
.lead-row > div { display: grid; gap: 4px; }
.lead-row b { font-size: .72rem; }
.lead-row small, .lead-row > span, .lead-row time { color: var(--muted); font-size: .61rem; }
.lead-detail { margin-bottom: 18px; padding: 16px; background: #eeebe3; }
.lead-detail dl { display: grid; gap: 10px; margin: 0; }
.lead-detail dl > div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; }
.lead-detail dt { color: var(--muted); font: 600 .55rem "JetBrains Mono", monospace; text-transform: uppercase; }
.lead-detail dd { margin: 0; font-size: .68rem; line-height: 1.45; }
.price-list-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.price-list-card { min-height: 230px; display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.price-list-card:hover { border-color: #9bab9f; box-shadow: 0 14px 35px rgba(31,33,30,.07); }
.price-list-head,.price-list-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.price-list-head > span:first-child { color: var(--green); font: 600 .58rem "JetBrains Mono",monospace; text-transform: uppercase; }
.price-list-card h3 { margin: 27px 0 8px; font-size: 1.2rem; letter-spacing: -.035em; }
.price-list-card p { margin: 0; color: var(--muted); font-size: .68rem; line-height: 1.5; }
.price-list-meta { margin-top: auto; padding-top: 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: .58rem; }
.price-list-meta b { color: var(--ink); }

@media (max-width: 1100px) {
  .project-grid, .media-grid, .partner-grid, .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .asset-row { grid-template-columns: 42px minmax(180px, 1fr) 120px 90px 28px; }
  .asset-row > :nth-child(4) { display: none; }
}

@media (max-width: 980px) {
  .login-layout { grid-template-columns: 1fr; gap: 45px; padding: 70px 0; }
  .login-copy h1 { font-size: 5rem; }
  .admin-view { grid-template-columns: 78px 1fr; }
  .sidebar { padding-inline: 12px; }
  .side-brand b, .side-brand span, .nav-item:not(.is-active) { font-size: 0; }
  .side-brand { justify-content: center; }
  .side-brand i { flex: none; }
  .side-brand span { display: none; }
  .nav-item { justify-content: center; gap: 0; }
  .nav-item span { font-size: .6rem; }
  .nav-item.is-active { font-size: 0; }
  .nav-item.is-active span { font-size: .6rem; }
  .side-system div, .side-link { display: none; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .overview-grid { grid-template-columns: 1fr; }
  .control-banner { grid-template-columns: 1fr auto; }
  .control-banner p { grid-column: 1 / -1; grid-row: 2; }
  .product-table .table-row { grid-template-columns: 80px minmax(150px, 1fr) 80px 110px 22px; }
  .product-table .table-row > *:nth-child(5) { display: none; }
  .option-table .table-row { grid-template-columns: minmax(160px, 1fr) 120px 120px 22px; }
  .option-table .table-row > *:nth-child(4), .option-table .table-row > *:nth-child(5) { display: none; }
}

@media (max-width: 680px) {
  .login-view { padding: 22px 18px; background: var(--bg); }
  .login-layout { padding: 48px 0; }
  .login-copy h1 { font-size: 3.5rem; }
  .system-chain { display: none; }
  .login-card { padding: 26px; }
  .admin-view { display: block; }
  .sidebar { position: sticky; top: 0; z-index: 30; width: 100%; height: 64px; padding: 0 10px; display: flex; flex-direction: row; align-items: center; }
  .side-brand { padding: 0; border: 0; }
  .sidebar nav { display: flex; margin: 0 0 0 auto; gap: 0; }
  .nav-item { width: 39px; padding: 10px; }
  .side-system, .side-link { display: none; }
  .workspace { padding: 24px 14px 55px; }
  .workspace-head { align-items: start; }
  .workspace-head h1 { font-size: 1.8rem; }
  .user-chip, .logout-button { display: none; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 115px; }
  .control-banner { display: block; }
  .control-banner p { margin-top: 16px; }
  .control-banner > b { display: inline-block; margin-top: 18px; }
  .section-toolbar { align-items: stretch; flex-direction: column; }
  .table-search input { min-width: 0; width: 100%; }
  .product-table .table-row { grid-template-columns: 72px 1fr 22px; }
  .product-table .table-row > *:nth-child(3), .product-table .table-row > *:nth-child(4), .product-table .table-row > *:nth-child(5) { display: none; }
  .option-table .table-row { grid-template-columns: 1fr 90px 22px; }
  .option-table .table-row > *:nth-child(2), .option-table .table-row > *:nth-child(4), .option-table .table-row > *:nth-child(5) { display: none; }
  .activity-full .activity-item { grid-template-columns: 10px 1fr; }
  .activity-full .activity-item > time { display: none; }
  .project-grid, .media-grid, .media-grid.compact, .project-grid.compact, .partner-grid, .article-grid, .price-list-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 200px; }
  .asset-row { grid-template-columns: 38px 1fr 24px; padding-inline: 13px; gap: 10px; }
  .asset-row > :nth-child(3), .asset-row > :nth-child(4), .asset-row > :nth-child(5) { display: none; }
  .editor-dialog, .option-dialog, .wide-dialog { width: 100%; max-height: 100vh; height: 100vh; }
  .editor-body { max-height: calc(100vh - 208px); }
  .dialog-tabs { padding-inline: 8px; }
  .form-section { grid-template-columns: 36px 1fr; }
  .section-number { padding: 22px 11px; }
  .section-fields { padding: 20px 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .image-control { grid-template-columns: 1fr; }
  .image-preview { max-width: 260px; }
  .option-link-row { grid-template-columns: 22px 54px 1fr; }
  .option-link-row .link-price, .option-link-row .variant-upload, .option-link-row .default-check { grid-column: 3; }
  .option-cover-control { grid-template-columns: 1fr; }
  .option-cover-preview { max-width: 180px; }
  .partner-product-matrix { grid-template-columns: 1fr; }
  .partner-access-fields { grid-template-columns: 1fr 1fr; }
  .member-list .member-access-row { grid-template-columns: 38px 1fr; }
  .member-access-row select, .member-active { grid-column: 2; }
  .member-list-head { align-items: stretch; flex-direction: column; }
  .partner-editor-section { padding: 20px 14px; }
  .partner-media-editor { grid-template-columns: 1fr; }
  .partner-gallery-preview { grid-template-columns: 1fr 1fr; }
  .knowledge-panel { padding: 20px 14px; }
  .knowledge-head { align-items: stretch; flex-direction: column; }
  .visual-pair-admin-row { grid-template-columns: 110px 1fr 18px; gap: 10px; padding-inline: 10px; }
  .visual-pair-admin-meta { display: none; }
  .visual-upload-grid { grid-template-columns: 1fr; }
  .price-tier-grid, .seo-fields { grid-template-columns: 1fr; }
  .lead-row { grid-template-columns: 1fr 95px 18px; }
  .lead-row > :nth-child(2), .lead-row > :nth-child(3), .lead-row > :nth-child(5) { display: none; }
  .revision-row { grid-template-columns: 80px 1fr 20px; }
  .revision-row > :nth-child(3), .revision-row > :nth-child(4) { display: none; }
  #revision-dialog { width: 100%; }
  .revision-section { padding: 20px 14px; }
  .cargo-row-head, .cargo-dimensions, .cargo-notes, .option-spec-fields { grid-template-columns: 1fr 1fr; }
  .cargo-name, .cargo-notes > label:first-child, .option-spec-notes { grid-column: 1 / -1; }
  .dialog-footer { position: sticky; bottom: 0; padding: 12px; }
  .save-note, .dialog-footer .danger-button { display: none; }
  .dialog-footer .primary-button { margin-left: auto; }
  .option-form-body { max-height: calc(100vh - 150px); padding: 20px 16px; }
  .toast { left: 14px; right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
