:root{
  --side:258px;--topbar:60px;
  --ri-navy:#0b1736;--ri-navy-2:#102a56;--ri-primary:#2563eb;--ri-primary-2:#06b6d4;
  --ri-violet:#7c3aed;--ri-emerald:#059669;--ri-amber:#d97706;--ri-rose:#e11d48;
  --ri-bg:#f3f7fc;--ri-surface:#ffffff;--ri-border:#dde6f1;--ri-text:#172033;--ri-muted:#68758a;
  --ri-shadow:0 10px 30px rgba(28,52,92,.08);--ri-shadow-lg:0 20px 60px rgba(15,38,80,.16);
  --nav-active:#e9f2ff;--nav-active-text:#1558c7;--nav-hover:#f0f5fb;
}
*{box-sizing:border-box}
html,body{min-height:100%}
body{margin:0;background:radial-gradient(circle at 92% -5%,rgba(37,99,235,.08),transparent 26rem),linear-gradient(180deg,#f8fbff 0,var(--ri-bg) 38rem);color:var(--ri-text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
a{transition:color .15s ease,background .15s ease,border-color .15s ease,transform .15s ease}
.ri-topbar{min-height:var(--topbar);padding-top:max(.35rem,env(safe-area-inset-top));z-index:1050;background:linear-gradient(105deg,var(--ri-navy) 0,var(--ri-navy-2) 58%,#164e78 100%);box-shadow:0 6px 22px rgba(7,22,52,.18);border-bottom:1px solid rgba(255,255,255,.08)}
.ri-topbar:after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:linear-gradient(90deg,#38bdf8,#6366f1,#a855f7,#10b981);opacity:.9}
.ri-menu-button{min-width:38px;border-color:rgba(255,255,255,.35)}
.ri-global-search{max-width:390px;width:100%}.ri-global-search .form-control{background:rgba(255,255,255,.95);border-color:transparent;box-shadow:0 2px 10px rgba(0,0,0,.08)}
.ri-brand{display:flex;align-items:center;gap:.55rem;letter-spacing:-.01em}.ri-brand-mark{display:inline-flex;align-items:center;justify-content:center;width:31px;height:31px;border-radius:10px;background:linear-gradient(135deg,#38bdf8 0,#2563eb 42%,#7c3aed 72%,#10b981 100%);color:#fff;font-size:.7rem;font-weight:800;letter-spacing:.04em;box-shadow:0 5px 14px rgba(37,99,235,.28)}.ri-brand-mark-lg{width:44px;height:44px;border-radius:14px;font-size:.9rem}
.ri-user-button{border-color:rgba(255,255,255,.35);background:rgba(255,255,255,.04)}.ri-user-button:hover{background:rgba(255,255,255,.1)}
.ri-user-menu{border:1px solid var(--ri-border);box-shadow:var(--ri-shadow-lg);border-radius:.8rem;padding:.45rem;min-width:190px}.ri-user-menu .dropdown-item{border-radius:.5rem;padding:.55rem .7rem}
.ri-install-top{background:linear-gradient(135deg,#eff6ff,#dbeafe);color:#1649a8;border:1px solid rgba(255,255,255,.5);font-weight:700}.ri-install-top:hover{background:#fff;color:#0f3f99;transform:translateY(-1px)}
.sidebar{width:var(--side);min-height:calc(100vh - var(--topbar));background:linear-gradient(180deg,#fff 0,#f7fbff 100%);border-color:var(--ri-border)!important;box-shadow:4px 0 18px rgba(24,54,96,.035)}
.ri-sidebar-body{width:100%;overflow-y:auto;overscroll-behavior:contain}.ri-sidebar-header{border-bottom:1px solid var(--ri-border);background:#fff}.content{min-width:0;max-width:calc(100vw - var(--side));width:100%}.ri-content-inner{max-width:1560px;margin:0 auto}.ri-footer{color:var(--ri-muted);border-top:1px solid var(--ri-border)}
/* Compact hierarchical navigation */
.ri-nav-accordion{display:flex;flex-direction:column;gap:.28rem}.ri-nav-direct,.ri-nav-group-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:43px;padding:.56rem .72rem;border:0;border-radius:.65rem;background:transparent;color:#33435c;text-decoration:none;font-weight:680;text-align:left}.ri-nav-direct:hover,.ri-nav-group-toggle:hover{background:var(--nav-hover);color:#14213b}.ri-nav-direct.active{background:linear-gradient(135deg,#e8f2ff,#eef2ff);color:var(--nav-active-text);box-shadow:inset 3px 0 #3b82f6}.ri-nav-section{border-radius:.65rem}.ri-nav-section.is-open>.ri-nav-group-toggle{color:#153d7d;background:linear-gradient(135deg,#edf5ff,#f6f2ff)}.ri-nav-chevron{font-size:1.05rem;line-height:1;transition:transform .16s ease;color:#7d8da5}.ri-nav-section.is-open .ri-nav-chevron{transform:rotate(180deg)}.ri-nav-group-items{padding:.18rem 0 .38rem .5rem}.ri-nav-group-items[hidden]{display:none!important}.sidebar .nav-link{position:relative;color:#526176;padding:.5rem .72rem .5rem 1.05rem;border-radius:.52rem;min-height:39px;display:flex;align-items:center}.sidebar .nav-link:before{content:"";position:absolute;left:.32rem;top:50%;width:4px;height:4px;border-radius:50%;background:#9fb0c4;transform:translateY(-50%)}.sidebar .nav-link:hover{background:var(--nav-hover);color:#1d2b43}.sidebar .nav-link.active{background:linear-gradient(135deg,#eaf3ff,#f0f0ff);color:var(--nav-active-text);font-weight:680}.sidebar .nav-link.active:before{width:4px;height:18px;border-radius:4px;background:linear-gradient(#2563eb,#7c3aed)}
/* General surface treatment */
.card{border:1px solid var(--ri-border);border-radius:.9rem;box-shadow:var(--ri-shadow);overflow:hidden}
/* Wide data tables must remain horizontally scrollable on desktop, mobile and installed PWA. */
.table-responsive.card{border:1px solid var(--ri-border);border-radius:.9rem;box-shadow:var(--ri-shadow);overflow-x:auto!important;overflow-y:hidden!important;max-width:100%;width:100%;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;touch-action:pan-x pan-y;scrollbar-gutter:stable}
.table-responsive{max-width:100%;overflow-x:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;touch-action:pan-x pan-y}
.table-responsive>.table{width:max-content;min-width:100%;margin-bottom:0}
.table-responsive>.table thead th{white-space:nowrap}
.table-responsive::-webkit-scrollbar{height:9px}.table-responsive::-webkit-scrollbar-track{background:#edf3fa;border-radius:999px}.table-responsive::-webkit-scrollbar-thumb{background:#a9bad0;border-radius:999px;border:2px solid #edf3fa}.table-responsive::-webkit-scrollbar-thumb:hover{background:#8298b6}
/* CRUD action column stays reachable while the rest of the table can still pan left/right. */
.table .ri-actions-col{position:sticky;right:0;z-index:3;white-space:nowrap;background:#fff;box-shadow:-10px 0 18px -17px rgba(15,38,80,.8)}
.table thead .ri-actions-col{z-index:5;background:#f4f8fd}.table-striped>tbody>tr:nth-of-type(odd)>.ri-actions-col{background:#f8fbff}.table-hover>tbody>tr:hover>.ri-actions-col{background:#f1f6fc}
.ri-table-scroll-hint{display:none;color:#728198;font-size:.76rem;margin:.45rem .15rem 0;align-items:center;gap:.3rem}
.ri-table-scroll-hint:before{content:"↔";font-weight:800;color:#2563eb}.ri-panel-card{background:rgba(255,255,255,.94)}.list-group-item{border-color:#e8eef6}.list-group-item:hover{background:#f8fbff}.table{--bs-table-bg:transparent}.table thead th{background:#f4f8fd;color:#53627a;font-size:.76rem;text-transform:uppercase;letter-spacing:.035em;border-bottom:1px solid var(--ri-border);padding-top:.8rem;padding-bottom:.8rem}.table tbody td{border-color:#edf1f6;padding-top:.72rem;padding-bottom:.72rem}.table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-accent-bg:rgba(237,244,253,.48)}
.form-control,.form-select{border-color:#cfd9e6;border-radius:.65rem;min-height:42px}.form-control:focus,.form-select:focus{border-color:#6ea4ff;box-shadow:0 0 0 .2rem rgba(37,99,235,.12)}.form-label{font-weight:650;color:#3b4a61}.btn{border-radius:.62rem;font-weight:650}.btn-primary{background:linear-gradient(135deg,#2563eb,#3157d8);border-color:#2563eb;box-shadow:0 6px 16px rgba(37,99,235,.18)}.btn-primary:hover{background:linear-gradient(135deg,#1d4ed8,#4338ca);border-color:#1d4ed8;transform:translateY(-1px)}.alert{border-radius:.8rem;border-width:1px}
/* Dashboard */
.ri-dashboard-hero{position:relative;overflow:hidden;display:flex;align-items:flex-end;justify-content:space-between;gap:2rem;padding:1.6rem 1.7rem;border-radius:1.15rem;color:#fff;background:linear-gradient(120deg,#102a56 0,#164e78 48%,#4f46e5 100%);box-shadow:0 18px 42px rgba(24,61,124,.22)}.ri-dashboard-hero:before{content:"";position:absolute;width:260px;height:260px;border-radius:50%;right:-55px;top:-125px;background:radial-gradient(circle,rgba(56,189,248,.42),rgba(56,189,248,0) 68%)}.ri-dashboard-hero:after{content:"";position:absolute;width:230px;height:230px;border-radius:50%;right:19%;bottom:-175px;background:radial-gradient(circle,rgba(167,139,250,.42),rgba(167,139,250,0) 69%)}.ri-dashboard-hero>*{position:relative;z-index:1}.ri-dashboard-hero p{max-width:760px;color:rgba(255,255,255,.82)}.ri-hero-actions{display:flex;gap:.65rem;flex-wrap:wrap}.ri-eyebrow{font-size:.71rem;font-weight:800;letter-spacing:.1em;color:#42669c;margin-bottom:.45rem}.ri-eyebrow-light{color:#8ddcff}.ri-section-heading{display:flex;align-items:end;justify-content:space-between;margin-bottom:.7rem}
.metric{position:relative;background:rgba(255,255,255,.94);border:1px solid var(--ri-border);border-radius:.9rem;padding:.95rem;height:100%;box-shadow:var(--ri-shadow);overflow:hidden;transition:transform .16s ease,box-shadow .16s ease}.metric:after{content:"";position:absolute;width:72px;height:72px;border-radius:50%;right:-28px;bottom:-35px;background:var(--metric-glow,rgba(37,99,235,.1))}.metric:hover{transform:translateY(-2px);box-shadow:0 13px 30px rgba(28,52,92,.12)}.metric-head{display:flex;align-items:center;gap:.48rem;margin-bottom:.7rem}.metric-icon{display:inline-flex;align-items:center;justify-content:center;min-width:29px;height:29px;padding:0 .35rem;border-radius:.55rem;background:var(--metric-soft,#eaf2ff);color:var(--metric-color,#2563eb);font-size:.68rem;font-weight:850}.metric-label{font-size:.78rem;color:#66748a;font-weight:650;line-height:1.15}.metric-value{font-size:1.7rem;font-weight:800;line-height:1;color:#18243b;letter-spacing:-.03em}.metric-blue{--metric-soft:#e8f1ff;--metric-color:#2563eb;--metric-glow:rgba(37,99,235,.14)}.metric-cyan{--metric-soft:#e2f8fb;--metric-color:#0891b2;--metric-glow:rgba(6,182,212,.14)}.metric-violet{--metric-soft:#f0eafe;--metric-color:#7c3aed;--metric-glow:rgba(124,58,237,.13)}.metric-amber{--metric-soft:#fff4db;--metric-color:#c56b08;--metric-glow:rgba(217,119,6,.13)}.metric-emerald{--metric-soft:#e5f8f0;--metric-color:#059669;--metric-glow:rgba(5,150,105,.13)}.metric-rose{--metric-soft:#ffe8ef;--metric-color:#e11d48;--metric-glow:rgba(225,29,72,.12)}
.status-total-ap{background:#64748b}.status-good,.status-pass{background:#059669}.status-info{background:#0891b2;color:#fff}.status-warning{background:#f0ad16;color:#342508}.status-critical,.status-fail{background:#dc3545}.badge{border-radius:999px;font-weight:750}.qrbox{background:#fff;padding:.6rem;border:1px solid var(--ri-border);border-radius:.8rem}.ip-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:.5rem}.ip-grid code{background:#eef4fb;padding:.45rem;border-radius:.45rem;color:#1d4f91}
/* Login */
.ri-login-page{min-height:100vh;background:linear-gradient(120deg,#091630 0,#102a56 48%,#1c5d79 100%);color:#fff}.ri-login-shell{min-height:100vh;display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,560px);gap:3rem;align-items:center;max-width:1400px;margin:0 auto;padding:clamp(1.25rem,5vw,5rem)}.ri-login-intro{max-width:650px}.ri-login-brand{display:flex;align-items:center;gap:.8rem;font-weight:800;font-size:1.15rem;margin-bottom:4rem}.ri-login-intro h1{font-size:clamp(2.35rem,5vw,4.9rem);line-height:.98;letter-spacing:-.045em;margin:0 0 1.25rem}.ri-login-intro p{font-size:1.08rem;max-width:590px;color:rgba(255,255,255,.74)}.ri-login-points{display:flex;gap:.55rem;flex-wrap:wrap;margin-top:1.4rem}.ri-login-points span{padding:.45rem .7rem;border:1px solid rgba(255,255,255,.18);border-radius:999px;background:rgba(255,255,255,.07);font-size:.82rem;color:#dbeafe}.ri-login-card{color:var(--ri-text);border:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.97);box-shadow:0 28px 80px rgba(2,12,32,.34);border-radius:1.15rem}.ri-login-card .form-control{background:#f9fbfe}.ri-login-footnote{text-align:center;color:#8792a3;font-size:.75rem;margin-top:1.2rem}.ri-install-soft{background:#edf4ff;color:#2554aa;border:1px solid #d5e4fb;white-space:nowrap}.ri-install-soft:hover{background:#e1edff;color:#123f92}
/* Install app sheet */
.ri-install-dialog[hidden]{display:none!important}.ri-install-dialog{position:fixed;inset:0;z-index:2000;display:grid;place-items:center;padding:1rem}.ri-install-dialog__backdrop{position:absolute;inset:0;background:rgba(5,17,38,.58);backdrop-filter:blur(5px)}.ri-install-dialog__sheet{position:relative;width:min(100%,460px);background:#fff;color:var(--ri-text);border-radius:1.1rem;padding:1.3rem;box-shadow:0 30px 90px rgba(3,14,33,.4);border:1px solid rgba(255,255,255,.55);animation:ri-sheet-in .18s ease-out}.ri-install-dialog__close{position:absolute;right:.8rem;top:.65rem;border:0;background:transparent;color:#718097;font-size:1.65rem;line-height:1}.ri-install-app-icon{width:62px;height:62px;border-radius:18px;display:flex;align-items:center;justify-content:center;margin-bottom:1rem;color:#fff;font-weight:900;background:linear-gradient(135deg,#38bdf8,#2563eb 42%,#7c3aed 72%,#10b981);box-shadow:0 10px 24px rgba(37,99,235,.25)}.ri-install-steps{border:1px solid var(--ri-border);background:#f7faff;border-radius:.75rem;padding:.8rem 1rem;color:#46556b;font-size:.9rem}.ri-install-steps ol{margin:.1rem 0 .1rem 1.1rem;padding:0}.ri-install-steps li+li{margin-top:.35rem}@keyframes ri-sheet-in{from{transform:translateY(10px) scale(.985);opacity:.5}to{transform:none;opacity:1}}
@media(max-width:991.98px){.sidebar{width:min(86vw,315px);min-height:0}.content{max-width:100vw;width:100%}#nav{visibility:hidden;transform:translateX(-100%);transition:transform .2s ease,visibility .2s;position:fixed;top:var(--topbar);bottom:0;left:0;z-index:1045;display:block!important;padding-bottom:env(safe-area-inset-bottom)}#nav.ri-nav-show{visibility:visible;transform:translateX(0);box-shadow:0 0 0 100vmax rgba(4,16,36,.36)}body.ri-nav-open{overflow:hidden}.ri-sidebar-header{display:flex;background:#fff;position:sticky;top:0;z-index:2}.ri-sidebar-body{height:calc(100vh - var(--topbar) - 57px);padding-bottom:max(1rem,env(safe-area-inset-bottom))}.ri-nav-direct,.ri-nav-group-toggle{min-height:46px;padding:.65rem .8rem}.sidebar .nav-link{min-height:44px;padding:.58rem .8rem .58rem 1.1rem}.ri-dashboard-hero{align-items:flex-start;flex-direction:column;padding:1.3rem}.ri-hero-actions{width:100%}.ri-hero-actions .btn{flex:1}.ri-login-shell{display:block;padding:1rem}.ri-login-intro{display:none}.ri-login-card-wrap{min-height:calc(100vh - 2rem);display:flex;align-items:center}.ri-login-card{width:100%;max-width:520px;margin:auto}.ri-install-top{padding-left:.55rem;padding-right:.55rem}}
@media(max-width:575.98px){.ri-topbar{gap:.25rem}.ri-brand{font-size:1rem}.ri-brand-mark{width:28px;height:28px;border-radius:9px}.ri-user-button{max-width:85px;overflow:hidden;text-overflow:ellipsis}.content{padding:1rem!important}.metric{padding:.78rem}.metric-value{font-size:1.48rem}.ri-dashboard-hero h1{font-size:1.8rem}.ri-dashboard-hero p{font-size:.9rem}.table-responsive>.table{min-width:max(100%,720px)}.table .ri-actions-col{max-width:190px}.ri-table-scroll-hint.is-visible{display:flex}}
@media(display-mode:standalone){body{padding-bottom:env(safe-area-inset-bottom)}.ri-topbar{padding-left:max(.5rem,env(safe-area-inset-left));padding-right:max(.5rem,env(safe-area-inset-right))}.content{padding-bottom:calc(1rem + env(safe-area-inset-bottom))!important}#nav{padding-left:env(safe-area-inset-left)}[data-ri-pwa-install]{display:none!important}}
@media print{header,.sidebar,.btn,footer,.ri-dashboard-hero .ri-hero-actions{display:none!important}.content{max-width:none!important;padding:0!important}.card{border:0!important;box-shadow:none!important}.ri-dashboard-hero{background:#fff!important;color:#111!important;box-shadow:none!important;padding:0 0 1rem!important}}

/* V2 provider form grid helper */
.contents { display: contents; }
