/* LMI Belegportal – modernes Design, dezentes Grün
   Schrift: Manrope. Farben: siehe :root. Logo: /static/logo.svg (austauschbar). */

@font-face { font-family: 'Manrope'; font-weight: 400; font-style: normal; font-display: swap; src: url('/static/fonts/manrope-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 500; font-style: normal; font-display: swap; src: url('/static/fonts/manrope-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 600; font-style: normal; font-display: swap; src: url('/static/fonts/manrope-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 700; font-style: normal; font-display: swap; src: url('/static/fonts/manrope-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 800; font-style: normal; font-display: swap; src: url('/static/fonts/manrope-latin-800-normal.woff2') format('woff2'); }

:root {
  --bg: #F4F7F5;
  --surface: #FFFFFF;
  --surface-2: #F8FAF8;
  --line: #E3E9E4;
  --line-strong: #CBD6CE;
  --ink: #1E3329;
  --ink-2: #5A6B62;
  --ink-3: #8A978F;
  --brand: #3D6E55;
  --brand-dark: #2F5A45;
  --brand-deep: #1E3329;
  --brand-soft: #EEF4EF;
  --brand-soft-2: #DCEAE0;
  --brand-accent: #7FA88E;

  --neu-bg: #EAF0FB; --neu-ink: #2C4F9E; --neu-dot: #3B6FD8;
  --ab-bg: #FBF3E4;  --ab-ink: #8A5A00;  --ab-dot: #D69A2D;
  --gb-bg: #E6F2EA;  --gb-ink: #22603D;  --gb-dot: #3D8A5F;
  --danger: #B3261E; --danger-bg: #FCEEEC;
  --warn-bg: #FFF6E5; --warn-line: #F2DDAE;

  --font: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --r-sm: 8px; --r: 10px; --r-lg: 14px; --r-xl: 20px;
  --shadow: 0 1px 2px rgba(20, 45, 32, .04), 0 2px 8px rgba(20, 45, 32, .04);
  --shadow-lg: 0 12px 32px rgba(20, 45, 32, .10);
  --focus: 0 0 0 3px rgba(61, 110, 85, .28);
  --sidebar: 252px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum' 0;
}
main { flex: 1; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--ink); letter-spacing: -.015em; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.125rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .9em; }
a { color: var(--brand); text-decoration: none; font-weight: 600; }
a:hover { color: var(--brand-dark); text-decoration: underline; text-underline-offset: .2em; }
code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: .9em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
.i { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -3px; }

.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: .8125rem; }
.nowrap { white-space: nowrap; }
.lead { font-size: 1rem; color: var(--ink-2); max-width: 64ch; }
.optional { font-weight: 500; color: var(--ink-3); font-size: .75rem; margin-left: .25rem; }
.hint { display: block; font-weight: 500; color: var(--ink-3); font-size: .75rem; margin-top: .3rem; }
.visually-hidden, .file-input {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: .5rem; }

/* ---------- Marke ---------- */
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { display: block; height: 44px; width: auto; }
.brand-sub { font-weight: 600; font-size: .8125rem; color: var(--ink-3); padding-left: .65rem; border-left: 1px solid var(--line-strong); line-height: 1.2; }
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand-soft-2); color: var(--brand-dark);
  font-weight: 800; font-size: .8125rem; letter-spacing: .02em;
}

