/* Kebarick POS global UI Stage 5/8 — organisation, people, enterprise & integrations.
   Presentation only. Scoped opt-in classes. No checkout, other tenant, backend or /admin styles. */
body.pos-stage5{--p5-navy:#103d89;--p5-blue:#1765d2;--p5-soft:#f2f7fe;--p5-line:#dae6f7;--p5-muted:#637c9c;background:#f2f6fc}
body.pos-stage5 .pos5-hero{background:linear-gradient(112deg,#0d438e 0%,#0b57bd 58%,#1775e5 100%);border:1px solid #256cca;border-radius:16px;padding:20px 23px;margin:0 0 14px;box-shadow:0 9px 25px #1d52941b;color:#fff;overflow-wrap:anywhere}
body.pos-stage5 .pos5-hero .pos5-eyebrow{display:block;color:#bedaff;font-size:10px;font-weight:850;letter-spacing:.12em;margin-bottom:8px}
body.pos-stage5 .pos5-hero h1{margin:0 0 7px;color:#fff;font-size:clamp(22px,2.3vw,30px);line-height:1.16;font-weight:850;letter-spacing:-.04em}
body.pos-stage5 .pos5-hero p{color:#e2efff;font-size:12.5px;max-width:820px;line-height:1.55;margin:0}
body.pos-stage5 .pos5-existing-heading{position:absolute!important;width:1px!important;height:1px!important;clip:rect(0,0,0,0)!important;overflow:hidden!important;white-space:nowrap!important}
body.pos-stage5 .pos5-jumpbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 13px;border-bottom:1px solid #d6e4f4;padding:0 0 10px}
body.pos-stage5 .pos5-jumpbar a{font-size:12px;font-weight:770;color:#1c58a5;background:#e9f2ff;border:1px solid #d2e4fc;padding:8px 11px;border-radius:9px;text-decoration:none}
body.pos-stage5 .pos5-jumpbar a:hover,body.pos-stage5 .pos5-jumpbar a:focus-visible{background:#d7e9ff;outline-color:#175bb5}
body.pos-stage5 .pos5-two-pane{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(285px,.88fr);gap:14px;align-items:start}
body.pos-stage5 .pos5-stack{display:grid;gap:12px;min-width:0}
body.pos-stage5 .pos5-card,body.pos-stage5 .pos5-role-task{background:#fff;border:1px solid var(--p5-line);border-radius:14px;padding:17px 18px;box-shadow:0 4px 13px #113b7508;min-width:0;overflow-wrap:anywhere}
body.pos-stage5 .pos5-card h3,body.pos-stage5 .pos5-role-task h4{margin:1px 0 13px;color:#164d93;font-size:15px;font-weight:830}
body.pos-stage5 :is(.pos5-card,.pos5-role-task) :is(input:not([type=checkbox]),select,textarea){max-width:100%;min-width:0;min-height:38px;border:1px solid #cadbf1;background:#fbfdff;border-radius:9px;color:#213b62;font-size:13px}
body.pos-stage5 :is(.pos5-card,.pos5-role-task) :is(label){color:#314f76;font-size:12px;line-height:1.45;font-weight:720}
body.pos-stage5 :is(.pos5-card,.pos5-role-task) :is(button){min-height:38px;border-radius:9px}
body.pos-stage5 :is(.pos5-card,.pos5-role-task) :is(input[type=checkbox]){width:auto;accent-color:#1765d2;min-height:unset}
body.pos-stage5 :is(.pos5-card,.pos5-role-task) fieldset{min-width:0;border:1px solid #dce7f7;border-radius:10px;padding:12px;background:#f8fbff}
body.pos-stage5 :is(.pos5-card,.pos5-role-task) legend{color:#1f549a;font-size:12px;font-weight:820;padding:0 6px}
body.pos-stage5 .pos5-card table{width:100%;max-width:100%}
body.pos-stage5 .pos5-card th{background:#eef5fe;color:#305887;font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.025em}
body.pos-stage5 .pos5-card td{color:#315077;font-size:12px}
body.pos-stage5 :is(.pos5-branch-list,.pos5-team-directory){min-height:230px}
body.pos-stage5 .pos5-branch-list>div,body.pos-stage5 .pos5-team-directory>div{max-width:100%;overflow-x:auto}
body.pos-stage5 .pos5-role-centre{margin-top:14px;padding:17px 18px}
body.pos-stage5 .pos5-role-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin-top:11px}
body.pos-stage5 .pos5-primary-transfer{grid-column:1/-1;background:#fbfcff}
body.pos-stage5 .pos5-role-centre>p{max-width:820px;font-size:12px}
body.pos-stage5 .pos5-role-task{box-shadow:none;background:#fbfdff}
body.pos-stage5 .pos5-role-task #custom-permissions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 12px}
body.pos-stage5 .pos5-preferences{margin-top:14px}
body.pos-stage5 .pos5-preference-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;align-items:start}
body.pos-stage5 .pos5-preference-grid>fieldset{grid-column:1/-1;background:#f8fbff;border:1px solid #dbe8f8;border-radius:11px;padding:14px}
body.pos-stage5 .pos5-pref-section{display:grid;align-content:start;gap:6px;padding:14px;background:#f9fbff;border:1px solid #e1e9f6;border-radius:12px}
body.pos-stage5 .pos5-pref-section>h4{margin:0 0 6px;color:#164d93;font-size:14px}
body.pos-stage5 .pos5-preferences #setupPrefsForm>button{justify-self:start;margin-top:12px}
body.pos-stage5 .pos5-setup-layout>.card{margin:0}
body.pos-stage5 .pos5-setup-layout{grid-template-columns:minmax(0,1.5fr) minmax(270px,.75fr)}
body.pos-stage5 .pos5-industry-layout{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr)}
body.pos-stage5 .pos5-industry-layout>.card{margin:0}
body.pos-stage5 #workspace #branches,body.pos-stage5 #workspace #staff,body.pos-stage5 #workspace #settings,body.pos-stage5 #workspace #industry,body.pos-stage5 #workspace #setup,body.pos-stage5 #workspace #audit{min-width:0;padding-bottom:24px}
body.pos-stage5 #workspace .pos5-hero+ h2.pos5-existing-heading+p{margin:8px 0 13px;color:#647c9c;font-size:12px}
body.pos-stage5 #workspace #branches .pos5-branches-layout{margin-top:14px}
body.pos-stage5 #workspace #staff .pos5-team-directory #stafflist:empty:after{content:'The staff directory will appear here when loaded.';color:#7890ae;font-size:12px}
body.pos-stage5 #workspace #audit #auditlist{margin-top:14px;max-width:100%;overflow-x:auto}
/* Workforce: 1 large rota board + 2 compact edit panels. Other modules remain separate. */
body.pos-stage5-workforce main.shell{max-width:1480px;padding:clamp(12px,2vw,24px)}
body.pos-stage5-workforce .pos5-context{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:end;gap:14px;margin:0 0 13px;padding:14px 18px}
body.pos-stage5-workforce .pos5-context>div{min-width:0}
body.pos-stage5-workforce .pos5-context label{font-size:12px;font-weight:800;color:#24528b}
body.pos-stage5-workforce .pos5-context select{max-width:100%;margin:0;min-height:38px}
body.pos-stage5-workforce .pos5-context .work-refresh button{width:auto;min-height:38px}
body.pos-stage5-workforce .pos5-section-nav{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 17px}
body.pos-stage5-workforce .pos5-section-nav a{border:1px solid #d9e7fa;color:#205cab;background:#e8f2ff;border-radius:9px;font-size:12px;padding:9px 13px}
body.pos-stage5-workforce .pos5-section{padding:16px 18px;background:#fff;border:1px solid #dce7f6;border-radius:15px;margin:0 0 15px;box-shadow:0 4px 14px #12467a08;scroll-margin-top:14px}
body.pos-stage5-workforce .pos5-section>h2{font-size:18px;color:#15539e;margin:0 0 7px}
body.pos-stage5-workforce .pos5-rota-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(320px,.88fr);gap:12px;align-items:start}
body.pos-stage5-workforce .pos5-rota-grid>.card{margin:0;min-height:340px;background:#f9fbff}
body.pos-stage5-workforce .pos5-rota-grid .pos5-shift-forms>.card{margin:0}
body.pos-stage5-workforce .pos5-section .card{box-shadow:none;border:1px solid #e0e8f4}
body.pos-stage5-workforce .pos5-commission-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
body.pos-stage5-workforce #commissions,body.pos-stage5-workforce #attendance{min-height:95px}
/* Enterprise: branch hierarchy and headquarters workflow, not a dashboard clone. */
body.pos-stage5-enterprise main.doc-shell{max-width:1460px;padding:clamp(13px,2vw,24px)}
body.pos-stage5-enterprise main>.eyebrow,body.pos-stage5-enterprise main>.lead{display:none}
body.pos-stage5-enterprise .pos5-enterprise-panel{border:1px solid #dce6f5;border-radius:14px;background:#fff;box-shadow:0 4px 17px #16457607;padding:17px 18px;margin:0 0 15px;min-width:0}
body.pos-stage5-enterprise .pos5-enterprise-panel>h2{font-size:18px;color:#1759a4;margin:0 0 9px}
body.pos-stage5-enterprise .pos5-enterprise-panel .enterprise-stack{grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr))}
body.pos-stage5-enterprise .pos5-enterprise-panel form{border:1px solid #e3ecf9;background:#fbfdff;padding:13px;border-radius:11px;margin-bottom:10px}
body.pos-stage5-enterprise .pos5-enterprise-panel label{min-width:0;font-size:12px;color:#355b8c}
body.pos-stage5-enterprise .pos5-context{display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px}
body.pos-stage5-enterprise .pos5-context>.enterprise-stack{grid-column:1}
body.pos-stage5-enterprise .pos5-context #status{grid-column:1/-1;margin:0}
body.pos-stage5-enterprise .pos5-context button{grid-column:2;grid-row:1}
/* Integrations: migration vs connectors remain distinct and opt-in. */
body.pos-stage5-integrations .int-wrap{max-width:1480px;margin:0 auto;padding:clamp(13px,2vw,24px)}
body.pos-stage5-integrations .int-wrap>h1,body.pos-stage5-integrations .int-wrap>p.int-muted:first-of-type{display:none}
body.pos-stage5-integrations .pos5-integration-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:14px}
body.pos-stage5-integrations .pos5-int-panel{margin:0;border:1px solid #dfe8f6;border-radius:15px;padding:17px 18px;box-shadow:0 4px 16px #103e7508}
body.pos-stage5-integrations .pos5-int-panel h2{font-size:18px;color:#1554a2}
body.pos-stage5-integrations .pos5-int-panel h3{font-size:14px;color:#1f5aa3;margin:15px 0 8px}
body.pos-stage5-integrations .pos5-int-panel p{font-size:12px;color:#6a7e9b}
body.pos-stage5-integrations .pos5-int-panel :is(input,select,textarea){max-width:100%;min-width:0;border:1px solid #cbdcf1;background:#fafdff;border-radius:9px;min-height:38px}
body.pos-stage5-integrations .pos5-int-panel button{border-radius:9px}
body.pos-stage5-integrations .pos5-int-panel-1{grid-row:span 2}
body.pos-stage5-integrations .int-wrap>label{display:flex;gap:10px;align-items:center;background:#fff;border:1px solid #e1eafa;border-radius:11px;padding:11px 15px;margin-bottom:11px;font-weight:750;color:#2d5387}
body.pos-stage5-integrations .int-wrap>label select{max-width:320px;margin:0}
body.pos-stage5-integrations .int-wrap>#message{font-size:12px;margin:0 0 8px;color:#57708f}
@media(max-width:1050px){
 body.pos-stage5 .pos5-two-pane,body.pos-stage5-workforce .pos5-rota-grid{grid-template-columns:minmax(0,1fr)}
 body.pos-stage5-workforce .pos5-commission-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
 body.pos-stage5 .pos5-hero{padding:17px 15px;margin-bottom:10px}
 body.pos-stage5 .pos5-two-pane,body.pos-stage5 .pos5-role-grid,body.pos-stage5 .pos5-preference-grid,body.pos-stage5-integrations .pos5-integration-grid,body.pos-stage5-workforce .pos5-commission-grid{grid-template-columns:minmax(0,1fr)}
 body.pos-stage5 .pos5-primary-transfer,body.pos-stage5 .pos5-preference-grid>fieldset{grid-column:auto}
 body.pos-stage5 .pos5-jumpbar{flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding-bottom:9px;scrollbar-width:thin}
 body.pos-stage5 .pos5-jumpbar a{white-space:nowrap;flex:none}
 body.pos-stage5-workforce .pos5-context{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 body.pos-stage5-workforce .pos5-context .work-refresh{grid-column:1/-1}
 body.pos-stage5-workforce .pos5-context .work-refresh button{width:100%}
 body.pos-stage5-workforce .pos5-section{padding:14px}
 body.pos-stage5-workforce .pos5-rota-grid{grid-template-columns:minmax(0,1fr)}
 body.pos-stage5-enterprise .pos5-context{display:block}
 body.pos-stage5-enterprise .pos5-enterprise-panel{padding:14px}
 body.pos-stage5-integrations .pos5-int-panel{padding:14px}
 body.pos-stage5 #workspace .pos5-role-task #custom-permissions{grid-template-columns:minmax(0,1fr)}
 body.pos-stage5 :is(.pos5-card,.pos5-role-task){padding:14px}
}
@media(prefers-reduced-motion:reduce){body.pos-stage5 .pos5-jumpbar a{scroll-behavior:auto}}
