/* Alfred: nahezu schwarz, Anthrazit-Flächen, Messing als Akzent. Schrift Montserrat. */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/montserrat-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/montserrat-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #0B0C0F;
  --panel: #13151A;
  --panel-2: #1A1D23;
  --raise: rgba(255,255,255,.035);
  --raise-2: rgba(255,255,255,.06);
  --ink: #E9E6DF;
  --muted: #8C8E95;
  --line: #262A31;
  --side: #07080A;
  --side-ink: #C4C1B9;
  --accent: #C8A45A;
  --accent-2: #E2C27E;
  --accent-ink: #0B0C0F;
  --accent-soft: rgba(200,164,90,.14);
  --accent-text: #DDBB72;
  --ok: #63C08B;
  --ok-soft: rgba(99,192,139,.13);
  --warn: #E2A74C;
  --warn-soft: rgba(226,167,76,.14);
  --bad: #EC6A5A;
  --bad-soft: rgba(236,106,90,.14);
  --info: #82AEDD;
  --info-soft: rgba(130,174,221,.13);
  --radius: 6px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px rgba(0,0,0,.35);
  --mark-glass: #0B0C0F;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 13.5px/1.5 "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink);
  background-image: radial-gradient(1200px 600px at 85% -10%, rgba(200,164,90,.06), transparent 60%); background-attachment: fixed; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; font-weight: 800; letter-spacing: .01em; }
h2 { font-size: 12px; margin: 0 0 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--accent-text); }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 700; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--bad); min-height: 1.2em; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* Login */
.login { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; background: var(--side); padding: 16px; }
.login-box h1 { text-align: center; font-size: 18px; }

