/* Sign-in, sign-up / onboarding, and the client portal shell. Builds on the tokens in styles.css. */

/* ===========================================================================
   1. The pre-app layout (sign in, first-run setup, two-step code, a client's
      first password, the plan choice, the no-clients splash): a blue brand
      panel on the left, the form card on the right; one column on phones.
   =========================================================================== */
.auth {
  position: relative; display: grid; grid-template-columns: minmax(380px, 44%) minmax(0, 1fr);
  min-height: 100vh; background: var(--bg); text-align: left;
}
.auth.wide { grid-template-columns: minmax(340px, 32%) minmax(0, 1fr); }
.auth.wide .auth-headline { font-size: 30px; }
.auth.wide .auth-benefits li { font-size: 14.5px; }

/* Brand panel — white text on the accent gradient (the dark theme deepens it). */
.auth-brand {
  --on-brand-dim: rgba(255, 255, 255, 0.84);
  --on-brand-soft: rgba(255, 255, 255, 0.14);
  --on-brand-line: rgba(255, 255, 255, 0.22);
  position: sticky; top: 0; height: 100vh; min-height: 560px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 40px 48px 32px; color: var(--on-accent);
  background: linear-gradient(155deg, var(--accent-solid) 0%, var(--accent-solid-hover) 100%);
}
:root[data-theme="dark"] .auth-brand {
  background: linear-gradient(155deg, color-mix(in srgb, var(--accent-solid) 72%, var(--bg)) 0%,
                                      color-mix(in srgb, var(--accent-solid) 30%, var(--bg)) 100%);
}
/* Two soft rings for depth. */
.auth-brand::before, .auth-brand::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.auth-brand::before { width: 460px; height: 460px; right: -170px; top: -150px; background: rgba(255, 255, 255, 0.07); }
.auth-brand::after { width: 320px; height: 320px; left: -120px; bottom: -130px; border: 56px solid rgba(255, 255, 255, 0.06); }
.auth-brand > * { position: relative; z-index: 1; }

.auth-logo-chip {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  padding: 8px 14px; border-radius: 14px; background: var(--surface);
  box-shadow: 0 10px 24px -8px rgba(16, 24, 40, 0.35);
}
.auth-logo-chip .auth-logo { height: 34px; }
.auth-logo-name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--head); white-space: nowrap; }
.auth-logo-text { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--accent); line-height: 1.2; }
.auth-pitch { max-width: 440px; }
.auth-headline {
  margin: 0 0 12px; font-size: 36px; line-height: 1.12; font-weight: 700; letter-spacing: -0.03em;
  color: var(--on-accent);
}
.auth-lede { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--on-brand-dim); }
.auth-benefits { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 14px; }
.auth-benefits li {
  display: flex; align-items: center; gap: 14px; margin: 0;
  font-size: 15px; font-weight: 500; line-height: 1.4; color: var(--on-accent);
}
.auth-ben-ic {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--on-brand-soft); border: 1px solid var(--on-brand-line);
}
.auth-ben-ic svg { width: 20px; height: 20px; }
.auth-brand-foot { margin: 0; font-size: 12.5px; color: var(--on-brand-dim); }

/* Form side */
.auth-main { display: flex; flex-direction: column; min-width: 0; padding: 76px 32px 20px; }
.auth-top { position: absolute; top: 20px; right: 24px; z-index: 3; display: flex; align-items: center; gap: 10px; }
.auth-top .themetoggle { box-shadow: var(--card-shadow); }
.auth-body { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; }
.auth-card {
  width: 100%; max-width: 440px; padding: 36px 36px 32px;
  background: var(--surface); border: 1px solid var(--card-border); border-radius: 20px; box-shadow: var(--shadow-lg);
  animation: welcome-rise 0.3s ease both;
}
.auth.wide .auth-card { max-width: 1040px; padding: 0; background: none; border: 0; box-shadow: none; }
.auth-legal { margin-top: 28px; }
.auth-legal .legal-links { max-width: 560px; gap: 2px 8px; }
.auth-legal .legal-sep { display: none; }

/* Card header: an optional icon, the title, one line. */
.auth-head { margin-bottom: 24px; }
.auth-head-ic {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: 16px;
  border-radius: 12px; background: var(--accent-tint); color: var(--accent);
}
.auth-head-ic svg { width: 22px; height: 22px; }
.auth-title { margin: 0 0 6px; font-size: 24px; line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; color: var(--head); }
.auth-desc { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }

