/* Kundenportal – Kopfband in der Hauptfarbe, schwebende Karten, Akzentfarbe nur für Hauptaktionen.
   Farben kommen pro Firma als CSS-Variablen aus portal/base.html. */
:root {
  --p-primary: #1A2A3A; --p-primary-tint: #E8EAEB; --p-primary-soft: #C6CACE;
  --p-accent: #EB4D3D; --p-accent-ink: #CF4436; --p-accent-tint: #FDEDEC;
  --p-bg: #F2F3F5; --p-card: #fff; --p-ink: #0F1115; --p-ink-2: #4A4E58; --p-ink-3: #6B6F79; --p-line: #ECEDF0;
  --p-ok: #11663F; --p-ok-bg: #E3F6EC; --p-warn: #8A5200; --p-warn-bg: #FFF4DC; --p-bad: #A3260F; --p-bad-bg: #FFE9E5;
  --p-r: 22px; --p-shadow: 0 1px 2px rgba(16,24,40,.05), 0 12px 32px -16px rgba(16,24,40,.18);
  --p-font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --p-display: 'Bricolage Grotesque', 'Manrope', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.p-body { margin: 0; min-height: 100vh; background: var(--p-bg); color: var(--p-ink); font: 500 15px/1.5 var(--p-font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--p-accent) 55%, transparent); outline-offset: 2px; }
.p-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kopfband ---------- */
.p-band { position: absolute; left: 0; right: 0; top: 0; height: 400px; background: var(--p-primary); overflow: hidden; z-index: 0; }
.p-band--short { height: 290px; }
.p-band--login { height: 420px; }
.p-link { position: absolute; width: 170px; height: 80px; border-radius: 40px; border: 13px solid var(--p-accent); transform: rotate(-16deg); }
.p-link--ghost { border-color: rgba(255,255,255,.14); }
.p-band .p-link { right: max(4vw, calc(50% - 600px + 190px)); top: 112px; }
.p-band .p-link--ghost { right: max(calc(4vw - 110px), calc(50% - 600px + 80px)); top: 140px; }
.p-band--short .p-link { width: 140px; height: 66px; border-width: 11px; top: 118px; right: max(30vw, calc(50% - 620px + 480px)); }
.p-band--short .p-link--ghost { top: 141px; right: max(calc(30vw - 90px), calc(50% - 620px + 390px)); }
.p-band--login .p-link { left: max(4vw, calc(50% - 570px)); right: auto; top: 230px; }
.p-band--login .p-link--ghost { left: max(calc(4vw + 110px), calc(50% - 460px)); right: auto; top: 258px; }

.p-head { position: relative; z-index: 2; height: 84px; display: flex; align-items: center; gap: 40px; padding: 0 max(24px, calc(50% - 656px)); color: #fff; }
.p-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.p-brand img { height: 40px; width: auto; display: block; }
.p-brand__name { font: 800 21px/1.1 var(--p-display); letter-spacing: -.02em; }
.p-nav { display: flex; gap: 4px; }
.p-nav a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; font-weight: 700; font-size: 14px; color: rgba(255,255,255,.82); transition: background-color .15s ease, color .15s ease; }
.p-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.p-nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.16); }
.p-nav__badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--p-accent); color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.p-head__end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.p-who { position: relative; }
.p-who > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 6px 0 16px; border-radius: 999px; background: rgba(255,255,255,.14); font-weight: 700; font-size: 14px; }
.p-who > summary::-webkit-details-marker { display: none; }
.p-who__avatar { width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--p-primary); font-weight: 800; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.p-who__menu { position: absolute; right: 0; top: calc(100% + 8px); width: 270px; background: #fff; color: var(--p-ink); border-radius: 18px; box-shadow: 0 20px 50px -20px rgba(16,24,40,.45); padding: 8px; z-index: 20; }
.p-who__menu .p-meta { padding: 10px 12px 8px; }
.p-who__menu a, .p-who__menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; border: 0; background: none; font-weight: 700; font-size: 14px; cursor: pointer; text-align: left; }
.p-who__menu a:hover, .p-who__menu button:hover { background: var(--p-bg); }

