body{background:#f6f8fb}.sidebar{background:#fff;min-height:calc(100vh - 56px);border-right:1px solid #e8edf3}
.sidebar .list-group-item{border:0;border-bottom:1px solid #f1f3f5;padding:14px 16px}.sidebar .list-group-item:hover{background:#eef5ff}
.card{border:0;border-radius:14px}.table-responsive{border-radius:12px;background:#fff}
@media(max-width:991px){.sidebar{min-height:auto;border-right:0}.sidebar .list-group{display:flex;overflow:auto;flex-direction:row}.sidebar .list-group-item{white-space:nowrap}}


/* V7.31 Futuristic Teacher Mobile Portal */
.erp-topbar{box-shadow:0 10px 35px rgba(13,110,253,.18);backdrop-filter:saturate(160%) blur(12px)}
.teacher-menu-toggle{border:0;color:#fff;font-size:1.45rem;padding:.2rem .55rem;background:rgba(255,255,255,.13);border-radius:12px}
.teacher-role-pill{padding:5px 10px;border-radius:999px;background:rgba(255,255,255,.16);font-size:.72rem;font-weight:700;letter-spacing:.04em}
.teacher-bottom-nav{position:fixed;z-index:1040;left:8px;right:8px;bottom:8px;height:70px;border-radius:22px;background:rgba(8,25,60,.94);backdrop-filter:blur(18px);box-shadow:0 18px 45px rgba(3,13,35,.32);display:grid;grid-template-columns:repeat(6,1fr);padding:7px;gap:4px}
.teacher-bottom-nav a,.teacher-bottom-nav button{border:0;background:transparent;color:#dbeafe;text-decoration:none;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:14px;min-width:0}
.teacher-bottom-nav a:active,.teacher-bottom-nav button:active{background:rgba(59,130,246,.25)}
.teacher-bottom-nav span{font-size:1.25rem;line-height:1}.teacher-bottom-nav small{font-size:.58rem;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;text-align:center}
.teacher-drawer-overlay{display:none;position:fixed;inset:56px 0 0 0;background:rgba(3,12,32,.52);z-index:1025;backdrop-filter:blur(2px)}.teacher-drawer-overlay.show{display:block}
body.drawer-open{overflow:hidden}
@media(max-width:991px){
  body.teacher-portal-body{padding-bottom:88px;background:radial-gradient(circle at 50% 0,#eef6ff 0,#f7f9fc 48%,#f6f8fb 100%)}
  .teacher-mobile-drawer{display:block!important;position:fixed;z-index:1030;top:56px;left:0;bottom:0;width:min(84vw,330px);min-height:0!important;overflow-y:auto;transform:translateX(-104%);transition:transform .28s cubic-bezier(.22,.75,.2,1);border-right:0!important;border-radius:0 22px 22px 0;box-shadow:20px 0 50px rgba(3,13,35,.22);background:rgba(255,255,255,.98)!important}
  .teacher-mobile-drawer.open{transform:translateX(0)}
  .teacher-mobile-drawer .list-group{display:block!important;overflow:visible!important}
  .teacher-mobile-drawer .list-group-item{white-space:normal!important;margin:5px 10px;border:0!important;border-radius:13px!important;padding:12px 14px!important;background:#f7faff}
  .teacher-mobile-drawer .list-group-item:hover,.teacher-mobile-drawer .list-group-item:active{background:#eaf3ff!important;color:#0756c7}
  .teacher-main{width:100%!important;padding:.85rem!important}
  .teacher-main>.h3{font-size:1.25rem;font-weight:800;margin-bottom:1rem!important}
  .teacher-main .card{border-radius:18px;box-shadow:0 8px 30px rgba(28,53,88,.08)!important}
  .teacher-main .btn{border-radius:12px}
  .teacher-main .table-responsive{border-radius:16px}
}


/* V7.39 Standard Mobile ERP + PWA */
.pwa-install-toast{position:fixed;left:12px;right:12px;bottom:88px;z-index:1090;background:linear-gradient(135deg,#0d6efd,#16448c);color:#fff;padding:12px 14px;border-radius:18px;box-shadow:0 18px 45px rgba(8,38,87,.3);display:flex;align-items:center;justify-content:space-between;gap:12px}
.pwa-install-toast small{display:block;opacity:.85}
@media(max-width:991px){
 body.erp-mobile-body{padding-bottom:88px;background:radial-gradient(circle at 50% 0,#eef6ff 0,#f7f9fc 42%,#f6f8fb 100%)}
 .erp-topbar{min-height:62px;padding:.4rem .15rem}
 .erp-topbar .navbar-brand{font-size:1rem;max-width:58vw;white-space:normal;line-height:1.15}
 .erp-topbar .btn-light{font-size:.78rem;padding:.38rem .65rem}
 .erp-mobile-drawer{display:block!important;position:fixed;z-index:1035;top:62px;left:0;bottom:0;width:min(86vw,340px);min-height:0!important;overflow-y:auto;transform:translateX(-105%);transition:transform .28s cubic-bezier(.22,.75,.2,1);border-right:0!important;border-radius:0 22px 22px 0;box-shadow:20px 0 50px rgba(3,13,35,.22);background:rgba(255,255,255,.99)!important}
 .erp-mobile-drawer.open{transform:translateX(0)}
 .erp-mobile-drawer .list-group{display:block!important;overflow:visible!important;flex-direction:column!important;padding:8px 0 22px}
 .erp-mobile-drawer .list-group-item{white-space:normal!important;margin:4px 10px;border:0!important;border-radius:13px!important;padding:12px 14px!important;background:#f7faff;font-size:.96rem}
 .erp-mobile-drawer .list-group-item:active{background:#e8f2ff!important;color:#0756c7}
 .teacher-drawer-overlay{inset:62px 0 0 0}
 .erp-mobile-main{width:100%!important;max-width:100%!important;padding:.85rem!important;overflow-x:hidden}
 .erp-mobile-main>.h3{font-size:1.35rem;font-weight:800;line-height:1.2;margin-bottom:1rem!important}
 .erp-mobile-main .card{border-radius:18px;box-shadow:0 8px 28px rgba(28,53,88,.08)!important}
 .erp-mobile-main .card-body{padding:1rem}
 .erp-mobile-main .row{--bs-gutter-x:.75rem;--bs-gutter-y:.75rem}
 .erp-mobile-main .display-6{font-size:2rem}
 .erp-mobile-main .table-responsive{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
 .erp-mobile-main .form-control,.erp-mobile-main .form-select,.erp-mobile-main .btn{min-height:44px;border-radius:12px}
 .teacher-bottom-nav{grid-template-columns:repeat(5,1fr);height:72px;bottom:max(8px,env(safe-area-inset-bottom));}
 .teacher-bottom-nav a,.teacher-bottom-nav button{min-width:0}
}
@media(max-width:420px){
 .erp-topbar .navbar-brand{font-size:.92rem;max-width:54vw}
 .erp-mobile-main{padding:.7rem!important}
 .erp-mobile-main .card-body{padding:.9rem}
 .teacher-bottom-nav small{font-size:.56rem}
}
@media(display-mode:standalone){
 body{padding-top:env(safe-area-inset-top)}
 .erp-topbar{top:env(safe-area-inset-top)}
}
