/* AmeliaGym R9.4.1 — final visual authority + responsive/RBAC UI */
:root{--r95-content-max:1540px;--r95-gutter:clamp(14px,2vw,28px)}
@media(min-width:981px){
  .shell:not(.hidden){display:block!important;grid-template-columns:none!important}
  .shell>main{margin-left:var(--ag-sidebar)!important;width:calc(100% - var(--ag-sidebar))!important;min-width:0!important}
  body.r61-sidebar-collapsed .shell>main,.shell.sidebar-collapsed>main{margin-left:var(--ag-sidebar-collapsed)!important;width:calc(100% - var(--ag-sidebar-collapsed))!important}
}
.content{padding-left:var(--r95-gutter)!important;padding-right:var(--r95-gutter)!important;max-width:var(--r95-content-max);margin:0 auto;box-sizing:border-box;width:100%}
.topbar{padding-left:var(--r95-gutter)!important;padding-right:var(--r95-gutter)!important}
.content>*{min-width:0}.grid-2,.grid-3,.grid-dashboard,.metrics{min-width:0}

/* Correct contrast after the generic R82 heading rule. */
.r7-reception-hero h1,.r7-reception-hero h2,.r7-reception-hero h3,.r7-reception-hero b,
.cash-hero h1,.cash-hero h2,.cash-hero h3,.cash-hero b,
.r92-health h1,.r92-health h2,.r92-health h3,.r92-health b,
.r92-retention h1,.r92-retention h2,.r92-retention h3,.r92-retention b,
.r92-retention-card h1,.r92-retention-card h2,.r92-retention-card h3,.r92-retention-card b{color:#fff!important}
.r7-reception-hero p,.r7-reception-hero .mini,.cash-hero p,.cash-hero .mini,.r92-health p,.r92-health .subline,.r92-retention p,.r92-retention-card p{color:#d5e3ec!important}
.r92-health .eyebrow,.r92-retention .eyebrow,.cash-hero .eyebrow,.r7-reception-hero>div>span{color:#ff9a55!important}

/* Stop cards/tables touching viewport or each other. */
.card,.table-card,.r94-panel,.r8-card{overflow:hidden}.table-wrap{max-width:100%;overflow:auto}.table-wrap table{min-width:760px}
.page-toolbar{gap:12px;flex-wrap:wrap}.page-toolbar .left,.page-toolbar .right-actions{gap:9px;flex-wrap:wrap}
.modal-panel{width:min(920px,calc(100vw - 32px))!important;margin:16px!important}.modal-form label{min-width:0}.modal-form input,.modal-form select,.modal-form textarea{max-width:100%;box-sizing:border-box}
.sidebar .nav.hidden,.sidebar .nav-group.hidden{display:none!important}

/* Company assessment */
.r95-loading{padding:50px;text-align:center;color:#617487}.r95-survey-head{background:linear-gradient(125deg,#071d2f,#103c52);border-radius:22px;padding:26px 28px;color:#fff;display:flex;align-items:center;justify-content:space-between;gap:24px;box-shadow:0 14px 40px rgba(5,32,49,.12)}
.r95-survey-head span,.r95-plan-head span{font-size:10px;letter-spacing:.16em;font-weight:900;color:#ff9a55}.r95-survey-head h2{color:#fff!important;margin:7px 0 6px;font-size:clamp(22px,2vw,30px)!important}.r95-survey-head p{margin:0;color:#c9dae4;max-width:760px;line-height:1.55}.r95-score{display:grid;place-items:center;width:112px;height:112px;border:1px solid rgba(255,255,255,.18);border-radius:50%;flex:0 0 auto;background:rgba(255,255,255,.05)}.r95-score b{font-size:26px}.r95-score span{font-size:9px;color:#a9c0ce;letter-spacing:.08em}
.r95-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:18px;margin-top:18px;align-items:start}.r95-form{display:grid;gap:14px}.r95-section{background:#fff;border:1px solid #dbe5eb;border-radius:18px;padding:20px;box-shadow:0 6px 20px rgba(5,32,49,.04)}.r95-section-title{display:flex;gap:12px;align-items:center;margin-bottom:17px}.r95-section-title>span{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#fff1e8;color:#e96512;font-size:11px;font-weight:900}.r95-section-title b{display:block;color:#102c3f}.r95-section-title small{display:block;color:#718594;margin-top:2px}.r95-grid2{display:grid;grid-template-columns:1fr 1fr;gap:13px}.r95-form label{display:grid;gap:6px;font-size:11px;font-weight:800;color:#41576a}.r95-form input,.r95-form textarea,.r95-form select,.r95-actions select{width:100%;border:1px solid #cfdce4;border-radius:10px;background:#fff;padding:11px 12px;color:#102c3f;font:inherit;box-sizing:border-box}.r95-form textarea{resize:vertical;min-height:76px;line-height:1.45}.r95-check{display:flex!important;grid-template-columns:none!important;align-items:center;gap:9px!important;margin-top:12px}.r95-check input{width:18px!important;height:18px;margin:0}.r95-actions{display:flex;justify-content:flex-end;gap:10px;align-items:center;background:#fff;border:1px solid #dbe5eb;border-radius:16px;padding:14px}.r95-actions select{width:auto;min-width:190px}
.r95-plan{position:sticky;top:82px;background:#fff;border:1px solid #dbe5eb;border-radius:18px;padding:17px;display:grid;gap:8px;max-height:calc(100vh - 104px);overflow:auto}.r95-plan-head{padding:4px 4px 10px}.r95-plan-head b{display:block;color:#153247;margin-top:5px}.r95-plan article{display:grid;grid-template-columns:28px 1fr;gap:10px;padding:11px;border-radius:12px;border:1px solid #e1e8ed}.r95-plan article i{width:25px;height:25px;border-radius:50%;display:grid;place-items:center;font-style:normal;font-weight:900}.r95-plan article.done i{background:#dff5e9;color:#14824a}.r95-plan article.pending i{background:#fff1e3;color:#c95b0b}.r95-plan article b{font-size:12px;color:#173247}.r95-plan article p{font-size:11px;color:#63798a;margin:3px 0;line-height:1.35}.r95-plan article small{font-size:9px;font-weight:900;color:#8aa0ad;letter-spacing:.08em}

@media(max-width:1180px){.r95-layout{grid-template-columns:1fr}.r95-plan{position:relative;top:auto;max-height:none;grid-template-columns:repeat(2,1fr)}.r95-plan-head{grid-column:1/-1}}
@media(max-width:980px){.shell>main,.shell.sidebar-collapsed>main,body.r61-sidebar-collapsed .shell>main{margin-left:0!important;width:100%!important}.content{padding:14px 12px calc(30px + env(safe-area-inset-bottom))!important}.topbar{padding-inline:12px!important}.r95-grid2{grid-template-columns:1fr}.r95-survey-head{padding:20px;align-items:flex-start}.r95-score{width:84px;height:84px}.r95-plan{grid-template-columns:1fr}.r95-plan-head{grid-column:auto}.r95-actions{display:grid;grid-template-columns:1fr}.r95-actions select{width:100%}}
@media(max-width:620px){.global-search-wrap{display:none!important}.topbar{gap:8px}.topbar-status{margin-left:auto}.r95-survey-head{display:block}.r95-score{margin-top:16px;width:auto;height:auto;border-radius:12px;display:flex;justify-content:flex-start;gap:8px;padding:10px 12px}.r95-score b{font-size:20px}.r95-section{padding:15px;border-radius:14px}.table-wrap table{min-width:680px}.modal-panel{width:calc(100vw - 16px)!important;margin:8px!important}.two{grid-template-columns:1fr!important}}

.r95-rbac{margin-top:16px;background:#fff;border:1px solid #dbe5eb;border-radius:18px;padding:18px}.r95-rbac-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.r95-rbac-head span{font-size:10px;letter-spacing:.14em;font-weight:900;color:#f06f1c}.r95-rbac-head h3{margin:5px 0;color:#143247}.r95-rbac-head p{margin:0;color:#6f8291;font-size:12px}.r95-rbac-head>b{font-size:10px;background:#e4f5eb;color:#18794a;padding:7px 9px;border-radius:999px}.r95-rbac-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:14px}.r95-rbac-grid article{border:1px solid #e0e8ed;border-radius:12px;padding:11px}.r95-rbac-grid strong{font-size:12px;color:#123148}.r95-rbac-grid p{font-size:10px;line-height:1.5;color:#6b7d8a;margin:5px 0 0}@media(max-width:900px){.r95-rbac-grid{grid-template-columns:1fr 1fr}}@media(max-width:560px){.r95-rbac-grid{grid-template-columns:1fr}.r95-rbac-head{display:block}.r95-rbac-head>b{display:inline-block;margin-top:10px}}

/* R9.4.1: the legacy R3 role matrix is not authoritative. R95 renders the effective RBAC matrix below it. */
.role-matrix{display:none!important}

/* Printing must never inherit the fixed-sidebar desktop offset. */
@media print{
  .shell>main,.shell.sidebar-collapsed>main,body.r61-sidebar-collapsed .shell>main{margin-left:0!important;width:100%!important}
  .content{max-width:none!important;width:100%!important;margin:0!important;padding:0!important}
}
