:root {
  color-scheme: light;
  --font-sans: "Instrument Sans", "Segoe UI", Arial, sans-serif;
  --font-display: var(--font-sans);
  font-family: var(--font-sans);
  --paper: #f8f7f4;
  --surface: #ffffff;
  --ink: #181815;
  --muted: #5d5b53;
  --line: #deddd7;
  --teal: #00778f;
  --teal-dark: #005d73;
  --acid: #00b4dc;
  --coral: #e4543f;
  --amber: #e9a72c;
  --blue: #3975d7;
  --rail: #181815;
  --radius: 12px;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; min-height: 100vh; background: var(--paper); }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
svg { width: 1.1rem; height: 1.1rem; stroke-width: 1.8; flex: 0 0 auto; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .65rem; font-size: 2.5rem; line-height: 1.04; letter-spacing: 0; }
h2 { margin-bottom: .65rem; font-size: 1.25rem; line-height: 1.2; letter-spacing: 0; }
p { color: var(--muted); line-height: 1.6; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.htmx-indicator { opacity: 0; transition: opacity .15s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
.htmx-swapping { opacity: .55; transition: opacity .12s; }
.global-progress { position: fixed; z-index: 100; top: 0; right: 0; left: 0; height: 3px; pointer-events: none; background: var(--acid); transform: scaleX(0); transform-origin: left; }
.global-progress.htmx-request { opacity: 1; transform: scaleX(.72); transition: transform .3s ease-out; }
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 1000; padding: .65rem 1rem; background: var(--surface); border: 2px solid var(--teal); }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--teal) 45%, transparent); outline-offset: 3px; }

