/* Invoicer — visual system.
   Everything is self-hosted: no CDN, no web font, no external asset. The CSP
   forbids them (style-src 'self'), which is also why nothing here relies on
   inline style attributes — dynamic styles go through the CSSOM. */

:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --ink: #0f1623;
  --ink-2: #3f4b5f;
  --muted: #6f7b8d;
  --line: #e2e7ee;
  --line-strong: #c9d1dc;
  --accent: #1f5eff;
  --accent-soft: rgba(31, 94, 255, 0.1);
  --accent-ink: #ffffff;
  --danger: #c0392b;
  --danger-soft: rgba(192, 57, 43, 0.1);
  --ok: #0f7b4f;
  --ok-soft: rgba(15, 123, 79, 0.1);
  --warn: #9a6400;
  --warn-soft: rgba(196, 132, 0, 0.13);
  --info: #2f5f9e;
  --info-soft: rgba(47, 95, 158, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 22, 35, 0.06), 0 8px 24px rgba(15, 22, 35, 0.05);
  --shadow-lg: 0 24px 64px rgba(15, 22, 35, 0.22);
  --sidebar: 15.5rem;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body, #root, .app { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1 { font-size: 1.45rem; letter-spacing: -0.015em; margin: 0; line-height: 1.25; }
h2 { font-size: 1.05rem; margin: 0; }
a { color: var(--accent); }

.muted { color: var(--muted); }
.small { font-size: 0.84rem; }
.error { color: var(--danger); }
.right { text-align: right; }
.pad { padding: 1.25rem; margin: 0; }
.pad-lg { padding: 1.5rem; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
/* minmax(0, 1fr) as on .page: a wide table scrolls inside its wrapper instead of
   widening the stack, and with it the page, past a phone's screen. */
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.nowrap { flex-wrap: nowrap; }
.row.between { justify-content: space-between; }

/* --- surfaces ------------------------------------------------------------ */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.notice {
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--info-soft);
  color: var(--info);
  font-size: 0.9rem;
}
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.danger { background: var(--danger-soft); color: var(--danger); }

.empty { padding: 2.5rem 1.25rem; text-align: center; color: var(--muted); }
.empty p { margin: 0 0 0.9rem; }

/* --- buttons ---------------------------------------------------------------- */

button { font: inherit; color: inherit; }

.btn {
  font: inherit;
  font-size: 0.93rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  padding: 0.5rem 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s, filter 0.15s;
}
.btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.small { padding: 0.3rem 0.65rem; font-size: 0.85rem; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.btn.block { width: 100%; }

.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 560; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); color: var(--accent-ink); }

.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 560; }
.btn.danger:hover:not(:disabled) { filter: brightness(1.08); color: #fff; }

.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover:not(:disabled) { background: rgba(15, 22, 35, 0.05); color: var(--ink); border-color: transparent; }

.btn.subtle { background: var(--surface-2); border-color: var(--line); color: var(--ink-2); }

.icon-btn {
  border: none;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--ink-2);
}
.icon-btn:hover { background: rgba(15, 22, 35, 0.06); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- forms -------------------------------------------------------------------- */

.form { display: grid; gap: 1rem; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.9rem 1rem;
}

.field { display: grid; gap: 0.3rem; align-content: start; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field > label, .field .label, .label {
  font-size: 0.83rem;
  color: var(--ink-2);
  font-weight: 560;
}
.req { color: var(--danger); }
.field-error { margin: 0; color: var(--danger); font-size: 0.82rem; }
.field-hint { margin: 0; color: var(--muted); font-size: 0.8rem; }

input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[type="url"],
input[type="search"], input[type="date"], input:not([type]), select, textarea {
  font: inherit;
  font-size: 0.94rem;
  width: 100%;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}
textarea { resize: vertical; }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--ink-2); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.16);
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
input.num { text-align: right; font-variant-numeric: tabular-nums; }

.check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.92rem;
  cursor: pointer;
  user-select: none;
}
.check input { width: 1rem; height: 1rem; accent-color: var(--accent); }
.field > label.check { font-size: 0.92rem; font-weight: 400; color: var(--ink); }

