/* Adapter uses the approved ds tokens and components verbatim. */
:root,:root[data-theme=dark],:root:not([data-theme=light]){--wf-bg:var(--bg);--wf-card:var(--surface);--wf-raised:var(--raised);--wf-ink:var(--ink);--wf-mute:var(--muted);--wf-line:var(--line);--wf-link:var(--link);--wf-header:var(--header);--wf-header-ink:var(--header-ink);--wf-green:var(--done);--wf-amber:var(--waiting);--wf-blue:var(--staff);--wf-red:var(--problem);--wf-grey:var(--idle);--wf-done-tint:var(--done-bg);--wf-waiting-tint:var(--waiting-bg);--wf-staff-tint:var(--staff-bg);--wf-problem-tint:var(--problem-bg);--wf-future-tint:var(--idle-bg)}
body.approved-staff{display:grid;grid-template-columns:216px minmax(0,1fr);grid-template-rows:auto 1fr;background:var(--bg);color:var(--ink)}
.approved-sidebar{grid-column:1;grid-row:1/3;min-width:0}.approved-sidebar nav a[aria-current=page]{background:var(--staff-bg);color:var(--staff)}
body.approved-staff>header.approved-topbar{grid-column:2;position:static;display:flex;flex-wrap:wrap;width:auto;padding:16px 32px;background:var(--header);color:var(--header-ink);border-radius:0;box-shadow:none}
.approved-topbar>strong{display:none}.approved-topbar input{flex:1;min-width:120px}.approved-topbar .user{overflow-wrap:anywhere}
body.approved-staff>main{grid-column:2;width:100%;min-width:0;max-width:1440px;margin:0 auto;padding:32px}.approved-staff button,.approved-staff .button,.approved-customer button,.approved-customer .button{min-height:44px}
.approved-staff main h1{font-size:32px;font-weight:600}.approved-order-actions{margin-bottom:24px}.approved-order .wf-order-flow{margin-top:16px}.approved-order .wf-steps{display:flex;gap:0;padding:24px 0;background:transparent;border:0;box-shadow:none}.approved-order .wf-step{flex:1;min-width:0;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;text-align:center;color:var(--muted);padding:12px 8px}.approved-order .wf-step[aria-current=step]{background:var(--staff-bg);color:var(--staff);box-shadow:none}.approved-order .wf-step strong{font-size:12px}.approved-order .wf-step small{color:inherit}.approved-callout{padding:16px 24px!important;border:0!important;border-radius:12px!important;margin-bottom:24px!important;box-shadow:none!important}.approved-callout p{margin:0}.approved-order-columns{align-items:start}.approved-order-summary img{max-width:160px;max-height:72px;object-fit:contain;background:var(--wf-logo-paper);border-radius:8px;padding:8px}.approved-order-summary .order-summary{display:block}.approved-order-summary .kv{margin:16px 0}.approved-step-work{min-width:0}.approved-step-work>.wf-lane{margin:0 0 16px}.approved-step-work[data-view=current]>.wf-lane>summary{display:none}.approved-order-tabs{margin-top:24px}.approved-order .primary,.approved-customer .primary{background:var(--staff);color:var(--surface);border-color:var(--staff)}
#orders-table .approved-orders-table{display:table;width:100%;table-layout:fixed;background:var(--surface);border:1px solid var(--line);border-radius:12px}#orders-table .approved-orders-table tbody{display:table-row-group}#orders-table .approved-orders-table tbody tr{display:table-row;background:transparent;border:0;box-shadow:none}#orders-table .approved-orders-table tbody td:first-child{display:table-cell;padding:16px;border-bottom:1px solid var(--line)}#orders-table .approved-orders-table thead,#orders-table .approved-orders-table tbody td:not(:first-child){display:none}.approved-list-row{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(0,1.5fr) minmax(0,1fr) auto;gap:16px;align-items:center}.approved-list-row>div{min-width:0}.approved-list-row small{display:block}.approved-list-row .wf-card-title{font-size:14px;font-weight:500}.approved-list-row .wf-brand-chip{display:flex;flex-direction:column;align-items:flex-start;border:0;background:transparent}.approved-list-row .wf-brand-chip img{width:96px;height:44px;padding:6px;object-fit:contain;background:var(--wf-logo-paper);border-radius:24px}.approved-list-row .wf-progress-strip{width:140px;max-width:100%}.approved-list-row .wf-progress-caption{font-size:12px}.approved-list-dates td{display:block!important;padding:0!important;border:0!important}.approved-list-dates td:before{display:none!important}
body.approved-customer>header{background:transparent;color:var(--ink);border:0;box-shadow:none;max-width:480px;margin:auto;padding:24px 24px 0;display:flex;flex-wrap:wrap}.approved-customer header nav{display:none}.approved-customer>main{max-width:480px;padding:24px;margin:0 auto;width:100%;background:transparent}.approved-customer h1{font-size:24px}.approved-customer .wf-customer-flow,.approved-customer .tracker-chain{display:none!important}.approved-customer .wf-lane{border:1px solid var(--line);border-radius:12px;box-shadow:none;background:var(--surface)}.approved-customer .wf-lane>summary{border:0;background:transparent;color:var(--ink)}.approved-customer .wf-who{display:none}.approved-customer #entry-form{display:flex;flex-direction:column;gap:16px}.approved-customer #entry-form>label{margin:0}.approved-customer #player-preview{order:0;max-height:240px;overflow:hidden}.approved-customer #player-preview svg{height:200px;width:100%;max-width:100%}.approved-customer #entry-form>.primary{width:100%}.approved-customer .preview-toggle{display:none}.approved-customer .size-buttons{display:flex;flex-wrap:wrap;gap:8px;border:0;padding:0}.approved-customer .size-buttons label{min-width:44px;min-height:44px}.approved-customer input,.approved-customer select{min-height:44px}.approved-customer .confirmation{background:var(--surface);color:var(--ink);padding:24px;border:1px solid var(--line);border-radius:12px}
@media(max-width:1000px){body.approved-staff{grid-template-columns:176px minmax(0,1fr)}.approved-order-columns{grid-template-columns:1fr}.approved-list-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.approved-list-row>a{justify-self:start}}
@media(max-width:650px){body.approved-staff{display:block}.approved-sidebar{padding:8px 16px}.approved-sidebar>.brand-logo{display:block!important;width:64px;height:64px}.approved-sidebar nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin:8px 0}.approved-sidebar nav a{font-size:12px;padding:8px;min-height:44px}.approved-topbar{padding:16px!important}body.approved-staff>main{padding:24px 16px}.approved-staff main h1{font-size:24px}.approved-order .wf-steps{display:grid;gap:8px}.approved-order .wf-step{text-align:left;border:1px solid var(--line);border-radius:8px;padding:8px 12px;min-height:44px}.approved-order-tabs{flex-wrap:wrap}.approved-list-row{grid-template-columns:1fr}.approved-list-row>.wf-brand-chip{flex-direction:row;align-items:center}.approved-customer>main{padding:24px 16px}.approved-customer>header{padding:24px 16px 0}main .table-scroll{max-width:100%}input,select,textarea{max-width:100%}.approved-customer .result table,.approved-customer .result tbody{display:block}.approved-customer .result tbody tr{display:flex;flex-wrap:wrap;gap:8px;padding:12px 0}.approved-customer .result tbody td{width:auto!important;padding:4px!important}.approved-customer .result tbody td:nth-child(5),.approved-customer .result tbody td:nth-child(6){display:none}.approved-customer .result tbody td:before{display:none}}

