:root {
  --gold: #c9a24a; --gold-d: #a8842f; --gold-l: #f6efdd;
  --dark: #2b2b2b; --dark2: #353535; --dark3: #444;
  --bg: #f4f3f0; --card: #fff; --line: #e4e1da; --text: #222; --muted: #7a7670;
  --ok: #3f8f5a; --warn: #c7862a; --err: #b8483e; --info: #3d6f9e;
  --r: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--gold-d); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 26px; margin: 0 0 4px; } h2 { font-size: 18px; margin: 0 0 12px; } h3 { font-size: 15px; margin: 16px 0 8px; }
.muted { color: var(--muted); } .small, small { font-size: 12.5px; } .r { text-align: right; } .nowrap { white-space: nowrap; } .mt { margin-top: 18px; } .hidden { display: none !important; }

/* Sidebar */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; background: var(--dark); color: #ddd; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; flex-direction: column; gap: 4px; padding: 20px 20px 14px; border-bottom: 1px solid var(--dark3); }
.brand img { max-width: 180px; max-height: 56px; object-fit: contain; object-position: left; }
.brand span { color: var(--gold); font-size: 11px; letter-spacing: 3px; text-transform: uppercase; }
.sidebar nav { flex: 1; overflow-y: auto; padding: 10px 10px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; color: #d8d8d8; padding: 8px 12px; border-radius: 8px; font-size: 14.5px; }
.sidebar nav a:hover { background: var(--dark2); text-decoration: none; color: #fff; }
.sidebar nav a.active { background: var(--gold); color: #1d1d1d; font-weight: 600; }
.sidebar .ic { width: 18px; text-align: center; opacity: .85; }
.sidebar .sect { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.6px; color: var(--gold); margin: 16px 12px 6px; }
.me { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--dark3); }
.me > div { flex: 1; min-width: 0; } .me strong { display: block; color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .me small { color: #999; }
.me a, .me button { background: none; border: 0; color: #bbb; font-size: 17px; cursor: pointer; padding: 4px; } .me a:hover, .me button:hover { color: var(--gold); }
.burger { display: none; }
.content { margin-left: 248px; padding: 28px 34px 60px; max-width: 1500px; }

/* Bausteine */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.card.accent { border-top: 4px solid var(--gold); }
.cardhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; } .cardhead h1, .cardhead h2 { margin: 0; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; } .pagehead p { margin: 4px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .actions form { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid2 > .card, .grid3 > .card { margin-bottom: 0; } .grid2, .grid3 { margin-bottom: 18px; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--text); cursor: pointer; font: inherit; font-size: 14px; white-space: nowrap; }
.btn:hover { border-color: var(--gold); text-decoration: none; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #1d1d1d; font-weight: 600; } .btn.primary:hover { background: var(--gold-d); color: #fff; }
.btn.danger { color: var(--err); } .btn.danger:hover { border-color: var(--err); }
.btn.small { padding: 4px 10px; font-size: 13px; } .btn.wide { width: 100%; justify-content: center; }
.link { background: none; border: 0; cursor: pointer; color: var(--gold-d); font: inherit; padding: 0; } .link.danger { color: var(--err); }
summary.btn { list-style: none; } summary::-webkit-details-marker { display: none; }

.form label { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: #444; flex: 1; }
.form label small { font-weight: 400; }
input, select, textarea { width: 100%; padding: 9px 11px; border: 1px solid #d6d2ca; border-radius: 8px; font: inherit; font-size: 14.5px; background: #fff; margin-top: 4px; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold-l); border-color: var(--gold); }
input[type=checkbox] { width: auto; margin: 0 6px 0 0; } input[type=color] { width: 60px; height: 38px; padding: 2px; }
label.check { display: inline-flex !important; align-items: center; font-weight: 400 !important; margin-right: 16px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; } .row > label { min-width: 160px; }
.form.narrow { max-width: 620px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 12px; padding: 8px 12px; } legend { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 4px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; } .filters input, .filters select { width: auto; margin: 0; } .filters input[name=q] { min-width: 260px; }
form.inline { display: inline; }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; background: #e8f4ec; color: #245b37; border: 1px solid #c4e2cf; }
.flash.error { background: #fbecea; color: #8a2d25; border-color: #f0c9c4; }

.table { width: 100%; border-collapse: collapse; } .table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 2px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; } .table tfoot td { border: 0; font-weight: 600; }
.table.compact td { padding: 6px 8px; } tr.rowlink { cursor: pointer; } tr.rowlink:hover td { background: #faf8f3; } tr.past td { color: var(--muted); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; background: #eee; color: #555; white-space: nowrap; }
.b-entwurf, .b-geplant, .b-neu { background: #ece9e2; color: #5c574e; }
.b-versendet, .b-kontaktiert, .b-in_arbeit, .b-besichtigung { background: #e3ecf6; color: var(--info); }
.b-angenommen, .b-bezahlt, .b-eingestellt, .b-gewonnen, .b-abgeschlossen { background: #e3f1e7; color: var(--ok); }
.b-abgelehnt, .b-ueberfaellig, .b-verloren, .b-storniert { background: #f8e4e1; color: var(--err); }
.b-gespraech, .b-probearbeit, .b-angebot, .b-pausiert, .b-offen { background: var(--gold-l); color: #86661f; }
.b-abgerechnet { background: var(--dark); color: var(--gold); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 4px; background: #f0eee9; font-size: 12px; color: #666; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; } .tabs a.active { color: var(--text); border-color: var(--gold); font-weight: 600; } .tabs a:hover { text-decoration: none; color: var(--text); }
.tabs small { background: #ece9e2; border-radius: 10px; padding: 0 6px; margin-left: 4px; }
.subnav { display: inline-flex; background: #e9e6df; border-radius: 9px; padding: 3px; margin-bottom: 14px; } .subnav a { padding: 6px 14px; border-radius: 7px; color: #555; } .subnav a.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); } .subnav a:hover { text-decoration: none; }
.dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 0 0 12px; } .dl dt { color: var(--muted); font-size: 13px; } .dl dd { margin: 0; }
.prose p { margin: 0 0 10px; } .prose.clamp { max-height: 4.6em; overflow: hidden; }
.list { list-style: none; padding: 0; margin: 0; } .list li { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); } .list li:last-child { border: 0; } .list li > div { flex: 1; }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: 0 0 10px; }
.pin { margin-right: 6px; }
pre.code { background: var(--dark); color: #eee; padding: 12px; border-radius: 8px; font-size: 12.5px; overflow-x: auto; }

/* Start */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--dark); color: #ddd; border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; } .kpi:hover { text-decoration: none; background: var(--dark2); }
.kpi b { font-size: 30px; color: var(--gold); line-height: 1.1; } .kpi span { font-size: 13px; } .kpi small { color: #999; }
.newsitem { padding: 8px 0; border-bottom: 1px solid var(--line); } .newsitem h3 { margin: 0; font-size: 15px; } .newsitem:last-child { border: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tile { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 2px; color: var(--text); background: #fcfbf8; }
.tile:hover { border-color: var(--gold); text-decoration: none; box-shadow: 0 2px 8px rgba(201,162,74,.15); } .tileic { font-size: 24px; } .tile small { color: var(--muted); }

/* Mitarbeiter */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.person { display: flex; gap: 14px; margin: 0; } .person.inactive { opacity: .5; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--dark); color: var(--gold); display: grid; place-items: center; font-weight: 700; flex: 0 0 48px; }

/* Aufträge */
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.folder { display: flex; flex-direction: column; gap: 4px; color: var(--text); border-top: 5px solid var(--gold); margin: 0; } .folder:hover { text-decoration: none; box-shadow: 0 3px 12px rgba(0,0,0,.08); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.thumb { border: 1px solid var(--line); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.thumb img { width: 100%; height: 100px; object-fit: cover; border-radius: 5px; display: block; } .thumb small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fileic { display: grid; place-items: center; height: 100px; font-size: 40px; background: #f6f4ef; border-radius: 5px; }
.log { list-style: none; padding: 0; margin: 0; } .log li { padding: 8px 0 8px 14px; border-left: 2px solid var(--gold-l); margin-left: 4px; }

/* Plantafel */
.planbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; } .planbar strong { font-size: 16px; margin: 0 6px; }
.seg { display: inline-flex; background: #e9e6df; border-radius: 8px; padding: 3px; margin-left: auto; } .seg a { padding: 5px 14px; border-radius: 6px; color: #555; } .seg a.active { background: #fff; color: var(--text); font-weight: 600; }
.board-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.board { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 980px; }
.board th { background: var(--dark); color: #eee; font-weight: 600; font-size: 13px; padding: 9px 6px; text-align: left; } .board th a { color: #eee; } .board th.today { background: var(--gold); } .board th.today a { color: #1d1d1d; }
.board td.cell:last-child { background-color: #faf9f6; }
.board .rescol { width: 190px; padding: 8px 10px; font-size: 13.5px; border-right: 1px solid var(--line); }
.board tr.group td { background: #f0ede6; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #6d675d; padding: 5px 10px; }
.board td { border-bottom: 1px solid var(--line); vertical-align: top; }
.board td.cell { border-left: 1px solid var(--line); padding: 4px; height: 56px; position: relative; }
.board td.cell.today { background: #fffaf0; } .board td.cell.over { outline: 2px dashed var(--gold); outline-offset: -3px; }
.board td.cell.absent { background: repeating-linear-gradient(45deg, #f6f3ee, #f6f3ee 6px, #efebe3 6px, #efebe3 12px); }
.board td.cell.conflict { box-shadow: inset 0 0 0 2px var(--err); }
.chip { display: flex; align-items: center; gap: 4px; background: color-mix(in srgb, var(--c) 16%, #fff); border-left: 4px solid var(--c); border-radius: 5px; padding: 3px 5px; font-size: 12px; margin-bottom: 3px; line-height: 1.25; }
.chip a, .chip span { color: #222; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .chip[draggable=true] { cursor: grab; }
.chip small { font-size: 10px; background: #fff; border-radius: 3px; padding: 0 3px; } .chip form, .abs form { margin: 0; }
.x { background: none; border: 0; color: #999; cursor: pointer; font-size: 14px; padding: 0 2px; line-height: 1; } .x:hover { color: var(--err); }
.abs { font-size: 11.5px; font-weight: 600; color: #8a6a2a; display: flex; justify-content: space-between; }
.add { display: none; position: absolute; bottom: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--gold); color: #1d1d1d; cursor: pointer; font-weight: 700; }
.board td.cell:hover .add { display: block; }
.daygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; } .dayres { margin: 0; } .dayres.absent { opacity: .7; }
.dayitem { border-left: 4px solid var(--gold); padding: 6px 10px; margin-bottom: 8px; background: #faf9f6; border-radius: 0 6px 6px 0; }
.resrow { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; } .resrow input, .resrow select { width: auto; flex: 1; min-width: 90px; margin: 0; padding: 6px 8px; font-size: 13.5px; } .resrow.inactive { opacity: .5; }
dialog { border: 0; border-radius: 12px; padding: 22px 24px; width: min(520px, 94vw); box-shadow: 0 20px 50px rgba(0,0,0,.25); } dialog::backdrop { background: rgba(30,30,30,.5); }

/* Bewerber */
.kanban { display: grid; grid-template-columns: repeat(6, minmax(170px, 1fr)); gap: 12px; overflow-x: auto; }
.kanban .col { background: #ebe8e1; border-radius: var(--r); padding: 10px; min-height: 200px; } .kanban h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.kcard { display: flex; flex-direction: column; background: #fff; border-radius: 8px; padding: 10px; margin-bottom: 8px; color: var(--text); border-left: 3px solid var(--gold); } .kcard:hover { text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.stars { color: var(--gold); }
.lead .prose { margin: 6px 0; }

/* Login */
.loginbody { min-height: 100vh; display: grid; place-items: center; background: var(--dark) radial-gradient(circle at 20% 10%, #3a3a3a, #232323); }
.login { width: min(380px, 92vw); padding: 30px; border-top: 4px solid var(--gold); } .login h1 { text-align: center; font-weight: 300; letter-spacing: 3px; text-transform: uppercase; font-size: 18px; color: var(--muted); margin-bottom: 18px; }
.login label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.loginlogo { display: block; margin: 0 auto 6px; max-width: 220px; max-height: 70px; background: var(--dark); padding: 10px 14px; border-radius: 8px; }

@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, 1fr); } .grid3 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; } #navtoggle:checked ~ .sidebar { transform: none; }
  .burger { display: block; position: fixed; top: 10px; left: 10px; z-index: 30; background: var(--dark); color: var(--gold); width: 40px; height: 40px; border-radius: 8px; text-align: center; line-height: 40px; font-size: 20px; cursor: pointer; }
  .content { margin-left: 0; padding: 62px 14px 40px; } .grid2 { grid-template-columns: 1fr; } .kpis { grid-template-columns: repeat(2, 1fr); }
  .filters input[name=q] { min-width: 0; flex: 1; }
}
@media print { .sidebar, .burger, .actions, .planbar .btn, .seg, .x { display: none !important; } .content { margin: 0; padding: 0; } }
