.next-workspace{display:grid;gap:1rem;margin:32px auto 48px;color:var(--ink,#18334f)}
.next-workspace-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:0}
.next-workspace-head h1{margin:0;font-size:1.75rem;letter-spacing:-.035em}
.next-workspace-head>div:first-child{min-width:0}
.next-workspace-head p{margin:.35rem 0 0;color:var(--muted,#66788b)}
.next-workspace-toolbar{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.55rem}
.next-workspace-toolbar .btn{flex-shrink:0;white-space:nowrap;min-height:44px}
.next-workspace-head>div:first-child p,.next-workspace-toolbar>p{overflow-wrap:anywhere}
.next-workspace-toolbar>p{margin:0;color:var(--muted,#66788b);font-size:.9rem}
.next-workspace-toolbar>.badge{white-space:nowrap}
.next-workspace-nav{display:flex;gap:.45rem;overflow-x:auto;padding:.25rem 0 .55rem;border-bottom:1px solid #e5eaf0;scrollbar-width:thin}
.next-workspace>.next-tabs{margin:0}
.next-workspace-nav a{flex:none;padding:.55rem .8rem;border:1px solid transparent;border-radius:999px;color:#52677e;text-decoration:none;font-size:.92rem;white-space:nowrap}
.next-workspace-nav a[aria-current=page]{background:#eaf2fb;border-color:#d7e5f4;color:#174a79;font-weight:650}
.next-workspace-content,.next-workspace-shared{display:grid;gap:1rem;min-width:0}
.next-workspace-shared:empty,.next-workspace-content:empty{display:none}
.next-workspace .next-workspace-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1.25rem;margin:1.25rem 0}
.next-workspace .next-workspace-metrics dt{margin:0 0 .4rem;font-size:.8125rem;color:var(--muted)}
.next-workspace .next-workspace-metrics dd{margin:0;font-size:1.05rem;font-weight:600;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.next-workspace-shared-content>.server-section{margin:0}
.next-workspace-panel{min-width:0}
.next-workspace-panel>.server-page,.next-workspace-panel>.server-section,.next-workspace-panel>section.server-section,.next-workspace-panel>.server-create-summary{margin:0}
.next-workspace-empty{margin:0;padding:1rem;border:1px solid #e6ebf1;border-radius:1rem;background:#fff;color:#66788b}
.next-onboarding-note{margin:0;padding:12px 16px;background:#edf3ff;border-radius:10px;color:#344b70;font-size:.875rem;line-height:1.6}
.next-workspace .next-description-note{margin:-.25rem 0 .25rem;line-height:1.6}
.next-workspace-actions{padding:1rem;border:1px solid #e3eaf1;border-radius:1.1rem;background:#fff}
.next-workspace-actions h2{margin:0 0 .8rem;font-size:1rem}
.next-workspace-actions nav{display:flex;flex-wrap:wrap;gap:.55rem}
.next-workspace-actions .btn{min-height:2.6rem}
@media(min-width:1000px){
  .next-workspace[data-next-workspace=merchant][data-next-section=profile][data-merchant-onboarding=false]{grid-template-columns:minmax(0,1fr) 300px;align-items:start}
  .next-workspace[data-next-workspace=merchant][data-next-section=profile][data-merchant-onboarding=false]>.next-workspace-head,
  .next-workspace[data-next-workspace=merchant][data-next-section=profile][data-merchant-onboarding=false]>.next-workspace-nav{grid-column:1/-1}
  .next-workspace[data-next-workspace=merchant][data-next-section=profile][data-merchant-onboarding=false]>.next-workspace-shared .next-workspace-metrics{grid-template-columns:1fr;gap:1rem}
}
@media(min-width:760px){.next-workspace{gap:1.15rem}.next-workspace-nav{gap:.6rem}.next-workspace-nav a{padding:.65rem 1rem}.next-workspace-content{gap:1.15rem}}
@media(max-width:759px){.next-workspace{margin:24px auto}.next-workspace-head{flex-direction:column;align-items:stretch}.next-workspace-toolbar{justify-content:flex-start;gap:.5rem}}

/* Merchant onboarding is a form journey, not the established merchant console. */
.next-app .next-workspace[data-merchant-onboarding=true]{max-width:1040px;margin-top:24px;gap:20px}
.next-app .next-workspace[data-merchant-onboarding=true]>.next-workspace-head{align-items:center;flex-direction:row}
.next-app .next-workspace[data-merchant-onboarding=true] .next-workspace-head h1{margin:0;font-size:1.375rem}
.next-app .next-workspace-toolbar:empty{display:none}
.next-app .next-onboarding-copy{margin:0 0 16px;font-size:.875rem;line-height:1.65;color:var(--muted)}
.next-app .next-onboarding-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;list-style:none;padding:0;margin:0}
.next-app .next-onboarding-steps li{position:relative;min-width:0}
.next-app .next-onboarding-steps li:not(:last-child)::after{content:"";position:absolute;left:36px;right:0;top:12px;height:1px;background:var(--line)}
.next-app .next-onboarding-steps li>span{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#e9edf3;color:var(--muted);font-size:.75rem;font-variant-numeric:tabular-nums}
.next-app .next-onboarding-steps li.is-done>span{background:var(--accent);color:#fff}
.next-app .next-onboarding-steps li.is-current>span{background:var(--soft);color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.next-app .next-onboarding-steps li>div{margin-top:8px}
.next-app .next-onboarding-steps strong{display:block;font-size:.875rem;font-weight:600;line-height:1.5}
.next-app .next-onboarding-steps small{display:block;margin-top:2px;font-size:.75rem;line-height:1.5;color:var(--muted)}
.next-app .next-onboarding-summary>.notice{margin:16px 0 0}
.next-app .next-onboarding-funding-note{margin:12px 0 0;color:var(--muted);font-size:.75rem;line-height:1.6}
.next-app .next-merchant-profile-page{margin:0}
.next-app .next-merchant-profile-form.stack{display:grid;gap:16px;max-width:none}
.next-app .next-merchant-profile-section{min-width:0;padding:24px;background:var(--paper);border:1px solid var(--line);border-radius:12px}
.next-app .next-merchant-section-heading{margin-bottom:20px}
.next-app .next-merchant-section-heading h2{margin:0;font-size:1rem;line-height:1.5}
.next-app .next-merchant-section-heading p{margin:4px 0 0;color:var(--muted);font-size:.8125rem;line-height:1.6}
.next-app .next-merchant-profile-fields{display:grid;gap:16px}
.next-app .next-merchant-profile-form label{display:grid;gap:8px;font-size:.875rem;line-height:1.5;font-weight:500;min-width:0}
.next-app .next-merchant-profile-form :is(input,textarea){width:100%;min-width:0}
.next-app .next-merchant-profile-form textarea{resize:vertical}
.next-app .next-merchant-profile-form .next-description-note{font-size:.75rem;margin:-8px 0 0}
.next-app .next-merchant-category-tree{border-top:1px solid var(--line)}
.next-app .next-merchant-category-group{border-bottom:1px solid var(--line)}
.next-app .next-merchant-category-group>summary{min-height:48px;display:flex;align-items:center;gap:12px;list-style:none;cursor:pointer;font-size:.875rem;font-weight:600}
.next-app .next-merchant-category-group>summary::-webkit-details-marker{display:none}
.next-app .next-merchant-category-group>summary>span{margin-left:auto;font-size:.75rem;font-weight:400;color:var(--muted);white-space:nowrap}
.next-app .next-merchant-category-group>summary::after{content:"";width:6px;height:6px;border-right:1.5px solid var(--muted);border-bottom:1.5px solid var(--muted);transform:rotate(45deg);margin:0 4px 4px 0;flex:none}
.next-app .next-merchant-category-group[open]>summary::after{transform:rotate(225deg);margin-top:6px}
.next-app .next-merchant-category-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:0 0 16px}
.next-app .next-merchant-profile-form .next-merchant-category-option{display:grid;grid-template-columns:18px minmax(0,1fr);gap:2px 10px;align-items:center;padding:10px 12px;min-height:48px;border:1px solid var(--line);border-radius:8px;cursor:pointer;font-weight:400}
.next-app .next-merchant-category-option:has(:checked){border-color:#b9d4fa;background:var(--soft)}
.next-app .next-merchant-category-option input[type=checkbox]{width:18px;height:18px;grid-row:1/3}
.next-app .next-merchant-category-option>span{overflow-wrap:anywhere}
.next-app .next-merchant-category-option>small{grid-column:2;font-size:.75rem;color:var(--muted);font-variant-numeric:tabular-nums}
.next-app .next-merchant-profile-section>.small,.next-app .next-merchant-empty{margin:12px 0 0;color:var(--muted);font-size:.8125rem;line-height:1.6}
.next-app .next-merchant-contact-list{display:grid;gap:12px}
.next-app .next-merchant-contact-row{display:grid;grid-template-columns:minmax(120px,.65fr) minmax(0,1.35fr) auto;gap:12px;align-items:end}
.next-app .next-merchant-contact-row[hidden],.next-app [data-merchant-contact-editor][hidden]{display:none}
.next-app .next-merchant-contact-row>button{min-width:44px;min-height:44px}
.next-app .next-merchant-contact-row>[data-merchant-contact-remove]{width:44px;padding:0;font-size:.75rem}
.next-app [data-merchant-contact-add]{margin-top:12px;min-height:44px}
.next-app .next-merchant-save-row{display:flex;align-items:center;justify-content:space-between;gap:16px}
.next-app .next-merchant-save-row>p{margin:0;color:var(--muted);font-size:.8125rem;line-height:1.6}
.next-app .next-merchant-save-row>.btn{flex:none;min-width:140px}
.next-app .next-merchant-profile-page .next-avatar-editor{display:grid;grid-template-columns:48px minmax(0,1fr);gap:16px;align-items:start;margin:0 0 16px;padding:20px 24px;border:1px solid var(--line);border-radius:12px;background:var(--paper)}
.next-app .next-merchant-profile-page .next-avatar-preview>.next-avatar{width:48px;height:48px}
.next-app .next-merchant-profile-page .next-avatar-editor h2{font-size:.9375rem}
.next-app .next-merchant-profile-page .next-avatar-editor p{margin:4px 0 8px;font-size:.75rem;line-height:1.5}
.next-app .next-merchant-profile-page .next-avatar-editor form{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.next-app .next-merchant-profile-page .next-avatar-editor input[type=file]{flex:1;min-width:0;width:100%;margin:0;font-size:.8125rem}
.next-app .next-merchant-profile-page .next-avatar-editor [data-avatar-status]{margin:8px 0 0}
@media(max-width:639px){
  .next-app .next-workspace[data-merchant-onboarding=true]{margin:16px auto 24px;gap:16px}
  .next-app .next-workspace[data-merchant-onboarding=true] .next-workspace-head h1{font-size:1.125rem}
  .next-app .next-onboarding-copy{font-size:.8125rem;margin-bottom:12px}
  .next-app .next-onboarding-steps{gap:12px}
  .next-app .next-onboarding-steps strong{font-size:.8125rem}
  .next-app .next-onboarding-steps small{font-size:.75rem}
  .next-app .next-merchant-profile-section{padding:16px}
  .next-app .next-merchant-section-heading{margin-bottom:16px}
  .next-app .next-merchant-category-options{grid-template-columns:minmax(0,1fr)}
  .next-app .next-merchant-contact-row{grid-template-columns:minmax(0,1fr) 44px;gap:8px;padding-bottom:12px;border-bottom:1px solid var(--line)}
  .next-app .next-merchant-contact-row>label{grid-column:1}
  .next-app .next-merchant-contact-row>button{grid-column:2;grid-row:2;align-self:end}
  .next-app .next-merchant-save-row{align-items:stretch;flex-direction:column;gap:12px}
  .next-app .next-merchant-save-row>.btn{width:100%}
  .next-app .next-merchant-profile-page .next-avatar-editor{padding:16px;gap:12px}
  .next-app .next-merchant-profile-page .next-avatar-editor form{gap:8px}
  .next-app .next-merchant-profile-page .next-avatar-editor input[type=file]{flex-basis:100%}
}
