/* Shared styles for all Lindens 3D documents */
:root {
  --brand: #5e6ad2;
  --text: #08090a;
  --text-2: #62666d;
  --text-3: #8a8f98;
  --border: #e6e6e6;
  --surface: #ffffff;
  --surface-2: #f3f4f5;
  --bg: #f7f8f8;
  --warning: #f5a623;
  --danger: #e85a5a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; line-height: 1.55;
  padding: 24px; letter-spacing: -0.011em;
}
.doc {
  max-width: 800px; margin: 0 auto;
  background: white; padding: 36px 40px;
  border-radius: 12px; box-shadow: 0 2px 16px rgba(0,0,0,0.04);
}
.doc-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  border-bottom: 2px solid var(--brand); padding-bottom: 18px; margin-bottom: 24px;
}
.brand { font-family: 'Pacifico', cursive; font-size: 26px; color: var(--brand); white-space: nowrap; }
.subbrand { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.doc-title { font-size: 20px; font-weight: 700; letter-spacing: -0.022em; }
.doc-meta { font-size: 12px; color: var(--text-2); text-align: right; margin-top: 4px; }
.doc-nr {
  display: inline-block; padding: 3px 10px;
  background: var(--brand); color: white; font-size: 11px; font-weight: 600;
  border-radius: 4px; margin-top: 4px; letter-spacing: -0.011em;
}

.briefkopf {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 18px; margin-bottom: 24px;
}
.briefkopf-block {
  background: var(--surface-2); padding: 14px 16px; border-radius: 8px;
  border: 1px dashed transparent;
}
.briefkopf-block[contenteditable="true"]:hover { border-color: var(--brand); background: white; }
.briefkopf-block .label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0; margin-bottom: 4px; font-weight: 600; }
.briefkopf-block strong { display: block; font-size: 14px; margin-bottom: 2px; }
.briefkopf-block p { font-size: 12.5px; color: var(--text-2); line-height: 1.6; }

h2 { font-size: 16px; font-weight: 700; margin: 22px 0 10px; color: var(--brand); letter-spacing: -0.022em; }
.intro {
  background: rgba(94,106,210,0.04);
  border-left: 3px solid var(--brand);
  padding: 12px 16px; border-radius: 0 8px 8px 0;
  font-size: 13px; line-height: 1.6; margin-bottom: 18px;
}

table.items { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 14px; }
table.items th {
  text-align: left; padding: 9px 10px; background: var(--brand); color: white;
  font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0;
}
table.items th.num, table.items td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.items td { padding: 9px 10px; border-bottom: 1px solid var(--border); }
table.items tr:nth-child(even) { background: rgba(94,106,210,0.02); }
table.items tfoot td {
  font-weight: 700; background: rgba(94,106,210,0.06);
  border-top: 2px solid var(--brand);
}

.summary-row {
  display: flex; justify-content: space-between; padding: 6px 14px;
  font-size: 13px; border-bottom: 1px solid var(--border);
}
.summary-row.total {
  font-weight: 700; font-size: 16px; color: var(--brand);
  background: rgba(94,106,210,0.06); border-radius: 6px;
  padding: 12px 14px; border: 1px solid rgba(94,106,210,0.2);
  margin-top: 8px;
}

.unterschriften {
  display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 40px;
}
.signature-box {
  border-top: 2px solid var(--text); padding-top: 8px;
  font-size: 12px; color: var(--text-2);
}
.signature-box .name { font-weight: 600; color: var(--text); margin-bottom: 1px; }

.footer-legal {
  margin-top: 40px; padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 10.5px; color: var(--text-3); line-height: 1.55;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.footer-legal strong { color: var(--text-2); display: block; margin-bottom: 2px; font-size: 11px; }

.toolbar {
  max-width: 800px; margin: 0 auto 16px;
  display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap;
}
.btn {
  padding: 8px 14px; border: 1px solid var(--brand); border-radius: 6px;
  background: white; color: var(--brand); font-weight: 600;
  cursor: pointer; font-size: 13px; font-family: inherit;
  text-decoration: none; display: inline-block;
}
.btn.primary { background: var(--brand); color: white; }
.btn:hover { opacity: 0.9; }

.note-box {
  background: rgba(245,166,35,0.08);
  border-left: 3px solid var(--warning);
  padding: 10px 14px; border-radius: 0 8px 8px 0;
  font-size: 12.5px; color: #6b5b2a; line-height: 1.55;
  margin: 14px 0;
}
.danger-box {
  background: rgba(232,90,90,0.06);
  border-left: 3px solid var(--danger);
  padding: 10px 14px; border-radius: 0 8px 8px 0;
  font-size: 12.5px; color: #b32f2f; line-height: 1.55;
  margin: 14px 0;
}

@media print {
  body { background: white; padding: 0; }
  .doc { box-shadow: none; max-width: 100%; padding: 16px 20px; }
  .toolbar { display: none; }
  @page { size: A4; margin: 14mm; }
  .briefkopf-block:hover { border-color: transparent !important; background: var(--surface-2) !important; }
}
@media (max-width: 600px) {
  body { padding: 14px; }
  .doc { padding: 18px 18px; }
  .briefkopf, .unterschriften, .footer-legal { grid-template-columns: 1fr; }
}
