.inv-page { background: #eceff1; }
.inv-wrap { max-width: 920px; margin: 0 auto; padding: 18px 14px 40px; }
.inv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 14px;
}
.inv-actions h1 {
  font-size: 1.15rem;
  margin: 0;
  letter-spacing: 0;
  word-break: normal;
  overflow-wrap: normal;
}
.inv-actions p { margin: 4px 0 0; }
.inv-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.inv {
  background: #fff;
  color: #1a1a1a;
  border: 1px solid #cfd8dc;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
  font-size: 13px;
  line-height: 1.45;
}
.inv * { word-break: normal; overflow-wrap: anywhere; }
.inv-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 18px 14px;
  border-bottom: 3px solid #0A2545;
}
.inv-brand { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.inv-brand img { width: 92px; height: auto; }
.inv-brand b { display: block; font-size: 1.35rem; color: #0A2545; letter-spacing: -.02em; }
.inv-brand small { display: block; color: #546e7a; }
.inv-stamp {
  text-align: right;
  min-width: 210px;
}
.inv-stamp em {
  display: inline-block;
  background: #0A2545;
  color: #fff;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .12em;
  font-size: .72rem;
  padding: 5px 10px;
  margin-bottom: 8px;
}
.inv-stamp table { width: 100%; border-collapse: collapse; }
.inv-stamp td { padding: 2px 0; vertical-align: top; }
.inv-stamp td:first-child { color: #607d8b; padding-right: 10px; white-space: nowrap; }
.inv-parties {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 1px solid #cfd8dc;
}
.inv-parties section { padding: 12px 16px; min-width: 0; }
.inv-parties section + section { border-left: 1px solid #cfd8dc; }
.inv-parties h2 {
  margin: 0 0 6px;
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #607d8b;
  font-weight: 700;
}
.inv-parties b { display: block; color: #0A2545; margin-bottom: 4px; }
.inv-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid #cfd8dc;
  background: #f7f9fb;
}
.inv-meta p { margin: 0; padding: 8px 16px; }
.inv-meta p + p { border-left: 1px solid #cfd8dc; }
.inv table.items {
  width: 100%;
  border-collapse: collapse;
}
.inv table.items th,
.inv table.items td {
  border-bottom: 1px solid #e0e6ea;
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}
.inv table.items th {
  background: #0A2545;
  color: #fff;
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 700;
}
.inv table.items .num,
.inv table.items th.num { text-align: right; white-space: nowrap; }
.inv table.items td.desc small { display: block; color: #607d8b; margin-top: 3px; }
.inv-foot {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  border-top: 1px solid #cfd8dc;
}
.inv-words, .inv-totals { padding: 14px 16px; }
.inv-totals { background: #f7f9fb; border-left: 1px solid #cfd8dc; }
.inv-totals table { width: 100%; border-collapse: collapse; }
.inv-totals td { padding: 5px 0; }
.inv-totals td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.inv-totals .grand { font-size: 1.05rem; font-weight: 800; color: #0A2545; border-top: 2px solid #0A2545; padding-top: 8px; }
.inv-decl {
  padding: 12px 16px 16px;
  border-top: 1px solid #cfd8dc;
  color: #455a64;
}
.inv-decl p { margin: 0 0 8px; }
.inv-sign {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 16px 16px;
}
.inv-sign div { text-align: right; }
.inv-sign b { display: block; color: #0A2545; }
@media (max-width: 760px) {
  .inv-top, .inv-parties, .inv-foot, .inv-meta { grid-template-columns: 1fr; display: block; }
  .inv-stamp { text-align: left; min-width: 0; margin-top: 8px; }
  .inv-parties section + section, .inv-meta p + p, .inv-totals { border-left: 0; border-top: 1px solid #cfd8dc; }
  .inv table.items { display: block; overflow-x: auto; }
}
@media print {
  header, footer, .dock, .inv-actions, .skip, .sprite { display: none !important; }
  body.sf, .inv-page { background: #fff !important; }
  main { padding: 0 !important; }
  .inv-wrap { max-width: none; padding: 0; }
  .inv { box-shadow: none; border-color: #999; }
}
