@page { size: A4; margin: 12mm; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #f0f0f0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #111;
}
.toolbar {
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 1em;
    text-align: center;
    position: sticky;
    top: 0;
}
.toolbar button {
    font: inherit;
    background: #2271b1;
    color: #fff;
    border: 0;
    padding: 0.6em 1.2em;
    border-radius: 3px;
    cursor: pointer;
}
.toolbar .info { color: #666; margin-left: 1em; font-size: 0.9em; }
.sheet {
    width: 210mm;
    min-height: 297mm;
    padding: 12mm;
    margin: 10mm auto;
    background: #fff;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 1fr;
    gap: 4mm;
    page-break-after: always;
}
.sheet:last-child { page-break-after: auto; }
.card {
    border: 1px dashed #aaa;
    padding: 6mm;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 50mm;
    page-break-inside: avoid;
}
.card-header {
    display: flex;
    align-items: center;
    gap: 4mm;
    margin-bottom: 3mm;
}
.card-logo { max-height: 12mm; max-width: 25mm; }
.card-product { font-weight: 600; font-size: 11pt; line-height: 1.2; }
.card-sku { font-size: 8pt; color: #666; margin-top: 1mm; }
.card-code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 16pt;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: center;
    padding: 2mm 0;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    margin: 2mm 0;
}
.card-url {
    font-size: 8pt;
    color: #444;
    text-align: center;
    word-break: break-all;
}
body.no-logo .card-logo { display: none; }
@media print {
    body { background: #fff; }
    .toolbar { display: none; }
    .sheet { box-shadow: none; margin: 0; padding: 0; }
}
