/* studio/customers.css: the new look ("studio") for Customers and Customer Statements (ui/customers.js, ui/statements.js). Every rule starts with
   html[data-ui="studio"] and copies the Classic selector from public/css/customers.css verbatim, inside the same media block (SPEC 2026-11-03 section 3).
   Values: panel/02-visual-system.md section 4; structure panel/01-ux-architect.md section 4 (Customers); hints panel/03-accessibility-mobile.md section 4.
   Every colour and size is a token of studio/tokens.css. No transition shorthand (a rule here would outrank the keyboard flag in tokens.css): transition-property
   only. A rule here outside a media block outranks a Classic rule inside one, so every phone or desktop variant touched is restated inside the same block.
   The statement paper (.st-sheet) is never restyled: the one rule on it keeps Classic's gap, padding and overflow against the shared .panel rule. */

/* ---- small parts: the round buttons become 36px square quiet buttons; in the list the dots give way to the word More (panel 1, SPEC 4.9); the count in
   the Filter button is a bare mono figure; a text button is the primary ink; the late amounts and the field errors are the primary ink with the one red shape. ---- */
html[data-ui="studio"] .cu-circle{width:var(--control-s);height:var(--control-s);min-height:var(--control-s);border-color:transparent;border-radius:var(--radius-xs);background:transparent;color:var(--text-primary);touch-action:manipulation;-webkit-user-select:none;user-select:none}
html[data-ui="studio"] .cu-circle[disabled]{opacity:1;color:var(--text-tertiary)}
@media (hover:hover) and (pointer:fine){html[data-ui="studio"] .cu-circle:hover:not([disabled]){background:var(--bg-raised)}}
html[data-ui="studio"] .cu-list .cu-circle{width:auto;padding:0 8px;font-size:var(--type-m);font-weight:700}
html[data-ui="studio"] .cu-list .cu-circle::before{content:"More"}
html[data-ui="studio"] .cu-list .cu-circle .cu-ico{display:none}
html[data-ui="studio"] .cu-count{min-width:0;height:auto;padding:0;border-radius:0;background:none;color:inherit;font-family:var(--font-num);font-size:inherit;font-weight:400;font-variant-numeric:tabular-nums}
html[data-ui="studio"] .cu-link,html[data-ui="studio"] .cu-linkbtn{color:var(--text-primary)}
html[data-ui="studio"] .cu-err{display:flex;align-items:center;gap:8px;font-weight:700;color:var(--text-primary)}
html[data-ui="studio"] .cu-err::before{content:"";flex:none;width:12px;height:11px;background:var(--flag);clip-path:polygon(50% 0,100% 100%,0 100%)}
html[data-ui="studio"] .cu-err:empty{display:none}
html[data-ui="studio"] .cu-late,html[data-ui="studio"] .table td .sub.cu-late{display:inline-flex;align-items:center;gap:6px;color:var(--text-primary)}
html[data-ui="studio"] .cu-late::before,html[data-ui="studio"] .table td .sub.cu-late::before{content:"";flex:none;width:12px;height:11px;background:var(--flag);clip-path:polygon(50% 0,100% 100%,0 100%)}
/* in the list the overdue line sits under the balance, at the right; on the customer page the Overdue word already carries the triangle, so the due words do not */
html[data-ui="studio"] .table td .sub.cu-late{display:flex;justify-content:flex-end}
html[data-ui="studio"] .cu-due.cu-late::before{content:none}
html[data-ui="studio"] .cu-cur{color:var(--text-secondary)}
/* The red Delete is the dark secondary fill with the triangle before its word (Admin: destructive takes two presses; the dialog is the second). */
html[data-ui="studio"] .btn.primary.cu-warn{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--btn-strong);border-color:transparent;color:var(--text-primary)}
html[data-ui="studio"] .btn.primary.cu-warn::before{content:"";flex:none;width:12px;height:11px;background:var(--flag);clip-path:polygon(50% 0,100% 100%,0 100%)}
@media (hover:hover) and (pointer:fine){html[data-ui="studio"] .btn.primary.cu-warn:hover{background:var(--btn-strong-hover);filter:none}}

/* ---- menus: a danger row is the word in ink with the triangle; the chosen sort is the weight alone ---- */
html[data-ui="studio"] .cu-menu button.cu-danger{color:var(--text-primary)}
html[data-ui="studio"] .cu-menu button.cu-danger::before{content:"";flex:none;width:12px;height:11px;background:var(--flag);clip-path:polygon(50% 0,100% 100%,0 100%)}
html[data-ui="studio"] .cu-menu button[aria-checked=true]{background:none}

/* ---- dialogs: the panel grey with the rule as its edge, no shadow, the 60 percent backdrop, the brand's 260ms entrance (these are not .dlg, so tokens.css
   does not reach them); opened by key they appear at once, under reduced motion they appear at once. ---- */
