/* Company setup uses the same live forms as settings, one connection at a time. */
.onboarding-flow .environment-banner,.onboarding-flow header>.access,.onboarding-flow #account>.back,.onboarding-flow .account-card>.eyebrow,.onboarding-flow .account-card>.tabs{display:none!important}
.onboarding-flow header{padding-block:20px;min-height:0}
.onboarding-flow #account{padding-top:20px}
.onboarding-flow #entry-profile{margin-left:auto}
.onboarding-flow #profile-companies{display:none}
.setup-identity{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
#setup-company{font-weight:700;margin:0}
#setup-panel .setup-help{margin:4px 0 12px}
.setup-help>summary{display:flex;align-items:center;gap:6px;cursor:pointer;min-height:44px;width:fit-content;color:#2257cc;font-size:.9rem}
.setup-help>summary:focus-visible{outline:3px solid #2257cc;outline-offset:3px}
#setup-panel #setup-result:empty,#setup-panel #setup-important:empty{display:none}
#setup-panel #setup-save-hint{font-size:.85rem;color:#425b7d;margin:10px 0}
.wizard-secret-hint{display:none}
#setup-panel .wizard-secret-hint{display:block;font-size:.9rem}
#setup-panel #sage-draft h3,#setup-panel .credential-card>h3,#setup-panel #company-email-title,#setup-panel #sage-reset,#setup-panel #sage-company-state:empty{display:none}
#setup-panel #company-sage[data-has-import-run="false"] #sage-progress{display:none}
#setup-panel #company-sage[data-company-selected="false"] #sage-initial,#setup-panel #company-sage[data-company-selected="false"] #sage-initial-help{display:none}
.setup-wizard-open #account .account-card{max-width:880px;margin-inline:auto}
.setup-wizard-open #company-readiness-notice{display:none}
.setup-wizard-open header{padding-block:20px;min-height:0}
.setup-wizard-open .environment-banner{display:none}
.setup-wizard-open #account{padding-top:20px}
#setup-panel button{font:inherit;cursor:pointer;min-height:44px;border:1px solid #a8b7cc;border-radius:7px;padding:10px 16px;background:#fff;color:#172c4a}
#setup-panel button.primary{background:#2257cc;color:#fff;border-color:#2257cc;width:auto}
#setup-panel button:disabled{opacity:.55;cursor:not-allowed}
#setup-panel button:hover:not(:disabled){background:#eaf0ff;color:#172c4a}
#setup-panel #setup-reload{background:transparent;border:0;padding-left:0;font-size:.9rem;text-decoration:underline}
#setup-panel #setup-steps{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0;margin:24px 0}
#setup-panel #setup-steps li{padding:0;border:0;margin:0}
#setup-steps button[aria-current="step"]{background:#172c4a;color:#fff;border-color:#172c4a}
#setup-panel p{max-width:70ch}
#setup-panel #setup-trial{font-size:.85rem;color:#425b7d}
#setup-title{margin:20px 0 8px}
#setup-connections>.admin-section-body{padding:16px 0;border-top:1px solid #cbd6e8}
#setup-panel .setup-actions{display:flex;flex-wrap:wrap;gap:10px;margin:24px 0 12px}
#setup-panel button:focus-visible,#setup-panel a:focus-visible{outline:3px solid #2257cc;outline-offset:3px}
.setup-summary-row{display:grid;grid-template-columns:1fr 1.5fr auto;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid #cbd6e8}
#setup-panel #sage-age-form,#setup-panel #sage-pdf-form,#setup-panel #sage-pdf-state,#setup-panel #sage-samples,#setup-panel [aria-label="Account reconciliation"],
#setup-panel [aria-label="Sage synchronization"]>.email-actions,#setup-panel [aria-label="Sage synchronization"]>label,
#setup-panel #sage-invoice-success,#setup-panel #sage-financial-success,#setup-panel #invoice-delivery,
#setup-panel #wa-enable,#setup-panel #wa-disconnect,#setup-panel #wa-templates,#setup-panel #smtp-enable,#setup-panel #smtp-disconnect,#setup-panel #smtp-test-open{display:none!important}
#setup-panel [hidden]{display:none!important}
@media(max-width:600px){.setup-summary-row{grid-template-columns:1fr auto}.setup-summary-row>span{grid-column:1;grid-row:2}.setup-summary-row>button{grid-column:2;grid-row:1 / 3}#setup-panel .admin-grid{grid-template-columns:1fr}#setup-panel #setup-steps{gap:5px}#setup-steps button{padding:9px}}

/* Dense setup layout; retain readable controls and visible errors. */
body.setup-wizard-open>header{max-width:936px;padding:10px 28px}
body.setup-wizard-open main{padding:8px 24px 24px;min-height:0}
body.setup-wizard-open #account{padding:0}
body.setup-wizard-open footer{display:none}
body.setup-wizard-open #account .account-card{padding:20px 24px;border-radius:12px;box-shadow:none}
body.setup-wizard-open #account-title{font-size:26px;margin:0 0 12px;line-height:1.2}
#setup-panel .setup-identity{gap:6px 18px}
#setup-panel #setup-company{margin:0;font-size:15px}
#setup-panel #setup-steps{margin:14px 0 10px;gap:6px}
#setup-panel .setup-heading{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
#setup-panel #setup-title{font-size:19px;line-height:1.3;margin:0}
#setup-panel #setup-help-toggle{display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;padding:0;border:0;background:transparent;color:#2257cc}
#setup-panel #setup-heading-status{margin-left:auto;max-width:280px;font-size:12px;line-height:1.4;color:#425b7d;text-align:right}
#setup-panel .setup-help{margin:0}
#setup-panel .setup-help>summary{display:none}
#setup-panel .setup-help[open]{padding:10px 12px;background:#f7f9fc;border-radius:6px;margin-bottom:8px}
#setup-panel p{font-size:13px;line-height:1.45;margin:6px 0}
#setup-panel #setup-important{font-size:12px;font-style:italic;margin:0 0 8px}
#setup-panel .credential-state,#setup-panel #sage-readiness,#setup-panel #wa-readiness,#setup-panel #email-readiness{display:none}
#setup-connections>.admin-section-body{padding:4px 0 0;border:0}
#setup-panel .credential-card,#setup-panel .integration-form{margin:0 0 8px;padding:0;border:0}
#setup-panel .credential-card summary,#setup-panel #wa-credentials>summary,#setup-panel #smtp-credentials>summary{padding:6px 0;font-size:14px;min-height:32px}
#setup-panel .wizard-secret-hint,#setup-panel #setup-save-hint{font-size:12px;line-height:1.4;font-style:italic;margin:3px 0 8px}
#setup-panel form{margin:6px 0}
#setup-panel label{font-size:13px;margin-bottom:10px}
#setup-panel input,#setup-panel select{font-size:14px;min-height:40px;padding:9px 10px;margin-top:5px}
#setup-panel button{font-size:13px;padding:8px 12px}
#setup-panel .email-actions{gap:6px;margin:8px 0}
#setup-panel .setup-actions{gap:8px;margin:12px 0 4px}
#setup-panel .setup-summary-row{gap:8px;padding:7px 0;font-size:14px}
#setup-panel #credential-sage_sa{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}
#setup-panel #credential-sage_sa>button{grid-column:1 / -1;justify-self:start}
#setup-panel #sage-company-form{display:flex;align-items:end;gap:10px}
#setup-panel #sage-company-form>label{flex:1;margin:0}
#setup-panel p:empty{display:none}
#setup-sequence{display:flex;flex-wrap:wrap;gap:8px 24px;padding-left:20px;margin:8px 0 12px;color:#2257cc;font-size:14px;font-weight:600}
#setup-sequence li{padding-right:10px}
@media(max-width:600px){#setup-sequence{display:block}#setup-sequence li{margin:6px 0}}
#setup-panel .wa-platform-details{margin:8px 0}
#setup-panel .wa-platform-details summary{font-size:13px;padding:8px 0;color:#425b7d}
#setup-panel #setup-next[disabled]{cursor:not-allowed}
@media(max-width:600px){body.setup-wizard-open>header{padding:8px 16px}body.setup-wizard-open main{padding:6px 12px 16px}body.setup-wizard-open #account .account-card{padding:16px}#setup-panel #setup-heading-status{flex-basis:100%;text-align:left;margin:0 0 6px;max-width:none}#setup-panel #credential-sage_sa{grid-template-columns:1fr}#setup-panel #sage-company-form{flex-wrap:wrap}#setup-panel #sage-company-form>label{flex-basis:100%}#setup-panel .email-actions>*{width:auto}}
