/* Fat Mouth Billing: FatMouth dark skin. CSS only: no logic, markup or behavior changes.
   Used by /billingdemo and the real /invoicing portal. */

body.dp {
  --dp-yellow: #ffe33f;
  --dp-pink: #ff45d8;
  --dp-teal: #75f1e7;
  --dp-mint: #a8ff9f;
  --dp-ink: #f6f2e4;
  --dp-muted: rgba(246, 242, 228, 0.55);
  --dp-line: rgba(255, 244, 223, 0.12);
  --dp-glass: rgba(255, 255, 255, 0.045);
  --dp-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  background: #050507;
  color: var(--dp-ink);
}

body.dp .app { background: transparent; }

/* sidebar */
body.dp .sidebar { background: rgba(10, 10, 14, 0.72); -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4); border-right: 1px solid var(--dp-line); }
body.dp .brand b { color: var(--dp-yellow); }
body.dp .brand-mark { border-radius: 50%; background: var(--dp-yellow); color: #101010; box-shadow: 4px 4px 0 var(--dp-pink), -4px -4px 0 var(--dp-teal); }
body.dp .nav-item { border-radius: 10px; color: var(--dp-muted); transition: background 200ms ease, color 200ms ease; }
body.dp .nav-item:hover, body.dp .nav-item.active { background: rgba(255, 255, 255, 0.07); color: var(--dp-ink); }
body.dp .nav-item.active { box-shadow: inset 3px 0 var(--dp-yellow); }
body.dp .support { border-color: var(--dp-line); border-radius: 12px; color: var(--dp-muted); }
body.dp .support strong, body.dp .profile { color: var(--dp-ink); }
body.dp .support a { color: var(--dp-yellow); }
body.dp .avatar { background: rgba(255, 255, 255, 0.08); color: var(--dp-yellow); }

/* main */
body.dp .topbar { border-bottom: 1px solid var(--dp-line); }
body.dp .topbar h1 { color: var(--dp-ink); letter-spacing: -0.03em; }
body.dp .kicker { color: var(--dp-muted); }
body.dp .status-badge { background: rgba(255, 255, 255, 0.08); color: var(--dp-muted); }
body.dp .welcome {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--dp-line);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
body.dp .welcome h2 { letter-spacing: -0.035em; }
body.dp .welcome>div>p:last-child { color: var(--dp-muted); }
body.dp .connect-state { border-color: var(--dp-line); border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
body.dp .connect-state small { color: var(--dp-muted); }
body.dp .pulse { background: var(--dp-mint); box-shadow: 0 0 0 5px rgba(168, 255, 159, 0.16); animation: dpBlink 2.4s ease-in-out infinite; }
@keyframes dpBlink { 50% { box-shadow: 0 0 0 9px rgba(168, 255, 159, 0.04); } }

body.dp .metrics article,
body.dp .customer-card,
body.dp .settings-grid article,
body.dp .table-wrap {
  position: relative;
  border: 1px solid var(--dp-line);
  border-radius: 16px;
  background: var(--dp-glass);
  color: var(--dp-ink);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
body.dp .metrics p { color: var(--dp-muted); }
body.dp .metrics strong { color: var(--dp-ink); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
body.dp .metrics small { color: var(--dp-muted); }
body.dp .metrics .fee-card { background: linear-gradient(135deg, rgba(255, 227, 63, 0.16), rgba(255, 69, 216, 0.08)); border-color: rgba(255, 227, 63, 0.3); }
body.dp .section-head h2 { letter-spacing: -0.03em; }
body.dp .text-button { color: var(--dp-yellow); }
body.dp .table-wrap th { border-bottom-color: var(--dp-line); color: var(--dp-muted); }
body.dp .table-wrap td { border-bottom-color: rgba(255, 244, 223, 0.07); color: var(--dp-muted); }
body.dp .table-wrap td strong { color: var(--dp-ink); }
body.dp .table-wrap td small { color: rgba(246, 242, 228, 0.4); }
body.dp .invoice-status.paid { background: rgba(168, 255, 159, 0.14); color: var(--dp-mint); }
body.dp .invoice-status.open { background: rgba(255, 227, 63, 0.14); color: var(--dp-yellow); }
body.dp .row-action, body.dp .icon-button { border-color: var(--dp-line); border-radius: 10px; background: rgba(255, 255, 255, 0.05); color: var(--dp-ink); transition: background 160ms ease, transform 160ms ease; }
body.dp .row-action:hover { background: rgba(255, 255, 255, 0.12); }
body.dp .filters { border-color: var(--dp-line); border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
body.dp .filter { border-radius: 9px; color: var(--dp-muted); }
body.dp .filter.active { background: rgba(255, 255, 255, 0.12); color: var(--dp-ink); box-shadow: none; }
body.dp .customer-avatar { border-radius: 12px; background: rgba(255, 227, 63, 0.14); color: var(--dp-yellow); }
body.dp .customer-card p, body.dp .customer-stats small { color: var(--dp-muted); }
body.dp .customer-stats { border-top-color: var(--dp-line); }
body.dp .settings-grid article>p:not(.kicker) { color: var(--dp-muted); }
body.dp .empty { color: var(--dp-muted); }
body.dp .customer-empty {
  border-color: var(--dp-line);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  color: var(--dp-muted);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}
body.dp .customer-empty strong { color: var(--dp-ink); }
body.dp .customer-empty p { color: var(--dp-muted); }

/* business identity */
body.dp .branding-panel {
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.5fr);
  gap: 26px;
  padding: 26px;
  border: 1px solid var(--dp-line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  color: var(--dp-ink);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}
body.dp .brand-preview { align-self: stretch; padding: 14px 26px 14px 2px; border-right-color: var(--dp-line); }
body.dp .brand-preview strong { color: var(--dp-ink); font-size: 20px; line-height: 1.1; }
body.dp .brand-preview small { max-width: 190px; color: var(--dp-muted); font-size: 12px; line-height: 1.5; }
body.dp .brand-logo-preview {
  width: 82px;
  height: 82px;
  border: 1px solid rgba(255, 227, 63, 0.28);
  border-radius: 18px;
  background: rgba(255, 227, 63, 0.08);
  color: var(--dp-yellow);
  font-size: 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}
body.dp .brand-logo-preview img { background: #fff; }
body.dp .branding-fields label { color: var(--dp-muted); }
body.dp .branding-fields .optional { color: rgba(246, 242, 228, 0.42); }
body.dp .branding-fields input {
  border: 1px solid var(--dp-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--dp-ink);
  color-scheme: dark;
}
body.dp .branding-fields input:focus { border-color: rgba(255, 227, 63, 0.7); box-shadow: 0 0 0 4px rgba(255, 227, 63, 0.12); }
body.dp .branding-fields input[type="file"] { background: rgba(255, 255, 255, 0.04); color: var(--dp-muted); }
body.dp .branding-fields input[type="file"]::file-selector-button { margin-right: 12px; padding: 7px 11px; border: 0; border-radius: 8px; background: rgba(255, 227, 63, 0.16); color: var(--dp-yellow); font: inherit; font-weight: 850; cursor: pointer; }
body.dp .branding-actions { border-top-color: var(--dp-line); }

/* proposals */
body.dp .proposal-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 244, 223, 0.16);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  color: var(--dp-ink);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}
body.dp .proposal-card::before { position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--dp-teal); content: ""; }
body.dp .proposal-card.accepted::before { background: var(--dp-mint); }
body.dp .proposal-card.declined::before,
body.dp .proposal-card.canceled::before,
body.dp .proposal-card.expired::before { background: #ff8d9b; }
body.dp .proposal-card:hover { border-color: rgba(255, 227, 63, 0.34); box-shadow: 0 22px 56px rgba(0, 0, 0, 0.32); }
body.dp .proposal-card-head>small { color: rgba(246, 242, 228, 0.62); }
body.dp .proposal-card .kicker { color: var(--dp-yellow); }
body.dp .proposal-card h3 { color: var(--dp-ink); }
body.dp .proposal-card div>p:not(.kicker) { color: rgba(246, 242, 228, 0.7); }
body.dp .proposal-facts { border-color: var(--dp-line); }
body.dp .proposal-facts small { color: rgba(246, 242, 228, 0.5); }
body.dp .proposal-facts strong { color: var(--dp-ink); }
body.dp .proposal-facts span:first-child strong { color: var(--dp-yellow); }
body.dp .proposal-actions .secondary { border-color: var(--dp-line); background: rgba(255, 255, 255, 0.07); color: var(--dp-ink); }
body.dp .proposal-actions .secondary:hover { background: rgba(255, 255, 255, 0.13); }
body.dp .proposal-actions .text-button { color: var(--dp-yellow); }
body.dp .proposal-filter { color: var(--dp-muted); }
body.dp .proposal-filter.active { background: rgba(255, 255, 255, 0.12); color: var(--dp-ink); box-shadow: none; }
body.dp .invoice-status.sent { background: rgba(117, 241, 231, 0.14); color: var(--dp-teal); }
body.dp .invoice-status.viewed { background: rgba(255, 69, 216, 0.14); color: #ff8ee8; }
body.dp .invoice-status.accepted { background: rgba(168, 255, 159, 0.14); color: var(--dp-mint); }
body.dp .invoice-status.accepting { background: rgba(255, 227, 63, 0.14); color: var(--dp-yellow); }
body.dp .invoice-status.declined,
body.dp .invoice-status.canceled,
body.dp .invoice-status.expired { background: rgba(255, 90, 110, 0.14); color: #ff9aa6; }
body.dp .proposal-empty { border-color: var(--dp-line); background: var(--dp-glass); }
body.dp .delivery-note { border-left-color: var(--dp-yellow); background: rgba(255, 227, 63, 0.08); color: rgba(246, 242, 228, 0.72); }
body.dp .delivery-note strong { color: var(--dp-yellow); }

/* buttons */
body.dp .primary {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--dp-yellow), #ff7a2f 62%, var(--dp-pink));
  color: #101010;
  box-shadow: 0 10px 28px rgba(255, 122, 47, 0.28);
  transition: transform 160ms ease, filter 160ms ease;
}
body.dp .primary:hover { background: linear-gradient(90deg, var(--dp-yellow), #ff7a2f 62%, var(--dp-pink)); filter: brightness(1.07); transform: translateY(-1px); }
body.dp .secondary { border: 1px solid var(--dp-line); border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: var(--dp-ink); }
body.dp .dp-press { transform: scale(0.94) !important; filter: brightness(1.15); }

/* invoice dialog */
body.dp dialog { border: 1px solid rgba(255, 244, 223, 0.16); border-radius: 22px; background: #0e0e12; color: var(--dp-ink); box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7); }
body.dp dialog::backdrop { background: rgba(3, 3, 5, 0.7); backdrop-filter: blur(6px); }
body.dp .dialog-head { color: var(--dp-ink); }
body.dp .dialog-head h2 { color: var(--dp-ink); }
body.dp .form-grid label, body.dp .login-form label { color: var(--dp-muted); }
body.dp .form-grid input, body.dp .form-grid select { border: 1px solid var(--dp-line); border-radius: 12px; background: rgba(255, 255, 255, 0.05); color: var(--dp-ink); color-scheme: dark; }
body.dp .form-grid textarea { border: 1px solid var(--dp-line); border-radius: 12px; background: rgba(255, 255, 255, 0.05); color: var(--dp-ink); color-scheme: dark; }
body.dp .form-grid input:focus { border-color: rgba(255, 227, 63, 0.7); box-shadow: 0 0 0 4px rgba(255, 227, 63, 0.12); }
body.dp .form-grid textarea:focus { border-color: rgba(255, 227, 63, 0.7); box-shadow: 0 0 0 4px rgba(255, 227, 63, 0.12); }
body.dp .payment-choice { border-color: var(--dp-line); border-radius: 12px; color: var(--dp-muted); }
body.dp .fee-preview { border-color: rgba(255, 227, 63, 0.25); border-radius: 12px; background: rgba(255, 227, 63, 0.07); color: var(--dp-yellow); }
body.dp .cost-warning { border-radius: 12px; }
body.dp .toast { border: 1px solid rgba(168, 255, 159, 0.35); border-radius: 12px; background: rgba(10, 10, 14, 0.92); color: var(--dp-mint); }



body.dp .view:not([hidden]) { animation: dpView 0.4s ease both; }
@keyframes dpView { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }


body.dp { color-scheme: dark; }
body.dp::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(circle at 10% 8%, rgba(255, 69, 216, 0.10), transparent 30%), radial-gradient(circle at 92% 10%, rgba(117, 241, 231, 0.08), transparent 30%), radial-gradient(circle at 70% 96%, rgba(255, 227, 63, 0.07), transparent 34%); }
body.dp .app, body.dp .login-shell { position: relative; z-index: 1; }

/* ---- login / sign up ---- */
body.dp .login-shell { background: transparent; }
body.dp .login-panel { background: rgba(10, 10, 14, 0.74); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); border-right: 1px solid var(--dp-line); color: var(--dp-ink); }
body.dp .login-copy h1 { color: var(--dp-yellow); letter-spacing: -0.03em; text-shadow: 4px 4px 0 rgba(255, 69, 216, 0.45); }
body.dp .login-copy>p:last-child { color: var(--dp-muted); }
body.dp .login-foot { color: rgba(246, 242, 228, 0.4); }
body.dp .login-form input { border: 1px solid var(--dp-line); border-radius: 12px; background: rgba(255, 255, 255, 0.05); color: var(--dp-ink); }
body.dp .login-form input:focus { border-color: rgba(255, 227, 63, 0.7); box-shadow: 0 0 0 4px rgba(255, 227, 63, 0.12); }
body.dp .auth-tabs { border-color: var(--dp-line); border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
body.dp .auth-tabs button { border-radius: 9px; color: var(--dp-muted); }
body.dp .auth-tabs button.active { background: rgba(255, 255, 255, 0.12); color: var(--dp-ink); box-shadow: none; }
body.dp .form-error { color: #ff8d9b; }
body.dp .form-message { min-height: 18px; margin: 0; color: var(--dp-mint); font-size: 12px; line-height: 1.45; }
body.dp .auth-link { min-height: 34px; border: 0; background: transparent; color: var(--dp-teal); font-weight: 800; text-align: center; }
body.dp .auth-link:hover { color: var(--dp-yellow); }
body.dp .auth-form-head { display: grid; gap: 6px; margin-bottom: 4px; }
body.dp .auth-form-head strong { color: var(--dp-ink); font-size: 18px; }
body.dp .auth-form-head span { color: var(--dp-muted); font-size: 12px; line-height: 1.45; }
body.dp .login-art {
  align-items: center;
  justify-content: center;
  padding: clamp(42px, 6vw, 92px);
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 69, 216, 0.18), transparent 30%),
    radial-gradient(circle at 8% 86%, rgba(117, 241, 231, 0.12), transparent 34%),
    #08080c;
  color: var(--dp-ink);
}
body.dp .login-art:before {
  background:
    linear-gradient(140deg, transparent 38%, rgba(255, 227, 63, 0.045)),
    repeating-linear-gradient(90deg, transparent 0 74px, rgba(255, 255, 255, 0.025) 75px),
    repeating-linear-gradient(0deg, transparent 0 74px, rgba(255, 255, 255, 0.025) 75px);
}
body.dp .login-art:after { display: none; }
body.dp .login-art p { margin: 0; color: var(--dp-muted); font-size: 13px; font-weight: 700; line-height: 1.4; }
.login-art-shell { position: relative; z-index: 2; display: grid; gap: 16px; width: min(620px, 100%); }
.login-art-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--dp-muted); font-size: 11px; }
.login-art-head>div { display: flex; align-items: center; gap: 9px; }
.login-art-head strong { color: var(--dp-ink); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.login-art-head small { color: var(--dp-muted); font-size: 10px; }
.login-art-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dp-mint); box-shadow: 0 0 0 5px rgba(168, 255, 159, .1); }
.login-preview-card { position: relative; overflow: hidden; padding: clamp(24px, 4vw, 38px); border: 1px solid rgba(255, 244, 223, .15); border-radius: 22px; background: linear-gradient(145deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .025)); box-shadow: 0 34px 90px rgba(0, 0, 0, .38); backdrop-filter: blur(18px); }
.login-preview-card:after { position: absolute; right: -70px; top: -90px; width: 230px; height: 230px; border: 36px solid rgba(255, 227, 63, .08); border-radius: 50%; content: ""; }
.login-preview-meta { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--dp-muted); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.login-preview-meta b { padding: 7px 10px; border-radius: 999px; background: rgba(168, 255, 159, .14); color: var(--dp-mint); font-size: 9px; }
.login-preview-card h2 { position: relative; z-index: 1; max-width: 500px; margin: 28px 0 7px; color: var(--dp-ink); font-size: clamp(28px, 4vw, 48px); line-height: 1; letter-spacing: -.035em; }
.login-preview-card>p { position: relative; z-index: 1; }
.login-preview-money { position: relative; z-index: 1; display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 32px 0 26px; padding: 20px 0; border-top: 1px solid var(--dp-line); border-bottom: 1px solid var(--dp-line); }
.login-preview-money span { color: var(--dp-muted); font-size: 11px; font-weight: 800; }
.login-preview-money strong { color: var(--dp-yellow); font-size: clamp(30px, 4.4vw, 52px); line-height: .9; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.login-preview-timeline { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.login-preview-timeline>div { position: relative; display: grid; grid-template-columns: 15px 1fr; gap: 9px; min-width: 0; }
.login-preview-timeline i { width: 12px; height: 12px; margin-top: 2px; border: 3px solid #0d0d11; border-radius: 50%; background: var(--dp-mint); box-shadow: 0 0 0 2px rgba(168, 255, 159, .3); }
.login-preview-timeline span { display: grid; gap: 4px; }
.login-preview-timeline strong { color: var(--dp-ink); font-size: 11px; line-height: 1.2; }
.login-preview-timeline small { color: var(--dp-muted); font-size: 9px; line-height: 1.35; }
.login-savings-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 19px 22px; border: 1px solid rgba(255, 227, 63, .26); border-radius: 16px; background: linear-gradient(120deg, rgba(255, 227, 63, .13), rgba(255, 69, 216, .06)); }
.login-savings-card>div>p { margin-bottom: 4px; color: var(--dp-yellow); font-size: 9px; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.login-savings-card>div>strong { color: var(--dp-ink); font-size: 18px; }
.login-savings-card>span { display: grid; flex: 0 0 auto; gap: 3px; text-align: right; }
.login-savings-card b { color: var(--dp-mint); font-size: 24px; line-height: 1; }
.login-savings-card small { max-width: 150px; color: var(--dp-muted); font-size: 9px; line-height: 1.3; }
@media (max-width: 1180px) {
  body.dp .login-art { padding: 40px; }
  .login-preview-timeline { grid-template-columns: 1fr; }
  .login-preview-money { align-items: flex-start; flex-direction: column; }
}

/* ---- Stripe setup, notes, payment options, other statuses ---- */
body.dp .onboarding-banner { border-color: rgba(255, 227, 63, 0.3); border-radius: 16px; background: linear-gradient(135deg, rgba(255, 227, 63, 0.12), rgba(255, 69, 216, 0.06)); }
body.dp .onboarding-banner h2 { color: var(--dp-ink); }
body.dp .onboarding-banner p:last-child { color: var(--dp-muted); }
body.dp .stripe-status-line p { color: var(--dp-muted); }
body.dp .status-dot { background: var(--dp-yellow); box-shadow: 0 0 0 5px rgba(255, 227, 63, 0.16); }
body.dp .status-dot.ready { background: var(--dp-mint); box-shadow: 0 0 0 5px rgba(168, 255, 159, 0.16); }
body.dp .setup-steps li:before { background: var(--dp-yellow); color: #101010; }
body.dp .setup-steps span { color: var(--dp-muted); }
body.dp .connection-note { border-color: var(--dp-line); border-radius: 14px; background: var(--dp-glass); color: var(--dp-muted); }
body.dp .connection-note strong { color: var(--dp-ink); }
body.dp .sync-note { border-left-color: var(--dp-yellow); }
body.dp .payment-choice legend { color: var(--dp-muted); }
body.dp .payment-choice span { border: 1px solid var(--dp-line); border-radius: 12px; background: rgba(255, 255, 255, 0.05); color: var(--dp-ink); }
body.dp .payment-choice input:disabled+span { opacity: 0.4; cursor: not-allowed; }
body.dp .payment-choice small { color: var(--dp-muted); }
body.dp .payment-choice .recommended-choice small { color: var(--dp-mint); }
body.dp .payment-choice input:checked+span { border-color: rgba(255, 227, 63, 0.7); background: rgba(255, 227, 63, 0.1); box-shadow: 0 0 0 3px rgba(255, 227, 63, 0.12); }
body.dp .cost-warning { border-left-color: var(--dp-yellow); border-radius: 0 12px 12px 0; background: rgba(255, 227, 63, 0.08); color: #ffe9a6; }
body.dp .cost-warning strong { color: var(--dp-yellow); }
body.dp .ach-benefit { border-color: rgba(168, 255, 159, 0.32); border-left-color: var(--dp-mint); border-radius: 12px; background: rgba(168, 255, 159, 0.07); color: var(--dp-muted); }
body.dp .ach-benefit-mark { background: var(--dp-mint); color: #101010; box-shadow: 0 0 0 4px rgba(168, 255, 159, 0.08); }
body.dp .ach-benefit strong { color: var(--dp-mint); }
body.dp .ach-benefit p { color: var(--dp-ink); }
body.dp .automation-panel { border-color: var(--dp-line); background: rgba(255, 255, 255, 0.03); }
body.dp .automation-panel summary { color: var(--dp-ink); }
body.dp .automation-panel summary small, body.dp .toggle-row small { color: var(--dp-muted); }
body.dp .automation-panel summary b { color: var(--dp-yellow); }
body.dp .automation-panel[open] summary { border-bottom-color: var(--dp-line); background: rgba(255, 227, 63, 0.08); }
body.dp .automation-body { background: #0e0e12; }
body.dp .automation-card { border-color: var(--dp-line); background: rgba(255, 255, 255, 0.04); }
body.dp .automation-card strong { color: var(--dp-ink); }
body.dp .terms-confirm { border-left-color: var(--dp-yellow); background: rgba(255, 227, 63, 0.08); color: var(--dp-ink); }
body.dp .proposal-total-preview { border-color: rgba(255, 227, 63, 0.25); background: rgba(255, 227, 63, 0.07); color: var(--dp-muted); }
body.dp .proposal-total-preview strong { color: var(--dp-yellow); }
body.dp .status-badge, body.dp .invoice-status { background: rgba(255, 255, 255, 0.08); color: var(--dp-muted); }
body.dp .invoice-status.paid { background: rgba(168, 255, 159, 0.14); color: var(--dp-mint); }
body.dp .invoice-status.open { background: rgba(255, 227, 63, 0.14); color: var(--dp-yellow); }
body.dp .invoice-status.void, body.dp .invoice-status.uncollectible, body.dp .invoice-status.failed { background: rgba(255, 90, 110, 0.14); color: #ff8d9b; }
body.dp .invoice-status.processing, body.dp .invoice-status.pending { background: rgba(117, 241, 231, 0.14); color: var(--dp-teal); }
body.dp .table-wrap { scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }

body.dp .payout-box { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid rgba(255, 227, 63, 0.25); border-radius: 14px; background: rgba(255, 227, 63, 0.06); }
body.dp .payout-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; color: var(--dp-muted); font-size: 13px; font-weight: 700; }
body.dp .payout-row strong { color: var(--dp-ink); font-size: 16px; font-variant-numeric: tabular-nums; }
body.dp .payout-row.alt strong { color: var(--dp-muted); font-size: 14px; }
body.dp .payout-row.net { padding-top: 8px; border-top: 1px solid var(--dp-line); color: var(--dp-ink); }
body.dp .payout-row.net strong { color: var(--dp-mint); font-size: 22px; letter-spacing: -0.02em; }
body.dp .payout-row em { color: var(--dp-muted); font-style: normal; font-weight: 600; }
body.dp .payout-note { margin: 0; color: var(--dp-muted); font-size: 11.5px; line-height: 1.5; }
body.dp .payout-note[hidden] { display: none; }

/* ================= Phone layout for the real app (/invoicing): built for thumbs ================= */
@media (max-width: 720px) {
  body.dp .dialog-head { position: sticky; z-index: 4; top: -22px; margin: 0 -2px; padding: 18px 2px 12px; background: #0e0e12; border-bottom: 1px solid var(--dp-line); }
  body.dp .dialog-actions { position: sticky; z-index: 4; bottom: -20px; margin: 16px -2px -20px; padding: 12px 2px calc(20px + env(safe-area-inset-bottom)); background: #0e0e12; border-top: 1px solid var(--dp-line); }

  body.dp-app .app { display: block; min-height: 100dvh; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

  /* bottom tab bar */
  body.dp-app .sidebar { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 50; height: auto; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--dp-line); background: rgba(10, 10, 14, 0.97); -webkit-backdrop-filter: none; backdrop-filter: none; }
  body.dp-app .sidebar .brand { display: none; }
  body.dp-app .sidebar nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; overflow: visible; }
  body.dp-app .nav-item { flex-direction: column; justify-content: center; gap: 3px; min-width: 0; height: 56px; padding: 0; border-radius: 14px; font-size: 11px; font-weight: 800; text-align: center; }
  body.dp-app .nav-item span { width: auto; font-size: 20px; line-height: 1; }
  body.dp-app .nav-item.active { background: rgba(255, 227, 63, 0.12); color: var(--dp-yellow); box-shadow: none; }

  /* sign out lives top-right as a small pill */
  body.dp-app .sidebar-bottom { display: block; position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 14px; z-index: 60; margin: 0; }
  body.dp-app .support { display: none; }
  body.dp-app .profile { padding: 8px 14px; border: 1px solid var(--dp-line); border-radius: 999px; background: rgba(10, 10, 14, 0.75); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  body.dp-app .profile .avatar, body.dp-app .profile strong { display: none; }
  body.dp-app .profile small { color: var(--dp-ink); font-size: 12px; font-weight: 800; }

  body.dp-app .main { padding: 0 14px 24px; }
  body.dp-app .topbar { min-height: 0; padding: calc(16px + env(safe-area-inset-top)) 0 12px; align-items: flex-end; }
  body.dp-app .topbar h1 { font-size: 30px; }

  /* the one button contractors use most: always under the thumb */
  body.dp-app #new-invoice { position: fixed; right: 14px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 55; min-height: 52px; padding: 0 20px; font-size: 15px; box-shadow: 0 16px 44px rgba(255, 122, 47, 0.5); }
  body.dp-app #new-invoice:disabled { display: none; }

  body.dp-app .welcome { padding: 18px; border-radius: 18px; gap: 14px; }
  body.dp-app .welcome h2 { font-size: 26px; }
  body.dp-app .connect-state { width: 100%; min-width: 0; }
  body.dp-app .metrics { gap: 10px; margin: 14px 0; }
  body.dp-app .metrics article { min-height: 0; padding: 14px; }
  body.dp-app .metrics strong { margin: 10px 0 6px; font-size: 24px; }
  body.dp-app .view { padding-top: 6px; }
  body.dp-app .section-head { gap: 10px; }
  body.dp-app .view .section-head > div:first-child:not(.filters) { display: none; }
  body.dp-app #recent-invoices { margin-top: 2px; }
  body.dp-app .filters { width: 100%; }
  body.dp-app .filter { flex: 1; height: 40px; font-size: 13px; }

  /* invoices as cards instead of a table you have to scroll sideways */
  body.dp-app .table-wrap { border: 0; background: transparent; overflow: visible; margin: 0; border-radius: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  body.dp-app .table-wrap table, body.dp-app .table-wrap tbody { display: block; width: 100%; }
  body.dp-app .table-wrap thead { display: none; }
  body.dp-app .table-wrap tr { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "inv amt" "cust stat" "due due" "act act"; gap: 8px 12px; align-items: center; margin-bottom: 10px; padding: 14px; border: 1px solid var(--dp-line); border-radius: 18px; background: var(--dp-glass); }
  body.dp-app .table-wrap td { display: block; height: auto; padding: 0; border: 0; white-space: normal; }
  body.dp-app .table-wrap td:nth-child(1) { grid-area: inv; }
  body.dp-app .table-wrap td:nth-child(2) { grid-area: cust; }
  body.dp-app .table-wrap td:nth-child(3) { grid-area: due; color: var(--dp-muted); font-size: 12px; }
  body.dp-app .table-wrap td:nth-child(3)::before { content: "Due "; }
  body.dp-app .table-wrap td:nth-child(4) { grid-area: stat; justify-self: end; }
  body.dp-app .table-wrap td:nth-child(5) { grid-area: amt; text-align: right; }
  body.dp-app .table-wrap td:nth-child(5) strong { font-size: 21px; letter-spacing: -0.02em; }
  body.dp-app .table-wrap td:nth-child(6) { grid-area: act; justify-self: stretch; display: flex; gap: 8px; }
  body.dp-app .table-wrap td:nth-child(6) .row-text { flex: 1; margin-left: 0; }
  body.dp-app .table-wrap td small { max-width: none; }
  body.dp-app .row-action { width: 46px; height: 46px; font-size: 18px; }

  /* the new-invoice form becomes a bottom sheet with big, thumb-friendly fields */
  body.dp-app dialog { width: 100%; max-width: none; max-height: 94dvh; margin: auto 0 0; border-radius: 26px 26px 0 0; overflow: auto; }
  body.dp-app dialog form { padding: 20px 16px 0; }
  body.dp-app .dialog-head h2 { font-size: 22px; }
  body.dp-app .form-grid { gap: 14px; margin: 18px 0; }
  body.dp-app .form-grid input, body.dp-app .login-form input { height: 54px; font-size: 16px; }
  body.dp-app .payment-choice span { min-height: 54px; }
  body.dp-app .dialog-actions { position: sticky; bottom: 0; margin: 16px -16px 0; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: #0e0e12; border-top: 1px solid var(--dp-line); }
  body.dp-app .dialog-actions button { min-height: 54px; font-size: 16px; }
  body.dp-app .payout-box { padding: 12px 14px; }

  body.dp-app .toast { left: 14px; right: 14px; bottom: calc(150px + env(safe-area-inset-bottom)); text-align: center; }
  body.dp-app .onboarding-banner { padding: 16px; }
  body.dp-app .customer-card { padding: 16px; }
  body.dp .branding-panel { grid-template-columns: minmax(0, 1fr); gap: 18px; width: 100%; margin: 0; padding: 16px; border: 1px solid var(--dp-line); border-radius: 18px; }
  body.dp .brand-preview { gap: 12px; padding: 2px 0 16px; border-right: 0; border-bottom: 1px solid var(--dp-line); }
  body.dp .brand-logo-preview { width: 68px; height: 68px; border-radius: 15px; }
  body.dp .brand-preview strong { font-size: 18px; }
  body.dp .branding-fields { grid-template-columns: minmax(0, 1fr); min-width: 0; }
  body.dp .branding-fields input { min-width: 0; }
  body.dp .branding-actions { gap: 10px; padding-top: 14px; }
  body.dp-app .login-panel { padding: 28px 18px calc(28px + env(safe-area-inset-bottom)); }
  body.dp-app .login-copy { margin: 56px 0 22px; }
  body.dp-app .login-copy h1 { font-size: clamp(2.4rem, 12vw, 3.2rem); }
}

body.dp .payout-notes { display: grid; gap: 6px; margin-top: 10px; }
@media (max-width: 720px) {
  /* keep the two money lines pinned just above the buttons while the form scrolls */
  body.dp-app .payout-box { position: sticky; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 3; background: #15140c; box-shadow: 0 -14px 24px #0e0e12; }
}

body.dp .pulse.off { background: var(--dp-yellow); box-shadow: 0 0 0 5px rgba(255, 227, 63, 0.16); animation: none; }
body.dp .proc-note { display: block; margin-top: 4px; max-width: 200px; color: var(--dp-teal); font-size: 10.5px; line-height: 1.35; white-space: normal; text-transform: none; letter-spacing: 0; }
body.dp .line-items { display: grid; gap: 8px; min-width: 0; }
body.dp .li-legend { margin: 0 0 2px; color: var(--dp-muted); font-size: 12px; font-weight: 800; }
body.dp #line-rows { display: grid; gap: 10px; }
body.dp .li-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px 104px 88px 34px; gap: 8px; align-items: end; }
body.dp .li-row input { width: 100%; min-width: 0; }
body.dp .li-sub { color: var(--dp-ink); font-size: 13px; font-weight: 800; line-height: 48px; text-align: right; font-variant-numeric: tabular-nums; }
body.dp .li-remove { width: 34px; height: 34px; margin-bottom: 7px; padding: 0; border: 1px solid var(--dp-line); border-radius: 10px; background: rgba(255, 255, 255, 0.05); color: var(--dp-muted); font-size: 18px; line-height: 1; }
body.dp .li-remove[hidden] { display: block; visibility: hidden; }
body.dp #add-line { justify-self: start; padding: 4px 0; color: var(--dp-yellow); font-size: 13px; }
body.dp .li-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid var(--dp-line); color: var(--dp-muted); font-size: 12px; font-weight: 700; }
body.dp .li-total strong { color: var(--dp-ink); font-size: 15px; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  body.dp .li-row { grid-template-columns: 64px minmax(0, 1fr) auto 34px; }
  body.dp .li-row .li-d { grid-column: 1 / -1; }
  body.dp .li-sub { min-width: 70px; }
}
/* edit / cancel + confirmations */
body.dp .row-text { height: 32px; margin-left: 6px; padding: 0 12px; border: 1px solid var(--dp-line); border-radius: 10px; background: rgba(255, 255, 255, 0.05); color: var(--dp-ink); font-size: 12px; font-weight: 800; }
body.dp .row-text:hover { background: rgba(255, 255, 255, 0.12); }
body.dp .row-text.danger { color: #ff8d9b; border-color: rgba(255, 90, 110, 0.3); }
body.dp .row-text.danger:hover { background: rgba(255, 90, 110, 0.14); }
body.dp .notice-dialog { width: min(460px, calc(100% - 30px)); padding: 0; }
body.dp .notice-body { display: grid; gap: 12px; padding: 26px 24px 22px; }
body.dp .notice-body h2 { margin: 0; font-size: 26px; letter-spacing: -0.02em; }
body.dp .notice-body p { margin: 0; color: var(--dp-muted); font-size: 14px; line-height: 1.55; }
body.dp .notice-check { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: rgba(168, 255, 159, 0.14); color: var(--dp-mint); font-size: 22px; font-weight: 900; }
body.dp .notice-list { display: grid; gap: 10px; margin: 2px 0 4px; padding: 0; list-style: none; }
body.dp .notice-list li { position: relative; padding-left: 18px; color: var(--dp-muted); font-size: 13.5px; line-height: 1.5; }
body.dp .notice-list li::before { position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--dp-yellow); content: ""; }
body.dp .notice-list strong { color: var(--dp-ink); }
body.dp .notice-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 6px; }
body.dp .danger-btn { min-height: 42px; padding: 0 16px; border: 1px solid rgba(255, 90, 110, 0.5); border-radius: 12px; background: rgba(255, 90, 110, 0.16); color: #ffb3bd; font-weight: 850; }
body.dp .danger-btn:disabled { opacity: 0.55; }
@media (max-width: 720px) {
  body.dp-app .row-text { height: 46px; padding: 0 16px; font-size: 14px; }
  body.dp-app .notice-dialog { border-radius: 26px 26px 0 0; }
  body.dp-app .notice-body { padding: 24px 18px calc(18px + env(safe-area-inset-bottom)); }
  body.dp-app .notice-actions { display: grid; grid-template-columns: 1fr 1fr; }
  body.dp-app .notice-actions button { min-height: 54px; font-size: 16px; }
}
body.dp .refund-step { display: grid; gap: 12px; }
body.dp .refund-step[hidden] { display: none; }
body.dp .refund-check { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid rgba(255, 90, 110, 0.35); border-radius: 14px; background: rgba(255, 90, 110, 0.08); color: var(--dp-ink); font-size: 14px; line-height: 1.45; cursor: pointer; }
body.dp .refund-check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: #ff5a6e; }
body.dp .refund-word { width: 100%; height: 52px; padding: 0 14px; border: 1px solid var(--dp-line); border-radius: 12px; background: rgba(255, 255, 255, 0.05); color: var(--dp-ink); font-size: 18px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; outline: none; }
body.dp .refund-word:focus { border-color: rgba(255, 90, 110, 0.7); box-shadow: 0 0 0 3px rgba(255, 90, 110, 0.16); }
body.dp .refund-progress { margin: 0; color: var(--dp-muted); font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; text-align: center; }
body.dp .invoice-status.refunded { background: rgba(255, 255, 255, 0.08); color: #b9b3ad; }
body.dp .switch-row { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; }
body.dp .switch-row input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--dp-yellow); }
body.dp .switch-row strong { display: block; color: var(--dp-ink); font-size: 15px; }
body.dp .switch-row small { display: block; margin-top: 4px; color: var(--dp-muted); font-size: 12.5px; line-height: 1.5; }
