@font-face { font-family: Lato; src: url(fonts/Lato-Regular.ttf); font-weight: 400; }
@font-face { font-family: Lato; src: url(fonts/Lato-Bold.ttf); font-weight: 700; }
@font-face { font-family: Montserrat; src: url(fonts/Montserrat-SemiBold.ttf); font-weight: 600; }
@font-face { font-family: Montserrat; src: url(fonts/Montserrat-Bold.ttf); font-weight: 700; }

:root {
  /* Zimmerei Mandt: Rot aus dem Hahn-Logo */
  --brand: #e00a1d;
  --brand-dark: #a80816;
  --brand-soft: #fde7e9;
  --bg: #f4f5f2;
  --panel: #ffffff;
  --text: #23261d;
  --muted: #6c7163;
  --line: #e1e4d8;
  --danger: #c0392b;
  --danger-soft: #fbeae8;
  --warn: #b7791f;
  --warn-soft: #fdf3e2;
  --ok: #3f8f3a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Lato, system-ui, sans-serif; font-size: 14px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: Montserrat, Lato, sans-serif; font-weight: 700; margin: 0; }
h1 { font-size: 22px; }
h2 { font-size: 16px; margin-bottom: 12px; }
h3 { font-size: 14px; margin-bottom: 8px; }
a { color: var(--brand-dark); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* Layout */
.shell { display: grid; grid-template-columns: 220px 1fr; height: 100vh; }
.side { background: #262b33; color: #e9ecdf; display: flex; flex-direction: column; padding: 18px 12px; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; }
.sidemenu { display: contents; }
.menubtn { display: none; }
.brand { font-family: Montserrat; font-weight: 700; font-size: 15px; padding: 4px 10px 18px; line-height: 1.3; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 40px; height: 40px; border-radius: 10px; background: #fff; padding: 3px; flex: none; }
.brand span { display: block; color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 999px; color: #d6dac9; text-decoration: none; cursor: pointer; margin-bottom: 2px; }
.nav a:hover { background: rgba(255,255,255,.07); }
.nav a.active { background: var(--brand); color: #fff; font-weight: 700; }
.nav svg { width: 18px; height: 18px; flex: none; }
.side .foot { margin-top: auto; font-size: 14px; color: #a3a896; padding: 10px; }
.side .foot b { color: #e9ecdf; display: block; font-size: 14px; }
.side .foot button { margin-top: 8px; }
.main { overflow: auto; padding: 24px 28px 60px; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.topbar h1 { margin-right: auto; }

/* Panels */
.panel { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; }
.grid { display: grid; gap: 12px 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split-1-2 { grid-template-columns: 1fr 2fr; gap: 16px; }
.split-1-1 { grid-template-columns: 1fr 1fr; gap: 16px; }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
.span4 { grid-column: 1 / -1; }

/* Form */
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); font-weight: 700; }
input, select, textarea { font: inherit; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: #fff; width: 100%; }
textarea { resize: vertical; min-height: 60px; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(var(--brand-rgb, 61,74,92),.35); border-color: var(--brand); }
input[readonly], input:disabled, select:disabled, textarea:disabled { background: #f6f7f2; color: #555; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
.check input { width: auto; }

/* Buttons */
.btn { font: inherit; font-weight: 700; border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 999px; padding: 7px 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.danger { color: var(--danger); border-color: #e7c2bd; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 4px 10px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; }
.iconbtn { border: none; background: none; cursor: pointer; padding: 4px; border-radius: 6px; color: var(--muted); }
.iconbtn:hover { background: var(--brand-soft); color: var(--text); }

/* Table */
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--line); background: #fafbf7; position: sticky; top: 0; }
table.list td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tbody tr { cursor: pointer; }
table.list tbody tr:hover { background: #f8faf0; }
table.list .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* Badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 14px; font-weight: 700; background: #eceee6; color: #555; }
.badge.draft { background: var(--warn-soft); color: var(--warn); }
.badge.final { background: var(--brand-soft); color: var(--brand-dark); }
.badge.cancelled { background: var(--danger-soft); color: var(--danger); }
.badge.type { background: #e8eef7; color: #3a5a8c; }

/* Positionen */
.items { width: 100%; border-collapse: collapse; }
.items th { font-size: 14px; text-transform: uppercase; color: #fff; background: var(--brand); padding: 7px 6px; text-align: left; }
.items th:first-child { border-radius: 8px 0 0 0; }
.items th:last-child { border-radius: 0 8px 0 0; }
.items td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.items td input, .items td select, .items td textarea { padding: 5px 7px; }
.items td textarea { min-height: 32px; margin-top: 4px; font-size: 14px; color: #555; }
.items tr.text td { background: #fafbf5; }
.items .pos { color: var(--muted); font-weight: 700; padding-top: 12px; width: 34px; }
.items .num input { text-align: right; }
.items .sum { text-align: right; font-weight: 700; padding-top: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.items .tools { white-space: nowrap; width: 96px; padding-top: 8px; }
.items .lohn { font-size: 14px; color: var(--brand-dark); margin-top: 4px; }
.addrow { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.richtext { margin-top: 4px; }
.richtext-body { min-height: 32px; font-size: 14px; color: #555; white-space: pre-wrap; word-wrap: break-word;
  border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; background: #fff; }
.richtext-body:focus { outline: 2px solid rgba(var(--brand-rgb, 61,74,92),.35); border-color: var(--brand); }
.richtext-body:empty:before { content: attr(data-placeholder); color: #9a9a90; }

.richtext-flyout { position: absolute; z-index: 500; display: flex; gap: 2px; background: #2c2e28; padding: 4px; border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.richtext-flyout button { width: auto; padding: 4px 10px; font-size: 13px; line-height: 1.3; border-radius: 5px; background: transparent; color: #fff; cursor: pointer; }
.richtext-flyout button:hover { background: rgba(255,255,255,.18); }

.totals { margin-left: auto; width: 380px; margin-top: 14px; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; font-variant-numeric: tabular-nums; }
.totals .grand { font-family: Montserrat; font-weight: 700; font-size: 16px; border-top: 2px solid var(--brand); border-bottom: 2px solid var(--brand); padding: 8px 0; margin-top: 4px; }

/* Hinweise */
.alert { border-radius: 8px; padding: 10px 14px; margin: 8px 0; font-size: 14px; }
.alert.err { background: var(--danger-soft); color: #8e2a20; }
.alert.warn { background: var(--warn-soft); color: #7a5214; }
.alert.info { background: var(--brand-soft); color: #4b5a10; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }

/* Modal / Drawer */
.overlay { position: fixed; inset: 0; background: rgba(30,34,22,.45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 20px; z-index: 50; overflow: auto; }
.modal { background: #fff; border-radius: 14px; width: min(720px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.25); padding: 22px 24px; }
.modal.wide { width: min(980px, 100%); }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.modal h2 { margin-bottom: 14px; }

/* Login */
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.card { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 32px; width: min(420px, 100%); }
.card h1 { margin-bottom: 4px; }
.card .logo { width: 88px; height: 88px; margin-bottom: 16px; }
.card .logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.card form > * + * { margin-top: 12px; }

/* Toasts */
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: #262b33; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: 420px; }
.toast.err { background: var(--danger); }

/* Suchliste (Artikel-/Kundenauswahl) */
.picker { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 10px; }
.picker div { padding: 8px 12px; border-bottom: 1px solid var(--line); cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
.picker div:hover, .picker div.sel { background: var(--brand-soft); }
.logo-prev { max-height: 70px; max-width: 260px; border: 1px dashed var(--line); padding: 6px; border-radius: 8px; background: #fff; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 12px; font-size: 14px; }
.kv div:nth-child(odd) { color: var(--muted); }
.dirty { color: var(--warn); font-size: 14px; font-weight: 700; }

/* Firmen-Umschalter */
.switch { display: flex; flex-direction: column; gap: 6px; margin: 0 4px 18px; padding: 8px; background: rgba(255,255,255,.06); border-radius: 12px; }
.switch .sw { display: flex; align-items: center; gap: 10px; font: inherit; font-weight: 700; text-align: left; color: #d6dac9; background: transparent;
  border: 1px solid transparent; border-radius: 999px; padding: 7px 12px; cursor: pointer; }
.switch .sw i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.15); }
.switch button.sw:hover { background: rgba(255,255,255,.07); }
.switch .sw.on { background: var(--c); color: #fff; }
.switch .sw.on i { background: #fff; }
.switch.single .sw { cursor: default; }
.lh-prev { width: 150px; aspect-ratio: 210/297; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.lh-empty { width: 150px; aspect-ratio: 210/297; border: 1px dashed var(--line); border-radius: 6px; display: grid; place-items: center; color: var(--muted); font-size: 14px; text-align: center; padding: 8px; }
.placeholders code { background: var(--brand-soft); padding: 1px 6px; border-radius: 4px; margin: 0 2px; font-size: 14px; }
.sw-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; margin-bottom: 10px; }
.grow { flex: 1; }
.contact-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: #fafbf8; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--text); }
.bulkbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border-radius: 10px; background: var(--brand-soft); flex-wrap: wrap; }
table.list td.cb, table.list th.cb { width: 32px; padding-right: 0; }
table.list td.cb input, table.list th.cb input { width: 16px; height: 16px; }

/* Symbol-Knöpfe (Positionen verschieben/löschen) */
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; }
.iconbtn svg { width: 18px; height: 18px; display: block; flex: none; }
.iconbtn.del { color: #b0473d; }
.iconbtn.del:hover { background: var(--danger-soft); color: var(--danger); }
.tabs { display: flex; gap: 4px; margin-bottom: -1px; }
.tab { font: inherit; font-weight: 700; border: none; background: transparent; color: var(--muted); padding: 10px 18px; border-radius: 10px 10px 0 0; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.on { background: var(--panel); color: var(--brand-dark); box-shadow: 0 -2px 0 var(--brand) inset; }
.doc-tabs .tab { display: inline-flex; align-items: center; gap: 8px; background: var(--tab-bg); color: var(--tab-fg); opacity: .78; }
.doc-tabs .tab svg { width: 18px; height: 18px; flex: none; }
.doc-tabs .tab:hover { opacity: 1; color: var(--tab-fg); }
.doc-tabs .tab.on { opacity: 1; background: var(--tab-bg); color: var(--tab-fg); box-shadow: 0 -3px 0 var(--tab-fg) inset; }
.tab-offers { --tab-bg: #e7f0fb; --tab-fg: #2c64a8; }
.tab-invoices { --tab-bg: #e5f4ea; --tab-fg: #23774a; }
.tab-orders { --tab-bg: #fcf1dd; --tab-fg: #9a6512; }
.tab-deliveries { --tab-bg: #efeaf9; --tab-fg: #5f46a8; }
.items tr.title td { background: var(--brand-soft); }
.items tr.title .pos { color: var(--brand-dark); }
.items tr.optrow td { opacity: .7; }
.items .flags { display: flex; gap: 14px; flex-wrap: wrap; }
.related a { display: flex; justify-content: space-between; gap: 10px; padding: 6px 8px; border-radius: 8px; text-decoration: none; color: var(--text); cursor: pointer; }
.related a:hover { background: var(--brand-soft); }

/* WebApp / kleinere Bildschirme: Seitenleiste wird zur oberen, horizontal scrollbaren Leiste, Tabellen scrollen statt zu überlaufen */
.panel { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 980px) {
  .shell { display: flex; flex-direction: column; height: auto; min-height: 100vh; }
  .side { flex-direction: column; align-items: stretch; gap: 0; padding: 10px 14px; overflow: visible; position: sticky; top: 0; z-index: 40; }
  .sidebar-top { width: 100%; }
  .side .brand { padding: 6px 0; white-space: nowrap; }
  .menubtn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; border: none;
    background: rgba(255,255,255,.08); color: #e9ecdf; cursor: pointer; flex: none; }
  .menubtn:hover { background: rgba(255,255,255,.15); }
  .menubtn svg { width: 22px; height: 22px; }
  .sidemenu { display: none; }
  .side.open .sidemenu { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; padding-bottom: 6px; }
  .switch { flex-direction: column; margin: 0 0 6px; padding: 4px; flex: none; gap: 4px; }
  .switch.single { padding: 8px 10px; }
  .switch .sw span { white-space: nowrap; }
  .nav { display: flex; flex-direction: column; gap: 2px; }
  .nav a { padding: 12px 12px; white-space: nowrap; }
  .side .foot { margin-top: 10px; margin-left: 0; display: block; border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; }
  .side .foot div { margin-top: 8px !important; }
  .main { padding: 16px; }
  .grid.g4, .grid.g2, .grid.g3 { grid-template-columns: 1fr 1fr; }
  .span3 { grid-column: span 2; }
  h1 { font-size: 19px; }
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .tabs .tab { flex: none; }
}
@media (max-width: 600px) {
  .grid.g4, .grid.g2, .grid.g3 { grid-template-columns: 1fr; }
  .span2, .span3, .span4 { grid-column: auto; }
  .topbar { gap: 8px; }
  .modal { width: 96vw !important; max-width: 96vw !important; }
}
.related a.cur { background: var(--brand-soft); font-weight: 700; }

/* Handy: Listen-Tabellen werden zu Karten statt seitlich zu scrollen */
@media (max-width: 760px) {
  .topbar { flex-direction: row; }
  .topbar h1 { width: 100%; margin-right: 0; }
  .panel { padding: 12px; }
  .split-1-2, .split-1-1 { grid-template-columns: 1fr; gap: 12px; }
  table.list thead { display: none; }
  table.list, table.list tbody, table.list tr, table.list td { display: block; width: 100%; }
  table.list tbody tr { border: 1px solid var(--line); border-radius: 10px; padding: 4px 12px; margin-bottom: 10px; background: #fff; box-shadow: var(--shadow); }
  table.list tbody tr:hover { background: #fff; }
  table.list td { border-bottom: 1px dashed var(--line); padding: 7px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; text-align: right; }
  table.list td:last-child { border-bottom: none; }
  table.list td[data-label]::before { content: attr(data-label) ":"; font-weight: 700; color: var(--muted); text-align: left; margin-right: auto; font-size: 14px; text-transform: uppercase; letter-spacing: .03em; flex: none; }
  table.list td:not([data-label]) { justify-content: flex-end; }
  table.list td.cb { justify-content: flex-start; border-bottom: none; padding-bottom: 0; }
  table.list tr:has(> td.empty) { border: none; box-shadow: none; background: transparent; padding: 0; }
  table.list td.empty { text-align: center; padding: 30px 0; }
  .bulkbar { flex-direction: column; align-items: stretch; }
  .bulkbar > span { text-align: center; }
  .kv { grid-template-columns: 1fr; }
  .kv div:nth-child(odd) { padding-top: 6px; }
  .totals { width: 100%; }
}

/* Textbausteine im Beleg */
.tb-list { display: flex; flex-direction: column; gap: 8px; }
.tb-row { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fafbf8; }
.tb-row.on { background: var(--brand-soft); border-color: rgba(var(--brand-rgb), .35); }
.tb-main { flex: 1; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; min-width: 0; }
.tb-main input { margin-top: 3px; flex: none; width: auto; }
.tb-main > span { flex: 1; min-width: 0; color: var(--text); }
.tb-body { white-space: pre-line; margin-top: 3px; }
.tb-pos { width: 170px; flex: none; }
.tb-auto { display: flex; flex-wrap: wrap; gap: 6px 18px; }
@media (max-width: 700px) { .tb-row { flex-direction: column; } .tb-pos { width: 100%; } }

/* Kundenportal */
.portal { min-height: 100vh; background: var(--bg, #f4f4f1); }
.portal-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 28px; background: var(--brand); color: #fff; }
.portal-head .muted { color: rgba(255,255,255,.75); }
.portal-brand { font-family: Montserrat, sans-serif; font-weight: 700; font-size: 18px; }
.portal-user { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.portal-user .btn { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }
.portal-main { max-width: 1100px; margin: 0 auto; padding: 24px 28px 40px; }
.portal-main h1 { margin: 4px 0 16px; }
.portal-main tbody tr { cursor: pointer; }
.portal-foot { text-align: center; margin-top: 18px; }
@media (max-width: 700px) { .portal-head, .portal-main { padding-left: 16px; padding-right: 16px; } }

/* Firmenname unter der Versionsnummer */
.side .foot .foot-company { margin-top: 4px; color: #e9ecdf; font-weight: 700; }

/* Übersicht (Dashboard) */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 16px; }
.dash-card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; border-left: 4px solid var(--brand-soft); }
.dash-card.link { cursor: pointer; }
.dash-card.link:hover { border-left-color: var(--brand); }
.dash-card.warn { border-left-color: var(--danger); }
.dash-card.warn .dash-value { color: var(--danger); }
.dash-title { font-size: 14px; color: var(--muted); font-weight: 700; }
.dash-value { font-family: Montserrat, Lato, sans-serif; font-size: 24px; font-weight: 700; margin: 6px 0 2px; }
.dash-sub { font-size: 14px; color: var(--muted); }
.dash-cols { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; align-items: start; }
.dash-cols .list tr { cursor: pointer; }
@media (max-width: 980px) { .dash-cols { grid-template-columns: 1fr; } }

/* Hilfe */
.help-fab { position: fixed; right: 20px; bottom: 20px; width: 48px; height: 48px; border-radius: 50%; border: none; background: var(--brand); color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.2); cursor: pointer; display: grid; place-items: center; z-index: 60; }
.help-fab svg { width: 26px; height: 26px; }
.help-fab:hover, .help-fab.on { background: var(--brand-dark); }
.help ul { margin: 0; padding-left: 20px; line-height: 1.6; }
.help li + li { margin-top: 6px; }
#toasts { bottom: 80px; }
.main { padding-bottom: 84px; }

/* Artikel-Mehrfachauswahl */
.art-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.art-picker { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 10px; }
.art-row { display: grid; grid-template-columns: 22px 1fr auto 70px; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); cursor: pointer; margin: 0; font-weight: 400; color: var(--text); }
.art-row:hover, .art-row.sel { background: var(--brand-soft); }
.art-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; }
.art-row .art-qty { width: 70px; padding: 4px 6px; text-align: right; }
@media (max-width: 600px) { .art-row { grid-template-columns: 22px 1fr 60px; } .art-row > .nowrap { display: none; } }

/* Mein Konto / Benutzerrechte */
.side .foot .foot-me { display: block; color: inherit; text-decoration: none; cursor: pointer; border-radius: 8px; padding: 4px 6px; margin: -4px -6px 0; }
.side .foot .foot-me:hover, .side .foot .foot-me.on { background: rgba(255,255,255,.08); }
.tf-opt { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; margin-top: 10px; }
.tf-opt.on { border-color: var(--brand); background: var(--brand-soft); }
.steps { padding-left: 20px; line-height: 1.6; }
.steps li + li { margin-top: 10px; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; letter-spacing: 1px; background: #f6f6f2; border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; margin: 8px 0 4px; user-select: all; word-break: break-all; }
.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.area-cb { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; color: var(--text); cursor: pointer; }
.area-cb input { width: 17px; height: 17px; accent-color: var(--brand); margin: 0; }
.area-cb.dis { cursor: default; color: var(--muted); }

.qr{margin:10px 0 12px}
.qr img{display:block;width:200px;height:200px;image-rendering:pixelated;border:1px solid var(--line,#ddd);border-radius:8px;background:#fff}

/* Einstellungen als Akkordeon */
.acc { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.acc > summary { list-style: none; cursor: pointer; padding: 16px 20px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; user-select: none; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::before { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; align-self: center; flex: none; }
.acc[open] > summary::before { transform: rotate(45deg); }
.acc > summary:hover { background: var(--bg); }
.acc-title { font-weight: 700; font-size: 16px; }
.acc[open] > summary { border-bottom: 1px solid var(--line); }
.acc .panel.acc-sub { box-shadow: none; border-radius: 0; margin: 0; padding: 14px 20px 18px; }
.acc .panel.acc-sub + .panel.acc-sub { border-top: 1px solid var(--line); }
.acc .panel.acc-sub > h3 { margin: 0 0 10px; font-size: 14px; }

/* Trennlinie zwischen den Gruppen der Seitenleiste */
.nav-sep { height: 1px; background: rgba(255,255,255,.14); margin: 8px 14px; }

/* 1.6.0 */
.brand-txt { display: flex; flex-direction: column; min-width: 0; }
.brand .brand-date { color: #b9bdae; font-family: Lato, system-ui, sans-serif; font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; margin-top: 2px; white-space: nowrap; }
.te-when { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.te-when > :nth-child(1) { grid-column: 1 / 3; grid-row: 1; }
.te-when > :nth-child(2) { grid-column: 1; grid-row: 2; }
.te-when > :nth-child(3) { grid-column: 2; grid-row: 2; }
.te-fixed { padding: 7px 0; font-weight: 700; }
.badge.paused { background: #eceee6; color: #6b6f60; }
.badge.done { background: #e9e9e9; color: #8a8a8a; }
.dash-proj .proj-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.proj-row { display: grid; grid-template-columns: 120px 1fr 34px 80px; gap: 10px; align-items: center; padding: 5px 4px; border-radius: 8px; cursor: pointer; }
.proj-row:hover { background: var(--bg); }
.proj-bar { height: 10px; background: #eef0e8; border-radius: 99px; overflow: hidden; }
.proj-fill { display: block; height: 100%; border-radius: 99px; background: var(--muted); }
.proj-fill.st-active { background: var(--brand); }
.proj-fill.st-planned { background: var(--warn); }
.proj-fill.st-offered { background: #3a5a8c; }
.proj-n { text-align: right; font-weight: 700; }
.proj-h { text-align: right; }
@media (max-width: 760px) { .dash-proj .proj-cols { grid-template-columns: 1fr; } .proj-row { grid-template-columns: 105px 1fr 28px 70px; } }

/* 1.7.0 Abschlag nach Leistungsstand */
.prog-table input { padding: 4px 6px; }
.prog-table td { vertical-align: middle; }
