:root{--mksu-blue:#2e3091;--mksu-gold:#fcb315;--soft:#f5f7fb;--ink:#172033}
html,body{min-height:100%}body{color:var(--ink)}
.public-body{min-height:100vh;display:flex;flex-direction:column;background:linear-gradient(160deg,#eef2ff 0%,#fff 40%,#fff8e7 100%)}
.portal-navbar,.admin-topbar{background:var(--mksu-blue)}
.brand-mark{width:44px;height:44px;border-radius:12px;background:var(--mksu-gold);color:#1c2359;display:grid;place-items:center;font-weight:900;box-shadow:inset 0 0 0 2px rgba(255,255,255,.35)}
.hero-card{border:0;border-radius:22px;box-shadow:0 18px 50px rgba(46,48,145,.13);overflow:hidden}
.hero-card .accent{height:6px;background:linear-gradient(90deg,var(--mksu-blue),var(--mksu-gold))}
.lookup-icon{width:72px;height:72px;border-radius:22px;background:#eef0ff;color:var(--mksu-blue);display:grid;place-items:center;font-size:2rem;margin:auto}
.btn-mksu{background:var(--mksu-blue);border-color:var(--mksu-blue);color:#fff}.btn-mksu:hover{background:#242674;border-color:#242674;color:#fff}
.btn-gold{background:var(--mksu-gold);border-color:var(--mksu-gold);color:#262626;font-weight:700}.btn-gold:hover{background:#e7a20e;border-color:#e7a20e}
.form-control:focus,.form-select:focus{border-color:#888bd8;box-shadow:0 0 0 .25rem rgba(46,48,145,.12)}
.public-footer{background:#101637;color:#cfd3e8;font-size:.9rem}
.result-email{font-size:clamp(1.05rem,3vw,1.55rem);font-weight:800;color:var(--mksu-blue);word-break:break-word}
.password-chip{background:#fff7dc;border:1px dashed #e0a519;border-radius:14px;padding:1rem;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:800;letter-spacing:.04em}
.admin-body{background:#f4f6fa}.admin-sidebar{width:250px;min-height:calc(100vh - 56px);background:#18204e;color:#fff}.admin-sidebar a{display:block;color:#d9ddf4;text-decoration:none;padding:.78rem 1rem;border-left:3px solid transparent}.admin-sidebar a:hover{background:#232d68;color:#fff;border-left-color:var(--mksu-gold)}
.admin-main{min-width:0}.stat-card{border:0;border-radius:16px;box-shadow:0 8px 24px rgba(16,22,55,.06)}.stat-icon{width:44px;height:44px;border-radius:12px;background:#eef0ff;color:var(--mksu-blue);display:grid;place-items:center;font-size:1.25rem}
.card{border-color:#e8eaf2}.table thead th{font-size:.78rem;text-transform:uppercase;letter-spacing:.04em;color:#68708a;background:#f8f9fc}.table td{vertical-align:middle}
.badge-soft{background:#eef0ff;color:var(--mksu-blue)}
@media print{.admin-sidebar,.admin-topbar,.no-print,.btn,.pagination{display:none!important}.admin-main{width:100%}.card{box-shadow:none!important;border:0!important}}
.brand-logo{display:block;width:auto!important;height:auto!important;max-width:170px!important;max-height:44px!important;object-fit:contain!important;object-position:center;background:#fff;border-radius:10px;padding:3px}
.success-icon{background:#eaf8f0!important;color:#198754!important}
.settings-logo{display:block;width:auto!important;height:auto!important;max-width:220px!important;max-height:90px!important;object-fit:contain!important;object-position:center;border:1px solid #e8eaf2;border-radius:10px;padding:6px;background:#fff}
code{white-space:normal;word-break:break-word}
@media(max-width:991.98px){.admin-sidebar{min-height:100vh}.admin-main{width:100%}}

/* v7 admin navigation and branding */
.admin-layout{min-height:calc(100vh - 56px)}
.admin-sidebar{flex:0 0 260px;max-width:260px;overflow-y:auto}
.admin-sidebar .offcanvas-body{min-height:100%}
.admin-nav a.active{background:#2a3578;color:#fff;border-left-color:var(--mksu-gold);font-weight:700}
.admin-sidebar-brand{background:rgba(255,255,255,.025)}
.admin-public-link{padding:0!important;border-left:0!important}
.admin-brand-logo{display:block;width:auto!important;height:auto!important;max-width:130px!important;max-height:34px!important;object-fit:contain!important;object-position:center;background:#fff;border-radius:8px;padding:2px}
.admin-brand-mark{width:34px;height:34px;border-radius:9px;background:var(--mksu-gold);color:#17204b;display:inline-grid;place-items:center;font-size:.82rem;font-weight:900}
.sidebar-logo{display:block;width:auto!important;height:auto!important;max-width:180px!important;max-height:58px!important;object-fit:contain!important;object-position:left center;background:#fff;border-radius:10px;padding:4px;margin-bottom:.6rem}
.login-logo{display:block;width:auto!important;height:auto!important;max-width:210px!important;max-height:72px!important;object-fit:contain!important;object-position:center;background:#fff;border-radius:12px;padding:5px;box-shadow:0 6px 18px rgba(0,0,0,.08)}
.settings-favicon{width:36px;height:36px;object-fit:contain;border:1px solid #e8eaf2;border-radius:8px;padding:3px;background:#fff}
.support-strip{background:#f7f8ff;border:1px solid #e7e9fb}
@media(min-width:992px){
  .admin-sidebar.offcanvas-lg{position:sticky!important;top:56px!important;left:auto!important;bottom:auto!important;z-index:100!important;display:block!important;visibility:visible!important;transform:none!important;height:calc(100vh - 56px)!important;border-right:0!important}
  .admin-sidebar .offcanvas-body{display:flex!important;overflow-y:auto!important}
}
@media(max-width:991.98px){.admin-sidebar{max-width:280px;width:280px}.admin-sidebar .offcanvas-body{background:#18204e}}

/* v8 high-contrast admin navigation */
.admin-sidebar{background:#101744!important;color:#fff!important}
.admin-sidebar-brand{background:#0b1138!important;border-bottom-color:rgba(255,255,255,.2)!important}
.admin-sidebar .text-white-50,.admin-sidebar small.text-white-50{color:#f1f3ff!important;opacity:1!important}
.admin-sidebar .p-3.pb-2.text-white-50{color:#fcb315!important;font-weight:800;letter-spacing:.08em}
.admin-nav a{color:#fff!important;font-weight:600;border-left:5px solid transparent!important;margin:.18rem .5rem;border-radius:9px;padding:.82rem .9rem!important}
.admin-nav a i{color:#fcb315!important;font-size:1.05rem}
.admin-nav a:hover{background:rgba(255,255,255,.13)!important;color:#fff!important;border-left-color:#fcb315!important}
.admin-nav a.active{background:#fcb315!important;color:#121842!important;border-left-color:#fff!important;font-weight:800;box-shadow:0 5px 16px rgba(0,0,0,.18)}
.admin-nav a.active i{color:#121842!important}
.admin-public-link{color:#fff!important;font-weight:700!important}
.admin-public-link i{color:#fcb315!important}

/* v8 password visibility controls */
.password-toggle-wrap{position:relative;width:100%}
.password-toggle-input{padding-right:3rem!important}
.password-eye-button{position:absolute;right:.45rem;top:50%;transform:translateY(-50%);width:2.35rem;height:2.35rem;border:0;background:transparent;color:#2e3091;display:grid;place-items:center;border-radius:50%;z-index:4}
.password-eye-button:hover,.password-eye-button:focus{background:#eef0ff;color:#1e206e;outline:none}
.password-eye-button i{font-size:1.15rem}
.secret-eye{color:#2e3091!important;text-decoration:none!important}
.secret-eye i{font-size:1.2rem}

@media(max-width:991.98px){.admin-sidebar .offcanvas-body{background:#101744!important}}


/* v9 logo scaling guard */
img.brand-logo,img.admin-brand-logo,img.sidebar-logo,img.login-logo,img.settings-logo{box-sizing:border-box!important;object-fit:contain!important}
@media(max-width:575.98px){
  .brand-logo{max-width:120px!important;max-height:38px!important}
  .admin-brand-logo{max-width:95px!important;max-height:30px!important}
  .sidebar-logo{max-width:150px!important;max-height:52px!important}
  .login-logo{max-width:170px!important;max-height:64px!important}
}

/* v10 typography, password-eye reliability and responsive safeguards */
@font-face{font-family:"Canva Sans";src:local("Canva Sans"),local("CanvaSans");font-display:swap}
:root{--portal-font:"Canva Sans","Aptos","Helvetica Neue",Arial,sans-serif}
html,body,button,input,select,textarea,.btn,.form-control,.form-select,.dropdown-menu,.table,.badge,.alert{font-family:var(--portal-font)!important}
.password-chip{font-family:var(--portal-font)!important}

.password-eye-svg{width:1.3rem;height:1.3rem;display:block;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.password-eye-button{display:flex!important;align-items:center;justify-content:center;visibility:visible!important;opacity:1!important;cursor:pointer}
.password-eye-button:focus-visible,.secret-eye:focus-visible{outline:3px solid rgba(46,48,145,.25)!important;outline-offset:2px}
.secret-eye{display:inline-flex!important;align-items:center;justify-content:center;visibility:visible!important;opacity:1!important;min-width:2.25rem;min-height:2.25rem}

html{overflow-x:hidden}
body{overflow-x:hidden}
img,svg{max-width:100%}
.admin-layout,.admin-main,.admin-main>.container-fluid{min-width:0;max-width:100%}
.table-responsive{max-width:100%;-webkit-overflow-scrolling:touch}
.form-control,.form-select,.btn{max-width:100%}
.card{max-width:100%}

@media(max-width:991.98px){
  .admin-layout{display:block!important}
  .admin-main{width:100%!important}
  .admin-main>.container-fluid{padding:1rem!important}
  .admin-sidebar{width:min(86vw,290px)!important;max-width:min(86vw,290px)!important}
  .admin-sidebar .offcanvas-body{height:100%;overflow-y:auto!important}
  .admin-topbar .container-fluid{gap:.5rem;flex-wrap:nowrap}
  .admin-topbar .navbar-brand{min-width:0;flex:1 1 auto;margin-right:0}
  .admin-topbar .navbar-brand>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .admin-topbar .dropdown{flex:0 1 auto;min-width:0}
  .admin-topbar .dropdown>button{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}

@media(max-width:767.98px){
  .public-body main{padding-top:1.5rem!important;padding-bottom:1.5rem!important}
  .hero-card{border-radius:18px}
  .hero-card .card-body{padding:1.25rem!important}
  .result-email{font-size:1.05rem}
  .password-chip{padding:.85rem!important;gap:.35rem!important;overflow-wrap:anywhere}
  .public-footer .container{font-size:.86rem}
  .admin-main h1,.admin-main h2{font-size:clamp(1.35rem,6vw,1.8rem)}
  .admin-main .card-body{padding:1rem}
  .admin-main .btn:not(.btn-sm){min-height:42px}
}

@media(max-width:575.98px){
  .portal-navbar .container{display:flex;flex-wrap:nowrap;gap:.45rem;padding-left:.75rem;padding-right:.75rem}
  .portal-navbar .navbar-brand{min-width:0;flex:1 1 auto;gap:.5rem!important;margin-right:0}
  .portal-navbar .navbar-brand>div:last-child{min-width:0;font-size:.82rem;line-height:1.1}
  .portal-navbar .navbar-brand>div:last-child .fw-bold{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:145px}
  .portal-navbar .navbar-brand small{font-size:.68rem}
  .portal-navbar>a.btn,.portal-navbar .btn{flex:0 0 auto;font-size:.75rem;padding:.35rem .5rem}
  .admin-topbar{min-height:56px}
  .admin-topbar .navbar-brand>span:last-child{display:none}
  .admin-topbar .dropdown>button{max-width:118px;font-size:.76rem;padding:.35rem .45rem}
  .admin-main>.container-fluid{padding:.75rem!important}
  .row.g-4{--bs-gutter-y:1rem}
  .modal-dialog{margin:.5rem}
  .modal-content{border-radius:14px}
  .d-flex.gap-2,.d-flex.gap-3{flex-wrap:wrap}
  .pagination{flex-wrap:wrap;gap:.2rem}
}

@media(max-width:359.98px){
  .portal-navbar .navbar-brand>div:last-child{display:none}
  .admin-topbar .dropdown>button{max-width:96px}
  .hero-card .card-body{padding:1rem!important}
}


/* v11 persistent navigation while scrolling */
.portal-navbar{
  position:sticky!important;
  top:0!important;
  z-index:1030!important;
}
@media(min-width:992px){
  .admin-layout{overflow:visible!important;align-items:flex-start!important}
  .admin-sidebar.offcanvas-lg{
    position:sticky!important;
    top:56px!important;
    align-self:flex-start!important;
    height:calc(100vh - 56px)!important;
    max-height:calc(100vh - 56px)!important;
    overflow:hidden!important;
  }
  .admin-sidebar .offcanvas-body{
    height:100%!important;
    max-height:100%!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
  }
  .admin-main{align-self:stretch!important}
}
@media(max-width:991.98px){
  .admin-sidebar.offcanvas-start{
    position:fixed!important;
    top:0!important;
    bottom:0!important;
    height:100vh!important;
    max-height:100vh!important;
  }
}

/* v12 deployment: viewport-pinned admin navigation */
:root{--admin-topbar-height:56px;--admin-sidebar-width:260px}
html,body{overflow-x:clip!important}
.admin-topbar{
  position:fixed!important;
  top:0!important;
  left:0!important;
  right:0!important;
  z-index:1045!important;
  min-height:var(--admin-topbar-height)!important;
}
.admin-body{padding-top:var(--admin-topbar-height)!important}
@media(min-width:992px){
  .admin-layout{
    display:block!important;
    min-height:calc(100vh - var(--admin-topbar-height))!important;
  }
  .admin-sidebar.offcanvas-lg{
    position:fixed!important;
    top:var(--admin-topbar-height)!important;
    left:0!important;
    bottom:0!important;
    width:var(--admin-sidebar-width)!important;
    max-width:var(--admin-sidebar-width)!important;
    height:auto!important;
    max-height:none!important;
    min-height:0!important;
    z-index:1035!important;
    transform:none!important;
    visibility:visible!important;
    overflow:hidden!important;
    border-right:0!important;
  }
  .admin-sidebar .offcanvas-body{
    position:absolute!important;
    inset:0!important;
    display:flex!important;
    flex-direction:column!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
  }
  .admin-main{
    margin-left:var(--admin-sidebar-width)!important;
    width:calc(100% - var(--admin-sidebar-width))!important;
    max-width:calc(100% - var(--admin-sidebar-width))!important;
    min-height:calc(100vh - var(--admin-topbar-height))!important;
  }
}
@media(max-width:991.98px){
  .admin-layout{display:block!important}
  .admin-main{margin-left:0!important;width:100%!important;max-width:100%!important}
  .admin-sidebar.offcanvas-start{
    position:fixed!important;
    top:0!important;
    bottom:0!important;
    height:100dvh!important;
    max-height:100dvh!important;
    z-index:1055!important;
  }
}
.portal-navbar{position:sticky!important;top:0!important;z-index:1030!important}


/* v13: split desktop sidebar from mobile offcanvas so desktop navigation cannot disappear */
@media(min-width:992px){
  .admin-sidebar-desktop{
    position:fixed!important;
    display:flex!important;
    flex-direction:column!important;
    top:var(--admin-topbar-height)!important;
    left:0!important;
    bottom:0!important;
    width:var(--admin-sidebar-width)!important;
    max-width:var(--admin-sidebar-width)!important;
    min-width:var(--admin-sidebar-width)!important;
    height:calc(100vh - var(--admin-topbar-height))!important;
    visibility:visible!important;
    opacity:1!important;
    transform:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    z-index:1035!important;
    background:#101744!important;
  }
  .admin-sidebar-desktop > .admin-sidebar-brand{flex:0 0 auto}
  .admin-sidebar-desktop > .admin-nav{flex:1 0 auto}
  .admin-sidebar-mobile{display:none!important}
  .admin-main{
    margin-left:var(--admin-sidebar-width)!important;
    width:calc(100% - var(--admin-sidebar-width))!important;
    max-width:calc(100% - var(--admin-sidebar-width))!important;
  }
}
@media(max-width:991.98px){
  .admin-sidebar-desktop{display:none!important}
  .admin-sidebar-mobile{width:min(86vw,290px)!important;max-width:min(86vw,290px)!important;background:#101744!important;color:#fff!important}
  .admin-sidebar-mobile .offcanvas-body{overflow-y:auto!important;overflow-x:hidden!important}
  .admin-main{margin-left:0!important;width:100%!important;max-width:100%!important}
}