/* ---------- Büro: Seitenleiste + Inhalt ---------- */
.shell { display: flex; min-height: 100vh; flex: 1; background: linear-gradient(90deg, var(--surface) calc(var(--sidebar) - 1px), var(--line) calc(var(--sidebar) - 1px), var(--line) var(--sidebar), transparent var(--sidebar)); }
.sidebar {
  width: var(--sidebar); flex: none; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 1.5rem;
  padding: 1.5rem 1rem 1rem; background: var(--surface); border-right: 1px solid var(--line);
}
.sidebar .brand { padding: 0 .6rem; }
.sidenav { display: flex; flex-direction: column; gap: 2px; }
.sidenav a {
  display: flex; align-items: center; gap: .7rem;
  padding: .6rem .7rem; border-radius: var(--r);
  color: var(--ink-2); font-weight: 600; font-size: .9375rem; text-decoration: none;
}
.sidenav a .i { color: var(--ink-3); }
.sidenav a:hover { background: var(--surface-2); color: var(--ink); }
.sidenav a.is-active { background: var(--brand-soft); color: var(--brand-dark); }
.sidenav a.is-active .i { color: var(--brand); }
.sidenav .count { margin-left: auto; }
.count {
  display: inline-grid; place-items: center; min-width: 1.45rem; height: 1.45rem; padding: 0 .4rem;
  border-radius: 999px; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700;
}
.side-user { margin-top: auto; display: flex; align-items: center; gap: .5rem; padding: .75rem .5rem 0; border-top: 1px solid var(--line); }
.side-user-link { display: flex; align-items: center; gap: .65rem; flex: 1; min-width: 0; color: var(--ink); text-decoration: none; }
.side-user-link:hover { text-decoration: none; }
.side-user-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.side-user-text strong { font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-text span { font-size: .75rem; color: var(--ink-3); font-weight: 500; }
.side-user form { margin: 0; }
.shell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------- Mandant: Kopfzeile ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar-inner { max-width: 1160px; margin: 0 auto; padding: .8rem 1.5rem; display: flex; align-items: center; gap: 1rem; }
.account { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.account-link { display: flex; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; }
.account-link:hover { text-decoration: none; }
.account-text { display: flex; flex-direction: column; line-height: 1.25; }
.account-text strong { font-size: .875rem; }
.account-text span { font-size: .75rem; color: var(--ink-3); font-weight: 500; }
.account form { margin: 0; }

/* ---------- Grundlayout ---------- */
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 2rem 1.5rem 3rem; }
.shell-main .wrap { max-width: 1240px; padding: 2rem 2.25rem 3rem; }
.wrap.narrow, .shell-main .wrap.narrow { max-width: 720px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head h1 { margin: 0; }
.page-head p { margin: .3rem 0 0; color: var(--ink-2); }
.page-head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.title-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.crumbs { margin: 0 0 .6rem; font-size: .875rem; }
.crumbs a { color: var(--ink-2); font-weight: 600; display: inline-flex; align-items: center; gap: .3rem; }
.footer { color: var(--ink-3); font-size: .8125rem; }
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 1.25rem 1.5rem 1.5rem; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.shell-main .footer-inner { max-width: 1240px; padding: 0 2.25rem 1.5rem; margin: 0; }
.footer a { color: var(--ink-3); font-weight: 500; }

/* ---------- Karten ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.card-pad { padding: 1.5rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: 1rem; }
.card-head p { margin: .15rem 0 0; color: var(--ink-2); font-size: .8125rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 1.5rem; margin: 0 0 1.25rem; }
.panel h2 { margin-top: 0; font-size: 1rem; }
.panel > p.small { margin-top: -.25rem; }
.stack-gap > * + * { margin-top: 1.25rem; }

/* ---------- Buttons & Formulare ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font: inherit; font-weight: 700; font-size: .875rem; line-height: 1.2;
  padding: .65rem 1.05rem; border-radius: var(--r);
  border: 1px solid var(--brand); background: var(--brand); color: #fff;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(20, 45, 32, .12);
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.btn .i { width: 17px; height: 17px; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; text-decoration: none; }
.btn-quiet { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: none; }
.btn-quiet:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-3); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: transparent; }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #EBC3BF; box-shadow: none; }
.btn-danger:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.btn-small { padding: .45rem .75rem; font-size: .8125rem; border-radius: var(--r-sm); }
.btn-block { width: 100%; padding-block: .8rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.iconbtn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-3); cursor: pointer;
}
.iconbtn:hover { background: var(--surface-2); color: var(--ink); }
.iconbtn.danger:hover { background: var(--danger-bg); color: var(--danger); }
.linkbtn {
  font: inherit; font-size: .875rem; font-weight: 600; background: none; border: 0; padding: 0;
  color: var(--brand); cursor: pointer;
}
.linkbtn:hover { color: var(--brand-dark); text-decoration: underline; text-underline-offset: .2em; }
.linkbtn.danger, .danger { color: var(--danger); }

label { display: block; font-weight: 600; font-size: .8125rem; color: var(--ink); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  display: block; width: 100%; margin-top: .35rem;
  font: inherit; font-size: .9375rem; font-weight: 500; color: var(--ink);
  padding: .62rem .8rem; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); font-weight: 500; }
select {
  appearance: none; padding-right: 2.2rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6B62' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center; background-size: 16px;
}
input[type=file] { display: block; margin-top: .35rem; font: inherit; font-size: .875rem; max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 700; margin-right: .75rem; padding: .45rem .8rem; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
textarea { resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
input[type=checkbox] { width: 1.05rem; height: 1.05rem; accent-color: var(--brand); vertical-align: -3px; }
.check-label { display: flex; gap: .55rem; align-items: center; font-weight: 500; font-size: .875rem; }
.stack > * + * { margin-top: 1rem; }
.stack > [type=hidden] + * { margin-top: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.row-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.inline-form { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; margin-top: 1rem; }
.inline-form label { flex: 1 1 12rem; }
.inline-form label.shrink { flex: 0 0 auto; }
.code-input { font-size: 1.5rem !important; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; max-width: 12rem; font-weight: 700 !important; }

/* ---------- Hinweise ---------- */
.flashes { margin-bottom: 1.25rem; display: grid; gap: .5rem; }
.flash { display: flex; gap: .6rem; align-items: flex-start; padding: .8rem 1rem; border-radius: var(--r); margin: 0; font-weight: 500; font-size: .875rem; border: 1px solid; }
.flash::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: .45rem; background: currentColor; }
.flash-success { background: var(--gb-bg); border-color: #C7E2D0; color: var(--gb-ink); }
.flash-error { background: var(--danger-bg); border-color: #F0C9C4; color: var(--danger); }
.flash-info { background: var(--neu-bg); border-color: #CBD8F2; color: var(--neu-ink); }
.notice { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1.1rem; border-radius: var(--r-lg); background: var(--warn-bg); border: 1px solid var(--warn-line); margin-bottom: 1.25rem; font-size: .875rem; }
.notice .i { color: #A06A00; margin-top: 1px; }
.notice p:last-child, .notice ul:last-child { margin-bottom: 0; }
.notice-error { background: var(--danger-bg); border-color: #F0C9C4; }
.notice-error .i { color: var(--danger); }
.notice a { white-space: nowrap; }
.empty { padding: 2.5rem 1.5rem; text-align: center; color: var(--ink-2); font-weight: 500; }
.empty .i { display: block; margin: 0 auto .6rem; width: 28px; height: 28px; color: var(--ink-3); }
.card > .empty, .ledger-card > .empty { border: 0; }
.tag { display: inline-flex; align-items: center; font-size: .6875rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); vertical-align: 1px; }
.tag-warn { background: var(--warn-bg); color: #7A4E00; border-color: var(--warn-line); }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li + li { margin-top: .45rem; }

/* ---------- Status-Pillen ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
  padding: .22rem .6rem .22rem .5rem; border-radius: 999px;
  font-size: .75rem; font-weight: 700; line-height: 1.3;
  background: var(--neu-bg); color: var(--neu-ink);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--neu-dot); }
.pill-abgerufen { background: var(--ab-bg); color: var(--ab-ink); }
.pill-abgerufen .dot { background: var(--ab-dot); }
.pill-verbucht { background: var(--gb-bg); color: var(--gb-ink); }
.pill-verbucht .dot { background: var(--gb-dot); }
.title-row .pill { font-size: .8125rem; padding: .3rem .75rem .3rem .6rem; }

/* ---------- Tabellen ---------- */
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.table-scroll { overflow-x: auto; }
.ledger { width: 100%; border-collapse: collapse; }
.ledger th, .ledger td { padding: .8rem 1rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.ledger tbody tr:last-child td { border-bottom: 0; }
.ledger thead th { font-size: .75rem; font-weight: 700; color: var(--ink-3); background: var(--surface-2); white-space: nowrap; padding-top: .65rem; padding-bottom: .65rem; }
.ledger tbody tr:hover { background: var(--surface-2); }
.ledger td.num, .ledger th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ledger td.date { white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: .875rem; }
.ledger td.status, .ledger td.act, .ledger td.src { white-space: nowrap; }
.ledger td.src, .ledger td.cat { color: var(--ink-2); font-size: .875rem; }
.ledger td.act { text-align: right; }
.ledger td.act form { margin: 0; display: inline; }
.ledger .check { width: 2.75rem; }
.ledger tr.is-inactive td { color: var(--ink-3); }
.ledger tr.is-warn td { background: #FFFBF4; }
.ledger .new-count { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .45rem; border-radius: 999px; background: var(--neu-bg); color: var(--neu-ink); font-weight: 800; font-size: .8125rem; }
.ledger .zero { color: var(--ink-3); }
.visually-hidden-head th { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.file-cell { display: flex; align-items: center; gap: .8rem; min-width: 14rem; }
.file-ico {
  display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: var(--r);
  background: var(--brand-soft); color: var(--brand);
}
.file-ico .i { width: 18px; height: 18px; }
.file-main { min-width: 0; display: flex; flex-direction: column; }
.file-main a, .file-main .fname { font-weight: 700; color: var(--ink); word-break: break-word; }
.file-main a:hover { color: var(--brand); }
.ledger .file-cell .file-main a { display: block; max-width: 24rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ledger .file-cell { min-width: 16rem; }
.cat-period { display: block; font-size: .75rem; color: var(--ink-3); font-weight: 500; }
.file-sub { display: flex; flex-wrap: wrap; gap: .25rem .75rem; font-size: .75rem; color: var(--ink-3); font-weight: 500; }
.note { color: var(--ink-2); font-size: .8125rem; font-weight: 500; }

/* ---------- Anmeldung ---------- */
.page-auth { background: var(--surface); }
.auth { flex: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-art {
  position: relative; overflow: hidden; color: #fff;
  background: var(--brand-dark);
  padding: 3rem clamp(2rem, 5vw, 4.5rem);
  display: flex; flex-direction: column; justify-content: space-between; gap: 2.5rem;
}
.auth-art .auth-logo { width: 104px; height: auto; display: block; position: relative; }
.auth-copy { position: relative; max-width: 30rem; }
.auth-copy h1 { color: #fff; font-size: clamp(2rem, 3.4vw, 2.75rem); line-height: 1.1; letter-spacing: -.025em; margin-bottom: 1rem; }
.auth-copy p { color: #D6E5DB; font-size: 1.0625rem; font-weight: 500; }
.auth-points { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; gap: .8rem; }
.auth-points li { display: flex; gap: .75rem; align-items: center; color: #E3EEE6; font-weight: 600; }
.auth-points .i { width: 20px; height: 20px; padding: 8px; box-sizing: content-box; border-radius: 10px; background: rgba(255, 255, 255, .1); color: #fff; }
.auth-deco { position: absolute; right: -50px; top: 110px; width: 340px; height: auto; pointer-events: none; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 1.625rem; font-weight: 800; margin: 0 0 .35rem; }
.auth-card > p { color: var(--ink-2); }
.auth-card form { margin-top: 1.5rem; }
.auth-single { grid-template-columns: minmax(0, 1fr); background: var(--bg); }
.auth-single .auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 2.25rem; box-shadow: var(--shadow-lg); }
.auth-logo-small { width: 64px; height: auto; display: block; margin-bottom: 1.75rem; }
.auth-help { margin-top: 1.5rem; font-size: .8125rem; color: var(--ink-3); }

/* ---------- Mandanten-Startseite ---------- */
.hello { margin-bottom: 1.5rem; }
.hello h1 { margin-bottom: .3rem; }
.hello p { margin: 0; color: var(--ink-2); }
.client-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; align-items: start; }
.upload-card { padding: 1.5rem; }
.seg { display: flex; flex-wrap: wrap; gap: .4rem; border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
.seg legend { font-weight: 700; font-size: .8125rem; margin-bottom: .55rem; padding: 0; }
.seg-item { cursor: pointer; }
.seg-item input { position: absolute; opacity: 0; pointer-events: none; }
.seg-item span {
  display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface);
  font-size: .8125rem; font-weight: 700; color: var(--ink-2);
  transition: background-color .15s, border-color .15s, color .15s;
}
.seg-item:hover span { border-color: var(--ink-3); color: var(--ink); }
.seg-item input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.seg-item input:focus-visible + span { box-shadow: var(--focus); }

.dropzone {
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg);
  background: var(--surface-2); padding: 2.25rem 1.5rem; text-align: center;
  transition: background-color .15s, border-color .15s;
}
.dropzone.is-over { background: var(--brand-soft); border-color: var(--brand); }
.dz-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--brand-soft-2); color: var(--brand-dark); margin-bottom: .9rem; }
.dz-icon .i { width: 26px; height: 26px; }
.dz-title { font-weight: 800; font-size: 1.0625rem; margin-bottom: .2rem; }
.dz-sub { color: var(--ink-2); font-size: .875rem; margin-bottom: 1.1rem; }
.dz-actions { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.file-btn { position: relative; }
.file-btn:focus-within { box-shadow: var(--focus); }
.dz-hint { margin: 1rem 0 0; font-size: .75rem; color: var(--ink-3); font-weight: 500; }
@media (hover: hover) and (pointer: fine) { .camera-btn { display: none; } }
@media (hover: none) { .dz-title-drag { display: none; } }

.upload-meta { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1rem; margin-top: 1.25rem; }

.queue { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .5rem; }
.queue:empty { display: none; }
.q-item {
  display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; align-items: center;
  padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
}
.q-name { font-weight: 700; font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-meta { font-size: .8125rem; color: var(--ink-3); font-weight: 600; text-align: right; }
.q-bar { grid-column: 1 / -1; height: 4px; background: var(--brand-soft); border-radius: 4px; overflow: hidden; }
.q-fill { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 4px; transition: width .2s; }
.q-item.is-ok .q-meta { color: var(--gb-ink); }
.q-item.is-ok .q-fill { background: var(--gb-dot); }
.q-item.is-error { border-color: #F0C9C4; background: #FFFBFA; }
.q-item.is-error .q-meta { color: var(--danger); grid-column: 1 / -1; text-align: left; }
.q-item.is-error .q-fill { background: var(--danger); }

.side { display: grid; gap: 1rem; }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 1.25rem; }
.side-box h2 { display: flex; align-items: center; gap: .55rem; margin: 0 0 .6rem; font-size: .9375rem; }
.side-box h2 .i { color: var(--brand); }
.side-box p { font-size: .875rem; color: var(--ink-2); }
.side-box p:last-child { margin-bottom: 0; }
.wa-number { display: block; font-size: 1.25rem; font-weight: 800; color: var(--ink); letter-spacing: -.01em; margin: .2rem 0 .8rem; font-variant-numeric: tabular-nums; }
.phone-list { list-style: none; padding: 0; margin: 0 0 .9rem; display: grid; gap: .35rem; }
.phone-list li { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .875rem; font-variant-numeric: tabular-nums; }
.phone-list .i { color: var(--gb-dot); width: 16px; height: 16px; }
.tips { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.tips li { display: flex; gap: .6rem; font-size: .8125rem; color: var(--ink-2); font-weight: 500; }
.tips .i { color: var(--brand-accent); width: 16px; height: 16px; margin-top: 2px; }

.list-section { margin-top: 1.75rem; }
.list-card .card-head select { margin-top: 0; width: auto; min-width: 12rem; padding-block: .45rem; font-size: .875rem; }
.filter-inline { margin: 0; }
.filter-inline label { display: flex; align-items: center; gap: .6rem; font-size: .8125rem; color: var(--ink-2); }
.doc-group-title { display: flex; align-items: center; justify-content: space-between; padding: .65rem 1.5rem; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: .75rem; font-weight: 800; color: var(--ink-2); }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: .85rem 1.5rem; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border-bottom: 0; }
.doc-row:hover { background: var(--surface-2); }
.doc-row form { margin: 0; }
.row-side { display: flex; align-items: center; gap: .5rem; }
.doc-row .file-cell { min-width: 0; }
.iconbtn-space { display: inline-block; width: 36px; }
.doc-row .file-main a { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-group:last-child .doc-row:last-child { border-bottom: 0; }

/* ---------- Büro ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 1.1rem 1.25rem; display: flex; flex-direction: column; gap: .35rem; color: var(--ink); text-decoration: none; }
a.kpi:hover { text-decoration: none; border-color: var(--line-strong); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; font-size: .8125rem; font-weight: 700; color: var(--ink-2); }
.kpi-ico { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.kpi-ico .i { width: 17px; height: 17px; }
.kpi-value { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-foot { font-size: .75rem; color: var(--ink-3); font-weight: 600; }
.kpi.is-alert .kpi-ico { background: var(--warn-bg); color: #A06A00; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: .8rem; align-items: center; padding: .8rem 1.25rem; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed .file-main { flex: 1; min-width: 0; }
.feed .file-main a { font-size: .875rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.filters { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.filters label { flex: 1 1 8rem; font-size: .75rem; color: var(--ink-2); }
.filters label.grow { flex: 2 1 14rem; }
.filters select, .filters input { font-size: .875rem; padding: .5rem .7rem; }
.filters select { padding-right: 2rem; }
.filter-actions { display: flex; gap: .8rem; align-items: center; }
.zip-all { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; padding: .7rem 1.25rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.search-wrap { position: relative; display: block; }
.search-wrap .i { position: absolute; left: .75rem; top: calc(50% + .175rem); transform: translateY(-50%); color: var(--ink-3); width: 16px; height: 16px; pointer-events: none; }
.search-wrap input { padding-left: 2.1rem !important; }

.bulkbar { position: sticky; top: 0; z-index: 2; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .7rem 1.25rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.bulkbar.is-active { background: var(--brand-soft); }
.bulk-count { margin-right: auto; font-weight: 700; font-size: .8125rem; color: var(--ink-2); }
.bulkbar.is-active .bulk-count { color: var(--brand-dark); }
.pager { display: flex; gap: 1.5rem; justify-content: center; align-items: center; margin-top: 1.25rem; font-size: .875rem; color: var(--ink-2); }

.doc-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 1.5rem; align-items: start; }
.doc-title { word-break: break-word; }
.preview { background: #E9EEEA; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; min-height: 60vh; display: flex; }
.preview iframe { border: 0; width: 100%; min-height: 80vh; }
.preview img { display: block; margin: auto; max-height: 80vh; object-fit: contain; padding: 1.5rem; }
.no-preview { margin: auto; text-align: center; padding: 2rem; color: var(--ink-2); }
.doc-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.25rem; margin: 0 0 1.25rem; font-size: .875rem; }
.facts dt { color: var(--ink-3); font-weight: 600; }
.facts dd { margin: 0; font-weight: 600; }
.history summary { cursor: pointer; color: var(--ink-2); font-weight: 700; font-size: .875rem; margin-top: 1.25rem; }
.history ul { margin-top: .6rem; font-size: .8125rem; }

.assign-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 1.25rem; }
.assign-head { display: flex; align-items: center; gap: .9rem; }
.assign-head h2 { margin: 0; font-variant-numeric: tabular-nums; }
.assign-head p { margin: .1rem 0 0; font-size: .8125rem; }
.thumbs { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: .9rem; }
.thumbs a { display: block; text-decoration: none; color: var(--ink); font-weight: 600; }
.thumbs img, .thumb-file {
  display: grid; place-items: center; width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2);
  font-weight: 800; color: var(--ink-3);
}
.thumbs a:hover img, .thumbs a:hover .thumb-file { border-color: var(--brand); }
.thumb-name { display: block; font-size: .75rem; margin-top: .35rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumbs .note { display: block; font-size: .75rem; }
.assign-form { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.assign-form label:first-of-type { flex: 1 1 16rem; }

.clients-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 1.5rem; align-items: start; }
.client-name { display: flex; align-items: center; gap: .75rem; }
.client-name .avatar { width: 34px; height: 34px; font-size: .75rem; }
.client-name a { color: var(--ink); }
.client-name a:hover { color: var(--brand); }
.client-admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.client-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.client-stats a { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem 1.2rem; color: var(--ink-2); font-size: .8125rem; font-weight: 700; text-decoration: none; box-shadow: var(--shadow); }
.client-stats a:hover { border-color: var(--line-strong); }
.client-stats strong { display: block; font-size: 1.5rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.user-list { list-style: none; padding: 0; margin: 0; }
.user-list li { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .75rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.user-list li:first-child { padding-top: 0; }
.user-list li span { display: block; }
.user-list li.is-inactive { color: var(--ink-3); }
.user-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.user-actions form { margin: 0; }

.invite-box { background: var(--brand-soft); border: 1px solid var(--brand-soft-2); border-radius: var(--r-lg); padding: 1.25rem 1.5rem; margin: 0 0 1.5rem; }
.invite-box h2 { margin-top: 0; font-size: 1rem; display: flex; align-items: center; gap: .5rem; }
.invite-box h2 .i { color: var(--brand); }
.invite-box p { font-size: .875rem; color: var(--ink-2); }
.copy-row { display: flex; gap: .5rem; }
.copy-row input { margin-top: 0 !important; font-family: ui-monospace, Consolas, monospace; font-size: .8125rem !important; }
.invite-share { display: flex; gap: .5rem; margin: .8rem 0 0; flex-wrap: wrap; }

.steps { padding-left: 1.25rem; }
.steps li { margin-bottom: 1.5rem; padding-left: .3rem; }
.qr-box { margin-top: .9rem; display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.qr-box img { border: 1px solid var(--line); border-radius: var(--r); background: #fff; padding: 6px; }
.secret { display: inline-block; margin-top: .3rem; padding: .25rem .5rem; background: var(--brand-soft); border-radius: 6px; letter-spacing: .05em; font-weight: 700; }
.message-page { padding: 4rem 0; text-align: center; }
.message-page .btn { margin-top: .5rem; }

/* ---------- Kleine Bildschirme ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid, .doc-grid, .clients-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .shell { flex-direction: column; background: none; }
  .sidebar { position: sticky; top: 0; z-index: 5; width: 100%; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; padding: .75rem 1rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { padding: 0; }
  .sidenav { order: 3; width: 100%; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .sidenav a { white-space: nowrap; padding: .45rem .7rem; font-size: .875rem; }
  .sidenav .count { margin-left: .25rem; }
  .side-user { margin: 0 0 0 auto; padding: 0; border: 0; }
  .side-user-text { display: none; }
  .shell-main .wrap { padding: 1.5rem 1rem 2.5rem; }
  .shell-main .footer-inner { padding: 0 1rem 1.5rem; }
  .client-grid { grid-template-columns: minmax(0, 1fr); }
  .client-admin-grid { grid-template-columns: minmax(0, 1fr); }
  .client-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { padding: 2rem 1.5rem; gap: 1.5rem; }
  .auth-art .auth-logo { width: 80px; }
  .auth-copy h1 { font-size: 1.75rem; }
  .auth-points, .auth-deco { display: none; }
  .table-card { overflow-x: auto; }
}
@media (max-width: 640px) {
  h1 { font-size: 1.5rem; }
  .wrap { padding: 1.25rem 1rem 2.5rem; }
  .topbar-inner { padding: .7rem 1rem; }
  .brand-sub, .account-text { display: none; }
  .brand img { height: 34px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .kpi { padding: .9rem 1rem; }
  .kpi-value { font-size: 1.6rem; }
  .upload-card { padding: 1.1rem; }
  .dropzone { padding: 1.75rem 1rem; }
  .upload-meta { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: minmax(0, 1fr); }
  .doc-row { padding: .8rem .75rem .8rem 1rem; gap: .5rem; }
  .row-side { gap: .15rem; }
  .file-cell { gap: .65rem; }
  .file-ico { width: 34px; height: 34px; }
  .ledger td.act .btn .lbl { display: none; }
  .doc-group-title { padding: .6rem 1rem; }
  .card-head { padding: 1rem; }
  .hide-sm { display: none; }
  .ledger th, .ledger td { padding: .7rem .6rem; }
  .ledger .file-cell, .client-name { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Anfragen, Rückfragen, Kontoabgleich ---------- */
.upload-meta { grid-template-columns: 190px 140px minmax(0, 1fr); }
.amount { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount.neg { color: var(--ink); }
.amount.pos { color: var(--gb-ink); }
.clip { max-width: 28rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-head h2 { display: flex; align-items: center; gap: .5rem; }
.card-head h2 .i { color: var(--brand); }

.req-card-wrap { margin-bottom: 1.5rem; border-color: var(--warn-line); box-shadow: 0 0 0 3px rgba(242, 221, 174, .35), var(--shadow); }
.req-list { list-style: none; margin: 0; padding: 0; }
.req { padding: 1.1rem 1.5rem 1.25rem; border-bottom: 1px solid var(--line); display: grid; gap: .8rem; }
.req:last-child { border-bottom: 0; }
.req-context { display: flex; align-items: center; gap: .8rem; }
.req-context .file-main { flex: 1; min-width: 0; }
.req-context .fname { font-weight: 800; }
.req-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-start; }
.req-upload { margin: 0; }
.req-answer { flex: 1 1 22rem; display: grid; gap: .5rem; margin: 0; }
.quick { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { font: inherit; font-size: .8125rem; font-weight: 700; padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.chip:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }
.reply-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: 0; }
.reply-row input { flex: 1 1 14rem; margin-top: 0 !important; }
.waiting-note { display: flex; gap: .5rem; align-items: center; color: var(--ink-2); font-size: .875rem; font-weight: 600; margin: -.5rem 0 1.25rem; }
.waiting-note .i { color: var(--ink-3); }
.file-btn.is-busy { opacity: .6; pointer-events: none; }

.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.msg { max-width: 46rem; padding: .65rem .9rem; border-radius: 12px; font-size: .875rem; }
.msg p { margin: 0; }
.msg p + p { margin-top: .3rem; }
.msg-buero { background: var(--brand-soft); border: 1px solid var(--brand-soft-2); }
.msg-mandant { background: var(--surface-2); border: 1px solid var(--line); margin-left: 2rem; }
.msg-meta { display: flex; gap: .6rem; align-items: baseline; font-size: .75rem; color: var(--ink-3); margin-bottom: .15rem; }
.msg-meta strong { color: var(--ink-2); }
.msg-att { display: flex; align-items: center; gap: .35rem; font-weight: 700; }
.msg-att .i { width: 16px; height: 16px; color: var(--gb-dot); }

.req-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 1rem; }
.req-admin { padding: 1.25rem; display: grid; gap: .9rem; align-content: start; }
.req-admin-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.req-admin-head .client-name { color: var(--ink); text-decoration: none; }
.req-admin .msg-mandant { margin-left: 0; }
.req-inline { padding: .9rem 0; border-bottom: 1px solid var(--line); display: grid; gap: .6rem; }
.req-inline:first-of-type { padding-top: 0; }
.inline-actions { margin: .25rem 0 1rem; }

.seg-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: 1rem; }
.seg-tabs a { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-size: .8125rem; font-weight: 700; text-decoration: none; }
.seg-tabs a:hover { border-color: var(--ink-3); color: var(--ink); }
.seg-tabs a.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.seg-tabs a span { display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .35rem; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .6875rem; }
.seg-tabs a span.warn { background: var(--ab-bg); color: var(--ab-ink); }
.seg-tabs a span.ok { background: var(--gb-bg); color: var(--gb-ink); }
.seg-tabs a.is-active span { background: rgba(255, 255, 255, .2); color: #fff; }

.bulk-msg { flex: 1 1 14rem; margin-top: 0 !important; padding: .4rem .7rem !important; font-size: .8125rem !important; }
.tx-table td { vertical-align: top; }
.tx-table .fname { font-weight: 700; color: var(--ink); }
.tx-purpose { display: block; max-width: 30rem; font-size: .75rem; color: var(--ink-3); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-table tr.tx-offen td:first-child { box-shadow: inset 3px 0 0 var(--ab-dot); }
.tx-doc { min-width: 14rem; }
.tx-state { display: flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .8125rem; }
.tx-state .i { width: 16px; height: 16px; }
.tx-state a { color: var(--ink); max-width: 15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.tx-state.ok .i { color: var(--gb-dot); }
.tx-state.none { color: var(--ink-3); }
.tx-state.asked { color: var(--neu-ink); }
.tx-state.miss { color: var(--ab-ink); }
.tx-state.miss .i { color: var(--ab-dot); }
.tx-sub { display: flex; gap: .6rem; flex-wrap: wrap; font-size: .75rem; color: var(--ink-3); font-weight: 500; margin-top: .15rem; padding-left: 1.4rem; }
.tx-sub .linkbtn, .tx-sub a { font-size: .75rem; }
.assign-panel { border-color: var(--brand-soft-2); background: var(--brand-soft); }
.danger-zone { margin-top: 1.25rem; }

.progress { display: block; height: 5px; border-radius: 5px; background: var(--ab-bg); overflow: hidden; margin-top: .45rem; max-width: 18rem; }
.progress-bar { display: block; height: 100%; background: var(--gb-dot); border-radius: 5px; }
.progress-0 { width: 0; } .progress-10 { width: 10%; } .progress-20 { width: 20%; } .progress-30 { width: 30%; } .progress-40 { width: 40%; }
.progress-50 { width: 50%; } .progress-60 { width: 60%; } .progress-70 { width: 70%; } .progress-80 { width: 80%; } .progress-90 { width: 90%; } .progress-100 { width: 100%; }
.notice > span { flex: 1; }

@media (max-width: 640px) {
  .upload-meta { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .upload-meta label:last-child { grid-column: 1 / -1; }
  .req { padding: 1rem; }
  .req-grid { grid-template-columns: minmax(0, 1fr); }
  .msg-mandant { margin-left: .75rem; }
  .clip { max-width: 12rem; }
}

.side-box .copy-row { flex-direction: column; align-items: stretch; }
.side-box .copy-row input { font-size: .8125rem !important; }

/* ---------- Interessenten ---------- */
.lead-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: 1.5rem; align-items: start; }
.section-title { font-size: 1rem; margin: 0 0 .75rem; }
.lead-list { display: grid; gap: 1rem; }
.ia-card { padding: 1.1rem 1.35rem 1rem; display: grid; gap: .7rem; }
.ia-card.is-abgesagt, .ia-card.is-erledigt { opacity: .75; }
.lead-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.lead-head h3 { margin: .15rem 0 0; font-size: 1.05rem; }
.lead-kind { display: flex; align-items: center; gap: .45rem; margin: 0; font-size: .78rem; font-weight: 700; color: var(--brand); }
.lead-kind .i { width: 16px; height: 16px; }
.lead-when { display: flex; align-items: center; gap: .5rem; margin: 0; padding: .55rem .75rem; border-radius: var(--r); background: var(--brand-50, #EEF4EF); }
.lead-when .i { color: var(--brand); }
.lead-contact { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .875rem; }
.lead-contact a { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; }
.lead-contact .i { width: 15px; height: 15px; }
.lead-calc { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.lead-calc div { padding: .35rem .6rem; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: .8125rem; }
.lead-calc dt { color: var(--ink-2); font-size: .72rem; }
.lead-calc dd { margin: 0; font-weight: 700; }
.lead-msg { margin: 0; white-space: pre-line; font-size: .9rem; padding-left: .8rem; border-left: 3px solid var(--line-strong); }
.lead-foot { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; padding-top: .2rem; }
.lead-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.lead-done { margin-top: 1.5rem; }
.lead-done summary { cursor: pointer; font-weight: 700; color: var(--ink-2); margin-bottom: .8rem; }
.lead-times .time-row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); align-items: center; gap: .6rem; font-size: .85rem; }
.lead-times .time-row input { padding-top: .45rem; padding-bottom: .45rem; }
.lead-times .stack > .time-row + .time-row { margin-top: .45rem; }
.time-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.time-opts select { width: 100%; }
.time-opts label { font-size: .75rem; color: var(--ink-2); }
.time-opts select { font-size: .8rem; padding: .4rem 1.6rem .4rem .5rem; }
@media (max-width: 960px) {
  .lead-layout { grid-template-columns: minmax(0, 1fr); }
}
