/* Artlife Sistem. Renkler ve yazı tipleri sitenin marka paletinden: koyu kömür, kırık beyaz, altın;
   başlıklar Cormorant Garamond, gövde Figtree. Telefon düzeni esas alınır, 900px ve üstünde sepet kataloğun yanına geçer. */

@font-face { font-family: Figtree; font-style: normal; font-weight: 300 900; font-display: swap; src: url(/fonts/figtree-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: Figtree; font-style: normal; font-weight: 300 900; font-display: swap; src: url(/fonts/figtree-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/fonts/cormorant-garamond-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/fonts/cormorant-garamond-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --ink: #1D1A17; --paper: #F5F5F5; --card: #FFFFFF; --soft: #EDECE8; --gray: #696A69; --line: #E2E1DE;
  --gold: #87815C; --gold-soft: #D9D5B9; --red: #9C3B2E; --green: #3F6B4B;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: Figtree, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --top: env(safe-area-inset-top, 0px); --bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--paper); color: var(--ink); font: 400 15px/1.4 var(--sans);
  -webkit-user-select: none; user-select: none; overscroll-behavior: none; touch-action: manipulation; overflow: hidden;
  -webkit-text-size-adjust: 100%;
}
button, input, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
input, textarea, .link-box, .paper { -webkit-user-select: text; user-select: text; }
h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }
[hidden] { display: none !important; }

.boot { height: 100dvh; display: grid; place-items: center; background: var(--ink); color: var(--gold-soft); font: 400 28px var(--serif); letter-spacing: .04em; }
.muted { color: var(--gray); margin: 0; font-size: 13.5px; }
.empty { color: var(--gray); text-align: center; padding: 48px 16px; margin: 0; grid-column: 1 / -1; }
.link { text-decoration: underline; text-underline-offset: 3px; font-size: 13px; color: var(--gray); }

/* ───────── düğmeler, alanlar ───────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 46px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-weight: 500; font-size: 15px;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.btn:active { background: var(--soft); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.primary:active { background: #3a352f; }
.btn.ghost { border-color: transparent; background: none; color: var(--gray); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger-ghost { border-color: transparent; background: none; color: var(--red); }
.btn.small { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: default; }

.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--gray); }
.field input, .field textarea {
  width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  font-size: 16px; outline: none; -webkit-appearance: none; appearance: none;
}
.field textarea { height: auto; min-height: 64px; padding: 10px 12px; resize: vertical; line-height: 1.35; }
.field input:focus, .field textarea:focus, .unit-input:focus-within, .search input:focus { border-color: var(--gold); }
.field input.bad, .unit-input.bad { border-color: var(--red); }
.hint { font-size: 12px; color: var(--gray); }

.unit-input {
  display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card);
}
.unit-input i { font-style: normal; color: var(--gray); font-size: 14px; white-space: nowrap; }
.field .unit-input input { width: 52px; height: 100%; padding: 0; border: 0; border-radius: 0; background: none; text-align: right; font-variant-numeric: tabular-nums; }
.field .unit-input.wide input { width: 76px; }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }

.chips { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--soft); font-weight: 500; font-size: 14px; white-space: nowrap; }
.chip.on { background: var(--ink); color: var(--paper); }

.search input {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  font-size: 16px; outline: none; -webkit-appearance: none; appearance: none;
}

.status { font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 999px; background: var(--soft); white-space: nowrap; }
.status.open { background: #E4EDE2; color: var(--green); }
.status.won { background: var(--gold-soft); }
.status.off { color: var(--gray); }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 14.5px; }
.facts dt { color: var(--gray); font-size: 12.5px; padding-top: 2px; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.sums { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.sums dt { color: var(--gray); font-size: 13.5px; }
.sums dd { margin: 0; text-align: right; font-size: 14px; }
.sums dd.net { font: 400 34px/1.1 var(--serif); padding: 4px 0 2px; }
.sums dt.net { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; align-self: end; padding-bottom: 8px; color: var(--ink); font-weight: 500; }

.actions { display: grid; gap: 8px; margin-top: 18px; }
.actions.row { display: flex; flex-wrap: wrap; }
.actions.row .btn { flex: 1 1 auto; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--gold-soft); border-radius: 8px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 10px; }
.banner .link { color: var(--ink); }

/* ───────── çerçeve ───────── */

.shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "top" "main" "tabs"; height: 100dvh; }
.top { grid-area: top; display: flex; align-items: center; justify-content: space-between; background: var(--ink); color: var(--paper); padding: calc(var(--top) + 8px) 16px 8px; }
.brand { font: 400 24px/1 var(--serif); letter-spacing: .02em; color: inherit; text-decoration: none; }
.brand i { font-style: normal; color: var(--gold-soft); }
.me { width: 34px; height: 34px; border-radius: 50%; background: rgba(245, 245, 245, .14); color: var(--paper); font-weight: 600; font-size: 14px; }
.views { grid-area: main; position: relative; min-height: 0; }
.view { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; display: none; }
.view.on { display: block; }
#v-sepet { background: var(--card); }
.side { display: none; }

