/* Scoped System Integrity Center; does not change the academy's existing navigation. */
.kaa8-launch{position:fixed;z-index:9030;bottom:18px;left:16px;border:2px solid #5a2e88;border-radius:13px;background:#fff;color:#3c175c;padding:9px 14px;font:600 13px system-ui,-apple-system,sans-serif;box-shadow:0 4px 18px #1208202f;cursor:pointer}
.kaa8-launch:hover,.kaa8-launch:focus-visible{background:#f3ebfb}
.kaa8-panel{position:fixed;z-index:9040;left:16px;bottom:66px;width:min(490px,calc(100vw - 30px));height:min(72vh,640px);display:flex;flex-direction:column;background:#fefcff;color:#20192c;border:2px solid #5a2e88;border-radius:18px;box-shadow:0 10px 35px #10052155;font:14px/1.45 system-ui,-apple-system,sans-serif;overflow:hidden}
.kaa8-panel[hidden]{display:none}
.kaa8-head{display:flex;justify-content:space-between;align-items:center;background:#21102f;color:#fff;padding:14px 16px}
.kaa8-head strong{display:block;font-size:17px}.kaa8-head small{display:block;color:#ebd4fa}
.kaa8-close{font-size:22px;background:transparent;border:0;color:#fff;cursor:pointer;padding:2px 8px}
.kaa8-tabs{display:flex;gap:4px;flex-wrap:wrap;padding:10px;background:#f3edfb}
.kaa8-tab{border:1px solid #a998c7;border-radius:9px;background:#fff;color:#31154c;padding:7px 9px;cursor:pointer;font:600 12px system-ui}
.kaa8-tab.active{background:#421d6a;color:white;border-color:#421d6a}
.kaa8-controls{display:flex;justify-content:flex-end;padding:4px 12px}
.kaa8-refresh,.kaa8-action{border:1px solid #60338b;border-radius:8px;background:white;color:#35134e;padding:7px 10px;font:600 12px system-ui;cursor:pointer}
.kaa8-action{margin-top:4px;background:#421d6a;color:white}
.kaa8-message{padding:2px 12px;color:#51346c;font-size:12px;min-height:21px}
.kaa8-content{padding:10px 16px 20px;overflow-y:auto;min-height:0;flex:1}
.kaa8-stack{display:grid;gap:8px}.kaa8-kpi{display:flex;justify-content:space-between;gap:15px;align-items:center;padding:10px 12px;border:1px solid #e3d6ef;border-radius:10px;background:#faf8fc}
.kaa8-kpi strong{font-size:15px;text-align:right}.kaa8-note{color:#584669;font-size:12px;margin:3px 0 10px}
.kaa8-item{border:1px solid #d9cae9;border-radius:10px;padding:10px 12px;background:#fff}
.kaa8-item p{font-size:12px;color:#534365;margin:5px 0;overflow-wrap:anywhere}
.kaa8-item strong{font-size:13px}
@media(max-width:600px){.kaa8-launch{left:8px;bottom:8px}.kaa8-panel{left:8px;bottom:54px;width:calc(100vw - 16px);height:calc(100dvh - 72px);max-height:750px;border-radius:14px}}

/* Phase 8: leave sign-out unobstructed. Desktop integrity launcher lives in sidebar. */
@media(min-width:761px){.kaa8-launch{display:none!important}.kaa8-panel{left:260px}}
@media(max-width:760px){.kaa8-launch{left:10px;bottom:calc(150px + env(safe-area-inset-bottom,0px))}}

/* Phase 8.2: administrator can open System Integrity from More on iPhone.
   Remove only its floating launcher; preserve its permission-gated panel. */
@media(max-width:760px){
 .kaa8-launch{display:none!important}
 .kaa8-panel{left:8px!important;right:8px!important;width:calc(100vw - 16px)!important;
  bottom:calc(84px + max(8px, env(safe-area-inset-bottom,0px)))!important;
  height:min(66dvh,620px);max-height:calc(100dvh - 135px - env(safe-area-inset-bottom,0px))}
}
