/* Portal und Admin */
.app { padding-top: 48px; padding-bottom: 96px; min-height: 70vh; }
.app h1, .schublade h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 40px; line-height: 1.1; }
.app h2, .schublade h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 26px; }
.schublade .leiste p { margin: 6px 0 0; color: var(--grau); }
.schublade .panel + .panel { margin-top: 0; }
.leiste { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; }
.leiste p { margin: 6px 0 0; color: var(--grau); }
.panel { background: var(--papier); border: 1px solid var(--linie); border-radius: 6px; padding: 24px; }
.panel + .panel { margin-top: 20px; }
.login { max-width: 420px; margin: 40px auto; display: flex; flex-direction: column; gap: 18px; }
.tab-leiste { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--linie); margin-bottom: 28px; }
.tab { min-height: 46px; padding: 0 18px; border: 0; background: transparent; cursor: pointer; font-weight: 500; color: var(--grau); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--tinte); border-bottom-color: var(--tinte); }
.tab .zahl { font-family: var(--mono); font-size: 11px; margin-left: 6px; color: var(--grau); }
.tabelle { overflow-x: auto; background: var(--papier); border: 1px solid var(--linie); border-radius: 6px; }
.tabelle table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; }
.tabelle th { text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--grau); text-transform: uppercase; padding: 14px 16px; white-space: nowrap; }
.tabelle td { padding: 14px 16px; border-top: 1px solid var(--linie-hell); vertical-align: middle; }
.tabelle tr.klickbar { cursor: pointer; }
.tabelle tr.klickbar:hover td { background: #F7F3EC; }
.tabelle td.r, .tabelle th.r { text-align: right; }
.raster-2 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.detail { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
.dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; font-size: 14px; }
.dl dt { font-family: var(--mono); font-size: 11px; color: var(--grau); text-transform: uppercase; padding-top: 3px; }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.zeitleiste { display: flex; flex-direction: column; }
.zeitleiste div { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 8px 0; align-items: start; }
.zeitleiste .kreis { width: 24px; height: 24px; border-radius: 50%; border: 1px solid #C9BFB0; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; color: var(--grau); background: #fff; }
.zeitleiste .fertig .kreis { background: var(--tinte); border-color: var(--tinte); color: var(--kalk); }
.zeitleiste .jetzt .kreis { border: 2px solid var(--tinte); color: var(--tinte); }
.zeitleiste b { display: block; font-weight: 500; font-size: 15px; }
.zeitleiste small { color: var(--grau); font-size: 12px; }
.kacheln { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin-bottom: 24px; }
.kachel { background: var(--papier); border: 1px solid var(--linie); border-radius: 6px; padding: 18px 20px; }
.kachel span { display: block; font-family: var(--mono); font-size: 11px; color: var(--grau); text-transform: uppercase; }
.kachel b { display: block; margin-top: 6px; font-family: var(--mono); font-size: 24px; font-weight: 500; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn.klein { min-height: 40px; padding: 0 14px; font-size: 14px; }
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filter select, .filter input { min-height: 40px; padding: 0 12px; border: 1px solid #C9BFB0; border-radius: 4px; background: #fff; font-size: 14px; }
.hinweis { font-size: 13px; color: var(--grau); }
.codefeld { display: flex; gap: 8px; }
.codefeld input { flex: 1; min-width: 0; min-height: 42px; padding: 0 12px; font-family: var(--mono); font-size: 13px; border: 1px solid #C9BFB0; border-radius: 4px; background: #fff; }
.schublade { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: flex-end; background: rgba(28, 26, 23, .35); }
.schublade > div { width: min(720px, 100%); height: 100%; overflow-y: auto; background: var(--kalk); padding: 28px; box-shadow: -20px 0 60px rgba(0, 0, 0, .2); display: flex; flex-direction: column; gap: 20px; }
.check-zeile { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.check-zeile input { width: 18px; height: 18px; accent-color: var(--tinte); }
/* Unterlagen im Kanzlei-Portal */
.unterlagen-kopf { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 16px; }
.unterlagen-kopf .hinweis { margin: 0; font-size: 13px; }
.datei-zone { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 18px 20px; border: 1.5px dashed #CFC6B8; border-radius: 16px; cursor: pointer; transition: border-color .2s, background .2s; }
.datei-zone:hover, .datei-zone.ueber { border-color: #12B862; background: rgba(43, 234, 126, .06); }
.datei-zone small { color: var(--grau); font-size: 13px; }
.datei-zone .sr { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.datei-status { margin: 10px 0 0; }
.dateiliste { list-style: none; margin: 14px 0 0; padding: 0; }
.datei { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "typ name weg" "typ meta weg"; gap: 2px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--linie, #E6DFD4); }
.datei-typ { grid-area: typ; width: 40px; height: 40px; border-radius: 10px; background: #F1ECE3; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .04em; color: var(--tinte); }
.datei-name { grid-area: name; font-weight: 500; color: var(--tinte); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.datei-name:hover { text-decoration: underline; }
.datei-meta { grid-area: meta; font-size: 12px; color: var(--grau); }
.datei-weg { grid-area: weg; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--grau); font-size: 20px; cursor: pointer; }
.datei-weg:hover { background: #F1ECE3; color: var(--tinte); }
.datei-leer { padding: 12px 0; color: var(--grau); font-size: 14px; }
/* ===== Portal: Einstieg, Registrierung, Glocke, Onboarding ===== */
.panel { border-radius: 22px; }
.einstieg { max-width: 480px; margin: 48px auto; padding: 36px; gap: 20px; box-shadow: 0 40px 80px -50px rgba(20, 18, 15, .35); }
.einstieg h1 { margin: 0; font-size: clamp(30px, 4vw, 40px); letter-spacing: -.03em; line-height: 1.05; }
.einstieg form { display: flex; flex-direction: column; gap: 16px; }
.einstieg .btn { border-radius: 980px; min-height: 52px; }
.link-knopf { align-self: flex-start; border: 0; background: none; padding: 4px 0; color: var(--grau); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-knopf:hover { color: var(--tinte); }
.einstieg-neu { display: flex; flex-direction: column; gap: 10px; padding-top: 22px; border-top: 1px solid var(--linie); }
.einstieg-neu span { color: var(--grau); font-size: 14px; }
.kicker-gruen { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #0B6B37; }
.haken-zeile { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--grau); line-height: 1.45; cursor: pointer; }
.haken-zeile input { width: 18px; height: 18px; margin-top: 1px; accent-color: #12B862; flex-shrink: 0; }
.haken-zeile a { color: var(--tinte); }
.reg-form .raster-2 { gap: 14px; }
.postfach { text-align: left; }
.brief { width: 84px; height: 84px; border-radius: 50%; background: rgba(43, 234, 126, .14); display: flex; align-items: center; justify-content: center; animation: brief-rein .8s cubic-bezier(.34, 1.56, .64, 1) both; }
.brief svg { width: 42px; height: 32px; fill: none; stroke: var(--tinte); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.brief svg path { stroke: #12B862; stroke-dasharray: 80; stroke-dashoffset: 80; animation: brief-zu 1s ease .5s forwards; }
@keyframes brief-rein { from { transform: scale(.5) translateY(20px); opacity: 0; } }
@keyframes brief-zu { to { stroke-dashoffset: 0; } }
.schrittband { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0; padding: 0; position: relative; }
.schrittband li { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--grau); }
.schrittband i { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 600; background: #fff; box-shadow: 0 0 0 1.5px #DDD5C8; }
.schrittband .fertig i { background: var(--tinte); color: #2BEA7E; box-shadow: none; }
.schrittband .jetzt i { box-shadow: 0 0 0 2px #12B862, 0 0 0 6px rgba(43, 234, 126, .2); color: var(--tinte); animation: puls-ring 1.8s ease-in-out infinite; }
.schrittband .jetzt span { color: var(--tinte); font-weight: 600; }
@keyframes puls-ring { 50% { box-shadow: 0 0 0 2px #12B862, 0 0 0 9px rgba(43, 234, 126, .08); } }
.hinweis.klein { font-size: 13px; }
.staerke { --s: 0; height: 22px; position: relative; margin-top: -6px; }
.staerke i { display: block; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--farbe, #D9534F) calc(var(--s) * 1%), #ECE6DB 0); transition: background .3s; }
.staerke small { display: block; margin-top: 4px; font-size: 12px; color: var(--grau); }
.staerke.s1 { --farbe: #E0A82E; } .staerke.s2 { --farbe: #2BEA7E; } .staerke.s3 { --farbe: #12B862; }
/* Glocke */
.glocke-wrap { position: relative; }
.glocke { position: relative; width: 42px; height: 42px; border: 0; border-radius: 50%; background: none; cursor: pointer; color: var(--tinte); }
.glocke:hover { background: rgba(20, 18, 15, .06); }
.glocke svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.glocke b { position: absolute; top: 5px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #12B862; color: #fff; font-size: 10.5px; line-height: 17px; display: none; }
.glocke.neu b { display: block; animation: brief-rein .5s cubic-bezier(.34, 1.56, .64, 1); }
.glocke.neu svg { animation: wackeln 1.2s ease 2; transform-origin: 50% 10%; }
@keyframes wackeln { 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-4deg); } 75% { transform: none; } }
.glocke-panel { position: absolute; right: 0; top: 50px; z-index: 70; width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; padding: 18px; border-radius: 18px; background: #fff; box-shadow: 0 30px 60px -20px rgba(20, 18, 15, .35), 0 0 0 1px rgba(20, 18, 15, .06); }
.glocke-panel h3 { margin: 0 0 8px; font-size: 16px; }
.meldungen { list-style: none; margin: 0; padding: 0; }
.meldungen li { display: grid; grid-template-columns: 10px 1fr; gap: 12px; padding: 12px 6px; border-top: 1px solid #F0EBE2; cursor: pointer; border-radius: 10px; }
.meldungen li:hover { background: #FAF8F4; }
.meldungen li.leer { display: block; color: var(--grau); font-size: 14px; cursor: default; }
.meldungen i { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #DDD5C8; }
.meldungen .ungelesen i { background: #12B862; box-shadow: 0 0 0 3px rgba(43, 234, 126, .2); }
.meldungen b { display: block; font-size: 13.5px; font-weight: 600; }
.meldungen small { display: block; color: var(--grau); font-size: 12.5px; line-height: 1.4; margin: 2px 0; }
.meldungen time { font-size: 11px; color: var(--grau); font-family: var(--mono); }
.einst { margin-top: 12px; padding-top: 14px; border-top: 1px solid #F0EBE2; }
.einst h4 { margin: 0 0 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--grau); }
.einst-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; }
.einst-zeile small { max-width: 60%; color: var(--grau); font-size: 12px; text-align: right; }
.einst-zeile .gruen { color: #0B6B37; font-size: 13px; }
.schalter { position: relative; display: inline-block; width: 44px; height: 26px; flex-shrink: 0; }
.schalter input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.schalter i { position: absolute; inset: 0; border-radius: 13px; background: #DDD5C8; transition: background .2s; }
.schalter i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.schalter input:checked + i { background: #12B862; }
.schalter input:checked + i::after { transform: translateX(18px); }
.kopf-name { white-space: nowrap; }
@media (max-width: 640px) { .kopf-name { display: none; } }
/* Onboarding */
.onboarding { margin: 0 0 20px; padding: 24px 26px; }
.onboarding.frisch { animation: brief-rein .7s cubic-bezier(.34, 1.56, .64, 1) both; box-shadow: 0 0 0 2px rgba(43, 234, 126, .45); }
.ob-kopf { display: grid; grid-template-columns: 64px 1fr auto; gap: 18px; align-items: center; }
.ob-kopf h2 { margin: 2px 0 0; }
.ob-ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(#12B862 calc(var(--p) * 1%), #ECE6DB 0); display: flex; align-items: center; justify-content: center; position: relative; }
.ob-ring::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--papier, #fff); }
.ob-ring b { position: relative; font-size: 14px; }
.ob-schritte { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 20px 0 0; padding: 0; }
.ob-schritte li { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; background: #FAF8F4; animation: brief-rein .5s cubic-bezier(.16, 1, .3, 1) calc(var(--i) * .08s) both; }
.ob-schritte li i { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 600; background: #fff; box-shadow: 0 0 0 1.5px #DDD5C8; }
.ob-schritte li.fertig { background: rgba(43, 234, 126, .1); }
.ob-schritte li.fertig i { background: var(--tinte); color: #2BEA7E; box-shadow: none; }
.ob-schritte b { display: block; font-size: 14px; }
.ob-schritte small { display: block; color: var(--grau); font-size: 12.5px; line-height: 1.35; }
.ob-schritte .btn { position: absolute; top: 12px; right: 12px; min-height: 30px; width: 30px; padding: 0; border-radius: 50%; }
@media (max-width: 980px) { .ob-schritte { grid-template-columns: minmax(0, 1fr); } .ob-schritte li { flex-direction: row; align-items: center; } .ob-schritte .btn { position: static; margin-left: auto; } }
.downloads { display: flex; flex-direction: column; gap: 12px; }
.btn.download { justify-content: center; border-radius: 980px; }
.panel-fertig { box-shadow: 0 0 0 2px rgba(43, 234, 126, .45); }
.status-zelle { white-space: nowrap; }
.mini-laden { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-left: 8px; border-radius: 50%; background: #2BEA7E; color: #0E1A12; font-weight: 700; text-decoration: none; font-size: 14px; vertical-align: middle; }
.mini-laden.r { background: var(--tinte); color: #fff; font-size: 12px; }
.panel-fertig { box-shadow: none; }
.onboarding.frisch { box-shadow: none; }

/* Kanzlei-Portal: Baukasten im neuen Fall */
.pb-form { display: flex; flex-direction: column; gap: 16px; max-width: 860px; }
.pb-label { margin: 8px 0 -4px; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--grau); }
.pb-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.pb-chip { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border: 1px solid var(--linie); border-radius: 14px; background: #fff; font: inherit; cursor: pointer; color: var(--tinte); }
.pb-chip small { font-size: 12.5px; color: var(--grau); }
.pb-chip.an { background: var(--tinte); color: #fff; border-color: var(--tinte); }
.pb-chip.an small { color: #CFC8BC; }
.pb-liste { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.pb-baustein { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px 14px; border-radius: 14px; background: var(--grund, #F3EFE8); cursor: pointer; }
.pb-baustein input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--tinte); }
.pb-baustein span { display: grid; gap: 2px; min-width: 0; }
.pb-baustein small { font-size: 12.5px; color: var(--grau); line-height: 1.4; }
.pb-baustein em { font-style: normal; font-size: 12.5px; color: var(--grau); white-space: nowrap; }
.pb-dateien { list-style: none; margin: -6px 0 0; padding: 0; display: grid; gap: 4px; }
.pb-dateien li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 10px; background: var(--grund, #F3EFE8); font-size: 14px; }
.pb-dateien button { border: 0; background: none; font-size: 18px; cursor: pointer; }
.pb-angebot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 16px; }
.pb-angebot p { margin: 0; }
.pb-angebot .pb-label { width: 100%; margin: 0; }
@media (max-width: 700px) { .pb-liste { grid-template-columns: 1fr; } }
.pb-weitere { display: none; }
.pb-form.alle .pb-weitere, .pb-weitere:has(input:checked) { display: grid; }
.pb-alle { min-height: 44px; border: 1px dashed var(--linie); border-radius: 14px; background: transparent; font: 600 14.5px inherit; font-family: inherit; color: var(--tinte); cursor: pointer; }
.pb-alle[hidden] { display: none; }