.tabs { grid-area: tabs; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--card); border-top: 1px solid var(--line); padding-bottom: var(--bottom); }
.tabs a { position: relative; height: 56px; display: grid; place-content: center; justify-items: center; gap: 2px; color: var(--gray); text-decoration: none; font-size: 11px; font-weight: 500; }
.tabs a.on { color: var(--ink); }
.tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; }

/* ───────── giriş ───────── */

.auth { min-height: 100dvh; display: grid; place-items: center; padding: calc(var(--top) + 24px) 20px calc(var(--bottom) + 24px); overflow-y: auto; height: 100dvh; }
.auth-card { width: min(380px, 100%); display: grid; gap: 14px; background: var(--card); border-radius: 14px; outline: 1px solid var(--line); padding: 28px 22px 22px; }
.auth-logo { width: 150px; height: auto; margin: 0 auto 8px; display: block; }
.auth-msg { margin: 0; min-height: 1.3em; font-size: 13.5px; color: var(--red); }
.auth-hello { margin: 0; font-size: 15px; }

/* ───────── katalog ───────── */

.filters { position: sticky; top: 0; z-index: 5; display: grid; gap: 8px; padding: 10px 12px; background: var(--paper); border-bottom: 1px solid var(--line); }
.filters .count { margin-left: auto; flex: none; font-size: 12px; color: var(--gray); }
.filters .reset { flex: none; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 12px 24px; }
.card { background: var(--card); border-radius: 8px; overflow: hidden; outline: 1px solid var(--line); display: grid; grid-template-rows: auto 1fr; content-visibility: auto; contain-intrinsic-size: auto 300px; }
.card.on { outline: 2px solid var(--gold); }
.media { position: relative; }
/* Ekle düğmesi fotoğrafın sağ üst köşesinde: orası boş fondur; alt köşede ürünün ayağını, set görsellerinde son parçayı kapatıyordu. */
.media .qty { position: absolute; right: 8px; top: 8px; }
.media .add, .media .step { box-shadow: 0 2px 10px rgba(29, 26, 23, .2); }
.media .step { background: var(--card); }
.media .add, .media .step button { width: 38px; height: 38px; }
.shot { display: block; width: 100%; aspect-ratio: 1 / 1; background: var(--card); }
.photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.noimg { background: var(--soft); }
.photo.noimg, .p-photo.noimg { display: grid; place-items: center; }
.photo.noimg::after, .p-photo.noimg::after { content: "Fotoğraf yok"; font-size: 11.5px; color: var(--gray); }
.info { padding: 8px 10px 10px; display: grid; grid-template-rows: auto auto 1fr; align-items: end; min-width: 0; }
.name { font: 400 18px/1.15 var(--serif); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { font-size: 11.5px; color: var(--gray); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buy { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.price { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; margin-top: 6px; }
.price.none { font-weight: 400; font-size: 12px; color: var(--gray); }
.buy .price { margin-top: 0; }
.qty { margin-left: auto; }
.add { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 21px; line-height: 1; display: grid; place-items: center; }
.add:active { background: var(--gold); }
.step { display: inline-flex; align-items: center; background: var(--soft); border-radius: 999px; }
.step button { width: 34px; height: 34px; border-radius: 50%; font-size: 20px; line-height: 1; display: grid; place-items: center; }
.step button:active { background: var(--gold-soft); }
.step output { min-width: 20px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.step.sm button { width: 32px; height: 32px; font-size: 19px; }

.p-sheet { display: grid; gap: 8px; }
.p-photo { width: 100%; aspect-ratio: 1 / 1; max-height: 44dvh; object-fit: contain; border-radius: 10px; background: var(--card); }
.p-sheet .facts { margin: 6px 0; }
.buy.big { align-items: center; margin: 4px 0 8px; }
.buy.big .price { font-size: 24px; }
.buy.big .step button, .buy.big .add { width: 44px; height: 44px; }
.buy.big .step output { min-width: 30px; font-size: 17px; }

/* ───────── sepet ve teklif satırları ───────── */

.cart { padding: 16px 14px 28px; }
.cart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.cart-head h2 { font-size: 28px; }
.cart .empty { padding: 28px 16px; }
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lines.read .line { grid-template-columns: 56px minmax(0, 1fr) auto; }
.l-open { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: center; text-align: left; min-width: 0; }
.l-photo { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; display: block; }
.l-main { display: grid; gap: 2px; min-width: 0; }
.l-name { font: 400 18px/1.15 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-meta { font-size: 12px; color: var(--gray); }
.l-meta em { font-style: normal; display: inline-block; background: var(--gold-soft); color: var(--ink); border-radius: 999px; padding: 0 7px; font-size: 11px; line-height: 17px; }
.l-note { font-size: 12px; color: var(--gray); font-style: italic; overflow-wrap: anywhere; }
.line.warn .l-meta { color: var(--red); }
.l-side { display: grid; justify-items: end; gap: 6px; }
.l-net { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.l-unit { font-size: 12px; color: var(--gray); font-variant-numeric: tabular-nums; }
.form { display: grid; gap: 14px; margin-top: 18px; }
.disc, .rate { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.disc .chip { padding: 0 11px; }

.line-sheet { display: grid; gap: 12px; }
.preview { margin: 0; background: var(--paper); border-radius: 8px; padding: 10px 12px; font-size: 13.5px; font-variant-numeric: tabular-nums; }

/* ───────── sayfalar: teklifler, teklif, kullanıcılar ───────── */

.page { max-width: 760px; margin: 0 auto; padding: 16px 14px 32px; }
.page-head { display: grid; gap: 10px; margin-bottom: 14px; }
.page-head h2 { font-size: 30px; }
.qlist, .users { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qlist a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "top net" "who net" "meta net"; gap: 3px 12px;
  padding: 12px 14px; background: var(--card); border-radius: 10px; outline: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.qlist a:active { background: var(--soft); }
.q-top { grid-area: top; display: flex; align-items: center; gap: 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.q-who { grid-area: who; font: 400 20px/1.15 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-meta { grid-area: meta; font-size: 12px; color: var(--gray); }
.q-net { grid-area: net; align-self: center; font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums; }
.back { display: inline-block; padding: 6px 0; color: var(--gray); text-decoration: none; font-size: 14px; }
.q-head { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; }
.q-head h2 { font-size: 32px; font-variant-numeric: lining-nums; }
.page .facts { margin-bottom: 10px; }

.users li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 12px 14px; background: var(--card); border-radius: 10px; outline: 1px solid var(--line); }
.users li.off { opacity: .6; }
.u-name { font-weight: 600; }
.u-name small { font-weight: 400; color: var(--gray); }
.u-info { grid-column: 1; font-size: 12.5px; color: var(--gray); }
.u-acts { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 6px; }
.add-user { display: grid; gap: 12px; margin-top: 22px; padding: 16px; background: var(--card); border-radius: 10px; outline: 1px solid var(--line); }
.add-user h3 { font-size: 22px; }
.link-box { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font: 13px/1.4 ui-monospace, Menlo, monospace; word-break: break-all; resize: none; background: var(--paper); margin-top: 10px; }

/* ───────── alttan açılan pencere, bildirim ───────── */

.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: grid; align-items: end; background: rgba(29, 26, 23, .45); }
.sheet { background: var(--card); border-radius: 16px 16px 0 0; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain; padding: 0 18px calc(var(--bottom) + 18px); animation: sheet-up .2s ease-out; }
@keyframes sheet-up { from { transform: translateY(24px); } }
.grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 12px; }
.sheet h3 { font-size: 24px; line-height: 1.15; margin-bottom: 4px; }
.sheet-actions, .menu { display: grid; gap: 8px; margin-top: 16px; }
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.options.one { grid-template-columns: 1fr; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 46px; padding: 0 12px; border-radius: 10px; background: var(--paper); font-size: 15px; text-align: left; min-width: 0; white-space: nowrap; overflow: hidden; }
.opt small { color: var(--gray); font-size: 12px; }
.opt.on { background: var(--ink); color: var(--paper); }
.opt.on small { color: var(--gold-soft); }

.toast { position: fixed; z-index: 80; left: 50%; bottom: calc(var(--bottom) + 72px); transform: translateX(-50%); max-width: min(92vw, 460px); padding: 11px 16px; border-radius: 10px; background: var(--ink); color: var(--paper); font-size: 14px; text-align: center; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); animation: sheet-up .2s ease-out; }
.toast.good { background: var(--green); }
.toast.bad { background: var(--red); }

/* ───────── geniş ekran (tablet yatay, bilgisayar) ───────── */

@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; padding: 14px 16px 28px; }
  .filters { padding: 12px 16px; grid-template-columns: minmax(200px, 320px) 1fr; align-items: center; }
  .page { padding: 22px 20px 40px; }
  .sheet-wrap { align-items: center; justify-items: center; }
  .sheet { width: min(520px, 92vw); border-radius: 14px; padding-bottom: 18px; }
  .grip { visibility: hidden; margin: 6px auto; }
}

@media (min-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr) 400px; grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "top top" "main main"; }
  .shell[data-route="katalog"] { grid-template-areas: "top top" "main side"; }
  .shell[data-route="katalog"] .side { display: block; grid-area: side; overflow-y: auto; overscroll-behavior: contain; background: var(--card); border-left: 1px solid var(--line); }
  .top { padding: calc(var(--top) + 10px) 24px 10px; }
  .tabs { grid-area: top; justify-self: center; align-self: end; z-index: 2; display: flex; gap: 6px; background: none; border: 0; padding: 0 0 7px; }
  .tabs a { height: 40px; padding: 0 16px; display: flex; align-items: center; gap: 8px; border-radius: 999px; color: rgba(245, 245, 245, .65); font-size: 14px; }
  .tabs a.on { color: var(--paper); background: rgba(245, 245, 245, .13); }
  .tabs a[data-tab="sepet"] { display: none; }
  .tabs svg { width: 18px; height: 18px; }
  .cart { padding: 20px 20px 32px; }
  .toast { bottom: 28px; }
}

/* ───────── yazdırma sayfası ───────── */

.print-root { display: none; }
body.printing #app { display: none; }
body.printing .print-root { display: block; height: 100dvh; overflow: auto; background: #DCDAD5; padding-bottom: 40px; }
.print-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: calc(var(--top) + 10px) 14px 10px; background: var(--card); border-bottom: 1px solid var(--line); }
.print-bar .btn { height: 40px; padding: 0 14px; }
.print-bar .btn.primary { margin-left: auto; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { height: 38px; padding: 0 12px; font-size: 14px; }
.seg .on { background: var(--ink); color: var(--paper); }

.paper { width: 210mm; margin: 16px auto; padding: 14mm; background: #fff; color: #1D1A17; font-size: 12.5px; line-height: 1.4; box-shadow: 0 2px 18px rgba(0, 0, 0, .12); transform-origin: top left; }
.paper header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10mm; padding-bottom: 7mm; margin-bottom: 7mm; border-bottom: 1px solid #1D1A17; }
.paper .logo { width: 42mm; height: auto; display: block; }
.paper .doc { text-align: right; font-size: 11.5px; line-height: 1.6; font-variant-numeric: lining-nums tabular-nums; }
.paper .doc h1 { margin: 0 0 6px; font: 400 30px/1 var(--serif); letter-spacing: .1em; text-transform: uppercase; }
.paper .doc span, .paper .to span, .paper .note span { color: #696A69; margin-right: 6px; }
.paper .to { margin: 0 0 6mm; font-size: 13.5px; }
.paper table { border-collapse: collapse; }
.paper .items { width: 100%; }
.paper .items th { padding: 0 6px 6px; border-bottom: 1px solid #CECECE; font: 500 9.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #696A69; text-align: left; white-space: nowrap; }
.paper .items td { padding: 6px; border-bottom: 1px solid #E2E1DE; vertical-align: middle; }
.paper .items tr { break-inside: avoid; }
.paper .n { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.paper .pic { width: 20mm; padding-left: 0 !important; }
.paper .pic img { width: 18mm; height: 18mm; object-fit: cover; display: block; }
.paper .what b { display: block; font: 400 16px/1.2 var(--serif); }
.paper .what small { font-size: 10.5px; color: #696A69; }
.paper .totals { margin: 6mm 0 0 auto; min-width: 72mm; font-variant-numeric: tabular-nums; break-inside: avoid; }
.paper .totals td { padding: 3px 0 3px 14px; text-align: right; }
.paper .totals td:first-child { padding-left: 0; text-align: left; color: #696A69; }
.paper .totals .grand td { padding-top: 8px; border-top: 1px solid #1D1A17; font: 400 23px/1.2 var(--serif); color: #1D1A17; }
.paper .totals tr:first-child.grand td { border-top: 0; }
.paper .totals .grand + tr td { padding-top: 6px; }
.paper .note { margin: 8mm 0 0; font-size: 12px; }
.paper .note span { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; }
.paper footer { margin-top: 12mm; padding-top: 4mm; border-top: 1px solid #E2E1DE; font-size: 10.5px; color: #696A69; text-align: center; }

@page { size: A4; margin: 12mm; }
@media print {
  html, body { height: auto; overflow: visible; background: #fff; }
  body.printing .print-root { height: auto; overflow: visible; background: #fff; padding: 0; }
  .print-bar, .toast, .sheet-wrap { display: none !important; }
  .paper { width: auto; margin: 0 !important; padding: 0; box-shadow: none; zoom: 1 !important; }
  .paper img { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
