/* Werkstatt-CAD – Verwaltung (Projekte, Kunden, Bibliothek, Einstellungen) */
:root { --wood: #6d4c41; --wood2: #8d6e63; --accent: #1f78d1; --bg: #f4f2ee; --card: #fff; --line: #ddd8cf; --text: #22201c; --muted: #6f6a62; --ok: #2e7d32; --err: #c62828; }
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; } h1 small { font-size: 14px; color: var(--muted); font-weight: normal; margin-left: 6px; }
h2 { font-size: 15px; margin: 0 0 10px; color: var(--wood); text-transform: uppercase; letter-spacing: .04em; }
h3 { font-size: 14px; margin: 16px 0 6px; }
.hidden { display: none !important; }
.top { display: flex; align-items: center; gap: 22px; padding: 0 20px; height: 52px; background: #2f2a26; color: #eee; }
.top .brand { color: #fff; font-weight: 700; font-size: 16px; white-space: nowrap; }
.logo { color: #d7a86e; }
.top nav { display: flex; gap: 4px; flex: 1; }
.top nav a { color: #d8d2c8; padding: 8px 12px; border-radius: 6px; }
.top nav a.on, .top nav a:hover { background: #4a423c; color: #fff; text-decoration: none; }
.top .who { font-size: 13px; color: #bfb7ab; white-space: nowrap; } .top .who a { color: #e6c08f; }
main { max-width: 1240px; margin: 0 auto; padding: 22px 20px 60px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .acts form { margin: 0; }
.btn { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); font: inherit; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #f6f3ee; text-decoration: none; }
.btn.primary { background: var(--wood); border-color: var(--wood); color: #fff; } .btn.primary:hover { background: #5b3f36; }
.btn.danger { color: var(--err); } .btn.big { width: 100%; justify-content: center; padding: 10px; font-size: 15px; }
.msg { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; } .msg.ok { background: #e7f3e8; color: #1b5e20; } .msg.err { background: #fdecea; color: #8e1c1c; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 16px; background: #fff; border: 1px solid var(--line); color: var(--text); font-size: 13px; }
.chip i { width: 8px; height: 8px; border-radius: 50%; } .chip span { color: var(--muted); font-size: 12px; }
.chip.on { background: #2f2a26; color: #fff; border-color: #2f2a26; } .chip.on span { color: #ccc; } .chip:hover { text-decoration: none; border-color: #bbb; }
.search { margin-left: auto; } .search input { padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; width: 280px; font: inherit; }
.search.wide { margin: 0 0 14px; } .search.wide input { width: 100%; max-width: 520px; }
table.list { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
table.list th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 9px 12px; background: #faf8f4; border-bottom: 1px solid var(--line); }
table.list td { padding: 9px 12px; border-bottom: 1px solid #eee9e1; vertical-align: middle; }
table.list tr:last-child td { border-bottom: none; } table.list tr.click { cursor: pointer; } table.list tr:hover td { background: #fcfaf6; }
table.list.small td, table.list.small th { padding: 5px 8px; font-size: 12.5px; }
td.n, th.n { text-align: right; white-space: nowrap; } td.acts { justify-content: flex-end; white-space: nowrap; } td.acts .btn { padding: 5px 9px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: var(--muted); } .strong { font-weight: 600; color: var(--text); }
small { color: var(--muted); }
select.status { border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 6px; padding: 4px 6px; font: inherit; background: #fff; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; background: color-mix(in srgb, var(--c) 15%, white); color: var(--c); font-weight: 600; }
td form { margin: 0; display: inline; }
.empty { background: #fff; border: 1px dashed #cfc7ba; border-radius: 10px; padding: 30px; text-align: center; color: var(--muted); }
.empty b { color: var(--text); }
.form label { display: block; margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.form label.row { display: flex; gap: 8px; align-items: center; color: var(--text); }
.form input:not([type=checkbox]):not([type=file]), .form select, .form textarea, .libcard input { display: block; width: 100%; margin-top: 3px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; color: var(--text); background: #fff; }
.form textarea { resize: vertical; }
.form h2 { margin-top: 6px; } .form h2 ~ h2 { margin-top: 22px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; } .grid2 .span2 { grid-column: 1 / 3; }
.foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; padding-top: 14px; border-top: 1px solid #eee9e1; }
form.card.form { max-width: 820px; }
.cols { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; } .cols > .card { flex: 1 1 300px; } .cols > .grow { flex: 2 1 480px; }
.pre { white-space: pre-line; }
.kbox { padding: 10px 14px; border: 1px solid #e2d6c7; background: #fbf7f1; border-radius: 8px; margin-bottom: 8px; }
.tabs2 { display: flex; gap: 4px; margin-bottom: 10px; } .tabs2 button { padding: 6px 12px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; font: inherit; } .tabs2 button.on { background: #2f2a26; color: #fff; border-color: #2f2a26; }
.treffer { margin-top: 6px; max-height: 280px; overflow: auto; } .treffer button { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 1px solid #eee; border-radius: 6px; background: #fff; margin-bottom: 4px; cursor: pointer; font: inherit; } .treffer button:hover { background: #fbf7f1; border-color: #e2d6c7; }
.hint { color: var(--muted); font-size: 13px; }
.scrollx { overflow-x: auto; margin: 10px 0; } .scrollx select { font-size: 12px; padding: 3px; }
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.libcard { padding: 12px; display: flex; flex-direction: column; gap: 6px; } .libcard input { margin: 0; padding: 5px 8px; } .libcard .row { display: flex; gap: 6px; margin-top: 4px; }
.thumb { height: 150px; background: #f7f4ef; border-radius: 6px; display: flex; align-items: center; justify-content: center; overflow: hidden; } .thumb img { max-width: 100%; max-height: 100%; }
body.center { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login { width: 360px; } .login.wide { width: 460px; } .login h1 { margin-bottom: 14px; font-size: 20px; } .login label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.login input { display: block; width: 100%; margin-top: 3px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
code { background: #f1ede6; padding: 1px 4px; border-radius: 3px; }
@media (max-width: 760px) { .top { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 6px; } .top .who { display: none; } .grid2 { grid-template-columns: 1fr; } .grid2 .span2 { grid-column: auto; } .search { margin-left: 0; width: 100%; } .search input { width: 100%; } table.list th:nth-child(3), table.list td:nth-child(3) { display: none; } }
.top nav a.admin { color: #f3c98b; }
.cnt { display: inline-block; padding: 1px 8px; border-radius: 10px; background: #e7f3e8; color: #1b5e20; font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.cnt.full { background: #fdecea; color: #8e1c1c; }
tr.off td { opacity: .55; }
details.pw { display: inline-block; position: relative; } details.pw summary { list-style: none; } details.pw summary::-webkit-details-marker { display: none; }
details.pw form { position: absolute; right: 0; top: 34px; z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 8px; display: flex !important; gap: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
details.pw input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; font: inherit; width: 170px; }
.team { display: inline-flex; gap: 8px; flex-wrap: wrap; } .team span { white-space: nowrap; }
td select:disabled { opacity: .7; }
/* Marke holzwerki */
.marke { font-weight: 800; letter-spacing: -.015em; }
.marke .ki { color: #0d9488; }
.top .brand { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; text-decoration: none !important; }
.top .marke { color: #f3e3c9; } .top .marke .ki { color: #2dd4bf; }
.login h1 { display: flex; align-items: center; gap: 10px; font-size: 24px; } .login h1 .marke { color: #4e342e; }
svg.mark { flex: none; }

/* ---------- Firmendaten ---------- */
.head .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.firmdaten { max-width: 900px; } .firmdaten h2 { font-size: 15px; margin: 18px 0 8px; color: #5d4037; } .firmdaten small.hint { display: block; margin-top: 3px; font-size: 11.5px; }

/* ---------- Briefbogen-Editor ---------- */
.vl-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: #fff; border: 1px solid #e6e0d6; border-radius: 8px; padding: 8px; position: sticky; top: 0; z-index: 5; }
.vl-bar .seg { display: inline-flex; } .vl-bar .seg .btn { border-radius: 0; } .vl-bar .seg .btn:first-child { border-radius: 6px 0 0 6px; } .vl-bar .seg .btn:last-child { border-radius: 0 6px 6px 0; margin-left: -1px; }
.vl .btn.on { background: #5d4037; color: #fff; border-color: #5d4037; }
.vl-bar .sep { width: 1px; height: 24px; background: #e6e0d6; margin: 0 4px; } .vl-bar .grow { flex: 1; }
.vl-bar .chk { font-size: 13px; display: inline-flex; align-items: center; gap: 4px; color: #555; }
.vl-bar .pulse { box-shadow: 0 0 0 3px #f5b94155; }
.vl-main { display: grid; grid-template-columns: 1fr 330px; gap: 12px; margin-top: 10px; align-items: start; }
.vl-stage { background: #8d8a84; border-radius: 8px; padding: 16px; overflow: auto; min-height: 400px; }
.vl-wrap { margin: 0 auto; position: relative; box-shadow: 0 4px 18px rgba(0,0,0,.35); }
.vl-page { position: absolute; left: 0; top: 0; width: 210mm; height: 297mm; background: #fff; transform-origin: 0 0; color: #222; overflow: hidden; user-select: none; }
.vl-page .el { position: absolute; overflow: hidden; white-space: pre-wrap; box-sizing: border-box; cursor: move; }
.vl-page .el:hover { outline: 1px dashed #0d9488; }
.vl-page .el.sel { outline: 1.5px solid #0d9488; overflow: visible; z-index: 3; }
.vl-page .el.linie { min-height: 1px; } .vl-page .el.linie:hover, .vl-page .el.linie.sel { outline-offset: 2px; }
.vl-page .el .rs { position: absolute; right: -5px; bottom: -5px; width: 10px; height: 10px; background: #0d9488; border: 2px solid #fff; border-radius: 2px; cursor: nwse-resize; }
.vl-page .el .tag { position: absolute; right: 0; top: -14px; font: 600 9px Arial; background: #0d9488; color: #fff; padding: 1px 4px; border-radius: 3px; display: none; }
.vl-page .el.sel .tag, .vl-page .el.alle:hover .tag { display: block; }
.vl-page .el .ph { width: 100%; height: 100%; border: 1.5px dashed #b9ad9b; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #8a7d6b; font: 10pt Arial; text-align: center; background: #faf7f2; }
.vl-page mark { background: #ccfbf1; color: #0f766e; border-radius: 2px; } .vl-page .tab { color: #0d9488; padding: 0 3px; }
.vl-page .g-body { position: absolute; border: 1px dashed #93c5fd; background: #eff6ff66; pointer-events: auto; }
.vl-page .g-body span, .vl-page .g-line span, .vl-page .g-win span { position: absolute; left: 4px; top: 3px; font: 9pt Arial; color: #60a5fa; }
.vl-page .g-line { position: absolute; border-top: 1px dashed #60a5fa; } .vl-page .g-line span { top: 2px; left: auto; right: 2px; font-size: 8pt; }
.vl-page .g-win { position: absolute; border: 1px dotted #c4b5a5; } .vl-page .g-win span { top: auto; bottom: 2px; color: #b8a994; font-size: 8pt; }
.vl-page .g-fold { position: absolute; left: 0; width: 5mm; border-top: 1px solid #c4b5a5; }
.vl-side { background: #fff; border: 1px solid #e6e0d6; border-radius: 8px; padding: 12px 14px; position: sticky; top: 64px; max-height: calc(100vh - 80px); overflow: auto; font-size: 13px; }
.vl-side h3 { margin: 0 0 10px; font-size: 16px; } .vl-side h4 { margin: 14px 0 6px; font-size: 13px; color: #5d4037; }
.vl-side .pg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.vl-side label { display: block; color: #6b5f52; font-size: 12px; } .vl-side label.blk { margin-top: 8px; }
.vl-side input:not([type=checkbox]):not([type=color]), .vl-side select, .vl-side textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 5px 7px; border: 1px solid #d6cfc4; border-radius: 5px; margin-top: 2px; }
.vl-side textarea { font-family: ui-monospace, Consolas, monospace; font-size: 12px; tab-size: 12; resize: vertical; }
.vl-side input[type=color] { width: 100%; height: 30px; padding: 0 2px; border: 1px solid #d6cfc4; border-radius: 5px; margin-top: 2px; }
.vl-side .ph-sel { margin-top: 4px !important; font-size: 12px !important; color: #0f766e; }
.vl-side .tg, .vl-side .btns { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; } .vl-side .tg .sep { width: 6px; }
.vl-side .hint { font-size: 11.5px; }
@media (max-width: 1000px) { .vl-main { grid-template-columns: 1fr; } .vl-side { position: static; max-height: none; } }
/* SPIRIT-Import auf der Projektliste */
.sp-dlg { border: 0; border-radius: 10px; padding: 0; width: min(560px, 94vw); box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.sp-dlg::backdrop { background: rgba(30,20,10,.45); }
.sp-dlg form { padding: 18px 20px; } .sp-dlg h2 { margin: 0 0 6px; }
.sp-dlg label { display: block; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.sp-dlg label.row { display: flex; gap: 6px; align-items: center; color: var(--text); margin: 6px 0 0; }
.sp-dlg input:not([type=radio]) { width: 100%; box-sizing: border-box; }
.sp-dlg fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 12px 0 0; padding: 4px 12px 10px; } .sp-dlg legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.sp-hits { max-height: 170px; overflow: auto; margin-top: 4px; } .sp-hits small { color: var(--muted); }
#sp-such, #sp-neu { margin: 2px 0 4px 24px; }
[hidden] { display: none !important; }
