:root{--kx-shell-w:272px;--kx-shell-top:64px}
body.kx-shell-enabled{padding-right:var(--kx-shell-w)!important;padding-top:var(--kx-shell-top)!important}
.kx-shell-top{position:fixed;z-index:99990;top:0;right:var(--kx-shell-w);left:0;height:var(--kx-shell-top);display:flex;align-items:center;justify-content:space-between;padding:0 22px;background:rgba(10,14,17,.9);border-bottom:1px solid rgba(255,255,255,.09);backdrop-filter:blur(18px);direction:rtl}
.kx-shell-brand{display:flex;align-items:center;gap:10px;font-weight:800;color:#fff}.kx-shell-brand small{color:#9aa5ad;font-weight:600}
.kx-shell-actions{display:flex;gap:8px}.kx-shell-icon{width:40px;height:40px;border-radius:12px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.04);color:#fff;cursor:pointer;font-size:18px}
.kx-shell-side{position:fixed;z-index:99991;top:0;right:0;bottom:0;width:var(--kx-shell-w);background:#0d1216;border-left:1px solid rgba(255,255,255,.08);padding:18px 14px;overflow:auto;direction:rtl}
.kx-shell-logo{display:block;padding:8px 12px 20px;color:#fff;font-size:20px;font-weight:900;text-decoration:none}.kx-shell-logo span{color:#2cb1a6}
.kx-shell-nav{display:grid;gap:4px}.kx-shell-link{display:flex;align-items:center;gap:11px;padding:11px 12px;border-radius:12px;text-decoration:none;color:#aeb8bf;font-size:13px;font-weight:700}.kx-shell-link:hover,.kx-shell-link.active{background:rgba(44,177,166,.12);color:#fff}.kx-shell-link b{width:24px;text-align:center;font-size:16px}
.kx-shell-section{padding:18px 12px 7px;color:#64727d;font-size:11px;font-weight:800;letter-spacing:.04em}
.kx-shell-drawer,.kx-shell-palette{position:fixed;z-index:100000;inset:0;background:rgba(0,0,0,.58);display:none;align-items:flex-start;justify-content:center;padding-top:82px;direction:rtl}.kx-shell-drawer.open,.kx-shell-palette.open{display:flex}
.kx-shell-panel{width:min(680px,calc(100vw - 32px));max-height:75vh;overflow:auto;background:#10171c;border:1px solid rgba(255,255,255,.12);border-radius:22px;box-shadow:0 30px 80px rgba(0,0,0,.45);padding:18px;color:#fff}
.kx-shell-search{width:100%;box-sizing:border-box;background:#0a0f13;border:1px solid rgba(255,255,255,.12);border-radius:14px;padding:14px 16px;color:#fff;font:inherit;outline:none}.kx-shell-results{display:grid;gap:7px;margin-top:12px}.kx-shell-result{display:flex;justify-content:space-between;align-items:center;padding:13px;border-radius:12px;color:#fff;text-decoration:none;background:rgba(255,255,255,.035)}.kx-shell-result:hover{background:rgba(44,177,166,.12)}
.kx-shell-empty{padding:34px;text-align:center;color:#93a0a8}.kx-shell-close{float:left;background:none;border:0;color:#fff;font-size:22px;cursor:pointer}.kx-shell-badge{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#2cb1a6;color:#07100f;font-size:10px;display:inline-grid;place-items:center;font-weight:900}
@media(max-width:900px){body.kx-shell-enabled{padding-right:0!important;padding-top:60px!important}.kx-shell-side{transform:translateX(100%);transition:.2s;width:min(290px,86vw)}.kx-shell-side.open{transform:translateX(0)}.kx-shell-top{right:0;height:60px}.kx-shell-brand small{display:none}}
@media print{.kx-shell-side,.kx-shell-top,.kx-shell-drawer,.kx-shell-palette{display:none!important}body.kx-shell-enabled{padding:0!important}}

/* v548 — internal management navigation is permission-gated */
.kx-shell-internal-nav{border-top:1px solid rgba(255,255,255,.07);padding-top:8px}
#kxInternalSection{margin-top:18px;color:#8fa4b4}


/* v551: standalone role pages use their own workspace without the global sidebar. */
.kx-back-button{position:fixed;top:18px;left:18px;z-index:2147483000;display:inline-flex;align-items:center;gap:8px;border:1px solid rgba(255,255,255,.16);background:#0b1f3a;color:#fff;border-radius:12px;padding:10px 14px;font:700 14px/1.2 Almarai,Tahoma,Arial,sans-serif;box-shadow:0 10px 28px rgba(0,0,0,.18);cursor:pointer}
.kx-back-button:hover{background:#12315a}.kx-back-button span:first-child{font-size:18px;color:#5fd0c8}
@media(max-width:700px){.kx-back-button{top:10px;left:10px;padding:9px 11px}.kx-back-button span:last-child{display:none}}

.kx-mode-switcher{position:relative;display:none}
.kx-mode-button{border:1px solid rgba(255,255,255,.14);background:#101a21;color:#fff;border-radius:9px;padding:9px 12px;font:700 13px inherit;cursor:pointer}
.kx-mode-menu{display:none;position:absolute;top:calc(100% + 8px);left:0;min-width:190px;background:#0c141a;border:1px solid rgba(255,255,255,.12);border-radius:10px;padding:6px;z-index:10020;box-shadow:0 16px 40px rgba(0,0,0,.28)}
.kx-mode-menu.open{display:grid;gap:4px}
.kx-mode-menu button{border:0;background:transparent;color:#d7e0e6;text-align:right;padding:10px;border-radius:7px;cursor:pointer;font:700 13px inherit}
.kx-mode-menu button:hover,.kx-mode-menu button.active{background:#0b302f;color:#fff}
