/* barcode.css – CleanPDF barcode generators and reader (loaded after /assets/css/site.css). */
.bc, .bcr { --b-line: #e2e8f0; --b-ink: #1a202c; --b-muted: #4a5568; --b-soft: #718096; --b-acc: var(--accent, #3182ce); --b-acc-soft: var(--accent-soft, #ebf8ff);
    max-width: 1180px; margin: 0 auto 2.2rem; padding: 0 12px; }
.bc [hidden], .bcr [hidden] { display: none !important; }
.bc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 18px; align-items: start; }
.bc-form, .bc-out, .bc-bulk, .bcr-box { background: #fff; border: 1px solid var(--b-line); border-radius: 14px; box-shadow: 0 8px 30px rgba(15, 23, 42, .06); }
.bc-form { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.bc-f { display: flex; flex-direction: column; gap: 6px; font-size: .84rem; font-weight: 600; color: var(--b-muted); min-width: 0; }
.bc-f input[type=text], .bc-f input[type=number], .bc-f input:not([type]), .bc-f select, .bc-f textarea { width: 100%; box-sizing: border-box; height: 42px; padding: 0 11px; border: 1px solid #cbd5e0; border-radius: 9px; background: #fff; font: inherit; font-weight: 500; color: var(--b-ink); }
.bc-f textarea { height: auto; min-height: 96px; padding: 10px 11px; resize: vertical; line-height: 1.45; }
.bc-f [data-k=data] { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace; font-size: 1rem; }
.bc-f input:focus, .bc-f select:focus, .bc-f textarea:focus { outline: none; border-color: var(--b-acc); box-shadow: 0 0 0 3px var(--b-acc-soft); }
.bc-f input[type=color] { width: 56px; height: 38px; padding: 2px; border: 1px solid #cbd5e0; border-radius: 8px; background: #fff; }
.bc-f-s { flex: 1 1 140px; }
.bc-unit { display: flex; align-items: center; gap: 6px; } .bc-unit i { font-style: normal; color: var(--b-soft); font-weight: 500; }
.bc-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.bc-opts { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.bc-opts:empty { display: none; }
.bc-check { display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--b-muted); cursor: pointer; flex: 1 1 100%; }
.bc-check input { width: 17px; height: 17px; accent-color: var(--b-acc); }
.bc-hint, .bc-typenote, .bc-note { margin: -4px 0 0; font-size: .8rem; line-height: 1.5; color: var(--b-soft); }
.bc-typenote:empty { display: none; }
.bc-msg { margin: 0; font-size: .86rem; line-height: 1.45; min-height: 1.2em; }
.bc-msg.is-err { color: #c53030; font-weight: 600; } .bc-msg.is-ok { color: #2f855a; }
.bc-more { border-top: 1px solid var(--b-line); padding-top: 10px; }
.bc-more summary, .bc-bulk summary { cursor: pointer; font-weight: 700; font-size: .92rem; color: var(--b-ink); }
.bc-more-in { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.bc-contrast { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fffaf0; color: #975a16; font-size: .82rem; }
.bc-builder { flex: 1 1 100%; border: 1px dashed #cbd5e0; border-radius: 10px; padding: 10px 12px; background: #f8fafc; display: flex; flex-direction: column; gap: 10px; }
.bc-builder-title { margin: 0; font-weight: 700; font-size: .85rem; color: var(--b-ink); }
.bc-ai-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 34px; gap: 6px; }
.bc-ai-row select, .bc-ai-row input { height: 38px; border: 1px solid #cbd5e0; border-radius: 8px; padding: 0 8px; font: inherit; font-size: .85rem; min-width: 0; background: #fff; }
.bc-x { border: 1px solid #cbd5e0; border-radius: 8px; background: #fff; font-size: 1.1rem; cursor: pointer; color: var(--b-muted); }
.bc-out { padding: 18px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: calc(var(--header-h, 64px) + 12px); }
.bc-preview { min-height: 220px; display: flex; align-items: center; justify-content: center; padding: 18px; border-radius: 12px; background: repeating-conic-gradient(#f1f5f9 0% 25%, #fff 0% 50%) 50% / 18px 18px; border: 1px solid var(--b-line); overflow: hidden; }
.bc-canvas { max-width: 100%; max-height: 360px; height: auto; image-rendering: pixelated; box-shadow: 0 1px 4px rgba(15, 23, 42, .15); }
.bc-empty { color: var(--b-soft); font-size: .9rem; }
.bc-size { margin: 0; font-size: .8rem; color: var(--b-muted); line-height: 1.45; }
.bc-verify { margin: 0; padding: 7px 10px; border-radius: 8px; font-size: .84rem; font-weight: 600; word-break: break-word; }
.bc-verify.is-ok { background: #f0fff4; color: #276749; } .bc-verify.is-warn { background: #fffaf0; color: #975a16; }
.bc-dl { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding-top: 6px; border-top: 1px solid var(--b-line); }
.bc-dl .bc-f { flex: 1 1 100%; }
.bc-primary, .bc-btn { height: 40px; padding: 0 14px; border-radius: 9px; font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.bc-primary { border: 0; background: var(--brand, #e53e3e); color: #fff; box-shadow: 0 4px 14px rgba(229, 62, 62, .22); }
.bc-primary:hover { background: var(--brand-dark, #c53030); }
.bc-btn { border: 1px solid #cbd5e0; background: #fff; color: #2d3748; }
.bc-btn:hover { background: #f7fafc; }
.bc-bulk { margin-top: 16px; padding: 14px 18px; }
.bc-bulk-in { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.bc-bulk-text { width: 100%; box-sizing: border-box; border: 1px solid #cbd5e0; border-radius: 9px; padding: 10px; font: .95rem/1.45 ui-monospace, Menlo, Consolas, monospace; }
.bc-bulk-msg { margin: 0; font-size: .84rem; color: var(--b-muted); }
.bc-toast, .bcr-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 3100; max-width: min(560px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 10px; background: #1a202c; color: #fff; font-size: .9rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.bc-toast.is-warn, .bcr-toast.is-warn { background: #9b2c2c; }

/* hub: type cards */
.bc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 1rem 0 1.6rem; }
.bc-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--b-line, #e2e8f0); border-radius: 12px; background: #fff; text-decoration: none; color: #1a202c; transition: border-color .15s, box-shadow .15s; }
.bc-card:hover { border-color: #90cdf4; box-shadow: 0 6px 18px rgba(15, 23, 42, .08); }
.bc-card strong { font-size: 1rem; }
.bc-card span { font-size: .84rem; color: #4a5568; line-height: 1.45; }

/* reader */
.bcr-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.bcr-box { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.bcr-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--b-line); padding-bottom: 10px; }
.bcr-tab { height: 38px; padding: 0 14px; border: 1px solid #cbd5e0; border-radius: 9px; background: #fff; font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; color: #2d3748; }
.bcr-tab.is-on { background: var(--b-acc-soft); border-color: #90cdf4; color: var(--accent-dark, #2b6cb0); }
.bcr-drop { margin: 0; }
.bcr-cam { position: relative; border-radius: 12px; overflow: hidden; background: #0f172a; aspect-ratio: 4 / 3; }
.bcr-cam video, .bcr-cam canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bcr-cam .bcr-aim { position: absolute; left: 12%; right: 12%; top: 30%; bottom: 30%; border: 2px solid rgba(255, 255, 255, .85); border-radius: 10px; box-shadow: 0 0 0 9999px rgba(15, 23, 42, .28); pointer-events: none; }
.bcr-camctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bcr-camctl select { height: 38px; border: 1px solid #cbd5e0; border-radius: 8px; padding: 0 8px; font: inherit; max-width: 100%; }
.bcr-status { margin: 0; font-size: .86rem; color: var(--b-muted); line-height: 1.45; }
.bcr-status.is-err { color: #c53030; font-weight: 600; }
.bcr-img { position: relative; display: none; border-radius: 12px; overflow: hidden; border: 1px solid var(--b-line); background: #f8fafc; }
.bcr-img.is-on { display: block; }
.bcr-img canvas { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.bcr-results { display: flex; flex-direction: column; gap: 10px; }
.bcr-empty { margin: 0; color: var(--b-soft); font-size: .9rem; }
.bcr-res { border: 1px solid var(--b-line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.bcr-res-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .8rem; color: var(--b-soft); }
.bcr-fmt { padding: 2px 8px; border-radius: 999px; background: var(--b-acc-soft); color: var(--accent-dark, #2b6cb0); font-weight: 700; }
.bcr-ok { color: #2f855a; font-weight: 700; } .bcr-bad { color: #c53030; font-weight: 700; }
.bcr-text { margin: 0; font: 1rem/1.5 ui-monospace, Menlo, Consolas, monospace; color: var(--b-ink); word-break: break-word; white-space: pre-wrap; }
.bcr-gs1 { width: 100%; border-collapse: collapse; font-size: .84rem; }
.bcr-gs1 td { border-top: 1px solid var(--b-line); padding: 5px 6px; vertical-align: top; }
.bcr-gs1 td:first-child { white-space: nowrap; color: var(--b-muted); font-weight: 600; }
.bcr-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.bcr-acts .bc-btn { height: 34px; font-size: .82rem; padding: 0 10px; }
.bcr-opts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: .84rem; color: var(--b-muted); }

/* data row, counter and design panel */
.bc-inrow { display: flex; gap: 8px; align-items: flex-start; }
.bc-inrow .bc-input { flex: 1 1 auto; min-width: 0; display: block; }
.bc-ex { flex: 0 0 auto; height: 42px; color: var(--b-acc); border-color: var(--b-acc); }
.bc-ex:hover { background: var(--b-acc-soft); }
.bc-count { margin: 0; font-size: .8rem; font-weight: 700; color: var(--b-muted); min-height: 1.1em; }
.bc-more[open] > summary { margin-bottom: 2px; }
.bc-sliders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.bc-sl { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bc-sl[hidden] { display: none; }
.bc-sl label { font-size: .84rem; font-weight: 600; color: var(--b-ink); }
.bc-sl label b { font-weight: 700; }
.bc-sl input[type=range] { width: 100%; margin: 0; accent-color: var(--b-acc); cursor: pointer; height: 22px; }
.bc-qzwarn { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fffaf0; color: #975a16; font-size: .82rem; line-height: 1.45; }
.bc-colors { display: flex; flex-wrap: wrap; gap: 12px 22px; }
.bc-color { display: flex; gap: 8px; align-items: center; }
.bc-color input[type=color] { flex: 0 0 auto; width: 48px; height: 42px; }
.bc-f .bc-color input[type=text] { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace; text-transform: uppercase; }
.bc-f .bc-color input.is-bad { border-color: #e53e3e; box-shadow: 0 0 0 3px #fed7d7; }
.bc-rot { flex: 0 1 200px; }
.bc-preview.is-transp .bc-canvas { box-shadow: none; }
.bc-reset { margin-left: auto; color: var(--b-acc); border-color: var(--b-acc); }
.bc-reset:hover { background: var(--b-acc-soft); }
@media (max-width: 560px) { .bc-sliders { grid-template-columns: 1fr; } .bc-ex { padding: 0 10px; } }
@media (max-width: 900px) {
    .bc-grid, .bcr-grid { grid-template-columns: minmax(0, 1fr); }
    .bc-out { position: static; order: -1; }
    .bc, .bcr { padding: 0 8px; }
    .bc-ai-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px; }
}
.bcr-opts label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; }
.bcr-opts select { height: 38px; padding: 0 10px; border: 1px solid #cbd5e0; border-radius: 8px; background: #fff; font: inherit; font-weight: 500; color: var(--b-ink); max-width: 100%; }
.cpa h3 + .bc-cards { margin-top: .5rem; }
