/* Invoice Flow v5 — customer popup theme. */
.v3-customer-scrim{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:16px;background:var(--backdrop-bg);backdrop-filter:blur(4px);font-family:var(--font-ui);color:var(--text-primary);-webkit-font-smoothing:antialiased;animation:v3scrim .16s ease}
@keyframes v3scrim{from{opacity:0}to{opacity:1}}
@keyframes v3pop{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:none}}
.v3-customer-popup{width:540px;max-width:100%;display:flex;flex-direction:column;overflow:hidden;background:var(--surface-primary);border:1px solid var(--border-default);border-radius:18px;box-shadow:var(--shadow-high);animation:v3pop .18s var(--ease-out)}
.v3-customer-popup input,.v3-customer-popup button{font:inherit;color:inherit}
.v3-customer-popup input::placeholder{color:var(--text-subtle);font-weight:500}

.v3-customer-popup .head{padding:20px 24px 0;background:var(--surface-primary)}
.v3-customer-popup .popup-brand{display:flex;align-items:center;gap:7px;color:var(--text-muted);font-size:10.5px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
.v3-customer-popup .head-row{display:flex;align-items:center;gap:12px;margin-top:10px}
.v3-customer-popup .title{font-family:var(--font-heading);font-size:20px;font-weight:700;letter-spacing:-.01em}
.v3-customer-popup .step-label{flex:none;padding:4px 10px;border:1px solid var(--border-default);border-radius:999px;background:var(--surface-primary);font-size:10.5px;font-weight:800;letter-spacing:.07em;color:var(--text-muted)}
.v3-customer-popup .close{width:32px;height:32px;display:flex;align-items:center;justify-content:center;flex:none;padding:0;border:0;border-radius:50%;background:transparent;color:var(--text-muted);cursor:pointer;transition:background-color var(--dur-fast) var(--ease-standard),color var(--dur-fast) var(--ease-standard)}
.v3-customer-popup .close:hover{background:var(--surface-secondary);color:var(--text-primary)}

.v3-customer-popup .tabs{display:flex;gap:2px;margin-top:16px;padding:3px;border:1px solid var(--border-subtle);border-radius:10px;background:var(--surface-secondary)}
.v3-customer-popup .tab{flex:1;padding:8px 10px;border:0;border-radius:8px;background:transparent;color:var(--text-muted);cursor:pointer;text-align:center;font:inherit;font-size:12.5px;font-weight:700;transition:all var(--dur-base) var(--ease-standard)}
.v3-customer-popup .tab:hover{color:var(--text-primary)}
.v3-customer-popup .tab.active{background:var(--surface-primary);color:var(--text-primary);box-shadow:var(--shadow-low)}
.v3-customer-popup .bar{display:flex;gap:4px;height:3px;margin-top:14px;border-radius:99px;overflow:hidden}
.v3-customer-popup .bar span{flex:1;border-radius:99px;background:var(--border-subtle);transition:background-color var(--dur-slow) var(--ease-standard)}
.v3-customer-popup .bar span.done{background:var(--brand-accent)}

.v3-customer-popup .body{height:346px;padding:20px 24px;overflow:auto;background:var(--surface-primary)}
.v3-customer-popup .pane[hidden]{display:none}
.v3-customer-popup .stack{display:flex;flex-direction:column;gap:14px}
.v3-customer-popup .row{display:flex;gap:10px}
.v3-customer-popup .row>*{flex:1;min-width:0}
.v3-customer-popup .row .w2{flex:2}
.v3-customer-popup .label{margin-bottom:6px;color:var(--text-muted);font-size:11px;font-weight:800;letter-spacing:.04em}
.v3-customer-popup .label .req{color:var(--status-error)}
.v3-customer-popup .field{width:100%;min-height:44px;margin:0;padding:10px 13px;border:1px solid var(--border-default);border-radius:10px;background:var(--surface-primary);font-weight:600;transition:border-color var(--dur-fast) var(--ease-standard),box-shadow var(--dur-fast) var(--ease-standard)}
.v3-customer-popup .field:hover{border-color:var(--border-strong)}
.v3-customer-popup .field:focus{outline:none;border-color:var(--brand-accent);box-shadow:0 0 0 4px var(--focus-ring)}
.v3-customer-popup .field.invalid{border-color:var(--status-error);box-shadow:0 0 0 4px color-mix(in srgb,var(--status-error) 16%,transparent)}
.v3-customer-popup .check{display:flex;align-items:center;gap:9px;padding-top:2px;font-size:13px;font-weight:600;cursor:pointer}
.v3-customer-popup .check input{width:16px;height:16px;min-height:16px;margin:0;padding:0;border-radius:4px;accent-color:var(--brand-accent-strong)}

.v3-customer-popup .foot{display:flex;align-items:center;gap:8px;padding:14px 24px;border-top:1px solid var(--border-subtle);background:var(--surface-primary)}
.v3-customer-popup .back{min-height:0;padding:0;border:0;background:none;color:var(--text-muted);cursor:pointer;font-size:13px;font-weight:700;transition:color var(--dur-fast) var(--ease-standard)}
.v3-customer-popup .back:hover{color:var(--text-primary)}
.v3-customer-popup .grow{flex:1}
.v3-customer-popup .btn{min-height:42px;padding:10px 16px;border:1px solid var(--border-default);border-radius:10px;background:var(--surface-primary);box-shadow:var(--shadow-xs);color:var(--text-primary);cursor:pointer;font-size:13px;font-weight:600;transition:border-color var(--dur-fast) var(--ease-standard),background-color var(--dur-fast) var(--ease-standard)}
.v3-customer-popup .btn:hover{border-color:var(--border-strong);background:var(--action-secondary-hover);color:var(--action-secondary-hover-text)}
.v3-customer-popup .btn-primary{min-height:42px;padding:10px 18px;border:1px solid var(--action-primary);border-radius:10px;background:var(--action-primary);box-shadow:var(--shadow-xs);color:var(--action-primary-text);cursor:pointer;font-size:13px;font-weight:var(--button-weight);transition:background-color var(--dur-fast) var(--ease-standard),transform var(--dur-fast) var(--ease-standard)}
.v3-customer-popup .btn-primary:hover{background:var(--action-primary-hover);border-color:var(--action-primary-hover);color:var(--action-primary-hover-text)}
.v3-customer-popup .btn-primary:active{transform:scale(.985)}
.v3-customer-popup .btn-primary:focus-visible,.v3-customer-popup .btn:focus-visible,.v3-customer-popup .tab:focus-visible,.v3-customer-popup .close:focus-visible{outline:3px solid var(--focus-ring);outline-offset:2px}

@media(max-width:560px){
  .v3-customer-scrim{align-items:flex-end;padding:8px}
  .v3-customer-popup{border-radius:16px}
  .v3-customer-popup .head,.v3-customer-popup .body,.v3-customer-popup .foot{padding-left:18px;padding-right:18px}
  .v3-customer-popup .body{height:min(58vh,346px)}
  .v3-customer-popup .row{flex-direction:column;gap:14px}
}
