.workflow-nav{display:flex;gap:8px;padding:8px 28px;border-bottom:1px solid var(--app-border);background:var(--app-surface);flex-shrink:0}
.cycle-prepare{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;border:1px solid var(--app-border);border-radius:4px;padding:28px;gap:18px;background:var(--app-surface)}
.cycle-import-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;width:100%;max-width:780px;margin:0 auto}
.cycle-import .cycle-import-choices{margin:18px auto}
.cycle-source-choice,.cycle-source-choice.cycle-drop-target{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:14px;padding:24px;border:1px solid var(--app-border);border-radius:5px;min-height:0;flex:initial;text-align:left;margin:0}
.cycle-source-choice.cycle-drop-target{border-style:dashed}
.cycle-source-choice h3,.cycle-source-choice p{margin:0}.cycle-source-choice button{margin-top:auto}
.cycle-source-tabs{margin:14px 0}.fabric-import{display:grid;gap:14px}.fabric-list-actions,.fabric-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.fabric-footer{border-top:1px solid var(--app-border);padding-top:14px}.fabric-table{overflow:auto;max-width:100%;border:1px solid var(--app-border);border-radius:4px}
.fabric-table table{width:100%;border-collapse:collapse;table-layout:auto;font-size:.83rem}.fabric-table th,.fabric-table td{padding:10px 12px;text-align:left;border-bottom:1px solid var(--app-border)}
.fabric-table .numeric{text-align:right;font-variant-numeric:tabular-nums}.fabric-table input[type=checkbox]{min-width:17px;width:17px;height:17px;margin:0;padding:0;accent-color:#9976c8}
.fabric-table th{background:var(--app-surface);color:var(--app-text-muted);font-weight:500}.fabric-selected{background:#342947}
.fabric-review{display:grid;gap:12px;padding:16px 0;border-top:1px solid var(--app-border)}.fabric-review h3,.fabric-review p{margin:0}.fabric-review summary{cursor:pointer;color:#69b7f5;padding:8px 0}
.fabric-review label>.quiet{justify-self:start}.fabric-filters{grid-template-columns:1fr 1fr 2fr}.fabric-import .quantity-override{margin:0}.fabric-import .cycle-fields{align-items:start}
@media(max-width:760px){.cycle-import-choices{grid-template-columns:1fr}.cycle-prepare{padding:16px}.fabric-filters{grid-template-columns:1fr}.fabric-table th,.fabric-table td{padding:8px}.fabric-review .cycle-fields{grid-template-columns:1fr}}
@media(min-width:761px){.cycle-import:has(.fabric-import){width:min(1050px,96vw)}.fabric-import button{min-height:32px;padding:6px 10px}.fabric-import input:not([type=checkbox]),.fabric-import select{min-height:34px;padding:7px 9px;font-size:.85rem}}
.cycle-shell-header,.cycle-toolbar,.cycle-filters{display:contents}
.workflow-nav a{display:block;padding:8px 12px;color:var(--app-text-muted);border-radius:4px;text-decoration:none;font-size:.875rem}
.workflow-nav a[aria-current=page]{background:#342947;color:#d9caff}
.cycle-connection{display:flex;align-items:center;gap:16px;padding:10px 28px;border-bottom:1px solid var(--app-border);font-size:.85rem;flex-shrink:0;flex-wrap:wrap}
.cycle-main{flex:1;min-height:0;overflow:auto;padding:24px 28px;display:flex;flex-direction:column;gap:20px;overscroll-behavior:contain}
.cycle-main>*{flex-shrink:0}.cycle-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}.cycle-heading p{margin-top:8px;line-height:1.5}
.cycle-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.cycle-actions button{font-size:.85rem}
.cycle-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;align-items:start}.cycle-location-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:start}
.cycle-import,.cycle-summary{padding:20px;border:1px solid var(--app-border);background:var(--app-surface);border-radius:6px;display:grid;gap:16px}
.cycle-import p{line-height:1.6}.cycle-import-table{overflow:auto;max-height:520px}.cycle-import-table table{border-collapse:collapse;width:100%;min-width:1150px;font-size:.8rem}
.cycle-import-table th{text-align:left;background:var(--app-surface-raised);padding:10px;position:sticky;top:0;z-index:1}.cycle-import-table td{padding:8px;vertical-align:top;border-bottom:1px solid var(--app-border)}
.cycle-import-table input,.cycle-import-table select{min-width:110px;margin:3px 0;font-size:.8rem}.cycle-import-table td:nth-child(5){min-width:260px}.cycle-import-table td:first-child{min-width:110px}
.cycle-bulk{align-items:end}.cycle-batch-select{max-width:650px}.cycle-summary p{line-height:1.6}.cycle-progress{display:flex;gap:14px;align-items:center;flex-wrap:wrap}.cycle-progress strong{font-size:1.2rem}.cycle-progress span{color:var(--app-text-muted)}
.cycle-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:12px}.cycle-line{display:flex;flex-direction:column;align-items:stretch;gap:9px;text-align:left;padding:18px;line-height:1.45;font-weight:400;background:var(--app-surface)}
.cycle-line-title{font-size:1rem;font-weight:600}.cycle-line>span{overflow-wrap:anywhere}.cycle-line .muted{font-size:.8rem}.cycle-status{color:#c4b4ee;font-size:.8rem}
.cycle-quantities{display:flex;gap:18px;flex-wrap:wrap;font-size:.8rem}.cycle-quantities>span{display:grid;gap:3px}.cycle-quantities strong{font-weight:500;color:#a5c9ff}
.cycle-modal-backdrop{position:fixed;inset:0;background:#0009;z-index:30;display:flex;justify-content:flex-end}.cycle-editor{width:min(560px,100%);height:100dvh;display:flex;flex-direction:column;background:var(--app-surface);border-left:1px solid var(--app-border)}
.cycle-editor .drawer-body{flex:1}.cycle-editor .drawer-header h2{font-size:1.15rem;overflow-wrap:anywhere}.cycle-editor .drawer-header button{flex-shrink:0}.cycle-editor .cycle-expected{padding:14px;background:#2e2a3a;border:1px solid #574775;border-radius:4px;font-size:1rem;display:flex;justify-content:space-between}.cycle-editor .drawer-body>p{line-height:1.55}.cycle-editor .review-fields{padding-top:20px;border-top:1px solid var(--app-border)}
body:has(.cycle-modal-backdrop){overflow:hidden}
.cycle-summary{grid-template-columns:minmax(260px,1fr) minmax(240px,1fr);gap:10px 20px;padding:16px}.cycle-summary>.cycle-actions,.cycle-summary>p{grid-column:1/-1}.cycle-summary .cycle-progress{align-content:center;justify-content:flex-end}
@media(max-width:760px){.cycle-summary{grid-template-columns:1fr}.cycle-summary .cycle-progress{justify-content:flex-start}}
@media(max-width:760px){.workflow-nav{padding:8px 14px;gap:3px}.workflow-nav a{padding:10px;font-size:.85rem}.cycle-main{padding:16px 14px;overflow:visible}.cycle-heading h1{font-size:1.4rem}.cycle-heading p{font-size:.85rem}.cycle-connection{padding:8px 14px;gap:10px;font-size:.8rem}.cycle-connection button{margin-left:auto}.cycle-location-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.cycle-grid{grid-template-columns:1fr}.cycle-summary{padding:14px}.cycle-progress{gap:7px}.cycle-progress strong{font-size:1.05rem}.cycle-progress span{font-size:.85rem}.cycle-line{padding:14px}.cycle-editor .drawer-header{padding-top:max(15px,env(safe-area-inset-top))}.cycle-editor .drawer-footer{padding-bottom:max(15px,env(safe-area-inset-bottom))}.cycle-fields{grid-template-columns:1fr}}

.cycle-results{min-width:0}.cycle-no-results{padding:20px;display:grid;gap:12px;justify-items:start}
.guide-button,.parts-heading-actions{display:flex;align-items:center;gap:8px}.parts-heading-actions{flex-shrink:0}
.cycle-result-tools{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.cycle-result-tools button,.cycle-resume button{font-size:.75rem;min-height:28px;padding:4px 8px}
.cycle-resume{display:flex;gap:12px;align-items:center;flex-wrap:wrap;font-size:.8rem;color:var(--app-text-muted)}
.cycle-return-notice{font-size:.8rem;line-height:1.5;color:var(--app-accent-blue)}
.cycle-metadata{width:min(560px,100%);height:100dvh;display:flex;flex-direction:column;background:var(--app-surface);border-left:1px solid var(--app-border);box-shadow:-12px 0 32px #0004}
.cycle-metadata .drawer-body{display:flex;flex-direction:column;gap:20px}.cycle-metadata .drawer-footer{display:flex;justify-content:flex-end;gap:10px}
.cycle-metadata h2{font-size:1.1rem;font-weight:600}.cycle-metadata label{font-size:.82rem}.cycle-metadata .small{font-size:.82rem;line-height:1.55}
/* Integration Hub guide typography: Segoe UI, 68ch reading measure, .82rem / 1.55 body. */
.guide-backdrop{position:fixed;inset:0;z-index:60;display:flex;justify-content:flex-end;background:#0009}
.workflow-guide{width:min(760px,92vw);height:100dvh;display:flex;flex-direction:column;background:var(--app-surface);border-left:1px solid var(--app-border);box-shadow:-12px 0 32px #0005;font-family:"Segoe UI",Tahoma,Geneva,Verdana,sans-serif}
.guide-header{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:18px 24px;border-bottom:1px solid var(--app-border);flex-shrink:0}
.guide-kicker{font-size:.7rem;font-weight:500;letter-spacing:.035em;color:var(--app-text-muted)}
.guide-header h2{font-size:1.15rem;font-weight:600;line-height:1.4;margin:3px 0 0}
.guide-nav{display:flex;gap:6px;flex-wrap:wrap;padding:12px 24px;border-bottom:1px solid var(--app-border);flex-shrink:0}
.guide-nav button{font-size:.78rem;font-weight:500;padding:5px 9px;min-height:30px}
.guide-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding-top:18px;padding:22px 24px 36px}
.guide-body>*{max-width:68ch;margin-left:auto;margin-right:auto}.guide-body section+section{margin-top:26px}
.guide-body p,.guide-body ol,.guide-body ul{font-size:.82rem;line-height:1.55;font-weight:400;color:var(--app-text-muted);margin-top:0;margin-bottom:.75rem}
.guide-body h3{font-size:.95rem;line-height:1.45;font-weight:600;margin:0 0 .65rem;color:var(--app-text)}
.guide-body strong{font-weight:600;color:var(--app-text)}.guide-body ol{padding-left:1.3rem}.guide-body li+li{margin-top:.55rem}
.guide-body .guide-intro{margin-bottom:24px}.guide-callout{padding:12px 14px;border-left:3px solid var(--app-accent-blue);background:var(--app-surface-raised)}
.workflow-guide :focus-visible{outline:2px solid var(--app-accent-blue);outline-offset:3px}
@media(min-width:761px){.cycle-toolbar .guide-button,.parts-heading-actions .guide-button{font-size:.8rem;padding:6px 10px;min-height:32px}.cycle-toolbar #cycle-edit-button{min-height:34px;width:34px;flex-shrink:0}.cycle-toolbar{gap:12px}}
.cycle-summary>.cycle-information{grid-column:1/-1}.cycle-information{font-size:.8rem;color:var(--app-text-muted)}
.cycle-information summary{cursor:pointer;line-height:1.5}.cycle-information summary:focus-visible,.cycle-results:focus-visible{outline:2px solid var(--app-accent-blue);outline-offset:2px}
.cycle-info-content{display:grid;gap:10px;padding-top:12px}.cycle-local-status{display:block;font-size:.75rem;color:var(--app-accent-blue)}
.cycle-import-backdrop{align-items:center;justify-content:center;padding:24px}
.cycle-import-backdrop>.cycle-import{width:min(1400px,100%);max-height:100%;overflow:auto;overscroll-behavior:contain;scroll-padding-top:70px}
.cycle-import>.cycle-heading{position:sticky;top:-20px;background:var(--app-surface);margin:-20px -20px 0;padding:14px 20px;border-bottom:1px solid var(--app-border);z-index:3}

@media(min-width:761px){
    .cycle-shell-header{display:flex;align-items:center;flex-wrap:wrap;flex-shrink:0;background:var(--app-surface);border-bottom:1px solid var(--app-border)}
    .cycle-shell-header>.app-header{padding:8px 16px;border:0;gap:14px}.cycle-shell-header .brand{gap:8px}.cycle-shell-header .brand img{width:30px;height:30px}.cycle-shell-header .brand strong{font-size:.9rem}.cycle-shell-header .brand-subtitle{display:none}
    .cycle-shell-header .app-header>span{font-size:.75rem;color:var(--app-text-muted)}
    .cycle-shell-header>.workflow-nav{border:0;padding:4px 8px;gap:4px}.cycle-shell-header .workflow-nav a{font-size:.8rem;padding:7px 10px}
    .cycle-shell-header>.cycle-connection{border:0;margin-left:auto;padding:6px 16px;gap:12px;font-size:.75rem}.cycle-shell-header .cycle-connection button{min-height:30px;padding:5px 10px;font-size:.75rem}
    .cycle-app.signed-in>.cycle-main{overflow:hidden;padding:12px 16px;gap:10px}
    .cycle-toolbar{display:flex;align-items:center;gap:18px;min-width:0}.cycle-toolbar .cycle-heading h1{font-size:1.2rem;white-space:nowrap}.cycle-toolbar .cycle-heading p{display:none}
    .cycle-toolbar .cycle-batch-select{display:grid;grid-template-columns:auto minmax(160px,1fr);align-items:center;gap:8px;flex:1;max-width:none;font-size:.8rem}
    .cycle-toolbar select{min-height:34px;padding:6px 9px;font-size:.8rem}.cycle-toolbar>.cycle-actions{flex-shrink:0}
    .cycle-main .cycle-actions{gap:7px}.cycle-main .cycle-actions button{min-height:32px;padding:6px 10px;font-size:.75rem}
    .cycle-summary{padding:9px 12px;gap:8px 14px;grid-template-columns:minmax(0,1fr) auto}
    .cycle-batch-heading h2{display:none}.cycle-batch-heading p{font-size:.8rem}.cycle-progress{gap:12px}.cycle-progress strong{font-size:.9rem}.cycle-progress span{font-size:.75rem}
    .cycle-summary>.cycle-actions{grid-column:1;grid-row:2}.cycle-summary>.cycle-information{grid-column:2;grid-row:2;align-self:center;position:relative;text-align:right}
    .cycle-information .cycle-info-content{position:absolute;right:0;top:calc(100% + 8px);width:min(480px,calc(100vw - 48px));max-height:250px;overflow:auto;z-index:8;padding:14px;background:var(--app-surface-raised);border:1px solid var(--app-border);border-radius:5px;box-shadow:0 8px 24px #0006;text-align:left}
    .cycle-summary>.notice{padding:6px 9px;font-size:.75rem;line-height:1.4}
    .cycle-filters{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(310px,1fr);gap:12px}
    .cycle-filters .cycle-location-fields{grid-template-columns:minmax(120px,1.5fr) minmax(120px,1.5fr) minmax(45px,.6fr) minmax(45px,.6fr);gap:8px}
    .cycle-filters .cycle-fields{grid-template-columns:minmax(140px,1fr) 135px;gap:8px}
    .cycle-filters label{font-size:.75rem;gap:4px}.cycle-filters input,.cycle-filters select{min-height:32px;padding:6px 9px;font-size:.8rem}
    .cycle-match-count{font-size:.75rem;line-height:1.4;margin:0}
    .cycle-main>.cycle-results{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;border:1px solid var(--app-border);border-radius:5px;scroll-padding-top:40px}
    .cycle-count-table{border-collapse:separate;border-spacing:0;width:100%;min-width:1080px;font-size:.8rem;line-height:1.4;background:var(--app-surface)}
    .cycle-count-table th{position:sticky;top:0;z-index:2;background:var(--app-surface-raised);text-align:left;font-size:.75rem;font-weight:500;color:var(--app-text-muted);padding:9px 10px;border-bottom:1px solid var(--app-border);white-space:nowrap}
    .cycle-count-table td{padding:7px 10px;border-bottom:1px solid var(--app-border-soft);vertical-align:middle}
    .cycle-count-table td:nth-child(-n+5){white-space:nowrap}.cycle-count-table td:nth-child(6){width:26%;min-width:220px}.cycle-count-table td:last-child{min-width:115px}
    .cycle-count-table .numeric{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.cycle-count-table td.numeric{color:#a5c9ff}
    .cycle-count-table tbody tr{cursor:pointer}.cycle-count-table tbody tr:hover{background:var(--app-surface-raised)}.cycle-count-table tbody tr.selected{background:#2e2a3a}.cycle-count-table tbody tr:last-child td{border-bottom:0}
    .cycle-count-table .cycle-open-line{display:block;width:100%;border:0;background:transparent;padding:0;min-height:28px;line-height:1.4;text-align:left;font-size:.8rem;font-weight:500;white-space:normal}
    .cycle-count-table .cycle-open-line:hover{text-decoration:underline}.cycle-count-table .cycle-status{font-size:.75rem}
    .cycle-app>.development-bar{padding:5px 16px;gap:16px}.cycle-app>.feedback,.cycle-app>.banner{padding:7px 16px;font-size:.8rem}
}
@media(min-width:761px) and (max-width:1000px){
    .cycle-shell-header>.cycle-connection{padding-top:4px;padding-bottom:4px}.cycle-toolbar{flex-wrap:wrap;gap:8px 12px}.cycle-toolbar>.cycle-actions{margin-left:auto}
    .cycle-summary>.cycle-actions{grid-column:1/-1}.cycle-summary>.cycle-information{grid-column:1/-1;grid-row:3;text-align:left}
    .cycle-information .cycle-info-content{left:0;right:auto}
}

/* Keep form rows at their natural height; only the body scrolls. */
.cycle-editor .drawer-body,.cycle-metadata .drawer-body{flex:1;min-height:0;overflow:auto;align-content:start;gap:12px}
.cycle-editor .drawer-header,.cycle-metadata .drawer-header,.cycle-editor .drawer-footer,.cycle-metadata .drawer-footer{flex-shrink:0}
.cycle-editor .cycle-expected{padding:10px 12px;font-size:.875rem}
.cycle-editor .review-fields{padding-top:12px;gap:10px}
.cycle-stock-context{display:grid;gap:4px;overflow-wrap:anywhere;line-height:1.4}
.cycle-drop-target{border:1px dashed var(--app-border);border-radius:5px;padding:14px;display:grid;gap:8px;align-content:start;background:var(--app-surface)}
.cycle-drop-target.drag-over{border-color:var(--app-accent-blue);background:#263348;outline:2px solid var(--app-accent-blue);outline-offset:-2px}
.cycle-main>.cycle-drop-target{flex:1;place-content:center;text-align:center}
.cycle-drop-target input{background:var(--app-bg)}
.cycle-delete{display:grid;gap:10px;border-top:1px solid var(--app-border);padding-top:14px}
.cycle-delete button{justify-self:start}
.cycle-delete-name{overflow-wrap:anywhere;font-weight:600}
button.danger{background:#8e2732;border-color:#d45865;color:#fff}
button.danger:hover:not(:disabled){background:#a52e3b}
@media(min-width:761px){
    .cycle-editor,.cycle-metadata{width:min(480px,100%)}
    .cycle-editor .drawer-header,.cycle-metadata .drawer-header{padding:12px 16px}
    .cycle-editor .drawer-body,.cycle-metadata .drawer-body{padding:14px 16px;gap:12px;font-size:.82rem}
    .cycle-editor .drawer-footer,.cycle-metadata .drawer-footer{padding:10px 16px;gap:6px}
    .cycle-editor label,.cycle-metadata label{font-size:.8rem;gap:5px}
    .cycle-editor input:not([type=checkbox]),.cycle-editor select,.cycle-metadata input:not([type=checkbox]){min-height:34px;padding:7px 9px;font-size:.85rem}
    .cycle-editor textarea{min-height:64px;font-size:.85rem;padding:7px 9px}
    .cycle-editor button,.cycle-metadata button{min-height:32px;padding:6px 10px;font-size:.8rem}
    .cycle-editor .quantity-override{margin:0;min-height:28px}
    .cycle-editor .small,.cycle-metadata .small{font-size:.75rem;line-height:1.45}
}
@media(pointer:coarse){.cycle-editor button,.cycle-metadata button,.cycle-editor .quantity-override{min-height:44px}}

.cycle-assignees{display:grid;gap:9px}.cycle-assignee-list{max-height:180px;overflow:auto;border:1px solid var(--app-border);border-radius:4px;padding:5px 8px}.cycle-assignee-list .quantity-override{min-height:32px;margin:0;align-items:center}.cycle-assignees>.quiet{justify-self:start}.cycle-assignee-list span{overflow-wrap:anywhere}@media(pointer:coarse){.cycle-assignee-list .quantity-override{min-height:44px}}
/* Fabric shares the file-import dialog, with a compact list and a persistent action row. */
.cycle-import-backdrop>.cycle-import:has(.fabric-import){width:min(1100px,100%);gap:12px}
.fabric-import{gap:10px}.fabric-import .fabric-filters{grid-template-columns:1fr 1fr 1.6fr}
.fabric-table th,.fabric-table td{padding:8px 10px;line-height:1.4}
.fabric-footer{position:sticky;bottom:-20px;background:var(--app-surface);z-index:2;padding:12px 0;margin-bottom:-20px;box-shadow:0 -6px 0 var(--app-surface)}
@media(max-width:760px){.fabric-import .fabric-filters{grid-template-columns:1fr}.fabric-footer{bottom:-20px}.fabric-import .cycle-fields{grid-template-columns:1fr}}
