/* Amohr Portal — Design v1 (07.10.2026). Ruhig, hell, Sidebar dunkel, Akzent Terrakotta für Maler-Handwerk. */
:root {
  --ink: #1c1e21; --ink-2: #475569; --ink-3: #94a3b8;
  --bg: #f4f5f7; --panel: #ffffff; --line: #e2e8f0; --line-2: #cbd5e1;
  --side: #0f172a; --side-2: #1e293b; --side-text: #cbd5e1;
  --accent: #c2410c; --accent-2: #9a3412; --accent-soft: #ffedd5;
  --primary: #0f172a; --ok: #15803d; --ok-soft: #dcfce7; --warn: #b45309; --warn-soft: #fef3c7; --err: #b91c1c; --err-soft: #fee2e2; --info: #1d4ed8; --info-soft: #dbeafe;
  --r: 10px; --r-s: 6px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.08);
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Inter, Roboto, system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.45; font-variant-numeric: tabular-nums; }
a { color: var(--accent-2); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2 { font-size: 14px; margin: 0 0 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: 10px; justify-content: space-between; }
h3 { font-size: 13.5px; margin: 14px 0 6px; }
code { background: #f1f5f9; padding: 1px 6px; border-radius: 4px; font-size: 12.5px; }
pre { background: #0f172a; color: #e2e8f0; padding: 10px 12px; border-radius: var(--r-s); font-size: 12px; overflow: auto; }
small, .small { font-size: 12.5px; } .muted { color: var(--ink-3); } .right { text-align: right; } .center { text-align: center; } .nowrap { white-space: nowrap; } .inline { display: inline; }
.req { color: var(--warn); font-weight: 600; }
[hidden] { display: none !important; }

/* Shell */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.brand__mark { width: 36px; height: 36px; border-radius: 9px; background: var(--accent); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 18px; flex: none; }
.brand__text { line-height: 1.15; } .brand__text b { display: block; color: #fff; font-size: 14px; } .brand__text small { color: var(--ink-3); font-size: 11.5px; }
.brand--dark .brand__text b { color: var(--ink); }
.nav { padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav__item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--side-text); font-size: 14px; font-weight: 500; }
.nav__item:hover { background: var(--side-2); color: #fff; text-decoration: none; }
.nav__item.is-active { background: var(--accent); color: #fff; }
.nav__item .ic { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav__item small { display: block; font-size: 11px; color: var(--ink-3); }
.nav__item--muted { color: var(--ink-3); }
.sidebar__foot { padding: 10px; border-top: 1px solid var(--side-2); display: flex; flex-direction: column; gap: 2px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--side-2); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 12px 24px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.burger { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; width: 38px; height: 38px; font-size: 18px; cursor: pointer; }
.topsearch { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; }
.topsearch .ic { width: 16px; height: 16px; color: var(--ink-3); }
.topsearch input { flex: 1; border: 0; background: transparent; padding: 9px 0; font: inherit; outline: none; }
.topbar__actions { margin-left: auto; display: flex; gap: 8px; }
.content { padding: 22px 24px 60px; max-width: 1400px; width: 100%; }

/* Seitenkopf, Karten, Grid */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 12.5px; color: var(--ink-3); margin-bottom: 4px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card--table { padding: 0; overflow: auto; } .card--narrow { max-width: 760px; } .card--empty { text-align: center; padding: 40px; color: var(--ink-2); } .card--span2 { grid-column: span 2; }
.grid { display: grid; gap: 18px; } .grid--2 { grid-template-columns: 1fr 1fr; } .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--sidebar { grid-template-columns: minmax(0, 1fr) 320px; }
.grid > .card { margin-bottom: 0; } .grid { margin-bottom: 18px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 2px 12px; color: var(--ink); box-shadow: var(--shadow); }
.kpi:hover { text-decoration: none; border-color: var(--line-2); }
.kpi__icon { grid-row: span 2; width: 38px; height: 38px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; } .kpi__icon .ic { width: 20px; height: 20px; }
.kpi__val { font-size: 24px; font-weight: 800; line-height: 1; } .kpi__lbl { font-size: 12.5px; color: var(--ink-2); }

/* Tabellen */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 600; background: #fafbfc; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table--compact td { padding: 7px 8px; } .table--compact th { padding: 6px 8px; }
.row-link { cursor: pointer; } .row-link:hover td { background: #fafbfc; }
.is-inactive td { opacity: .55; }
.warn-list { display: flex; flex-wrap: wrap; gap: 4px; }

/* Pills */
.pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: #f1f5f9; color: var(--ink-2); white-space: nowrap; }
.pill--warn { background: var(--warn-soft); color: var(--warn); } .pill--ok { background: var(--ok-soft); color: var(--ok); } .pill--muted { background: #f1f5f9; }
.pill--typ-privat { background: var(--info-soft); color: var(--info); } .pill--typ-gewerbe { background: #ede9fe; color: #6d28d9; } .pill--typ-institution { background: var(--accent-soft); color: var(--accent-2); }
.pill--status-anfrage, .pill--status-besichtigung, .pill--status-aufmass { background: var(--info-soft); color: var(--info); }
.pill--status-angebot_bearbeitung, .pill--status-angebot_versendet, .pill--status-entwurf, .pill--status-versendet { background: #ede9fe; color: #6d28d9; }
.pill--status-angenommen, .pill--status-auftrag_erhalten, .pill--status-ausfuehrung_geplant, .pill--status-in_arbeit { background: var(--accent-soft); color: var(--accent-2); }
.pill--status-nachtrag_offen { background: var(--warn-soft); color: var(--warn); }
.pill--status-fertig, .pill--status-rechnung_erstellt, .pill--status-rechnung_versendet { background: #e0f2fe; color: #0369a1; }
.pill--status-bezahlt { background: var(--ok-soft); color: var(--ok); } .pill--status-abgelehnt, .pill--status-storniert { background: var(--err-soft); color: var(--err); }

/* Buttons & Formulare */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #f8fafc; text-decoration: none; } .btn .ic { width: 16px; height: 16px; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn--primary:hover { background: var(--accent-2); }
.btn--accent { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--danger { color: var(--err); border-color: #fecaca; } .btn--danger:hover { background: var(--err-soft); }
.btn--ghost { border-color: transparent; background: transparent; color: var(--ink-3); } .btn--ghost:hover { color: var(--err); background: var(--err-soft); }
.btn--s { padding: 6px 11px; font-size: 13px; } .btn--xs { padding: 3px 8px; font-size: 12px; border-radius: 6px; } .btn--block { width: 100%; justify-content: center; }
.form .field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 12.5px; color: var(--ink-2); font-weight: 500; margin-bottom: 4px; }
.field input, .field select, .field textarea, .filterbar input, .filterbar select, .form--compact input, .form--compact select, .form--compact textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; font: inherit; font-size: 14px; background: #fff; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus, .filterbar input:focus, .form--compact input:focus, .form--compact textarea:focus, .postable input:focus, .postable textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.field textarea { resize: vertical; }
.row { display: flex; gap: 12px; } .row > .field { flex: 1; min-width: 0; } .row > .field--xs { flex: 0 0 110px; } .row > .field--s { flex: 0 0 170px; } .row textarea { flex: 1; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 6px 0; cursor: pointer; } .check input { width: 16px; height: 16px; accent-color: var(--accent); }
.checks { margin: 10px 0; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; } .seg__item input { position: absolute; opacity: 0; } .seg__item span { display: inline-block; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 13px; cursor: pointer; }
.seg__item input:checked + span { background: var(--primary); color: #fff; border-color: var(--primary); } .seg__item--s span { padding: 3px 8px; font-size: 12px; }
.subbox { background: #fafbfc; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 8px 0 12px; }
.formbar { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.form--compact { display: flex; flex-direction: column; gap: 8px; } .form--compact .row { gap: 8px; }
.filterbar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; } .filterbar input[type=search] { flex: 1; min-width: 220px; } .filterbar select { width: auto; }
.inline-form { margin-top: 10px; } .inline-form summary { cursor: pointer; font-size: 13.5px; color: var(--accent-2); font-weight: 600; } .inline-form form { margin-top: 10px; }
.tabs { display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; } .tab { padding: 7px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); } .tab:hover { background: #e8ebf0; text-decoration: none; } .tab.is-active { background: var(--primary); color: #fff; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 13.5px; } .dl dt { color: var(--ink-3); } .dl dd { margin: 0; }
.addr { font-style: normal; margin-bottom: 10px; line-height: 1.5; }
.rules { list-style: none; padding: 0; margin: 0 0 8px; font-size: 13.5px; } .rules li { padding: 3px 0; }
.note { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-top: 10px; }
.rulebox { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.ap { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; } .ap:last-of-type { border-bottom: 0; }
.list { list-style: none; padding: 0; margin: 0 0 10px; } .list li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; } .list li:last-child { border-bottom: 0; }
.timeline { list-style: none; padding: 0; margin: 10px 0; } .timeline li { padding: 8px 0 8px 14px; border-left: 2px solid var(--line); font-size: 13.5px; } .timeline .tl--status { border-left-color: var(--accent); } .timeline .tl--system { border-left-color: var(--line-2); color: var(--ink-2); }
.steps { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; counter-reset: s; }
.steps li { padding: 3px 0 3px 22px; position: relative; color: var(--ink-3); } .steps li::before { content: ''; position: absolute; left: 4px; top: 8px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-2); background: #fff; }
.steps li.is-done { color: var(--ink-2); } .steps li.is-done::before { background: var(--ok); border-color: var(--ok); } .steps li.is-current { color: var(--ink); font-weight: 700; } .steps li.is-current::before { background: var(--accent); border-color: var(--accent); }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; border: 1px solid; }
.flash--success { background: var(--ok-soft); border-color: #86efac; color: var(--ok); } .flash--error { background: var(--err-soft); border-color: #fca5a5; color: var(--err); } .flash--info { background: var(--info-soft); border-color: #93c5fd; color: var(--info); } .flash--warn { background: var(--warn-soft); border-color: #fcd34d; color: var(--warn); }
.suggest { position: absolute; z-index: 30; background: #fff; border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 10px 30px rgba(15,23,42,.15); max-height: 320px; overflow: auto; width: 100%; margin-top: 4px; }
.suggest button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 12px; font: inherit; font-size: 13.5px; cursor: pointer; border-bottom: 1px solid var(--line); }
.suggest button:hover, .suggest button.is-active { background: var(--accent-soft); } .suggest small { display: block; color: var(--ink-3); }
[data-kundenwahl], .artikelsuche { position: relative; }

/* Angebots-Editor */
.postable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.postable th { text-align: left; font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 6px 6px; border-bottom: 1px solid var(--line); }
.postable td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.postable input, .postable textarea { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13.5px; }
.postable textarea { resize: vertical; margin-top: 4px; } .pos-bez { font-weight: 600; }
.pos-aufmass { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: #fffbeb; }
.pos-aufmass-info { font-size: 12px; color: var(--ink-3); margin-top: 2px; min-height: 14px; } .pos-aufmass-info b { color: var(--ok); } .pos-aufmass-info .err { color: var(--err); }
.pos-nr { width: 44px; white-space: nowrap; color: var(--ink-3); } .pos-handle { cursor: grab; margin-right: 4px; } .pos-menge { width: 100px; } .pos-einheit { width: 70px; } .pos-preis { width: 120px; } .pos-summe { width: 110px; text-align: right; font-weight: 600; white-space: nowrap; }
.pos-menge input, .pos-preis input { text-align: right; }
tr[data-typ="titel"] .pos-bez { font-weight: 700; background: #f1f5f9; } tr[data-typ="titel"] .pos-text, tr[data-typ="text"] .pos-bez { display: none; }
.posbar { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.sums { display: grid; gap: 4px; justify-content: end; margin-top: 8px; font-size: 14px; } .sums > div { display: grid; grid-template-columns: 180px 130px; text-align: right; } .sums__total { font-size: 17px; font-weight: 800; border-top: 1px solid var(--line-2); padding-top: 4px; }
.doc { padding: 28px 32px; } .doc__head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 18px; } .doc__pos th { background: transparent; } .doc__titel td { background: #f8fafc; } .doc__total td { font-weight: 800; font-size: 15px; border-top: 2px solid var(--ink); }
.statusbtns { flex-direction: row; flex-wrap: wrap; }

/* Login */
.auth-body { background: var(--bg); display: grid; place-items: center; min-height: 100vh; margin: 0; }
.auth { width: 100%; max-width: 420px; padding: 20px; } .auth__card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px 30px; box-shadow: 0 20px 60px rgba(15,23,42,.1); }
.auth h1 { font-size: 20px; margin: 16px 0 14px; } .auth__hint { font-size: 12.5px; color: var(--ink-3); margin-top: 14px; }

/* Responsive */
@media (max-width: 1100px) { .grid--3 { grid-template-columns: 1fr 1fr; } .card--span2 { grid-column: span 1; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; } .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; transform: translateX(-100%); transition: transform .2s; z-index: 50; } .sidebar.is-open { transform: none; }
  .burger { display: inline-grid; place-items: center; } .content { padding: 16px; } .grid--2, .grid--3, .grid--sidebar { grid-template-columns: 1fr; } .row { flex-direction: column; gap: 0; } .row > .field--xs, .row > .field--s { flex: 1; }
  .topbar__actions .btn span, .topbar .btn { font-size: 12.5px; } .topsearch { display: none; } h1 { font-size: 19px; } .sums > div { grid-template-columns: 1fr 120px; }
}

/* Editor-Feinschliff (07.10.) */
.artikelsuche input { width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; font: inherit; font-size: 14px; margin-bottom: 10px; }
.postable td:nth-child(2) { min-width: 340px; width: 99%; }

/* Einstellungen-Hub */
.hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.hub__tile { display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; gap: 6px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; color: var(--ink); box-shadow: var(--shadow); align-items: start; }
a.hub__tile:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.hub__icon { grid-row: span 2; width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; } .hub__icon .ic { width: 24px; height: 24px; }
.hub__icon--alt { background: var(--info-soft); color: var(--info); } .hub__icon--warn { background: var(--warn-soft); color: var(--warn); }
.hub__body b { display: block; font-size: 15px; margin-bottom: 2px; } .hub__body span { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.hub__meta { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.hub__tile--demo { grid-column: 1 / -1; grid-template-columns: 48px 1fr auto; grid-template-rows: auto; align-items: center; } .hub__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.page-head h1 .ic { width: 22px; height: 22px; color: var(--accent-2); }

.matrix th { white-space: nowrap; } .mx { display: inline-flex; align-items: center; gap: 3px; margin: 0 4px; font-size: 12px; cursor: pointer; } .mx input { accent-color: var(--accent); }

/* Zeiterfassung */
.stempel__laeuft { text-align: center; padding: 10px 0 16px; } .stempel__zeit { font-size: 44px; font-weight: 800; letter-spacing: .02em; font-variant-numeric: tabular-nums; color: var(--ok); }
.btn--big { font-size: 17px; padding: 14px 20px; width: 100%; justify-content: center; margin-top: 6px; }
.table__group td { background: #fafbfc; padding: 6px 14px; border-top: 2px solid var(--line); } .is-running td { background: var(--ok-soft); }
.btngroup { display: inline-flex; } .btngroup .btn { border-radius: 0; } .btngroup .btn:first-child { border-radius: 8px 0 0 8px; } .btngroup .btn:last-child { border-radius: 0 8px 8px 0; margin-left: -1px; } .btn.is-disabled { opacity: .55; }
/* Bottom-Nav (mobil) */
.bottomnav { display: none; }
@media (max-width: 900px) {
  .bottomnav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; background: var(--panel); border-top: 1px solid var(--line); z-index: 40; padding: 4px 0 calc(4px + env(safe-area-inset-bottom)); }
  .bottomnav a, .bottomnav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font-size: 11px; color: var(--ink-2); background: none; border: 0; font-family: inherit; text-decoration: none; }
  .bottomnav .ic { width: 22px; height: 22px; } .bottomnav .is-active { color: var(--accent); }
  .content { padding-bottom: 90px; } .sidebar { padding-bottom: 70px; } .burger { display: none; }
  .topbar { padding: 10px 14px; } .topbar__actions .btn { padding: 8px 10px; } .topbar__actions .btn .ic { display: none; }
  html { font-size: 16px; } .field input, .field select, .field textarea, .filterbar input, .filterbar select, .form--compact input, .form--compact select, .form--compact textarea, .postable input, .postable textarea { font-size: 16px; }
  .page-head { flex-direction: column; align-items: stretch; } .page-head__actions { justify-content: flex-start; }
  .kpis { grid-template-columns: 1fr 1fr; } .kpi__val { font-size: 20px; }
  .table th, .table td { padding: 8px 10px; } .card { padding: 14px; } .hub { grid-template-columns: 1fr; } .hub__tile--demo { grid-template-columns: 48px 1fr; } .hub__actions { grid-column: 1 / -1; }
  .filterbar input[type=search], .filterbar select, .filterbar input[type=date] { min-width: 0; flex: 1 1 140px; }
  .stempel__zeit { font-size: 38px; }
}
@media (display-mode: standalone) { .topbar { padding-top: calc(10px + env(safe-area-inset-top)); } }
