/* Printable invoice and sales record (Graphite). Four invoice looks: .s-a classic, .s-b minimal, .s-c accent band, .s-d side panel. */
* { box-sizing: border-box; }
body { margin: 0; background: #f7f7f8; color: #111; font: 14px/1.5 "Segoe UI", system-ui, Arial, sans-serif; }
.bar { max-width: 210mm; margin: 1rem auto; display: flex; gap: .6rem; align-items: center; }
.bar button { font: inherit; padding: .5rem .9rem; border-radius: 4px; border: 1px solid #c9ccd3; background: #fff; cursor: pointer; }
.bar button:first-child { background: #1f7a70; color: #fff; border-color: #1f7a70; }
.doc { max-width: 210mm; margin: 0 auto 2rem; background: #fff; padding: 18mm 16mm; border: 1px solid #e3e4e8; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc-head { display: flex; justify-content: space-between; gap: 2rem; }
.issuer-name { font-weight: 600; font-size: 1.1rem; }
.right { text-align: right; }
h1 { margin: 0 0 .4rem; font-size: 1.5rem; letter-spacing: .02em; }
h1 small { font-weight: 400; color: #555; font-size: .9rem; }
.to { margin: 2rem 0 1rem; }
.lbl { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: #555; }
.guest { font-size: 1.1rem; font-weight: 600; }
table.lines { width: 100%; border-collapse: collapse; }
table.lines th, table.lines td { border-bottom: 1px solid #ddd; padding: .5rem .4rem; text-align: left; vertical-align: top; }
table.lines th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: #444; border-bottom: 1.5px solid #111; }
table.lines tfoot td { font-weight: 700; border-bottom: 0; border-top: 1.5px solid #111; }
.num { text-align: right !important; white-space: nowrap; }
.note { margin-top: 1.5rem; }
.small { font-size: .85rem; color: #444; }
.ep-title { text-align: center; } .ep-title small { font-size: .95rem; letter-spacing: .08em; }
.ep-year { text-align: center; }
.ep-sec { font-size: 1rem; margin: 1.2rem 0 .4rem; }
table.kv td { padding: .2rem .6rem .2rem 0; } table.kv td:first-child { color: #444; }
table.ep th { text-align: center; }

/* Invoice layout: one grid, four looks */
.doc[class*="s-"] { display: grid; align-content: start; }
.doc .issuer { grid-area: issuer; } .doc .title { grid-area: title; } .doc .meta { grid-area: meta; }
.doc .guestbox { grid-area: guest; margin: 1.6rem 0 1rem; } .doc table.lines { grid-area: lines; } .doc .note { grid-area: note; } .doc .svc { grid-area: svc; }
.doc .issuer { font-size: 1rem; }

.s-a { grid-template-columns: 1fr 1fr; grid-template-areas: "issuer title" "issuer meta" "guest guest" "lines lines" "note note" "svc svc"; }
.s-a .title, .s-a .meta { text-align: right; }

.s-b { font-family: Georgia, "Times New Roman", serif; grid-template-columns: 1fr 1fr; grid-template-areas: "title title" "meta meta" "issuer guest" "lines lines" "note note" "svc svc"; }
.s-b .title { font-weight: 400; font-size: 2rem; letter-spacing: .12em; text-transform: uppercase; margin: 0; }
.s-b .title small { display: none; }
.s-b .meta { border-top: 1px solid #111; margin: .4rem 0 1.4rem; padding-top: .5rem; }
.s-b .guestbox { margin: 0; }
.s-b table.lines th { font-weight: 400; font-style: italic; text-transform: none; letter-spacing: 0; border-bottom: 1px solid #111; }
.s-b table.lines td { border-bottom: 1px solid #eee; }
.s-b table.lines tfoot td { border-top: 1px solid #111; font-size: 1.15rem; }

.s-c { padding: 0 0 18mm; grid-template-columns: 1fr 1fr; grid-template-areas: "title meta" "issuer guest" "lines lines" "note note" "svc svc"; }
.s-c > * { padding-left: 16mm; padding-right: 16mm; }
.s-c .title, .s-c .meta { background: #1f7a70; color: #fff; margin: 0; padding-top: 12mm; padding-bottom: 8mm; }
.s-c .title { font-size: 1.7rem; } .s-c .title small { color: #d6ece8; }
.s-c .meta { text-align: right; }
.s-c .issuer, .s-c .guestbox { margin: 1.4rem 0 1.2rem; }
.s-c table.lines { margin: 0 16mm; padding: 0; width: calc(100% - 32mm); }
.s-c table.lines th { background: #eef5f4; border-bottom: 0; color: #1f5f57; }
.s-c table.lines tfoot td { background: #1f7a70; color: #fff; border-top: 0; font-size: 1.05rem; }

.s-d { padding: 0; grid-template-columns: 52mm 1fr;
  grid-template-areas: "issuer title" "meta lines" "guest lines" "gap lines" "gap note" "gap svc"; }
.s-d .issuer, .s-d .meta, .s-d .guestbox { background: #f3f4f6; margin: 0; padding: 0 5mm; font-size: .85rem; }
.s-d .issuer { padding-top: 12mm; padding-bottom: 6mm; } .s-d .meta { padding-bottom: 6mm; } .s-d .guestbox { padding-bottom: 6mm; }
.s-d .title { font-weight: 300; font-size: 2.1rem; padding: 12mm 12mm 6mm 8mm; margin: 0; letter-spacing: .04em; }
.s-d .title small { display: none; }
.s-d::after { content: ""; grid-area: gap; background: #f3f4f6; }
.s-d table.lines { margin: 0 12mm 0 8mm; width: calc(100% - 20mm); }
.s-d .note, .s-d .svc { margin: 1.2rem 12mm 0 8mm; }
.s-d table.lines th { color: #666; letter-spacing: .08em; border-bottom: 1px solid #bbb; }

@media print { body { background: #fff; } .noprint { display: none !important; } .doc { border: 0; margin: 0; max-width: none; } .s-a, .s-b { padding: 0; } }