html[data-ui="studio"] .cu-dlg{border:1px solid var(--divider);box-shadow:none}
/* The entrance is a transition from @starting-style, not a keyframe animation: under the keyboard flag Chrome creates no animation at all for a 0s
   duration, and the first pointer press (which lifts the flag) would start the entrance afresh and move the dialog under the click. A finished
   transition does not replay when its duration changes. The keyboard zero is restated here at the same footing, since this rule outranks the flag's star. */
html[data-ui="studio"] .cu-dlg[open]{animation:none;opacity:1;transform:none;transition-property:opacity,transform;transition-duration:260ms;transition-timing-function:var(--ease)}
html[data-ui="studio"] .cu-dlg::backdrop{background:rgba(0,0,0,.6)}
html[data-ui="studio"] .cu-dlg[open]::backdrop{animation:none;opacity:1;transition-property:opacity;transition-duration:260ms;transition-timing-function:var(--ease)}
@starting-style{
  html[data-ui="studio"] .cu-dlg[open]{opacity:0;transform:matrix(.96,0,0,.96,0,0)}
  html[data-ui="studio"] .cu-dlg[open]::backdrop{opacity:0}
}
html[data-ui="studio"][data-input="keyboard"] .cu-dlg[open],html[data-ui="studio"][data-input="keyboard"] .cu-dlg[open]::backdrop{transition-duration:0s}
html[data-ui="studio"] .cu-dlg-head{padding:20px 20px 8px 24px}
html[data-ui="studio"] .cu-dlg-head h2{line-height:28px}
html[data-ui="studio"] .cu-dlg-body{gap:12px;padding:8px 24px 16px}
html[data-ui="studio"] .cu-dlg-foot{gap:8px;padding:16px 24px 24px}
html[data-ui="studio"] .cu-set legend{line-height:18px}
html[data-ui="studio"] .cu-money>span{font-family:var(--font-num)}
@media (max-width:519px){html[data-ui="studio"] .cu-dlg-head{padding:16px 12px 8px 16px}html[data-ui="studio"] .cu-dlg-body{padding:8px 16px 16px}html[data-ui="studio"] .cu-dlg-foot{padding:12px 16px 16px}}

/* ---- the Send dialog: the preview keeps the panel-2 grey with the rule as its edge ---- */
html[data-ui="studio"] .cu-to-row>.cu-circle{margin-top:2px}
html[data-ui="studio"] .cu-mail{padding:16px;border-color:var(--divider)}

/* ---- the list: no card, the rows straight on the page (SPEC 4.1); the search button centred in the 40px field; a 13px footer with tabular figures ---- */
html[data-ui="studio"] .cu-panel{gap:16px;background:none;border:0;border-radius:0;padding:0}
html[data-ui="studio"] .cu-tools{gap:8px}
/* the search takes a whole line on a phone, so Sort and Filter wrap under it and the left-anchored Sort menu opens from the page's edge, inside the screen */
html[data-ui="studio"] .cu-search{flex:1 1 320px}
html[data-ui="studio"] .cu-search .cu-circle{right:2px;top:2px}
html[data-ui="studio"] .cu-owed{color:var(--text-primary)}
html[data-ui="studio"] .cu-empty:not(:empty){gap:8px;padding:64px 16px}
html[data-ui="studio"] .cu-empty .note{line-height:28px}
html[data-ui="studio"] .cu-art{display:none}
html[data-ui="studio"] .cu-foot{gap:8px 16px;font-size:var(--type-xs);font-variant-numeric:tabular-nums}
html[data-ui="studio"] .cu-show select{min-height:var(--control-s)}
html[data-ui="studio"] .cu-pages{gap:4px}
@media (max-width:959px){
  /* on a phone the balance cell reads left to right (Classic), so the overdue line under it starts at the left too */
  html[data-ui="studio"] .table.cu-list td.num .sub.cu-late{justify-content:flex-start}
}

/* ---- the form: Wave's floating labels become the 13px label over a 40px well (the five Classic state rules are restated so nothing floats); the contact
   box is a section on a hairline, no card; a section head is 18px over 28 (the 28px token is the page title's). ---- */