/* Shell */
.shell { display: grid; grid-template-columns: 232px 1fr; grid-template-rows: 56px 1fr; min-height: 100vh; }
.side { grid-row: 1 / 3; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 18px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand:hover { text-decoration: none; }
nav { display: flex; flex-direction: column; padding: 4px 8px 16px; flex: 1; }
nav a { color: var(--side-ink); padding: 7px 10px; border-radius: 6px; font-size: 13.5px; }
nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
nav a.active { background: linear-gradient(90deg, rgba(200,164,90,.18), rgba(200,164,90,.04)); color: #fff; font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); border-radius: 0 6px 6px 0; }
.nav-h { font-size: 10px; text-transform: uppercase; letter-spacing: .2em; color: #5E6169; padding: 16px 10px 5px; }
.side-foot { padding: 12px 16px; font-size: 12px; color: var(--muted); border-top: 1px solid rgba(255,255,255,.08); }
.side-foot a { color: var(--side-ink); }
.topbar { display: flex; align-items: center; gap: 12px; padding: 0 24px; background: rgba(11,12,15,.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar input[type=search] { flex: 1; max-width: 520px; }
.quick { margin-left: auto; display: flex; gap: 8px; }
.burger { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; }
.view { padding: 24px; max-width: 1400px; width: 100%; }

/* Controls */
input, select, textarea { font: inherit; color: inherit; border: 1px solid var(--line); border-radius: 5px; padding: 7px 9px; background: var(--panel-2); width: 100%; min-width: 0; }
input::placeholder, textarea::placeholder { color: #5E6169; }
input[type=color] { padding: 2px; height: 34px; }
input:focus, select:focus, textarea:focus { outline: 1px solid var(--accent); outline-offset: -1px; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 64px; }
input[type=checkbox] { width: auto; }
label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
label.check { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 13.5px; }
.btn { font: inherit; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); padding: 7px 14px; border-radius: 6px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { background: var(--raise-2); border-color: #3A3F48; text-decoration: none; }
.btn.primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; letter-spacing: .02em; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--bad); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Layout */
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .btns { margin-left: auto; }
.card { background: linear-gradient(180deg, #16181E, var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 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)); }
.form { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0,1fr)); }
.form .s2 { grid-column: span 2; }
.form .s3 { grid-column: span 3; }
.form .s4 { grid-column: 1 / -1; }
.toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.toolbar input[type=search] { max-width: 320px; }
.toolbar select { width: auto; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 9px 14px; font: inherit; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }

/* KPI */
.kpi { padding: 16px 18px; }
.kpi .label { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .16em; }
.kpi .value { font-size: 26px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; color: #fff; }
.kpi .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kpi.alert .value { color: var(--bad); }

/* Tabellen */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--raise); }
table.list td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: var(--raise); }
table.list tfoot td { font-weight: 650; border-bottom: 0; }
.empty { padding: 32px; text-align: center; color: var(--muted); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--raise-2); color: var(--side-ink); }
.b-entwurf { background: var(--raise-2); color: var(--side-ink); }
.b-offen { background: var(--info-soft); color: var(--info); }
.b-teilbezahlt { background: var(--warn-soft); color: var(--warn); }
.b-bezahlt, .b-angenommen, .b-verrechnet, .b-gesendet, .b-zugeordnet { background: var(--ok-soft); color: var(--ok); }
.b-storniert, .b-abgelehnt, .b-fehler, .b-ueberfaellig { background: var(--bad-soft); color: var(--bad); }
.b-abgelaufen, .b-ignoriert { background: var(--raise-2); color: var(--muted); }
.badge.tag { background: var(--accent-soft); color: var(--accent-text); font-weight: 500; margin-top: 3px; }
a.badge.tag:hover { text-decoration: none; filter: brightness(.95); }
.b-m1 { background: var(--warn-soft); color: var(--warn); }
.b-m2, .b-m3 { background: var(--bad-soft); color: var(--bad); }

/* Beleg-Editor */
.doc-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.items { width: 100%; border-collapse: collapse; }
.items th { font-size: 12px; color: var(--muted); text-align: left; padding: 6px; border-bottom: 1px solid var(--line); font-weight: 600; }
.items td { padding: 6px; vertical-align: top; border-bottom: 1px solid var(--line); }
.items td input, .items td textarea { padding: 5px 7px; }
.items td textarea { min-height: 34px; font-size: 13px; }
.items .c-pos { width: 34px; color: var(--muted); padding-top: 12px; }
.items .c-qty { width: 80px; }
.items .c-unit { width: 90px; }
.items .c-price { width: 110px; }
.items .c-disc { width: 70px; }
.items .c-tax { width: 72px; }
.items .c-sum { width: 110px; text-align: right; padding-top: 12px; font-variant-numeric: tabular-nums; }
.items .c-act { width: 82px; white-space: nowrap; padding-top: 8px; }
.items tr.text-row td { background: var(--raise); }
.icon-btn { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 2px 4px; font-size: 14px; border-radius: 4px; }
.icon-btn:hover { background: var(--raise-2); color: #fff; }
.totals { margin-left: auto; width: 340px; max-width: 100%; margin-top: 12px; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; font-variant-numeric: tabular-nums; }
.totals .grand { border-top: 2px solid var(--accent); font-weight: 700; font-size: 16px; padding-top: 8px; margin-top: 4px; }
.notice { padding: 10px 14px; border-radius: 6px; background: var(--accent-soft); font-size: 13.5px; }
.notice.info { background: var(--info-soft); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.locked-banner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* Picker */
.picker { position: relative; }
.picker-list { position: absolute; top: 100%; left: 0; right: 0; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 30; max-height: 280px; overflow-y: auto; margin-top: 2px; }
.picker-list div { padding: 7px 10px; cursor: pointer; }
.picker-list div:hover, .picker-list div.sel { background: var(--accent-soft); }
.picker-list small { color: var(--muted); }

/* Modal / Toast */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-box { background: var(--panel); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.6); border-radius: 8px; padding: 22px; width: 100%; max-width: 640px; max-height: calc(100vh - 32px); overflow-y: auto; }
.modal-box.wide { max-width: 980px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 60; }
.toast { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 10px 16px; border-radius: 6px; box-shadow: var(--shadow); max-width: 420px; }
.toast.bad { border-left-color: var(--bad); }

/* Chart */
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 200px; padding-top: 8px; }
.bar { background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.bar:hover { filter: brightness(.92); }
.bar-pair { display: flex; align-items: flex-end; gap: 3px; height: 100%; }
.bar-pair .bar { flex: 1; }
.bar.prev { background: rgba(255,255,255,.04); border: 2px dashed #6B6F78; border-bottom: 0; }
.bar.prev:hover { background: rgba(255,255,255,.08); filter: none; }
.chart-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); margin-left: auto; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 12px; height: 12px; border-radius: 2px; background: var(--accent); display: inline-block; }
.legend .sw.prev { background: rgba(255,255,255,.04); border: 2px dashed #6B6F78; }
.bar-labels { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 4px; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 8px; align-items: center; padding: 5px 0; font-size: 13px; }
.hbar .track { grid-column: 1 / -1; height: 6px; background: var(--raise-2); border-radius: 3px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--accent); }
.timeline { display: grid; gap: 10px; }
.timeline .note { border-left: 3px solid var(--accent); padding: 4px 12px; }
.timeline .note small { color: var(--muted); }

/* Contracts (admin.eartunes.at) */
.view:has(.cx) { min-width: 0; } /* breite Tabellen scrollen in .table-wrap statt die Seite zu verbreitern */
.cx ~ .grid > .card + .card { margin-top: 0; }
.badge.tariff { border: 1px solid transparent; }
.t-gold { background: var(--accent); color: var(--accent-ink); }
.t-platin { background: linear-gradient(135deg, #e9edf2, #c9d1db); color: #2b3440; border-color: #c2cad4; }
.t-silber { background: #ecece8; color: var(--side-ink); border-color: #d6d6d0; }
.t-streaming { background: var(--info-soft); color: var(--info); }
.t-keine { background: var(--raise-2); color: var(--muted); }
.hbar .fill.t-fill-gold { background: #fdcb37; }
.hbar .fill.t-fill-platin { background: #9aa8b8; }
.hbar .fill.t-fill-silber { background: #bdbdb6; }
.hbar .fill.t-fill-streaming { background: var(--info); }
.hbar .fill.t-fill-keine { background: #dcdcd6; }
.kpi .meter { height: 6px; background: var(--raise-2); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.kpi .meter span { display: block; height: 100%; background: var(--ok); border-radius: 3px; }
.mix { display: grid; grid-template-columns: max-content 1fr; gap: 12px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.mix-bar { display: flex; height: 22px; border-radius: 4px; overflow: hidden; font-size: 11.5px; font-weight: 600; }
.mix-bar span { display: flex; align-items: center; padding: 0 8px; white-space: nowrap; overflow: hidden; min-width: 0; }
.mix-einzug { background: #2A2E36; color: #fff; }
.mix-ueberweisung { background: var(--accent-soft); color: var(--accent-text); }
.bars .stack { background: var(--raise-2); border-radius: 3px 3px 0 0; min-height: 2px; display: flex; align-items: flex-end; overflow: hidden; }
.bars .stack .paid { width: 100%; background: var(--accent); }
.bars .stack:hover { filter: brightness(.94); }
.legend .sw.due { background: var(--raise-2); }
.legend .pay-pill { width: 12px; height: 12px; padding: 0; min-width: 0; }
.pay-pills { display: flex; flex-wrap: wrap; gap: 3px; max-width: 260px; }
.pay-pill { display: inline-block; min-width: 30px; text-align: center; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; font-style: normal; line-height: 1.6; }
.ps-bezahlt { background: var(--ok-soft); color: var(--ok); }
.ps-teilbezahlt { background: var(--warn-soft); color: var(--warn); }
.ps-offen { background: var(--bad-soft); color: var(--bad); }
.ps-geplant { background: var(--raise-2); color: var(--muted); }
.num.neg { color: var(--bad); }
table.matrix td, table.matrix th { padding: 6px 5px; }
table.matrix .mx { width: 56px; text-align: center; }
table.matrix .mx-name { min-width: 220px; }
.mx-cell { border-radius: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 0; font-variant-numeric: tabular-nums; }
.mx-cell + .mx-cell { margin-top: 2px; }
ol.steps { padding-left: 20px; display: grid; gap: 6px; }
.badge.clip { background: var(--raise-2); color: var(--side-ink); font-weight: 500; margin-left: 4px; cursor: default; }
.file-list { display: grid; gap: 6px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); }
.file-row:hover { border-color: var(--accent); }
.file-ico { flex: none; width: 38px; height: 38px; border-radius: 5px; background: var(--bad-soft); color: var(--bad); font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center; letter-spacing: .04em; }
.file-ico:hover { text-decoration: none; filter: brightness(.95); }
.file-ico.off { background: var(--raise-2); color: var(--muted); }
.file-meta { display: grid; min-width: 0; flex: 1; }
.file-meta a { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.list .file-row { border: 0; padding: 0; background: none; }
.badge.why { background: var(--raise-2); color: var(--side-ink); font-weight: 500; font-size: 11px; }
.alt-cand { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }

/* Ideen & Feedback */
.nav-count { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; text-align: center; margin-left: 4px; }
nav a.active .nav-count { background: var(--accent); color: var(--accent-ink); }
.is-neu { background: var(--accent-soft); color: var(--accent-text); }
.is-pruefung { background: var(--info-soft); color: var(--info); }
.is-geplant { background: rgba(160,130,230,.15); color: #B9A2EE; }
.is-umsetzung { background: var(--warn-soft); color: var(--warn); }
.is-umgesetzt { background: var(--ok-soft); color: var(--ok); }
.is-abgelehnt { background: var(--raise-2); color: var(--muted); }
.ik-idee, .ik-verbesserung, .ik-fehler { background: var(--raise-2); color: var(--side-ink); font-weight: 500; }
.ik-fehler { background: var(--bad-soft); color: var(--bad); }
.dash-ideas-new { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.badge.new-dot { background: var(--accent); color: var(--accent-ink); font-size: 10.5px; padding: 1px 6px; }
.idea-board { display: grid; grid-template-columns: repeat(6, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.idea-col { background: var(--raise-2); border-radius: var(--radius); padding: 10px; display: grid; gap: 8px; min-height: 120px; }
.idea-col-h { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 2px; }
.idea-empty { text-align: center; padding: 12px 0; }
.idea-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 10px; display: grid; gap: 4px; cursor: pointer; box-shadow: var(--shadow); }
.idea-card:hover { border-color: var(--accent); }
.idea-top { display: flex; gap: 4px; flex-wrap: wrap; }
.idea-note { color: var(--muted); border-left: 2px solid var(--accent); padding-left: 6px; }
.idea-foot { display: flex; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 2px; }
.idea-foot .muted { margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idea-foot .voted { color: var(--ok); font-weight: 600; }
.idea-status { background: var(--raise); }
.changelog { display: grid; gap: 18px; }
.cl-day { display: grid; grid-template-columns: 110px 1fr; gap: 16px; }
.cl-date { font-weight: 700; padding-top: 2px; }
.cl-items { display: grid; gap: 10px; border-left: 3px solid var(--accent); padding-left: 14px; }
.cl-item { display: grid; gap: 3px; }
.cl-idea { cursor: pointer; background: var(--ok-soft); border-radius: 6px; padding: 8px 10px; }
.cl-body { white-space: pre-wrap; color: var(--side-ink); font-size: 13px; }
.badge.cl-hash { background: var(--raise-2); color: var(--side-ink); font-family: ui-monospace, Consolas, monospace; font-weight: 500; }
@media (max-width: 820px) { .cl-day { grid-template-columns: 1fr; gap: 4px; } }

/* Kalender */
.cal-title { font-size: 15px; min-width: 150px; text-align: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button { font: inherit; border: 0; background: var(--panel-2); padding: 7px 12px; cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.active { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.cal-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); color: var(--ink); font-size: 13px; cursor: pointer; }
.cal-chip input { display: none; }
.cal-chip i, .cal-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; }
.cal-chip.off { opacity: .45; }
.cal-chip.off i { background: transparent; border: 2px solid var(--c); width: 6px; height: 6px; }
.cal-card { padding: 0; overflow: hidden; }
.cal-wd, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-wd div { padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--raise); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 112px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.other { background: var(--raise); }
.cal-day.other .cal-num { color: #4A4D55; }
.cal-day.we { background: var(--raise); }
.cal-day:hover { background: var(--raise); }
.cal-num { font-size: 12px; font-weight: 600; color: var(--ink); padding: 1px 5px; align-self: flex-start; border-radius: 999px; }
.cal-day.today .cal-num { background: var(--accent); color: var(--accent-ink); }
.cal-more { font-size: 11.5px; color: var(--muted); padding-left: 4px; }
.cal-ev { font-size: 12px; padding: 2px 6px; border-radius: 4px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 18%, var(--panel)); border-left: 3px solid var(--c); color: var(--ink); }
.cal-ev.allday { background: var(--c); color: #fff; border-left: 0; text-shadow: 0 0 2px rgba(0,0,0,.35); }
.cal-ev:hover { filter: brightness(.95); }
.cal-week { --n: 7; }
.cal-wk-head, .cal-wk-allday, .cal-wk-grid { display: grid; grid-template-columns: 56px repeat(var(--n), minmax(0, 1fr)); }
.cal-wk-head > div { padding: 8px 2px; font-size: 12.5px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--raise); }
.cal-wk-head > div a { color: var(--ink); }
.cal-wk-head > div.today a { background: var(--accent); color: var(--accent-ink); padding: 2px 8px; border-radius: 999px; }
.cal-wk-allday > div { min-height: 30px; padding: 3px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); display: grid; gap: 2px; align-content: start; cursor: pointer; font-size: 11px; }
.cal-wk-allday > div:first-child { border-left: 0; padding-top: 8px; text-align: right; cursor: default; }
.cal-wk-scroll { height: 620px; overflow-y: auto; }
.cal-hours div { height: 44px; font-size: 11px; color: var(--muted); text-align: right; padding: 0 6px; transform: translateY(-7px); }
.cal-hours div:first-child { transform: none; }
.cal-col { position: relative; border-left: 1px solid var(--line); cursor: pointer;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 43px, var(--line) 43px, var(--line) 44px); height: calc(24 * 44px); }
.cal-col.today { background-color: var(--accent-soft); }
.cal-ev.timed { position: absolute; white-space: normal; line-height: 1.3; padding: 3px 5px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); pointer-events: none; }
.cal-list { display: grid; }
.cal-list-day { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.cal-list-day.today { background: var(--raise); }
.cal-list-ev { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 5px 8px; border-left: 3px solid var(--c); margin-bottom: 4px; cursor: pointer; border-radius: 0 4px 4px 0; }
.cal-list-ev:hover { background: var(--raise); }
.cal-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; }
.dt { display: flex; gap: 6px; }
.dash-today { border-top: 3px solid var(--accent); }
.dt-list { display: grid; gap: 6px; }
.dt-ev { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 7px 10px; border-left: 4px solid var(--c); border-radius: 0 6px 6px 0;
  background: color-mix(in srgb, var(--c) 10%, var(--panel)); cursor: pointer; }
.dt-ev:hover { filter: brightness(.97); }
.dt-ev.past { opacity: .5; }
.dt-ev.live { box-shadow: 0 0 0 2px var(--accent); }
.dt-next { margin-top: 10px; font-size: 13px; }
@media (max-width: 820px) {
  .cal-day { min-height: 70px; }
  .cal-day .cal-ev { font-size: 10px; padding: 1px 3px; }
  .cal-list-day, .cal-list-ev { grid-template-columns: 1fr; gap: 2px; }
}

/* Profilbilder */
.av { --s: 28px; width: var(--s); height: var(--s); border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center;
  color: #fff; font-weight: 700; font-size: calc(var(--s) * .4); line-height: 1; vertical-align: middle; background: #3A3D45; }
.av-name { display: inline-flex; align-items: center; gap: 6px; }
.whoami { display: inline-flex; align-items: center; gap: 8px; color: var(--side-ink); margin-right: 10px; }
.whoami:hover { text-decoration: none; color: #fff; }
.side-foot { display: flex; align-items: center; justify-content: space-between; }
.av-edit { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.av-edit small { flex-basis: 100%; }

@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .doc-head { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; width: 250px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; }
  .burger { display: block; }
  .topbar { padding: 0 16px; }
  .quick { display: none; }
  .view { padding: 16px; }
  .g2, .g3, .g4, .form { grid-template-columns: 1fr; }
  .form .s2, .form .s3 { grid-column: auto; }
  .items .c-disc, .items .c-tax, .items .c-unit { display: none; }
}
@media print {
  .side, .topbar { display: none; }
  .shell { display: block; }
}

/* ------------------------------------------------------------ Alfred: Marke, Login, Firmen */
.login { background: radial-gradient(900px 500px at 50% 0%, rgba(200,164,90,.10), transparent 65%), var(--bg); }
.login-brand { display: grid; justify-items: center; gap: 6px; color: var(--accent); }
.login-mark { width: 150px; height: 75px; filter: drop-shadow(0 6px 24px rgba(200,164,90,.25)); }
.login-word { font-weight: 800; letter-spacing: .5em; font-size: 22px; color: #fff; margin-right: -.5em; }
.login-tag { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-right: -.3em; }
.login-box { background: linear-gradient(180deg, #16181E, var(--panel)); border: 1px solid var(--line); padding: 30px; border-radius: 8px; width: 100%; max-width: 380px;
  display: grid; gap: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.55); border-top: 2px solid var(--accent); }
.login-box h1 { text-align: center; font-size: 13px; text-transform: uppercase; letter-spacing: .22em; color: var(--accent-text); font-weight: 700; }
#setupFields { display: grid; gap: 12px; }
.brand { gap: 12px; color: var(--accent); border-bottom: 1px solid var(--line); }
.brand-mark { width: 44px; height: 22px; flex: none; }
.brand-word { font-weight: 800; letter-spacing: .38em; font-size: 13px; color: #fff; }
.side { border-right: 1px solid #15171B; }
.side-foot, .brand { border-color: var(--line) !important; }
.firm-switch { display: flex; align-items: center; gap: 10px; margin: 12px 10px 6px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--raise); color: var(--ink); font-weight: 600; font-size: 13px; }
.firm-switch:hover { border-color: var(--accent); text-decoration: none; }
.firm-switch.single { cursor: default; }
.firm-switch.single:hover { border-color: var(--line); }
.firm-switch img, .firm-item img, .firm-badge img { width: 28px; height: 28px; object-fit: contain; border-radius: 4px; background: #fff; padding: 2px; flex: none; }
.firm-mono { width: 28px; height: 28px; border-radius: 4px; display: grid; place-items: center; flex: none; font-weight: 800;
  background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--accent-ink); }
.firm-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.firm-caret { color: var(--muted); font-size: 11px; }
.firm-list { display: grid; gap: 8px; margin-top: 6px; }
.firm-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2);
  color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.firm-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.firm-item.current { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.firm-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 6px; }
.logo-prev { min-height: 70px; display: flex; align-items: center; padding: 14px; border: 1px dashed var(--line); border-radius: 6px; background: #fff; max-width: 420px; }
.logo-prev .muted { color: #777; }
.logo-prev img { max-height: 80px; max-width: 100%; }
.tabs a:hover { text-decoration: none; color: var(--ink) !important; }
table.list th { text-transform: uppercase; letter-spacing: .1em; font-size: 10.5px; }
table.list tr.click:hover td { background: var(--accent-soft); }
.totals .grand { color: #fff; }
::selection { background: rgba(200,164,90,.35); }
* { scrollbar-color: #2E323A transparent; }
.brand, .firm-switch, .side-foot { flex: none; }
.grid > .card + .card { margin-top: 0; }
.login-box .btn { justify-content: center; padding: 10px 14px; }
.login-box .error:empty, .login-box #loginHint:empty { display: none; }