.form-foot { display: grid; gap: 0.6rem; padding-top: 0.25rem; }
.form-foot .error { margin: 0; }

.section-title { margin: 0.4rem 0 0.1rem; font-size: 0.98rem; }
.section-title:first-child { margin-top: 0; }

.inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 0.8rem;
  align-items: start;
  margin-top: 1rem;
}

/* --- splash and auth ------------------------------------------------------------ */

.splash, .auth { min-height: 100%; display: grid; place-items: center; padding: 2rem; }

.auth-card { width: min(25rem, 100%); padding: 2rem; display: grid; gap: 0.9rem; }
.auth-card > .muted { margin: -0.4rem 0 0.4rem; }
.brand-mark { font-weight: 700; font-size: 1.4rem; letter-spacing: -0.03em; }

/* --- shell ---------------------------------------------------------------------- */

.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100%; }

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 1.1rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 0 0.35rem; }
.brand { font-weight: 700; letter-spacing: -0.03em; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.menu-toggle { display: none; }

.switcher { display: grid; gap: 0.3rem; padding: 0.7rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.switcher.single strong { font-size: 0.92rem; }

nav { display: grid; gap: 0.1rem; }
.nav-section {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 650;
  padding: 0.9rem 0.6rem 0.3rem;
}
.nav-item {
  display: block;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.93rem;
}
.nav-item:hover { background: rgba(15, 22, 35, 0.04); color: var(--ink); }
.nav-item.current { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.who-name { font-weight: 600; font-size: 0.9rem; color: var(--ink); text-decoration: none; display: block; }
a.who-name:hover { text-decoration: underline; }
.card.narrow { max-width: 32rem; }

.content { padding: 1.75rem 2rem 3rem; min-width: 0; }
/* minmax(0, 1fr): a grid item's min-width is otherwise its content, so one
   wide table would widen the whole page past a phone's screen instead of
   scrolling inside its own wrapper. */
.page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; align-content: start; max-width: 80rem; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.page-head p { margin: 0.25rem 0 0; }
.page-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

.toolbar { display: flex; gap: 0.9rem; align-items: center; flex-wrap: wrap; }
.toolbar .search { max-width: 22rem; }

.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); overflow-x: auto; min-width: 0; max-width: 100%; }
.tab {
  padding: 0.55rem 0.85rem;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  font-size: 0.93rem;
}
.tab:hover { color: var(--ink); }
.tab.current { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* --- tables ------------------------------------------------------------------------ */

/* The wrapper scrolls in both directions, bounded to the viewport, so the
   header row can stay sticky while a long list scrolls — sticky only sticks
   within the nearest scrolling box, and an overflow-x wrapper is one. */
.table-wrap { overflow: auto; max-height: calc(100vh - 12rem); }

table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { padding: 0.65rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
table.data th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 650;
  background: var(--surface-2);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
table.data th.right, table.data td.right { text-align: right; }
table.data th.mono { font-family: inherit; font-size: 0.8rem; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr.clickable { cursor: pointer; }
table.data tbody tr.clickable:hover, table.data tbody tr.clickable:focus-visible { background: var(--surface-2); outline: none; }
table.data tbody tr.inactive td { color: var(--muted); }
table.data td.num, table.data th.num { text-align: right; white-space: nowrap; }
/* Codes and figures never break mid-token ("C-" / "1h31o"). */
table.data td.mono, table.data td.right, table.data td.date { white-space: nowrap; }

/* --- badges -------------------------------------------------------------------------- */

.badge {
  display: inline-block;
  padding: 0.08rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  background: rgba(15, 22, 35, 0.07);
  color: var(--ink-2);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }

/* --- dialogs and toasts ------------------------------------------------------------------ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 22, 35, 0.4);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 50;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: min(32rem, 100%);
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
}
.modal.wide { width: min(52rem, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem 0.5rem; }
.modal-body { padding: 0.5rem 1.25rem 1.25rem; overflow-y: auto; }
.modal-foot { padding: 0.75rem 1.25rem 1rem; border-top: 1px solid var(--line); }
.confirm-text { color: var(--ink-2); }

.toasts {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.5rem;
  z-index: 60;
  max-width: min(24rem, calc(100vw - 2rem));
}
.toast {
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-lg);
  font-size: 0.92rem;
}
.toast.error { background: var(--danger); }
.toast.info { background: var(--info); }

/* --- small screens ---------------------------------------------------------------------- */

@media (max-width: 860px) {
  /* One column: the header row takes its content height, the page the rest.
     With two auto rows, min-height: 100% would stretch the header too. */
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--line); gap: 0.6rem; }
  .menu-toggle { display: inline-grid; place-items: center; }
  .sidebar nav, .sidebar .sidebar-foot, .sidebar .switcher { display: none; }
  .menu-open .sidebar nav, .menu-open .sidebar .sidebar-foot { display: grid; }
  .menu-open .sidebar .switcher { display: grid; }
  .menu-open .sidebar .sidebar-foot { display: flex; }
  .content { padding: 1.1rem 1rem 3rem; }
  .inline-form { grid-template-columns: 1fr; }
  .table-wrap { max-height: none; }
}

/* Touch screens: 16px inputs (iOS zooms the page into anything smaller) and
   44px tap targets. */
@media (max-width: 860px), (pointer: coarse) {
  /* Same selector list as the base rule: a bare `input` would lose to its
     attribute selectors on specificity and leave the 15px size in place. */
  input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[type="url"],
  input[type="search"], input[type="date"], input:not([type]), select, textarea, .btn { font-size: 16px; }
  input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[type="url"],
  input[type="search"], input[type="date"], input:not([type]), select { min-height: 2.75rem; }
  .icon-btn { width: 2.75rem; height: 2.75rem; }
  .btn, .btn.small { min-height: 2.75rem; }
  .check { min-height: 2.75rem; }
  .check input { width: 1.5rem; height: 1.5rem; }
  .brand { padding: 0.6rem 0; }
  .nav-item { padding: 0.7rem 0.75rem; }
}

/* --- invoice editor ----------------------------------------------------------- */

.editor-page { max-width: 110rem; }
.editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.editor-form { display: grid; gap: 1rem; }
.editor-preview { position: sticky; top: 1rem; display: grid; gap: 0.5rem; max-height: calc(100vh - 2rem); overflow: auto; }
/* The preview is the same document at a compact scale, so the whole width
   fits beside the form instead of hiding its last column. */
.editor-preview .invoice-doc { font-size: 0.74rem; padding: 1.4rem; min-width: 30rem; }
.editor-preview .doc-lines th, .editor-preview .doc-lines td { padding: 0.35rem 0.3rem; }
.editor-preview .doc-foot { grid-template-columns: minmax(0, 1fr) minmax(12rem, 1fr); gap: 1rem; }
.editor-preview .watermark { font-size: 3rem; }
.preview-bar { display: flex; justify-content: space-between; gap: 1rem; padding: 0 0.25rem; }

.line-list { display: grid; gap: 0.6rem; }
.line-row {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr) auto;
  gap: 0.6rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.line-no { font-weight: 650; color: var(--muted); padding-top: 0.55rem; font-variant-numeric: tabular-nums; }
.line-fields { display: grid; gap: 0.5rem; min-width: 0; }
.line-top { display: grid; grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr); gap: 0.5rem; }
.line-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: 0.5rem; align-items: end; }
.mini { display: grid; gap: 0.2rem; min-width: 0; }
.mini > span { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.mini.grow { grid-column: span 2; }
.mini.subtotal strong { padding: 0.5rem 0; }
.line-remove { align-self: start; }
.input-pair { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: 0.35rem; }
.check-list { display: grid; gap: 0.25rem; }
.wide-row { grid-column: 1 / -1; margin: 0; }

.payment-summary { display: flex; gap: 2rem; flex-wrap: wrap; }
/* One date and one button: sized to their content, not stretched across the card. */
.inline-form.share-form { grid-template-columns: minmax(0, 16rem) auto; justify-content: start; align-items: end; }
@media (max-width: 860px) { .inline-form.share-form { grid-template-columns: 1fr; } }
.share-fresh { padding: 0.75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.share-fresh input { flex: 1; min-width: 0; }
.payment-summary strong { font-size: 1.1rem; }

@media (max-width: 1200px) {
  .editor { grid-template-columns: minmax(0, 1fr); }
  .editor-preview { position: static; max-height: none; }
}
@media (max-width: 560px) {
  .line-top { grid-template-columns: 1fr; }
  .mini.grow { grid-column: auto; }
  /* The number and the remove button share a header row so the fields get the full width. */
  .line-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "no remove" "fields fields"; padding: 0.6rem; }
  .line-no { grid-area: no; align-self: center; padding-top: 0; }
  .line-fields { grid-area: fields; }
  .line-remove { grid-area: remove; }
  .line-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- the invoice document ----------------------------------------------------------- */

.doc-frame { overflow-x: auto; }
.invoice-doc {
  position: relative;
  background: #fff;
  color: #111827;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.25rem 2.25rem 2rem;
  font-size: 0.86rem;
  line-height: 1.45;
  overflow: hidden;
  min-width: 34rem;
}
.watermark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 4.2rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(192, 57, 43, 0.12);
  transform: rotate(-24deg);
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
}
.doc-head { display: flex; justify-content: space-between; gap: 2rem; align-items: flex-start; border-bottom: 2px solid #111827; padding-bottom: 1rem; }
.doc-company-name { font-size: 1.15rem; font-weight: 750; letter-spacing: -0.01em; }
.doc-title { text-align: right; }
.doc-kind { font-size: 1.5rem; font-weight: 800; letter-spacing: 0.08em; }
.doc-number { font-family: var(--mono); font-size: 1rem; font-weight: 650; margin: 0.15rem 0 0.4rem; }
.doc-dates { display: grid; grid-template-columns: auto auto; gap: 0.1rem 0.75rem; margin: 0; justify-content: end; }
.doc-dates dt { color: #6b7280; }
.doc-dates dd { margin: 0; font-weight: 600; }
.doc-replaces { margin: 0.75rem 0 0; font-weight: 650; }
.doc-billto { margin: 1rem 0; }
.doc-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: #6b7280; font-weight: 700; }
.doc-strong { font-weight: 700; }
.doc-small { font-size: 0.8rem; color: #374151; }
.pre { white-space: pre-line; }
.doc-lines { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1rem; }
.doc-lines th, .doc-lines td { padding: 0.45rem 0.5rem; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: top; }
.doc-lines th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; border-bottom: 1.5px solid #111827; }
.doc-lines .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.doc-lines .no { width: 2rem; color: #6b7280; }
.doc-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.9fr); gap: 1.5rem; align-items: start; }
.doc-left { display: grid; gap: 0.8rem; }
.doc-terbilang { margin: 0; font-style: italic; }
.doc-banks { display: grid; gap: 0.35rem; }
.doc-totals { width: 100%; border-collapse: collapse; }
.doc-totals th, .doc-totals td { padding: 0.25rem 0; text-align: left; font-weight: 500; }
.doc-totals td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc-totals .muted-row th, .doc-totals .muted-row td { color: #6b7280; }
.doc-totals .strong-row th, .doc-totals .strong-row td { font-weight: 700; border-top: 1px solid #e5e7eb; padding-top: 0.4rem; }
.doc-totals .grand-row th, .doc-totals .grand-row td { font-weight: 800; font-size: 1rem; border-top: 2px solid #111827; padding-top: 0.45rem; }
.doc-taxidr { margin-top: 0.75rem; padding: 0.6rem 0.75rem; background: #f9fafb; border-radius: 6px; }
.warn-text { color: var(--warn); }
.doc-sign { margin-top: 1.5rem; text-align: center; }
.doc-sign-space { height: 4.25rem; }
.doc-footer { margin-top: 1.5rem; padding-top: 0.75rem; border-top: 1px solid #e5e7eb; text-align: center; }

/* --- printing: the document only --------------------------------------------------- */

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; }
  .sidebar, .page-head, .notice, .payment-summary, .toasts, .preview-bar, .editor-form, .no-print { display: none !important; }
  .shell, .editor { display: block; }
  .content { padding: 0; }
  .invoice-doc { border: none; box-shadow: none; padding: 0; min-width: 0; }
  .doc-frame { overflow: visible; }
}
