[hidden] { display: none !important; }
:root {
  --bg: #f5f6f8; --card: #fff; --ink: #1d2330; --muted: #6b7280; --line: #e3e6eb;
  --brand: #1f5eff; --brand-ink: #fff;
  --fail: #d93025; --fail-bg: #fdecea; --warn: #b77900; --warn-bg: #fff4d6;
  --pass: #1e8e3e; --pass-bg: #e6f4ea; --na: #80868b; --na-bg: #f1f3f4;
  --wa: #128c4a; --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; margin: 0 0 10px; }
h4 { margin: 18px 0 8px; }
code { background: #eef0f3; padding: 1px 5px; border-radius: 4px; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 22px;
  background: #101828; color: #fff; position: sticky; top: 0; z-index: 10; }
.topbar a { color: #dfe6f5; }
.topbar nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.topbar .who { color: #9aa4b8; font-size: 13px; }
.brand { font-weight: 700; font-size: 16px; color: inherit; display: inline-flex; align-items: center; gap: 8px; }
.brand.big { font-size: 20px; margin-bottom: 4px; }
.logo { background: var(--brand); color: #fff; border-radius: 7px; padding: 3px 6px; font-size: 13px; letter-spacing: .5px; }

.container { max-width: 1100px; margin: 22px auto; padding: 0 18px; }
.wide { max-width: 1500px; margin: 18px auto; padding: 0 18px; }
.narrow { max-width: 420px; margin: 70px auto; padding: 0 18px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card.empty { text-align: center; padding: 40px; }
.auth h2 { margin-top: 6px; }
.page-head, .job-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 10px; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid #cfd4dc;
  border-radius: 7px; font: inherit; background: #fff; }
input[type=checkbox] { display: inline; width: auto; margin: 0 6px 0 0; }
input[type=file] { padding: 6px; }
textarea { resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.compact label { margin-bottom: 6px; }
.compact .grid2 { grid-template-columns: 1fr; }
.filters { display: flex; gap: 8px; align-items: center; }
.filters input, .filters select { margin: 0; width: auto; }
.filters input { width: 260px; }
.check-label { font-weight: 400; font-size: 13px; color: var(--fail); }

.btn { display: inline-block; padding: 8px 14px; border-radius: 7px; border: 1px solid #c9ced6; background: #fff;
  color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.btn:hover { background: #f3f5f8; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff !important; }
.btn-primary:hover { background: #164de0; }
.btn-wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn-wa:hover { background: #0e7a40; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-lg { padding: 11px 22px; font-size: 15px; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn.active { background: #101828; color: #fff; border-color: #101828; }
.btn-approve { background: var(--pass); border-color: var(--pass); }
.btn[disabled] { opacity: .6; cursor: wait; }
form.inline { display: inline; }

.alert { padding: 10px 14px; border-radius: 8px; background: #eef3ff; border: 1px solid #d6e2ff; margin-bottom: 14px; }
.alert-err { background: var(--fail-bg); border-color: #f6c6c2; color: #8c1d14; }
.alert-ok { background: var(--pass-bg); border-color: #bfe3c8; color: #145c2a; }
.alert.big { font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.note { background: #fff8e1; border: 1px solid #f3e0a6; border-radius: 7px; padding: 8px 10px; margin-top: 8px; font-size: 13px; }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted);
  background: #fafbfc; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f7f9ff; }
.compare-table tr.changed td { background: #fbfcff; }
.compare-table td:first-child { font-weight: 600; white-space: nowrap; }

.chip { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.chip-fail { background: var(--fail-bg); color: var(--fail); }
.chip-warning { background: var(--warn-bg); color: var(--warn); }
.chip-pass { background: var(--pass-bg); color: var(--pass); }
.chip-na { background: var(--na-bg); color: var(--na); }
.status { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 6px; vertical-align: middle;
  background: #eef0f3; color: #3c4453; }
.status-issues, .status-changes { background: var(--fail-bg); color: var(--fail); }
.status-ready { background: #e8f0fe; color: #1a56db; }
.status-confirmed, .status-proof_sent { background: #f3e8ff; color: #7e22ce; }
.status-approved { background: var(--pass); color: #fff; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot-fail { background: var(--fail); } .dot-warning { background: #e8a100; } .dot-pass { background: var(--pass); } .dot-na { background: var(--na); }

.stepper { display: flex; list-style: none; padding: 0; margin: 10px 0 16px; counter-reset: s; gap: 4px; flex-wrap: wrap; }
.stepper li { flex: 1; min-width: 120px; background: #e9ecf1; color: #687083; padding: 7px 12px; font-size: 13px; font-weight: 600;
  border-radius: 6px; counter-increment: s; }
.stepper li::before { content: counter(s) " · "; }
.stepper li.done { background: #dff1e5; color: #16632f; }
.stepper li.done::before { content: "✔ "; }
.stepper li.next { background: #e3ebff; color: #1a49c9; outline: 2px solid #b8cbff; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tab { padding: 8px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; color: var(--ink); font-weight: 600; }
.tab.active { background: #fff; border-color: var(--line); margin-bottom: -1px; }
.tab-link { margin-left: auto; color: var(--brand); }

.workflow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.workflow .card { margin-bottom: 14px; }
.workflow .card h3 { font-size: 14px; }
.workflow form { margin-bottom: 8px; }
.workflow form > * { margin-bottom: 6px; }
.results { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.col-preview { position: sticky; top: 64px; }
.col-preview .preview { max-width: min(100%, calc((100vh - 200px) * var(--r))); }
.bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1150px) { .workflow { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { .results, .bottom, .workflow { grid-template-columns: 1fr; } .col-preview { position: static; }
  .grid2 { grid-template-columns: 1fr; } .filters input { width: 160px; } }

.result-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.result-big { font-size: 20px; font-weight: 800; }
.result-fail { color: var(--fail); } .result-warning { color: var(--warn); } .result-pass { color: var(--pass); }
.counts { display: flex; gap: 6px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.wa-preview { margin-top: 10px; }
.wa-preview summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.wa-preview textarea { font-size: 13px; background: #f4fbf6; }

.checks { list-style: none; margin: 0; padding: 0; }
.check { border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: 0; }
.check summary { display: grid; grid-template-columns: 70px 1fr; gap: 2px 10px; align-items: baseline; padding: 10px 16px; cursor: pointer; list-style: none; }
.check-msg { grid-column: 2; font-size: 13px; }
.check summary::-webkit-details-marker { display: none; }
.check summary:hover { background: #fafbfd; }
.check .chip { text-align: center; }
.check-title { font-weight: 700; }
.check-msg { color: #3c4453; }
.check-pass .check-msg, .check-na .check-msg { color: var(--muted); }
.check-fail { box-shadow: inset 3px 0 0 var(--fail); }
.check-warning { box-shadow: inset 3px 0 0 #e8a100; }
.items { margin: 0 16px 8px 92px; padding: 0; list-style: none; font-size: 13px; }
.items li { padding: 3px 6px; border-radius: 5px; }
.items li.locatable { cursor: pointer; }
.items li.locatable:hover { background: #eef3ff; }
.pin { color: var(--brand); margin-right: 6px; }
.cust { margin: 0 16px 12px 92px; font-size: 12.5px; color: #3c4453; background: #f6f7f9; padding: 7px 10px; border-radius: 6px; }
@media (max-width: 700px) {
  .items, .cust { margin-left: 16px; }
}

.preview-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.legend { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.legend label { display: inline; font-weight: 400; margin: 0 0 0 8px; }
.lg { display: inline-block; width: 14px; height: 10px; border: 2px solid; margin-right: 2px; }
.lg-trim { border-color: #8db600; } .lg-safe { border-color: #ff4fa3; border-style: dashed; }
.lg-fail { border-color: var(--fail); } .lg-warning { border-color: #e8a100; }
.page-tabs { display: flex; gap: 6px; margin: 8px 0; flex-wrap: wrap; }
.page-fig { margin: 8px 0 0; }
.preview { position: relative; display: block; max-width: 100%; margin: 0 auto; line-height: 0; background:
  repeating-conic-gradient(#f0f0f0 0% 25%, #fafafa 0% 50%) 50% / 16px 16px; border: 1px solid var(--line); }
.preview img { width: 100%; height: auto; display: block; }
.ov { position: absolute; pointer-events: none; }
.ov-trim { border: 2px solid #8db600; }
.ov-safe { border: 1.5px dashed #ff4fa3; }
.flip-panel { margin: 10px 0; padding: 10px 12px; border: 1px solid #d6e2ff; background: #eef3ff; border-radius: 8px; }
.flip-panel .flip-url { width: 100%; margin: 6px 0; font-size: 13px; }
.flip-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ov-bind { background: repeating-linear-gradient(45deg, rgba(120, 90, 200, .22) 0 3px, transparent 3px 8px); }
.ov-fold-v { border-left: 1.5px dashed #0095d9; margin-left: -0.75px; }
.ov-fold-h { border-top: 1.5px dashed #0095d9; margin-top: -0.75px; }
.ov-noprint { background: repeating-linear-gradient(-45deg, rgba(60, 60, 60, .45) 0 1.5px, transparent 1.5px 7px); }
.ov-print { border: 1px solid rgba(60, 60, 60, .6); }
.ov-issue { border: 2.5px solid; border-radius: 3px; margin: -4px; padding: 4px; box-sizing: content-box; pointer-events: auto; cursor: help; min-width: 6px; min-height: 6px; }
.ov-fail { border-color: var(--fail); background: rgba(217, 48, 37, .07); }
.ov-warning { border-color: #e8a100; background: rgba(232, 161, 0, .07); }
.ov-issue.flash { animation: flash 1.4s ease 2; box-shadow: 0 0 0 4px rgba(31, 94, 255, .45); z-index: 2; }
.hide-issues .ov-issue { display: none; }
.ov-large { display: none; }
.ov-large.flash { display: block; background: transparent; pointer-events: none; }
@keyframes flash { 50% { box-shadow: 0 0 0 10px rgba(31, 94, 255, .15); } }

.dropzone { position: relative; border: 2px dashed #b9c3d3; border-radius: 10px; padding: 30px; text-align: center;
  background: #fafcff; margin-bottom: 16px; transition: .15s; }
.dropzone.over { border-color: var(--brand); background: #eef3ff; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.dz-file { font-weight: 700; margin-top: 8px; color: var(--brand); }

.plain { list-style: none; padding: 0; margin: 8px 0 0; }
.plain li { padding: 3px 0; }
.log { list-style: none; padding: 0; margin: 0; font-size: 12.5px; max-height: 300px; overflow: auto; }
.log li { padding: 4px 0; border-bottom: 1px solid #f0f1f3; }

.seg { display: flex; gap: 4px; }
.cmp-slider { max-width: 900px; margin: 0 auto 10px; }
.cmp-stage { position: relative; line-height: 0; border: 1px solid var(--line); user-select: none; }
.cmp-stage img { width: 100%; height: auto; display: block; }
.cmp-b-wrap { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); }
.cmp-b-wrap img { width: 100%; height: 100%; object-fit: fill; }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--brand); box-shadow: 0 0 0 1px #fff; }
.cmp-label { position: absolute; top: 8px; background: rgba(16, 24, 40, .75); color: #fff; font-size: 12px; line-height: 1.4; padding: 2px 8px; border-radius: 5px; }
.cmp-label.l { left: 8px; } .cmp-label.r { right: 8px; }
.cmp-range { margin-top: 8px; }
.cmp-side { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.prod-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.prod-form .span2 { grid-column: 1 / -1; }
.prod-form .sides { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px;
  border: 1px solid var(--line, #e3e6ec); border-radius: 8px; padding: 6px 12px 10px; margin: 4px 0 12px; }
.prod-form .sides legend { font-weight: 600; font-size: 13px; padding: 0 4px; }
.prod-form .sides > div { grid-column: 1 / -1; }
@media (max-width: 700px) { .prod-form .sides { grid-template-columns: 1fr 1fr; } }
.prod-form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
@media (max-width: 700px) { .prod-form { grid-template-columns: 1fr; } }

.relay-status { margin: -4px 0 12px; color: var(--muted); }
.order-lookup { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.order-lookup label { margin: 0; width: 220px; }
.order-lookup .btn { height: 38px; }
.order-item { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; margin: 8px 0; cursor: pointer; }
.order-item:has(input:checked) { border-color: var(--brand); background: #f4f7ff; }
.order-item input[type=radio] { display: inline; width: auto; flex: none; margin: 3px 0 0; }
.order-item > span { flex: 1; }
#order-result { margin-bottom: 16px; }
.order-spec { border-left: 4px solid var(--brand); }
.order-spec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 16px; margin-bottom: 8px; }
.spec-grid > div { display: flex; flex-direction: column; gap: 1px; }
.spec-info summary { cursor: pointer; color: var(--muted); }
.spec-info .table td { padding: 4px 10px; }
.topbar .btn-sm:not(.btn-primary) { background: transparent; color: #dfe6f5 !important; border-color: #3a465e; }

.pl-all { display: inline; font-weight: 400; margin: 0 0 0 10px; }
.pl-all input { margin-right: 4px; }
.sy-group { margin-bottom: 10px; }
.sy-file { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.sy-file .tool { height: 24px; min-width: 28px; font-size: 11px; }

.tpl-cat { margin-bottom: 10px; }
.tpl-head { padding: 11px 16px; cursor: pointer; font-weight: 700; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tpl-cat[open] .tpl-head { border-bottom: 1px solid var(--line); }
.tpl-table td { padding: 7px 14px; vertical-align: middle; }
.tpl-label { width: 55%; }
.tpl-dl { text-align: right; }
.tpl-dl .tool { margin-left: 4px; }
.tpl-rule { text-align: right; width: 90px; }
.tpl-in { color: var(--pass); font-weight: 700; font-size: 12px; }
.tpl-legend { margin-left: 6px; }
@media (max-width: 700px) { .tpl-table td { display: block; width: auto; text-align: left; padding: 4px 14px; }
  .tpl-table tr { display: block; padding: 6px 0; border-bottom: 1px solid var(--line); } .tpl-table td { border: 0; } }

.tuts { margin: 0 16px 12px 92px; font-size: 12.5px; color: #3c4453; }
@media (max-width: 700px) { .tuts { margin-left: 16px; } }

.help-search { width: 320px; max-width: 100%; margin: 0; }
.help-head { background: #0b5e96; color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; padding: 10px 16px; }
.help-list { list-style: none; margin: 0; padding: 0; }
.help-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--line); }
.help-row:last-child { border-bottom: 0; }
.help-row:hover { background: #fafbfd; }
.help-row.help-hit { background: #eef3ff; box-shadow: inset 3px 0 0 var(--brand); }
.help-main { display: flex; align-items: baseline; gap: 6px 8px; flex-wrap: wrap; }
.help-n { color: var(--muted); min-width: 26px; }
.help-title { font-weight: 600; }
.help-tag { font-size: 11px; background: #eef0f3; color: #4a5263; border-radius: 99px; padding: 1px 8px; }
.help-links { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.tool { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 30px; padding: 0 6px;
  border-radius: 6px; font: 700 12px/1 system-ui, sans-serif; border: 0; cursor: pointer; text-decoration: none !important; }
.tool-ai { background: #fff1db; color: #a35a00; } .tool-cdr { background: #e6f6dc; color: #3d7a12; }
.tool-ps { background: #e3ebff; color: #2449b8; } .tool-id { background: #fde3ee; color: #b4235b; }
.tool-video { background: #fde4e2; color: #c62828; }
.tool:hover { filter: brightness(.95); }
.help-video { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; padding-top: 6px; }
.help-video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; background: #000; }
.help-none { padding: 16px; margin: 0; }
@media (max-width: 600px) { .help-row { grid-template-columns: 1fr; } .help-links { justify-content: flex-start; } }

.busy-overlay { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.busy-box { background: #fff; padding: 22px 28px; border-radius: 12px; font-weight: 600; display: flex; gap: 12px; align-items: center; }
.spinner { width: 22px; height: 22px; border: 3px solid #d6def0; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #101828; color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 60; }

/* analytics & reporting (front page) */
.an { padding: 0; }
.an > summary { list-style: none; cursor: pointer; }
.an > summary::-webkit-details-marker { display: none; }
.an-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 14px 18px; }
.an-title { font-weight: 700; font-size: 1.05rem; }
.an-title::before { content: "\25B8"; display: inline-block; margin-right: 6px; color: var(--muted); transition: transform .15s; }
.an[open] .an-title::before { transform: rotate(90deg); }
.an-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.an-periods { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.an-periods a { padding: 4px 10px; font-size: .85rem; color: var(--ink); text-decoration: none; }
.an-periods a + a { border-left: 1px solid var(--line); }
.an-periods a.on { background: var(--brand); color: var(--brand-ink); }
.an-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; padding: 0 18px; }
.kpi { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.kpi-label { font-size: .8rem; color: var(--muted); }
.kpi-num { font-size: 1.7rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: .75rem; color: var(--muted); }
.an-pipe { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 12px 18px 0; }
.an-pipe a { text-decoration: none; }
.an-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; padding: 12px 18px 0; }
.an-grid:last-of-type { padding-bottom: 16px; }
.an-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-width: 0; }
.an-box-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-size: .9rem; }
.an-legend { font-size: .78rem; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 6px; }
.sw-pass, .seg-pass { background: var(--pass); }
.sw-warning, .seg-warning { background: #e3a008; }
.sw-fail, .seg-fail { background: var(--fail); }
.an-cols { display: flex; align-items: flex-end; gap: 2px; height: 140px; border-bottom: 1px solid var(--line); }
.an-col { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 0; cursor: default; outline: none; }
.an-col:hover, .an-col:focus { background: var(--na-bg); }
.an-stack { width: 100%; max-width: 28px; margin: 0 auto; display: flex; flex-direction: column; gap: 2px; min-height: 0; }
.an-stack .seg { min-height: 2px; }
.an-stack .seg:first-child { border-radius: 4px 4px 0 0; }
.an-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: 4px; }
.an-bars { display: flex; flex-direction: column; gap: 6px; }
.an-bar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 8px; align-items: center; font-size: .82rem; outline: none; border-radius: 4px; }
.an-bar:hover, .an-bar:focus { background: var(--na-bg); }
.an-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-bar-track { height: 14px; }
.an-bar-fill { display: flex; gap: 2px; height: 100%; min-width: 4px; }
.an-bar-fill .seg { min-width: 2px; }
.an-bar-fill .seg:last-child { border-radius: 0 4px 4px 0; }
.an-bar-val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.an-table { font-size: .85rem; }
.an-table th, .an-table td { padding: 5px 6px; }
.an-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.an-empty { margin: 20px 0; text-align: center; }
.an { position: relative; }
.an-tip { position: absolute; z-index: 20; pointer-events: none; background: var(--ink); color: #fff; font-size: .78rem;
  padding: 6px 9px; border-radius: 6px; max-width: 260px; white-space: pre-line; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.an-tip::first-line { font-weight: 700; }
.an-periods button { padding: 4px 10px; font-size: .85rem; color: var(--ink); background: none; border: 0; border-left: 1px solid var(--line); cursor: pointer; font: inherit; font-size: .85rem; }
.an-periods button.on { background: var(--brand); color: var(--brand-ink); }
.an-range { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 18px 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--na-bg); }
.an-range[hidden] { display: none; }
.an-range label { display: inline-flex; gap: 6px; align-items: center; font-size: .85rem; }
.an-range input[type=date] { width: auto; padding: 4px 6px; }
.an-quick a { color: var(--brand); }

/* imposition & variable data */
.imp { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .imp { grid-template-columns: 1fr; } }
.imp-sec h2 { font-size: 1.05rem; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.imp-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .8rem; }
.imp-switch { margin-left: auto; font-size: .85rem; font-weight: 400; display: inline-flex; gap: 4px; align-items: center; }
.imp-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 8px 0; }
.imp-row label { display: inline-flex; gap: 6px; align-items: center; font-size: .88rem; }
.imp-row input, .imp-row select { width: auto; }
.imp-check input { width: auto; }
.w-xs { width: 64px !important; } .w-s { width: 90px !important; } .w-m { width: 220px !important; }
.imp-drop { display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; text-align: center;
  border: 2px dashed var(--line); border-radius: 10px; padding: 22px; cursor: pointer; background: #fafbfc; }
.imp-drop.over, .imp-drop:hover { border-color: var(--brand); background: #f3f6ff; }
.imp-drop input { display: none; }
.imp-drop.small-drop { padding: 12px; }
.imp-art { display: flex; gap: 12px; align-items: flex-start; }
.imp-art img { width: 120px; max-height: 120px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.imp-tabs { display: flex; gap: 16px; margin-bottom: 8px; font-size: .9rem; }
.imp-tabs input { width: auto; }
.imp-sample { overflow-x: auto; margin: 6px 0; }
.imp-sample .table { font-size: .78rem; }
.imp-sample td, .imp-sample th { padding: 3px 6px; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.imp-cols { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 10px 0 6px; }
.chip-btn { border: 1px solid #d6e2ff; background: #eef3ff; color: var(--brand); border-radius: 12px; padding: 2px 8px; font-size: .78rem; cursor: pointer; }
.chip-btn:hover { background: var(--brand); color: #fff; }
.imp-fields { font-size: .82rem; }
.imp-fields td, .imp-fields th { padding: 4px; vertical-align: top; }
.imp-fields tr.sel td { background: #f3f6ff; }
.imp-fields textarea, .imp-fields .f-text { width: 100%; min-width: 140px; font: inherit; padding: 4px 6px; }
.imp-fields select { width: auto; font-size: .78rem; padding: 2px 4px; margin: 0 2px 2px 0; }
.f-style { min-width: 150px; }
.imp-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-bottom: 8px; }
.imp-modes label { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font-size: .88rem; }
.imp-modes label.on { border-color: var(--brand); background: #f3f6ff; }
.imp-modes label[hidden] { display: none; }
.imp-modes input { width: auto; position: absolute; opacity: 0; pointer-events: none; }
.imp-modes span { font-size: .76rem; color: var(--muted); }
.imp-actions { display: flex; gap: 10px; align-items: center; position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; }
.imp-side { position: sticky; top: 12px; }
.imp-stats { font-size: .88rem; margin-bottom: 8px; }
.imp-stats.loading { opacity: .5; }
.imp-imgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.imp-imgs img, .imp-rec img { width: 100%; border: 1px solid var(--line); background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.imp figure { margin: 0; }
.imp-rec { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.imp-rec img { cursor: crosshair; }
.imp-done { margin-top: 12px; }
.err { color: var(--fail); }
.imp-fields-wrap { overflow-x: auto; margin: 0 -4px; }
.imp-fields-wrap .imp-fields { min-width: 640px; }
@media (max-width: 1000px) { .imp { grid-template-columns: minmax(0, 1fr); } .imp-side { position: static; } }
.imp-art > div { min-width: 0; overflow-wrap: anywhere; }
.imp-sec { min-width: 0; }
.imp-press { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.ok { color: var(--pass); }

/* GPC001 Grand Print templates + CDR converter */
.gpc-folders { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.gpc-folder h2 { font-size: 1.05rem; margin: 18px 0 8px; }
.gpc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; padding: 12px; }
.gpc-item { display: flex; flex-direction: column; gap: 3px; border: 1px solid var(--line); border-radius: 8px; padding: 8px;
  color: var(--ink); text-decoration: none; min-width: 0; }
.gpc-item:hover { border-color: var(--brand); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.gpc-item[hidden], .gpc-cat[hidden], .gpc-folder[hidden] { display: none; }
.gpc-thumb { display: block; aspect-ratio: 4 / 3; background: #f4f6fa; border-radius: 6px; overflow: hidden; }
.gpc-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gpc-name { font-size: .86rem; line-height: 1.25; overflow-wrap: anywhere; }
.gpc-cn { overflow-wrap: anywhere; }
.gpc-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: auto; }
.gpc-open { margin-left: auto; color: var(--brand); white-space: nowrap; }
.cv-res { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cv-res img { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.imp-drop.over { border-color: var(--brand); background: #eef3ff; }
@media (max-width: 700px) { .gpc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px; } .cv-res { grid-template-columns: 1fr; } }
.imp-safe-key { color: #ff4fa3; font-weight: 600; }

/* auto-fix */
.fix-bar { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; border-color: #c9d6ff; background: #f5f8ff; }
.fix-bar-actions { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.more-fixes summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 4px 0; }
.more-fixes .fix-opt { display: block; margin: 6px 0; }
.fixes { margin: 8px 0 4px; padding: 8px 10px; background: #f5f8ff; border: 1px solid #dbe4ff; border-radius: 8px; }
.fix-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 3px 0; }
.fix-opt { font-weight: 600; font-size: 13px; cursor: pointer; }
.fix-sel { font-size: 12px; padding: 2px 4px; width: auto; max-width: 100%; }
.btn-fix { background: var(--brand); border-color: var(--brand); color: #fff !important; }
.cv-opts[hidden] { display: none; }
/* shapes (round / custom die line) */
.ov-round { border-radius: 50%; }
.ov-die { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ov-die path { fill: none; stroke: #8db600; stroke-width: 2px; }
/* job form: trim size */
.trim-field { display: flex; flex-direction: column; gap: 2px; }
.trim-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.trim-row input { width: 90px; }
.trim-row select { width: auto; flex: 1 1 160px; }
/* imposition: cutting */
.imp-cut-note[hidden] { display: none; }
/* imposition preview zoom */
.imp-zoom { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 6px 0 8px; }
.imp-zoom[hidden] { display: none; }
#zoom-pct { min-width: 42px; text-align: center; font-weight: 600; }
.imp-imgs.zoomed { display: block; overflow: auto; max-height: calc(100vh - 200px); cursor: grab;
  border: 1px solid var(--line); border-radius: 8px; background: #f0f1f3; }
.imp-imgs.zoomed.grabbing { cursor: grabbing; user-select: none; }
.imp-imgs.zoomed figure { width: calc(var(--z, 1) * 100%); max-width: none; margin: 0 0 10px; }
.imp-imgs.zoomed img { width: 100%; }