:root{--blue:#096fd7;--blue2:#12b7ef;--navy:#062a56;--ink:#13233b;--muted:#6d7d91;--bg:#f4f8fc;--card:#fff;--line:#e2eaf3;--success:#159b68;--warn:#e99a17;--danger:#d8474d;--purple:#6f55d9;--shadow:0 12px 30px rgba(15,60,110,.09)}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg)}button,input,select,textarea{font:inherit}button{cursor:pointer}.hidden{display:none!important}.login-page{min-height:100vh;padding:28px;display:grid;place-items:center;background:radial-gradient(circle at 10% 10%,#e6f4ff,transparent 28%),#f7fbff}.login-shell{width:min(1180px,100%);display:grid;grid-template-columns:1.08fr .92fr;background:#fff;border-radius:28px;overflow:hidden;border:1px solid #e1ebf6;box-shadow:0 26px 70px rgba(8,53,105,.14)}.brand-panel{min-height:690px;padding:38px 44px;color:#fff;background:linear-gradient(145deg,#05254f,#075ba9 70%,#0c9ce4);display:flex;flex-direction:column}.brand-top{display:flex;align-items:center;gap:14px}.brand-logo{width:82px;height:62px;object-fit:contain;background:#fff;border-radius:14px;padding:5px}.brand-name{font-size:30px;font-weight:900}.brand-name span{color:#80d7ff}.brand-subtitle{font-size:12px;opacity:.82}.brand-copy{margin:auto 0}.eyebrow{font-size:12px;letter-spacing:.15em;font-weight:900;color:#9fdcff}.brand-copy h1{font-size:42px;line-height:1.08;max-width:620px;margin:15px 0}.brand-copy p{max-width:620px;line-height:1.6;color:#d7eaff}.feature-grid{display:flex;flex-wrap:wrap;gap:9px;margin-top:24px}.feature-grid span{padding:10px 13px;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.1);border-radius:999px;font-size:12px}.brand-footer{font-size:12px;opacity:.8}.login-card-wrap{padding:40px;display:grid;place-items:center}.login-card{width:min(430px,100%)}.login-logo{display:block;width:125px;height:86px;object-fit:contain;margin:0 auto}.login-card h2{text-align:center;margin:6px 0;font-size:28px}.login-card>p{text-align:center;color:var(--muted);margin:0 0 16px}.api-status{padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#f5f8fc;font-size:12px;display:flex;gap:8px;align-items:center;margin-bottom:15px}.api-status span{width:9px;height:9px;border-radius:50%;background:#9ba9b8}.api-status.online{background:#edf9f4;color:#12744e}.api-status.online span{background:var(--success)}.api-status.offline{background:#fff0f1;color:#9d2930}.api-status.offline span{background:var(--danger)}.login-form{display:grid;gap:14px}.login-form label,.field label{font-size:12px;font-weight:800;color:#354b66}.login-form input,.field input,.field select,.field textarea,.select{width:100%;margin-top:6px;padding:12px 13px;border:1px solid #dce6f1;border-radius:11px;background:#fff;color:var(--ink);outline:none}.login-form input:focus,.field input:focus,.field select:focus,.field textarea:focus{border-color:#65b7ff;box-shadow:0 0 0 4px #e8f4ff}.password-wrap{position:relative}.password-wrap input{padding-right:48px}.password-toggle{position:absolute;right:7px;bottom:6px;border:0;background:transparent;padding:7px}.btn{border:0;border-radius:11px;padding:11px 15px;font-weight:850}.primary{color:#fff;background:linear-gradient(90deg,var(--blue),var(--blue2));box-shadow:0 8px 22px rgba(9,111,215,.19)}.ghost{background:#fff;border:1px solid var(--line);color:#33516f}.soft{background:#eaf4ff;color:#0b66c3}.danger{background:#fff0f0;color:#ad3036}.wide{width:100%}.login-links{display:flex;justify-content:space-between;margin-top:12px}.link-btn{border:0;background:transparent;color:var(--blue);font-size:12px;padding:4px}.small-note{margin-top:18px;padding:12px;background:#f7f9fc;border-radius:12px;font-size:11px;line-height:1.5;color:#6e7c8c}.app{min-height:100vh;display:grid;grid-template-columns:260px 1fr}.sidebar{position:sticky;top:0;height:100vh;overflow-y:auto;padding:18px 14px;background:linear-gradient(180deg,#073064,#031f40);color:#fff;z-index:30}.side-brand{display:flex;align-items:center;gap:10px;padding:4px 8px 17px}.side-brand img{width:58px;height:44px;object-fit:contain;background:#fff;border-radius:10px;padding:3px}.side-brand strong{font-size:17px}.side-brand span{display:block;color:#abc7e3;font-size:10px}.side-period{padding:11px 12px;border-radius:12px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12);font-size:11px;margin-bottom:12px}.nav-group-title{font-size:9px;font-weight:900;letter-spacing:.12em;color:#86acd2;padding:15px 11px 6px}.nav-item{width:100%;display:flex;gap:10px;align-items:center;border:0;background:transparent;color:#dceaf8;padding:10px 11px;border-radius:10px;text-align:left;font-size:12px}.nav-item:hover{background:rgba(255,255,255,.08)}.nav-item.active{background:linear-gradient(90deg,#0a75e5,#099adf);color:#fff}.nav-icon{width:20px;text-align:center}.sidebar-foot{text-align:center;font-size:9px;color:#86a7c8;padding:10px}.main{min-width:0}.topbar{position:sticky;top:0;z-index:20;height:72px;background:rgba(255,255,255,.95);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:16px;padding:10px 22px}.search-wrap{flex:1;max-width:560px;background:#f5f8fc;border:1px solid var(--line);border-radius:11px;display:flex;align-items:center;gap:8px;padding:0 12px}.search-wrap input{width:100%;border:0;outline:0;background:transparent;padding:10px 0}.top-actions{margin-left:auto;display:flex;align-items:center;gap:10px}.select.compact{width:auto;min-width:155px;margin:0;padding:9px}.icon-btn{border:0;background:#f2f6fb;border-radius:10px;padding:9px}.user-chip{display:flex;align-items:center;gap:8px}.avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#dcebfb;color:#0757a2;font-weight:900}.user-chip strong{display:block;font-size:11px}.user-chip span{font-size:9px;color:var(--muted)}.content{padding:23px;max-width:1600px;margin:auto}.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-bottom:17px}.page-head h1{margin:0 0 4px;font-size:26px}.page-head p{margin:0;color:var(--muted);font-size:12px}.head-actions{display:flex;gap:8px;flex-wrap:wrap}.hero{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px;border:1px solid #dcecff;border-radius:18px;background:linear-gradient(120deg,#eaf5ff,#fff 64%);margin-bottom:17px}.hero h2{margin:3px 0 6px;font-size:25px}.hero p{margin:0;color:#61758a}.hero-brand{color:#0b67c5;font-weight:900;font-size:12px}.hero-orb{width:110px;height:75px;border-radius:22px;background:linear-gradient(135deg,#0b6dd5,#18c0ee)}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;margin-bottom:17px}.stat-card,.card{background:#fff;border:1px solid var(--line);border-radius:17px;box-shadow:0 4px 16px rgba(20,65,110,.04)}.stat-card{padding:17px}.stat-icon{width:40px;height:40px;border-radius:12px;background:#eaf4ff;display:grid;place-items:center}.stat-value{font-size:28px;font-weight:900;margin-top:11px}.stat-label{font-size:11px;color:#596c82}.stat-note{font-size:9px;color:#92a0af;margin-top:8px}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin-bottom:17px}.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:13px;margin-bottom:17px}.card{padding:17px;min-width:0}.card-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:13px}.card-title strong{font-size:13px}.toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.badge{display:inline-flex;padding:5px 8px;border-radius:999px;background:#eaf4ff;color:#0c67c3;font-size:9px;font-weight:900}.badge.green{background:#e9f8f1;color:#137a55}.badge.orange{background:#fff4e4;color:#9e630c}.badge.red{background:#fff0f0;color:#ad2e34}.badge.purple{background:#f1edff;color:#6146b7}.muted{color:var(--muted)}.small{font-size:10px}.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse;font-size:11px}.data-table th{text-align:left;color:#75859a;font-weight:800;border-bottom:1px solid var(--line);padding:9px 7px;white-space:nowrap}.data-table td{padding:11px 7px;border-bottom:1px solid #edf2f6;vertical-align:top}.empty{padding:25px;text-align:center;border:1px dashed #dbe5ef;background:#f8fafc;border-radius:13px;color:#8392a3}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.field.full{grid-column:1/-1}.field textarea{min-height:90px;resize:vertical}.modal-backdrop{position:fixed;inset:0;z-index:100;background:rgba(0,24,50,.56);display:grid;place-items:center;padding:20px}.modal{width:min(680px,100%);max-height:92vh;overflow:auto;background:#fff;border-radius:20px;box-shadow:0 24px 75px rgba(0,0,0,.25);padding:21px}.modal-head{display:flex;align-items:start;justify-content:space-between;margin-bottom:16px}.modal-head h3{margin:0}.modal-close{border:0;background:#f1f5f9;border-radius:9px;padding:7px 9px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.class-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.class-card{padding:16px;border:1px solid var(--line);border-radius:15px;background:#fff}.class-card h3{margin:5px 0;font-size:15px}.class-card p{margin:0;color:var(--muted);font-size:10px}.join-code{display:inline-block;font-family:ui-monospace,monospace;font-size:14px;font-weight:900;letter-spacing:.08em;color:#075da9;background:#edf7ff;padding:7px 9px;border-radius:9px;margin:9px 0}.toast{position:fixed;right:20px;top:18px;z-index:200;opacity:0;transform:translateY(-7px);pointer-events:none;transition:.2s;background:#10233f;color:#fff;padding:11px 14px;border-radius:11px;box-shadow:var(--shadow);font-size:11px;max-width:370px}.toast.show{opacity:1;transform:none}.toast.success{background:#11784f}.toast.error{background:#a62f35}.loading{display:inline-block;width:14px;height:14px;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;animation:spin .8s linear infinite}.mobile-only{display:none}@keyframes spin{to{transform:rotate(360deg)}}@media(max-width:1050px){.stats-grid{grid-template-columns:repeat(2,1fr)}.grid-2,.grid-3{grid-template-columns:1fr}.app{grid-template-columns:225px 1fr}.sidebar{width:225px}.search-wrap{display:none}}@media(max-width:760px){.login-page{padding:0}.login-shell{grid-template-columns:1fr;border-radius:0}.brand-panel{min-height:auto;padding:26px 23px}.brand-copy{margin:35px 0}.brand-copy h1{font-size:31px}.login-card-wrap{padding:28px 22px}.app{display:block}.sidebar{position:fixed;left:0;width:270px;transform:translateX(-110%);transition:.25s}.sidebar.mobile-nav-open{transform:none}.mobile-only{display:inline-flex}.top-actions .select,.user-chip{display:none}.content{padding:15px}.stats-grid{grid-template-columns:1fr 1fr;gap:9px}.grid-2,.grid-3,.class-grid{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.hero-orb{display:none}.page-head{align-items:start;flex-direction:column}}

/* v1.2 Final UX additions */
.btn.mini{padding:7px 9px;border-radius:9px;font-size:10px;white-space:nowrap}.row-actions{display:flex;gap:6px;flex-wrap:wrap}.section-gap{margin-top:14px}.form-note{font-size:10px;line-height:1.55;color:var(--muted);background:#f7f9fc;border:1px solid var(--line);border-radius:11px;padding:10px 12px;margin:12px 0 0}.field-help{display:block;margin-top:5px;color:var(--muted);font-size:9px}.profile-meta{display:grid;grid-template-columns:110px 1fr;gap:7px 12px;margin:14px 0;padding-top:12px;border-top:1px solid var(--line);font-size:10px}.profile-meta span{color:var(--muted)}.profile-meta b{font-weight:800}.data-table .row-actions{min-width:170px}@media(max-width:760px){.data-table .row-actions{min-width:145px}.profile-meta{grid-template-columns:90px 1fr}.btn.mini{padding:7px 8px}}

/* v1.3 Complete — file assets, profile photo, affiliations */
.avatar{overflow:hidden}.avatar img{width:100%;height:100%;object-fit:cover;display:block}.hero-orb.has-photo{overflow:hidden;background:#eaf4ff;border:1px solid var(--line)}.hero-orb.has-photo img{width:100%;height:100%;object-fit:cover;display:block}.asset-list{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}.asset-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:7px 9px;border:1px solid #dce8f4;border-radius:10px;background:#f5faff;color:#0b63ba;text-decoration:none;font-size:10px;font-weight:750}.asset-chip span{color:var(--muted);font-weight:600}.profile-top{display:flex;align-items:center;gap:14px}.profile-avatar-large{width:78px;height:78px;flex:0 0 78px;border-radius:22px;overflow:hidden;background:linear-gradient(135deg,#0b6dd5,#18c0ee);color:#fff;display:grid;place-items:center;font-size:28px;font-weight:900}.profile-avatar-large img{width:100%;height:100%;object-fit:cover;display:block}.aff-mini{margin-top:7px;padding:8px 10px;border:1px solid var(--line);background:#f8fbfe;border-radius:10px;font-size:10px;color:#425c75}.check-row{display:flex!important;align-items:center;gap:8px}.check-row input{width:auto!important;margin:0!important}.soft-line{border:0;border-top:1px solid var(--line);margin:17px 0}.upload-progress{font-size:10px;color:var(--muted);margin-top:7px}.file-limit{font-size:9px;color:#7b8998;margin-top:5px}.hero-orb.has-photo{width:86px;height:86px;border-radius:24px}@media(max-width:760px){.profile-top{align-items:flex-start}.profile-avatar-large{width:64px;height:64px;flex-basis:64px}.asset-chip{width:100%}}

/* v1.5.1 mobile avatar visibility fix — keep responsive layout compact */
@media(max-width:760px){
  .user-chip{display:flex;align-items:center;gap:0}
  .user-chip>div:last-child{display:none}
  .avatar{width:34px;height:34px;min-width:34px;flex:0 0 34px}
  .hero{align-items:flex-start;gap:12px}
  .hero>div:first-child{min-width:0;flex:1}
  .hero-orb{display:block;width:68px;height:68px;min-width:68px;flex:0 0 68px;border-radius:50%}
}

/* v1.5.1 final audited — mobile usability hardening */
.mobile-context{display:none}
@media(max-width:760px){
  .mobile-context{display:grid;gap:8px;margin:8px 0 4px;padding:10px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:rgba(255,255,255,.06)}
  .mobile-context label{display:grid;gap:4px;font-size:9px;font-weight:900;letter-spacing:.04em;color:#9dc1e4}
  .mobile-context .select{display:block!important;width:100%;min-width:0;margin:0;padding:9px 10px;border-color:rgba(255,255,255,.18);background:#fff;color:#15314f;font-size:12px}
  .topbar{padding:10px 14px;gap:10px}
  .top-actions{gap:7px}
  .content{padding:15px;padding-bottom:calc(96px + env(safe-area-inset-bottom))}
  .modal-backdrop{padding:10px;padding-top:max(10px,env(safe-area-inset-top));padding-bottom:calc(90px + env(safe-area-inset-bottom));align-items:start;overflow:auto}
  .modal{max-height:calc(100dvh - 20px);padding:18px;padding-bottom:90px}
  .modal-actions{margin-top:14px}
  .modal-actions .btn{min-height:44px}
  .field input,.field select,.field textarea,.select{font-size:16px}
  .table-wrap{-webkit-overflow-scrolling:touch}
  .toast{left:12px;right:12px;top:max(12px,env(safe-area-inset-top));max-width:none}
}
/* v1.5.2 final mobile hardening */
@media(max-width:760px){
  html,body{overflow-x:hidden}
  .sidebar{height:100dvh;padding-bottom:calc(18px + env(safe-area-inset-bottom));overscroll-behavior:contain}
  .icon-btn{min-width:44px;min-height:44px}
  .nav-item{min-height:44px}
  .field input[type="file"]{max-width:100%;overflow:hidden}
  .page-head .head-actions{width:100%}
  .page-head .head-actions .btn{max-width:100%}
  .card,.stat-card,.class-card{min-width:0}
  .hero h2{overflow-wrap:anywhere}
}

/* v1.6.1 Production Polish */
.brand-logo{width:100px;height:72px;padding:4px;border-radius:14px}
.login-logo{width:175px;height:112px;margin-bottom:2px}
.side-brand img{width:74px;height:54px;padding:3px}
.sidebar-foot{letter-spacing:.02em}
.developer-profile{display:grid;grid-template-columns:220px 1fr;gap:24px;align-items:center}
.developer-visual{display:grid;gap:12px;justify-items:center}
.developer-photo{width:190px;height:240px;object-fit:cover;object-position:center top;border-radius:24px;border:1px solid var(--line);box-shadow:0 12px 30px rgba(15,60,110,.12);background:#f6f9fc}
.developer-logo{width:210px;max-height:145px;object-fit:contain;background:#fff;border-radius:14px}
.developer-info h4{font-size:22px;line-height:1.25;margin:8px 0 5px;color:var(--ink)}
.developer-kicker{display:inline-block;font-size:9px;letter-spacing:.12em;font-weight:900;color:#0a6ccf;background:#edf7ff;padding:6px 9px;border-radius:999px}
.developer-role{margin:0;font-weight:850;color:#0b5da9}
.developer-tagline{font-size:12px;line-height:1.65;color:var(--muted);margin:10px 0 17px}
.developer-links{display:flex;flex-wrap:wrap;gap:8px}.developer-link{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
.reset-success{text-align:center}.reset-icon{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;margin:0 auto 12px;background:#e9f8f1;color:#137a55;font-size:27px;font-weight:900}
.temporary-password{display:flex;align-items:center;gap:10px;justify-content:center;margin:15px 0;padding:13px;border:1px solid #dce8f4;background:#f7fbff;border-radius:13px}
.temporary-password code{font-size:19px;font-weight:900;letter-spacing:.08em;color:#0b4f90;word-break:break-all}
.api-status.online{font-weight:750}
@media(max-width:760px){.brand-logo{width:84px;height:62px}.login-logo{width:160px;height:100px}.side-brand img{width:68px;height:50px}.developer-profile{grid-template-columns:1fr;text-align:center}.developer-photo{width:160px;height:205px}.developer-logo{width:190px}.developer-links{justify-content:center}.developer-link{width:100%}.temporary-password{flex-direction:column}.temporary-password code{font-size:18px}}
