/* DSP Business Billing & Accounting - Phase 12 compact mobile app layer (2026-10-14). Original DSP design. */
[data-dsp-billing]{--p12-forest:#163D2B;--p12-forest-d:#0E2F22;--p12-sage:#C7CEBA;--p12-sage-l:#EEF2E8;--p12-cream:#FFFDF8;--p12-ink:#15211A;--p12-muted:#5C685C;--p12-line:rgba(22,61,43,.14);--p12-coral:#C4472D;--p12-z:1}

/* ---------- A- / A / A+ : scoped zoom of the app surfaces (not the fixed menu drawer or dialogs) ---------- */
html body [data-dsp-billing] .dsp-billing__content,
html body [data-dsp-billing] .dsp-p9-top,
html body [data-dsp-billing] .dsp-p12-acct,
html body [data-dsp-billing] .dsp-p9-account,
html body [data-dsp-billing] .dsp-p7-dock{zoom:var(--p12-z,1)}
.dsp-p12-ts{display:inline-flex;align-items:center;gap:2px;padding:2px;border:1px solid var(--p12-line);border-radius:12px;background:#fff}
html body .dsp-p12-ts button{display:grid!important;place-items:center;min-width:40px!important;height:40px!important;padding:0 6px!important;border:0!important;border-radius:10px!important;background:transparent!important;color:var(--p12-forest)!important;font:700 .95rem/1 Manrope,Inter,system-ui,sans-serif!important;cursor:pointer;box-shadow:none!important;transform:none!important;transition:background-color .15s ease}
html body .dsp-p12-ts button[data-p12-ts="down"]{font-size:.82rem!important}
html body .dsp-p12-ts button[data-p12-ts="up"]{font-size:1.08rem!important}
html body .dsp-p12-ts button:hover{background:var(--p12-sage-l)!important}
html body .dsp-p12-ts button[aria-pressed="true"]{background:var(--p12-forest)!important;color:#fff!important}
html body .dsp-p12-ts button:disabled{opacity:.38;cursor:not-allowed}
.dsp-p12-ts-val{min-width:40px;padding:0 6px;font:600 .78rem/1 Inter,system-ui,sans-serif;color:var(--p12-muted);text-align:center}
.dsp-p12-tsrow{display:flex!important;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.dsp-p12-ts--bar{display:none!important}
@media(min-width:1180px){.dsp-p12-ts--bar{display:inline-flex!important}.dsp-p12-ts--bar .dsp-p12-ts-val{display:none}}

/* ---------- toolbar hierarchy on phones: Back | Title | Search | Settings | More ---------- */
@media(max-width:767px){
  html body [data-dsp-billing] .dsp-p9-top .dsp-p9-chip{display:none!important}
}
@media(max-width:420px){
  html body [data-dsp-billing] .dsp-p9-top .dsp-p9-biz{display:none!important}
  html body [data-dsp-billing] .dsp-p9-top .dsp-p9-h1{font-size:1.12rem!important;line-height:1.2!important}
}

/* ---------- compact account bar ---------- */
.dsp-p12-acct{display:none;align-items:center;gap:10px;margin:8px 0;padding:8px 8px 8px 12px;border:1px solid var(--p12-line);border-radius:14px;background:var(--p12-cream);font-family:Inter,system-ui,sans-serif}
html body [data-dsp-billing][data-p12-pane="dashboard"] .dsp-p12-acct{display:flex}
.dsp-p12-acct-ico{display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:10px;background:var(--p12-sage-l);color:var(--p12-forest)}
.dsp-p12-acct[data-kind="warning"] .dsp-p12-acct-ico{background:#FCEFD9;color:#7A4A00}
.dsp-p12-acct-txt{flex:1 1 auto;min-width:0;margin:0!important;font-size:.86rem!important;line-height:1.35!important;color:var(--p12-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dsp-p12-acct-txt strong{font-weight:700;color:var(--p12-forest)}
.dsp-p12-acct-acts{display:flex;gap:6px;flex:none}
html body .dsp-p12-btn{display:inline-flex!important;align-items:center;justify-content:center;gap:4px;min-height:44px!important;padding:6px 12px!important;border:1px solid rgba(22,61,43,.28)!important;border-radius:12px!important;background:#fff!important;color:var(--p12-forest)!important;font:700 .84rem/1.1 Inter,system-ui,sans-serif!important;text-decoration:none!important;white-space:nowrap;cursor:pointer;box-shadow:none!important;transform:none!important;transition:background-color .16s ease,transform .12s ease,box-shadow .16s ease}
html body .dsp-p12-btn:hover{background:var(--p12-sage-l)!important}
html body .dsp-p12-btn.is-primary{background:var(--p12-forest)!important;border-color:var(--p12-forest)!important;color:#fff!important}
html body .dsp-p12-btn.is-primary:hover{background:var(--p12-forest-d)!important}
html body .dsp-p12-btn:active{transform:scale(.97)!important}
html body .dsp-p12-btn svg{transition:transform .2s ease}
html body .dsp-p12-btn[aria-expanded="true"] svg{transform:rotate(180deg)}
@media(max-width:400px){
  .dsp-p12-acct{flex-wrap:wrap;padding:8px}
  .dsp-p12-acct-txt{flex-basis:calc(100% - 44px);white-space:normal}
  .dsp-p12-acct-acts{flex:1 1 100%}
  .dsp-p12-acct-acts .dsp-p12-btn{flex:1}
}
/* account details: readable heading, no duplicate notice */
html body [data-dsp-billing] .dsp-p9-account{margin:0 0 10px}
html body [data-dsp-billing] .dsp-p9-account .dsp-billing__privacy{display:none!important}
html body [data-dsp-billing] .dsp-billing-cloud__head>div{display:flex!important;flex-direction:column!important;gap:4px!important;min-width:0}
html body [data-dsp-billing] .dsp-billing-cloud__head>div>strong{display:block}
.dsp-p12-acct-tip{margin:8px 2px 0!important;font-size:.82rem!important;color:var(--p12-muted)}
html body .dsp-p12-acct-tip button{display:inline!important;min-height:0!important;padding:0!important;border:0!important;background:none!important;color:var(--p12-forest)!important;font:inherit!important;font-weight:700!important;text-decoration:underline!important;cursor:pointer;box-shadow:none!important}

/* ---------- Dashboard: KPI strip first, quick actions next, compact figures ---------- */
.dsp-p12-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.dsp-p12-kpi{display:flex;flex-direction:column;gap:2px;min-width:0;padding:10px 12px;border:1px solid var(--p12-line);border-radius:14px;background:#fff}
.dsp-p12-kpi span{font:700 .74rem/1.2 Inter,system-ui,sans-serif;letter-spacing:.02em;text-transform:uppercase;color:var(--p12-muted)}
.dsp-p12-kpi strong{font:750 1.08rem/1.25 Manrope,"Plus Jakarta Sans",Inter,system-ui,sans-serif;color:var(--p12-forest);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.dsp-p12-kpi small{font-size:.72rem;color:var(--p12-muted)}
.dsp-p12-kpi[data-p12-k="recv"]{border-left:3px solid #2F7A4F}
.dsp-p12-kpi[data-p12-k="pay"]{border-left:3px solid var(--p12-coral)}
html body [data-dsp-billing] [data-bill-pane="dashboard"].is-active{gap:12px!important}
html body [data-dsp-billing] [data-bill-pane="dashboard"]>.dsp-billing__sectionhead{order:0}
html body [data-dsp-billing] [data-bill-pane="dashboard"]>.dsp-p12-kpis{order:1}
html body [data-dsp-billing] [data-bill-pane="dashboard"]>.dsp-bs-dashboard{order:2}
html body [data-dsp-billing] [data-bill-pane="dashboard"]>.dsp-billing__metrics{order:3}
html body [data-dsp-billing] [data-bill-pane="dashboard"]>.dsp-billing__dashgrid{order:4}
@media(max-width:767px){
  .dsp-p12-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .dsp-p12-kpi{padding:8px 10px;border-radius:12px}
  .dsp-p12-kpi strong{font-size:1rem}
  .dsp-p12-kpi:first-child{grid-column:1/-1;flex-direction:row;align-items:baseline;flex-wrap:wrap;column-gap:8px}
  .dsp-p12-kpi:first-child strong{font-size:1.2rem}
  /* existing figure cards: compact two-column tiles */
  html body [data-dsp-billing] [data-bill-pane="dashboard"] .dsp-billing__metrics{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  html body [data-dsp-billing] [data-bill-pane="dashboard"] .dsp-billing__metric{min-height:0!important;padding:9px 10px!important;border-radius:12px!important}
  html body [data-dsp-billing] [data-bill-pane="dashboard"] .dsp-billing__metric span{font-size:.72rem!important}
  html body [data-dsp-billing] [data-bill-pane="dashboard"] .dsp-billing__metric strong{font-size:.98rem!important;margin:2px 0 0!important}
  html body [data-dsp-billing] [data-bill-pane="dashboard"] .dsp-billing__metric small{display:none!important}
  html body [data-dsp-billing] .dsp-bs-dashboard{gap:10px!important}
  html body [data-dsp-billing] .dsp-bs-kpis{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  html body [data-dsp-billing] .dsp-bs-kpis>div{min-height:0!important;padding:8px 10px!important;border-radius:12px!important}
  html body [data-dsp-billing] .dsp-bs-kpis>div span{font-size:.72rem!important}
  html body [data-dsp-billing] .dsp-bs-kpis>div strong{font-size:.95rem!important}
  html body [data-dsp-billing] .dsp-bs-actions{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important}
  html body [data-dsp-billing] .dsp-bs-actions>button{min-height:64px!important;padding:8px 4px!important;font-size:.74rem!important;line-height:1.2!important;border-radius:12px!important;flex-direction:column!important;gap:4px!important;white-space:normal!important;text-align:center!important}
  html body [data-dsp-billing] .dsp-bs-blockhead{padding:0!important;margin:0!important;gap:4px!important}
  html body [data-dsp-billing] .dsp-bs-blockhead h3,html body [data-dsp-billing] .dsp-bs-blockhead strong{font-size:1rem!important}
}
@media(min-width:768px) and (max-width:1100px){.dsp-p12-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* ---------- headings: phones already show the section title in the toolbar ---------- */
@media(max-width:767px){
  html body [data-dsp-billing] .dsp-billing__pane>.dsp-billing__sectionhead{min-height:0!important;margin:0!important;padding:0!important;gap:8px!important}
  html body [data-dsp-billing] .dsp-billing__pane>.dsp-billing__sectionhead>div:first-child{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important}
  html body [data-dsp-billing] .dsp-billing__pane>.dsp-billing__sectionhead:not(:has(>:not(:first-child))){display:block!important;height:0!important}
}

/* ---------- Parties: compact form ---------- */
html body [data-dsp-billing] [data-party-form]{gap:10px!important;padding:14px!important}
html body [data-dsp-billing] [data-party-form] .dsp-p12-pgrid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important}
html body [data-dsp-billing] [data-party-form] label{gap:4px!important;font-size:.84rem!important;font-weight:600!important}
html body [data-dsp-billing] [data-party-form] :is(input,select,textarea){min-height:44px!important;padding:8px 12px!important;font-size:1rem!important;border-radius:10px!important}
html body [data-dsp-billing] [data-party-form] textarea{height:44px;resize:vertical;overflow:hidden;line-height:1.45!important}
.dsp-p12-more{border:1px solid var(--p12-line);border-radius:12px;background:#FAF7F0}
.dsp-p12-more>summary{display:flex;align-items:center;gap:8px;min-height:48px;padding:8px 12px;cursor:pointer;list-style:none;font-family:Inter,system-ui,sans-serif}
.dsp-p12-more>summary::-webkit-details-marker{display:none}
.dsp-p12-more-t{font-weight:700;font-size:.92rem;color:var(--p12-forest)}
.dsp-p12-more>summary small{flex:1;min-width:0;color:var(--p12-muted);font-size:.78rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dsp-p12-more>summary svg{flex:none;color:var(--p12-forest);transition:transform .22s ease}
.dsp-p12-more[open]>summary svg{transform:rotate(180deg)}
html body [data-dsp-billing] .dsp-p12-more-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;padding:4px 12px 12px!important;margin:0!important}
html body [data-dsp-billing] .dsp-p12-more-grid>.dsp-billing__full,html body [data-dsp-billing] .dsp-p12-more-grid>.dsp-bs-subhead{grid-column:1/-1!important}
html body [data-dsp-billing] .dsp-p12-more-grid .dsp-bs-subhead{margin:6px 0 0!important;padding:0!important}
html body [data-dsp-billing] [data-party-form] .dsp-billing__actions{display:flex!important;flex-wrap:wrap;align-items:center;gap:8px!important;margin:0!important}
html body [data-dsp-billing] [data-party-form] .dsp-billing__actions .dsp-btn{min-height:44px!important;padding:8px 18px!important;font-size:.92rem!important}
.dsp-p12-editing{flex:1 1 100%;margin:0!important;font-size:.84rem!important;font-weight:600;color:#7A4A00}
html body [data-dsp-billing] [data-party-form].is-editing{box-shadow:0 0 0 2px rgba(196,71,45,.35)!important}
@media(max-width:767px){
  html body [data-dsp-billing] [data-party-form]{padding:12px!important;border-radius:14px!important}
  html body [data-dsp-billing] [data-party-form] .dsp-p12-pgrid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
  html body [data-dsp-billing] [data-party-form] .dsp-p12-pgrid>label:has([data-party-name]){grid-column:1/-1;order:-1}
  html body [data-dsp-billing] .dsp-p12-more-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
  html body [data-dsp-billing] .dsp-p12-more-grid>label:has(textarea){grid-column:1/-1!important}
  html body [data-dsp-billing] [data-party-form] .dsp-billing__actions .dsp-btn{flex:1 1 0}
}
@media(max-width:340px){
  html body [data-dsp-billing] [data-party-form] .dsp-p12-pgrid,html body [data-dsp-billing] .dsp-p12-more-grid{grid-template-columns:minmax(0,1fr)!important}
}

/* ---------- Parties: list tools, cards, table ---------- */
.dsp-p12-ptools{display:grid;gap:8px;margin:14px 0 8px;font-family:Inter,system-ui,sans-serif}
.dsp-p12-phead h3{margin:0!important;font:750 1.02rem/1.3 Manrope,Inter,system-ui,sans-serif!important;color:var(--p12-forest)}
.dsp-p12-phead h3 span{font-weight:600;color:var(--p12-muted);font-size:.86rem}
.dsp-p12-psearch{position:relative;display:flex;align-items:center}
.dsp-p12-psearch>svg{position:absolute;left:12px;color:var(--p12-muted);pointer-events:none}
html body .dsp-p12-psearch input{width:100%!important;min-height:44px!important;padding:8px 40px 8px 38px!important;border:1px solid rgba(22,61,43,.28)!important;border-radius:12px!important;background:#fff!important;font:500 1rem/1.3 Inter,system-ui,sans-serif!important;color:var(--p12-ink)!important}
html body .dsp-p12-psearch button{position:absolute;right:4px;display:grid!important;place-items:center;width:36px!important;height:36px!important;min-height:0!important;padding:0!important;border:0!important;border-radius:10px!important;background:transparent!important;color:var(--p12-muted)!important;font-size:1.3rem!important;cursor:pointer;box-shadow:none!important}
.dsp-p12-prow{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.dsp-p12-pfilter{display:flex;gap:4px;padding:3px;border-radius:12px;background:var(--p12-sage-l)}
html body .dsp-p12-pfilter button{min-height:38px!important;padding:6px 12px!important;border:0!important;border-radius:9px!important;background:transparent!important;color:var(--p12-forest)!important;font:650 .84rem/1 Inter,system-ui,sans-serif!important;cursor:pointer;box-shadow:none!important;transform:none!important;transition:background-color .16s ease}
html body .dsp-p12-pfilter button[aria-pressed="true"]{background:#fff!important;box-shadow:0 1px 3px rgba(14,47,34,.18)!important}
.dsp-p12-psort{position:relative;display:flex;align-items:center;margin-left:auto}
.dsp-p12-psort>svg{position:absolute;left:10px;color:var(--p12-muted);pointer-events:none}
html body .dsp-p12-psort select{min-height:44px!important;padding:6px 10px 6px 32px!important;border:1px solid rgba(22,61,43,.28)!important;border-radius:12px!important;background:#fff!important;font:600 .86rem/1.2 Inter,system-ui,sans-serif!important;color:var(--p12-ink)!important}
.dsp-p12-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.dsp-p12-plist{display:none;gap:8px}
.dsp-p12-pcard{display:grid;gap:8px;padding:12px;border:1px solid var(--p12-line);border-radius:14px;background:#fff;font-family:Inter,system-ui,sans-serif;scroll-margin:calc(var(--p9-top-h,64px) + 12px) 0 96px}
.dsp-p12-pmain{display:flex;align-items:center;gap:10px;min-width:0}
.dsp-p12-pav{display:grid;place-items:center;flex:none;width:40px;height:40px;border-radius:12px;background:var(--p12-sage-l);color:var(--p12-forest);font:750 .9rem/1 Manrope,Inter,sans-serif}
.dsp-p12-pinfo{display:flex;flex-direction:column;gap:2px;flex:1 1 auto;min-width:0}
.dsp-p12-pinfo strong{font-size:.98rem;font-weight:700;color:var(--p12-ink);overflow-wrap:anywhere;line-height:1.3}
.dsp-p12-pinfo small{font-size:.8rem;color:var(--p12-muted);overflow-wrap:anywhere}
.dsp-p12-pbal{display:flex;flex-direction:column;align-items:flex-end;flex:none;text-align:right}
.dsp-p12-pbal strong{font:750 .95rem/1.2 Manrope,Inter,sans-serif;font-variant-numeric:tabular-nums;color:var(--p12-ink)}
.dsp-p12-pbal small{font-size:.74rem;font-weight:600;color:var(--p12-muted)}
.dsp-p12-pbal.is-recv strong{color:#2F7A4F}
.dsp-p12-pbal.is-pay strong{color:var(--p12-coral)}
.dsp-p12-pacts{display:flex;gap:6px;border-top:1px solid var(--p12-line);padding-top:8px}
html body .dsp-p12-pact{display:inline-flex!important;align-items:center;justify-content:center;gap:6px;flex:1;min-height:44px!important;padding:6px 8px!important;border:1px solid var(--p12-line)!important;border-radius:10px!important;background:#fff!important;color:var(--p12-forest)!important;font:650 .84rem/1 Inter,system-ui,sans-serif!important;text-decoration:none!important;cursor:pointer;box-shadow:none!important;transform:none!important;transition:background-color .15s ease,transform .12s ease}
html body .dsp-p12-pact:hover{background:var(--p12-sage-l)!important}
html body .dsp-p12-pact:active{transform:scale(.97)!important}
html body .dsp-p12-pact.is-danger{color:#A23A24!important}
.dsp-p12-pempty{display:grid;justify-items:center;gap:6px;padding:20px 14px;border:1px dashed rgba(22,61,43,.3);border-radius:14px;background:#FAF7F0;text-align:center;font-family:Inter,system-ui,sans-serif}
.dsp-p12-pempty strong{font-size:.98rem;color:var(--p12-forest)}
.dsp-p12-pempty span{font-size:.86rem;color:var(--p12-muted)}
html body .dsp-p12-thsort{display:inline-flex!important;align-items:center;gap:4px;min-height:32px!important;padding:0!important;border:0!important;background:none!important;color:inherit!important;font:inherit!important;text-transform:inherit!important;letter-spacing:inherit!important;cursor:pointer;box-shadow:none!important}
.dsp-p12-pcard.is-flash,html body [data-parties-body] tr.is-flash{animation:dsp-p12-flash 1.6s ease}
@keyframes dsp-p12-flash{0%,40%{box-shadow:0 0 0 3px rgba(196,71,45,.55);background:#FFF6EE}100%{box-shadow:0 0 0 0 rgba(196,71,45,0)}}
@media(max-width:767px){
  .dsp-p12-plist{display:grid}
  html body [data-dsp-billing] .dsp-p12-ptable{display:none!important}
  .dsp-p12-psort{margin-left:0;flex:1 1 140px}
  html body .dsp-p12-psort select{width:100%!important}
  .dsp-p12-pfilter{flex:1 1 auto}
  html body .dsp-p12-pfilter button{flex:1;padding:6px 8px!important}
}

/* ---------- menu drawer: icons, collapsible groups ---------- */
html body [data-dsp-billing] .dsp-billing__nav [data-bill-tab]{display:flex;align-items:center;gap:10px}
html body [data-dsp-billing] .dsp-billing__nav [data-bill-tab][hidden]{display:none!important}
.dsp-p12-ni{display:grid;place-items:center;flex:none;width:30px;height:30px;border-radius:9px;background:rgba(255,255,255,.08)}
html body [data-dsp-billing] .dsp-billing__nav [data-bill-tab].is-active .dsp-p12-ni{background:rgba(255,255,255,.18)}
html body .dsp-p12-ng{display:flex!important;align-items:center;justify-content:space-between;width:100%;min-height:40px!important;padding:6px 8px!important;border:0!important;border-radius:8px!important;background:transparent!important;color:inherit!important;cursor:pointer;box-shadow:none!important;transform:none!important;text-align:left}
html body .dsp-p12-ng .dsp-p6-navlabel{margin:0!important;padding:0!important}
html body .dsp-p12-ng svg{opacity:.75;transition:transform .22s ease}
.dsp-p6-navgroup.is-collapsed .dsp-p12-ng svg{transform:rotate(-90deg)}
html body [data-dsp-billing] .dsp-p6-navgroup.is-collapsed [data-bill-tab]{display:none!important}

/* ---------- Settings blocks ---------- */
.dsp-p12-sblock{display:grid;gap:10px;font-family:Inter,system-ui,sans-serif}
.dsp-p12-shead{margin:4px 0 0!important;font:750 .95rem/1.3 Manrope,Inter,sans-serif!important;color:var(--p12-forest)}
.dsp-p12-srow{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 14px;border:1px solid var(--p12-line);border-radius:14px;background:#fff}
.dsp-p12-srow>div:first-child{display:flex;flex-direction:column;gap:3px;flex:1 1 220px;min-width:0}
.dsp-p12-slabel{font-weight:700;font-size:.94rem;color:var(--p12-ink)}
.dsp-p12-srow small{font-size:.82rem;color:var(--p12-muted);line-height:1.45}
.dsp-p12-sbtns{display:flex;gap:8px;flex-wrap:wrap}
.dsp-p12-snote{margin:0!important;font-size:.82rem!important;color:var(--p12-muted);line-height:1.5}

/* ---------- toast ---------- */
.dsp-p12-toast{position:fixed;left:50%;bottom:calc(84px + env(safe-area-inset-bottom));z-index:100000;max-width:min(92vw,420px);padding:10px 16px;border-radius:12px;background:var(--p12-forest,#163D2B);color:#fff;font:600 .9rem/1.35 Inter,system-ui,sans-serif;box-shadow:0 10px 26px rgba(14,47,34,.28);opacity:0;pointer-events:none;transform:translate(-50%,8px);transition:opacity .2s ease,transform .2s ease}
.dsp-p12-toast.is-on{opacity:1;transform:translate(-50%,0)}
@media(min-width:1024px){.dsp-p12-toast{bottom:28px}}

/* ---------- touch feedback, focus, sticky-safe scrolling ---------- */
html body [data-dsp-billing] :is(input,select,textarea){scroll-margin-top:calc(var(--p9-top-h,64px) + 16px);scroll-margin-bottom:96px}
html body [data-dsp-billing] :is(.dsp-p12-btn,.dsp-p12-pact,.dsp-p12-ts button,.dsp-p12-pfilter button,.dsp-p12-ng):focus-visible{outline:3px solid var(--p12-coral)!important;outline-offset:2px!important}
html body [data-dsp-billing] .dsp-billing__sectionhead h2:focus{outline:none}
@media(hover:none){html body [data-dsp-billing] :is(.dsp-bs-actions>button,.dsp-p7-dock button,.dsp-billing__nav button):active{transform:scale(.97)!important;transition:transform .1s ease!important}}

@media(prefers-reduced-motion:reduce){
  .dsp-p12-toast,html body .dsp-p12-btn,html body .dsp-p12-pact,.dsp-p12-more>summary svg,html body .dsp-p12-ng svg{transition:none!important}
  .dsp-p12-pcard.is-flash,html body [data-parties-body] tr.is-flash{animation:none!important;box-shadow:0 0 0 3px rgba(196,71,45,.55)}
}
@media print{.dsp-p12-acct,.dsp-p12-kpis,.dsp-p12-ptools,.dsp-p12-plist,.dsp-p12-toast,.dsp-p12-ts{display:none!important}}

/* ---------- v12.1 fixes after live check (360 px) ---------- */
/* hidden controls stay hidden even where older rules force display */
html body [data-dsp-billing] :is(.dsp-p12-ptools,.dsp-p12-acct,.dsp-p12-plist,.dsp-p12-sblock,[data-party-form],.dsp-p9-menu) [hidden],
html body [data-dsp-billing] [data-party-form] .dsp-btn[hidden]{display:none!important}
/* grid items may shrink below their content width (no overflow) */
html body [data-dsp-billing] [data-party-form]>*,
html body [data-dsp-billing] [data-party-form] .dsp-p12-pgrid>*,
html body [data-dsp-billing] .dsp-p12-more-grid>*{min-width:0!important}
html body [data-dsp-billing] [data-party-form] :is(input,select,textarea){width:100%!important;max-width:100%!important;box-sizing:border-box!important}
.dsp-p12-ptools,.dsp-p12-prow,.dsp-p12-pfilter{min-width:0}
/* phones: 16 px side gutter instead of 31 px */
@media(max-width:767px){
  html body [data-dsp-billing] .dsp-wrap{padding-left:12px!important;padding-right:12px!important}
  html body [data-dsp-billing] .dsp-billing__content{padding-left:4px!important;padding-right:4px!important}
  /* Dashboard: Refresh sits on the Sales tile instead of taking its own row */
  html body [data-dsp-billing] [data-bill-pane="dashboard"].is-active{position:relative}
  html body [data-dsp-billing] [data-bill-pane="dashboard"]>.dsp-billing__sectionhead{position:absolute!important;top:4px;right:4px;z-index:2;display:flex!important;height:auto!important}
  html body [data-dsp-billing] [data-bill-pane="dashboard"]>.dsp-billing__sectionhead button{min-height:40px!important;padding:6px 12px!important;font-size:.74rem!important;border-radius:10px!important}
  html body [data-dsp-billing] [data-bill-pane="dashboard"] .dsp-p12-kpi:first-child{padding-right:110px}
  /* account bar: two short rows */
  .dsp-p12-acct{gap:8px;margin:6px 0}
  html body .dsp-p12-acct .dsp-p12-btn{min-height:40px!important}
}

/* ---------- v12.2: site action bar hidden inside the billing workspace at every width; active tab pill ---------- */
html body.dsp-billing-focused-page .dsp-actionbar{display:none!important}
@media(max-width:767px){html body [data-dsp-billing] .dsp-p7-dock [data-p7-tab][aria-current="page"] svg{box-sizing:content-box;padding:3px 14px;border-radius:999px;background:var(--p12-sage-l)}}

/* ---------- v12.4: phones show Expenses, Purchases and Receipts as labelled record cards (no sideways table scroll) ---------- */
@media(max-width:767px){
  html body [data-dsp-billing] .dsp-p12-stackwrap{overflow:visible!important;border:0!important;background:none!important;box-shadow:none!important;padding:0!important}
  html body [data-dsp-billing] table.dsp-p12-stack{display:block!important;width:100%!important;min-width:0!important;border:0!important;background:none!important}
  html body [data-dsp-billing] table.dsp-p12-stack thead{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important}
  html body [data-dsp-billing] table.dsp-p12-stack tbody{display:grid!important;gap:8px!important}
  html body [data-dsp-billing] table.dsp-p12-stack tr{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 12px;padding:12px!important;border:1px solid var(--p12-line)!important;border-radius:14px!important;background:#fff!important}
  html body [data-dsp-billing] table.dsp-p12-stack td{display:flex!important;flex-direction:column;gap:2px;min-width:0;padding:0!important;border:0!important;background:none!important;text-align:left!important;white-space:normal!important;overflow-wrap:anywhere;font-size:.92rem!important;line-height:1.35!important}
  html body [data-dsp-billing] table.dsp-p12-stack td::before{content:attr(data-p12-label);font:700 .7rem/1.2 Inter,system-ui,sans-serif;letter-spacing:.03em;text-transform:uppercase;color:var(--p12-muted)}
  html body [data-dsp-billing] table.dsp-p12-stack td[data-p12-label=""]::before{content:none}
  html body [data-dsp-billing] table.dsp-p12-stack td[colspan],html body [data-dsp-billing] table.dsp-p12-stack td:last-child{grid-column:1/-1}
  html body [data-dsp-billing] table.dsp-p12-stack td:last-child:not([colspan]){padding-top:8px!important;border-top:1px solid var(--p12-line)!important}
  html body [data-dsp-billing] table.dsp-p12-stack td:last-child:not([colspan])::before{content:none}
  html body [data-dsp-billing] table.dsp-p12-stack :is(.dsp-billing__rowactions,td:last-child){flex-direction:row!important;flex-wrap:wrap;gap:6px}
  html body [data-dsp-billing] table.dsp-p12-stack td:last-child button{min-height:40px!important;padding:6px 12px!important}
}