/* The form */
.auth .authform, .cp-pw-card .authform { gap: 16px; margin-top: 0; }
.field label { margin: 0 0 6px; }
.field-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field-top label { margin-bottom: 6px; }
button.link.auth-forgot { font-size: 13px; }
.label-opt { font-weight: 400; color: var(--muted); }
p.field-hint { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 12.5px; color: var(--muted); transition: color 0.15s; }
p.field-hint svg { width: 14px; height: 14px; flex: none; opacity: 0.45; stroke-width: 2.2; }
p.field-hint.ok { color: var(--success-ink); }
p.field-hint.ok svg { opacity: 1; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0;
  border: 0; border-radius: var(--radius-xs); background: none; color: var(--muted); cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}
.pw-toggle:hover { color: var(--head); background: var(--surface-3); }
.pw-toggle svg { width: 18px; height: 18px; }

input.invalid, .authform input.invalid { border-color: var(--danger); }
input.invalid:focus { box-shadow: 0 0 0 4px var(--danger-soft); }

button.primary.auth-submit { --btn-h: 46px; width: 100%; font-size: 15px; margin-top: 4px; }
button.primary.auth-submit svg, .auth-actions button svg { width: 18px; height: 18px; }
.auth-actions { display: flex; gap: 10px; margin-top: 4px; }
.auth-actions button.primary.auth-submit { flex: 1 1 auto; margin-top: 0; }
.auth-actions button.ghost { --btn-h: 46px; }
.auth-actions.stack { flex-direction: column; }
.auth-actions.stack button { width: 100%; --btn-h: 46px; }

/* A button while its request runs: a spinner in front, no jump in size. */
button.is-busy { cursor: progress; }
button.is-busy:disabled { opacity: 0.85; }
button.is-busy > svg { display: none; }
button.is-busy::before {
  content: ""; flex: none; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: var(--on-accent);
  animation: spin 0.7s linear infinite;
}
button.ghost.is-busy::before { border-color: var(--line-strong); border-top-color: var(--accent); }

/* Messages under a form */
.authmsg { min-height: 0; text-align: left; }
.auth-alert {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 13.5px; line-height: 1.45; text-align: left;
}
.auth-alert svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.auth-alert.error { color: var(--danger-ink); background: var(--danger-soft); border-color: var(--danger-border); }
.auth-alert.success { color: var(--success-ink); background: var(--success-soft); border-color: var(--success-border); }
.auth-alert.info { color: var(--info-ink); background: var(--info-soft); border-color: var(--info-border); }

.auth-foot { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--muted); text-align: center; }
.authform input.auth-code {
  min-height: 54px; text-align: center; font-size: 22px; font-weight: 600; letter-spacing: 0.28em;
  font-variant-numeric: tabular-nums;
}
.authform input.auth-code::placeholder { letter-spacing: 0.28em; }
.auth-more { margin-top: 18px; font-size: 13px; }
.auth-more > summary { font-size: 13px; }
.auth-more p { margin: 8px 0 0; color: var(--muted); line-height: 1.5; }
.auth-links { margin-top: 18px; text-align: center; }
.auth-links button.link { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.auth-links svg { width: 16px; height: 16px; }

/* Getting-started steps over the plan choice */
.auth-steps { list-style: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px; margin: 0 0 22px; padding: 0; }
.auth-steps li { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.auth-steps li + li::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: var(--line-strong); }
.auth-step-n {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
  font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--ink-dim);
}
.auth-step-n svg { width: 14px; height: 14px; stroke-width: 2.4; }
.auth-steps li.done { color: var(--ink); }
.auth-steps li.done .auth-step-n { background: var(--success-soft); color: var(--success-ink); }
.auth-steps li.current { color: var(--head); font-weight: 600; }
.auth-steps li.current .auth-step-n { background: var(--accent-solid); color: var(--on-accent); }