.approved-sidebar>.button{display:flex;margin-top:8px;font-size:12px;max-width:100%;white-space:normal}.approved-brand-filters [aria-pressed=true]{background:var(--staff-bg);color:var(--staff);border-color:var(--staff)}

.approved-list-head{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(0,1.5fr) minmax(0,1fr) auto;gap:16px;padding:16px;background:var(--raised);color:var(--muted);font-size:12px;border:1px solid var(--line);border-radius:12px 12px 0 0}.wf-brand-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.wf-brand-cards .wf-card{padding:24px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:none}.wf-brand-cards img{width:160px;height:72px;object-fit:contain;background:var(--wf-logo-paper)}@media(max-width:1000px){.approved-list-head{display:none}.wf-brand-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.wf-brand-cards{grid-template-columns:1fr}}

.approved-order .wf-step strong{display:flex;flex-direction:column;align-items:center;gap:8px}.approved-order .wf-step .circle{margin:0 auto;background:var(--surface);color:var(--muted)}.approved-order .wf-step[aria-current=step] .circle{border:3px solid var(--staff);color:var(--staff)}.approved-order .wf-step.wf-done .circle{background:var(--done);color:var(--surface)}@media(max-width:650px){.approved-order .wf-step strong{flex-direction:row;align-items:center;text-align:left}.approved-order .wf-step .circle{margin:0;flex-shrink:0}}

