/* Real account forms need more room than the former profile-only demo. */
.auth-card{height:560px}.auth-card:has([data-form=setup]){height:760px}.auth-fields{overflow-y:auto;scroll-padding:24px;gap:12px}.auth-fields .inline-error:empty{display:none}.auth-fields .inline-error{color:#ffd2c9}.btn:disabled{cursor:wait;opacity:.65}form[data-busy=true]{cursor:progress}
@media(max-width:600px){.auth-card{height:710px}.auth-card:has([data-form=setup]){height:990px}.auth-fields{height:calc(100% - 210px);justify-content:flex-start;padding-top:24px}.auth-stage{align-items:flex-start;overflow:clip}}

/* Guided order flow reuses the existing surfaces, tokens and motion. */
.flow-hint{font-size:12px;line-height:1.65;color:var(--muted);margin:12px 0 18px}
.customer-selection{margin:18px 0;font-size:13px;line-height:1.6}
.customer-selection h3{margin-bottom:5px}
.selection-toolbar,.review-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.selection-toolbar{margin:10px 0 18px;font-size:12px}
#wizard-form .search{width:100%}#wizard-form .search input{min-height:44px}
.wizard-pieces .selectable-piece[hidden]{display:none}
.wizard-pieces .product-card{height:100%}.wizard-pieces .product-card .product-art{height:104px;min-height:104px}
.wizard-pieces .product-art svg{height:100px}.wizard-pieces .selectable-piece>input{width:24px;height:24px;right:18px;top:18px}
.order-review{align-items:start}.order-review .cols2{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.order-review .choice-card{padding:14px;gap:10px;flex-direction:column;align-items:flex-start}
.order-review .choice-card h3{font-size:13px}.order-review .choice-card small{font-size:11px}
.order-next{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:24px}
.order-next h2{font-size:20px;font-weight:550;letter-spacing:-.5px;margin:8px 0}
.order-next p{font-size:13px;line-height:1.65;color:var(--muted);max-width:650px}
.order-next strong{display:block;font-size:13px;margin-top:12px}.order-next .actions{flex-shrink:0;justify-content:flex-end}
.return-check{cursor:pointer;border-radius:14px;padding:14px 10px;transition:background 160ms ease}
.return-check input{width:24px;height:24px;flex-shrink:0;accent-color:var(--accent)}
.return-check:has(input:checked){background:var(--accent-soft)}
.return-check>.icon{opacity:0;color:var(--accent)}.return-check:has(input:checked)>.icon{opacity:1}
.return-check:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:1100px){.order-next{align-items:flex-start;flex-direction:column}.order-next .actions{justify-content:flex-start}}
@media(max-width:600px){
  .order-next{padding:20px;gap:18px}.order-next h2{font-size:19px}.order-next .actions{width:100%;display:grid;grid-template-columns:1fr}
  .order-next .btn{width:100%;min-height:48px}.review-heading{gap:10px}.review-heading .row{min-width:0}
  .review-heading h3{overflow-wrap:anywhere}.order-review .panel{padding:20px}
  .selection-toolbar{gap:8px}.selection-toolbar strong{font-size:11px}
  .wizard-pieces{gap:12px}
}
/* Allow the receipt table to scroll inside its card on narrow order screens. */
.grid>.stack{min-width:0}

/* Onboarding uses the same glass surfaces and native controls as the operation. */
.auth-fields .auth-hint{font-size:12px;line-height:1.6;color:#d0d7c8;margin:0;text-align:left}
.auth-fields .auth-help-copy{font-size:13px;line-height:1.8;color:#e1e6da;margin:0}
.auth-password-help{display:flex;gap:12px;align-items:center;justify-content:space-between}
.auth-password-help .link{min-height:44px;flex-shrink:0;font-size:12px}
.getting-started{margin-bottom:24px}.getting-started h2{font-size:22px;margin-top:8px;letter-spacing:-.5px}
.start-steps{list-style:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;padding:0;margin:24px 0}
.start-steps li{display:flex;gap:12px;align-items:flex-start;min-width:0}
.start-number{width:32px;height:32px;flex:0 0 32px;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;background:var(--soft);font-size:12px;color:var(--ink)}
.start-number .icon{width:16px;height:16px}.start-steps h3{font-size:14px;line-height:1.5}
.start-steps p,.team-guide p{font-size:13px;line-height:1.75;color:var(--muted);margin:8px 0 14px}
.start-steps .btn{white-space:normal;text-align:left}.start-team{border-top:1px solid var(--line);padding-top:16px;margin-bottom:0}
.start-team .btn{margin:8px}.guide-steps{padding-left:24px;margin:20px 0}.guide-steps li{padding-left:8px;margin-bottom:24px}.guide-steps li::marker{color:var(--muted);font-size:13px}.team-guide h3{font-size:15px;line-height:1.5}.team-guide .subtle-box p:last-child{margin-bottom:0}
@media(max-width:1100px){.start-steps{grid-template-columns:1fr;gap:20px}.start-steps p{margin-bottom:8px}}
@media(max-width:600px){.auth-password-help{align-items:flex-start;flex-direction:column;gap:0}.auth-password-help .link{padding:0}.getting-started h2{font-size:20px}.start-team .btn{margin-left:0}.auth-fields{padding-left:24px;padding-right:24px}}
/* Intrinsic mobile layout keeps help copy clear and lets the page follow the keyboard. */
@media(max-width:600px){
  .auth-stage{min-height:100svh}
  .auth-card,.auth-card:has([data-form=setup]){height:auto;display:grid;grid-template-columns:minmax(0,1fr)}
  .auth-intro:not(.recovery-intro){position:relative;grid-area:1/1;left:auto;top:auto;bottom:auto;width:100%;height:auto;padding:28px 24px 8px}
  .auth-fields.login-fields{position:relative;grid-area:2/1;left:auto;top:auto;width:100%;height:auto;padding:24px;overflow:visible}
  .auth-fields.recover-fields{inset:0;width:100%;height:100%;padding:28px 24px;justify-content:flex-start}
  .auth-intro.recovery-intro{display:none}
  .auth-card.recover .auth-diagonal{transform:translateY(100%)}
}

/* Compact access: one glass surface, intrinsic height and page-level scrolling. */
.auth-minimal.auth-stage{min-height:100svh;padding:48px 24px;display:grid;place-items:center;overflow:visible;background:radial-gradient(ellipse at 18% 20%,var(--aura-one),transparent 55%),radial-gradient(ellipse at 86% 80%,var(--aura-two),transparent 55%),var(--bg);color:var(--ink)}
.auth-minimal.auth-stage:before,.auth-minimal.auth-stage:after{display:none}
html[data-palette] .auth-minimal .auth-card,.auth-minimal .auth-card{position:relative;display:block;width:100%;max-width:424px;height:auto;min-height:0;padding:36px;border-radius:28px;background:linear-gradient(135deg,var(--glass-light),transparent 65%),color-mix(in srgb,var(--surface) 78%,transparent);border:1px solid var(--glass-rim);box-shadow:inset 0 1px 0 var(--glass-rim),inset 0 -1px 0 var(--glass-edge),0 24px 70px var(--glass-shadow);backdrop-filter:blur(24px) saturate(135%);-webkit-backdrop-filter:blur(24px) saturate(135%);overflow:hidden;color:var(--ink)}
.auth-minimal .auth-brand{position:relative;inset:auto;margin:0 0 32px;color:var(--ink);z-index:1}
.auth-minimal .wordmark{font-size:12px;letter-spacing:2.4px}.auth-minimal .brand-symbol{width:30px;height:30px;font-size:15px;opacity:.75}
.auth-minimal .auth-views{display:grid;position:relative;z-index:1}
.auth-minimal .auth-fields.login-fields,.auth-minimal .auth-fields.recover-fields{position:relative;inset:auto;grid-area:1/1;width:100%;height:auto;padding:0;overflow:visible;display:flex;flex-direction:column;justify-content:flex-start;gap:16px;color:var(--ink);transition:opacity 180ms ease,transform 360ms var(--ease-out, ease)}
.auth-minimal .auth-fields h1{font-family:inherit;font-size:25px;font-weight:550;letter-spacing:-.7px;line-height:1.2;margin:0 0 8px;color:var(--ink)}
.auth-minimal .auth-fields .field{gap:8px}.auth-minimal .auth-fields .field>span{color:var(--muted);font-size:12px}
.auth-minimal .auth-fields .control{min-height:48px;border:1px solid var(--line);border-radius:13px;background:color-mix(in srgb,var(--surface) 68%,transparent);color:var(--ink);font-size:16px;box-shadow:inset 0 1px 0 var(--glass-light)}
.auth-minimal .auth-fields .control:focus{outline:2px solid var(--accent);outline-offset:2px}
.auth-minimal .auth-fields .link{color:var(--muted);font-size:12px;min-height:44px}.auth-minimal .auth-fields .link:hover{color:var(--ink)}
.auth-minimal .auth-fields .auth-hint,.auth-minimal .auth-fields .auth-help-copy{color:var(--muted);line-height:1.65;font-size:12px}
.auth-minimal .auth-fields .auth-help-copy{font-size:14px}
.auth-minimal .auth-fields .inline-error{color:var(--red);font-size:12px;line-height:1.6;margin:0}
.auth-minimal .auth-fields .btn{min-height:48px;border-radius:14px}.auth-minimal .auth-fields .btn.primary{color:var(--on-accent);background:var(--accent);border-color:var(--accent)}
.auth-minimal .auth-password-help{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:12px;margin:-12px 0 -8px}.auth-minimal .auth-password-help .auth-hint{margin-right:auto}
.auth-minimal .auth-help-link{align-self:center;margin:-4px 0 -12px}
.auth-minimal .recover-fields{opacity:0;transform:translateX(12px);pointer-events:none;visibility:hidden}
.auth-minimal .auth-card.recover .login-fields{opacity:0;transform:translateX(-12px);pointer-events:none;visibility:hidden}
.auth-minimal .auth-card.recover .recover-fields{opacity:1;transform:none;pointer-events:auto;visibility:visible}
.auth-minimal .recover-fields .btn{margin-top:8px}
.getting-started h2{font-size:18px;margin:0}.start-steps{margin:24px 0 0;gap:16px}.start-steps h3{margin:2px 0 10px}
@media(max-width:600px){.auth-minimal.auth-stage{padding:24px 20px;align-items:center}.auth-minimal .auth-card{padding:28px 24px;border-radius:24px}.auth-minimal .auth-brand{margin-bottom:28px}}
@media(max-height:650px){.auth-minimal.auth-stage{align-items:start;padding-top:24px;padding-bottom:24px}}
@media(prefers-reduced-motion:reduce){.auth-minimal .auth-fields{transition:none!important;transform:none!important}}
html[data-reduce=true] .auth-minimal .auth-fields{transition:none!important;transform:none!important}
html[data-palette][data-opaque=true] .auth-minimal .auth-card{background:var(--surface);backdrop-filter:none;-webkit-backdrop-filter:none}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){html[data-palette] .auth-minimal .auth-card{background:var(--surface)}}
@media(forced-colors:active){html[data-palette] .auth-minimal .auth-card,.auth-minimal.auth-stage,.auth-minimal .auth-fields .control{background:Canvas;color:CanvasText;border-color:CanvasText;box-shadow:none}.auth-minimal .auth-fields .btn.primary{background:ButtonFace;color:ButtonText;border-color:ButtonText}}

/* Message templates reuse the dialog shell and keep copyable line breaks. */
.message-copy{white-space:pre-wrap;overflow-wrap:anywhere}
.template-editor{border-bottom:1px solid var(--line)}
.template-editor summary{min-height:52px;padding:16px 0;cursor:pointer;font-size:14px;font-weight:550;color:var(--ink)}
.template-editor summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:8px}
.template-content{padding:0 0 20px}.template-content>.flow-hint:first-child{margin-top:0}
.template-content textarea{min-height:150px;line-height:1.65;resize:vertical;font-size:16px}
.template-tokens{margin-top:12px}.template-tokens .btn{min-height:44px}
.template-preview{margin-top:8px;font-size:13px;line-height:1.7}
#dialog[open]:has([data-form="message-templates"]){display:flex;flex-direction:column;overflow:hidden}
#dialog:has([data-form="message-templates"]) .dialog-top{flex:none}
#dialog:has([data-form="message-templates"]) .dialog-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}
#dialog:has([data-form="message-templates"]) .dialog-actions{flex:none;margin:0;padding:16px 24px;border-top:1px solid var(--line);background:var(--surface)}

/* Original supplied artwork; framing removes only transparent canvas margins. */
.brand-logo{display:block;position:relative;flex:none;width:144px;aspect-ratio:474/426;overflow:hidden}
.brand-logo img{position:absolute;display:block;width:126.6%;max-width:none;height:auto;left:-13.5%;top:-19.3%;filter:brightness(0)}
html[data-theme=dark] .brand-logo img{filter:brightness(0) invert(1)}
.app-top .brand{flex-shrink:0}.app-top .brand-logo{width:72px}
.auth-minimal .auth-brand{justify-content:center;margin-bottom:28px}
.auth-minimal .auth-brand .brand-logo{width:176px}
@media(max-width:600px){.app-top .brand-logo{width:58px}.auth-minimal .auth-brand .brand-logo{width:152px}.auth-minimal .auth-brand{margin-bottom:24px}}
@media(forced-colors:active){.brand-logo{background:white;forced-color-adjust:none}.brand-logo img,html[data-theme=dark] .brand-logo img{filter:brightness(0)}}
