/* Udlånssystem – stilark. Ingen eksterne skrifttyper eller CDN'er. */

:root {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #1b2220;
  --ink-2: #3a4542;
  --muted: #66716d;
  --line: #e2e0d8;
  --line-strong: #c9ccc6;
  --accent: #1a47b8;
  --accent-hover: #153a96;
  --accent-soft: #e6ecfa;
  --accent-ink: #ffffff;
  --danger: #a8321f;
  --danger-soft: #fbeae6;
  --warn: #8a5300;
  --warn-soft: #fcf0d9;
  --info-soft: #e8eef6;
  --info: #24477a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(27, 34, 32, .05), 0 2px 8px rgba(27, 34, 32, .04);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
h3, .h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 .3em; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: var(--mono); font-size: .9em; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Topbjælke ---------- */

.env-banner {
  background: repeating-linear-gradient(-45deg, #f6c445, #f6c445 12px, #f2b92b 12px, #f2b92b 24px);
  color: #3d2a00;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
  padding: .3rem 1rem;
}
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: .6rem 1rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand img { height: 30px; width: auto; display: block; }
.brand-name { font-weight: 700; font-size: 1.05rem; }
.brand-app {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: .15rem .55rem;
}
.mainnav { display: flex; gap: .25rem; flex: 1; overflow-x: auto; scrollbar-width: none; }
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a, .usermenu-name {
  color: var(--ink-2); text-decoration: none; padding: .45rem .7rem; border-radius: var(--radius-sm);
  font-size: .95rem; white-space: nowrap;
}
.mainnav a:hover, .usermenu-name:hover { background: var(--surface-2); color: var(--ink); }
.mainnav a.is-active, .usermenu-name.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.usermenu { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.usermenu form { margin: 0; }
.linklike {
  background: none; border: 0; padding: .45rem .5rem; color: var(--muted); font: inherit; font-size: .95rem;
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.linklike:hover { color: var(--ink); }
.linklike.small { font-size: .82rem; padding: .2rem 0; }

@media (max-width: 720px) {
  .topbar-inner { gap: .4rem .75rem; }
  .mainnav { order: 3; flex-basis: 100%; margin: 0 -.25rem; }
  .usermenu-name { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- Layout ---------- */

.container { max-width: 1200px; margin: 0 auto; padding: 1.25rem 1rem 4rem; }
.plain-wrap { max-width: 720px; margin: 0 auto; padding: 2.5rem 1rem 4rem; }
.plain-brand { display: flex; align-items: center; gap: .55rem; justify-content: center; margin-bottom: 1.5rem; }
.login-card { max-width: 420px; margin: 0 auto; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1rem;
}
.card.narrow { max-width: 560px; }
.card-danger { border-color: #efc9c1; }
.table-card { padding: 0; overflow: hidden; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem;
  flex-wrap: wrap; margin-bottom: 1rem;
}
.page-head h1 { margin: 0; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.page-head > p { flex-basis: 100%; margin: 0; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.back { display: inline-block; font-size: .9rem; text-decoration: none; margin-bottom: .25rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.section-head h2 { margin: 0; }

/* ---------- Beskeder ---------- */

.flash {
  border-radius: var(--radius-sm); padding: .75rem 1rem; margin-bottom: 1rem;
  background: var(--info-soft); color: var(--info); border: 1px solid #cfdbec;
}
.flash ul { margin: 0; padding-left: 1.2rem; }
.flash-success { background: var(--accent-soft); color: var(--accent-hover); border-color: #c7d4f2; }
.flash-error { background: var(--danger-soft); color: var(--danger); border-color: #efc9c1; }
.flash-warn { background: var(--warn-soft); color: var(--warn); border-color: #f0dbb2; }
.flash-secret { background: #fff8e6; color: #4d3800; border-color: #f0dbb2; font-family: var(--mono); font-size: .92rem; }
.flash-secret .btn { font-family: var(--font); margin-top: .5rem; }
p.flash { margin: 0 0 .75rem; padding: .5rem .75rem; }

/* ---------- Knapper ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: inherit; font-size: .95rem; font-weight: 600; line-height: 1.2;
  padding: .6rem 1rem; min-height: 42px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--surface-2); border-color: #b6bab3; color: var(--ink); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .photo-box:focus-visible {
  outline: 3px solid rgba(26, 71, 184, .35); outline-offset: 1px;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line); }
.btn-danger { background: var(--surface); border-color: #e3b1a6; color: var(--danger); }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-sm { min-height: 34px; padding: .35rem .7rem; font-size: .875rem; }
.btn-lg { min-height: 50px; padding: .8rem 1.5rem; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-add { width: 100%; border-style: dashed; color: var(--accent); }

/* ---------- Formularer ---------- */

.form label, .loan-form label, .settings-form label { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; font-weight: 600; color: var(--ink-2); margin-bottom: .85rem; }
input, select, textarea {
  font: inherit; font-size: 16px; /* undgår zoom på iOS */
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: .6rem .7rem; min-height: 44px; width: 100%;
}
textarea { resize: vertical; min-height: 72px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); margin: 0; flex: none; }
input[type=file] { padding: .45rem; font-size: .9rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1rem .25rem; margin: 0 0 1rem; }
legend { font-weight: 700; padding: 0 .4rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.grid-2 .span-2 { grid-column: 1 / -1; }
.grid-2.tight { gap: 0 .6rem; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
label.check, .check {
  flex-direction: row !important; align-items: center; gap: .6rem !important;
  font-weight: 500 !important; color: var(--ink) !important; cursor: pointer;
}
.hint { font-weight: 400; color: var(--muted); }
.field-static { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .85rem; }
.field-static .label { font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.field-static > span:last-child { min-height: 44px; display: flex; align-items: center; padding: 0 .1rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .25rem; }
.input-group { display: flex; gap: .4rem; }
.input-group input { flex: 1; min-width: 0; }
.input-group .btn { flex: none; padding-left: .75rem; padding-right: .75rem; }

.checklist { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.checklist li { display: flex; gap: .55rem; align-items: center; padding: .3rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.check-mark { width: 1.4rem; height: 1.4rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; flex: none; }
.checklist .ok .check-mark { background: var(--accent-soft); color: var(--accent); }
.checklist .bad .check-mark { background: var(--danger-soft); color: var(--danger); }
.checklist .warn .check-mark { background: var(--warn-soft); color: var(--warn); }

/* ---------- Liste over udlån ---------- */

.tabs { display: flex; gap: .3rem; margin-bottom: .75rem; overflow-x: auto; scrollbar-width: none; }
.tab {
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
  padding: .5rem .85rem; border-radius: 999px; text-decoration: none; color: var(--ink-2);
  border: 1px solid var(--line); background: var(--surface); font-size: .92rem; font-weight: 600;
}
.tab:hover { border-color: var(--line-strong); color: var(--ink); }
.tab.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab .count { font-size: .78rem; background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: .05rem .45rem; font-variant-numeric: tabular-nums; }
.tab.is-active .count { background: rgba(255, 255, 255, .18); color: #fff; }
.tab.tab-alert .count { background: var(--danger); color: #fff; }

.searchbar { display: flex; gap: .5rem; margin-bottom: 1rem; }
.searchbar input { flex: 1; min-width: 0; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }

.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); background: var(--surface-2); padding: .65rem .9rem; border-bottom: 1px solid var(--line);
}
.table td { padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }
.rowlink { cursor: pointer; }
.rowlink:hover td { background: #fbfaf7; }
.rowlink a { text-decoration: none; color: var(--ink); }
tr.is-overdue td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
tr.is-inactive td { color: var(--muted); }
tr.is-warn td { background: #fffaf0; }
.row-actions { text-align: right; }

@media (max-width: 760px) {
  .table.responsive thead { display: none; }
  .table.responsive, .table.responsive tbody, .table.responsive tr, .table.responsive td { display: block; width: 100%; }
  .table.responsive tr { padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
  .table.responsive tbody tr:last-child { border-bottom: 0; }
  .table.responsive td { border: 0; padding: .15rem 0; display: grid; grid-template-columns: 8.5rem 1fr; gap: .5rem; text-align: left; }
  .table.responsive td::before { content: attr(data-label); color: var(--muted); font-size: .82rem; font-weight: 600; padding-top: .1rem; }
  .table.responsive td > * { grid-column: 2; justify-self: start; }
  .table.responsive td.row-actions { display: block; padding-top: .5rem; text-align: left; }
  .table.responsive td.row-actions::before { content: none; }
  tr.is-overdue { box-shadow: inset 3px 0 0 var(--danger); }
  tr.is-overdue td:first-child { box-shadow: none; }
}

.badge {
  display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .02em;
  border-radius: 999px; padding: .15rem .6rem; vertical-align: middle; white-space: nowrap;
}
h1 .badge { font-size: .8rem; }
.badge-active { background: var(--accent-soft); color: var(--accent); }
.badge-overdue { background: var(--danger); color: #fff; }
.badge-returned { background: #ecebe6; color: var(--ink-2); }
.badge-muted { background: #ecebe6; color: var(--muted); }
.badge-pending { background: var(--warn-soft); color: var(--warn); }

.pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1rem; }

/* ---------- Nyt udlån ---------- */

.loan-form { max-width: 860px; }
.items { display: flex; flex-direction: column; gap: .75rem; margin-bottom: .75rem; }
.item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); padding: .75rem .9rem .1rem; }
.item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.item-no { font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.item-body { display: grid; grid-template-columns: 120px 1fr; gap: 1rem; }
.item-photo { display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.photo-box {
  width: 120px; height: 120px; border-radius: var(--radius-sm); border: 2px dashed var(--line-strong);
  background: var(--surface); padding: 0; cursor: pointer; overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center; color: var(--muted); font: inherit; font-size: .85rem; font-weight: 600;
}
.photo-box:hover { border-color: var(--accent); color: var(--accent); }
.photo-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-box.is-busy::after {
  content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .7) center / 28px no-repeat;
  background-image: radial-gradient(circle, var(--accent) 35%, transparent 37%);
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .4; } }
.photo-placeholder { display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.photo-icon {
  width: 30px; height: 24px; border: 2.5px solid currentColor; border-radius: 6px; position: relative;
}
.photo-icon::before { content: ""; position: absolute; width: 10px; height: 10px; border: 2.5px solid currentColor; border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.photo-icon::after { content: ""; position: absolute; width: 9px; height: 4px; background: currentColor; border-radius: 2px 2px 0 0; left: 5px; top: -6px; }
.item-fields label { margin-bottom: .6rem; }
.item-fields .hint { display: block; margin: -.35rem 0 .6rem; color: var(--accent); }
@media (max-width: 560px) {
  .item-body { grid-template-columns: 1fr; gap: .5rem; }
  .item-photo { flex-direction: row; justify-content: flex-start; gap: .75rem; }
  .photo-box { width: 96px; height: 96px; }
  .input-group { flex-wrap: wrap; }
  .input-group input { flex-basis: 100%; }
  .input-group .btn { flex: 1; }
}

.terms {
  white-space: normal; font-size: .92rem; line-height: 1.55; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .9rem 1rem; max-height: 280px; overflow-y: auto; margin-bottom: .9rem;
}

.sig-wrap {
  position: relative; height: 200px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; touch-action: none; user-select: none; -webkit-user-select: none;
}
.sig-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
.sig-hint { position: absolute; left: 1rem; bottom: 2.6rem; color: #b9bdb7; font-size: 1.05rem; pointer-events: none; }
.sig-line { position: absolute; left: 1rem; right: 1rem; bottom: 2.2rem; border-top: 1.5px solid #cdd0ca; pointer-events: none; }
.sig-caption { margin-top: .5rem; font-size: .9rem; color: var(--ink-2); }

.submit-bar {
  position: sticky; bottom: 0; z-index: 10; display: flex; align-items: center; justify-content: flex-end; gap: 1rem;
  background: rgba(244, 243, 239, .92); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: .85rem 0 calc(.85rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); margin-top: .5rem;
}
@media (max-width: 560px) { .submit-bar .btn { flex: 1; } }

/* Scanner-overlay */
.scanner { position: fixed; inset: 0; z-index: 100; background: rgba(10, 14, 13, .88); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.scanner-box { width: 100%; max-width: 560px; text-align: center; }
.scanner-view { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.scanner-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner-frame {
  position: absolute; left: 12%; right: 12%; top: 30%; bottom: 30%;
  border: 3px solid rgba(255, 255, 255, .9); border-radius: 10px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35);
}
.scanner-frame::after { content: ""; position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: #e5484d; animation: scanline 1.6s ease-in-out infinite; }
@keyframes scanline { 0%, 100% { transform: translateY(-28px); } 50% { transform: translateY(28px); } }
.scanner-msg { color: #fff; margin: .9rem 0; }
.scanner-msg.is-error { color: #ffd2c8; }
.scanner-actions .btn { min-width: 140px; }

/* ---------- Udlånsside / seddel ---------- */

.loan-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
@media (max-width: 960px) { .loan-layout { grid-template-columns: 1fr; } .loan-side { order: -1; } }
.slip { padding: 1.75rem; }
.slip h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); margin: 1.4rem 0 .5rem; }
.slip-head { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 2px solid var(--accent); flex-wrap: wrap; }
.slip-logo { max-height: 52px; max-width: 220px; display: block; margin-bottom: .4rem; }
.slip-company-name { font-weight: 700; font-size: 1.2rem; margin-bottom: .2rem; }
.slip-title { text-align: right; }
.slip-doc { font-size: 1.25rem; font-weight: 700; }
.slip-number { font-size: 1.15rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.slip-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; }
@media (max-width: 640px) { .slip { padding: 1.1rem; } .slip-cols { grid-template-columns: 1fr; } .slip-title { text-align: left; } }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; overflow-wrap: anywhere; }

.items-table th, .items-table td { padding: .55rem .5rem; vertical-align: middle; }
.items-table th:first-child, .items-table td:first-child { padding-left: 0; }
.items-table th:last-child, .items-table td:last-child { padding-right: 0; }
.items-table tbody tr:last-child td { border-bottom: 1px solid var(--line); }
.items-table tfoot td { border-top: 2px solid var(--ink); font-weight: 600; padding-top: .7rem; border-bottom: 0; }
.items-table .col-no { width: 2rem; color: var(--muted); }
.items-table .col-photo { width: 72px; }
.thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; display: block; border: 1px solid var(--line); }
.thumb-empty { background: var(--surface-2); }
@media (max-width: 560px) { .items-table .col-no { display: none; } .items-table th:nth-child(4), .items-table td.mono { display: none; } }

.terms-slip { max-height: none; overflow: visible; }
.slip-signature { margin-top: 1.5rem; max-width: 420px; }
.slip-signature img { height: 110px; width: auto; display: block; }
.slip-signature .sig-line { position: static; border-top: 1.5px solid var(--ink); margin: .1rem 0 .35rem; }
.return-note { margin-top: 1.25rem; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.return-note h3 { margin-top: 0; }
.loan-side .card { padding: 1.1rem; }
.loan-side h2 { margin-bottom: .5rem; }
.loan-side form { margin: 0; }

/* ---------- Admin ---------- */

.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
@media (max-width: 960px) { .admin-grid { grid-template-columns: 1fr; } }
.settings-form { max-width: 860px; }
.settings-extra { max-width: 860px; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
@media (max-width: 640px) { .settings-extra { grid-template-columns: 1fr; } }
.logo-row { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.logo-row label { margin-bottom: .5rem; }
.logo-preview { max-height: 64px; max-width: 200px; border: 1px solid var(--line); border-radius: 6px; padding: .4rem; background: #fff; margin-bottom: .5rem; }
.log-table td { font-size: .92rem; }

/* ---------- Print ---------- */

@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 11pt; }
  .no-print, .topbar, .env-banner, .flash { display: none !important; }
  .container { padding: 0; max-width: none; }
  .loan-layout { display: block; }
  .card { border: 0; box-shadow: none; padding: 0; }
  .slip h3 { break-after: avoid; }
  .items-table tr, .slip-signature { break-inside: avoid; }
  .thumb { width: 48px; height: 48px; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- Send til låner ---------- */

.copy-row {
  display: flex; align-items: center; gap: .5rem; margin: 0 0 .75rem;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .35rem .35rem .35rem .7rem;
}
.copy-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.mail-hint { margin: .6rem 0 .2rem; }
#mail-status:empty { display: none; }
