/* LIMAS CORE - Oberfläche (dunkel, Gold). Keine Fremdbibliotheken. */
@font-face { font-family: "Inter"; src: url("/static/fonts/inter-100-900.woff") format("woff"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("/static/fonts/playfair-display-400-900.woff") format("woff"); font-weight: 400 900; font-style: normal; font-display: swap; }

:root {
  --bg: #090909;
  --bg-2: #111111;
  --surface: #171717;
  --hover: #1e1e1e;
  --border-subtle: #1c1c1c;
  --border: #292929;
  --border-hi: #3a3a3a;
  --gold: #c5a45d;
  --champagne: #e5c77d;
  --gold-dim: #8a723e;
  --gold-dark: #534421;
  --gold-glow: rgba(197, 164, 93, 0.12);
  --gold-line: rgba(197, 164, 93, 0.35);
  --text: #f5f5f5;
  --text-2: #999999;
  --text-3: #666666;
  --ok: #10b981;
  --warn: #f59e0b;
  --err: #ef4444;
  --info: #3b82f6;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(197, 164, 93, 0.12);
  --shadow-gold: 0 0 20px -5px rgba(197, 164, 93, 0.15);
  --radius: 14px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  overflow-x: hidden;
}
::selection { background: rgba(197, 164, 93, 0.3); color: var(--text); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0d0d0d; }
::-webkit-scrollbar-thumb { background: #252525; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

a { color: var(--champagne); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-family: var(--font-serif); font-size: 28px; font-weight: 600; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0 0 12px; }
code, .mono { font-family: var(--font-mono); font-size: 12.5px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 256px; flex: none; background: var(--bg-2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; height: 100vh; position: sticky; top: 0; user-select: none;
}
.brand { height: 64px; padding: 0 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.brand a { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; background: #19160e; border: 1px solid rgba(197, 164, 93, 0.5);
  display: grid; place-items: center; color: var(--gold); box-shadow: var(--shadow-gold);
}
.brand-name { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.brand-sub { font-size: 11px; color: var(--text-2); }
.tag {
  font-size: 10px; font-weight: 600; color: var(--gold); padding: 1px 5px; border-radius: 4px;
  background: rgba(197, 164, 93, 0.15); border: 1px solid rgba(197, 164, 93, 0.3);
}
.nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.nav-title { padding: 0 12px 8px; font-size: 10px; text-transform: uppercase; font-weight: 600; letter-spacing: 0.08em; color: var(--text-3); }
.nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 38px; padding: 6px 12px;
  margin-bottom: 1px; border-radius: 10px; border: 1px solid transparent; color: var(--text-2); font-size: 12.5px; font-weight: 500;
  text-decoration: none; transition: background 0.15s, color 0.15s;
}
.nav a .nav-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.nav a .icon { color: var(--text-3); transition: color 0.15s; }
.nav a:hover { background: #161616; color: var(--text); }
.nav a:hover .icon { color: var(--text-2); }
.nav a[aria-current="page"] {
  background: #181610; color: var(--champagne); border-color: rgba(197, 164, 93, 0.3); font-weight: 600; box-shadow: var(--shadow-gold);
}
.nav a[aria-current="page"] .icon { color: var(--gold); }
.soon { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 6px; border-radius: 4px; color: var(--text-3); border: 1px solid var(--border); }
.badge-count { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--gold); color: #000; }
.sidebar-foot { padding: 14px; border-top: 1px solid var(--border); background: #0d0d0d; display: grid; gap: 12px; }
.engine { padding: 10px; border-radius: 10px; background: #141414; border: 1px solid rgba(41, 41, 41, 0.6); font-size: 11.5px; }
.engine-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; color: var(--text-2); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.err { background: var(--err); }
.user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #1e1b13; border: 1px solid rgba(197, 164, 93, 0.4); display: grid; place-items: center; color: var(--gold); font-size: 11px; font-weight: 700; flex: none; }
.user-text { min-width: 0; flex: 1; }
.user-text b { display: block; font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-text span { font-size: 11px; color: var(--text-3); }
.logout { margin: 0; }
.logout button { background: none; border: 1px solid var(--border); color: var(--text-2); border-radius: 8px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; }
.logout button:hover { color: var(--champagne); border-color: var(--gold-line); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; height: 56px; align-items: center; gap: 12px; padding: 0 16px; background: var(--bg-2); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar .brand-name { font-size: 12px; }
.menu-btn { background: none; border: 1px solid var(--border); color: var(--text); width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }
.scrim { display: none; }
.content { padding: 32px; width: 100%; max-width: 1180px; margin: 0 auto; }
.page-head { margin-bottom: 24px; }
.page-head p { color: var(--text-2); margin: 6px 0 0; max-width: 70ch; }

/* ---------- Bausteine ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-card); }
.card + .card { margin-top: 16px; }
.grid > .card, .form > .card, .form-grid > .card { margin-top: 0 !important; }
.card h2 { margin-bottom: 4px; }
.card .card-sub { color: var(--text-2); margin-bottom: 16px; font-size: 13px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); font-weight: 600; }
.metric .value { font-family: var(--font-serif); font-size: 28px; margin-top: 6px; color: var(--champagne); }
.metric .note { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.section-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); font-weight: 600; margin: 28px 0 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: 10px; border: 1px solid var(--border-hi); background: var(--hover); color: var(--text);
  font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none; transition: border-color 0.15s, background 0.15s;
}
.btn:hover { border-color: var(--gold-line); text-decoration: none; }
.btn-gold { background: linear-gradient(180deg, var(--champagne), var(--gold)); color: #15110a; border-color: var(--gold); }
.btn-gold:hover { background: linear-gradient(180deg, #efd48c, #cdac66); border-color: var(--champagne); }
.btn-danger { color: #fca5a5; border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.08); }
.btn-danger:hover { border-color: var(--err); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

.form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field .req { color: var(--gold); }
.field .hint { font-size: 12px; color: var(--text-3); }
.field .err-text { font-size: 12px; color: #fca5a5; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: #0f0f0f;
  color: var(--text); font: inherit; font-size: 14px;
}
input::placeholder { color: var(--text-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }
input.invalid, select.invalid { border-color: var(--err); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); flex: none; }
.otp { letter-spacing: 0.35em; font-family: var(--font-mono); font-size: 22px; text-align: center; }

.alert { padding: 12px 14px; border-radius: 10px; border: 1px solid; font-size: 13px; margin-bottom: 16px; }
.alert b { font-weight: 600; }
.alert-ok { background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.35); color: #6ee7b7; }
.alert-warn { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.35); color: #fcd34d; }
.alert-err { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.35); color: #fca5a5; }
.alert-info { background: rgba(197, 164, 93, 0.08); border-color: var(--gold-line); color: var(--champagne); }

.badge { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); }
.badge.ok { color: #6ee7b7; border-color: rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.08); }
.badge.warn { color: #fcd34d; border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.08); }
.badge.err { color: #fca5a5; border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.08); }
.badge.gold { color: var(--champagne); border-color: var(--gold-line); background: var(--gold-glow); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
tr:last-child td { border-bottom: 0; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist .mark { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border-hi); color: var(--text-3); font-size: 12px; }
.checklist .mark.done { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.5); color: #6ee7b7; }
.checklist .mark.todo { border-color: rgba(245, 158, 11, 0.5); color: #fcd34d; }
.checklist b { font-weight: 600; }
.checklist span.d { display: block; color: var(--text-2); font-size: 12.5px; }

.kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; font-size: 13px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; word-break: break-word; }

/* Login & Einrichtung */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1000px 500px at 50% -10%, rgba(197, 164, 93, 0.1), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 440px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 24px; text-align: center; }
.auth-brand .brand-mark { width: 48px; height: 48px; border-radius: 13px; }
.auth-brand h1 { font-size: 26px; }
.auth-brand p { color: var(--text-2); margin: 0; font-size: 13px; }
.qr { background: #fff; border-radius: 12px; padding: 6px; width: 232px; height: 232px; margin: 0 auto 16px; }
.qr svg { width: 100%; height: 100%; display: block; }
.secret { font-family: var(--font-mono); font-size: 15px; letter-spacing: 0.06em; background: #0f0f0f; border: 1px dashed var(--border-hi); border-radius: 10px; padding: 10px 12px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-bottom: 8px; }
.secret span { white-space: nowrap; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0; }
.codes code { background: #0f0f0f; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; text-align: center; font-size: 14px; letter-spacing: 0.06em; }
.foot-note { text-align: center; color: var(--text-3); font-size: 12px; margin-top: 16px; }

.placeholder { text-align: center; padding: 48px 24px; }
.placeholder .big { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; background: #19160e; border: 1px solid rgba(197, 164, 93, 0.4); display: grid; place-items: center; color: var(--gold); }
.placeholder .big .icon { width: 26px; height: 26px; }
.placeholder ul { text-align: left; max-width: 520px; margin: 16px auto 0; color: var(--text-2); padding-left: 20px; }

/* ---------- Smartphone / Tablet ---------- */
@media (max-width: 1023px) {
  .topbar { display: flex; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; transform: translateX(-100%); transition: transform 0.2s ease; width: 288px; max-width: 86vw; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, 0.8); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 30; }
  .content { padding: 20px 16px 32px; }
  h1 { font-size: 24px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { gap: 12px; }
  .metric .value { font-size: 24px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt { margin-top: 10px; }
  .card { padding: 16px; }
  .btn { width: 100%; }
  .actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Reiter innerhalb einer Seite */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.tabs a { padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--champagne); border-bottom-color: var(--gold); }
.status-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-subtle); align-items: start; }
.status-row:last-child { border-bottom: 0; }
.status-row b { font-weight: 600; }
.status-row .d { color: var(--text-2); font-size: 12.5px; display: block; margin-top: 2px; }
.status-row .h { color: var(--champagne); font-size: 12.5px; display: block; margin-top: 2px; }
.stage-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.stage-list li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding-bottom: 10px; border-bottom: 1px solid var(--border-subtle); }
.stage-list li:last-child { border-bottom: 0; padding-bottom: 0; }
@media (max-width: 640px) { .status-row { grid-template-columns: 1fr; gap: 6px; } }
.section-title-gap { margin-top: 16px; }

/* Kunden, Aufträge, Formulare mit Listen */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar-r { display: flex; gap: 10px; flex-wrap: wrap; }
.search { display: flex; gap: 8px; flex: 1 1 320px; max-width: 520px; }
.search input { min-width: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); font-size: 12px; font-weight: 600; text-decoration: none; }
.chip:hover { color: var(--text); text-decoration: none; border-color: var(--gold-line); }
.chip.on { color: var(--champagne); border-color: var(--gold-line); background: var(--gold-glow); }
.order-meta { display: flex; align-items: center; gap: 14px; margin: -10px 0 16px; font-size: 13px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.section-gap { margin-top: 16px; }
h2.section-gap { margin-bottom: 12px; }
.btn-sm { min-height: 32px; padding: 4px 12px; font-size: 12px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.row-actions form { margin: 0; }
.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: #0f0f0f; display: block; }
textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
textarea.invalid { border-color: var(--err); }
input[type="file"] { padding: 9px 12px; min-height: 44px; }
.label-like { font-size: 12px; font-weight: 600; color: var(--text-2); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; margin-top: 6px; }
fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px 16px; margin: 0; min-width: 0; grid-column: 1 / -1; }
fieldset legend { padding: 0 8px; font-size: 12px; font-weight: 600; color: var(--champagne); }
fieldset.row-item { background: rgba(255, 255, 255, 0.015); margin-top: 12px; }
fieldset.row-item:first-of-type { margin-top: 0; }
fieldset.group .form-grid { margin-top: 4px; }
.list-block { grid-column: 1 / -1; display: grid; gap: 0; }
.list-block h3 { margin: 4px 0 6px; font-size: 15px; }
.list-block > .hint, .list-block .hint { font-size: 12px; color: var(--text-3); margin: 4px 0 8px; }
.list-block .err-text, fieldset .err-text { color: #fca5a5; font-size: 12px; }
.list-block > .field { margin-top: 12px; }
.image-field { border-top: 1px dashed var(--border); padding-top: 12px; }
ul.missing { list-style: none; margin: 6px 0 14px; padding: 0; display: grid; gap: 8px; }
ul.missing li { display: grid; gap: 2px; padding-left: 12px; border-left: 2px solid rgba(245, 158, 11, 0.5); }
ul.missing .d { color: var(--text-2); font-size: 12.5px; }
ul.plain { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.card h3 { margin: 16px 0 6px; font-size: 14px; }
.muted.section-gap { margin-top: 16px; }
@media (max-width: 640px) { .search { max-width: none; } .toolbar-r .btn { flex: 1 1 100%; } fieldset { padding: 12px; } }

/* ---- Stufe 3: Produkte, Verträge, Rechnungen, Finanzen ---- */
.contract-text { max-width: 760px; font-size: 14px; line-height: 1.65; color: var(--text); }
.contract-text h3 { font-family: var(--font-serif); color: var(--champagne); margin: 22px 0 6px; font-size: 16px; }
.contract-text p { margin: 0 0 10px; white-space: pre-line; }
.contract-text p.li { margin: 0 0 4px 14px; }
table.items input, table.items select { width: 100%; min-width: 0; }
table.items td { vertical-align: top; }
table.items td.n { width: 120px; }
table.items td:first-child { min-width: 220px; }
table.sums { width: auto; margin: 14px 0 0 auto; min-width: 240px; }
table.sums td { padding: 4px 0 4px 24px; text-align: right; border: 0; }
table.sums td:first-child { text-align: left; color: var(--text-2); padding-left: 0; }
table.sums tr.total td { font-weight: 700; border-top: 1px solid var(--border); padding-top: 8px; color: var(--champagne); }
.neg { color: #fca5a5; }
form.inline { display: inline; }
textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.55; }
ul.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
td.bar-col, th.bar-col { width: 28%; }
.bar { display: block; height: 6px; border-radius: 3px; margin: 3px 0; min-width: 2px; }
.bar.rev { background: var(--gold); }
.bar.cost { background: #6b7280; }
@media (max-width: 640px) { td.bar-col, th.bar-col { display: none; } table.items td.n { width: 90px; } }
.w-0 { width: 0%; }
.w-5 { width: 5%; }
.w-10 { width: 10%; }
.w-15 { width: 15%; }
.w-20 { width: 20%; }
.w-25 { width: 25%; }
.w-30 { width: 30%; }
.w-35 { width: 35%; }
.w-40 { width: 40%; }
.w-45 { width: 45%; }
.w-50 { width: 50%; }
.w-55 { width: 55%; }
.w-60 { width: 60%; }
.w-65 { width: 65%; }
.w-70 { width: 70%; }
.w-75 { width: 75%; }
.w-80 { width: 80%; }
.w-85 { width: 85%; }
.w-90 { width: 90%; }
.w-95 { width: 95%; }
.w-100 { width: 100%; }
.card, form.form, .table-wrap { min-width: 0; max-width: 100%; }
@media (max-width: 640px) { table.items td:first-child { min-width: 180px; } table.items input[name$=".qty"], table.items input[name$=".unit"] { min-width: 80px; } }

.pre { white-space: pre-wrap; word-break: break-word; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line, rgba(255, 255, 255, 0.08)); border-radius: 8px; padding: 10px 12px; font-size: 13px; }

/* Kalender */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.cal-head { background: var(--surface-2, var(--surface)); padding: 6px; font-size: 11px; font-weight: 700; text-align: center; color: var(--text-2); }
.cal-cell { background: var(--surface); min-height: 96px; padding: 4px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-cell.other { opacity: 0.45; }
.cal-cell.today { outline: 2px solid var(--gold); outline-offset: -2px; }
.cal-num { font-size: 12px; font-weight: 700; color: var(--text-2); text-decoration: none; }
.cal-item { display: block; font-size: 11px; padding: 2px 4px; border-radius: 4px; text-decoration: none; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 3px solid var(--gold); background: rgba(212, 175, 55, 0.08); }
.cal-time { font-weight: 700; }
.cal-more { font-size: 11px; }
.cal-week { display: grid; gap: 12px; }
.cal-weekday h3 { font-size: 13px; margin: 0 0 4px; }
.cal-weekday.today h3 { color: var(--gold); }
.cal-weekday .cal-item { white-space: normal; font-size: 13px; padding: 6px 8px; margin-bottom: 4px; }
@media (max-width: 720px) {
  .cal-cell { min-height: 54px; }
  .cal-cell .cal-item { font-size: 0; padding: 0; height: 6px; border-left-width: 0; border-radius: 3px; background: var(--gold); }
  .cal-more { display: none; }
}

/* Checklisten */
ul.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media print {
  .sidebar, .topbar, .no-print, #scrim, .nav, header { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .card { border: 1px solid #999 !important; background: #fff !important; box-shadow: none !important; break-inside: avoid; }
  .hint, .muted { color: #333 !important; }
}