html[data-ui="studio"] .cu-sec{margin:32px 0 4px;font-size:var(--type-l);line-height:28px}
html[data-ui="studio"] .cu-lbl{padding-top:11px;line-height:18px}
html[data-ui="studio"] .cu-btns{gap:8px}
html[data-ui="studio"] .cu-float{display:flex;flex-direction:column-reverse;gap:6px}
html[data-ui="studio"] .cu-float input,html[data-ui="studio"] .cu-float select{min-height:var(--control);padding:0 12px}
html[data-ui="studio"] .cu-float-t{position:static;max-width:none;font-size:var(--type-xs);line-height:18px;font-weight:700;color:var(--text-secondary);transform:none;transition-property:none}
html[data-ui="studio"] .cu-float input:focus ~ .cu-float-t,html[data-ui="studio"] .cu-float input:not(:placeholder-shown) ~ .cu-float-t,html[data-ui="studio"] .cu-float select ~ .cu-float-t{transform:none}
html[data-ui="studio"] .cu-float select:has(option[value=""]:checked):not(:focus) ~ .cu-float-t{transform:none}
html[data-ui="studio"] .cu-float select:has(option[value=""]:checked) ~ .cu-float-t{transform:none}
html[data-ui="studio"] .cu-float select:focus ~ .cu-float-t{transform:none}
html[data-ui="studio"] .cu-contact{gap:12px;padding:12px 0 0;border-top:1px solid var(--divider);border-radius:0;background:none}
html[data-ui="studio"] .cu-phones,html[data-ui="studio"] .cu-group{gap:12px}

/* ---- the customer page: every panel sits on the page with a rule above it (SPEC 4.1: sections on hairlines, no cards); the avatar in neutral greys;
   the unpaid rows and the activity rows take the 36px button in their last column; money in the mono. ---- */
html[data-ui="studio"] .cu-over{gap:24px}
html[data-ui="studio"] .cu-main{gap:24px}
html[data-ui="studio"] .cu-main>.panel{background:none;border:0;border-top:1px solid var(--divider);border-radius:0;padding:16px 0 0}
html[data-ui="studio"] .cu-profile{gap:16px;background:none;border:0;border-radius:0;padding:0}
html[data-ui="studio"] .cu-av-bg{fill:var(--bg-panel-2)}
html[data-ui="studio"] .cu-av-fg{fill:var(--text-tertiary)}
html[data-ui="studio"] .big.cu-sent{font-family:var(--font-ui)}
html[data-ui="studio"] .cu-unpaid li{grid-template-columns:96px minmax(0,1fr) 170px 110px var(--control-s);gap:8px 16px;padding:12px 0}
html[data-ui="studio"] .cu-due.cu-late{justify-content:flex-end}
html[data-ui="studio"] .cu-amt{font-family:var(--font-num)}
@media (max-width:719px){
  html[data-ui="studio"] .cu-unpaid li{grid-template-columns:auto minmax(0,1fr) auto var(--control-s)}
}
html[data-ui="studio"] .cu-tab{gap:24px}
html[data-ui="studio"] .cu-h2{font-size:var(--type-l);line-height:28px}
html[data-ui="studio"] .cu-acts{gap:8px}
html[data-ui="studio"] .cu-nfilters{font-size:var(--type-xs)}

/* ---- Activity feed: the round icon is bare; the last column takes the 36px button ---- */
html[data-ui="studio"] .cu-act-row{grid-template-columns:120px 32px minmax(0,1fr) var(--control-s);min-height:var(--row)}
html[data-ui="studio"] .cu-act-date{font-family:var(--font-num);font-variant-numeric:tabular-nums;font-size:var(--type-xs)}
html[data-ui="studio"] .cu-act-ico{background:none;color:var(--text-secondary)}
html[data-ui="studio"] .cu-more dt{font-size:var(--type-xs)}
@media (max-width:719px){
  html[data-ui="studio"] .cu-act-row{grid-template-columns:32px minmax(0,1fr) var(--control-s)}
}

/* ---- Customer Statements: the form sits bare on the page (no grey panel); the empty state is a title and a line, no picture; the actions at the left.
   The paper (.st-sheet) is not restyled: this keeps Classic's gap, padding and overflow against the shared .panel rule. Its light re-pin belongs to tokens.css. ---- */
html[data-ui="studio"] .st-form{border:0;border-radius:0;padding:0;background:none}
html[data-ui="studio"] .st-fields{gap:8px 16px}
html[data-ui="studio"] .st-dates legend{line-height:18px}
html[data-ui="studio"] .st-empty{gap:8px;padding:64px 16px}
html[data-ui="studio"] .st-empty h2{font-size:var(--type-l);line-height:28px}
html[data-ui="studio"] .st-art{display:none}
html[data-ui="studio"] .st-result{gap:24px}
html[data-ui="studio"] .st-actions{justify-content:flex-start;gap:8px}
html[data-ui="studio"] .st-sheet{gap:0;padding:0;overflow:hidden}

@media (prefers-reduced-motion:reduce){html[data-ui="studio"] .cu-dlg[open],html[data-ui="studio"] .cu-dlg[open]::backdrop{animation:none;transition-duration:0s}}

/* ---- the primary contact's other numbers ---- */
html[data-ui="studio"] .cu-more-phones{gap:12px}
