/* Sambridge printable documents: quotation, invoice, agreement, receipt voucher (A4) */
@font-face { font-family: 'Plex Ar'; src: url(/fonts/plex-ar-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Ar'; src: url(/fonts/plex-ar-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Plex Ar'; src: url(/fonts/plex-ar-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Plex Ar'; src: url(/fonts/plex-ar-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Mont'; src: url(/fonts/mont-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Mont'; src: url(/fonts/mont-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Mont'; src: url(/fonts/mont-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Mont'; src: url(/fonts/mont-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Mont'; src: url(/fonts/mont-800.woff2) format('woff2'); font-weight: 800; font-display: swap; }

.sbd { --ind: #1d1d4f; --ind2: #2A2A69; --grn: #009147; --grn-l: #e8f6ee; --ink: #23233a; --mut: #7b7b8f; --line: #e3e3ec; --bg: #f3f3f7;
  width: 210mm; min-height: 297mm; margin: 0 auto 18px; background: #fff; color: var(--ink); position: relative; overflow: hidden;
  font-family: 'Plex Ar', 'Mont', Tahoma, sans-serif; font-size: 11.5px; line-height: 1.55; display: flex; flex-direction: column;
  box-shadow: 0 10px 40px rgba(20, 20, 60, .18); text-align: start; }
.sbd[dir=ltr] { font-family: 'Mont', 'Plex Ar', sans-serif; }
.sbd * { box-sizing: border-box; }
.sbd .num, .sbd .en { font-family: 'Mont', 'Plex Ar', sans-serif; font-variant-numeric: tabular-nums; }
.sbd .ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.sbd .wm { position: absolute; inset: 0; background: url(/img/mark.png) no-repeat center 52% / 62%; opacity: .045; pointer-events: none; z-index: 0; }
.sbd > *:not(.wm) { position: relative; z-index: 1; }

/* header */
.sbd .hd { display: flex; justify-content: space-between; align-items: center; padding: 26px 40px 18px; position: relative;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cpath d='M45 2 88 45 45 88 2 45Z' fill='none' stroke='%232A2A69' stroke-opacity='.07'/%3E%3Ccircle cx='45' cy='45' r='14' fill='none' stroke='%232A2A69' stroke-opacity='.06'/%3E%3C/svg%3E");
  background-size: 90px 90px; background-position: left top; }
.sbd .hd::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to left, #fff 42%, rgba(255, 255, 255, .55)); z-index: -1; }
.sbd[dir=ltr] .hd::after { background: linear-gradient(to right, #fff 42%, rgba(255, 255, 255, .55)); }
.sbd .hd .logo { height: 78px; width: auto; display: block; }
.sbd .hd .ttl { text-align: end; }
.sbd .hd .ttl h1 { margin: 0; font-size: 34px; line-height: 1.1; font-weight: 700; color: var(--ind); }
.sbd .hd .ttl .sub { font-family: 'Mont'; letter-spacing: .32em; font-size: 11px; font-weight: 700; color: var(--ind2); margin-top: 4px; }
.sbd .hd .ttl .tag { display: inline-block; margin-top: 8px; border: 1.5px solid var(--grn); color: var(--grn); background: var(--grn-l); padding: 1px 12px; font-weight: 600; font-size: 11px; }
.sbd .hd .ttl .tag.bad { border-color: #c0392b; color: #c0392b; background: #fdecea; }
.sbd .rule { height: 3px; background: var(--ind); position: relative; }
.sbd .rule::after { content: ''; position: absolute; top: 0; height: 3px; width: 26%; background: var(--grn); inset-inline-start: 40px; }

/* info strip */
.sbd .strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg); padding: 12px 40px; }
.sbd .strip > div { padding: 0 14px; border-inline-start: 1px solid #d9d9e3; }
.sbd .strip > div:first-child { border: 0; padding-inline-start: 0; }
.sbd .strip small { display: block; color: var(--mut); font-size: 10px; }
.sbd .strip b { font-family: 'Mont'; font-size: 14.5px; font-weight: 700; color: var(--ind); white-space: nowrap; }

.sbd .body { padding: 16px 40px 0; flex: 1; }
.sbd .cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sbd .crd { border: 1px solid var(--line); padding: 12px 16px 12px; position: relative; background: rgba(255, 255, 255, .9); }
.sbd .crd::before { content: ''; position: absolute; top: -1px; inset-inline-end: 0; width: 52px; height: 3px; background: var(--ind); }
.sbd .crd .k { color: var(--grn); font-weight: 600; font-size: 12px; }
.sbd .crd .v { font-weight: 700; font-size: 16px; color: var(--ind); margin: 2px 0; }
.sbd .crd .s { color: var(--mut); font-size: 10.5px; }
.sbd .crd .p { font-family: 'Mont'; font-weight: 600; color: #55556a; direction: ltr; unicode-bidi: isolate; display: inline-block; }

.sbd .sec { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 700; color: var(--ind); }
.sbd .sec::before { content: ''; width: 7px; height: 7px; background: var(--grn); transform: rotate(45deg); }

.sbd table.it { width: 100%; border-collapse: collapse; }
.sbd table.it th { background: var(--ind); color: #fff; font-weight: 600; font-size: 11px; padding: 8px 10px; text-align: start; }
.sbd table.it td { padding: 5px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.sbd table.it tr:nth-child(even) td { background: #fafafd; }
.sbd table.it .n { font-family: 'Mont'; font-weight: 700; color: var(--grn); width: 34px; }
.sbd table.it .c { text-align: center; }
.sbd table.it .m { font-family: 'Mont'; text-align: start; color: #6b6b80; }
.sbd table.it th.m { color: #fff; font-family: inherit; }
.sbd table.it .t { font-family: 'Mont'; font-weight: 700; color: var(--ind); font-size: 12.5px; }
.sbd table.it .d2 { display: block; color: var(--mut); font-size: 10px; font-family: 'Mont'; }
.sbd .gt { display: inline-block; font-size: 9px; color: var(--grn); border: 1px solid #b9e2cb; padding: 0 5px; margin-inline-start: 6px; vertical-align: middle; }

.sbd .bot { display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; margin-top: 16px; align-items: start; }
.sbd .pay { border: 1px solid var(--line); padding: 14px 16px; position: relative; min-height: 150px; background: rgba(255, 255, 255, .9); }
.sbd .pay::before { content: ''; position: absolute; top: -1px; inset-inline-end: 0; width: 52px; height: 3px; background: var(--ind); }
.sbd .pay h4 { margin: 0; font-size: 14px; color: var(--ind); }
.sbd .pay .m { color: var(--grn); font-weight: 600; margin-bottom: 6px; }
.sbd .pay .kv { display: flex; gap: 10px; font-size: 10.5px; margin: 2px 0; }
.sbd .pay .kv span { color: var(--mut); min-width: 70px; }
.sbd .pay .kv b { font-family: 'Mont'; font-weight: 600; font-size: 10.5px; direction: ltr; unicode-bidi: isolate; }
.sbd .pay .wa { margin-top: 10px; font-size: 10.5px; color: #44445a; border-top: 1px dashed var(--line); padding-top: 6px; }
.sbd .tot .ln { display: flex; justify-content: space-between; padding: 6px 12px; border-bottom: 1px solid var(--line); }
.sbd .tot .ln span { color: var(--mut); }
.sbd .tot .ln b { font-family: 'Mont'; font-weight: 700; font-size: 13px; }
.sbd .tot .bx { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; margin-top: 10px; border-inline-start: 4px solid var(--grn); }
.sbd .tot .bx span { font-weight: 700; font-size: 13px; }
.sbd .tot .bx b { font-family: 'Mont'; font-weight: 800; font-size: 19px; direction: ltr; unicode-bidi: isolate; }
.sbd .tot .bx.dk { background: var(--ind); color: #fff; }
.sbd .tot .bx.lt { background: var(--grn-l); color: var(--ind); border: 1px solid #bfe3cd; border-inline-start: 4px solid var(--grn); }
.sbd .tot .bx.lt span { color: var(--grn); }

.sbd .terms { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line); }
.sbd .terms h4 { margin: 0 0 4px; font-size: 13px; color: var(--ind); }
.sbd ul.dia { list-style: none; margin: 0; padding: 0; }
.sbd ul.dia li { position: relative; padding-inline-start: 16px; font-size: 10.5px; color: #4a4a5e; margin: 2px 0; }
.sbd ul.dia li::before { content: ''; position: absolute; inset-inline-start: 2px; top: .62em; width: 5px; height: 5px; background: var(--grn); transform: rotate(45deg); }
.sbd .sign { display: flex; justify-content: flex-start; margin-top: 18px; }
.sbd .sign div { border-top: 1px solid #c9c9d6; padding-top: 4px; min-width: 210px; font-size: 10.5px; color: #55556a; }
.sbd .sign.two { justify-content: space-between; gap: 40px; }
.sbd .sign.two div { flex: 1; min-height: 40px; }

/* footer */
.sbd .ft { margin-top: 22px; background: var(--ind); color: #fff; border-top: 4px solid var(--grn); padding: 12px 40px 10px; }
.sbd .ft .r1 { display: flex; justify-content: space-between; font-family: 'Mont'; font-weight: 700; direction: ltr; }
.sbd .ft .r1 .big { font-size: 15px; }
.sbd .ft .r1 .sm { font-size: 11.5px; }
.sbd .ft .r2 { text-align: center; font-size: 10px; font-weight: 600; margin-top: 4px; }
.sbd .ft .r3 { text-align: center; font-size: 9.5px; opacity: .65; font-family: 'Mont'; }
.sbd .pg { position: absolute; bottom: 8px; inset-inline-end: 40px; z-index: 2; color: #fff; font-size: 9.5px; opacity: .7; }

/* receipt voucher */
.sbd .rv { margin: 20px 0 0; border: 1px solid var(--line); background: linear-gradient(180deg, #fff, #fbfbfe); padding: 26px 30px 22px; position: relative; }
.sbd .rv::before, .sbd .rv::after { content: ''; position: absolute; width: 22px; height: 22px; border: 2px solid var(--grn); }
.sbd .rv::before { top: 8px; inset-inline-start: 8px; border-inline-end: 0; border-bottom: 0; }
.sbd .rv::after { bottom: 8px; inset-inline-end: 8px; border-inline-start: 0; border-top: 0; }
.sbd .rv .lbl { color: var(--mut); font-size: 12px; }
.sbd .rv .who { font-size: 20px; font-weight: 700; color: var(--ind); margin: 2px 0 14px; }
.sbd .rv .amt { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: var(--ind); color: #fff; padding: 16px 22px; border-inline-start: 6px solid var(--grn); }
.sbd .rv .amt b { font-family: 'Mont'; font-weight: 800; font-size: 30px; direction: ltr; unicode-bidi: isolate; letter-spacing: .5px; }
.sbd .rv .amt span { font-size: 13px; opacity: .85; }
.sbd .rv .words { margin-top: 10px; background: var(--grn-l); border: 1px dashed #9ed3b5; color: #145c35; padding: 8px 14px; font-weight: 600; font-size: 12.5px; }
.sbd .rv .for { margin-top: 14px; font-size: 13px; }
.sbd .rv .for b { color: var(--ind); }
.sbd .rv .seal { position: absolute; top: 18px; inset-inline-end: 26px; width: 92px; height: 92px; border: 2.5px solid var(--grn); color: var(--grn); transform: rotate(-12deg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; font-family: 'Mont'; font-weight: 800; letter-spacing: .12em; opacity: .85; }
.sbd .rv .seal small { font-size: 8px; letter-spacing: .1em; font-weight: 600; }
.sbd .rv .seal b { font-size: 17px; }
.sbd .kpis3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.sbd .kpis3 div { border: 1px solid var(--line); padding: 10px 14px; background: #fff; }
.sbd .kpis3 small { display: block; color: var(--mut); font-size: 10.5px; }
.sbd .kpis3 b { font-family: 'Mont'; font-size: 16px; color: var(--ind); }
.sbd .kpis3 .g b { color: var(--grn); }
.sbd .kpis3 .r b { color: #c0392b; }

/* agreement */
.sbd .ag-p { font-size: 11.5px; color: #33334a; text-align: justify; margin: 4px 0; }
.sbd .cl { margin-top: 12px; }
.sbd .cl h5 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 14px; color: var(--ind); }
.sbd .cl h5 i { font-style: normal; font-family: 'Mont'; font-weight: 700; font-size: 12px; background: var(--ind); color: #fff; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }
.sbd .parties { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sbd .parties .crd .v { font-size: 13.5px; }
.sbd .agtot { display: flex; justify-content: space-between; padding: 8px 10px; border-inline-start: 4px solid var(--grn); background: #f6f6fa; font-weight: 700; color: var(--ind); }
.sbd .agtot b { font-family: 'Mont'; }
.sbd .sigbox { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; }
.sbd .sigbox > div { border: 1px solid var(--line); padding: 12px 16px; }
.sbd .sigbox h6 { margin: 0 0 4px; font-size: 13px; color: var(--ind); }
.sbd .sigbox .ln { display: flex; gap: 10px; margin-top: 12px; font-size: 10.5px; color: var(--mut); }
.sbd .sigbox .ln::after { content: ''; flex: 1; border-bottom: 1px solid #c9c9d6; }
.sbd .void-stamp { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-20deg); font-size: 90px; font-weight: 800; color: rgba(192, 57, 43, .15);
  border: 8px solid rgba(192, 57, 43, .15); padding: 0 30px; z-index: 3; pointer-events: none; font-family: 'Mont'; }

/* preview & print */
.sbd-wrap { background: #e9e9f1; padding: 18px 0; border-radius: 12px; max-height: 72vh; overflow: auto; }
.sbd-wrap .sbd { transform-origin: top center; }
@media (max-width: 900px) { .sbd-wrap .sbd { zoom: .48; } }
@media print {
  @page sbdoc { size: A4; margin: 0; }
  .sbd { page: sbdoc; box-shadow: none; margin: 0; width: 210mm; min-height: 296mm; page-break-after: always; break-after: page; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sbd:last-child { page-break-after: auto; break-after: auto; }
}
