/* Kebarick POS — Global UI transformation Stage 6 / 8.
   Scoped financial workspaces only. Existing API permissions and calculations remain authoritative.
   Does not apply to checkout, admin, public storefront, or earlier stages. */
body.pos-stage6{--p6-ink:#17345c;--p6-blue:#135cbe;--p6-navy:#0b418e;--p6-line:#dbe6f5;--p6-soft:#f3f7fe;--p6-hint:#6881a2;background:#f1f5fc;color:var(--p6-ink);margin:0}
body.pos-stage6 *,body.pos-stage6 *::before,body.pos-stage6 *::after{box-sizing:border-box}
body.pos-stage6 .pos6-shell{width:100%;max-width:1540px;margin:0 auto;padding:clamp(12px,2vw,26px) clamp(12px,2vw,28px) 48px;min-width:0}
body.pos-stage6 .pos6-hero{display:flex;justify-content:space-between;align-items:center;gap:16px;background:linear-gradient(113deg,#10428d 0%,#0c5ac3 65%,#1879e4 100%);border:1px solid #1b67c2;color:#fff;padding:23px 25px;margin:0 0 15px;border-radius:17px;box-shadow:0 8px 24px #1b4c891b}
body.pos-stage6 .pos6-hero-copy{min-width:0}
body.pos-stage6 .pos6-hero .pos6-eyebrow{display:block;color:#bedbff;font-size:10px;font-weight:850;letter-spacing:.14em;text-transform:uppercase;margin:0 0 8px}
body.pos-stage6 .pos6-hero h1{color:#fff;font-size:clamp(23px,2.4vw,31px);font-weight:850;letter-spacing:-.035em;line-height:1.15;margin:0 0 8px}
body.pos-stage6 .pos6-hero p{color:#e0edff;font-size:13px;line-height:1.55;max-width:790px;margin:0}
body.pos-stage6 .pos6-hero-actions{display:flex;flex:none;gap:8px;align-items:center;flex-wrap:wrap}
body.pos-stage6 .pos6-hero-actions a{display:inline-flex;align-items:center;justify-content:center;border-radius:9px;border:1px solid #d3e6ff9c;background:#ffffff1f;color:#fff;text-decoration:none;padding:10px 13px;min-height:39px;font-size:12px;font-weight:780}
body.pos-stage6 .pos6-hero-actions a:hover,body.pos-stage6 .pos6-hero-actions a:focus-visible{background:#ffffff3e;outline:2px solid #b5dbff}
body.pos-stage6 .pos6-context{display:flex;flex-wrap:wrap;align-items:end;gap:9px 14px;padding:13px 16px;margin:0 0 13px;background:#fff;border:1px solid var(--p6-line);box-shadow:0 4px 16px #234e7b09;border-radius:13px;min-width:0}
body.pos-stage6 .pos6-context label{font-size:12px;font-weight:780;color:#325780;margin:0;display:flex;flex-direction:column;gap:5px;min-width:155px;max-width:280px}
body.pos-stage6 .pos6-context select{width:100%;min-width:0}
body.pos-stage6 .pos6-context>button{margin:0;min-height:39px;padding:9px 16px}
body.pos-stage6 .pos6-risk-note{border:1px solid #dbe6f4;border-left:4px solid #e3a53b;background:#fffdf8;padding:10px 13px;border-radius:10px;color:#5d6680;font-size:12px;line-height:1.55;margin:0 0 14px;overflow-wrap:anywhere}
body.pos-stage6 .pos6-risk-note :is(p,.hint,.doc-note){font-size:12px;line-height:1.6;margin:0;color:#586e8b}
body.pos-stage6 .pos6-risk-note strong{color:#8d5010}
body.pos-stage6 .pos6-jumpbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 16px;padding:0 0 12px;border-bottom:1px solid #d6e4f4}
body.pos-stage6 .pos6-jumpbar a{font-size:12px;text-decoration:none;color:#1856a3;font-weight:780;background:#e7f1ff;border:1px solid #d1e4fe;border-radius:9px;padding:9px 11px}
body.pos-stage6 .pos6-jumpbar a:hover,body.pos-stage6 .pos6-jumpbar a:focus-visible{background:#d5e9ff;outline:2px solid #a2c9fc}
body.pos-stage6 .pos6-section-lead{display:flex;align-items:end;justify-content:space-between;gap:14px;margin:0 0 9px}
body.pos-stage6 .pos6-section-lead h2{font-size:19px;line-height:1.2;color:#134b95;margin:0 0 5px}
body.pos-stage6 .pos6-section-lead p{color:var(--p6-hint);font-size:12px;line-height:1.5;margin:0}
body.pos-stage6 .pos6-panel{display:block;min-width:0;background:#fff;border:1px solid var(--p6-line);border-radius:15px;padding:18px 19px;margin:0 0 15px;box-shadow:0 5px 18px #1246790a;overflow-wrap:anywhere;scroll-margin-top:22px}
body.pos-stage6 .pos6-panel>h2{font-size:17px;font-weight:850;line-height:1.25;color:#1254a8;margin:0 0 11px}
body.pos-stage6 .pos6-panel>h3{font-size:14px;color:#28578f;margin:16px 0 9px}
body.pos-stage6 .pos6-panel p,body.pos-stage6 .pos6-panel .hint{font-size:12px;line-height:1.55;color:#667e9d}
body.pos-stage6 .pos6-panel p:first-child{margin-top:0}
body.pos-stage6 .pos6-panel :is(input:not([type=checkbox]),select,textarea){display:block;min-width:0;max-width:100%;width:100%;border:1px solid #cbdaf0;border-radius:9px;padding:9px 11px;min-height:39px;background:#fcfdff;color:#18375c;font-size:13px;margin:5px 0 9px}
body.pos-stage6 .pos6-panel :is(input,select,textarea):focus-visible{outline:2px solid #438aea;outline-offset:1px}
body.pos-stage6 .pos6-panel label{font-size:12px;font-weight:730;line-height:1.45;color:#395c88;min-width:0}
body.pos-stage6 .pos6-panel button{border-radius:9px;font-size:12px;font-weight:750;min-height:39px;margin:4px 0 6px}
body.pos-stage6 .pos6-panel form{min-width:0}
body.pos-stage6 .pos6-panel table{width:100%;border-collapse:collapse;margin:0;min-width:510px}
body.pos-stage6 .pos6-panel th{background:#edf4fd;color:#355d8c;font-size:11px;font-weight:860;letter-spacing:.035em;text-transform:uppercase;text-align:left;padding:12px 10px;border-bottom:1px solid #dde8f7;white-space:nowrap}
body.pos-stage6 .pos6-panel td{padding:12px 10px;border-bottom:1px solid #e6edf8;color:#26486f;font-size:12px;vertical-align:middle}
body.pos-stage6 .pos6-panel tr:hover td{background:#f8fbff}
body.pos-stage6 .pos6-panel :is(.soft,.doc-card){border:1px solid #e1eaf7;border-radius:10px;background:#f9fbff;padding:11px 12px;margin:8px 0;color:#365573;font-size:12px}
body.pos-stage6 .pos6-panel .soft button{margin-top:10px}
body.pos-stage6 .pos6-two-pane{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(315px,1fr);gap:15px;align-items:start;min-width:0}
body.pos-stage6 .pos6-two-pane>*{min-width:0}
body.pos-stage6 #message,body.pos-stage6 #msg{font-size:12px;font-weight:650;line-height:1.5;overflow-wrap:anywhere;color:#245d98;margin:9px 0 12px}
body.pos-stage6 #message:empty,body.pos-stage6 #msg:empty{display:none}
/* Financial overview: actual values come exclusively from the existing finance report API. */
body.pos-stage6-finance .pos6-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 13px!important}
body.pos-stage6-finance .pos6-metrics>.card{margin:0;padding:16px 15px;background:#fff;border:1px solid var(--p6-line);border-top:3px solid #2076db;border-radius:12px;min-width:0;box-shadow:0 3px 13px #1b47700c}
body.pos-stage6-finance .pos6-metrics>.card>.hint{font-size:11px;font-weight:760;color:#577aa2;display:block}
body.pos-stage6-finance .pos6-metrics>.card h2{font-size:clamp(15px,1.45vw,21px);color:#1355a3;font-weight:850;line-height:1.25;margin:9px 0 2px;overflow-wrap:anywhere}
body.pos-stage6-finance .pos6-metrics>p.hint{grid-column:1/-1;padding:9px 12px;margin:0;background:#eaf2fe;border-radius:8px}
body.pos-stage6-finance .pos6-finance-top{grid-template-columns:minmax(0,1.18fr) minmax(340px,1fr)}
body.pos-stage6-finance .pos6-finance-bottom{grid-template-columns:repeat(2,minmax(0,1fr))}
body.pos-stage6-finance .pos6-expense-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:15px;align-items:start}
body.pos-stage6-finance .pos6-expense-forms{display:grid;gap:10px;min-width:0}
body.pos-stage6-finance .pos6-compact-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 12px;padding:14px;background:#f8fbff;border:1px solid #deebf8;border-radius:11px;margin:0}
body.pos-stage6-finance .pos6-compact-form>button{grid-column:1/-1;justify-self:start;padding:8px 13px}
body.pos-stage6-finance #categoryForm{grid-template-columns:minmax(0,1fr) auto;align-items:end}
body.pos-stage6-finance #categoryForm>button{grid-column:2;white-space:nowrap}
body.pos-stage6-finance .pos6-expense-queue{min-height:170px;padding:11px 13px;background:#fbfdff;border:1px solid #e1eafa;border-radius:11px;overflow-x:auto}
body.pos-stage6-finance #expenses:empty::before{content:'Approved and pending expenses will appear here when loaded.';color:#7186a4;font-size:12px}
body.pos-stage6-finance #cashbook,#productmargins{min-height:110px;max-height:440px;overflow-y:auto;overflow-x:auto}
body.pos-stage6-finance #balances{color:#285a8d;font-size:12px;font-weight:700;padding:12px;background:#ecf5ff;border-radius:10px;margin:7px 0 13px}
body.pos-stage6-finance #mappings,body.pos-stage6-finance #books{padding:10px;background:#eff6ff;border-radius:9px;min-height:38px;overflow-wrap:anywhere;font-size:12px}
body.pos-stage6-finance #journals{max-height:350px;overflow:auto}
/* Payment reconciliation — table-first, no fictional provider connectivity. */
body.pos-stage6-payments .pos6-table-card{min-height:360px}
body.pos-stage6-payments .pos6-section-head h2{color:#1453a2;font-size:18px;font-weight:830;margin:5px 0 7px}
body.pos-stage6-payments .pos6-section-head p{margin:0 0 15px;max-width:860px}
body.pos-stage6-payments .pos6-kicker{font-weight:850;letter-spacing:.11em;font-size:10px;color:#2170c9}
body.pos-stage6-payments .pos6-table-scroll{overflow-x:auto;border:1px solid #e2ebf8;border-radius:10px;min-height:155px}
body.pos-stage6-payments .pos6-panel #orders button:disabled{opacity:.55;cursor:not-allowed}
body.pos-stage6-payments .pos6-payment-footer{padding:9px 15px;background:#e7f0fc;border-radius:10px;font-size:12px;color:#5d7291}
body.pos-stage6-payments .pos6-payment-footer p{margin:0}
/* Fiscal compliance and draft creation. */
body.pos-stage6-fiscal .pos6-fiscal-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.05fr)}
body.pos-stage6-fiscal :is(.pos6-fiscal-setup,.pos6-fiscal-work){display:grid;gap:14px;align-content:start;min-width:0}
body.pos-stage6-fiscal .pos6-panel{margin:0}
body.pos-stage6-fiscal .pos6-panel input{margin:5px 0 10px}
body.pos-stage6-fiscal .pos6-panel>p{margin:0 0 11px}
body.pos-stage6-fiscal .pos6-panel label{display:block;margin:0 0 7px}
body.pos-stage6-fiscal .pos6-panel>button,body.pos-stage6-fiscal .pos6-panel p button{margin-top:5px}
body.pos-stage6-fiscal #summary,body.pos-stage6-fiscal #rates{max-width:100%;white-space:pre-wrap;overflow:auto;max-height:220px;background:#f1f6ff;border:1px solid #dce8f8;border-radius:10px;padding:13px;color:#24517e;font-size:11px;line-height:1.5}
body.pos-stage6-fiscal #documents{max-height:300px;overflow:auto;font-size:12px}
body.pos-stage6-fiscal #documents>p{padding:10px 12px;margin:7px 0;border:1px solid #e2eaf7;border-radius:8px;background:#f9fbff;overflow-wrap:anywhere}
body.pos-stage6-fiscal #fiscal-branch,#fiscal-tax{min-height:230px}
/* Approval queue as the primary workspace. */
body.pos-stage6-loss-controls .pos6-review-context{align-items:end}
body.pos-stage6-loss-controls .pos6-review-context label{display:grid;grid-template-columns:1fr;max-width:320px;gap:5px}
body.pos-stage6-loss-controls .pos6-review-context select{margin:0}
body.pos-stage6-loss-controls .pos6-approvals-grid{grid-template-columns:minmax(0,1.35fr) minmax(320px,.78fr)}
body.pos-stage6-loss-controls .pos6-review-queue{min-height:410px}
body.pos-stage6-loss-controls .pos6-review-queue>p{padding:11px 12px;background:#ecf4ff;border-radius:9px;color:#345b90}
body.pos-stage6-loss-controls #queue{min-height:180px;background:#f9fbff;border:1px solid #e1eafa;border-radius:10px;padding:12px}
body.pos-stage6-loss-controls #queue article{background:#fff;border:1px solid #dfebf9;border-radius:11px;padding:14px!important;margin:8px 0}
body.pos-stage6-loss-controls #queue article>p{font-size:12px;font-weight:700;color:#2a4b70;line-height:1.6;margin:0 0 10px}
body.pos-stage6-loss-controls #queue article button{margin-right:7px}
body.pos-stage6-loss-controls #create{display:grid;gap:1px}
body.pos-stage6-loss-controls #create label{display:block;margin:0 0 7px;max-width:100%}
body.pos-stage6-loss-controls #create textarea{resize:vertical}
body.pos-stage6-loss-controls #create button{justify-self:start}
/* Investigation board and threshold settings remain permission-controlled. */
body.pos-stage6-profit-protection .pos6-protection-overview{margin:0 0 15px}
body.pos-stage6-profit-protection .pos6-context{box-shadow:none;border:0;padding:0;margin:0 0 13px}
body.pos-stage6-profit-protection #summary{padding:13px;background:#edf5ff;color:#21588f;border-radius:10px;font-size:13px;font-weight:800}
body.pos-stage6-profit-protection #summary p{margin:0;color:#21588f}
body.pos-stage6-profit-protection .pos6-protection-grid{grid-template-columns:minmax(0,1.5fr) minmax(300px,.72fr)}
body.pos-stage6-profit-protection .pos6-protection-alerts{min-height:340px}
body.pos-stage6-profit-protection .pos6-protection-alerts #alerts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
body.pos-stage6-profit-protection .pos6-protection-alerts #alerts>.doc-card{margin:0;padding:15px;border-radius:11px}
body.pos-stage6-profit-protection .pos6-protection-alerts #alerts>.doc-card h3{color:#174d95;font-size:14px;line-height:1.3;margin:0 0 8px}
body.pos-stage6-profit-protection .pos6-protection-alerts #alerts>.doc-card :is(p,small){font-size:12px;line-height:1.5;color:#657a96}
body.pos-stage6-profit-protection .pos6-protection-alerts #alerts>.doc-card pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:235px;overflow:auto;font-size:11px;background:#edf4ff;padding:10px;border-radius:8px}
body.pos-stage6-profit-protection #thresholdForm{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 10px}
body.pos-stage6-profit-protection #thresholdForm>button{grid-column:1/-1;justify-self:start}
body.pos-stage6-profit-protection #settingsPanel[hidden]{display:none!important}
@media(max-width:1090px){
 body.pos-stage6 .pos6-two-pane{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.pos-stage6-finance .pos6-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.pos-stage6-finance .pos6-expense-grid{grid-template-columns:minmax(0,1fr)}
 body.pos-stage6-profit-protection .pos6-protection-alerts #alerts{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:780px){
 body.pos-stage6 .pos6-two-pane,body.pos-stage6-finance .pos6-finance-top,body.pos-stage6-finance .pos6-finance-bottom,body.pos-stage6-fiscal .pos6-fiscal-grid,body.pos-stage6-loss-controls .pos6-approvals-grid,body.pos-stage6-profit-protection .pos6-protection-grid{grid-template-columns:minmax(0,1fr)}
 body.pos-stage6 .pos6-hero{align-items:flex-start;flex-direction:column;padding:19px 17px}
 body.pos-stage6 .pos6-hero-actions{width:100%}
 body.pos-stage6 .pos6-hero-actions a{flex:1}
 body.pos-stage6 .pos6-context label{flex:1;min-width:145px;max-width:none}
 body.pos-stage6-finance .pos6-expense-grid{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:520px){
 body.pos-stage6 .pos6-shell{padding:10px 10px 30px}
 body.pos-stage6 .pos6-hero{border-radius:11px;padding:16px 14px}
 body.pos-stage6 .pos6-hero h1{font-size:23px}
 body.pos-stage6 .pos6-panel{padding:14px 12px;border-radius:11px}
 body.pos-stage6 .pos6-context{padding:12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 body.pos-stage6 .pos6-context label{min-width:0;max-width:100%;width:100%}
 body.pos-stage6 .pos6-context>button{grid-column:1/-1}
 body.pos-stage6-finance .pos6-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 body.pos-stage6-finance .pos6-metrics>.card{padding:12px 10px}
 body.pos-stage6-finance .pos6-metrics>.card h2{font-size:15px}
 body.pos-stage6-finance .pos6-compact-form,body.pos-stage6-finance #categoryForm{grid-template-columns:minmax(0,1fr)}
 body.pos-stage6-finance #categoryForm>button{grid-column:1}
 body.pos-stage6-profit-protection #thresholdForm{grid-template-columns:minmax(0,1fr)}
 body.pos-stage6 .pos6-jumpbar{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;padding-bottom:10px}
 body.pos-stage6 .pos6-jumpbar a{flex:none;white-space:nowrap}
}