/* ---- Plan choice (pricing cards) ---------------------------------------- */
.pay-head { max-width: 640px; margin: 0 auto 28px; text-align: center; }
.pay-head .auth-title { font-size: 30px; letter-spacing: -0.025em; }
.pay-head .auth-desc { font-size: 15px; }
.pay-note { max-width: 560px; margin: 16px auto 0; }
.auth .plans {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gap);
  max-width: 1000px; margin: 0 auto; align-items: stretch;
}
.auth .plan {
  display: flex; flex-direction: column; max-width: none; text-align: left;
  padding: 26px 24px 24px; border-radius: 18px;
}
.auth .plan.featured {
  padding: 25px 23px 23px; border: 2px solid var(--accent);
  background: linear-gradient(180deg, var(--accent-tint) 0%, var(--surface) 38%);
  box-shadow: var(--shadow-lg);
}
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; }
.auth .plan-name { font-size: 16px; font-weight: 600; color: var(--head); }
.auth .plan-tag { margin: 0; }
.auth .plan-price {
  display: flex; align-items: baseline; gap: 6px; margin: 14px 0 20px; padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.plan-price .plan-amt { font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -0.035em; color: var(--head); }
.plan-price .plan-per { font-size: 14px; font-weight: 500; color: var(--muted); }
.auth .plan-feats { display: grid; gap: 11px; margin: 0 0 26px; }
.auth .plan-feats li { display: flex; align-items: flex-start; gap: 10px; padding: 0; font-size: 13.5px; line-height: 1.45; }
.auth .plan-feats li::before { content: none; }
.plan-check {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
  border-radius: 50%; background: var(--success-soft); color: var(--success-ink);
}
.plan-check svg { width: 12px; height: 12px; stroke-width: 2.6; }
.auth .plan-pick { --btn-h: 44px; width: 100%; margin-top: auto; }
.pay-secure {
  display: flex; align-items: center; justify-content: center; gap: 8px; max-width: 640px;
  margin: 22px auto 0; font-size: 13px; line-height: 1.5; color: var(--muted); text-align: center;
}
.pay-secure svg { flex: none; width: 16px; height: 16px; color: var(--success-ink); }
#paymsg { max-width: 560px; margin: 12px auto 0; }
.auth.wide .bank-card { max-width: 1000px; margin: 28px auto 0; }

.cp-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px 20px; font-size: 14px; color: var(--muted); }
.cp-loading-line { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; color: var(--muted); }

/* ===========================================================================
   2. The client portal's own cards
   =========================================================================== */
.card-head.cp-head { justify-content: flex-start; align-items: center; gap: 14px; }
.card-head.cp-head > .icon-bubble { flex: none; }
.card-head.cp-head > div { flex: 1 1 auto; min-width: 0; }

/* Empty states: an icon, one line, maybe one action. */
.cp-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 16px; text-align: center; color: var(--muted); }
.cp-empty p { margin: 0; max-width: 440px; font-size: 14px; line-height: 1.55; }
.cp-empty-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 13.5px; color: var(--muted); }
.icon-bubble.cp-danger { background: var(--danger-soft); color: var(--danger-ink); }
.icon-bubble.cp-lock { background: var(--surface-3); color: var(--muted); }

/* Getting started (a client with no finished month yet) */
.cp-onboard-slot { grid-column: 1 / -1; }
.cp-onboard-slot:empty { display: none; }
.cp-onboard { container-type: inline-size; background: linear-gradient(135deg, var(--accent-tint) 0%, var(--surface) 55%); }
.cp-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; }
.cp-step {
  display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius-md);
}
.cp-step.current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring-color); }
.cp-step-n {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border-radius: 50%; font-size: 13px; font-weight: 600; background: var(--surface-3); color: var(--ink-dim);
}
.cp-step-n svg { width: 15px; height: 15px; stroke-width: 2.4; }
.cp-step.current .cp-step-n { background: var(--accent-solid); color: var(--on-accent); }
.cp-step.done .cp-step-n { background: var(--success-soft); color: var(--success-ink); }
.cp-step-t { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14px; font-weight: 600; color: var(--head); }
.cp-step.todo .cp-step-t { color: var(--ink-dim); }
.cp-step-d { margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--muted); }
@container (max-width: 640px) { .cp-steps { grid-template-columns: 1fr; } }

/* Finished months as tiles */
.cp-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
p + .cp-months, .help + .cp-months, p + .cp-empty, .help + .cp-empty { margin-top: 14px; }
.mtile {
  display: flex; flex-direction: column; align-items: stretch; min-width: 0; padding: 16px;
  font: inherit; color: inherit; text-align: left;
  background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius-md);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