.app-shell { display: grid; min-height: 100vh; grid-template-columns: 224px minmax(0, 1fr); }
.rail { position: sticky; top: 0; z-index: 20; grid-row: 1 / 3; display: flex; flex-direction: column; width: 224px; height: 100vh; padding: 1.4rem 1rem; color: #f7faf7; background: var(--rail); align-self: start; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 760; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; color: var(--rail); background: var(--acid); border-radius: 2px; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.brand-name { font-size: 1.1rem; }
.brand-logo { display: block; width: 150px; height: 40px; object-fit: contain; object-position: left center; }
.mobile-brand-logo { display: block; width: 112px; height: 30px; object-fit: contain; object-position: left center; }
.rail-nav { display: grid; gap: .35rem; margin-top: 3.25rem; }
.nav-link { display: flex; min-height: 44px; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: 4px; color: #b7c1bb; font-size: .88rem; font-weight: 600; }
.nav-link:hover { color: #fff; background: #26332d; }
.nav-link.active { color: var(--rail); background: var(--acid); }
.rail-foot { display: flex; align-items: center; gap: .4rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid #334039; }
.user-chip { display: flex; min-width: 0; flex: 1; align-items: center; gap: .6rem; }
.user-chip > span, .avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid #45524c; border-radius: 50%; color: var(--ink); background: #e6ebe7; font-weight: 700; }
.user-chip > span { color: #fff; background: #35443d; }
.user-chip div { min-width: 0; }
.user-chip strong, .user-chip small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip strong { font-size: .75rem; }
.user-chip small { margin-top: .15rem; color: #8e9a94; font-size: .6rem; }
.topbar { display: none; }
.workspace { grid-column: 2; min-width: 0; padding: 3.25rem max(2rem, calc((100vw - 224px - 1240px) / 2)); }
.mobile-brand { font-weight: 800; }

.page-head, .order-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; margin-bottom: 2.4rem; }
.page-head > div:first-child { max-width: 720px; }
.page-head p:not(.kicker), .order-head p { margin-bottom: 0; }
.kicker, .eyebrow { margin-bottom: .55rem; color: var(--teal); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.back-link { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: 1.5rem; color: var(--muted); font-size: .82rem; font-weight: 700; }
.back-link:hover { color: var(--teal); }

.primary-button, .secondary-button, .danger-button, .text-button, .icon-button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: .5rem; border: 0; border-radius: 4px; cursor: pointer; font-weight: 750; }
.primary-button { padding: .7rem 1.1rem; color: #fff; background: var(--teal); }
.primary-button:hover { background: var(--teal-dark); }
.primary-button:disabled { cursor: not-allowed; opacity: .45; }
.secondary-button { padding: .65rem 1rem; border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.secondary-button:hover { border-color: var(--teal); color: var(--teal); }
.danger-button { padding: .65rem 1rem; color: #a12b1c; background: #fbe9e5; }
.text-button { min-height: 34px; padding: .35rem .55rem; color: inherit; background: transparent; }
.icon-button { width: 40px; min-width: 40px; padding: 0; color: inherit; background: transparent; }
.icon-button:hover { background: color-mix(in srgb, currentColor 9%, transparent); }
.icon-button.primary { color: #fff; background: var(--teal); }
.icon-button.danger { color: var(--coral); }
.wide { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.quiet-link { color: var(--teal); font-size: .82rem; font-weight: 700; }

.form-stack { display: grid; gap: 1rem; }
label { display: grid; gap: .4rem; color: #39433e; font-size: .76rem; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 44px; padding: .65rem .75rem; border: 1px solid #cbd2cc; border-radius: 3px; color: var(--ink); background: #fff; }
textarea { min-height: 80px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #9ba69f; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: 2px solid color-mix(in srgb, var(--teal) 16%, transparent); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.alert { padding: .8rem 1rem; border-left: 3px solid; border-radius: 2px; }
.alert.error { border-color: var(--coral); color: #8f2d20; background: #fcebe7; }
.step-label { display: flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.step-label span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; color: var(--rail); background: var(--acid); font-size: .65rem; }

.public-main { min-height: 100vh; }
.auth-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(380px, .95fr) minmax(440px, 1.05fr); }
.auth-brand-panel { position: relative; display: flex; overflow: hidden; flex-direction: column; justify-content: center; padding: 9vw; color: #fff; background-color: var(--rail); background-image: repeating-linear-gradient(115deg, transparent 0 48px, #22302a 48px 49px); }
.auth-brand-panel::after { position: absolute; right: -60px; bottom: -70px; width: 330px; height: 330px; border: 46px solid var(--acid); border-radius: 50%; content: ""; }
.brand-public { position: absolute; top: 2rem; left: 2.5rem; }
.auth-brand-panel .eyebrow { margin-top: auto; color: var(--acid); }
.auth-brand-panel h1 { z-index: 1; max-width: 650px; margin-bottom: auto; font-family: var(--font-display); font-size: 4rem; font-weight: 480; }
.press-pattern { display: flex; gap: .65rem; }
.press-pattern span { width: 7px; height: 42px; background: var(--coral); }
.press-pattern span:nth-child(2) { height: 72px; background: var(--acid); }
.press-pattern span:nth-child(3) { height: 54px; background: #50b8be; }
.auth-form-panel, .auth-single { display: grid; min-height: 100vh; place-items: center; padding: 2rem; background-color: var(--paper); background-image: linear-gradient(#e8ebe5 1px, transparent 1px), linear-gradient(90deg, #e8ebe5 1px, transparent 1px); background-size: 32px 32px; }
.auth-form { width: min(100%, 410px); padding: 2.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.94); box-shadow: 0 24px 70px rgba(23,32,28,.08); }
.auth-form h2, .auth-form h1 { margin-bottom: 0; font-family: var(--font-display); font-size: 2.2rem; font-weight: 540; }
.auth-single .brand-public { position: static; margin-bottom: 1rem; }
.message-panel { display: grid; width: min(100%, 430px); justify-items: center; padding: 3rem 2.2rem; border: 1px solid var(--line); border-radius: var(--radius); text-align: center; background: #fff; }
.wide-message { width: min(100%, 720px); }
.success-mark { display: grid; width: 54px; height: 54px; margin-bottom: 1.25rem; place-items: center; border-radius: 50%; color: var(--teal); background: #dff1ee; }
.success-mark svg { width: 25px; height: 25px; }

.smart-drop { display: grid; min-height: 126px; grid-template-columns: auto minmax(180px, 1fr) auto; align-items: center; gap: 1.2rem; margin-bottom: 2rem; padding: 1.35rem 1.5rem; border: 1px dashed #aeb8b1; border-radius: var(--radius); background: #e8ece7; transition: border-color .2s, background .2s; }
.smart-drop.dragging { border-color: var(--teal); background: #dcefeb; }
.smart-drop h2, .smart-drop p { margin-bottom: .2rem; }
.smart-drop > .text-button { grid-column: 3; }
.file-picker { position: relative; overflow: hidden; cursor: pointer; }
.file-picker input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-icon { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 50%; color: #fff; background: var(--teal); }
.drop-icon svg { width: 24px; height: 24px; }
.file-result { grid-column: 2 / 4; padding-top: .5rem; color: var(--teal); font-size: .78rem; font-weight: 700; }
.file-result a { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }
.file-result.error { color: var(--coral); }

.library-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; align-items: end; margin: 1rem 0 1.4rem; }
.library-filters .secondary-button { width: fit-content; }
.library-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.library-table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: .78rem; text-align: left; }
.library-table th, .library-table td { padding: .85rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.library-table th { color: var(--muted); font-size: .68rem; text-transform: uppercase; }
.library-table td small, .design-file small { display: block; margin-top: .25rem; color: var(--muted); }
.library-table td strong { overflow-wrap: anywhere; }
.library-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .8rem; min-width: 170px; }
.library-actions a, .library-actions summary { color: var(--teal); font-weight: 700; cursor: pointer; }
.library-actions form { margin: 0; }
.library-actions .text-button { min-height: 0; padding: 0; color: var(--coral); }
.library-actions details { position: relative; }
.library-actions details form { display: grid; width: 210px; max-width: 100%; gap: .6rem; margin-top: .5rem; padding: .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.library-actions input[type="file"] { min-height: 0; width: 100%; }
.design-upload-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.design-upload-card { display: grid; align-content: start; gap: .8rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.design-upload-card .secondary-button { width: fit-content; }
.design-files { display: grid; gap: .5rem; }
.design-file { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.file-selected { padding: .8rem; border-left: 3px solid var(--teal); background: #e2f0ed; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.product-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.product-visual { position: relative; display: grid; height: 170px; overflow: hidden; place-items: center; border-bottom: 1px solid var(--line); background-color: #dce9e5; background-image: repeating-linear-gradient(45deg, transparent 0 16px, rgba(0,0,0,.035) 16px 17px); }
.product-visual > img { position: absolute; inset: 0; }
.product-visual span { position: absolute; top: .8rem; left: .8rem; font-family: var(--font-display); font-size: 1.5rem; }
.product-visual svg { width: 54px; height: 54px; color: var(--teal-dark); stroke-width: 1.2; }
.visual-1 { background-color: #e7edc9; }.visual-2 { background-color: #d6e9ed; }.visual-3 { background-color: #f1ded5; }.visual-0 { background-color: #e5e1ef; }
.product-body { padding: 1.15rem; }
.product-body h2 { font-size: 1.1rem; }
.product-body > p:not(.kicker) { min-height: 3.2em; margin-bottom: 1rem; font-size: .82rem; }
.product-meta { min-height: 24px; padding-bottom: 1rem; color: var(--muted); font-size: .72rem; }
.product-meta span, .stretched-link { display: flex; align-items: center; gap: .35rem; }
.stretched-link { justify-content: space-between; padding-top: .9rem; border-top: 1px solid var(--line); color: var(--teal); font-size: .78rem; font-weight: 800; }
.product-card:hover { border-color: #aab6ae; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(23,32,28,.08); }

.config-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(420px, 1fr); gap: 5rem; }
.config-intro { position: sticky; top: 3rem; align-self: start; }
.config-intro h1 { max-width: 650px; font-family: var(--font-display); font-size: 4rem; font-weight: 500; }
.lead { font-size: 1.05rem; }
.format-spec { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .8rem; }
.config-form { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.price-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 3px; background: var(--line); }
.price-panel > div { display: grid; gap: .3rem; padding: .9rem; background: #f9faf7; }
.price-panel span { color: var(--muted); font-size: .68rem; }
.price-total { color: #fff; background: var(--rail) !important; }
.price-total span { color: #aeb9b3; }
.price-panel.quote { display: block; padding: 1rem; color: #775116; background: #fff4dc; }
.price-panel.quote span, .price-panel.quote small { display: block; color: inherit; }
.skeleton { display: block; height: 70px; border-radius: 3px; background: #edf0eb; animation: pulse 1.4s infinite alternate; }

.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; align-items: start; }
.line-list { border-top: 1px solid var(--ink); }
.line-item { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.line-item > .line-actions { grid-column: 2; flex-wrap: wrap; justify-content: end; }
.line-item > .alert { grid-column: 2; }
[hidden] { display: none !important; }
.line-number { padding-top: .15rem; color: var(--muted); font-family: var(--font-display); }
.line-main { display: flex; min-width: 0; justify-content: space-between; gap: 1rem; }
.line-main p { margin: .25rem 0 0; font-size: .76rem; }
.line-price { white-space: nowrap; }
.line-actions, .upload-inline { display: flex; align-items: center; gap: .35rem; }
.upload-inline select { width: 110px; min-height: 38px; }
.adhoc-panel, .create-panel, .order-summary, .action-panel { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.adhoc-panel h2 { margin-top: 1rem; }
.badge { display: inline-flex; width: fit-content; align-items: center; min-height: 24px; padding: .25rem .5rem; border-radius: 3px; color: #35413b; background: #e6eae6; font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.badge.warning { color: #775116; background: #fff0cf; }
.badge.rush, .priority-mark { color: #fff; background: var(--coral); }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: .45rem; border-radius: 50%; background: var(--teal); }
.status-dot.amber { background: var(--amber); }.status-dot.rush { background: var(--coral); box-shadow: 0 0 0 4px #f9dcd6; }

.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 3rem; align-items: start; }
.checkout-fields { max-width: 680px; }
.toggle-row { position: relative; display: flex; align-items: center; gap: .75rem; padding: 1rem; border: 1px solid var(--line); border-radius: 4px; background: #fff; cursor: pointer; }
.toggle-row > input { position: absolute; width: 42px; height: 44px; opacity: 0; pointer-events: none; }
.toggle-row > input:focus-visible + .toggle { outline: 2px solid var(--teal); outline-offset: 4px; }
.toggle { position: relative; width: 42px; height: 24px; flex: 0 0 auto; border-radius: 12px; background: #b8c0bb; }
.toggle::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; content: ""; transition: transform .2s; }
.toggle-row input:checked + .toggle { background: var(--coral); }.toggle-row input:checked + .toggle::after { transform: translateX(18px); }
.toggle-row strong, .toggle-row small { display: block; }.toggle-row small { margin-top: .2rem; color: var(--muted); font-weight: 500; }
.order-summary { position: sticky; top: 2rem; }
.summary-line { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: .78rem; }
.order-summary .primary-button { margin-top: 1.25rem; }

.order-table { min-width: 0; border-top: 1px solid var(--ink); }
.table-head, .table-row { display: grid; grid-template-columns: 1.35fr 1fr .8fr .8fr 28px; align-items: center; gap: 1rem; min-height: 66px; padding: .7rem .85rem; border-bottom: 1px solid var(--line); }
.table-head { min-height: 40px; color: var(--muted); font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.table-row { background: transparent; font-size: .78rem; }
.table-row:hover { background: #fff; }
.table-row strong, .table-row small { display: block; }.table-row small { max-width: 230px; overflow: hidden; margin-top: .18rem; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.table-row > span:last-child { justify-self: end; }
.status-order { color: #075e61; background: #d7ece9; }.status-quote_requested { color: #79520d; background: #ffefc9; }.status-production { color: #244e93; background: #dce7fb; }.status-cancelled { color: #8c3024; background: #f8ddd7; }
.empty-state { display: grid; min-height: 360px; place-content: center; justify-items: center; padding: 2rem; text-align: center; }
.empty-state > svg { width: 42px; height: 42px; margin-bottom: 1rem; color: var(--muted); }
.error-stage { position: relative; display: grid; min-height: calc(100vh - 6.5rem); align-content: center; justify-items: start; overflow: hidden; padding: 3rem max(1rem, 8vw); border-top: 1px solid var(--ink); background-image: linear-gradient(#e1e5de 1px, transparent 1px), linear-gradient(90deg, #e1e5de 1px, transparent 1px); background-size: 36px 36px; }
.error-stage::after { position: absolute; right: -90px; bottom: -130px; width: 350px; height: 350px; border: 42px solid var(--acid); border-radius: 50%; content: ""; }
.error-number { color: var(--coral); font-family: var(--font-display); font-size: 8rem; font-weight: 500; line-height: .8; }
.error-stage h1 { max-width: 680px; margin-top: 1.5rem; font-family: var(--font-display); font-size: 3.3rem; font-weight: 520; }
.error-stage > p:not(.kicker) { max-width: 560px; font-size: 1rem; }
.error-stage > small { margin-top: 2rem; color: var(--muted); font-family: monospace; }
.error-register { position: absolute; top: 2rem; right: 2rem; display: flex; gap: 4px; }
.error-register span { display: grid; width: 28px; height: 28px; place-items: center; color: #fff; font-size: .55rem; font-weight: 800; }
.error-register span:nth-child(1) { background: #21a9c7; }.error-register span:nth-child(2) { background: #db4d89; }.error-register span:nth-child(3) { color: var(--ink); background: #f2d23b; }.error-register span:nth-child(4) { background: var(--ink); }

.order-head { padding-bottom: 1.7rem; border-bottom: 1px solid var(--ink); }
.order-head h1 { margin-top: .5rem; margin-bottom: .3rem; font-family: var(--font-display); font-size: 3.1rem; font-weight: 520; }
.order-id { color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .06em; }
.order-state { display: grid; min-width: 210px; justify-items: end; gap: .4rem; }
.order-state span:first-child { color: var(--muted); font-size: .68rem; text-transform: uppercase; }
.order-state strong { font-size: 1.1rem; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; align-items: start; }
.detail-main { min-width: 0; }
.detail-side { display: grid; gap: 1rem; }
.timeline { display: flex; overflow-x: auto; padding: 1rem 0 2.5rem; }
.timeline-event { display: grid; min-width: 150px; grid-template-columns: 14px 1fr; gap: .5rem; border-top: 2px solid #c9d0cb; padding-top: .75rem; }
.timeline-event > span { width: 10px; height: 10px; margin-top: -1.15rem; border: 2px solid var(--paper); border-radius: 50%; background: #9ba69f; }
.timeline-event.current { border-color: var(--teal); }.timeline-event.current > span { background: var(--teal); }
.timeline-event strong, .timeline-event time { display: block; font-size: .67rem; }.timeline-event time { margin-top: .25rem; color: var(--muted); }
.detail-section { margin-bottom: 1.5rem; padding: 1.25rem 0; border-top: 1px solid var(--ink); }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .7rem; }
.section-head h2 { margin: 0; }.section-head > span { color: var(--muted); font-size: .72rem; }
.detail-line, .proof-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); font-size: .78rem; }
.detail-line p { margin: .2rem 0 0; font-size: .72rem; }
.quote-section { display: flex; justify-content: space-between; align-items: center; gap: 2rem; padding: 1.3rem; border: 1px solid #e1c77f; border-radius: var(--radius); background: #fff8e8; }
.proof-row { display: grid; grid-template-columns: 1fr auto; }.proof-response { grid-column: 1 / -1; display: flex; gap: .5rem; }
.comment-thread article { display: flex; gap: .8rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.comment-thread article p { margin-bottom: .25rem; color: var(--ink); font-size: .82rem; white-space: pre-wrap; }
.comment-thread time { color: var(--muted); font-size: .66rem; }
.comment-form { display: grid; grid-template-columns: minmax(0, 1fr) 40px; align-items: end; gap: .5rem; margin-top: 1rem; }.comment-form textarea { min-height: 58px; }
.meta-list { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.meta-list > div { display: grid; gap: .3rem; padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
.meta-list > div:last-child { border-bottom: 0; }.meta-list span { color: var(--muted); font-size: .66rem; text-transform: uppercase; }.meta-list small { color: var(--muted); line-height: 1.5; }.meta-total { color: #fff; background: var(--rail); }.meta-total span { color: #acb7b1; }
.action-panel summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-weight: 800; }.action-panel[open] summary { margin-bottom: 1rem; }.action-panel summary::marker { display: none; content: ""; }

.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 3rem; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.metric-strip a { display: grid; grid-template-columns: 1fr auto; align-items: end; min-height: 104px; padding: 1.1rem; border-right: 1px solid var(--line); }.metric-strip a:last-child { border: 0; }.metric-strip a:hover { background: #fff; }
.metric-strip span { color: var(--muted); font-size: .7rem; font-weight: 700; }.metric-strip strong { font-family: var(--font-display); font-size: 2.7rem; font-weight: 500; }.rush-text { color: var(--coral); }
.section-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }.section-toolbar h2 { margin: 0; font-size: 1.6rem; }
.filter-bar, .search-field { display: flex; align-items: center; gap: .5rem; }.filter-bar select { width: 170px; }.search-field { position: relative; }.search-field svg { position: absolute; left: .7rem; color: var(--muted); }.search-field input { width: 240px; padding-left: 2.2rem; }
.maestro-table .table-head, .maestro-table .table-row { grid-template-columns: 62px 1.15fr .9fr 1fr .75fr .7fr 26px; }
.priority-mark { display: inline-flex; padding: .25rem .4rem; border-radius: 2px; font-size: .55rem; font-weight: 900; }.priority-normal { color: #b2bbb5; }
.table-empty { padding: 2rem; color: var(--muted); text-align: center; }.proof-manage { grid-template-columns: minmax(0,1fr) auto auto; }
.maestro-comment { grid-template-columns: minmax(0, 1fr) auto 40px; }.checkbox-row { display: flex; align-items: center; white-space: nowrap; }.checkbox-row input { width: 18px; min-height: 18px; }

.admin-split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 2rem; align-items: start; }
.directory-list { border-top: 1px solid var(--ink); }.directory-list > a { display: grid; grid-template-columns: 44px 1fr 24px; align-items: center; gap: .8rem; min-height: 72px; border-bottom: 1px solid var(--line); }.directory-list > a:hover { padding-left: .5rem; background: #fff; }.directory-list strong, .directory-list small { display: block; }.directory-list small { color: var(--muted); font-size: .7rem; }
.company-monogram { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 3px; background: #dde7e2; font-family: var(--font-display); font-weight: 700; }
.create-panel .step-label { margin-bottom: 1.2rem; }
.company-grid, .catalog-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; align-items: start; }.company-grid .detail-section, .catalog-admin-grid .detail-section { padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.user-row, .address-row, .domain-row, .admin-product-row { display: flex; align-items: center; gap: .8rem; min-height: 58px; padding: .6rem 0; border-bottom: 1px solid var(--line); }.user-row > div:nth-child(2) { flex: 1; }.user-row strong, .user-row small, .admin-product-row strong, .admin-product-row small { display: block; }.user-row small, .admin-product-row small { color: var(--muted); font-size: .68rem; }.address-row p { margin: .2rem 0 0; font-size: .7rem; }.domain-row { justify-content: space-between; }.domain-row svg { color: var(--teal); }
.admin-form { padding-top: .8rem; }.admin-form summary { display: flex; min-height: 42px; align-items: center; gap: .5rem; cursor: pointer; color: var(--teal); font-size: .76rem; font-weight: 800; }.admin-form[open] summary { margin-bottom: .8rem; }.admin-form summary::marker { content: ""; }
.inline-form { display: flex; gap: .4rem; margin-top: 1rem; }.confirm-popover { position: absolute; z-index: 5; right: 2rem; width: 230px; padding: .8rem; border: 1px solid var(--line); border-radius: 4px; background: #fff; box-shadow: 0 14px 30px rgba(0,0,0,.12); }
.branding-preview { display: flex; min-width: 0; align-items: center; gap: 1rem; padding: .8rem 0; }
.branding-preview > div { min-width: 0; }.branding-preview strong, .branding-preview small { display: block; }.branding-preview small { margin-top: .25rem; color: var(--muted); font-size: .68rem; }
.company-logo-preview { width: 132px; height: 64px; flex: 0 0 auto; object-fit: contain; object-position: left center; }
.company-logo-fallback { display: grid; width: 64px; height: 64px; flex: 0 0 auto; place-items: center; border-radius: 4px; color: var(--teal-dark); background: #dce9e5; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.billing-list { display: grid; gap: .4rem; }.billing-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto 40px 40px; align-items: center; gap: .45rem; min-height: 62px; padding: .55rem 0; border-bottom: 1px solid var(--line); }.billing-row.inactive { opacity: .55; }.billing-row strong, .billing-row small { display: block; }.billing-row small { margin-top: .2rem; color: var(--muted); font-size: .66rem; }
.billing-row details[open] { grid-column: 1 / -1; }.billing-edit-form { padding: .8rem; border-left: 2px solid var(--teal); background: var(--paper); }
.advanced-settings > summary { display: flex; min-height: 46px; align-items: center; gap: .7rem; cursor: pointer; list-style: none; }.advanced-settings > summary::-webkit-details-marker { display: none; }.advanced-settings > summary > span { min-width: 0; flex: 1; }.advanced-settings > summary strong, .advanced-settings > summary small { display: block; }.advanced-settings > summary small { margin-top: .15rem; color: var(--muted); font-size: .66rem; }.advanced-settings[open] > summary { margin-bottom: 1rem; }.advanced-settings textarea { font-family: "Cascadia Mono", Consolas, monospace; font-size: .75rem; }
.admin-tabs { display: flex; gap: .5rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--line); }.admin-tabs a { display: flex; gap: .45rem; padding: .7rem 1rem; border-bottom: 2px solid transparent; font-size: .76rem; font-weight: 800; }.admin-tabs a:hover { border-color: var(--teal); }.admin-tabs span { color: var(--muted); }
.catalog-admin-grid { grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr); }.catalog-admin-grid > .detail-section:nth-of-type(n+2) { grid-column: auto; }.admin-product-row > div { flex: 1; }
.product-create-panel { max-width: 880px; margin-inline: auto; }
/* Shared new/edit product workspace. Keep editor styles scoped to this surface. */
.product-editor { max-width: 1180px; margin-inline: auto; font-family: var(--font-sans); }
.product-editor .back-link { margin-bottom: 1.35rem; }
.editor-heading { align-items: center; margin-bottom: 1.75rem; }
.editor-heading h1 { font-size: 2rem; overflow-wrap: anywhere; }
.editor-heading p:not(.kicker) { max-width: 620px; font-size: .9rem; }
.editor-status { display: inline-flex; align-items: center; flex-shrink: 0; gap: .65rem; padding: .5rem .75rem; border: 1px solid #d5dfd9; border-radius: 20px; background: #eaf0eb; color: #43554a; font-size: .75rem; font-weight: 700; }
.editor-status span { padding-left: .65rem; border-left: 1px solid #c8d4cc; font-weight: 400; }
.product-editor > .alert { margin-bottom: 1.25rem; }
.editor-provenance { font-size: .8rem; }
.product-editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 1.5rem; }
.editor-sections, .editor-sidebar { display: grid; min-width: 0; gap: 1.25rem; }
.editor-card { min-width: 0; padding: 1.5rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.editor-section-heading { display: flex; align-items: flex-start; gap: .85rem; margin-bottom: 1.5rem; }
.editor-section-heading > span { display: grid; width: 30px; height: 30px; flex-shrink: 0; place-items: center; border-radius: 8px; color: var(--teal-dark); background: #edf4f1; font-size: .7rem; font-weight: 700; }
.product-editor h2 { margin-bottom: .35rem; font-family: var(--font-sans); font-size: 1.05rem; }
.editor-section-heading p, .product-editor .editor-help { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.editor-fields { display: grid; gap: 1.25rem; }
.product-editor label { min-width: 0; gap: .5rem; font-size: .8rem; font-weight: 600; }
.product-editor input, .product-editor select, .product-editor textarea { min-width: 0; border-color: #d0d8d2; border-radius: 6px; font-size: .875rem; font-weight: 400; }
.product-editor input[readonly] { color: var(--muted); background: #f4f6f3; }
.product-editor small { color: var(--muted); font-size: .75rem; font-weight: 400; line-height: 1.5; }
.product-editor .field-row { gap: 1.25rem; }
.product-editor .three-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.editor-language { display: grid; align-content: start; gap: 1rem; }
.editor-language h3 { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: .8rem; font-weight: 600; }
.editor-language h3 span { padding: .25rem .35rem; border-radius: 4px; color: var(--muted); background: var(--paper); font-size: .6rem; letter-spacing: .04em; }
.editor-language textarea { min-height: 104px; }
.editor-primary-language { margin-top: .5rem; }
.editor-advanced { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid #e9ede8; }
.editor-advanced summary { display: flex; align-items: center; gap: .5rem; color: var(--ink); cursor: pointer; font-size: .8rem; font-weight: 600; }
.editor-advanced summary span { color: var(--muted); font-size: .7rem; font-weight: 400; }
.editor-advanced[open] summary { margin-bottom: 1rem; }
.editor-short-field { max-width: 210px; }
.editor-publication > .editor-help { margin: .5rem 0 1.5rem; }
.editor-next-step { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.editor-next-step h3 { margin-bottom: .5rem; font-size: .85rem; }
.editor-next-step .editor-help { margin-bottom: 1rem; }
.editor-next-step button { justify-content: space-between; text-align: left; font-size: .8rem; }
.product-editor button:disabled { cursor: not-allowed; color: #758078; border-color: var(--line); background: #f2f4f1; opacity: 1; }
.editor-readiness { margin-bottom: 1.25rem; color: #77551d; font-size: .78rem; }
.editor-readiness summary { cursor: pointer; font-weight: 600; }
.editor-readiness summary span { margin-left: .25rem; }
.editor-readiness ul { display: grid; gap: .5rem; margin-bottom: 0; padding-left: 1.2rem; line-height: 1.5; }
.editor-readiness a { text-decoration: underline; text-underline-offset: 3px; }
.editor-preset { padding: 1.1rem 1.25rem; background: transparent; }
.editor-preset summary { cursor: pointer; font-size: .8rem; font-weight: 600; }
.editor-preset[open] > summary { margin-bottom: 1rem; }
.editor-preset .editor-help { margin-bottom: 1.25rem; }
.editor-preset-hint { display: grid; gap: .6rem; padding: .5rem 1.25rem; font-size: .8rem; }
.editor-save-bar { position: sticky; z-index: 10; bottom: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 4px 24px #18221e12; }
.editor-save-state { display: grid; gap: .2rem; font-size: .8rem; font-weight: 600; }
.editor-save-state [data-editor-dirty] { color: #815d20; }
.editor-save-bar .button-row { flex-shrink: 0; }
.product-editor :is(input, select, textarea, summary) { scroll-margin-block: 2rem 9rem; }
@media (max-width: 1120px) {
  .product-editor-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 1rem; }
  .editor-card { padding: 1.25rem; }
}
@media (max-width: 900px) {
  .product-editor-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .product-editor .editor-save-bar { bottom: 74px; }
  .product-editor .editor-heading { display: flex; }
  .product-editor :is(input, select, textarea, summary) { scroll-margin-block: 4rem 13rem; }
}
@media (max-width: 600px) {
  .editor-heading { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .editor-heading h1 { font-size: 1.75rem; }
  .product-editor .field-row, .product-editor .three-fields { grid-template-columns: 1fr; }
  .editor-short-field { max-width: none; }
  .editor-save-bar { bottom: .5rem; flex-direction: column; align-items: stretch; padding: .85rem; gap: .75rem; }
  .editor-save-bar .button-row { justify-content: flex-end; }
  .editor-save-state small { display: none; }
}
.form-section { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 24px 0 0; }
.form-section legend { color: var(--ink); font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; padding: 0 12px 0 0; }
.compact-button { align-self: flex-start; margin-top: 12px; }
.catalog-filter-bar { flex-wrap: wrap; margin-bottom: 1rem; }
.product-card-status { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .75rem; padding-top: .6rem; border-top: 1px solid var(--line); font-size: .65rem; }
.product-card-status span { color: var(--muted); }.product-card-status a { color: var(--teal-dark); font-weight: 750; }
.duplicate-form { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.duplicate-form .check-label { display: flex; align-items: center; gap: .4rem; font-size: .65rem; }.duplicate-form .check-label input { width: 16px; min-height: 16px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1rem; }
.preset-entry { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 880px; margin: 0 auto 1rem; padding: .8rem 1rem; border-left: 3px solid var(--teal); background: var(--surface); }
.preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }.preset-card { display: grid; align-content: start; gap: .65rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }.preset-card.inactive { opacity: .65; }.preset-card h2, .preset-card p { margin: 0; }.preset-card p { color: var(--muted); font-size: .75rem; }
.preset-summary { display: grid; gap: .35rem; margin: 0; }.preset-summary div { display: flex; justify-content: space-between; gap: 1rem; padding-top: .35rem; border-top: 1px solid var(--line); }.preset-summary dt { color: var(--muted); font-size: .66rem; }.preset-summary dd { margin: 0; font-size: .72rem; font-weight: 750; }.preset-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.catalog-workspace-head { display: grid; grid-template-columns: minmax(0, 1fr) 220px auto; align-items: end; gap: 1rem; margin-bottom: 1rem; }.catalog-workspace-head h1 { margin-bottom: .25rem; }.company-switcher { display: flex; align-items: end; gap: .5rem; }.company-switcher label { min-width: 0; flex: 1; }.company-switcher select { width: 100%; }
.workspace-primary-actions, .preview-actions { display: flex; align-items: center; gap: .5rem; }.workspace-primary-actions form { display: flex; }.preview-head { align-items: end; }.preview-card-label { display: inline-flex; min-height: 34px; align-items: center; margin-top: auto; color: var(--teal-dark); font-size: .68rem; font-weight: 800; text-transform: uppercase; }.preview-grid .product-card { border-style: dashed; }.preview-grid .product-card::after { content: none; }
.product-visual img, .product-card-mark img { width: 100%; height: 100%; object-fit: cover; }.product-card-mark:has(img) { overflow: hidden; padding: 0; background: #fff; }
.retained-artwork { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 1rem; padding: .75rem; border: 1px solid var(--line); background: var(--surface); }.retained-artwork img { width: 120px; aspect-ratio: 4 / 3; object-fit: cover; }.retained-artwork p, .retained-artwork strong, .retained-artwork span { display: block; margin: 0; }.retained-artwork span { margin-top: .25rem; color: var(--muted); font-size: .72rem; overflow-wrap: anywhere; }
.draft-change-strip { display: flex; align-items: center; gap: 1rem; min-height: 46px; margin-bottom: 1rem; padding: .65rem 1rem; border-block: 1px solid var(--ink); font-size: .7rem; }.draft-change-strip strong { color: var(--teal-dark); }.draft-change-strip small { margin-left: auto; color: var(--muted); }
.company-catalog-workspace { display: grid; grid-template-columns: 230px minmax(430px, 1fr) 290px; gap: 1rem; align-items: start; }.catalog-category-panel, .catalog-available-panel { position: sticky; top: 1rem; min-width: 0; }.catalog-placement-panel { min-width: 0; }
.category-tree { display: grid; border-top: 1px solid var(--line); }.category-tree-row { display: grid; grid-template-columns: minmax(0, 1fr) 34px; align-items: center; min-height: 42px; border-bottom: 1px solid var(--line); font-weight: 750; }.category-tree-row a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.category-child { min-height: 36px; padding-left: 1rem; color: var(--muted); font-size: .72rem; font-weight: 500; }.discard-form { margin-top: 1.5rem; }
.mobile-category-jump { display: none; }.draft-change-strip form { margin-left: auto; }.draft-change-strip [data-dirty-indicator] { color: var(--coral); font-weight: 800; }
.catalog-category-band { scroll-margin-top: 1rem; margin-bottom: 1.25rem; }.catalog-category-band > .section-head { padding-bottom: .55rem; border-bottom: 1px solid var(--ink); }.catalog-category-band .kicker { margin-bottom: .15rem; }.staged-product-list { display: grid; gap: .45rem; padding-top: .55rem; }
.catalog-category-band.drop-target { outline: 2px solid var(--teal); outline-offset: 4px; background: rgba(21, 132, 133, .06); }.staged-product-card.dragging, .available-product-list article.dragging { opacity: .45; }
.staged-product-card { display: grid; grid-template-columns: 44px minmax(150px, 1fr) auto; align-items: center; gap: .7rem; min-height: 88px; padding: .65rem; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }.product-card-mark { display: grid; width: 40px; height: 54px; place-items: center; color: var(--teal-dark); background: #dce9e5; font-family: var(--font-display); font-size: .75rem; }.staged-product-copy { min-width: 0; }.staged-product-copy h3, .staged-product-copy p { overflow: hidden; margin: .25rem 0 0; text-overflow: ellipsis; white-space: nowrap; }.staged-product-copy p { color: var(--muted); font-size: .68rem; }.staged-product-copy small { display: block; margin-top: .3rem; color: var(--teal-dark); }.readiness-error { color: var(--coral) !important; }
.staged-product-actions { display: flex; align-items: center; gap: .3rem; }.staged-product-actions form { display: flex; align-items: center; gap: .2rem; }.move-product-form select { width: 140px; min-height: 36px; padding: .35rem; font-size: .68rem; }.empty-category { margin: 0; padding: 1rem; color: var(--muted); border-bottom: 1px solid var(--line); font-size: .72rem; }
.available-product-list { display: grid; gap: .45rem; }.available-product-list article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }.available-product-list article > div { min-width: 0; }.available-product-list code, .available-product-list strong, .available-product-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.available-product-list code, .available-product-list small { color: var(--muted); font-size: .62rem; }.available-product-list form { display: grid; grid-template-columns: 120px 40px; gap: .25rem; align-items: end; }.available-product-list select { min-height: 38px; padding: .35rem; font-size: .65rem; }.archive-confirmation { max-width: 720px; margin-inline: auto; }
.available-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem; margin-bottom: .75rem; }.available-search .search-field, .available-search input { min-width: 0; width: 100%; }.available-search .secondary-button { padding-inline: .7rem; }
.available-drawer > summary { display: flex; align-items: center; justify-content: space-between; min-height: 42px; cursor: pointer; font-family: var(--font-display); font-size: 1rem; font-weight: 700; list-style: none; }.available-drawer > summary::-webkit-details-marker { display: none; }.available-drawer-body { padding-top: .25rem; }
.catalog-products-panel { grid-column: 1 / -1; min-width: 0; padding-top: 1rem; border-top: 1px solid var(--ink); }
.compact-product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.compact-product-card { display: grid; min-height: 116px; align-content: start; padding: .8rem; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.compact-product-topline { display: flex; min-width: 0; align-items: center; gap: .35rem; }
.compact-product-topline code { overflow: hidden; flex: 1; color: var(--muted); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.compact-product-topline .badge { min-height: 20px; padding: .15rem .35rem; font-size: .52rem; }
.compact-product-card h3 { overflow: hidden; margin: .65rem 0 .15rem; font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.compact-product-card p, .compact-product-card small { overflow: hidden; margin: 0; color: var(--muted); font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.compact-product-card small { margin-top: .35rem; color: var(--teal-dark); font-weight: 750; }
.muted-copy { margin: .5rem 0; color: var(--muted); font-size: .76rem; }
.three-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@keyframes pulse { from { opacity: .55; } to { opacity: 1; } }

@media (max-width: 1080px) {
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .config-layout { gap: 2rem; }
  .cart-layout, .checkout-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 270px; gap: 1.5rem; }
  .maestro-table { overflow-x: auto; }.maestro-table .table-head, .maestro-table .table-row { min-width: 920px; }
  .company-grid { grid-template-columns: 1fr; }
  .compact-product-grid { grid-template-columns: 1fr; }
  .company-catalog-workspace { grid-template-columns: 200px minmax(0, 1fr); }.catalog-available-panel { position: static; grid-column: 1 / -1; }.available-product-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  h1 { font-size: 2rem; }
  .app-shell { display: block; padding-bottom: 70px; }
  .rail { position: fixed; top: auto; bottom: 0; display: block; width: 100%; height: 66px; padding: .4rem .6rem; border-top: 1px solid #34413b; }
  .rail > .brand, .rail-foot { display: none; }.rail-nav { display: flex; height: 100%; justify-content: space-around; gap: .2rem; margin: 0; }.nav-link { min-width: 72px; flex-direction: column; justify-content: center; gap: .2rem; padding: .3rem; font-size: .62rem; }.nav-link.active { color: var(--acid); background: transparent; }
  .topbar { position: sticky; top: 0; z-index: 15; display: flex; height: 52px; align-items: center; justify-content: space-between; padding: 0 1rem; border-bottom: 1px solid var(--line); background: rgba(243,244,239,.95); backdrop-filter: blur(10px); }
  .workspace { padding: 1.5rem 1rem; }
  .page-head, .order-head { display: grid; gap: 1rem; margin-bottom: 1.5rem; }.page-head .primary-button, .page-head .secondary-button { width: 100%; }
  .auth-layout { display: block; }.auth-brand-panel { display: none; }.auth-form-panel { min-height: 100vh; padding: 1rem; }.auth-form { padding: 1.5rem; }
  .catalog-grid { grid-template-columns: 1fr; }.smart-drop { grid-template-columns: auto 1fr; }.smart-drop > .secondary-button, .smart-drop > .text-button { grid-column: 1 / -1; }.file-result { grid-column: 1 / -1; }
  .library-filters, .design-upload-grid { grid-template-columns: 1fr; }.design-file { align-items: flex-start; flex-direction: column; }
  .library-table { min-width: 0; display: block; }.library-table thead { display: none; }.library-table tbody { display: grid; }
  .library-table tr { display: grid; padding: .45rem .8rem; border-bottom: 1px solid var(--line); }
  .library-table td { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: .6rem; padding: .4rem 0; border: 0; overflow-wrap: anywhere; }
  .library-table td::before { content: attr(data-label); color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; }
  .library-table .library-actions { min-width: 0; }
  .config-layout, .cart-layout, .checkout-layout, .detail-grid, .admin-split, .catalog-admin-grid { grid-template-columns: 1fr; gap: 1.5rem; }.config-intro { position: static; }.config-intro h1 { font-size: 3rem; }.order-summary { position: static; order: -1; }
  .field-row { grid-template-columns: 1fr; }.price-panel { grid-template-columns: 1fr; }.line-item { grid-template-columns: 30px 1fr; }.line-actions { grid-column: 2; justify-content: end; }.line-main { display: grid; }.upload-inline select { width: 130px; }
  .table-head { display: none; }.order-table .table-row { grid-template-columns: 1fr auto; gap: .5rem; min-height: 92px; padding: 1rem 0; }.order-table .table-row > span:nth-child(3), .order-table .table-row > span:nth-child(4) { display: none; }
  .order-state { min-width: 0; justify-items: start; }.timeline { margin-right: -1rem; }.detail-side { order: -1; }.proof-response { display: grid; }.quote-section { display: grid; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }.metric-strip a:nth-child(2) { border-right: 0; }.section-toolbar { align-items: stretch; flex-direction: column; }.filter-bar { display: grid; grid-template-columns: 1fr auto; }.search-field { grid-column: 1 / -1; }.search-field input, .filter-bar select { width: 100%; }.maestro-table .table-row { display: grid; min-width: 0; grid-template-columns: 54px 1fr auto; }.maestro-table .table-row > span:nth-child(n+4):not(:last-child) { display: none; }
  .catalog-filter-bar { grid-template-columns: 1fr; }.catalog-filter-bar .search-field { grid-column: auto; }.catalog-filter-bar .secondary-button { width: 100%; }
  .company-grid { grid-template-columns: 1fr; }.company-grid .detail-section, .catalog-admin-grid .detail-section { padding: 1rem; }.create-panel { padding: 1rem; }
  .compact-product-grid { grid-template-columns: 1fr; }.three-fields { grid-template-columns: 1fr; }.product-card-status { align-items: flex-start; flex-direction: column; }
  .preset-grid { grid-template-columns: 1fr; }.preset-entry, .preset-actions { align-items: stretch; flex-direction: column; }.preset-entry .secondary-button, .preset-actions .primary-button { width: 100%; }
  .catalog-workspace-head, .company-catalog-workspace { grid-template-columns: 1fr; }.catalog-workspace-head { align-items: stretch; }.company-switcher { display: grid; grid-template-columns: 1fr auto; }.workspace-primary-actions, .preview-actions { display: grid; grid-template-columns: 1fr 1fr; }.workspace-primary-actions .primary-button, .workspace-primary-actions .secondary-button, .preview-actions .primary-button, .preview-actions .secondary-button { width: 100%; }.draft-change-strip { flex-wrap: wrap; white-space: normal; }.draft-change-strip small { margin-left: 0; }.catalog-category-panel, .catalog-available-panel { position: static; }.catalog-placement-panel { order: 2; }.catalog-available-panel { grid-column: auto; order: 1; }.catalog-category-panel { order: 0; }.available-product-list { grid-template-columns: 1fr; }.staged-product-card { grid-template-columns: 38px minmax(0, 1fr); }.product-card-mark { width: 34px; height: 46px; }.staged-product-actions { grid-column: 1 / -1; justify-content: flex-end; flex-wrap: wrap; }.move-product-form { min-width: 0; flex: 1; }.move-product-form select { min-width: 0; width: 100%; }.company-catalog-workspace button, .company-catalog-workspace .icon-button { min-height: 40px; }
  .mobile-category-jump { display: grid; }.catalog-category-panel .category-tree { display: none; }.available-drawer:not([open]) .available-drawer-body { display: none; }
  .retained-artwork { grid-template-columns: 88px minmax(0, 1fr); }.retained-artwork img { width: 88px; }
  .error-stage { min-height: calc(100vh - 120px); align-content: start; padding-top: 6rem; }.error-number { font-size: 6rem; }.error-stage h1 { font-size: 2.4rem; }.error-stage::after { width: 230px; height: 230px; border-width: 28px; opacity: .35; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Maestro catalog: clear paths for products, company catalogs and product templates. */
.catalog-page { max-width: 1180px; margin-inline: auto; }
.catalog-page-head { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.6rem; }
.catalog-page-head > div:first-child { max-width: 680px; }
.catalog-page-head h1 { margin-bottom: .45rem; font-size: 2rem; }
.catalog-page-head p:not(.kicker) { margin-bottom: 0; font-size: .9rem; }
.catalog-page-head .back-link { margin-bottom: 1rem; }
.catalog-head-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
.catalog-head-actions :is(.primary-button, .secondary-button) { white-space: nowrap; }
.catalog-area-nav { display: flex; overflow-x: auto; gap: .35rem; margin-bottom: 1.4rem; padding: .35rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.catalog-area-nav a { display: grid; min-width: 150px; min-height: 45px; flex: 1; place-items: center; padding: .65rem .8rem; border-radius: 6px; color: #536159; font-size: .8rem; font-weight: 700; text-align: center; white-space: nowrap; }
.catalog-area-nav a:hover { color: var(--teal-dark); background: #f3f8f5; }
.catalog-area-nav a[aria-current="page"] { color: var(--teal-dark); background: #e8f2ed; }
.catalog-main-card { min-width: 0; padding: 1.5rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.catalog-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.catalog-panel-head h2 { margin: 0 0 .25rem; font-size: 1.05rem; }
.catalog-panel-head p { margin: 0; font-size: .78rem; }
.catalog-count { align-self: start; padding: .3rem .65rem; border-radius: 20px; color: #506158; background: #f0f4f0; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.catalog-search-form { margin-bottom: .3rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.catalog-search-primary { display: grid; grid-template-columns: minmax(180px, 1fr) 190px auto; align-items: center; gap: .55rem; }
.catalog-search-primary .search-field { width: 100%; min-width: 0; }
.catalog-search-primary .search-field input { width: 100%; border-radius: 6px; }
.catalog-search-primary select { min-width: 0; border-radius: 6px; font-size: .8rem; }
.catalog-search-primary button { white-space: nowrap; }
.catalog-filter-options { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; min-height: 30px; padding-top: .65rem; }
.catalog-filter-options details { flex: 1; }
.catalog-filter-options summary { width: fit-content; color: var(--teal-dark); cursor: pointer; font-size: .74rem; font-weight: 700; }
.catalog-filter-options > a { color: var(--teal-dark); font-size: .74rem; font-weight: 700; }
.catalog-filter-options > a:hover { text-decoration: underline; text-underline-offset: 3px; }
.catalog-filter-extra { display: grid; max-width: 500px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; padding: .9rem 0 .2rem; }
.catalog-filter-extra label { min-width: 0; }
.catalog-filter-extra select { min-width: 0; border-radius: 6px; font-size: .8rem; }
.catalog-rows { display: grid; grid-template-columns: 1fr; gap: 0; }
.catalog-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 155px auto; align-items: center; gap: 1.2rem; min-height: 84px; padding: .85rem .2rem; border-bottom: 1px solid #e9ede8; }
.catalog-row:last-child { border-bottom: 0; }
.catalog-row:hover { background: #fafcf9; }
.catalog-row-name { min-width: 0; }
.catalog-row-code { display: block; overflow: hidden; color: #708078; font-family: "Cascadia Mono", Consolas, monospace; font-size: .62rem; letter-spacing: .03em; text-overflow: ellipsis; white-space: nowrap; }
.catalog-row-name h3 { overflow: hidden; margin: .22rem 0 0; font-size: .91rem; text-overflow: ellipsis; white-space: nowrap; }
.catalog-row-name h3 a:hover { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }
.catalog-inline-note { display: inline-block; margin-top: .2rem; color: #64756a; font-size: .67rem; }
.catalog-inline-note.is-warning { color: #976720; }
.catalog-row-publication { display: grid; justify-items: start; gap: .35rem; }
.catalog-publication { display: inline-flex; align-items: center; gap: .35rem; color: #67726c; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.catalog-publication::before { width: 7px; height: 7px; border-radius: 50%; background: #a9b3ab; content: ""; }
.catalog-publication.is-live { color: var(--teal-dark); }
.catalog-publication.is-live::before { background: var(--teal); }
.catalog-row-publication a { color: var(--teal-dark); font-size: .68rem; font-weight: 600; }
.catalog-row-publication a:hover { text-decoration: underline; text-underline-offset: 3px; }
.catalog-row-actions, .company-product-actions { display: flex; align-items: center; justify-content: flex-end; gap: .3rem; }
.catalog-row-actions > .secondary-button, .company-product-actions > .secondary-button { min-height: 38px; padding: .5rem .8rem; border-radius: 6px; font-size: .73rem; }
.catalog-more-actions { position: relative; z-index: 1; }
.catalog-more-actions[open] { z-index: 12; }
.catalog-more-actions > summary { display: inline-flex; min-height: 38px; align-items: center; gap: .25rem; padding: .45rem .55rem; border: 1px solid transparent; border-radius: 6px; color: #536159; cursor: pointer; font-size: .72rem; font-weight: 700; list-style: none; }
.catalog-more-actions > summary::-webkit-details-marker { display: none; }
.catalog-more-actions > summary:hover, .catalog-more-actions[open] > summary { border-color: var(--line); background: #fff; }
.catalog-more-menu { position: absolute; top: calc(100% + .25rem); right: 0; z-index: 15; display: grid; min-width: 200px; gap: .15rem; padding: .4rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 12px 28px rgba(23,32,28,.14); }
.catalog-more-menu .duplicate-form { display: grid; gap: .2rem; margin: 0; }
.catalog-more-menu .check-label { display: flex; align-items: center; gap: .45rem; padding: .45rem .6rem; font-size: .68rem; }
.catalog-more-menu .check-label input { width: 16px; min-height: 16px; margin: 0; }
.catalog-menu-action { display: flex; width: 100%; min-height: 38px; align-items: center; padding: .5rem .65rem; border: 0; border-radius: 5px; color: var(--ink); background: transparent; cursor: pointer; font-size: .72rem; font-weight: 600; text-align: left; }
.catalog-menu-action:hover { background: #f2f5f1; }
.catalog-menu-action.is-danger, .catalog-menu-action[href*="/archive"] { color: #9d4032; }
.catalog-empty-state { display: grid; min-height: 210px; align-content: center; justify-items: center; gap: .45rem; padding: 2rem; text-align: center; }
.catalog-empty-state strong { font-size: 1rem; }
.catalog-empty-state p { margin: 0 0 .4rem; font-size: .8rem; }
.catalog-pagination { padding-top: 1rem; border-top: 1px solid var(--line); font-size: .76rem; }
.catalog-settings-disclosure { margin-top: 1.4rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.catalog-settings-disclosure > summary { display: flex; min-height: 80px; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.5rem; cursor: pointer; list-style: none; }
.catalog-settings-disclosure > summary::-webkit-details-marker { display: none; }
.catalog-settings-disclosure > summary strong, .catalog-settings-disclosure > summary small { display: block; }
.catalog-settings-disclosure > summary strong { font-size: .88rem; }
.catalog-settings-disclosure > summary small { margin-top: .25rem; color: var(--muted); font-size: .73rem; }
.catalog-settings-disclosure > summary > span:last-child { color: var(--muted); }
.catalog-settings-disclosure[open] > summary { border-bottom: 1px solid var(--line); }
.catalog-settings-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; padding: 1.5rem; }
.catalog-settings-body > section { min-width: 0; }
.catalog-settings-list { display: grid; margin-bottom: 1rem; }
.catalog-settings-list > div { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid #e9ede8; }
.catalog-settings-list strong { font-size: .77rem; }
.catalog-settings-list small { color: var(--muted); font-size: .67rem; }
.catalog-create-disclosure { border-top: 1px solid var(--line); }
.catalog-create-disclosure > summary { display: flex; align-items: center; gap: .45rem; padding: .85rem 0; color: var(--teal-dark); cursor: pointer; font-size: .76rem; font-weight: 700; }
.catalog-create-disclosure > summary::marker { content: ""; }
.catalog-create-disclosure > form { padding: .5rem 0 1rem; }
.catalog-create-disclosure input, .catalog-create-disclosure select { border-radius: 6px; }
.catalog-create-disclosure .editor-advanced label { margin-top: .7rem; }
.catalog-legacy-templates { grid-column: 1 / -1; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .75rem; }
.catalog-legacy-templates summary { width: fit-content; cursor: pointer; font-weight: 700; }
.catalog-legacy-templates p { margin: .5rem 0; font-size: .73rem; }
.catalog-legacy-templates > div { padding: .3rem 0; }

.company-catalog-list { display: grid; }
.company-catalog-list > a { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 1rem; min-height: 78px; padding: .75rem .25rem; border-bottom: 1px solid #e9ede8; }
.company-catalog-list > a:last-child { border-bottom: 0; }
.company-catalog-list > a:hover { color: var(--teal-dark); background: #fafcf9; }
.company-catalog-list > a > span:last-child { color: var(--teal-dark); font-size: .75rem; font-weight: 700; }
.company-catalog-initial { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 8px; color: var(--teal-dark); background: #e6f1eb; font-family: var(--font-display); font-size: 1.1rem; }

.company-catalog-page .catalog-page-head { align-items: end; }
.company-catalog-page .company-switcher { width: 290px; flex: 0 0 auto; }
.company-catalog-page .company-switcher select { border-radius: 6px; }
.company-draft-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; padding: .95rem 1.2rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.company-draft-bar > div:first-child { display: flex; align-items: center; gap: .75rem; }
.company-draft-bar strong, .company-draft-bar small { display: block; }
.company-draft-bar strong { font-size: .82rem; }
.company-draft-bar small { margin-top: .15rem; color: var(--muted); font-size: .72rem; }
.catalog-draft-mark { width: 30px; height: 30px; border: 8px solid #d7eee2; border-radius: 50%; background: var(--teal); }
.company-draft-actions { display: flex; align-items: center; gap: .55rem; }
.company-draft-actions form { display: flex; }
.company-draft-actions :is(.primary-button, .secondary-button) { min-height: 40px; font-size: .76rem; white-space: nowrap; }
.company-catalog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 305px; align-items: start; gap: 1.25rem; }
.company-catalog-main { display: grid; min-width: 0; gap: .9rem; }
.company-catalog-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.company-catalog-intro h2 { margin-bottom: .25rem; font-size: 1.15rem; }
.company-catalog-intro p { margin: 0; font-size: .78rem; }
.company-dirty-note { color: #946420; font-size: .72rem; font-weight: 700; }
.company-draft-menu { position: relative; z-index: 2; flex-shrink: 0; }
.company-draft-menu > summary { padding: .4rem .5rem; color: var(--teal-dark); cursor: pointer; font-size: .75rem; font-weight: 700; list-style: none; }
.company-draft-menu > summary::-webkit-details-marker { display: none; }
.company-draft-menu > div { position: absolute; top: 100%; right: 0; z-index: 3; width: 280px; padding: 1rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 12px 28px rgba(23,32,28,.14); }
.company-draft-menu p { font-size: .72rem; }
.company-draft-menu form + form { margin-top: .55rem; }
.company-draft-menu form button { min-height: 36px; font-size: .72rem; }
.company-category-nav { display: flex; overflow-x: auto; gap: .45rem; padding-bottom: .1rem; }
.company-category-nav a { min-height: 34px; padding: .5rem .7rem; border: 1px solid #dbe4dc; border-radius: 20px; color: #486056; background: #fff; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.company-category-nav a:hover { border-color: var(--teal); color: var(--teal-dark); }
.company-category-tools { border: 1px dashed #cbd6ce; border-radius: 8px; background: #f9fbf8; }
.company-category-tools > summary { display: flex; min-height: 42px; align-items: center; justify-content: space-between; padding: .55rem .8rem; color: var(--teal-dark); cursor: pointer; font-size: .76rem; font-weight: 700; list-style: none; }
.company-category-tools > summary::-webkit-details-marker { display: none; }
.company-category-tools-body { display: grid; gap: 1rem; padding: .4rem 1rem 1rem; }
.company-category-list { display: grid; }
.company-category-list > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 40px; border-bottom: 1px solid var(--line); font-size: .75rem; }
.company-category-list > div.is-child { padding-left: 1rem; color: var(--muted); }
.company-category-list button { min-height: 32px; font-size: .69rem; }
.company-category-create { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .7rem; align-items: end; }
.company-category-create label { min-width: 0; }
.company-category-create input, .company-category-create select { min-width: 0; min-height: 40px; border-radius: 6px; font-size: .78rem; }
.company-category-create .editor-advanced { grid-column: 1 / -1; margin: 0; padding-top: 0; border: 0; }
.company-category-create .editor-advanced label { margin-top: .7rem; }
.company-category-create > button { justify-self: start; min-height: 38px; font-size: .75rem; }
.company-category-section { min-width: 0; scroll-margin-top: 1rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.company-category-section.drop-target { outline: 2px solid var(--teal); outline-offset: 3px; }
.company-category-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); }
.company-category-heading > div > span { color: var(--muted); font-size: .65rem; font-weight: 700; }
.company-category-heading h3 { margin: .15rem 0 0; font-size: .94rem; }
.company-category-heading .catalog-count { align-self: center; }
.company-product-list { display: grid; }
.company-product-row { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) 70px auto; align-items: center; gap: .8rem; min-height: 82px; padding: .75rem 1rem; border-bottom: 1px solid #e9ede8; }
.company-product-row:last-child { border-bottom: 0; }
.company-product-row:hover { background: #fafcf9; }
.company-product-row.dragging, .company-available-list article.dragging { opacity: .45; }
.company-product-row .product-card-mark { width: 36px; height: 46px; border-radius: 3px; }
.company-product-copy { min-width: 0; }
.company-product-copy h4 { overflow: hidden; margin: .2rem 0 0; font-size: .81rem; text-overflow: ellipsis; white-space: nowrap; }
.company-product-copy small { display: block; margin-top: .22rem; color: var(--muted); font-size: .66rem; }
.company-product-actions > .secondary-button { white-space: nowrap; }
.company-row-menu { min-width: 225px; }
.company-row-menu form { display: grid; }
.company-row-menu form + form { padding-top: .3rem; border-top: 1px solid #edf0eb; }
.company-row-menu label { gap: .35rem; padding: .4rem .55rem; font-size: .68rem; }
.company-row-menu select { min-height: 36px; padding: .4rem; border-radius: 5px; font-size: .72rem; }
.company-category-empty { margin: 0; padding: 1.3rem 1rem; font-size: .76rem; }
.company-catalog-layout .catalog-available-panel { position: sticky; top: 1rem; min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.company-catalog-layout .available-drawer > summary { display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: .5rem; padding: 1rem; font-family: var(--font-sans); list-style: none; }
.company-catalog-layout .available-drawer > summary strong { display: block; font-size: .86rem; }
.company-catalog-layout .available-drawer > summary small { display: block; margin-top: .2rem; color: var(--muted); font-size: .7rem; font-weight: 400; }
.company-catalog-layout .available-drawer[open] > summary { border-bottom: 1px solid var(--line); }
.company-catalog-layout .available-drawer-body { max-height: min(72vh, 720px); overflow-y: auto; padding: .85rem 1rem 1rem; }
.company-catalog-layout .available-search { grid-template-columns: minmax(0, 1fr) auto; margin-bottom: .6rem; }
.company-catalog-layout .available-search input { min-height: 39px; border-radius: 6px; font-size: .75rem; }
.company-catalog-layout .available-search button { min-height: 39px; padding-inline: .65rem; font-size: .7rem; }
.company-available-list { display: grid; }
.company-available-list article { display: grid; gap: .65rem; padding: .8rem 0; border-bottom: 1px solid #e9ede8; }
.company-available-list article:last-child { border-bottom: 0; }
.company-available-list article strong { display: block; overflow: hidden; margin-top: .2rem; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.company-available-list article form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; }
.company-available-list article select { min-width: 0; min-height: 37px; padding: .35rem .5rem; border-radius: 5px; font-size: .7rem; }
.company-available-list article button { min-height: 37px; padding: .35rem .65rem; font-size: .7rem; }
.company-add-help { margin: .6rem 0 0; font-size: .72rem; }

.catalog-template-explainer { display: flex; align-items: flex-start; gap: .9rem; margin-bottom: 1.2rem; padding: 1rem 1.2rem; border: 1px solid #cfe3d6; border-radius: 10px; background: #eaf5ed; }
.catalog-template-explainer > span { display: grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: var(--teal); }
.catalog-template-explainer p { margin: 0; color: #365448; font-size: .79rem; }
.catalog-template-explainer strong { margin-right: .25rem; }
.catalog-template-list { display: grid; }
.catalog-template-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; min-height: 114px; padding: 1rem .1rem; border-bottom: 1px solid #e9ede8; }
.catalog-template-row:last-child { border-bottom: 0; }
.catalog-template-row h3 { margin: .3rem 0 .25rem; font-size: .95rem; }
.catalog-template-row p { margin: 0 0 .35rem; font-size: .75rem; }
.catalog-template-meta { color: var(--muted); font-size: .69rem; }
.catalog-template-row.is-archived { opacity: .7; }
.catalog-template-actions { display: flex; align-items: center; gap: .5rem; }
.catalog-template-actions .primary-button { min-height: 39px; font-size: .75rem; }
.catalog-template-actions .text-button { font-size: .74rem; }
.template-editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 295px; align-items: start; gap: 1.25rem; }
.template-editor-form { display: grid; min-width: 0; gap: 1.1rem; }
.template-editor-form .editor-card, .template-help-card { border-radius: 10px; }
.template-editor-form label { min-width: 0; }
.template-editor-form :is(input, select, textarea) { min-width: 0; border-radius: 6px; }
.template-editor-form .editor-advanced { margin-top: 0; }
.template-editor-form .editor-advanced .editor-fields { padding-top: 1rem; }
.template-setup-card .form-section { margin: 0; padding: .95rem 0 0; border: 0; }
.template-setup-card .form-section + .form-section { margin-top: 1.2rem; border-top: 1px solid var(--line); }
.template-setup-card .form-section legend { padding-bottom: .7rem; font-family: var(--font-sans); font-size: .85rem; font-weight: 700; }
.template-setup-card .form-section .field-row { margin-bottom: .8rem; }
.template-setup-card .form-section > label { margin-bottom: .8rem; }
.template-included-note { display: grid; gap: .2rem; margin-top: 1.1rem; padding: .8rem 1rem; border-radius: 6px; color: #456054; background: #eff6f0; font-size: .73rem; }
.template-included-note span { color: #617268; }
.template-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: .6rem; }
.template-help-card { position: sticky; top: 1rem; }
.template-help-card h2 { font-size: 1rem; }
.template-help-card p { font-size: .78rem; }
.template-help-card .secondary-button { justify-content: space-between; font-size: .75rem; text-align: left; }
.template-help-note { margin: .8rem 0 0; color: var(--muted); font-size: .71rem !important; }
.template-archive { margin-top: 1.4rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.template-archive summary { color: #9d4032; cursor: pointer; font-size: .73rem; font-weight: 700; }
.template-archive p { margin: .7rem 0; }

@media (max-width: 1100px) {
  .company-catalog-layout { grid-template-columns: minmax(0, 1fr) 265px; gap: .9rem; }
  .company-product-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .company-product-row > .catalog-publication { display: none; }
}
@media (max-width: 900px) {
  .catalog-page-head { align-items: flex-start; flex-direction: column; }
  .catalog-head-actions { justify-content: flex-start; }
  .company-catalog-layout, .template-editor-layout { grid-template-columns: 1fr; }
  .company-catalog-layout .catalog-available-panel { position: static; grid-row: 1; }
  .company-catalog-layout .available-drawer-body { max-height: 480px; }
  .template-help-card { position: static; }
}
@media (max-width: 760px) {
  .catalog-page-head h1 { font-size: 1.75rem; }
  .catalog-area-nav { margin-right: -1rem; padding-right: 1rem; }
  .catalog-main-card { padding: 1rem; }
  .catalog-search-primary { grid-template-columns: minmax(0, 1fr) auto; }
  .catalog-search-primary .search-field { grid-column: 1 / -1; }
  .catalog-search-primary .secondary-button { min-height: 44px; }
  .catalog-row { grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; }
  .catalog-row-publication { grid-row: 2; }
  .catalog-row-actions { grid-column: 2; grid-row: 1 / 3; }
  .catalog-settings-body { grid-template-columns: 1fr; }
  .catalog-legacy-templates { grid-column: auto; }
  .company-draft-bar { align-items: stretch; flex-direction: column; }
  .company-draft-actions { justify-content: flex-end; }
  .company-catalog-page .company-switcher { width: min(100%, 400px); }
  .company-category-nav { display: none; }
  .company-mobile-jump select { border-radius: 6px; }
  .company-catalog-intro { align-items: flex-start; }
  .catalog-template-row { align-items: stretch; grid-template-columns: 1fr; }
  .catalog-template-actions { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .catalog-area-nav a { min-width: 0; padding: .6rem .35rem; font-size: .68rem; white-space: normal; }
  .catalog-head-actions { width: 100%; }
  .catalog-head-actions :is(.primary-button, .secondary-button) { width: 100%; }
  .catalog-search-primary { grid-template-columns: 1fr; }
  .catalog-search-primary .search-field { grid-column: auto; }
  .catalog-filter-extra { grid-template-columns: 1fr; }
  .catalog-row { grid-template-columns: 1fr; }
  .catalog-row-publication { display: flex; gap: .8rem; grid-row: auto; }
  .catalog-row-actions { justify-content: flex-start; grid-column: auto; grid-row: auto; }
  .company-catalog-list > a { grid-template-columns: 40px minmax(0, 1fr); }
  .company-catalog-list > a > span:last-child { grid-column: 2; }
  .company-category-create { grid-template-columns: 1fr; }
  .company-category-create .editor-advanced { grid-column: auto; }
  .company-product-row { grid-template-columns: 36px minmax(0, 1fr); }
  .company-product-actions { justify-content: flex-start; grid-column: 2; }
  .company-draft-actions :is(a, form, button) { flex: 1; }
  .company-draft-actions :is(.primary-button, .secondary-button) { width: 100%; }
}