.approved-customer #roster-root table:has(th:nth-child(7)) :is(th,td):nth-child(5),.approved-customer #roster-root table:has(th:nth-child(7)) :is(th,td):nth-child(6){display:none}.approved-timeline{margin-bottom:24px;padding:24px}.approved-timeline li{list-style:none}.approved-timeline small{display:block;margin-top:8px}

/* Coach contact capture exception: email/phone/address are private to racer edits and staff. */
.approved-customer #roster-root table:has(th:nth-child(7)) :is(th,td):nth-child(4){display:none}.racer-address{padding:0;border:0;background:transparent}.racer-address>summary{font-size:12px;min-height:44px;display:flex;align-items:center;cursor:pointer}.racer-address[open]>label{margin-top:16px}

.roster-chase{margin-bottom:24px}.chase-list{padding:0;list-style:none}.chase-list li{display:flex;flex-wrap:wrap;gap:8px;padding:12px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.chase-list strong{flex-basis:100%}.roster-chase input[type=checkbox]{width:24px;min-height:24px}.roster-chase textarea{width:100%;max-width:100%}

/* The approved stepper uses neutral labels, including completed steps. */
.approved-order .wf-step.wf-done small,.approved-order .wf-step.wf-done .wf-step-detail{background:transparent;color:inherit}
/* Short column names still need a full touch target in roster/size tables. */
.approved-staff th button.sort,.approved-customer th button.sort{min-width:44px;min-height:44px}

/* Phase tabs scroll locally on phones instead of shrinking their hit areas. */
.approved-staff .phase-tabs button{flex-shrink:0;min-width:44px;min-height:44px}
.approved-topbar .approved-global-search{display:flex;flex:1 1 240px;max-width:100%;gap:8px;align-items:center;border:0;background:transparent;padding:0;margin:0;min-width:0}

/* P6: only the two nested Details disclosures; never override lane display. */
.approved-order details.wf-order-controls>summary,.approved-order details.technical>summary{min-height:44px;min-width:44px;padding:10px 12px;box-sizing:border-box}

/* P7: keep all eleven mobile destinations in a bounded, horizontally scrollable nav. */
@media(max-width:650px){.approved-sidebar nav{display:flex;overflow-x:auto;max-width:100%;min-width:0}.approved-sidebar nav a{flex:0 0 auto;white-space:nowrap}}
/* Lead fix: filter rows wrap on phones; the search box takes its own full-width line. */
.filters{flex-wrap:wrap}
@media(max-width:480px){.filters input{min-width:0;flex:1 1 100%}}
/* P8: approved shell proportions; retain token colors and native controls. */
.approved-sidebar>img.brand-logo{display:block;width:96px;height:96px;max-width:100%;padding:6px;object-fit:contain;background:var(--wf-logo-paper);border-radius:8px;margin:0 0 24px}
.approved-topbar .approved-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:0 1 auto;min-width:0;max-width:100%}
.approved-toolbar .theme-control{flex-wrap:nowrap;flex-shrink:0;margin:0;padding:2px}.approved-toolbar .theme-control button{padding:8px;font-size:12px;min-width:44px}.approved-toolbar .user{font-size:14px;white-space:nowrap}
.approved-topbar .approved-global-search{flex-basis:200px;max-width:360px}.approved-topbar .legend-link{padding:10px 12px;white-space:nowrap}
.approved-order-summary .kv{margin:0}.approved-order-summary .kv dd{margin:0 0 16px;min-width:0;overflow-wrap:anywhere}.approved-order-summary .kv dd a{display:block;overflow-wrap:anywhere}.approved-order-summary h2{font-size:18px}.approved-order-summary .kv img{display:block;max-width:160px;max-height:72px;object-fit:contain}
.approved-order .approved-status{margin-bottom:16px}.approved-order .approved-callout{margin-top:0}.approved-order .approved-callout>p{margin:0}
#orders-table .approved-list-row .wf-brand-chip,#orders-table .approved-list-row .brand-mark,#orders-table .approved-list-row .brand-mark span{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
#orders-table .approved-list-row .wf-card-title{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;font-size:16px;font-weight:500}
#orders-table .approved-list-row .wf-progress-caption{white-space:normal;overflow:visible;text-overflow:clip}#orders-table .wf-next-line{display:none}
.approved-test-toggle{display:inline-flex;align-items:center;gap:8px;min-height:44px;font-size:14px;font-weight:400;margin:0}.approved-test-toggle input[type=checkbox]{width:20px;height:20px;min-height:20px;margin:0;flex:0 0 20px}
.approved-staff .approved-brand-filters{gap:8px;margin-bottom:16px}.approved-staff .approved-brand-filters button{padding:8px 12px;font-size:14px}.approved-staff #content>label:has([name=stageFilter]){max-width:240px;font-size:12px}.approved-staff #orders-table .wf-sort{font-size:12px;max-width:240px}
.coach-layout .coach-share{margin-bottom:24px;background:var(--step2-bg);color:var(--step2-ink)}.coach-layout .coach-share input{margin:8px 0;min-width:0}.coach-layout .coach-share h2{font-size:18px}.coach-layout .coach-share button{margin-top:8px}.coach-layout .roster-chase{margin-bottom:24px}.coach-layout .due-note{font-size:14px}.coach-empty{padding:16px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--muted)}
@media(max-width:650px){.approved-sidebar>img.brand-logo{width:80px;height:80px;margin-bottom:8px}.approved-topbar .approved-global-search{max-width:100%;flex:1 1 100%}.approved-topbar .approved-toolbar{width:100%;justify-content:space-between;flex-wrap:wrap}.approved-toolbar .user{font-size:12px}.approved-toolbar .theme-control button{padding:8px 6px}.approved-topbar .legend-link{font-size:12px;padding:10px 8px}}
#coach-message-editor{width:min(480px,calc(100% - 32px));max-width:calc(100% - 32px);background:var(--surface);color:var(--ink);border:1px solid var(--line)}#coach-message-editor textarea{display:block;width:100%;min-height:140px;margin-bottom:16px;background:var(--surface);color:var(--ink);border:1px solid var(--line);font:inherit}
@media(max-width:650px){.approved-toolbar .user{min-width:40px;max-width:110px;white-space:normal;overflow-wrap:anywhere}}
.approved-staff main>.filters{gap:8px 16px;margin-bottom:16px}.approved-staff main>.filters>.approved-brand-filters{display:contents}.approved-staff main>.filters>.approved-test-toggle{margin-left:auto;order:2}
.approved-order-summary .kv object{display:block;width:100%;max-width:100%;height:120px;pointer-events:none}.approved-order-summary .kv dd a{min-height:44px;padding:4px 0}
.approved-order-heading>div:first-child{min-width:0}.approved-order-heading .approved-order-actions{margin:0;justify-content:flex-end;flex:0 1 auto}
/* P9: full-size customer logo, bounded one-line brand identity, secondary filters. */
.approved-order-summary .kv img.approved-customer-logo{width:160px;height:auto;max-width:100%;max-height:96px;object-fit:contain;background:#fff;padding:8px;border-radius:8px}
#orders-table .approved-list-row>.wf-brand-chip{display:flex;flex-direction:row;align-items:center;white-space:nowrap;overflow:hidden;min-width:0;max-width:100%;gap:6px}
#orders-table .approved-list-row>.wf-brand-chip .brand-mark{display:flex;align-items:center;gap:6px;white-space:nowrap;overflow:hidden;min-width:0;max-width:100%}
#orders-table .approved-list-row>.wf-brand-chip .brand-mark img{width:64px;height:40px;flex:0 0 64px;padding:4px}
#orders-table .approved-list-row>.wf-brand-chip .brand-mark span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;word-break:normal;overflow-wrap:normal;min-width:0}
.approved-more-filters{margin:8px 0 16px;max-width:100%;border:1px solid var(--line);border-radius:8px;padding:0 12px}.approved-more-filters>summary{min-width:44px;min-height:44px;padding:10px 0;cursor:pointer}.approved-more-filters select{max-width:100%}.approved-more-filters label.check{display:flex;align-items:center;min-height:44px;gap:8px}.approved-more-filters input[type=checkbox]{width:20px;min-height:20px;flex:0 0 20px}.approved-coach-links{max-width:100%;min-width:0}.approved-coach-links input{max-width:100%}