button.mtile { cursor: pointer; }
button.mtile:hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1); transform: translateY(-1px); }
.mtile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.mtile-ic {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 10px; background: var(--accent-tint); color: var(--accent);
}
.mtile-ic svg { width: 18px; height: 18px; }
.mtile-month { font-size: 15px; font-weight: 600; color: var(--head); }
.mtile-k { margin-top: 10px; font-size: 12px; font-weight: 500; color: var(--muted); }
.mtile-v { font-size: 22px; font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; color: var(--head); font-variant-numeric: tabular-nums; }
.mtile-v.neg { color: var(--danger-ink); }
.mtile-sub {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.mtile-go { display: inline-flex; color: var(--accent); transition: transform 0.15s; }
.mtile-go svg { width: 16px; height: 16px; }
button.mtile:hover .mtile-go { transform: translateX(2px); }

/* Scheduled-for-deletion banner */
.cp-banner { display: flex; align-items: flex-start; gap: 14px; }
.cp-banner-ic {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 12px; background: var(--surface); color: var(--danger-ink);
}
.cp-banner-ic svg { width: 20px; height: 20px; }
.retention-warn .card-title { color: var(--danger-ink); }
.retention-warn .card-desc { color: var(--ink); }

/* Report pages (a month, the year-end packet) */
.cp-page-head { align-items: center; }
.cp-page-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cp-page-title > div { min-width: 0; }
button.ghost.icon-btn.cp-back { border-radius: 50%; flex: none; }
.cp-page-head .page-desc { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
button.primary.cp-pdf { --btn-h: 42px; padding: 8px 18px; }
button.primary.cp-pdf svg { width: 18px; height: 18px; }
.cp-pdf-msg:empty { display: none; }
.cp-pdf-msg { margin: -8px 0 16px; }
.cp-kpis { margin-bottom: var(--gap); }
.card-grid.cp-report, .card-grid.cp-ye { align-items: start; }
.card-grid.cp-report > .panel { max-width: none !important; }   /* the shared cash-flow card sets an inline max-width */
/* A long card, closed until asked for (the month's journal) */
details.cp-collapse > summary.card-head { margin-bottom: 0; list-style: none; cursor: pointer; align-items: center; }
details.cp-collapse > summary::-webkit-details-marker { display: none; }
details.cp-collapse > summary .card-title { display: flex; align-items: center; gap: 8px; color: var(--head); }
details.cp-collapse[open] > summary.card-head { margin-bottom: 16px; }
.cp-chev {
  flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); position: relative;
  transition: transform 0.15s;
}
.cp-chev::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -5px 0 0 -4px;
  border-right: 2px solid var(--ink-dim); border-bottom: 2px solid var(--ink-dim); transform: rotate(45deg);
}
details.cp-collapse[open] .cp-chev { transform: rotate(180deg); }
.cp-stmt .stmt { max-width: none; }
.cp-table tr.sum td { font-weight: 600; color: var(--head); border-top: 1px solid var(--line-strong); }
.cp-table tr.grand td { font-weight: 700; font-size: 14.5px; color: var(--head); background: var(--accent-tint); border-bottom: 0; }
.cp-table tr.grp td { padding-top: 16px; font-size: 12px; font-weight: 600; color: var(--muted); background: none; }
.cp-table tbody tr.grp:hover td { background: none; }
.ye-line {
  display: inline-flex; margin-left: 6px; padding: 0 7px; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 500; line-height: 18px; background: var(--surface-3); color: var(--muted);
}
.cp-fine { margin: 0 0 var(--gap); font-size: 12.5px; color: var(--muted); text-align: center; }

/* A report section the plan doesn't include */
.panel.cp-locked { display: flex; align-items: center; gap: 14px; background: var(--surface-2); border-style: dashed; box-shadow: none; }
.cp-locked .lock-title { font-size: 15px; }
.cp-locked-text { min-width: 0; }

/* Password change inside the portal */
.cp-narrow { max-width: 480px; margin: 12px auto var(--gap); }
.panel.cp-pw-card { padding: 32px; }

