:root{font-family:Inter,"Segoe UI",system-ui,sans-serif;color:#0b2a33;background:#f5f8f7;--green:#0f6e74;--border:#d8e4e4;--muted:#56707a}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,.button{border:1px solid #c5d6d7;background:#fff;border-radius:8px;color:#1d3d47;padding:10px 15px;cursor:pointer;font-size:13px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}button:hover:not(:disabled),.button:hover{background:#e8f3f2;border-color:#5b9ea1}button:disabled{opacity:.45;cursor:not-allowed}.primary{background:var(--green);border-color:var(--green);color:white}.primary:hover:not(:disabled){background:#0a5459;color:white}.quiet{background:transparent}input,select,textarea{width:100%;min-width:0;background:#fff;border:1px solid #c5d6d7;border-radius:7px;padding:10px 11px;color:#1f3a44;font-size:14px}textarea{resize:vertical}input:focus,select:focus,textarea:focus,button:focus-visible,.button:focus-within{outline:2px solid #1a8389;outline-offset:2px}label{font-size:13px;font-weight:600;display:grid;gap:7px}label small,small{font-size:12px;font-weight:400;color:var(--muted)}label>small{line-height:1.5}a{color:var(--green);font-size:13px}p{font-size:14px;color:var(--muted);line-height:1.6;margin:7px 0}h1{font-size:clamp(30px,3.7vw,45px);letter-spacing:-1.8px;font-weight:650;line-height:1.15;margin:0 0 12px}h2{font-size:20px;letter-spacing:-.4px;margin:0}strong{font-weight:650}.mast{background:#0b2a33;color:white;padding:20px max(24px,calc((100vw - 1180px)/2));display:flex;justify-content:space-between;align-items:center;gap:15px}.brand{color:white;text-decoration:none;font-size:16px;font-weight:650}.brand span{color:#8fb3b5;font-weight:400;margin-left:8px}.privacy{font-size:12px;color:#8fb3b5}main{max-width:1236px;padding:34px 28px 28px;margin:auto}.heading{display:flex;justify-content:space-between;align-items:end;gap:24px;margin-bottom:26px}.heading p{max-width:640px}.text-link{white-space:nowrap;margin-bottom:10px}.modes{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:22px}.modes button{display:block;text-align:left;padding:19px 20px;box-shadow:0 2px 3px #173b2a04}.modes strong{display:block;font-size:15px;margin-bottom:6px}.modes span{font-size:12px;font-weight:400;color:var(--muted)}.modes button[aria-pressed=true]{border:1.5px solid var(--green);background:#e2f0ef;box-shadow:inset 0 3px var(--green)}.card{background:#fff;border:1px solid var(--border);border-radius:13px;margin:0 0 22px;padding:24px;box-shadow:0 3px 12px #203b2c03}.section-heading,.actions,.toolbar,.form-bottom,.preview-header{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}.section-heading{margin-bottom:20px}.actions{justify-content:flex-end;gap:9px}.fields{display:grid;gap:16px}.two{grid-template-columns:2fr 1fr}.options-grid{display:grid;grid-template-columns:1fr 2fr;gap:14px 16px;margin-top:18px;max-width:850px}.form-bottom{margin-top:18px}.form-bottom>span{font-size:13px;color:var(--green)}.rules{grid-template-columns:repeat(4,1fr);margin-top:16px}details{margin-top:22px;border-top:1px solid var(--border);padding-top:18px}summary{cursor:pointer;font-size:14px;font-weight:650}.hint{font-size:12px;margin-top:12px}.upload{border:1px dashed #9fc2c4;background:#f4f9f9;border-radius:9px;padding:23px;display:flex;align-items:center;justify-content:space-between;gap:16px}.label-inputs{display:grid;grid-template-columns:1fr 1fr;gap:24px}.label-inputs .upload{display:block}.label-inputs .upload .button{margin-top:12px}.file-input,.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;opacity:0;padding:0}.toolbar{border-top:1px solid var(--border);padding-top:17px;margin-bottom:16px}.search-label{width:260px}.bulk{display:flex;align-items:center;gap:9px;font-size:12px}.bulk input{width:65px}#catalogue-count{font-size:12px;color:var(--muted)}.table-wrap{overflow:auto;border:1px solid var(--border);border-radius:8px}table{border-collapse:collapse;width:100%;font-size:13px;text-align:left}th{font-weight:600;color:#5a737c;background:#f1f6f6;font-size:11px;text-transform:uppercase;letter-spacing:.5px;white-space:nowrap}th,td{padding:11px 12px;border-bottom:1px solid #e5eded;vertical-align:middle}tr:last-child td{border-bottom:0}td input{min-width:135px;font-size:12px;padding:8px;border-color:transparent;background:#f5f8f8}td input:focus{background:white}td .quantity{min-width:55px;max-width:65px}.product-cell{min-width:150px}.product-cell strong{display:block}.product-cell small{display:block;margin-top:4px;white-space:normal;max-width:250px}td code{font:12px ui-monospace,monospace;color:#5d737b;word-break:break-all}td .sku-input{font-family:ui-monospace,monospace;min-width:180px}td .row-error{display:block;color:#a7372b;font-size:11px;max-width:220px;line-height:1.5;margin-top:5px}.invalid input.sku-input{border-color:#d38b7e;background:#fff4f0}.empty{text-align:center;padding:36px!important;color:var(--muted)}.remove{padding:6px 9px;font-size:12px}.pagination{display:flex;justify-content:flex-end;gap:12px;align-items:center;font-size:13px;margin-top:15px}.callout,.format-guide{border-radius:8px;background:#e8f3f2;padding:15px 18px;margin-top:17px;font-size:13px}.callout p,.format-guide p{font-size:13px}.label-controls{grid-template-columns:1.4fr 1fr 1.3fr}.guide{font-size:13px}.guide p{font-size:13px}.preview-header{margin:22px 0 12px;font-size:13px;color:var(--muted)}#preview{background:#edf2f2;border:1px solid var(--border);border-radius:10px;padding:24px;display:flex;flex-wrap:wrap;gap:18px;min-height:150px;align-items:center;justify-content:center}.preview-sheet{background:white;display:grid;grid-template-columns:repeat(3,1fr);gap:0;width:100%;max-width:720px;padding:12px;box-shadow:0 3px 12px #173a291a}.label{width:50mm;height:30mm;background:#fff;color:#000;padding:2mm;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;flex:none}.label strong,.label span{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;font-size:8pt}.label span{font-size:7pt}.label svg{display:block;width:100%;height:auto;max-height:20mm}.label.large{width:100mm;height:50mm;padding:3mm}.label.large svg{max-height:34mm}.label.large strong{font-size:11pt}#preview>.label{border-radius:5px;box-shadow:0 3px 10px #193a2920}.preview-sheet .label{width:100%;height:auto;min-height:75px;aspect-ratio:63.5/33.9;border:1px dashed #e0e6e6;padding:5px}.preview-sheet .label svg{max-height:90px}#preview>.label.large{max-width:100%}.validation,#notice{padding:12px 16px;border-radius:8px;background:#fff3e8;color:#8b4a21;font-size:13px;line-height:1.6;margin-bottom:15px}#notice{background:#e2f0ef;color:#0a5459}#notice[data-error=true]{background:#fff0eb;color:#983d2b}.print-tip,footer{font-size:12px;color:var(--muted);line-height:1.6}.print-tip{margin-top:15px}footer{text-align:center}#printout{display:none}[hidden]{display:none!important}@media(max-width:800px){main{padding:25px 14px}.card{padding:18px}.privacy{display:none}.heading{display:block}.text-link{display:inline-block}.modes{gap:8px}.modes button{padding:14px 11px}.modes strong{font-size:13px}.modes span{line-height:1.5;display:block}.rules,.label-controls{grid-template-columns:1fr 1fr}.label-inputs{grid-template-columns:1fr}.toolbar .actions{justify-content:flex-start}.search-label{width:100%}.two{grid-template-columns:1fr 1fr}.brand span{font-size:13px}}@media(max-width:480px){.modes{grid-template-columns:1fr}.modes button{padding:12px 15px}.modes strong{margin:0 0 3px}.heading h1{font-size:32px}.two,.label-controls{grid-template-columns:1fr}.options-grid{grid-template-columns:1fr 1.5fr}.upload{flex-direction:column;align-items:flex-start}.rules{gap:12px}#preview{padding:12px}.preview-sheet{padding:3px}.preview-sheet .label strong,.preview-sheet .label span{font-size:5pt}}
@media print{@page{margin:0}.mast,main{display:none!important}#printout{display:block}body{margin:0;background:#fff}.sheet{display:grid;grid-template-columns:repeat(3,63.5mm);grid-template-rows:repeat(8,33.9mm);break-after:page}.sheet .label{width:63.5mm;height:33.9mm}.sheet:last-child,.thermal:last-child{break-after:auto}.thermal{break-after:page}.label{border:0;box-shadow:none}.label svg{print-color-adjust:exact}}
.option-edit{display:flex;align-items:center;gap:5px;font-size:10px;font-weight:400;color:var(--muted);margin-top:4px}.option-edit input{min-width:80px;padding:4px 6px;font-size:11px}.product-cell>input{font-weight:600}
label{align-content:start}input,select{height:42px}.option-editor{margin:5px 0 0;border:0;padding:0}.option-editor summary{font-size:12px;font-weight:400;color:var(--muted)}td input{height:34px}.option-edit input{height:28px}.preview-sheet{align-items:start}
.brand a{color:white;text-decoration:none;font-size:16px}.brand a:hover{text-decoration:underline}.brand a:focus-visible{outline:2px solid #8fb3b5;outline-offset:3px}

.brand{display:flex;align-items:center}.logo{display:inline-flex;border-radius:4px}.logo img{display:block;height:32px;width:auto}.brand a.logo:hover{text-decoration:none;opacity:.85}

/* Two-column layout (grid in shared/site.css): form on the left, variant list on the right. */
main { --main-col: 5fr; --side-col: 7fr; }
.workspace-main .rules { grid-template-columns: 1fr 1fr; }
.workspace-main .label-inputs { grid-template-columns: 1fr; gap: 18px; }
.workspace-main .upload:not(.label-inputs .upload) { flex-direction: column; align-items: flex-start; }
.workspace-main .options-grid { max-width: none; grid-template-columns: 1fr 1.4fr; }
/* Option name and values boxes line up even when a name label wraps on a narrow screen */
.options-grid { align-items: end; }
.workspace-main .two { grid-template-columns: 1fr 1fr; }
.workspace-side .toolbar { gap: 10px 12px; }
.workspace-side .search-label { width: auto; flex: 1 1 200px; }
.workspace-side .toolbar .actions { justify-content: flex-start; width: 100%; }
.workspace-side .toolbar .actions .quiet { margin-left: auto; }
.workspace-side .table-wrap { max-height: calc(100vh - 290px); min-height: 240px; }
.workspace-side th { position: sticky; top: 0; z-index: 1; }
.workspace-side th, .workspace-side td { padding: 9px 10px; }
.workspace-side td input { min-width: 110px; }
.workspace-side td .sku-input { min-width: 150px; }
.workspace-side td .quantity { min-width: 52px; }
.workspace-side .product-cell { min-width: 140px; }
#catalogue .section-heading .actions { justify-content: flex-start; }

/* Labels: settings on the left, live preview on the right */
.label-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: start; }
.label-settings .label-controls { grid-template-columns: 1fr; }
.label-settings .format-guide { margin-top: 16px; }
.label-preview { position: sticky; top: 16px; }
.label-preview .preview-header { margin-top: 0; }
@media (max-width: 1023px) {
  .label-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .label-settings .label-controls { grid-template-columns: 1fr 1fr; }
  .label-preview { position: static; }
  .label-preview .preview-header { margin-top: 22px; }
  .workspace-side .table-wrap { max-height: none; min-height: 0; }
}
@media (max-width: 800px) { .label-settings .label-controls { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .label-settings .label-controls { grid-template-columns: 1fr; } }

/* Dropdowns: our own chevron with room around it, instead of the browser's arrow squeezed against the edge */
select { -webkit-appearance: none; appearance: none; padding-right: 40px; background-color: #fff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23476357' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; background-size: 12px 8px; cursor: pointer; text-overflow: ellipsis; }
select:hover { border-color: #5b9ea1; }
/* "optional" and other notes sit on the same line as the field name, so fields side by side line up */
label > span small { margin-left: 4px; font-weight: 400; }
