:root {
  --ink: #1a1a1a;
  --ink-soft: #3d3d3d;
  --muted: #6b6b6b;
  --line: #d8d4ce;
  --paper: #f7f6f3;
  --panel: #ffffff;
  --accent: #2c4a3e;
  --accent-hover: #1f362d;
  --danger: #8b2e2e;
  --good: #2c4a3e;
  --good-bg: #e7f0ec;
  --bad: #8b2e2e;
  --bad-bg: #f8ecec;
  --warn-bg: #f6f1e6;
  --shadow: 0 18px 50px rgba(26, 26, 26, 0.08);
  --radius: 2px;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: "Segoe UI", Candara, "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(44, 74, 62, 0.08), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(26, 26, 26, 0.05), transparent 50%),
    linear-gradient(180deg, #efeee9 0%, var(--paper) 45%, #ebe8e2 100%);
  font-size: 16px;
  line-height: 1.45;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; font-weight: 600; }
h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.45rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}
.brand img, .mark {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}
.logo-settings {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.logo-preview {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex: none;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #d8d4cc);
  border-radius: 8px;
  padding: 0.35rem;
}
.logo-upload .field { margin-bottom: 0.75rem; }
.brand:hover { text-decoration: none; color: var(--ink); }

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
  justify-content: center;
}
.topbar nav a {
  color: var(--ink-soft);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.topbar nav a:hover { color: var(--accent); text-decoration: none; }
.topbar nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

.topbar-user { display: flex; align-items: center; gap: 0.75rem; flex: none; }
.user { color: var(--muted); font-size: 0.92rem; }

.main {
  width: min(1600px, 100%);
  margin: 0 auto;
  padding: 2.25rem 0.35rem 4rem;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 1.75rem;
}
.page-head p { margin: 0.45rem 0 0; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.85rem; margin-bottom: 1.4rem; }
.card, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { padding: 1rem 1.1rem; }
.card .label { margin: 0; color: var(--muted); font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }
.card .figure { margin: 0.45rem 0 0; font-family: var(--font-display); font-size: 1.7rem; letter-spacing: -0.02em; }

.panel { padding: 1.35rem 0.65rem; margin-bottom: 1.1rem; }
.panel h2 { font-size: 1rem; margin-bottom: 0.75rem; }

.banner { padding: 0.7rem 0.85rem; border-radius: var(--radius); margin: 0 0 1rem; border: 1px solid var(--line); }
.banner.bad { background: var(--bad-bg); color: var(--bad); border-color: #e5c8c8; }
.banner.good { background: var(--good-bg); color: var(--good); border-color: #c9ddd4; }
.banner.warn { background: var(--warn-bg); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
th, td { padding: 0.7rem 0.35rem 0.85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.sheet td { padding-top: 0.7rem; padding-bottom: 0.9rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }

.badge {
  display: inline-block;
  border: 1px solid var(--line);
  background: #f3f1ec;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
}
.badge.open { background: #f6f1e6; }
.badge.paid { background: var(--good-bg); color: var(--good); border-color: #c9ddd4; }
.badge.credited { background: #f3f1ec; }
.badge.draft { background: #f3f1ec; }
.badge.invoiced { background: var(--good-bg); color: var(--good); border-color: #c9ddd4; }
.badge.accepted { background: var(--good-bg); color: var(--good); border-color: #c9ddd4; }
.badge.declined { background: #f3e8e8; color: #8a3b3b; border-color: #e2c7c7; }
.badge.expired { background: #f3f1ec; color: #6b6560; }
.badge.upcoming { background: #eef2f7; color: #3a4a5c; border-color: #c9d4e0; }
tr.is-upcoming td { background: rgba(238, 242, 247, 0.55); }

.actions, .row { display: flex; gap: 0.65rem; align-items: center; flex-wrap: wrap; }
.import-log { list-style: none; margin: 0.9rem 0 0; padding: 0; }
.import-log li { padding: 0.4rem 0; border-top: 1px solid var(--line); }
.import-contact {
  margin-top: 0.65rem;
  padding: 0.85rem 0.9rem;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.75);
  max-width: 32rem;
}
.import-contact p { margin: 0 0 0.65rem; }
.import-contact select,
.import-contact input[type="text"] {
  width: 100%;
  margin-bottom: 0.55rem;
}
.import-contact__create {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}
.import-contact__create label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}
.import-contact__actions { margin: 0; gap: 0.5rem; }
.filters { display: flex; gap: 0.5rem; margin-bottom: 0.9rem; }
.filters a { padding: 0.35rem 0.7rem; border: 1px solid transparent; color: var(--ink-soft); }
.filters a.active { border-color: var(--line); background: #f3f1ec; color: var(--ink); text-decoration: none; }

button, .button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 0.7rem 1rem;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .button:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }
button.secondary, .button.secondary, a.secondary {
  width: auto;
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  font-weight: 500;
}
button.secondary:hover, .button.secondary:hover, a.secondary:hover { background: #f3f1ec; color: var(--ink); }
button.ghost { background: transparent; color: var(--bad); border-color: transparent; padding-inline: 0.4rem; font-weight: 500; }
button.ghost:hover { background: transparent; color: var(--bad); }
tr.line td { vertical-align: middle; }
tr.line.is-option td,
tr.is-option td { color: var(--ink-soft); }
.sheet-options { margin: 1.25rem 0 0.35rem; font-size: 1.05rem; }
.sheet-options-note { margin: 0 0 0.55rem; }

table[data-line-table] {
  table-layout: fixed;
  width: 100%;
}
table[data-line-table] th.line-desc,
table[data-line-table] td.line-desc {
  width: auto;
  position: relative;
}
table[data-line-table] tr.line > td {
  vertical-align: top;
}
.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.field-head label { margin: 0; }
.field-head button.ghost {
  min-height: 2rem;
  padding: 0 0.4rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.field-head button.ghost:hover,
.field-head button.ghost.is-busy { color: var(--accent); }
.field-head button.ghost.is-busy { opacity: 0.7; pointer-events: none; }
.desc-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
  width: 100%;
}
.desc-wrap textarea,
.desc-wrap input {
  flex: 1 1 auto;
  min-width: 0;
}
.desc-wrap button.ghost {
  flex: 0 0 auto;
  min-height: 2.2rem;
  padding: 0 0.4rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.desc-wrap button.ghost:hover,
.desc-wrap button.ghost.is-busy { color: var(--accent); }
.desc-wrap button.ghost.is-busy { opacity: 0.7; pointer-events: none; }
table[data-line-table] td.line-desc input,
table[data-line-table] td.line-desc textarea[data-auto-grow] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
table[data-line-table] td.line-desc textarea[data-auto-grow] {
  min-height: 2.4rem;
  height: 2.4rem;
  resize: none;
  overflow-y: hidden;
  line-height: 1.35;
  field-sizing: content;
}
table[data-line-table] th.line-kind,
table[data-line-table] td.line-kind { width: 5.5rem; }
table[data-line-table] th.line-qty,
table[data-line-table] td.qty-cell { width: 12rem; }
table[data-line-table] th.line-price,
table[data-line-table] td.price-cell { width: 9.5rem; }
.qty-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}
.qty-wrap input {
  flex: 0 0 5.25rem;
  width: 5.25rem;
  min-width: 5.25rem;
  padding-inline: 0.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.qty-wrap input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty-wrap input[type="number"]::-webkit-outer-spin-button,
.qty-wrap input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qty-wrap select {
  flex: 1 1 auto;
  min-width: 5rem;
  padding-inline: 0.4rem;
}
table[data-line-table] th.line-vat,
table[data-line-table] td.line-vat { width: 4.5rem; }
table[data-line-table] th.line-sum,
table[data-line-table] td[data-line-total] { width: 6.5rem; }
table[data-line-table] th.line-account,
table[data-line-table] td.line-account { width: 11rem; }
.col-resize {
  position: absolute;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
}
.col-resize::after {
  content: "";
  position: absolute;
  top: 20%;
  bottom: 20%;
  left: 3px;
  width: 2px;
  background: var(--line);
  border-radius: 1px;
}
.col-resize:hover::after,
body.is-col-resizing .col-resize::after { background: var(--accent); }
body.is-col-resizing {
  cursor: col-resize;
  user-select: none;
}

td.price-cell { white-space: nowrap; }
.price-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
}
.price-wrap input { flex: 1 1 auto; min-width: 4.5rem; }
.price-wrap button.ghost {
  flex: 0 0 auto;
  min-height: 2.2rem;
  padding: 0 0.35rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.price-wrap button.ghost:hover,
.price-wrap button.ghost.is-on { color: var(--accent); }
.price-wrap button.price-incl-toggle {
  min-width: 4.6rem;
  font-size: 0.78rem;
  white-space: nowrap;
}
.price-wrap button.price-incl-toggle.is-on {
  background: var(--good-bg);
  border-color: #c9ddd4;
  color: var(--accent);
  font-weight: 600;
}
td.line-actions {
  width: 1%;
  white-space: nowrap;
  padding-block: 0.35rem;
}
.line-actions .line-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
}
.line-actions button.ghost {
  min-width: 1.55rem;
  min-height: 2.2rem;
  padding: 0 0.3rem;
  line-height: 1;
}
.line-actions button.ghost[data-move-up],
.line-actions button.ghost[data-move-down] {
  color: var(--ink-soft);
}
.line-actions button.ghost[data-move-up]:hover,
.line-actions button.ghost[data-move-down]:hover { color: var(--accent); }

label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.45rem;
}
.field { margin-bottom: 1.1rem; }
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfaf8;
  color: var(--ink);
  font: inherit;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius);
}
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(44, 74, 62, 0.35);
  border-color: var(--accent);
  background: #fff;
}
.inline-kind { margin: 0; }
.kind-select {
  width: auto;
  min-width: 10rem;
  max-width: 14rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.92rem;
}
.bulk-bar {
  margin-bottom: 0.85rem;
  padding: 0.55rem 0.7rem;
  background: #f6f4ef;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.check-col {
  width: 2rem;
  text-align: center;
  vertical-align: middle;
}
.check-col input[type="checkbox"] {
  width: auto;
  margin: 0;
}
textarea:not([data-auto-grow]) { min-height: 6rem; resize: vertical; }
.multiline-text { white-space: pre-wrap; }
.note-composer {
  margin-top: 0.35rem;
}
.note-composer > summary,
.note-item > summary {
  cursor: pointer;
  list-style: none;
  display: grid;
  gap: 0.15rem;
}
.note-composer > summary::-webkit-details-marker,
.note-item > summary::-webkit-details-marker { display: none; }
.note-composer > summary::before,
.note-item > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.35rem;
  color: var(--muted);
}
.note-composer[open] > summary::before,
.note-item[open] > summary::before { content: "▾"; }
.note-composer > summary {
  font-weight: 600;
  color: var(--accent, #2c4a3e);
}
.note-composer form { margin-top: 0.75rem; }
.note-list {
  margin: 1rem 0 0;
  display: grid;
  gap: 0;
}
.note-item {
  border-top: 1px solid var(--line, #ddd);
  padding: 0.65rem 0;
}
.note-item:first-child { border-top: 0; }
.note-meta {
  font-size: 0.85rem;
}
.note-preview {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.note-item[open] .note-preview { display: none; }
.note-item p { margin: 0.65rem 0 0.35rem; }
.quote-closing {
  margin: 1.35rem 0 0;
  max-width: 42rem;
  line-height: 1.5;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1.4fr 0.6fr 0.8fr 0.6fr auto; gap: 0.5rem; align-items: end; }
.checks { display: flex; gap: 0.5rem; align-items: center; }
.checks input { width: auto; }
.checks label { margin: 0; text-transform: none; letter-spacing: 0; font-size: 0.95rem; }

.blank {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
}
.blank .panel { width: min(520px, 100%); margin: 0; padding: 2.5rem 2.25rem 2.25rem; }
.blank button { width: 100%; }
.blank .brand { font-size: 2rem; margin: 0.7rem 0 0.35rem; }
.blank .mark { width: 48px; height: 48px; }
.tagline { margin: 0 0 1.5rem; color: var(--muted); line-height: 1.45; }
.muted { color: var(--muted); }
.validation { color: var(--bad); margin: 0 0 1rem; }

.sheet {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.2rem;
  box-shadow: var(--shadow);
}
.sheet-top, .parties { display: flex; justify-content: space-between; gap: 1.5rem; }
.sheet-from {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.85rem;
  text-align: left;
}
.sheet .mark {
  width: 52px;
  height: 52px;
  flex: none;
  margin: 0.15rem 0 0;
  object-fit: contain;
}
.parties { margin: 1.75rem 0; }
.parties > div { max-width: 360px; }
.party-to { line-height: 1.45; }
.kicker { letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.75rem; color: var(--muted); margin: 0 0 0.4rem; }
.totals { margin-left: auto; width: min(320px, 100%); }
.totals td { border-bottom: 0; }
.pay-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 0.55rem;
}
.pay-row > div { flex: 1; min-width: 0; }
.pay-row p { margin: 0.55rem 0 0; }
.pay-request {
  max-width: 42rem;
  line-height: 1.5;
}
.pay-qr {
  margin: 0;
  text-align: center;
  flex: none;
}
.pay-qr img {
  display: block;
  width: 128px;
  height: 128px;
  image-rendering: pixelated;
}
.pay-qr figcaption {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; }
  .topbar nav { order: 3; width: 100%; justify-content: flex-start; }
  .main { padding: 1.5rem 0.25rem 3rem; }
  .cards, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .sheet { padding: 1.25rem; }
  .sheet-top, .parties { display: block; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  html, body, .app {
    min-height: 0 !important;
    height: auto !important;
    background: white !important;
    overflow: visible !important;
  }
  .app { display: block; }
  .topbar, .noprint, .banner, script { display: none !important; }
  .main {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0 !important;
  }
  .sheet {
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    border-radius: 0;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .sheet-top { gap: 1rem; margin: 0 0 0.9rem; }
  .sheet h2 { font-size: 1.45rem; }
  .parties { margin: 0.9rem 0 1rem; gap: 1rem; }
  .sheet table { margin: 0; }
  .sheet th { padding: 0.35rem 0.35rem 0.4rem; }
  .sheet td { padding: 0.4rem 0.35rem 0.55rem; }
  .sheet .totals { margin-top: 0.4rem; }
  .sheet p { margin: 0.55rem 0 0; }
  .pay-row { margin-top: 0.35rem; gap: 0.85rem; align-items: center; }
  .pay-qr img { width: 110px; height: 110px; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .sheet .mark {
    width: 44px;
    height: 44px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .brand img { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* Original invoice / inkoop file drop */
.file-viewer {
  padding: 0;
  overflow: hidden;
  min-height: 70vh;
}
.file-viewer__frame {
  display: block;
  width: 100%;
  height: min(80vh, 920px);
  border: 0;
  background: #f3f1ec;
}
.file-viewer__image {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem;
  background: #f3f1ec;
  min-height: 40vh;
}
.file-viewer__image img {
  max-width: 100%;
  height: auto;
  display: block;
}
.file-viewer__text {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow: auto;
  max-height: min(80vh, 920px);
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.file-viewer__empty {
  padding: 2rem 1.25rem;
  text-align: center;
}
.file-drop--multi {
  max-width: 40rem;
}
.file-drop--multi .file-drop__submit {
  margin-top: 0.75rem;
}
.file-drop {
  display: grid;
  gap: 0.75rem;
  max-width: 520px;
}
.file-drop__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.file-drop__zone {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  text-align: center;
  padding: 1.6rem 1.1rem;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 246, 243, 0.95));
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.file-drop__zone:hover,
.file-drop.is-dragover .file-drop__zone,
.file-drop.is-ready .file-drop__zone {
  border-color: var(--accent);
  background: var(--good-bg);
  color: var(--accent);
  text-decoration: none;
}
.file-drop__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.file-drop__hint {
  font-size: 0.9rem;
  color: var(--muted);
}
.file-drop.is-dragover .file-drop__hint,
.file-drop.is-ready .file-drop__hint {
  color: var(--accent);
}
.file-drop__name {
  margin-top: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  word-break: break-all;
}
.file-drop__submit {
  justify-self: start;
}

.original-cell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 7.5rem;
  white-space: nowrap;
}
.original-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}
.file-drop--compact {
  max-width: none;
  gap: 0;
  flex: 1;
  min-width: 4.5rem;
}
.file-drop--compact .file-drop__zone {
  padding: 0.35rem 0.55rem;
  gap: 0;
}
.file-drop--compact .file-drop__title {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
}
.file-drop--compact .file-drop__name {
  margin-top: 0;
  font-size: 0.72rem;
  max-width: 7rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-drop__submit--sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.original-cell .button,
.original-cell button {
  padding: 0.3rem 0.55rem;
  font-size: 0.82rem;
}
.original-view {
  flex: none;
}

.quick-contact { margin-top: 0.45rem; }
.quick-contact__toggle {
  padding: 0;
  font-size: 0.9rem;
  color: var(--accent);
}
.quick-contact__toggle:hover { background: transparent; color: var(--accent-hover); text-decoration: underline; }
.quick-contact__panel {
  margin-top: 0.55rem;
  padding: 0.85rem 0.9rem;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.7);
}
.quick-contact__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem 0.85rem;
  align-items: end;
}
.quick-contact__actions .row { margin-top: 0; }
.quick-contact__hint { margin: 0.55rem 0 0; font-size: 0.88rem; }