/* ---- Bank & card accounts ---------------------------------------------- */
.bank-soon { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; }
.bank-empty { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--ink-dim); }
.bank-actions { gap: 12px; margin-top: 0; }
.bank-actions button svg { width: 16px; height: 16px; }
.bank-trust {
  display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 0; padding: 10px 12px;
  border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted);
}
.bank-trust::before { content: none; }
.bank-trust-ic { flex: none; display: inline-flex; color: var(--success-ink); margin-top: 1px; }
.bank-trust-ic svg { width: 16px; height: 16px; }
.bank-items { gap: 12px; margin-bottom: 14px; }
.bank-item { padding: 14px 16px; border: 1px solid var(--card-border); border-radius: var(--radius-md); background: var(--surface); }
.bank-item.warn { border-color: var(--warning-border); background: var(--warning-soft); }
.bank-item.off { border-style: dashed; border-color: var(--line-strong); background: var(--surface-2); }
.bank-item-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.bank-avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 10px; font-size: 15px; font-weight: 700; background: var(--info-soft); color: var(--info-ink);
}
.bank-item.off .bank-avatar { background: var(--surface-3); color: var(--muted); }
.bank-item-id { display: flex; flex-direction: column; min-width: 0; }
.bank-count { font-size: 12.5px; color: var(--muted); }
.bank-chip::before, .sent-chip::before {
  content: ""; flex: none; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor;
}
.bank-accts { margin: 10px 0 0; padding: 0 0 0 50px; }
.bank-acct { padding: 8px 0; }
.bank-asof { margin-left: 6px; font-size: 12px; color: var(--muted); }
.bank-note { margin: 10px 0 0 50px; font-size: 13px; line-height: 1.5; color: var(--ink-dim); }
.bank-item-actions { margin: 12px 0 0 50px; }
.bank-item > .help { margin-left: 50px; }

/* ---- Send your statements & bills -------------------------------------- */
.send-card { container-type: inline-size; }
.dropzone.send-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 28px 20px; text-align: center; border-radius: var(--radius-md);
}
.send-drop .dz-ic {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 4px;
  border-radius: 14px; background: var(--accent-tint); color: var(--accent);
}
.send-drop .dz-ic svg { width: 22px; height: 22px; }
.send-drop .dz-big { font-size: 14.5px; font-weight: 600; color: var(--head); }
.send-drop .dz-big button.link { font-size: inherit; font-weight: 600; }
.dz-touch { display: none; }
@media (hover: none), (max-width: 600px) { .dz-desk { display: none; } .dz-touch { display: inline; } }
.send-drop .dz-hint { font-size: 12.5px; }
.picked-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.picked-list:empty { display: none; }
.picked-item {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin: 0; padding: 5px 5px 5px 10px;
  border: 1px solid var(--card-border); border-radius: var(--radius-pill); background: var(--surface);
  font-size: 13px; box-shadow: var(--card-shadow);
}
.picked-ic { display: inline-flex; flex: none; color: var(--accent); }
.picked-ic svg { width: 16px; height: 16px; }
.picked-name { min-width: 0; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--head); }
.picked-size { flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
button.picked-del {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0;
  border: 0; border-radius: 50%; background: var(--surface-3); color: var(--ink-dim); cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
button.picked-del:hover { background: var(--danger-soft); color: var(--danger-ink); }
button.picked-del svg { width: 12px; height: 12px; stroke-width: 2.4; }
.send-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 0 20px; }
.send-grid .field label { margin: 18px 0 6px; }
.send-grid .my-pick { display: flex; }
.send-grid .my-pick select { flex: 1 1 auto; min-height: 40px; }
.send-card textarea.send-note { min-height: 40px; height: 40px; padding-top: 9px; font-size: 13.5px; transition: height 0.15s, border-color 0.15s, box-shadow 0.15s; }
.send-card textarea.send-note:focus, .send-card textarea.send-note:not(:placeholder-shown) { height: 88px; }
.send-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 18px; }
#csSend { min-width: 132px; }
.send-msg { min-width: 0; font-size: 13px; color: var(--muted); }
.send-ok { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--success-ink); }
.send-ok svg { flex: none; width: 16px; height: 16px; stroke-width: 2.2; }

