.customer-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 20px}
.customer-field{display:flex;flex-direction:column;gap:8px;min-width:0;font-size:12px}
.customer-field input{display:block;width:100%;min-width:0;padding:11px 12px;font-size:14px;line-height:1.5;border:1px solid var(--glass-line,#666);border-radius:6px;color:var(--theme-ink);background:var(--glass-field,#111)}
.customer-form-actions{display:flex;flex-wrap:wrap;gap:10px;margin:24px 0 12px}
.customer-save-status{font-size:12px;line-height:1.6;min-height:20px;color:var(--theme-muted)}
.customer-local-note{margin-top:24px;padding-top:16px;border-top:1px solid var(--glass-line);font-size:10px;color:var(--theme-muted);line-height:1.7}
.customer-address-block{padding:20px;margin:24px 0;border:1px solid var(--glass-line);border-radius:9px;min-width:0}
.customer-address-block legend{font-weight:650;font-size:15px;padding:0 8px}
.customer-address-block[hidden]{display:none!important}
.customer-same-address{display:flex;gap:12px;align-items:center;font-size:12px;line-height:1.6;margin:22px 0;cursor:pointer}
.customer-same-address input{width:17px;height:17px;flex:0 0 17px;margin:0;accent-color:#ffc23a}
.customer-empty{display:flex;flex-direction:column;align-items:flex-start;gap:15px;border:1px solid var(--glass-line);border-radius:10px;padding:26px;margin-top:28px}
.customer-empty>svg{width:34px;height:34px;fill:none;stroke:currentColor;stroke-width:1.2;opacity:.8}
.customer-empty h3{font-size:22px;line-height:1.35;letter-spacing:-.5px;margin:0}
.customer-empty p{font-size:13px;line-height:1.8;color:var(--theme-muted);margin:0}
.customer-coming{display:block;font-size:11px;line-height:1.6;color:var(--theme-muted);padding:10px 0}
body[data-mode=phone] .customer-field-grid{grid-template-columns:1fr;gap:16px}
body[data-mode=phone] .customer-field input{font-size:16px}
body[data-mode=phone] .customer-address-block{padding:16px}
body[data-mode=phone] .customer-empty{padding:20px}

/* Keep customer information within the application window. */
body[data-mode][data-appearance] .customer-window .content{padding:12px 18px}
body[data-mode][data-appearance] .customer-window .eyebrow{font-size:10px;line-height:1.3;margin:0 0 4px}
body[data-mode][data-appearance] .customer-window h2{font-size:21px;line-height:1.15;margin:4px 0 6px}
body[data-mode][data-appearance] .customer-window .lead{font-size:12px;line-height:1.4;margin:0 0 10px}
.customer-window .customer-field-grid{gap:8px 12px}
.customer-window .customer-field{gap:4px;font-size:12px;line-height:1.3}
.customer-window .customer-field input{height:32px;padding:5px 9px;font-size:14px;line-height:20px}
.customer-window .customer-address-block{padding:8px 10px 10px;margin:8px 0;border-radius:6px}
.customer-window .customer-address-block legend{font-size:13px;padding:0 6px}
.customer-window .customer-form-actions{gap:8px;margin:10px 0 0}
.customer-window .customer-save-status{font-size:11px;line-height:1.4;min-height:0;margin:6px 0 0}
.customer-window .customer-save-status:empty{display:none}
.customer-window .customer-local-note{margin:10px 0 0;padding-top:8px;line-height:1.4}
.customer-window .customer-same-address{gap:8px;margin:8px 0;font-size:12px;line-height:1.4}
.customer-window .folder-navigation{padding:6px 0 8px}
.customer-window .folder-nav-heading{padding:6px 14px;font-size:11px}
.customer-window .folder-nav-item{min-height:30px;padding:6px 12px;font-size:12px;gap:8px}
.customer-window .folder-nav-item svg{width:17px;height:17px;flex:0 0 17px}
.customer-window .folder-nav-divider{margin:7px 12px}
.customer-window .customer-empty{gap:9px;padding:14px;margin-top:12px}
.customer-window .customer-empty h3{font-size:18px}
.customer-window .customer-empty p{font-size:12px;line-height:1.5}
.customer-window .customer-coming{padding:4px 0}
body[data-mode=desktop] .customer-window [data-customer-form=addresses] .customer-field-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
body[data-mode=desktop] .customer-window [data-customer-form=addresses]:has([data-customer-address=billing]:not([hidden])){display:grid;grid-template-columns:1fr 1fr;gap:0 12px;align-items:start}
body[data-mode=desktop] .customer-window [data-customer-form=addresses]:has([data-customer-address=billing]:not([hidden])) .customer-address-block{grid-row:1}
body[data-mode=desktop] .customer-window [data-customer-form=addresses]:has([data-customer-address=billing]:not([hidden])) .customer-field-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
body[data-mode=desktop] .customer-window [data-customer-form=addresses]:has([data-customer-address=billing]:not([hidden])) :is(.customer-same-address,.customer-form-actions,.customer-save-status){grid-column:1/-1}
body[data-mode=phone] .customer-window .content{padding:12px 14px}
body[data-mode=phone] .customer-window .customer-field-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px}
body[data-mode=phone] .customer-window .customer-field input{font-size:16px;height:36px;padding:6px 8px}
body[data-mode=phone] .customer-window .customer-field:has(input[name$=".line1"]),body[data-mode=phone] .customer-window .customer-field:has(input[name$=".line2"]),body[data-mode=phone] .customer-window .customer-field:has(input[name$=".name"]),body[data-mode=phone] .customer-window .customer-field:has(input[name$=".company"]){grid-column:1/-1}
body[data-mode=phone] .customer-window .customer-form-actions .action{min-height:36px}

body[data-mode][data-appearance] .window.customer-window .content{padding:12px 18px!important}
.customer-window[data-customer-section=addresses] .eyebrow,.customer-window[data-customer-section=addresses] .lead{display:none}
body[data-mode=desktop] .customer-window [data-customer-form=addresses]:has([data-customer-address=billing]:not([hidden])) .customer-field{font-size:11px;line-height:1.25;gap:3px}
body[data-mode=desktop] .customer-window [data-customer-form=addresses]:has([data-customer-address=billing]:not([hidden])) .customer-field input{height:28px;padding:3px 7px}
body[data-mode=desktop] .customer-window [data-customer-form=addresses]:has([data-customer-address=billing]:not([hidden])) .customer-field-grid{gap:5px 10px}
body[data-mode=desktop] .customer-window [data-customer-form=addresses]:has([data-customer-address=billing]:not([hidden])) .customer-address-block{padding:6px 8px;margin:6px 0}
body[data-mode=desktop] .customer-window [data-customer-form=addresses]:has([data-customer-address=billing]:not([hidden])) :is(.customer-form-actions,.customer-same-address){margin:6px 0 0}

/* Distinct addresses remain stacked, with compact fields across each row. */
body[data-mode=desktop] .customer-window [data-customer-form=addresses]:has([data-customer-address=billing]:not([hidden])){display:block}
body[data-mode=desktop] .customer-window [data-customer-form=addresses]:has([data-customer-address=billing]:not([hidden])) [data-customer-address=shipping] .customer-field-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
body[data-mode=desktop] .customer-window [data-customer-form=addresses]:has([data-customer-address=billing]:not([hidden])) [data-customer-address=billing] .customer-field-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.customer-window[data-customer-guest=true] .folder-navigation{display:none!important}
.customer-window[data-customer-guest=true] .folder-layout{grid-template-columns:minmax(0,1fr)}

body[data-mode][data-appearance] .window.account-window .content{padding:14px 20px!important}
body[data-mode][data-appearance] .account-window h2{font-size:22px;line-height:1.2;margin:5px 0 8px}
body[data-mode][data-appearance] .account-window .lead{font-size:12px;line-height:1.4;margin:0 0 10px}
.account-window .account-form .gift-field{margin:8px 0;gap:4px;font-size:12px}
.account-window .account-form .gift-field input{height:34px;padding:5px 9px;font-size:16px;line-height:22px}
.account-window .account-switch{margin-top:10px}
.account-window .account-error:empty{display:none}

.account-window .folder-nav-item:disabled{opacity:.4;cursor:not-allowed;pointer-events:auto}
.account-window .folder-nav-item:disabled:hover{background:transparent}

.customer-window .customer-theme-choice{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:14px;margin:14px 0;padding:4px}
.customer-window .customer-theme-choice button[data-appearance]{flex:0 0 32px;width:32px;min-width:32px;height:32px;padding:0}
.customer-window[data-app=art-cart][data-customer-section=cart] .folder-layout{grid-template-columns:minmax(0,1fr)}
.customer-window[data-app=art-cart][data-customer-section=cart] :is(.folder-navigation,.folder-navigation-toggle){display:none!important}

/* Match purchase records to the active customer theme. */
.customer-window:is([data-customer-section=orders],[data-customer-section=invoices]) :is(.pulse-order-detail,.pulse-panel){
  background:var(--glass-field);
  border-color:var(--glass-line);
  color:var(--theme-ink);
  padding:12px;
  margin:10px 0;
  overflow-wrap:anywhere;
}
.customer-window:is([data-customer-section=orders],[data-customer-section=invoices]) :is(.pulse-note,.pulse-empty,.pulse-line small){
  color:var(--theme-muted);
}
.customer-window[data-customer-section=orders] .pulse-heading{flex-wrap:wrap;gap:4px 8px}
.customer-window[data-customer-section=orders] .pulse-line{border-color:var(--glass-line)}
.customer-window[data-customer-section=orders] .pulse-status{
  background:color-mix(in srgb,var(--theme-ink) 9%,transparent);
  border-color:var(--glass-line);
  color:var(--theme-ink);
}
.customer-window[data-customer-section=orders] .pulse-status.is-paid{font-weight:650}
.customer-window[data-customer-section=orders] .pulse-references a{color:var(--theme-ink);text-decoration:underline}
.customer-window[data-customer-section=orders] .pulse-order-detail:focus{outline-color:var(--theme-ink)}
body[data-mode][data-appearance] .customer-window:is([data-customer-section=orders],[data-customer-section=invoices]) a.action.secondary{
  background:var(--glass-field);
  border-color:var(--glass-line);
  color:var(--theme-ink);
}