/* ---------- Inhalt ---------- */
.p-main { position: relative; z-index: 1; width: min(1200px, calc(100% - 48px)); margin: 0 auto; padding: 28px 0 64px; display: flex; flex-direction: column; gap: 28px; }
.p-main--wide { width: min(1240px, calc(100% - 48px)); }
.p-hello { color: #fff; }
.p-hello__sub { font-size: 16px; font-weight: 600; opacity: .85; }
.p-nowrap { white-space: nowrap; }
.p-hello h1 { margin: 8px 0 0; font: 800 clamp(32px, 4.4vw, 52px)/1.05 var(--p-display); letter-spacing: -.03em; }
.p-pagehead { color: #fff; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.p-pagehead h1 { margin: 10px 0 0; font: 800 clamp(28px, 3.6vw, 42px)/1.05 var(--p-display); letter-spacing: -.03em; }
.p-back { font-size: 14px; font-weight: 700; opacity: .85; }
.p-back:hover { opacity: 1; }
.p-pagehead__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.p-card { background: var(--p-card); border-radius: var(--p-r); box-shadow: var(--p-shadow); }
.p-pad { padding: 28px; }
.p-h2 { margin: 0; font: 800 22px/1.2 var(--p-display); letter-spacing: -.01em; }
.p-h3 { margin: 0; font: 800 18px/1.25 var(--p-display); }
.p-label { font-weight: 700; color: var(--p-ink-2); font-size: 14px; }
.p-meta { font-size: 13px; color: var(--p-ink-3); }
.p-big { font: 800 clamp(36px, 4vw, 52px)/1 var(--p-display); letter-spacing: -.03em; }
.p-mid { font: 800 34px/1.05 var(--p-display); letter-spacing: -.02em; }
.p-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.p-stack { display: flex; flex-direction: column; gap: 14px; }

/* Knöpfe */
.p-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: 999px; border: 0; font: 700 15px var(--p-font); cursor: pointer; white-space: nowrap; background: #F1F2F4; color: var(--p-ink); transition: transform .12s ease, filter .15s ease, background-color .15s ease; }
.p-btn:hover { filter: brightness(.96); }
.p-btn:active { transform: scale(.98); }
.p-btn--accent { background: var(--p-accent-ink); color: #fff; }
.p-btn--primary { background: var(--p-primary); color: #fff; }
.p-btn--light { background: rgba(255,255,255,.16); color: #fff; height: 44px; }
.p-btn--white { background: #fff; color: var(--p-primary); }
.p-btn--lg { height: 58px; font-size: 16px; }
.p-btn--block { width: 100%; }
.p-btn--danger { color: var(--p-bad); }
.p-btn svg { flex-shrink: 0; }
.p-btn[disabled] { opacity: .55; cursor: not-allowed; }
.p-textlink { font-weight: 800; color: var(--p-primary); }
.p-textlink:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Status */
.p-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.p-chip--ok { background: var(--p-ok-bg); color: var(--p-ok); }
.p-chip--warn { background: var(--p-warn-bg); color: var(--p-warn); }
.p-chip--bad { background: var(--p-bad-bg); color: var(--p-bad); }
.p-chip--accent { background: var(--p-accent-tint); color: var(--p-accent-ink); }
.p-chip--muted { background: #EEF0F2; color: var(--p-ink-2); }

/* Übersicht */
.p-kpis { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 24px; margin-top: 18px; }
.p-kpi { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.p-split { height: 10px; border-radius: 999px; background: #F1F2F4; display: flex; overflow: hidden; }
.p-split span:first-child { background: #E5533D; }
.p-split span:last-child { background: #F2B544; }
.p-legend { display: flex; gap: 18px; font-size: 13px; color: var(--p-ink-2); flex-wrap: wrap; }
.p-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }
.p-bars { display: flex; align-items: flex-end; gap: 7px; height: 62px; margin-top: auto; }
.p-bars span { flex: 1; border-radius: 6px; background: var(--p-primary-soft); min-height: 3px; }
.p-bars span.is-now { background: var(--p-accent); }
.p-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.p-tile { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border: 0; text-align: left; cursor: pointer; width: 100%; font: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.p-tile:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 18px 38px -18px rgba(16,24,40,.28); }
.p-tile strong { font-size: 15px; display: block; }
.p-ico { width: 48px; height: 48px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--p-primary-tint); color: var(--p-primary); }
.p-ico--sm { width: 44px; height: 44px; border-radius: 14px; }
.p-ico--accent { background: var(--p-accent-tint); color: var(--p-accent-ink); }
.p-ico--ok { background: var(--p-ok-bg); color: var(--p-ok); }
.p-ico--warn { background: var(--p-warn-bg); color: var(--p-warn); }
.p-ico--bad { background: var(--p-bad-bg); color: var(--p-bad); }
.p-ico--muted { background: #EEF0F2; color: var(--p-ink-2); }
.p-chev { color: #9A9EA8; flex-shrink: 0; }
.p-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.p-aside { display: flex; flex-direction: column; gap: 24px; }

/* Listen */
.p-listhead { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 24px 14px; flex-wrap: wrap; }
.p-seg { display: inline-flex; padding: 4px; border-radius: 999px; background: #F1F2F4; gap: 2px; flex-wrap: wrap; }
.p-seg a { height: 34px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 13px; font-weight: 700; color: var(--p-ink-2); }
.p-seg a[aria-current="page"] { background: #fff; color: var(--p-ink); box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.p-docrow { display: grid; grid-template-columns: 44px minmax(0, 1fr) 170px 130px 20px; align-items: center; gap: 16px; padding: 14px 24px; transition: background-color .12s ease; }
.p-docrow:hover { background: #F8F9FA; }
.p-docrow__title { font-weight: 800; }
.p-docrow__amount { text-align: right; font-weight: 800; font-size: 15px; }
.p-empty { padding: 40px 24px; text-align: center; color: var(--p-ink-3); }
.p-listfoot { padding: 12px 24px 18px; }

/* Beleg-Ansicht */
.p-docgrid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 28px; align-items: start; }
.p-paper { border-radius: 16px; padding: 56px 64px; display: flex; flex-direction: column; gap: 24px; min-height: 640px; }
.p-paper__top { display: flex; justify-content: space-between; gap: 20px; }
.p-paper__company { font: 800 20px var(--p-display); }
.p-paper__addr { font-size: 12px; color: var(--p-ink-3); text-align: right; line-height: 1.6; }
.p-paper__to { font-size: 13px; line-height: 1.55; }
.p-paper__titlerow { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.p-paper__titlerow h2 { margin: 0; font-size: 22px; font-weight: 800; }
.p-paper__dates { font-size: 12px; line-height: 1.7; text-align: right; color: var(--p-ink-2); }
.p-paper__text { margin: 0; font-size: 13px; line-height: 1.6; color: var(--p-ink-2); white-space: pre-line; }
.p-items { width: 100%; border-collapse: collapse; font-size: 13px; }
.p-items th { text-align: left; font-size: 12px; color: var(--p-ink-3); font-weight: 700; padding: 0 6px 10px; }
.p-items td { padding: 12px 6px; border-top: 1px solid var(--p-line); vertical-align: top; line-height: 1.45; }
.p-items .num { text-align: right; white-space: nowrap; }
.p-items .desc { white-space: pre-line; }
.p-items tr.is-heading td { font-weight: 800; font-size: 14px; padding-top: 18px; }
.p-items tr.is-alt td { color: #8C909A; }
.p-items tr.is-alt.is-on td { color: var(--p-ink); background: var(--p-accent-tint); }
.p-items tr.is-sub td { font-weight: 700; color: var(--p-ink-2); }
.p-sums { align-self: flex-end; width: min(300px, 100%); font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.p-sums div { display: flex; justify-content: space-between; gap: 16px; }
.p-sums .is-total { padding-top: 8px; border-top: 1.5px solid var(--p-ink); font-weight: 800; font-size: 15px; }
.p-side { padding: 28px; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 20px; }
.p-opt { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 18px; background: #F6F7F8; cursor: pointer; transition: background-color .15s ease, box-shadow .15s ease; }
.p-opt:has(input:checked) { background: var(--p-accent-tint); box-shadow: inset 0 0 0 2px var(--p-accent-ink); }
.p-opt input { position: absolute; opacity: 0; pointer-events: none; }
.p-switch { width: 46px; height: 28px; border-radius: 999px; background: #D3D6DC; position: relative; flex-shrink: 0; transition: background-color .15s ease; }
.p-switch::after { content: ''; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .18s ease; }
.p-opt input:checked + .p-switch { background: var(--p-accent-ink); }
.p-opt input:checked + .p-switch::after { transform: translateX(18px); }
.p-opt input:focus-visible + .p-switch { outline: 3px solid color-mix(in srgb, var(--p-accent) 55%, transparent); outline-offset: 2px; }
.p-totalbox { padding: 20px; border-radius: 18px; background: #F6F7F8; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.p-totalbox div { display: flex; justify-content: space-between; color: var(--p-ink-2); }
.p-totalbox .is-total { margin-top: 8px; align-items: baseline; color: var(--p-ink); }
.p-totalbox .is-total span:last-child { font: 800 32px var(--p-display); letter-spacing: -.02em; }
.p-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.p-giro { display: flex; gap: 18px; align-items: center; padding: 18px; border-radius: 18px; background: var(--p-primary-tint); }
.p-giro__code { width: 128px; height: 128px; border-radius: 14px; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 10px; }
.p-giro__code svg { width: 100%; height: 100%; }
.p-kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: #F6F7F8; font-size: 14px; }
.p-kv strong { word-break: break-all; text-align: right; }
.p-copy { font: 800 13px var(--p-font); background: none; border: 0; cursor: pointer; padding: 0; color: var(--p-primary); }
.p-timeline { display: flex; flex-direction: column; gap: 16px; }
.p-tl { display: flex; gap: 14px; font-size: 14px; line-height: 1.45; }
.p-tl i { width: 12px; height: 12px; border-radius: 50%; background: var(--p-primary); margin-top: 4px; flex-shrink: 0; }
.p-tl i.is-open { background: none; box-shadow: inset 0 0 0 2.5px #C9CDD5; }

/* Hinweise */
.p-flash { padding: 14px 18px; border-radius: 16px; font-weight: 700; font-size: 14px; background: #fff; box-shadow: var(--p-shadow); }
.p-flash--success { color: var(--p-ok); }
.p-flash--error { color: var(--p-bad); }
.p-note { padding: 18px 20px; border-radius: 18px; background: #F6F7F8; font-size: 14px; line-height: 1.55; }

/* Formulare */
.p-field { display: flex; flex-direction: column; gap: 8px; }
.p-field label, .p-field .p-flabel { font-size: 14px; font-weight: 700; }
.p-input, .p-textarea { width: 100%; border: 0; border-radius: 16px; background: #F4F5F7; padding: 0 16px; height: 54px; font: 600 16px var(--p-font); color: var(--p-ink); outline: 0; transition: box-shadow .15s ease, background-color .15s ease; }
.p-textarea { height: auto; min-height: 120px; padding: 14px 16px; resize: vertical; line-height: 1.5; }
.p-input:focus, .p-textarea:focus { background: #fff; box-shadow: inset 0 0 0 2px var(--p-primary); }
.p-input--strong { background: #fff; box-shadow: inset 0 0 0 2px var(--p-primary); }
.p-check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.55; cursor: pointer; }
.p-check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--p-primary); flex-shrink: 0; }

/* Dialoge */
.p-dialog { border: 0; padding: 0; border-radius: 28px; width: min(640px, calc(100% - 24px)); max-height: calc(100dvh - 24px); background: #fff; color: var(--p-ink); box-shadow: 0 40px 100px -30px rgba(0,0,0,.55); }
.p-dialog::backdrop { background: rgba(15,17,21,.5); }
.p-dialog[open] { animation: p-in .22s cubic-bezier(.2,.8,.2,1); }
@keyframes p-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.p-dialog form { padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.p-dialog__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.p-dialog__head h2 { margin: 0; font: 800 28px/1.1 var(--p-display); letter-spacing: -.02em; }
.p-x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #F1F2F4; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.p-steps { display: flex; gap: 18px; font-size: 13px; font-weight: 700; }
.p-steps span { display: inline-flex; align-items: center; gap: 8px; }
.p-steps b { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; background: var(--p-primary-tint); color: var(--p-primary); }
.p-steps .is-now b { background: var(--p-primary); color: #fff; }
.p-sign { position: relative; height: 180px; border-radius: 20px; background: #F4F5F7; touch-action: none; }
.p-sign canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 20px; cursor: crosshair; }
.p-sign__line { position: absolute; left: 36px; right: 36px; bottom: 40px; border-top: 2px dashed #C9CDD5; pointer-events: none; }
.p-sign__hint { position: absolute; left: 36px; bottom: 14px; font-size: 12px; color: var(--p-ink-3); pointer-events: none; }
.p-dialog__foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.p-dialog__foot .p-meta { flex: 1 1 200px; }

/* Anmeldung */
.p-login { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 40px 16px 80px; }
.p-login h1 { margin: 0; color: #fff; text-align: center; font: 800 clamp(32px, 4vw, 46px)/1.05 var(--p-display); letter-spacing: -.03em; }
.p-login .p-card { width: min(480px, 100%); padding: 40px; display: flex; flex-direction: column; gap: 22px; box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 24px 60px -24px rgba(16,24,40,.3); }
.p-login .p-head { justify-content: center; }
.p-foot { position: relative; z-index: 1; display: flex; justify-content: center; gap: 28px; padding: 0 16px 28px; font-size: 13px; color: var(--p-ink-3); }
.p-foot a:hover { color: var(--p-ink); }

/* Fertig */
.p-done { padding: 32px; display: flex; flex-direction: column; gap: 10px; }
.p-done__check { width: 56px; height: 56px; border-radius: 18px; background: #fff; display: flex; align-items: center; justify-content: center; }
.p-receipt .p-kv { background: none; padding: 9px 0; border-radius: 0; border-top: 1px solid var(--p-line); }
.p-sigimg { max-width: 240px; height: auto; display: block; }

/* Untere Leisten (Handy) */
.p-tabbar { display: none; }
.p-mbar { display: none; }

@media (max-width: 1080px) {
  .p-kpis { grid-template-columns: 1fr 1fr; }
  .p-kpis > :first-child { grid-column: 1 / -1; }
  .p-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-cols, .p-docgrid { grid-template-columns: 1fr; }
  .p-side { position: static; }
  .p-band .p-link, .p-band .p-link--ghost { right: 24px; }
  .p-band .p-link { right: 120px; }
}
@media (max-width: 860px) {
  .p-head { height: 68px; gap: 16px; padding: 0 18px; }
  .p-nav { display: none; }
  .p-brand img { height: 32px; }
  .p-who > summary { padding: 0 4px; background: transparent; }
  .p-who__name { display: none; }
  .p-band { height: 330px; border-radius: 0 0 32px 32px; }
  .p-band--short { height: 230px; }
  /* Kettenglieder klein in der Kopfzeile zwischen Logo und Konto – nie über Text */
  .p-band .p-link, .p-band--short .p-link, .p-band--login .p-link { width: 64px; height: 30px; border-width: 6px; left: auto; right: 118px; top: 22px; }
  .p-band .p-link--ghost, .p-band--short .p-link--ghost, .p-band--login .p-link--ghost { right: 76px; top: 33px; }
  .p-band--login .p-link { right: 64px; }
  .p-band--login .p-link--ghost { right: 22px; }
  .p-main, .p-main--wide { width: calc(100% - 32px); padding: 18px 0 110px; gap: 16px; }
  .p-kpis { grid-template-columns: 1fr; gap: 14px; margin-top: 8px; }
  .p-tiles { gap: 12px; }
  .p-tile { padding: 16px; gap: 12px; }
  .p-tile .p-chev, .p-tile .p-meta { display: none; }
  .p-ico { width: 40px; height: 40px; border-radius: 13px; }
  .p-kpi, .p-pad, .p-side { padding: 20px; }
  .p-docrow { grid-template-columns: 38px minmax(0, 1fr) auto; padding: 12px 16px; gap: 12px; }
  .p-docrow__state { display: none; }
  .p-docrow .p-chev { display: none; }
  .p-docrow__amount { font-size: 14px; }
  .p-listhead { padding: 18px 16px 10px; }
  .p-paper { padding: 24px 20px; min-height: 0; }
  .p-paper__top { flex-direction: column; }
  .p-paper__addr { text-align: left; }
  .p-items th:nth-child(3), .p-items td:nth-child(3) { display: none; }
  .p-dialog { border-radius: 26px 26px 0 0; width: 100%; max-width: 100%; margin: auto 0 0; max-height: calc(100dvh - 40px); }
  .p-dialog form { padding: 22px 20px 28px; }
  .p-tabbar { display: flex; position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); height: 66px; background: #fff; border-radius: 22px; box-shadow: 0 10px 30px -10px rgba(16,24,40,.35); z-index: 30; }
  .p-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--p-ink-3); position: relative; }
  .p-tabbar a[aria-current="page"] { color: var(--p-primary); }
  .p-tabbar .p-nav__badge { position: absolute; top: 6px; left: calc(50% + 6px); height: 17px; min-width: 17px; font-size: 10px; }
  .p-mbar { display: flex; position: fixed; left: 12px; right: 12px; bottom: max(90px, calc(env(safe-area-inset-bottom) + 90px)); padding: 12px 12px 12px 20px; background: #fff; border-radius: 24px; box-shadow: 0 14px 36px -12px rgba(16,24,40,.35); align-items: center; gap: 12px; z-index: 29; }
  .p-mbar__total { flex: 1; }
  .p-mbar__total strong { display: block; font: 800 22px var(--p-display); letter-spacing: -.02em; }
  .p-hide-m { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 860px) {
  .p-main:has(.p-mbar) { padding-bottom: 200px; }
  .p-dialog__foot .p-meta { flex-basis: 100%; }
  .p-dialog__foot .p-btn { flex: 1; }
}