/* What you've sent */
.cp-sent { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.cp-sent .sent-title { margin: 0 0 4px; font-size: 14px; }
.sent-item {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; align-items: center; gap: 2px 12px;
  padding: 12px 0; margin: 0; border-bottom: 1px solid var(--line);
}
.sent-list > .sent-item:last-child { border-bottom: 0; }
.sent-ic {
  grid-column: 1; grid-row: 1 / span 2; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px; background: var(--surface-3); color: var(--ink-dim);
}
.sent-ic svg { width: 18px; height: 18px; }
.sent-name { grid-column: 2; grid-row: 1; font-size: 14px; }
.sent-meta { grid-column: 2; grid-row: 2; font-size: 12.5px; color: var(--muted); }
.sent-chip { grid-column: 3; grid-row: 1 / span 2; }
.sent-acts { grid-column: 4; grid-row: 1 / span 2; gap: 6px; }
.sent-lock, .sent-move { grid-column: 2 / -1; }
.sent-lock { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.sent-lock svg { flex: none; width: 14px; height: 14px; }
@container (max-width: 560px) {
  .send-grid { grid-template-columns: 1fr; }
  .sent-item { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .sent-acts { grid-column: 2 / -1; grid-row: auto; justify-content: flex-start; margin-top: 8px; }
  .picked-name { max-width: 160px; }
  .send-card textarea.send-note { height: 64px; }
  .send-card textarea.send-note:focus, .send-card textarea.send-note:not(:placeholder-shown) { height: 96px; }
}

/* ===========================================================================
   3. Phones and narrow windows
   =========================================================================== */
@media (max-width: 1180px) {
  .auth.wide { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth.wide .auth-brand {
    position: relative; height: auto; min-height: 0; padding: 22px 32px 30px; gap: 14px;
  }
  .auth.wide .auth-lede, .auth.wide .auth-benefits, .auth.wide .auth-brand-foot { display: none; }
  .auth.wide .auth-headline { margin: 0; font-size: 24px; }
  .auth.wide .auth-main { padding: 32px 24px 20px; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-brand { position: relative; height: auto; min-height: 0; padding: 22px 20px 52px; gap: 14px; }
  .auth-lede, .auth-benefits, .auth-brand-foot { display: none; }
  .auth-headline { margin: 0; font-size: 24px; }
  .auth-main { padding: 0 16px 20px; }
  .auth-body { align-items: flex-start; margin-top: -32px; }
  .auth.wide .auth-body { margin-top: 0; }
  .auth.wide .auth-brand { padding: 22px 20px 30px; }
  .auth.wide .auth-main { padding: 24px 16px 20px; }
  .auth-top { top: 18px; right: 16px; }
  .auth-card { padding: 28px 22px 24px; border-radius: 18px; }
  .pay-head .auth-title { font-size: 24px; }
}
@media (max-width: 820px) {
  .bank-accts { padding-left: 0; }
  .bank-note, .bank-item-actions, .bank-item > .help { margin-left: 0; }
  button.picked-del { width: 28px; height: 28px; }
  .cp-page-head { align-items: flex-start; }
  .cp-page-title { align-items: flex-start; }
  .cp-page-actions { width: 100%; }
  .cp-page-actions .cp-pdf { flex: 1 1 auto; }
  .cp-steps { grid-template-columns: 1fr; }
  .panel.cp-pw-card { padding: 24px 18px; }
}
@media (max-width: 430px) {
  .card-head.cp-head { flex-wrap: nowrap; align-items: flex-start; gap: 12px; }
  .card-head.cp-head > .icon-bubble { width: 36px; height: 36px; border-radius: 10px; }
  .auth-logo-chip .auth-logo { height: 28px; }
  .auth-headline { font-size: 21px; }
  .auth-card { padding: 24px 18px 22px; }
  .auth-title { font-size: 22px; }
  .auth-top .auth-signout { --btn-h: 36px; padding: 4px 12px; }
  .auth-steps li:not(.current) .auth-step-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .auth-steps li + li::before { width: 20px; }
  .cp-months { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mtile { padding: 12px; }
  .mtile-v { font-size: 18px; }
  .mtile-top { margin-bottom: 8px; }
  .mtile-ic { width: 30px; height: 30px; }
  .bank-item-top { grid-template-columns: auto minmax(0, 1fr); }
  .bank-item-top .bank-chip { grid-column: 2; justify-self: start; }
  .dropzone.send-drop { padding: 22px 14px; }
}
